diff --git a/test/harness/$FAIL.js b/test/harness/$FAIL.js new file mode 100644 index 0000000000..64f13f14ed --- /dev/null +++ b/test/harness/$FAIL.js @@ -0,0 +1,3 @@ +function $FAIL(message) { + testFailed(message); +} diff --git a/test/harness/$PRINT.js b/test/harness/$PRINT.js new file mode 100644 index 0000000000..b9a3015037 --- /dev/null +++ b/test/harness/$PRINT.js @@ -0,0 +1,4 @@ +//adaptors for Test262 framework +function $PRINT(message) { + +} diff --git a/test/harness/Date_constants.js b/test/harness/Date_constants.js index e69de29bb2..b9e072f533 100644 --- a/test/harness/Date_constants.js +++ b/test/harness/Date_constants.js @@ -0,0 +1,83 @@ +//Date_constants.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +var HoursPerDay = 24; +var MinutesPerHour = 60; +var SecondsPerMinute = 60; + +var msPerDay = 86400000; +var msPerSecond = 1000; +var msPerMinute = 60000; +var msPerHour = 3600000; + +var date_1899_end = -2208988800001; +var date_1900_start = -2208988800000; +var date_1969_end = -1; +var date_1970_start = 0; +var date_1999_end = 946684799999; +var date_2000_start = 946684800000; +var date_2099_end = 4102444799999; +var date_2100_start = 4102444800000; + +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//the following values are normally generated by the sputnik.py driver +var $LocalTZ, + $DST_start_month, + $DST_start_sunday, + $DST_start_hour, + $DST_start_minutes, + $DST_end_month, + $DST_end_sunday, + $DST_end_hour, + $DST_end_minutes; + +(function () { + /** + * Finds the first date, starting from |start|, where |predicate| + * holds. + */ + var findNearestDateBefore = function(start, predicate) { + var current = start; + var month = 1000 * 60 * 60 * 24 * 30; + for (var step = month; step > 0; step = Math.floor(step / 3)) { + if (!predicate(current)) { + while (!predicate(current)) + current = new Date(current.getTime() + step); + current = new Date(current.getTime() - step); + } + } + while (!predicate(current)) { + current = new Date(current.getTime() + 1); + } + return current; + }; + + var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); + var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0); + var juneOffset = juneDate.getTimezoneOffset(); + var decemberOffset = decemberDate.getTimezoneOffset(); + var isSouthernHemisphere = (juneOffset > decemberOffset); + var winterTime = isSouthernHemisphere ? juneDate : decemberDate; + var summerTime = isSouthernHemisphere ? decemberDate : juneDate; + + var dstStart = findNearestDateBefore(winterTime, function (date) { + return date.getTimezoneOffset() == summerTime.getTimezoneOffset(); + }); + $DST_start_month = dstStart.getMonth(); + $DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"'; + $DST_start_hour = dstStart.getHours(); + $DST_start_minutes = dstStart.getMinutes(); + + var dstEnd = findNearestDateBefore(summerTime, function (date) { + return date.getTimezoneOffset() == winterTime.getTimezoneOffset(); + }); + $DST_end_month = dstEnd.getMonth(); + $DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"'; + $DST_end_hour = dstEnd.getHours(); + $DST_end_minutes = dstEnd.getMinutes(); + + return; +})(); diff --git a/test/harness/Date_library.js b/test/harness/Date_library.js index e69de29bb2..a971ebb2ee 100644 --- a/test/harness/Date_library.js +++ b/test/harness/Date_library.js @@ -0,0 +1,439 @@ +//Date.library.js +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +//15.9.1.2 Day Number and Time within Day +function Day(t) { + return Math.floor(t/msPerDay); +} + +function TimeWithinDay(t) { + return t%msPerDay; +} + +//15.9.1.3 Year Number +function DaysInYear(y){ + if(y%4 != 0) return 365; + if(y%4 == 0 && y%100 != 0) return 366; + if(y%100 == 0 && y%400 != 0) return 365; + if(y%400 == 0) return 366; +} + +function DayFromYear(y) { + return (365*(y-1970) + + Math.floor((y-1969)/4) + - Math.floor((y-1901)/100) + + Math.floor((y-1601)/400)); +} + +function TimeFromYear(y){ + return msPerDay*DayFromYear(y); +} + +function YearFromTime(t) { + t = Number(t); + var sign = ( t < 0 ) ? -1 : 1; + var year = ( sign < 0 ) ? 1969 : 1970; + + for(var time = 0;;year += sign){ + time = TimeFromYear(year); + + if(sign > 0 && time > t){ + year -= sign; + break; + } + else if(sign < 0 && time <= t){ + break; + } + }; + return year; +} + +function InLeapYear(t){ + if(DaysInYear(YearFromTime(t)) == 365) + return 0; + + if(DaysInYear(YearFromTime(t)) == 366) + return 1; +} + +function DayWithinYear(t) { + return Day(t)-DayFromYear(YearFromTime(t)); +} + +//15.9.1.4 Month Number +function MonthFromTime(t){ + var day = DayWithinYear(t); + var leap = InLeapYear(t); + + if((0 <= day) && (day < 31)) return 0; + if((31 <= day) && (day < (59+leap))) return 1; + if(((59+leap) <= day) && (day < (90+leap))) return 2; + if(((90+leap) <= day) && (day < (120+leap))) return 3; + if(((120+leap) <= day) && (day < (151+leap))) return 4; + if(((151+leap) <= day) && (day < (181+leap))) return 5; + if(((181+leap) <= day) && (day < (212+leap))) return 6; + if(((212+leap) <= day) && (day < (243+leap))) return 7; + if(((243+leap) <= day) && (day < (273+leap))) return 8; + if(((273+leap) <= day) && (day < (304+leap))) return 9; + if(((304+leap) <= day) && (day < (334+leap))) return 10; + if(((334+leap) <= day) && (day < (365+leap))) return 11; +} + +//15.9.1.5 Date Number +function DateFromTime(t) { + var day = DayWithinYear(t); + var month = MonthFromTime(t); + var leap = InLeapYear(t); + + if(month == 0) return day+1; + if(month == 1) return day-30; + if(month == 2) return day-58-leap; + if(month == 3) return day-89-leap; + if(month == 4) return day-119-leap; + if(month == 5) return day-150-leap; + if(month == 6) return day-180-leap; + if(month == 7) return day-211-leap; + if(month == 8) return day-242-leap; + if(month == 9) return day-272-leap; + if(month == 10) return day-303-leap; + if(month == 11) return day-333-leap; +} + +//15.9.1.6 Week Day +function WeekDay(t) { + var weekday = (Day(t)+4)%7; + return (weekday < 0 ? 7+weekday : weekday); +} + +//15.9.1.9 Daylight Saving Time Adjustment +$LocalTZ = (new Date()).getTimezoneOffset() / -60; +if (DaylightSavingTA((new Date()).valueOf()) !== 0) { + $LocalTZ -= 1; +} +var LocalTZA = $LocalTZ*msPerHour; + +function DaysInMonth(m, leap) { + m = m%12; + + //April, June, Sept, Nov + if(m == 3 || m == 5 || m == 8 || m == 10 ) { + return 30; + } + + //Jan, March, May, July, Aug, Oct, Dec + if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ + return 31; + } + + //Feb + return 28+leap; +} + +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var tempDate; + + if (count==='"first"') { + for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) { + tempDate = new Date(year, m, d); + if (tempDate.getDay()===0) { + return tempDate.valueOf(); + } + } + } else if(count==='"last"') { + for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) { + tempDate = new Date(year, m, d); + if (tempDate.getDay()===0) { + return tempDate.valueOf(); + } + } + } + throw new Error("Unsupported 'count' arg:" + count); +} +/* +function GetSundayInMonth(t, m, count){ + var year = YearFromTime(t); + var leap = InLeapYear(t); + var day = 0; + + if(m >= 1) day += DaysInMonth(0, leap); + if(m >= 2) day += DaysInMonth(1, leap); + if(m >= 3) day += DaysInMonth(2, leap); + if(m >= 4) day += DaysInMonth(3, leap); + if(m >= 5) day += DaysInMonth(4, leap); + if(m >= 6) day += DaysInMonth(5, leap); + if(m >= 7) day += DaysInMonth(6, leap); + if(m >= 8) day += DaysInMonth(7, leap); + if(m >= 9) day += DaysInMonth(8, leap); + if(m >= 10) day += DaysInMonth(9, leap); + if(m >= 11) day += DaysInMonth(10, leap); + + var month_start = TimeFromYear(year)+day*msPerDay; + var sunday = 0; + + if(count === "last"){ + for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; + WeekDay(last_sunday)>0; + last_sunday -= msPerDay + ){}; + sunday = last_sunday; + } + else { + for(var first_sunday = month_start; + WeekDay(first_sunday)>0; + first_sunday += msPerDay + ){}; + sunday = first_sunday+7*msPerDay*(count-1); + } + + return sunday; +}*/ + +function DaylightSavingTA(t) { +// t = t-LocalTZA; + + var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + + $DST_start_hour*msPerHour + + $DST_start_minutes*msPerMinute; + + var k = new Date(DST_start); + + var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + + $DST_end_hour*msPerHour + + $DST_end_minutes*msPerMinute; + + if ( t >= DST_start && t < DST_end ) { + return msPerHour; + } else { + return 0; + } +} + +//15.9.1.9 Local Time +function LocalTime(t){ + return t+LocalTZA+DaylightSavingTA(t); +} + +function UTC(t) { + return t-LocalTZA-DaylightSavingTA(t-LocalTZA); +} + +//15.9.1.10 Hours, Minutes, Second, and Milliseconds +function HourFromTime(t){ + return Math.floor(t/msPerHour)%HoursPerDay; +} + +function MinFromTime(t){ + return Math.floor(t/msPerMinute)%MinutesPerHour; +} + +function SecFromTime(t){ + return Math.floor(t/msPerSecond)%SecondsPerMinute; +} + +function msFromTime(t){ + return t%msPerSecond; +} + +//15.9.1.11 MakeTime (hour, min, sec, ms) +function MakeTime(hour, min, sec, ms){ + if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { + return Number.NaN; + } + + hour = ToInteger(hour); + min = ToInteger(min); + sec = ToInteger(sec); + ms = ToInteger(ms); + + return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); +} + +//15.9.1.12 MakeDay (year, month, date) +function MakeDay(year, month, date) { + if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { + return Number.NaN; + } + + year = ToInteger(year); + month = ToInteger(month); + date = ToInteger(date ); + + var result5 = year + Math.floor(month/12); + var result6 = month%12; + + var sign = ( year < 1970 ) ? -1 : 1; + var t = ( year < 1970 ) ? 1 : 0; + var y = ( year < 1970 ) ? 1969 : 1970; + + if( sign == -1 ){ + for ( y = 1969; y >= year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } else { + for ( y = 1970 ; y < year; y += sign ) { + t += sign * DaysInYear(y)*msPerDay; + } + } + + var leap = 0; + for ( var m = 0; m < month; m++ ) { + //if year is changed, than we need to recalculate leep + leap = InLeapYear(t); + t += DaysInMonth(m, leap)*msPerDay; + } + + if ( YearFromTime(t) != result5 ) { + return Number.NaN; + } + if ( MonthFromTime(t) != result6 ) { + return Number.NaN; + } + if ( DateFromTime(t) != 1 ) { + return Number.NaN; + } + + return Day(t)+date-1; +} + +//15.9.1.13 MakeDate (day, time) +function MakeDate( day, time ) { + if(!isFinite(day) || !isFinite(time)) { + return Number.NaN; + } + + return day*msPerDay+time; +} + +//15.9.1.14 TimeClip (time) +function TimeClip(time) { + if(!isFinite(time) || Math.abs(time) > 8.64e15){ + return Number.NaN; + } + + return ToInteger(time); +} + +//Test Functions +//ConstructDate is considered deprecated, and should not be used directly from +//test262 tests as it's incredibly sensitive to DST start/end dates that +//vary with geographic location. +function ConstructDate(year, month, date, hours, minutes, seconds, ms){ + /* + * 1. Call ToNumber(year) + * 2. Call ToNumber(month) + * 3. If date is supplied use ToNumber(date); else use 1 + * 4. If hours is supplied use ToNumber(hours); else use 0 + * 5. If minutes is supplied use ToNumber(minutes); else use 0 + * 6. If seconds is supplied use ToNumber(seconds); else use 0 + * 7. If ms is supplied use ToNumber(ms); else use 0 + * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + * 9. Compute MakeDay(Result(8), Result(2), Result(3)) + * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + * 11. Compute MakeDate(Result(9), Result(10)) + * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) + */ + var r1 = Number(year); + var r2 = Number(month); + var r3 = ((date && arguments.length > 2) ? Number(date) : 1); + var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); + var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); + var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); + var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); + + var r8 = r1; + + if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) + r8 = 1900+r1; + + var r9 = MakeDay(r8, r2, r3); + var r10 = MakeTime(r4, r5, r6, r7); + var r11 = MakeDate(r9, r10); + + var retVal = TimeClip(UTC(r11)); + return retVal; +} + + + +/**** Python code for initialize the above constants +// We may want to replicate the following in JavaScript. +// However, using JS date operations to generate parameters that are then used to +// test those some date operations seems unsound. However, it isn't clear if there +//is a good interoperable alternative. + +# Copyright 2009 the Sputnik authors. All rights reserved. +# This code is governed by the BSD license found in the LICENSE file. + +def GetDaylightSavingsTimes(): +# Is the given floating-point time in DST? +def IsDst(t): +return time.localtime(t)[-1] +# Binary search to find an interval between the two times no greater than +# delta where DST switches, returning the midpoint. +def FindBetween(start, end, delta): +while end - start > delta: +middle = (end + start) / 2 +if IsDst(middle) == IsDst(start): +start = middle +else: +end = middle +return (start + end) / 2 +now = time.time() +one_month = (30 * 24 * 60 * 60) +# First find a date with different daylight savings. To avoid corner cases +# we try four months before and after today. +after = now + 4 * one_month +before = now - 4 * one_month +if IsDst(now) == IsDst(before) and IsDst(now) == IsDst(after): +logger.warning("Was unable to determine DST info.") +return None +# Determine when the change occurs between now and the date we just found +# in a different DST. +if IsDst(now) != IsDst(before): +first = FindBetween(before, now, 1) +else: +first = FindBetween(now, after, 1) +# Determine when the change occurs between three and nine months from the +# first. +second = FindBetween(first + 3 * one_month, first + 9 * one_month, 1) +# Find out which switch is into and which if out of DST +if IsDst(first - 1) and not IsDst(first + 1): +start = second +end = first +else: +start = first +end = second +return (start, end) + + +def GetDaylightSavingsAttribs(): +times = GetDaylightSavingsTimes() +if not times: +return None +(start, end) = times +def DstMonth(t): +return time.localtime(t)[1] - 1 +def DstHour(t): +return time.localtime(t - 1)[3] + 1 +def DstSunday(t): +if time.localtime(t)[2] > 15: +return "'last'" +else: +return "'first'" +def DstMinutes(t): +return (time.localtime(t - 1)[4] + 1) % 60 +attribs = { } +attribs['start_month'] = DstMonth(start) +attribs['end_month'] = DstMonth(end) +attribs['start_sunday'] = DstSunday(start) +attribs['end_sunday'] = DstSunday(end) +attribs['start_hour'] = DstHour(start) +attribs['end_hour'] = DstHour(end) +attribs['start_minutes'] = DstMinutes(start) +attribs['end_minutes'] = DstMinutes(end) +return attribs + +*********/ diff --git a/test/harness/Test262Error.js b/test/harness/Test262Error.js new file mode 100644 index 0000000000..8966c7621f --- /dev/null +++ b/test/harness/Test262Error.js @@ -0,0 +1,7 @@ +//function Test262Error(message) { +// if (message) this.message = message; +//} +// +//Test262Error.prototype.toString = function () { +// return "Test262 Error: " + this.message; +//}; diff --git a/test/harness/accessorPropertyAttributesAreCorrect.js b/test/harness/accessorPropertyAttributesAreCorrect.js new file mode 100644 index 0000000000..8343936457 --- /dev/null +++ b/test/harness/accessorPropertyAttributesAreCorrect.js @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +//Verify all attributes specified accessor property of given object: +//get, set, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function accessorPropertyAttributesAreCorrect(obj, + name, + get, + set, + setVerifyHelpProp, + enumerable, + configurable) { + var attributesCorrect = true; + + if (get !== undefined) { + if (obj[name] !== get()) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof get() === "number" && + isNaN(get())) { + // keep empty + } else { + attributesCorrect = false; + } + } + } else { + if (obj[name] !== undefined) { + attributesCorrect = false; + } + } + + try { + var desc = Object.getOwnPropertyDescriptor(obj, name); + if (typeof desc.set === "undefined") { + if (typeof set !== "undefined") { + attributesCorrect = false; + } + } else { + obj[name] = "toBeSetValue"; + if (obj[setVerifyHelpProp] !== "toBeSetValue") { + attributesCorrect = false; + } + } + } catch (se) { + throw se; + } + + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + try { + delete obj[name]; + } catch (de) { + throw de; + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} diff --git a/test/harness/arrayContains.js b/test/harness/arrayContains.js new file mode 100644 index 0000000000..b295de5f3f --- /dev/null +++ b/test/harness/arrayContains.js @@ -0,0 +1,17 @@ +//----------------------------------------------------------------------------- +function arrayContains(arr, expected) { + var found; + for (var i = 0; i < expected.length; i++) { + found = false; + for (var j = 0; j < arr.length; j++) { + if (expected[i] === arr[j]) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; +} diff --git a/test/harness/compareArray.js b/test/harness/compareArray.js new file mode 100644 index 0000000000..9b842ed5c6 --- /dev/null +++ b/test/harness/compareArray.js @@ -0,0 +1,19 @@ + +//----------------------------------------------------------------------------- +function compareArray(aExpected, aActual) { + if (aActual.length != aExpected.length) { + return false; + } + + aExpected.sort(); + aActual.sort(); + + var s; + for (var i = 0; i < aExpected.length; i++) { + if (aActual[i] !== aExpected[i]) { + return false; + } + } + return true; +} + diff --git a/test/harness/dataPropertyAttributesAreCorrect.js b/test/harness/dataPropertyAttributesAreCorrect.js new file mode 100644 index 0000000000..201409f905 --- /dev/null +++ b/test/harness/dataPropertyAttributesAreCorrect.js @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +//Verify all attributes specified data property of given object: +//value, writable, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function dataPropertyAttributesAreCorrect(obj, + name, + value, + writable, + enumerable, + configurable) { + var attributesCorrect = true; + + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + attributesCorrect = false; + } + } + + try { + if (obj[name] === "oldValue") { + obj[name] = "newValue"; + } else { + obj[name] = "OldValue"; + } + } catch (we) { + } + + var overwrited = false; + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + overwrited = true; + } + } + if (overwrited !== writable) { + attributesCorrect = false; + } + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + + try { + delete obj[name]; + } catch (de) { + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} diff --git a/test/harness/fnExists.js b/test/harness/fnExists.js new file mode 100644 index 0000000000..1f283b45d5 --- /dev/null +++ b/test/harness/fnExists.js @@ -0,0 +1,7 @@ +//----------------------------------------------------------------------------- +function fnExists(/*arguments*/) { + for (var i = 0; i < arguments.length; i++) { + if (typeof (arguments[i]) !== "function") return false; + } + return true; +} diff --git a/test/harness/fnGlobalObject.js b/test/harness/fnGlobalObject.js new file mode 100644 index 0000000000..0a68c2da73 --- /dev/null +++ b/test/harness/fnGlobalObject.js @@ -0,0 +1,5 @@ +//----------------------------------------------------------------------------- +var __globalObject = Function("return this;")(); +function fnGlobalObject() { + return __globalObject; +} diff --git a/test/harness/runTestCase.js b/test/harness/runTestCase.js new file mode 100644 index 0000000000..8b24a1ca0e --- /dev/null +++ b/test/harness/runTestCase.js @@ -0,0 +1,5 @@ +function runTestCase(testcase) { + if (testcase() !== true) { + $ERROR("Test case returned non-true value!"); + } +} diff --git a/test/harness/sta.js b/test/harness/sta.js index 5380639e00..863ba6998a 100644 --- a/test/harness/sta.js +++ b/test/harness/sta.js @@ -4,266 +4,7 @@ /// "Use Terms"). Any redistribution of this code must retain the above /// copyright and this notice and otherwise comply with the Use Terms. -//----------------------------------------------------------------------------- -function compareArray(aExpected, aActual) { - if (aActual.length != aExpected.length) { - return false; - } - aExpected.sort(); - aActual.sort(); - - var s; - for (var i = 0; i < aExpected.length; i++) { - if (aActual[i] !== aExpected[i]) { - return false; - } - } - return true; -} - -//----------------------------------------------------------------------------- -function arrayContains(arr, expected) { - var found; - for (var i = 0; i < expected.length; i++) { - found = false; - for (var j = 0; j < arr.length; j++) { - if (expected[i] === arr[j]) { - found = true; - break; - } - } - if (!found) { - return false; - } - } - return true; -} - -//----------------------------------------------------------------------------- -var supportsArrayIndexGettersOnArrays = undefined; -function fnSupportsArrayIndexGettersOnArrays() { - if (typeof supportsArrayIndexGettersOnArrays !== "undefined") { - return supportsArrayIndexGettersOnArrays; - } - - supportsArrayIndexGettersOnArrays = false; - - if (fnExists(Object.defineProperty)) { - var arr = []; - Object.defineProperty(arr, "0", { - get: function() { - supportsArrayIndexGettersOnArrays = true; - return 0; - } - }); - var res = arr[0]; - } - - return supportsArrayIndexGettersOnArrays; -} - -//----------------------------------------------------------------------------- -var supportsArrayIndexGettersOnObjects = undefined; -function fnSupportsArrayIndexGettersOnObjects() { - if (typeof supportsArrayIndexGettersOnObjects !== "undefined") - return supportsArrayIndexGettersOnObjects; - - supportsArrayIndexGettersOnObjects = false; - - if (fnExists(Object.defineProperty)) { - var obj = {}; - Object.defineProperty(obj, "0", { - get: function() { - supportsArrayIndexGettersOnObjects = true; - return 0; - } - }); - var res = obj[0]; - } - - return supportsArrayIndexGettersOnObjects; -} - -//----------------------------------------------------------------------------- -function ConvertToFileUrl(pathStr) { - return "file:" + pathStr.replace(/\\/g, "/"); -} - -//----------------------------------------------------------------------------- -function fnExists(/*arguments*/) { - for (var i = 0; i < arguments.length; i++) { - if (typeof (arguments[i]) !== "function") return false; - } - return true; -} - -//----------------------------------------------------------------------------- -var __globalObject = Function("return this;")(); -function fnGlobalObject() { - return __globalObject; -} - -//----------------------------------------------------------------------------- -function fnSupportsStrict() { - "use strict"; - try { - eval('with ({}) {}'); - return false; - } catch (e) { - return true; - } -} - -//----------------------------------------------------------------------------- -//Verify all attributes specified data property of given object: -//value, writable, enumerable, configurable -//If all attribute values are expected, return true, otherwise, return false -function dataPropertyAttributesAreCorrect(obj, - name, - value, - writable, - enumerable, - configurable) { - var attributesCorrect = true; - - if (obj[name] !== value) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof value === "number" && - isNaN(value)) { - // keep empty - } else { - attributesCorrect = false; - } - } - - try { - if (obj[name] === "oldValue") { - obj[name] = "newValue"; - } else { - obj[name] = "OldValue"; - } - } catch (we) { - } - - var overwrited = false; - if (obj[name] !== value) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof value === "number" && - isNaN(value)) { - // keep empty - } else { - overwrited = true; - } - } - if (overwrited !== writable) { - attributesCorrect = false; - } - - var enumerated = false; - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === name) { - enumerated = true; - } - } - - if (enumerated !== enumerable) { - attributesCorrect = false; - } - - - var deleted = false; - - try { - delete obj[name]; - } catch (de) { - } - if (!obj.hasOwnProperty(name)) { - deleted = true; - } - if (deleted !== configurable) { - attributesCorrect = false; - } - - return attributesCorrect; -} - -//----------------------------------------------------------------------------- -//Verify all attributes specified accessor property of given object: -//get, set, enumerable, configurable -//If all attribute values are expected, return true, otherwise, return false -function accessorPropertyAttributesAreCorrect(obj, - name, - get, - set, - setVerifyHelpProp, - enumerable, - configurable) { - var attributesCorrect = true; - - if (get !== undefined) { - if (obj[name] !== get()) { - if (typeof obj[name] === "number" && - isNaN(obj[name]) && - typeof get() === "number" && - isNaN(get())) { - // keep empty - } else { - attributesCorrect = false; - } - } - } else { - if (obj[name] !== undefined) { - attributesCorrect = false; - } - } - - try { - var desc = Object.getOwnPropertyDescriptor(obj, name); - if (typeof desc.set === "undefined") { - if (typeof set !== "undefined") { - attributesCorrect = false; - } - } else { - obj[name] = "toBeSetValue"; - if (obj[setVerifyHelpProp] !== "toBeSetValue") { - attributesCorrect = false; - } - } - } catch (se) { - throw se; - } - - - var enumerated = false; - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === name) { - enumerated = true; - } - } - - if (enumerated !== enumerable) { - attributesCorrect = false; - } - - - var deleted = false; - try { - delete obj[name]; - } catch (de) { - throw de; - } - if (!obj.hasOwnProperty(name)) { - deleted = true; - } - if (deleted !== configurable) { - attributesCorrect = false; - } - - return attributesCorrect; -} //----------------------------------------------------------------------------- var NotEarlyErrorString = "NotEarlyError"; @@ -286,616 +27,8 @@ function testFailed(message) { throw new Test262Error(message); } - -function testPrint(message) { - -} - - -//adaptors for Test262 framework -function $PRINT(message) { - -} - function $INCLUDE(message) { } function $ERROR(message) { testFailed(message); } -function $FAIL(message) { - testFailed(message); -} - - - -//Sputnik library definitions -//Ultimately these should be namespaced some how and only made -//available to tests that explicitly include them. -//For now, we just define the globally - -//math_precision.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function getPrecision(num) { - //TODO: Create a table of prec's, - // because using Math for testing Math isn't that correct. - - var log2num = Math.log(Math.abs(num)) / Math.LN2; - var pernum = Math.ceil(log2num); - return (2 * Math.pow(2, -52 + pernum)); - //return(0); -} - - -//math_isequal.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -var prec; -function isEqual(num1, num2) { - if ((num1 === Infinity) && (num2 === Infinity)) { - return (true); - } - if ((num1 === -Infinity) && (num2 === -Infinity)) { - return (true); - } - prec = getPrecision(Math.min(Math.abs(num1), Math.abs(num2))); - return (Math.abs(num1 - num2) <= prec); - //return(num1 === num2); -} - -//numeric_conversion.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -function ToInteger(p) { - var x = Number(p); - - if (isNaN(x)) { - return +0; - } - - if ((x === +0) - || (x === -0) - || (x === Number.POSITIVE_INFINITY) - || (x === Number.NEGATIVE_INFINITY)) { - return x; - } - - var sign = (x < 0) ? -1 : 1; - - return (sign * Math.floor(Math.abs(x))); -} - -//Date_constants.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -var HoursPerDay = 24; -var MinutesPerHour = 60; -var SecondsPerMinute = 60; - -var msPerDay = 86400000; -var msPerSecond = 1000; -var msPerMinute = 60000; -var msPerHour = 3600000; - -var date_1899_end = -2208988800001; -var date_1900_start = -2208988800000; -var date_1969_end = -1; -var date_1970_start = 0; -var date_1999_end = 946684799999; -var date_2000_start = 946684800000; -var date_2099_end = 4102444799999; -var date_2100_start = 4102444800000; - -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -//the following values are normally generated by the sputnik.py driver -var $LocalTZ, - $DST_start_month, - $DST_start_sunday, - $DST_start_hour, - $DST_start_minutes, - $DST_end_month, - $DST_end_sunday, - $DST_end_hour, - $DST_end_minutes; - -(function () { - /** - * Finds the first date, starting from |start|, where |predicate| - * holds. - */ - var findNearestDateBefore = function(start, predicate) { - var current = start; - var month = 1000 * 60 * 60 * 24 * 30; - for (var step = month; step > 0; step = Math.floor(step / 3)) { - if (!predicate(current)) { - while (!predicate(current)) - current = new Date(current.getTime() + step); - current = new Date(current.getTime() - step); - } - } - while (!predicate(current)) { - current = new Date(current.getTime() + 1); - } - return current; - }; - - var juneDate = new Date(2000, 5, 20, 0, 0, 0, 0); - var decemberDate = new Date(2000, 11, 20, 0, 0, 0, 0); - var juneOffset = juneDate.getTimezoneOffset(); - var decemberOffset = decemberDate.getTimezoneOffset(); - var isSouthernHemisphere = (juneOffset > decemberOffset); - var winterTime = isSouthernHemisphere ? juneDate : decemberDate; - var summerTime = isSouthernHemisphere ? decemberDate : juneDate; - - var dstStart = findNearestDateBefore(winterTime, function (date) { - return date.getTimezoneOffset() == summerTime.getTimezoneOffset(); - }); - $DST_start_month = dstStart.getMonth(); - $DST_start_sunday = dstStart.getDate() > 15 ? '"last"' : '"first"'; - $DST_start_hour = dstStart.getHours(); - $DST_start_minutes = dstStart.getMinutes(); - - var dstEnd = findNearestDateBefore(summerTime, function (date) { - return date.getTimezoneOffset() == winterTime.getTimezoneOffset(); - }); - $DST_end_month = dstEnd.getMonth(); - $DST_end_sunday = dstEnd.getDate() > 15 ? '"last"' : '"first"'; - $DST_end_hour = dstEnd.getHours(); - $DST_end_minutes = dstEnd.getMinutes(); - - return; -})(); - - -//Date.library.js -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -//15.9.1.2 Day Number and Time within Day -function Day(t) { - return Math.floor(t/msPerDay); -} - -function TimeWithinDay(t) { - return t%msPerDay; -} - -//15.9.1.3 Year Number -function DaysInYear(y){ - if(y%4 != 0) return 365; - if(y%4 == 0 && y%100 != 0) return 366; - if(y%100 == 0 && y%400 != 0) return 365; - if(y%400 == 0) return 366; -} - -function DayFromYear(y) { - return (365*(y-1970) - + Math.floor((y-1969)/4) - - Math.floor((y-1901)/100) - + Math.floor((y-1601)/400)); -} - -function TimeFromYear(y){ - return msPerDay*DayFromYear(y); -} - -function YearFromTime(t) { - t = Number(t); - var sign = ( t < 0 ) ? -1 : 1; - var year = ( sign < 0 ) ? 1969 : 1970; - - for(var time = 0;;year += sign){ - time = TimeFromYear(year); - - if(sign > 0 && time > t){ - year -= sign; - break; - } - else if(sign < 0 && time <= t){ - break; - } - }; - return year; -} - -function InLeapYear(t){ - if(DaysInYear(YearFromTime(t)) == 365) - return 0; - - if(DaysInYear(YearFromTime(t)) == 366) - return 1; -} - -function DayWithinYear(t) { - return Day(t)-DayFromYear(YearFromTime(t)); -} - -//15.9.1.4 Month Number -function MonthFromTime(t){ - var day = DayWithinYear(t); - var leap = InLeapYear(t); - - if((0 <= day) && (day < 31)) return 0; - if((31 <= day) && (day < (59+leap))) return 1; - if(((59+leap) <= day) && (day < (90+leap))) return 2; - if(((90+leap) <= day) && (day < (120+leap))) return 3; - if(((120+leap) <= day) && (day < (151+leap))) return 4; - if(((151+leap) <= day) && (day < (181+leap))) return 5; - if(((181+leap) <= day) && (day < (212+leap))) return 6; - if(((212+leap) <= day) && (day < (243+leap))) return 7; - if(((243+leap) <= day) && (day < (273+leap))) return 8; - if(((273+leap) <= day) && (day < (304+leap))) return 9; - if(((304+leap) <= day) && (day < (334+leap))) return 10; - if(((334+leap) <= day) && (day < (365+leap))) return 11; -} - -//15.9.1.5 Date Number -function DateFromTime(t) { - var day = DayWithinYear(t); - var month = MonthFromTime(t); - var leap = InLeapYear(t); - - if(month == 0) return day+1; - if(month == 1) return day-30; - if(month == 2) return day-58-leap; - if(month == 3) return day-89-leap; - if(month == 4) return day-119-leap; - if(month == 5) return day-150-leap; - if(month == 6) return day-180-leap; - if(month == 7) return day-211-leap; - if(month == 8) return day-242-leap; - if(month == 9) return day-272-leap; - if(month == 10) return day-303-leap; - if(month == 11) return day-333-leap; -} - -//15.9.1.6 Week Day -function WeekDay(t) { - var weekday = (Day(t)+4)%7; - return (weekday < 0 ? 7+weekday : weekday); -} - -//15.9.1.9 Daylight Saving Time Adjustment -$LocalTZ = (new Date()).getTimezoneOffset() / -60; -if (DaylightSavingTA((new Date()).valueOf()) !== 0) { - $LocalTZ -= 1; -} -var LocalTZA = $LocalTZ*msPerHour; - -function DaysInMonth(m, leap) { - m = m%12; - - //April, June, Sept, Nov - if(m == 3 || m == 5 || m == 8 || m == 10 ) { - return 30; - } - - //Jan, March, May, July, Aug, Oct, Dec - if(m == 0 || m == 2 || m == 4 || m == 6 || m == 7 || m == 9 || m == 11){ - return 31; - } - - //Feb - return 28+leap; -} - -function GetSundayInMonth(t, m, count){ - var year = YearFromTime(t); - var tempDate; - - if (count==='"first"') { - for (var d=1; d <= DaysInMonth(m, InLeapYear(t)); d++) { - tempDate = new Date(year, m, d); - if (tempDate.getDay()===0) { - return tempDate.valueOf(); - } - } - } else if(count==='"last"') { - for (var d=DaysInMonth(m, InLeapYear(t)); d>0; d--) { - tempDate = new Date(year, m, d); - if (tempDate.getDay()===0) { - return tempDate.valueOf(); - } - } - } - throw new Error("Unsupported 'count' arg:" + count); -} -/* -function GetSundayInMonth(t, m, count){ - var year = YearFromTime(t); - var leap = InLeapYear(t); - var day = 0; - - if(m >= 1) day += DaysInMonth(0, leap); - if(m >= 2) day += DaysInMonth(1, leap); - if(m >= 3) day += DaysInMonth(2, leap); - if(m >= 4) day += DaysInMonth(3, leap); - if(m >= 5) day += DaysInMonth(4, leap); - if(m >= 6) day += DaysInMonth(5, leap); - if(m >= 7) day += DaysInMonth(6, leap); - if(m >= 8) day += DaysInMonth(7, leap); - if(m >= 9) day += DaysInMonth(8, leap); - if(m >= 10) day += DaysInMonth(9, leap); - if(m >= 11) day += DaysInMonth(10, leap); - - var month_start = TimeFromYear(year)+day*msPerDay; - var sunday = 0; - - if(count === "last"){ - for(var last_sunday = month_start+DaysInMonth(m, leap)*msPerDay; - WeekDay(last_sunday)>0; - last_sunday -= msPerDay - ){}; - sunday = last_sunday; - } - else { - for(var first_sunday = month_start; - WeekDay(first_sunday)>0; - first_sunday += msPerDay - ){}; - sunday = first_sunday+7*msPerDay*(count-1); - } - - return sunday; -}*/ - -function DaylightSavingTA(t) { -// t = t-LocalTZA; - - var DST_start = GetSundayInMonth(t, $DST_start_month, $DST_start_sunday) + - $DST_start_hour*msPerHour + - $DST_start_minutes*msPerMinute; - - var k = new Date(DST_start); - - var DST_end = GetSundayInMonth(t, $DST_end_month, $DST_end_sunday) + - $DST_end_hour*msPerHour + - $DST_end_minutes*msPerMinute; - - if ( t >= DST_start && t < DST_end ) { - return msPerHour; - } else { - return 0; - } -} - -//15.9.1.9 Local Time -function LocalTime(t){ - return t+LocalTZA+DaylightSavingTA(t); -} - -function UTC(t) { - return t-LocalTZA-DaylightSavingTA(t-LocalTZA); -} - -//15.9.1.10 Hours, Minutes, Second, and Milliseconds -function HourFromTime(t){ - return Math.floor(t/msPerHour)%HoursPerDay; -} - -function MinFromTime(t){ - return Math.floor(t/msPerMinute)%MinutesPerHour; -} - -function SecFromTime(t){ - return Math.floor(t/msPerSecond)%SecondsPerMinute; -} - -function msFromTime(t){ - return t%msPerSecond; -} - -//15.9.1.11 MakeTime (hour, min, sec, ms) -function MakeTime(hour, min, sec, ms){ - if ( !isFinite(hour) || !isFinite(min) || !isFinite(sec) || !isFinite(ms)) { - return Number.NaN; - } - - hour = ToInteger(hour); - min = ToInteger(min); - sec = ToInteger(sec); - ms = ToInteger(ms); - - return ((hour*msPerHour) + (min*msPerMinute) + (sec*msPerSecond) + ms); -} - -//15.9.1.12 MakeDay (year, month, date) -function MakeDay(year, month, date) { - if ( !isFinite(year) || !isFinite(month) || !isFinite(date)) { - return Number.NaN; - } - - year = ToInteger(year); - month = ToInteger(month); - date = ToInteger(date ); - - var result5 = year + Math.floor(month/12); - var result6 = month%12; - - var sign = ( year < 1970 ) ? -1 : 1; - var t = ( year < 1970 ) ? 1 : 0; - var y = ( year < 1970 ) ? 1969 : 1970; - - if( sign == -1 ){ - for ( y = 1969; y >= year; y += sign ) { - t += sign * DaysInYear(y)*msPerDay; - } - } else { - for ( y = 1970 ; y < year; y += sign ) { - t += sign * DaysInYear(y)*msPerDay; - } - } - - var leap = 0; - for ( var m = 0; m < month; m++ ) { - //if year is changed, than we need to recalculate leep - leap = InLeapYear(t); - t += DaysInMonth(m, leap)*msPerDay; - } - - if ( YearFromTime(t) != result5 ) { - return Number.NaN; - } - if ( MonthFromTime(t) != result6 ) { - return Number.NaN; - } - if ( DateFromTime(t) != 1 ) { - return Number.NaN; - } - - return Day(t)+date-1; -} - -//15.9.1.13 MakeDate (day, time) -function MakeDate( day, time ) { - if(!isFinite(day) || !isFinite(time)) { - return Number.NaN; - } - - return day*msPerDay+time; -} - -//15.9.1.14 TimeClip (time) -function TimeClip(time) { - if(!isFinite(time) || Math.abs(time) > 8.64e15){ - return Number.NaN; - } - - return ToInteger(time); -} - -//Test Functions -//ConstructDate is considered deprecated, and should not be used directly from -//test262 tests as it's incredibly sensitive to DST start/end dates that -//vary with geographic location. -function ConstructDate(year, month, date, hours, minutes, seconds, ms){ - /* - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date); else use 1 - * 4. If hours is supplied use ToNumber(hours); else use 0 - * 5. If minutes is supplied use ToNumber(minutes); else use 0 - * 6. If seconds is supplied use ToNumber(seconds); else use 0 - * 7. If ms is supplied use ToNumber(ms); else use 0 - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to TimeClip(UTC(Result(11))) - */ - var r1 = Number(year); - var r2 = Number(month); - var r3 = ((date && arguments.length > 2) ? Number(date) : 1); - var r4 = ((hours && arguments.length > 3) ? Number(hours) : 0); - var r5 = ((minutes && arguments.length > 4) ? Number(minutes) : 0); - var r6 = ((seconds && arguments.length > 5) ? Number(seconds) : 0); - var r7 = ((ms && arguments.length > 6) ? Number(ms) : 0); - - var r8 = r1; - - if(!isNaN(r1) && (0 <= ToInteger(r1)) && (ToInteger(r1) <= 99)) - r8 = 1900+r1; - - var r9 = MakeDay(r8, r2, r3); - var r10 = MakeTime(r4, r5, r6, r7); - var r11 = MakeDate(r9, r10); - - var retVal = TimeClip(UTC(r11)); - return retVal; -} - - - -/**** Python code for initialize the above constants -// We may want to replicate the following in JavaScript. -// However, using JS date operations to generate parameters that are then used to -// test those some date operations seems unsound. However, it isn't clear if there -//is a good interoperable alternative. - -# Copyright 2009 the Sputnik authors. All rights reserved. -# This code is governed by the BSD license found in the LICENSE file. - -def GetDaylightSavingsTimes(): -# Is the given floating-point time in DST? -def IsDst(t): -return time.localtime(t)[-1] -# Binary search to find an interval between the two times no greater than -# delta where DST switches, returning the midpoint. -def FindBetween(start, end, delta): -while end - start > delta: -middle = (end + start) / 2 -if IsDst(middle) == IsDst(start): -start = middle -else: -end = middle -return (start + end) / 2 -now = time.time() -one_month = (30 * 24 * 60 * 60) -# First find a date with different daylight savings. To avoid corner cases -# we try four months before and after today. -after = now + 4 * one_month -before = now - 4 * one_month -if IsDst(now) == IsDst(before) and IsDst(now) == IsDst(after): -logger.warning("Was unable to determine DST info.") -return None -# Determine when the change occurs between now and the date we just found -# in a different DST. -if IsDst(now) != IsDst(before): -first = FindBetween(before, now, 1) -else: -first = FindBetween(now, after, 1) -# Determine when the change occurs between three and nine months from the -# first. -second = FindBetween(first + 3 * one_month, first + 9 * one_month, 1) -# Find out which switch is into and which if out of DST -if IsDst(first - 1) and not IsDst(first + 1): -start = second -end = first -else: -start = first -end = second -return (start, end) - - -def GetDaylightSavingsAttribs(): -times = GetDaylightSavingsTimes() -if not times: -return None -(start, end) = times -def DstMonth(t): -return time.localtime(t)[1] - 1 -def DstHour(t): -return time.localtime(t - 1)[3] + 1 -def DstSunday(t): -if time.localtime(t)[2] > 15: -return "'last'" -else: -return "'first'" -def DstMinutes(t): -return (time.localtime(t - 1)[4] + 1) % 60 -attribs = { } -attribs['start_month'] = DstMonth(start) -attribs['end_month'] = DstMonth(end) -attribs['start_sunday'] = DstSunday(start) -attribs['end_sunday'] = DstSunday(end) -attribs['start_hour'] = DstHour(start) -attribs['end_hour'] = DstHour(end) -attribs['start_minutes'] = DstMinutes(start) -attribs['end_minutes'] = DstMinutes(end) -return attribs - -*********/ - -//--Test case registration----------------------------------------------------- -function runTestCase(testcase) { - if (testcase() !== true) { - $ERROR("Test case returned non-true value!"); - } -} diff --git a/test/harness/sth.js b/test/harness/sth.js index 0b811ed2a2..3acb5b6b2a 100644 --- a/test/harness/sth.js +++ b/test/harness/sth.js @@ -163,8 +163,14 @@ function BrowserRunner() { iwin.testFinished = testFinished; //TODO: these should be moved to sta.js - var includes = code.match(/\$INCLUDE\(([^\)]+)\)/g), // find all of the $INCLUDE statements + var includes, include; + + includes = test.includes; + if (!includes || !(includes.length)) { + // includes not specified via frontmatter; find all of the $INCLUDE statements + includes = code.match(/\$INCLUDE\(([^\)]+)\)/g); + } if (includes !== null) { // We have some includes, so loop through each include and diff --git a/test/suite/annexB/B.2.1.js b/test/suite/annexB/B.2.1.js index 89754a48cf..1b86820cac 100644 --- a/test/suite/annexB/B.2.1.js +++ b/test/suite/annexB/B.2.1.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path annexB/B.2.1.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "escape"); - if (desc.value === global.escape && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.escape) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "escape"); + if (desc.value === global.escape && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.1.propertyCheck.js b/test/suite/annexB/B.2.1.propertyCheck.js index cadef98772..a3262b8bd1 100644 --- a/test/suite/annexB/B.2.1.propertyCheck.js +++ b/test/suite/annexB/B.2.1.propertyCheck.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path annexB/B.2.1.propertyCheck.js - * @description Checking properties of this object (escape) - */ +/*--- +info: Check type of various properties +description: Checking properties of this object (escape) +---*/ if (typeof this.escape === "undefined") $ERROR('#1: typeof this.escape !== "undefined"'); if (typeof this['escape'] === "undefined") $ERROR('#2: typeof this["escape"] !== "undefined"'); diff --git a/test/suite/annexB/B.2.2.js b/test/suite/annexB/B.2.2.js index 987a0d651a..18e9abc6e2 100644 --- a/test/suite/annexB/B.2.2.js +++ b/test/suite/annexB/B.2.2.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path annexB/B.2.2.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.unescape) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "unescape"); - if (desc.value === global.unescape && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.unescape) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "unescape"); + if (desc.value === global.unescape && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.2.propertyCheck.js b/test/suite/annexB/B.2.2.propertyCheck.js index be9cac6a71..3104670f0b 100644 --- a/test/suite/annexB/B.2.2.propertyCheck.js +++ b/test/suite/annexB/B.2.2.propertyCheck.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path annexB/B.2.2.propertyCheck.js - * @description Checking properties of this object (unescape) - */ +/*--- +info: Check type of various properties +description: Checking properties of this object (unescape) +---*/ if (typeof this.unescape === "undefined") $ERROR('#1: typeof this.unescape !== "undefined"'); if (typeof this['unescape'] === "undefined") $ERROR('#2: typeof this["unescape"] !== "undefined"'); diff --git a/test/suite/annexB/B.2.3.js b/test/suite/annexB/B.2.3.js index 538cc16fc3..b08f4bf160 100644 --- a/test/suite/annexB/B.2.3.js +++ b/test/suite/annexB/B.2.3.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path annexB/B.2.3.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substr) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "substr"); - if (desc.value === String.prototype.substr && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.substr) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "substr"); + if (desc.value === String.prototype.substr && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.4.js b/test/suite/annexB/B.2.4.js index 252c6c151a..d745bc4d56 100644 --- a/test/suite/annexB/B.2.4.js +++ b/test/suite/annexB/B.2.4.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path annexB/B.2.4.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getYear) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getYear"); - if (desc.value === Date.prototype.getYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getYear) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getYear"); + if (desc.value === Date.prototype.getYear && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.4.propertyCheck.js b/test/suite/annexB/B.2.4.propertyCheck.js index 959c8b7da6..e0a7f1a1de 100644 --- a/test/suite/annexB/B.2.4.propertyCheck.js +++ b/test/suite/annexB/B.2.4.propertyCheck.js @@ -1,15 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path annexB/B.2.4.propertyCheck.js - * @description Checking properties of the Date object (getYear) - */ +/*--- +info: Check type of various properties +description: Checking properties of the Date object (getYear) +---*/ if (typeof Date.prototype.getYear !== "function") $ERROR('#1: typeof Date.prototype.getYear === "function". Actual: ' + (typeof Date.prototype.getYear )); if (typeof Date.prototype['getYear'] !== "function") $ERROR('#2: typeof Date.prototype["getYear"] === "function". Actual: ' + (typeof Date.prototype["getYear"] )); - - - diff --git a/test/suite/annexB/B.2.5.js b/test/suite/annexB/B.2.5.js index 7754c221d1..a977fd5c84 100644 --- a/test/suite/annexB/B.2.5.js +++ b/test/suite/annexB/B.2.5.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path annexB/B.2.5.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setYear) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setYear"); - if (desc.value === Date.prototype.setYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setYear) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setYear"); + if (desc.value === Date.prototype.setYear && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.5.propertyCheck.js b/test/suite/annexB/B.2.5.propertyCheck.js index 2af44c2510..562a8ade28 100644 --- a/test/suite/annexB/B.2.5.propertyCheck.js +++ b/test/suite/annexB/B.2.5.propertyCheck.js @@ -1,15 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path annexB/B.2.5.propertyCheck.js - * @description Checking properties of the Date object (setYear) - */ +/*--- +info: Check type of various properties +description: Checking properties of the Date object (setYear) +---*/ if (typeof Date.prototype.setYear !== "function") $ERROR('#1: typeof Date.prototype.setYear === "function". Actual: ' + (typeof Date.prototype.setYear )); if (typeof Date.prototype['setYear'] !== "function") $ERROR('#2: typeof Date.prototype["setYear"] === "function". Actual: ' + (typeof Date.prototype["setYear"] )); - - - diff --git a/test/suite/annexB/B.2.6.js b/test/suite/annexB/B.2.6.js index 84a223a7a6..b767a50f8b 100644 --- a/test/suite/annexB/B.2.6.js +++ b/test/suite/annexB/B.2.6.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path annexB/B.2.6.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toGMTString"); - if (desc.value === Date.prototype.toGMTString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toGMTString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toGMTString"); + if (desc.value === Date.prototype.toGMTString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/annexB/B.2.6.propertyCheck.js b/test/suite/annexB/B.2.6.propertyCheck.js index 339ee5367b..82676c804a 100644 --- a/test/suite/annexB/B.2.6.propertyCheck.js +++ b/test/suite/annexB/B.2.6.propertyCheck.js @@ -1,16 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path annexB/B.2.6.propertyCheck.js - * @description Checking properties of the Date object (toGMTString) - */ +/*--- +info: Check type of various properties +description: Checking properties of the Date object (toGMTString) +---*/ if (typeof Date.prototype.toGMTString !== "function") $ERROR('#1: typeof Date.prototype.toGMTString === "function". Actual: ' + (typeof Date.prototype.toGMTString )); if (typeof Date.prototype['toGMTString'] !== "function") $ERROR('#2: typeof Date.prototype["toGMTString"] === "function". Actual: ' + (typeof Date.prototype["toGMTString"] )); - - - - diff --git a/test/suite/annexB/B.RegExp.prototype.compile.js b/test/suite/annexB/B.RegExp.prototype.compile.js index 1be3e70c9b..43ce91ff7e 100644 --- a/test/suite/annexB/B.RegExp.prototype.compile.js +++ b/test/suite/annexB/B.RegExp.prototype.compile.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path test/suite/annexB/B.RegExp.prototype.compile.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.compile) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "compile"); - if (desc.value === RegExp.prototype.compile && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.compile) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "compile"); + if (desc.value === RegExp.prototype.compile && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/bestPractice/Sbp_12.5_A9_T3.js b/test/suite/bestPractice/Sbp_12.5_A9_T3.js index e9cbb0eb37..b66b91d74f 100644 --- a/test/suite/bestPractice/Sbp_12.5_A9_T3.js +++ b/test/suite/bestPractice/Sbp_12.5_A9_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declaration within an "if" statement is not allowed - * - * @path bestPractice/Sbp_12.5_A9_T3.js - * @description Declaring function within an "if" statement that is declared within the function declaration - * @negative - */ +/*--- +info: Function declaration within an "if" statement is not allowed +description: > + Declaring function within an "if" statement that is declared + within the function declaration +flags: [negative] +---*/ function(){ @@ -18,4 +18,3 @@ if (true) { } }; - diff --git a/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js index 943aa21827..65cb3331b1 100644 --- a/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js +++ b/test/suite/bestPractice/Sbp_12.6.1_A13_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "do-while" Block is not allowed - * - * @path bestPractice/Sbp_12.6.1_A13_T3.js - * @description Declaring a function within a "do-while" loop that is within a function declaration itself - * @negative - */ +/*--- +info: FunctionDeclaration within a "do-while" Block is not allowed +description: > + Declaring a function within a "do-while" loop that is within a + function declaration itself +flags: [negative] +---*/ function(){ @@ -16,4 +16,3 @@ do{ }while(0); }; - diff --git a/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js index 17bfdab665..cc6a2e1c78 100644 --- a/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js +++ b/test/suite/bestPractice/Sbp_12.6.2_A13_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "while" Statement is not allowed - * - * @path bestPractice/Sbp_12.6.2_A13_T3.js - * @description Checking if declaring a function within a "while" Statement that is in a function body leads to an exception - * @negative - */ +/*--- +info: FunctionDeclaration within a "while" Statement is not allowed +description: > + Checking if declaring a function within a "while" Statement that + is in a function body leads to an exception +flags: [negative] +---*/ function(){ @@ -16,4 +16,3 @@ while(0){ }; }; - diff --git a/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js index f76366167d..1da0487f61 100644 --- a/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js +++ b/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "for-in" Statement is not allowed - * - * @path bestPractice/Sbp_12.6.4_A13_T3.js - * @description Declaring function within a "for-in" Statement that is within function declaration - * @negative - */ +/*--- +info: FunctionDeclaration within a "for-in" Statement is not allowed +description: > + Declaring function within a "for-in" Statement that is within + function declaration +flags: [negative] +---*/ function(){ @@ -16,4 +16,3 @@ for(x in this){ }; }; - diff --git a/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js b/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js index d426efc57c..ec504c5032 100644 --- a/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js +++ b/test/suite/bestPractice/Sbp_7.8.4_A6.1_T4.js @@ -1,14 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit - * - * @path bestPractice/Sbp_7.8.4_A6.1_T4.js - * @description HexEscapeSequence :: x0G is incorrect - * @negative - */ +/*--- +info: "EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit" +description: "HexEscapeSequence :: x0G is incorrect" +flags: [negative] +---*/ //CHECK# "\x0G" - diff --git a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js b/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js index 5a36126219..517eb00938 100644 --- a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js +++ b/test/suite/bestPractice/Sbp_7.8.4_A6.2_T1.js @@ -1,14 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HexEscapeSequence :: x HexDigit is incorrect - * - * @path bestPractice/Sbp_7.8.4_A6.2_T1.js - * @description HexDigit :: 1 - * @negative - */ +/*--- +info: "HexEscapeSequence :: x HexDigit is incorrect" +description: "HexDigit :: 1" +flags: [negative] +---*/ //CHECK#1 "\x1" - diff --git a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js b/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js index 0513fac657..f8193f2a48 100644 --- a/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js +++ b/test/suite/bestPractice/Sbp_7.8.4_A6.2_T2.js @@ -1,14 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HexEscapeSequence :: x HexDigit is incorrect - * - * @path bestPractice/Sbp_7.8.4_A6.2_T2.js - * @description HexDigit :: A - * @negative - */ +/*--- +info: "HexEscapeSequence :: x HexDigit is incorrect" +description: "HexDigit :: A" +flags: [negative] +---*/ //CHECK#1 "\xA" - diff --git a/test/suite/bestPractice/Sbp_7.9_A9_T3.js b/test/suite/bestPractice/Sbp_7.9_A9_T3.js index 4a0eb188fd..a1d72919bb 100644 --- a/test/suite/bestPractice/Sbp_7.9_A9_T3.js +++ b/test/suite/bestPractice/Sbp_7.9_A9_T3.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path bestPractice/Sbp_7.9_A9_T3.js - * @description Execute do { \n ; \n }while(false) true - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +description: Execute do { \n ; \n }while(false) true +---*/ //CHECK#1 do { ; } while (false) true - diff --git a/test/suite/bestPractice/Sbp_7.9_A9_T4.js b/test/suite/bestPractice/Sbp_7.9_A9_T4.js index 76f3f6b3ac..2f41ee39df 100644 --- a/test/suite/bestPractice/Sbp_7.9_A9_T4.js +++ b/test/suite/bestPractice/Sbp_7.9_A9_T4.js @@ -1,14 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path bestPractice/Sbp_7.9_A9_T4.js - * @description Execute do ; while \n (false) true - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +description: Execute do ; while \n (false) true +---*/ //CHECK#1 do ; while (false) true - diff --git a/test/suite/bestPractice/Sbp_A10_T1.js b/test/suite/bestPractice/Sbp_A10_T1.js index 76647e7243..d12572491d 100644 --- a/test/suite/bestPractice/Sbp_A10_T1.js +++ b/test/suite/bestPractice/Sbp_A10_T1.js @@ -1,13 +1,12 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path bestPractice/Sbp_A10_T1.js - * @description Built-in functions should not have a non-deletable, - * non-poisoned "caller" property. - * @bestPractice - * http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable - */ +/*--- +description: > + Built-in functions should not have a non-deletable, non-poisoned + "caller" property. +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable" +---*/ (function() { var map = Array.prototype.map; @@ -43,4 +42,4 @@ $ERROR('#2: Built-in revealed caller'); } $ERROR('#3: Unexpected "caller": ' + caller); -})(); \ No newline at end of file +})(); diff --git a/test/suite/bestPractice/Sbp_A10_T2.js b/test/suite/bestPractice/Sbp_A10_T2.js index 6037a5ea31..7d7eb20717 100644 --- a/test/suite/bestPractice/Sbp_A10_T2.js +++ b/test/suite/bestPractice/Sbp_A10_T2.js @@ -1,13 +1,12 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path bestPractice/Sbp_A10_T2.js - * @description Built-in functions should not have a non-deletable, - * non-poisoned "arguments" property. - * @bestPractice - * http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable - */ +/*--- +description: > + Built-in functions should not have a non-deletable, non-poisoned + "arguments" property. +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:make_non-standard_properties_configurable" +---*/ (function() { var map = Array.prototype.map; diff --git a/test/suite/bestPractice/Sbp_A1_T1.js b/test/suite/bestPractice/Sbp_A1_T1.js index ff41177c5d..409a74c517 100644 --- a/test/suite/bestPractice/Sbp_A1_T1.js +++ b/test/suite/bestPractice/Sbp_A1_T1.js @@ -1,19 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Block { } in strict code can't contain function - * declaration; - * - * @path bestPractice/Sbp_A1_T1.js - * @description Trying to declare function at the Block statement - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: > + The production Block { } in strict code can't contain function + declaration; +description: Trying to declare function at the Block statement +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; { function __func(){} } - diff --git a/test/suite/bestPractice/Sbp_A2_T1.js b/test/suite/bestPractice/Sbp_A2_T1.js index 52d28970d9..ed2e11ab59 100644 --- a/test/suite/bestPractice/Sbp_A2_T1.js +++ b/test/suite/bestPractice/Sbp_A2_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declaration within an "if" statement in strict code is not - * allowed - * - * @path bestPractice/Sbp_A2_T1.js - * @description Declaring function within a strict "if" statement - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: > + Function declaration within an "if" statement in strict code is not + allowed +description: Declaring function within a strict "if" statement +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; if (true) { @@ -18,4 +17,3 @@ if (true) { } else { function __func(){}; } - diff --git a/test/suite/bestPractice/Sbp_A2_T2.js b/test/suite/bestPractice/Sbp_A2_T2.js index 8fedbf1ceb..007ebb4c81 100644 --- a/test/suite/bestPractice/Sbp_A2_T2.js +++ b/test/suite/bestPractice/Sbp_A2_T2.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declaration within an "if" statement in strict code is not allowed; - * - * @path bestPractice/Sbp_A2_T2.js - * @description Declaring function within an "if" that is declared - * within the strict function - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: > + Function declaration within an "if" statement in strict code is not + allowed; +description: > + Declaring function within an "if" that is declared within the + strict function +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; (function(){ @@ -20,4 +21,3 @@ function __func(){}; } }); - diff --git a/test/suite/bestPractice/Sbp_A3_T1.js b/test/suite/bestPractice/Sbp_A3_T1.js index e73dd940d5..793f277f4b 100644 --- a/test/suite/bestPractice/Sbp_A3_T1.js +++ b/test/suite/bestPractice/Sbp_A3_T1.js @@ -1,19 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "do-while" Block in strict code is not - * allowed - * - * @path bestPractice/Sbp_A3_T1.js - * @description Declaring function within a "do-while" loop - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: > + FunctionDeclaration within a "do-while" Block in strict code is not + allowed +description: Declaring function within a "do-while" loop +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; do { function __func(){}; } while(0); - diff --git a/test/suite/bestPractice/Sbp_A3_T2.js b/test/suite/bestPractice/Sbp_A3_T2.js index 9d6c6a7de0..21139af0dd 100644 --- a/test/suite/bestPractice/Sbp_A3_T2.js +++ b/test/suite/bestPractice/Sbp_A3_T2.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "do-while" Block in strict code is not allowed - * - * @path bestPractice/Sbp_A3_T2.js - * @description Declaring a function within a "do-while" loop that is - * within a strict function - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: > + FunctionDeclaration within a "do-while" Block in strict code is not + allowed +description: > + Declaring a function within a "do-while" loop that is within a + strict function +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; (function(){ @@ -18,4 +19,3 @@ function __func(){}; } while(0); }); - diff --git a/test/suite/bestPractice/Sbp_A4_T1.js b/test/suite/bestPractice/Sbp_A4_T1.js index 0fdb43897a..fa64297beb 100644 --- a/test/suite/bestPractice/Sbp_A4_T1.js +++ b/test/suite/bestPractice/Sbp_A4_T1.js @@ -1,19 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "while" Statement is not allowed - * - * @path bestPractice/Sbp_A4_T1.js - * @description Checking if declaring a function within a "while" - * Statement leads to an exception - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: FunctionDeclaration within a "while" Statement is not allowed +description: > + Checking if declaring a function within a "while" Statement leads + to an exception +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; while (0) { function __func(){}; }; - diff --git a/test/suite/bestPractice/Sbp_A4_T2.js b/test/suite/bestPractice/Sbp_A4_T2.js index c9145fcc47..52e6e76fdd 100644 --- a/test/suite/bestPractice/Sbp_A4_T2.js +++ b/test/suite/bestPractice/Sbp_A4_T2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "while" Statement is not allowed - * - * @path bestPractice/Sbp_A4_T2.js - * @description Checking if declaring a function within a "while" - * Statement that is in a function call leads to an exception - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: FunctionDeclaration within a "while" Statement is not allowed +description: > + Checking if declaring a function within a "while" Statement that + is in a function call leads to an exception +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; (function(){ @@ -18,4 +17,3 @@ function __func(){}; }; })(); - diff --git a/test/suite/bestPractice/Sbp_A5_T1.js b/test/suite/bestPractice/Sbp_A5_T1.js index b9cf110802..b5b34a01a2 100644 --- a/test/suite/bestPractice/Sbp_A5_T1.js +++ b/test/suite/bestPractice/Sbp_A5_T1.js @@ -1,18 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "for-in" Statement is not allowed - * - * @path bestPractice/Sbp_A5_T1.js - * @description Declaring function within a "for-in" Statement - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: FunctionDeclaration within a "for-in" Statement is not allowed +description: Declaring function within a "for-in" Statement +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; for (x in this) { function __func(){}; } - diff --git a/test/suite/bestPractice/Sbp_A5_T2.js b/test/suite/bestPractice/Sbp_A5_T2.js index 208be598f6..d139b8548c 100644 --- a/test/suite/bestPractice/Sbp_A5_T2.js +++ b/test/suite/bestPractice/Sbp_A5_T2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration within a "for-in" Statement is not allowed - * - * @path bestPractice/Sbp_A5_T2.js - * @description Declaring function within a "for-in" Statement that is - * within a function call - * @onlyStrict - * @negative SyntaxError - * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls - */ +/*--- +info: FunctionDeclaration within a "for-in" Statement is not allowed +description: > + Declaring function within a "for-in" Statement that is within a + function call +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ "use strict"; (function(){ @@ -18,4 +17,3 @@ function __func(){}; } })(); - diff --git a/test/suite/ch06/6.1.js b/test/suite/ch06/6.1.js index f53b105f5b..8afc499fd9 100644 --- a/test/suite/ch06/6.1.js +++ b/test/suite/ch06/6.1.js @@ -1,12 +1,13 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. +// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set -// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -// "Use Terms"). Any redistribution of this code must retain the above +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above // copyright and this notice and otherwise comply with the Use Terms. -/** - * @description Test for handling of supplementary characters - */ +/*--- +es5id: 6.1 +description: Test for handling of supplementary characters +---*/ var chars = "𐒠"; // Single Unicode character at codepoint \u{104A0} if(chars.length !== 2) { diff --git a/test/suite/ch07/7.2/S7.2_A1.1_T1.js b/test/suite/ch07/7.2/S7.2_A1.1_T1.js index 1c8e5a9ca6..97b8db82e5 100644 --- a/test/suite/ch07/7.2/S7.2_A1.1_T1.js +++ b/test/suite/ch07/7.2/S7.2_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HORIZONTAL TAB (U+0009) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.1_T1.js - * @description Insert HORIZONTAL TAB(\u0009 and \t) between tokens of var x=1 - */ +/*--- +info: HORIZONTAL TAB (U+0009) between any two tokens is allowed +es5id: 7.2_A1.1_T1 +description: Insert HORIZONTAL TAB(\u0009 and \t) between tokens of var x=1 +---*/ // CHECK#1 eval("\u0009var\u0009x\u0009=\u00091\u0009"); @@ -37,4 +36,3 @@ eval("\u0009" + "var" + "\t" + "x" + "\u0009" + "=" + "\t" + "1" + "\u0009"); if (x !== 1) { $ERROR('#5: eval("\\u0009" + "var" + "\\t" + "x" + "\\u0009" + "=" + "\\t" + "1" + "\\u0009"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A1.1_T2.js b/test/suite/ch07/7.2/S7.2_A1.1_T2.js index 081c60ef36..1d43e77e9c 100644 --- a/test/suite/ch07/7.2/S7.2_A1.1_T2.js +++ b/test/suite/ch07/7.2/S7.2_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HORIZONTAL TAB (U+0009) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.1_T2.js - * @description Insert real HORIZONTAL TAB between tokens of var x=1 - */ +/*--- +info: HORIZONTAL TAB (U+0009) between any two tokens is allowed +es5id: 7.2_A1.1_T2 +description: Insert real HORIZONTAL TAB between tokens of var x=1 +---*/ //CHECK#1 var x = 1 ; @@ -19,4 +18,3 @@ eval(" var\tx =\t2 "); if (x !== 2) { $ERROR('#2: var\\tx =\\t1 ; x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A1.2_T1.js b/test/suite/ch07/7.2/S7.2_A1.2_T1.js index 19be1c7e2f..917c2c7f09 100644 --- a/test/suite/ch07/7.2/S7.2_A1.2_T1.js +++ b/test/suite/ch07/7.2/S7.2_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VERTICAL TAB (U+000B) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.2_T1.js - * @description Insert VERTICAL TAB(\u000B and \v) between tokens of var x=1 - */ +/*--- +info: VERTICAL TAB (U+000B) between any two tokens is allowed +es5id: 7.2_A1.2_T1 +description: Insert VERTICAL TAB(\u000B and \v) between tokens of var x=1 +---*/ // CHECK#1 eval("\u000Bvar\u000Bx\u000B=\u000B1\u000B"); @@ -37,4 +36,3 @@ eval("\u000B" + "var" + "\v" + "x" + "\u000B" + "=" + "\v" + "1" + "\u000B"); if (x !== 1) { $ERROR('#5: eval("\\u000B" + "var" + "\\v" + "x" + "\\u000B" + "=" + "\\v" + "1" + "\\u000B"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A1.2_T2.js b/test/suite/ch07/7.2/S7.2_A1.2_T2.js index f5ab425f54..6061e67e6c 100644 --- a/test/suite/ch07/7.2/S7.2_A1.2_T2.js +++ b/test/suite/ch07/7.2/S7.2_A1.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VERTICAL TAB (U+000B) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.2_T2.js - * @description Insert real VERTICAL TAB between tokens of var x=1 - */ +/*--- +info: VERTICAL TAB (U+000B) between any two tokens is allowed +es5id: 7.2_A1.2_T2 +description: Insert real VERTICAL TAB between tokens of var x=1 +---*/ //CHECK#1 var x = 1 ; @@ -19,5 +18,3 @@ eval(" var\vx =\v1 "); if (x !== 1) { $ERROR('#2: var\\vx =\\v1 ; x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch07/7.2/S7.2_A1.3_T1.js b/test/suite/ch07/7.2/S7.2_A1.3_T1.js index eb8c2f85c2..22970fba71 100644 --- a/test/suite/ch07/7.2/S7.2_A1.3_T1.js +++ b/test/suite/ch07/7.2/S7.2_A1.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FORM FEED (U+000C) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.3_T1.js - * @description Insert FORM FEED(\u000C and \f) between tokens of var x=1 - */ +/*--- +info: FORM FEED (U+000C) between any two tokens is allowed +es5id: 7.2_A1.3_T1 +description: Insert FORM FEED(\u000C and \f) between tokens of var x=1 +---*/ // CHECK#1 eval("\u000Cvar\u000Cx\u000C=\u000C1\u000C"); @@ -37,4 +36,3 @@ eval("\u000C" + "var" + "\f" + "x" + "\u000C" + "=" + "\f" + "1" + "\u000C"); if (x !== 1) { $ERROR('#5: eval("\\u000C" + "var" + "\\f" + "x" + "\\u000C" + "=" + "\\f" + "1" + "\\u000C"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A1.3_T2.js b/test/suite/ch07/7.2/S7.2_A1.3_T2.js index 90fe95742e..fdd0ac144e 100644 --- a/test/suite/ch07/7.2/S7.2_A1.3_T2.js +++ b/test/suite/ch07/7.2/S7.2_A1.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FORM FEED (U+000C) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.3_T2.js - * @description Insert real FORM FEED between tokens of var x=1 - */ +/*--- +info: FORM FEED (U+000C) between any two tokens is allowed +es5id: 7.2_A1.3_T2 +description: Insert real FORM FEED between tokens of var x=1 +---*/ //CHECK#1 var x = 1 ; @@ -19,5 +18,3 @@ eval(" var\fx =\f1 "); if (x !== 1) { $ERROR('#2: var\\fx =\\f1 ; x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch07/7.2/S7.2_A1.4_T1.js b/test/suite/ch07/7.2/S7.2_A1.4_T1.js index 1f10f91664..af52ed92ee 100644 --- a/test/suite/ch07/7.2/S7.2_A1.4_T1.js +++ b/test/suite/ch07/7.2/S7.2_A1.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * SPACE (U+0020) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.4_T1.js - * @description Insert SPACE(\u0020) between tokens of var x=1 - */ +/*--- +info: SPACE (U+0020) between any two tokens is allowed +es5id: 7.2_A1.4_T1 +description: Insert SPACE(\u0020) between tokens of var x=1 +---*/ // CHECK#1 eval("\u0020var\u0020x\u0020=\u00201\u0020"); @@ -19,4 +18,3 @@ eval("\u0020" + "var" + "\u0020" + "x" + "\u0020" + "=" + "\u0020" + "1" + "\u00 if (x !== 1) { $ERROR('#2: eval("\\u0020" + "var" + "\\u0020" + "x" + "\\u0020" + "=" + "\\u0020" + "1" + "\\u0020"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A1.4_T2.js b/test/suite/ch07/7.2/S7.2_A1.4_T2.js index 67c9c96c10..a4b338cf2a 100644 --- a/test/suite/ch07/7.2/S7.2_A1.4_T2.js +++ b/test/suite/ch07/7.2/S7.2_A1.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * SPACE (U+0020) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.4_T2.js - * @description Insert real SPACE between tokens of var x=1 - */ +/*--- +info: SPACE (U+0020) between any two tokens is allowed +es5id: 7.2_A1.4_T2 +description: Insert real SPACE between tokens of var x=1 +---*/ //CHECK#1 eval("\u0020var x\u0020= 1\u0020"); @@ -19,5 +18,3 @@ if (x !== 1) { if (x !== 1) { $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch07/7.2/S7.2_A1.5_T1.js b/test/suite/ch07/7.2/S7.2_A1.5_T1.js index 59339116e4..d7026908b7 100644 --- a/test/suite/ch07/7.2/S7.2_A1.5_T1.js +++ b/test/suite/ch07/7.2/S7.2_A1.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NO-BREAK SPACE (U+00A0) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.5_T1.js - * @description Insert NO-BREAK SPACE(\u00A0) between tokens of var x=1 - */ +/*--- +info: NO-BREAK SPACE (U+00A0) between any two tokens is allowed +es5id: 7.2_A1.5_T1 +description: Insert NO-BREAK SPACE(\u00A0) between tokens of var x=1 +---*/ // CHECK#1 eval("\u00A0var\u00A0x\u00A0=\u00A01\u00A0"); @@ -19,4 +18,3 @@ eval("\u00A0" + "var" + "\u00A0" + "x" + "\u00A0" + "=" + "\u00A0" + "1" + "\u00 if (x !== 1) { $ERROR('#2: eval("\\u00A0" + "var" + "\\u00A0" + "x" + "\\u00A0" + "=" + "\\u00A0" + "1" + "\\u00A0"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A1.5_T2.js b/test/suite/ch07/7.2/S7.2_A1.5_T2.js index e4635e6971..980055f1e7 100644 --- a/test/suite/ch07/7.2/S7.2_A1.5_T2.js +++ b/test/suite/ch07/7.2/S7.2_A1.5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NO-BREAK SPACE (U+00A0) between any two tokens is allowed - * - * @path ch07/7.2/S7.2_A1.5_T2.js - * @description Insert real NO-BREAK SPACE between tokens of var x=1 - */ +/*--- +info: NO-BREAK SPACE (U+00A0) between any two tokens is allowed +es5id: 7.2_A1.5_T2 +description: Insert real NO-BREAK SPACE between tokens of var x=1 +---*/ //CHECK#1 eval("\u00A0var x\u00A0= 1\u00A0"); @@ -19,5 +18,3 @@ if (x !== 1) { if (x !== 1) { $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch07/7.2/S7.2_A2.1_T1.js b/test/suite/ch07/7.2/S7.2_A2.1_T1.js index c7fdaaf3e0..310772b457 100644 --- a/test/suite/ch07/7.2/S7.2_A2.1_T1.js +++ b/test/suite/ch07/7.2/S7.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HORIZONTAL TAB (U+0009) may occur within strings - * - * @path ch07/7.2/S7.2_A2.1_T1.js - * @description Use HORIZONTAL TAB(\u0009 and \t) - */ +/*--- +info: HORIZONTAL TAB (U+0009) may occur within strings +es5id: 7.2_A2.1_T1 +description: Use HORIZONTAL TAB(\u0009 and \t) +---*/ // CHECK#1 if (eval("'\u0009str\u0009ing\u0009'") !== "\u0009str\u0009ing\u0009") { @@ -17,4 +16,3 @@ if (eval("'\u0009str\u0009ing\u0009'") !== "\u0009str\u0009ing\u0009") { if (eval("'\tstr\ting\t'") !== "\tstr\ting\t") { $ERROR('#2: eval("\'\\tstr\\ting\\t\'") === "\\tstr\\ting\\t"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.1_T2.js b/test/suite/ch07/7.2/S7.2_A2.1_T2.js index 7a89875bab..1402dc2a9e 100644 --- a/test/suite/ch07/7.2/S7.2_A2.1_T2.js +++ b/test/suite/ch07/7.2/S7.2_A2.1_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HORIZONTAL TAB (U+0009) may occur within strings - * - * @path ch07/7.2/S7.2_A2.1_T2.js - * @description Use real HORIZONTAL TAB - */ +/*--- +info: HORIZONTAL TAB (U+0009) may occur within strings +es5id: 7.2_A2.1_T2 +description: Use real HORIZONTAL TAB +---*/ //CHECK#1 if (" str ing " !== "\u0009str\u0009ing\u0009") { $ERROR('#1: " str ing " === "\\u0009str\\u0009ing\\u0009"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.2_T1.js b/test/suite/ch07/7.2/S7.2_A2.2_T1.js index 69c8de8ffb..157264631c 100644 --- a/test/suite/ch07/7.2/S7.2_A2.2_T1.js +++ b/test/suite/ch07/7.2/S7.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VERTICAL TAB (U+000B) may occur within strings - * - * @path ch07/7.2/S7.2_A2.2_T1.js - * @description Use VERTICAL TAB(\u000B and \v) - */ +/*--- +info: VERTICAL TAB (U+000B) may occur within strings +es5id: 7.2_A2.2_T1 +description: Use VERTICAL TAB(\u000B and \v) +---*/ // CHECK#1 if (eval("'\u000Bstr\u000Bing\u000B'") !== "\u000Bstr\u000Bing\u000B") { @@ -17,4 +16,3 @@ if (eval("'\u000Bstr\u000Bing\u000B'") !== "\u000Bstr\u000Bing\u000B") { if (eval("'\vstr\ving\v'") !== "\vstr\ving\v") { $ERROR('#2: eval("\'\\vstr\\ving\\v\'") === "\\vstr\\ving\\v"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.2_T2.js b/test/suite/ch07/7.2/S7.2_A2.2_T2.js index f7b4159728..0e5b074444 100644 --- a/test/suite/ch07/7.2/S7.2_A2.2_T2.js +++ b/test/suite/ch07/7.2/S7.2_A2.2_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VERTICAL TAB (U+000B) may occur within strings - * - * @path ch07/7.2/S7.2_A2.2_T2.js - * @description Use real VERTICAL TAB - */ +/*--- +info: VERTICAL TAB (U+000B) may occur within strings +es5id: 7.2_A2.2_T2 +description: Use real VERTICAL TAB +---*/ //CHECK#1 if (" str ing " !== "\u000Bstr\u000Bing\u000B") { $ERROR('#1: " str ing " === "\\u000Bstr\\u000Bing\\u000B"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.3_T1.js b/test/suite/ch07/7.2/S7.2_A2.3_T1.js index 9b30396fc5..30cf703e51 100644 --- a/test/suite/ch07/7.2/S7.2_A2.3_T1.js +++ b/test/suite/ch07/7.2/S7.2_A2.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FORM FEED (U+000C) may occur within strings - * - * @path ch07/7.2/S7.2_A2.3_T1.js - * @description Use FORM FEED(\u000C and \f) - */ +/*--- +info: FORM FEED (U+000C) may occur within strings +es5id: 7.2_A2.3_T1 +description: Use FORM FEED(\u000C and \f) +---*/ // CHECK#1 if (eval("'\u000Cstr\u000Cing\u000C'") !== "\u000Cstr\u000Cing\u000C") { @@ -17,4 +16,3 @@ if (eval("'\u000Cstr\u000Cing\u000C'") !== "\u000Cstr\u000Cing\u000C") { if (eval("'\fstr\fing\f'") !== "\fstr\fing\f") { $ERROR('#2: eval("\'\\fstr\\fing\\f\'") === "\\fstr\\fing\\f"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.3_T2.js b/test/suite/ch07/7.2/S7.2_A2.3_T2.js index a575f8a0d6..cda7ddd50c 100644 --- a/test/suite/ch07/7.2/S7.2_A2.3_T2.js +++ b/test/suite/ch07/7.2/S7.2_A2.3_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FORM FEED (U+000C) may occur within strings - * - * @path ch07/7.2/S7.2_A2.3_T2.js - * @description Use real FORM FEED - */ +/*--- +info: FORM FEED (U+000C) may occur within strings +es5id: 7.2_A2.3_T2 +description: Use real FORM FEED +---*/ //CHECK#1 if (" str ing " !== "\u000Cstr\u000Cing\u000C") { $ERROR('#1: " str ing " === "\\u000Cstr\\u000Cing\\u000C"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.4_T1.js b/test/suite/ch07/7.2/S7.2_A2.4_T1.js index 4b41932c70..b4b7cfda48 100644 --- a/test/suite/ch07/7.2/S7.2_A2.4_T1.js +++ b/test/suite/ch07/7.2/S7.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * SPACE (U+0020) may occur within strings - * - * @path ch07/7.2/S7.2_A2.4_T1.js - * @description Use SPACE(\u0020) - */ +/*--- +info: SPACE (U+0020) may occur within strings +es5id: 7.2_A2.4_T1 +description: Use SPACE(\u0020) +---*/ // CHECK#1 if (eval("'\u0020str\u0020ing\u0020'") !== "\u0020str\u0020ing\u0020") { @@ -17,4 +16,3 @@ if (eval("'\u0020str\u0020ing\u0020'") !== "\u0020str\u0020ing\u0020") { if (eval("' str ing '") !== " str ing ") { $ERROR('#2: eval("\' str ing \'") === " str ing "'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.4_T2.js b/test/suite/ch07/7.2/S7.2_A2.4_T2.js index b61d2313d7..01a6363c1b 100644 --- a/test/suite/ch07/7.2/S7.2_A2.4_T2.js +++ b/test/suite/ch07/7.2/S7.2_A2.4_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * SPACE (U+0020) may occur within strings - * - * @path ch07/7.2/S7.2_A2.4_T2.js - * @description Use real SPACE - */ +/*--- +info: SPACE (U+0020) may occur within strings +es5id: 7.2_A2.4_T2 +description: Use real SPACE +---*/ //CHECK#1 if (" str ing " !== "\u0020str\u0020ing\u0020") { $ERROR('#1: " str ing " === "\\u0020str\\u0020ing\\u0020"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.5_T1.js b/test/suite/ch07/7.2/S7.2_A2.5_T1.js index 60fb7f3583..0846ad2fc7 100644 --- a/test/suite/ch07/7.2/S7.2_A2.5_T1.js +++ b/test/suite/ch07/7.2/S7.2_A2.5_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NO-BREAK SPACE (U+00A0) may occur within strings - * - * @path ch07/7.2/S7.2_A2.5_T1.js - * @description Use NO-BREAK SPACE(\u00A0) - */ +/*--- +info: NO-BREAK SPACE (U+00A0) may occur within strings +es5id: 7.2_A2.5_T1 +description: Use NO-BREAK SPACE(\u00A0) +---*/ // CHECK#1 if (eval("'\u00A0str\u00A0ing\u00A0'") !== "\u00A0str\u00A0ing\u00A0") { $ERROR('#1: eval("\'\\u00A0str\\u00A0ing\\u00A0\'") === "\\u00A0str\\u00A0ing\\u00A0"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A2.5_T2.js b/test/suite/ch07/7.2/S7.2_A2.5_T2.js index 0cf26e5961..99a213f654 100644 --- a/test/suite/ch07/7.2/S7.2_A2.5_T2.js +++ b/test/suite/ch07/7.2/S7.2_A2.5_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NO-BREAK SPACE (U+00A0) may occur within strings - * - * @path ch07/7.2/S7.2_A2.5_T2.js - * @description Use real NO-BREAK SPACE - */ +/*--- +info: NO-BREAK SPACE (U+00A0) may occur within strings +es5id: 7.2_A2.5_T2 +description: Use real NO-BREAK SPACE +---*/ //CHECK#1 if (" str ing " !== "\u00A0str\u00A0ing\u00A0") { $ERROR('#1: " str ing " === "\\u00A0str\\u00A0ing\\u00A0"'); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.1_T1.js b/test/suite/ch07/7.2/S7.2_A3.1_T1.js index c8eae5be20..b9aa279540 100644 --- a/test/suite/ch07/7.2/S7.2_A3.1_T1.js +++ b/test/suite/ch07/7.2/S7.2_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain HORIZONTAL TAB (U+0009) - * - * @path ch07/7.2/S7.2_A3.1_T1.js - * @description Use HORIZONTAL TAB(\u0009) - */ +/*--- +info: Single line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A3.1_T1 +description: Use HORIZONTAL TAB(\u0009) +---*/ // CHECK#1 eval("//\u0009 single line \u0009 comment \u0009"); @@ -17,4 +16,3 @@ eval("//\u0009 single line \u0009 comment \u0009 x = 1;"); if (x !== 0) { $ERROR('#1: var x = 0; eval("//\\u0009 single line \\u0009 comment \\u0009 x = 1;"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.1_T2.js b/test/suite/ch07/7.2/S7.2_A3.1_T2.js index b5b4792409..203788ff28 100644 --- a/test/suite/ch07/7.2/S7.2_A3.1_T2.js +++ b/test/suite/ch07/7.2/S7.2_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain HORIZONTAL TAB (U+0009) - * - * @path ch07/7.2/S7.2_A3.1_T2.js - * @description Use real HORIZONTAL TAB - */ +/*--- +info: Single line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A3.1_T2 +description: Use real HORIZONTAL TAB +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.2_T1.js b/test/suite/ch07/7.2/S7.2_A3.2_T1.js index 435a2493fc..8211d63653 100644 --- a/test/suite/ch07/7.2/S7.2_A3.2_T1.js +++ b/test/suite/ch07/7.2/S7.2_A3.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain VERTICAL TAB (U+000B) - * - * @path ch07/7.2/S7.2_A3.2_T1.js - * @description Use VERTICAL TAB(\u000B) - */ +/*--- +info: Single line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A3.2_T1 +description: Use VERTICAL TAB(\u000B) +---*/ // CHECK#1 eval("//\u000B single line \u000B comment \u000B"); @@ -17,4 +16,3 @@ eval("//\u000B single line \u000B comment \u000B x = 1;"); if (x !== 0) { $ERROR('#1: var x = 0; eval("//\\u000B single line \\u000B comment \\u000B x = 1;"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.2_T2.js b/test/suite/ch07/7.2/S7.2_A3.2_T2.js index cfdd6bc0a5..c0289765b0 100644 --- a/test/suite/ch07/7.2/S7.2_A3.2_T2.js +++ b/test/suite/ch07/7.2/S7.2_A3.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain VERTICAL TAB (U+000B) - * - * @path ch07/7.2/S7.2_A3.2_T2.js - * @description Use real VERTICAL TAB - */ +/*--- +info: Single line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A3.2_T2 +description: Use real VERTICAL TAB +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.3_T1.js b/test/suite/ch07/7.2/S7.2_A3.3_T1.js index 260d070735..c1ca2fcd84 100644 --- a/test/suite/ch07/7.2/S7.2_A3.3_T1.js +++ b/test/suite/ch07/7.2/S7.2_A3.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain FORM FEED (U+000C) - * - * @path ch07/7.2/S7.2_A3.3_T1.js - * @description Use FORM FEED(\u000C) - */ +/*--- +info: Single line comment can contain FORM FEED (U+000C) +es5id: 7.2_A3.3_T1 +description: Use FORM FEED(\u000C) +---*/ // CHECK#1 eval("//\u000C single line \u000C comment \u000C"); @@ -17,4 +16,3 @@ eval("//\u000C single line \u000C comment \u000C x = 1;"); if (x !== 0) { $ERROR('#1: var x = 0; eval("//\\u000C single line \\u000C comment \\u000C x = 1;"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.3_T2.js b/test/suite/ch07/7.2/S7.2_A3.3_T2.js index f1ce32510c..436c74a437 100644 --- a/test/suite/ch07/7.2/S7.2_A3.3_T2.js +++ b/test/suite/ch07/7.2/S7.2_A3.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain FORM FEED (U+000C) - * - * @path ch07/7.2/S7.2_A3.3_T2.js - * @description Use real FORM FEED - */ +/*--- +info: Single line comment can contain FORM FEED (U+000C) +es5id: 7.2_A3.3_T2 +description: Use real FORM FEED +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.4_T1.js b/test/suite/ch07/7.2/S7.2_A3.4_T1.js index 41264606b0..b860decabe 100644 --- a/test/suite/ch07/7.2/S7.2_A3.4_T1.js +++ b/test/suite/ch07/7.2/S7.2_A3.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain SPACE (U+0020) - * - * @path ch07/7.2/S7.2_A3.4_T1.js - * @description Use SPACE(\u0020) - */ +/*--- +info: Single line comment can contain SPACE (U+0020) +es5id: 7.2_A3.4_T1 +description: Use SPACE(\u0020) +---*/ // CHECK#1 eval("//\u0020 single line \u0020 comment \u0020"); @@ -17,4 +16,3 @@ eval("//\u0020 single line \u0020 comment \u0020 x = 1;"); if (x !== 0) { $ERROR('#1: var x = 0; eval("//\\u0020 single line \\u0020 comment \\u0020 x = 1;"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.4_T2.js b/test/suite/ch07/7.2/S7.2_A3.4_T2.js index bfc4650fe0..1cc5499064 100644 --- a/test/suite/ch07/7.2/S7.2_A3.4_T2.js +++ b/test/suite/ch07/7.2/S7.2_A3.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain SPACE (U+0020) - * - * @path ch07/7.2/S7.2_A3.4_T2.js - * @description Use real SPACE - */ +/*--- +info: Single line comment can contain SPACE (U+0020) +es5id: 7.2_A3.4_T2 +description: Use real SPACE +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.5_T1.js b/test/suite/ch07/7.2/S7.2_A3.5_T1.js index 6d12abddf4..759f3c8b4c 100644 --- a/test/suite/ch07/7.2/S7.2_A3.5_T1.js +++ b/test/suite/ch07/7.2/S7.2_A3.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain NO-BREAK SPACE (U+00A0) - * - * @path ch07/7.2/S7.2_A3.5_T1.js - * @description Use NO-BREAK SPACE(\u00A0) - */ +/*--- +info: Single line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A3.5_T1 +description: Use NO-BREAK SPACE(\u00A0) +---*/ // CHECK#1 eval("//\u00A0 single line \u00A0 comment \u00A0"); @@ -17,4 +16,3 @@ eval("//\u00A0 single line \u00A0 comment \u00A0 x = 1;"); if (x !== 0) { $ERROR('#1: var x = 0; eval("//\\u00A0 single line \\u00A0 comment \\u00A0 x = 1;"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A3.5_T2.js b/test/suite/ch07/7.2/S7.2_A3.5_T2.js index 2085a3b388..c58eaa0e10 100644 --- a/test/suite/ch07/7.2/S7.2_A3.5_T2.js +++ b/test/suite/ch07/7.2/S7.2_A3.5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comment can contain NO-BREAK SPACE (U+00A0) - * - * @path ch07/7.2/S7.2_A3.5_T2.js - * @description Use real NO-BREAK SPACE - */ +/*--- +info: Single line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A3.5_T2 +description: Use real NO-BREAK SPACE +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.1_T1.js b/test/suite/ch07/7.2/S7.2_A4.1_T1.js index 6881a144fc..92b7ad5075 100644 --- a/test/suite/ch07/7.2/S7.2_A4.1_T1.js +++ b/test/suite/ch07/7.2/S7.2_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain HORIZONTAL TAB (U+0009) - * - * @path ch07/7.2/S7.2_A4.1_T1.js - * @description Use HORIZONTAL TAB(\u0009) - */ +/*--- +info: Multi line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A4.1_T1 +description: Use HORIZONTAL TAB(\u0009) +---*/ // CHECK#1 eval("/*\u0009 multi line \u0009 comment \u0009*/"); @@ -17,4 +16,3 @@ eval("/*\u0009 multi line \u0009 comment \u0009 x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u0009 multi line \\u0009 comment \\u0009 x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.1_T2.js b/test/suite/ch07/7.2/S7.2_A4.1_T2.js index a7d7cb7589..23c06e0ea2 100644 --- a/test/suite/ch07/7.2/S7.2_A4.1_T2.js +++ b/test/suite/ch07/7.2/S7.2_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain HORIZONTAL TAB (U+0009) - * - * @path ch07/7.2/S7.2_A4.1_T2.js - * @description Use real HORIZONTAL TAB - */ +/*--- +info: Multi line comment can contain HORIZONTAL TAB (U+0009) +es5id: 7.2_A4.1_T2 +description: Use real HORIZONTAL TAB +---*/ /*CHECK#1*/ var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.2_T1.js b/test/suite/ch07/7.2/S7.2_A4.2_T1.js index a3361d47c8..de04bce2bb 100644 --- a/test/suite/ch07/7.2/S7.2_A4.2_T1.js +++ b/test/suite/ch07/7.2/S7.2_A4.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain VERTICAL TAB (U+000B) - * - * @path ch07/7.2/S7.2_A4.2_T1.js - * @description Use VERTICAL TAB(\u000B) - */ +/*--- +info: Multi line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A4.2_T1 +description: Use VERTICAL TAB(\u000B) +---*/ // CHECK#1 eval("/*\u000B multi line \u000B comment \u000B*/"); @@ -17,4 +16,3 @@ eval("/*\u000B multi line \u000B comment \u000B x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u000B multi line \\u000B comment \\u000B x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.2_T2.js b/test/suite/ch07/7.2/S7.2_A4.2_T2.js index 87ef322350..44e71ed762 100644 --- a/test/suite/ch07/7.2/S7.2_A4.2_T2.js +++ b/test/suite/ch07/7.2/S7.2_A4.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain VERTICAL TAB (U+000B) - * - * @path ch07/7.2/S7.2_A4.2_T2.js - * @description Use real VERTICAL TAB - */ +/*--- +info: Multi line comment can contain VERTICAL TAB (U+000B) +es5id: 7.2_A4.2_T2 +description: Use real VERTICAL TAB +---*/ /*CHECK#1*/ var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.3_T1.js b/test/suite/ch07/7.2/S7.2_A4.3_T1.js index 689d287902..06c9dd8eb7 100644 --- a/test/suite/ch07/7.2/S7.2_A4.3_T1.js +++ b/test/suite/ch07/7.2/S7.2_A4.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain FORM FEED (U+000C) - * - * @path ch07/7.2/S7.2_A4.3_T1.js - * @description Use FORM FEED(\u000C) - */ +/*--- +info: Multi line comment can contain FORM FEED (U+000C) +es5id: 7.2_A4.3_T1 +description: Use FORM FEED(\u000C) +---*/ // CHECK#1 eval("/*\u000C multi line \u000C comment \u000C*/"); @@ -17,4 +16,3 @@ eval("/*\u000C multi line \u000C comment \u000C x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u000C multi line \\u000C comment \\u000C x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.3_T2.js b/test/suite/ch07/7.2/S7.2_A4.3_T2.js index f6f4043729..3944285228 100644 --- a/test/suite/ch07/7.2/S7.2_A4.3_T2.js +++ b/test/suite/ch07/7.2/S7.2_A4.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain FORM FEED (U+000C) - * - * @path ch07/7.2/S7.2_A4.3_T2.js - * @description Use real FORM FEED - */ +/*--- +info: Multi line comment can contain FORM FEED (U+000C) +es5id: 7.2_A4.3_T2 +description: Use real FORM FEED +---*/ /*CHECK#1*/ var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.4_T1.js b/test/suite/ch07/7.2/S7.2_A4.4_T1.js index 9f5908e176..adf0e87238 100644 --- a/test/suite/ch07/7.2/S7.2_A4.4_T1.js +++ b/test/suite/ch07/7.2/S7.2_A4.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain SPACE (U+0020) - * - * @path ch07/7.2/S7.2_A4.4_T1.js - * @description Use SPACE(\u0020) - */ +/*--- +info: Multi line comment can contain SPACE (U+0020) +es5id: 7.2_A4.4_T1 +description: Use SPACE(\u0020) +---*/ // CHECK#1 eval("/*\u0020 multi line \u0020 comment \u0020*/"); @@ -17,4 +16,3 @@ eval("/*\u0020 multi line \u0020 comment \u0020 x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u0020 multi line \\u0020 comment \\u0020 x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.4_T2.js b/test/suite/ch07/7.2/S7.2_A4.4_T2.js index ce446861ed..cd53cb64f5 100644 --- a/test/suite/ch07/7.2/S7.2_A4.4_T2.js +++ b/test/suite/ch07/7.2/S7.2_A4.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain SPACE (U+0020) - * - * @path ch07/7.2/S7.2_A4.4_T2.js - * @description Use real SPACE - */ +/*--- +info: Multi line comment can contain SPACE (U+0020) +es5id: 7.2_A4.4_T2 +description: Use real SPACE +---*/ /*CHECK#1*/ var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.5_T1.js b/test/suite/ch07/7.2/S7.2_A4.5_T1.js index cef5216e33..84e18e7ede 100644 --- a/test/suite/ch07/7.2/S7.2_A4.5_T1.js +++ b/test/suite/ch07/7.2/S7.2_A4.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain NO-BREAK SPACE (U+00A0) - * - * @path ch07/7.2/S7.2_A4.5_T1.js - * @description Use NO-BREAK SPACE(\u00A0) - */ +/*--- +info: Multi line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A4.5_T1 +description: Use NO-BREAK SPACE(\u00A0) +---*/ // CHECK#1 eval("/*\u00A0 multi line \u00A0 comment \u00A0*/"); @@ -17,4 +16,3 @@ eval("/*\u00A0 multi line \u00A0 comment \u00A0 x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u00A0 multi line \\u00A0 comment \\u00A0 x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A4.5_T2.js b/test/suite/ch07/7.2/S7.2_A4.5_T2.js index c4457c432e..278ea77e15 100644 --- a/test/suite/ch07/7.2/S7.2_A4.5_T2.js +++ b/test/suite/ch07/7.2/S7.2_A4.5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain NO-BREAK SPACE (U+00A0) - * - * @path ch07/7.2/S7.2_A4.5_T2.js - * @description Use real NO-BREAK SPACE - */ +/*--- +info: Multi line comment can contain NO-BREAK SPACE (U+00A0) +es5id: 7.2_A4.5_T2 +description: Use real NO-BREAK SPACE +---*/ /*CHECK#1*/ var x = 0; @@ -14,4 +13,3 @@ var x = 0; if (x !== 0) { $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.2/S7.2_A5_T1.js b/test/suite/ch07/7.2/S7.2_A5_T1.js index 6fb19c55d8..2886621759 100644 --- a/test/suite/ch07/7.2/S7.2_A5_T1.js +++ b/test/suite/ch07/7.2/S7.2_A5_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.2/S7.2_A5_T1.js - * @description Use TAB (U+0009) - * @negative - */ +/*--- +info: > + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T1 +description: Use TAB (U+0009) +flags: [negative] +---*/ var\u0009x; - diff --git a/test/suite/ch07/7.2/S7.2_A5_T2.js b/test/suite/ch07/7.2/S7.2_A5_T2.js index 1036b4ffa7..66f6064757 100644 --- a/test/suite/ch07/7.2/S7.2_A5_T2.js +++ b/test/suite/ch07/7.2/S7.2_A5_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.2/S7.2_A5_T2.js - * @description Use VERTICAL TAB (U+000B) - * @negative - */ +/*--- +info: > + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T2 +description: Use VERTICAL TAB (U+000B) +flags: [negative] +---*/ var\u000Bx; - diff --git a/test/suite/ch07/7.2/S7.2_A5_T3.js b/test/suite/ch07/7.2/S7.2_A5_T3.js index 4eb8212cd7..67da9023a3 100644 --- a/test/suite/ch07/7.2/S7.2_A5_T3.js +++ b/test/suite/ch07/7.2/S7.2_A5_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.2/S7.2_A5_T3.js - * @description Use FORM FEED (U+000C) - * @negative - */ +/*--- +info: > + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T3 +description: Use FORM FEED (U+000C) +flags: [negative] +---*/ var\u000Cx; - diff --git a/test/suite/ch07/7.2/S7.2_A5_T4.js b/test/suite/ch07/7.2/S7.2_A5_T4.js index 9a47a618d1..cffd17512b 100644 --- a/test/suite/ch07/7.2/S7.2_A5_T4.js +++ b/test/suite/ch07/7.2/S7.2_A5_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.2/S7.2_A5_T4.js - * @description Use SPACE (U+0020) - * @negative - */ +/*--- +info: > + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T4 +description: Use SPACE (U+0020) +flags: [negative] +---*/ var\u0020x; - diff --git a/test/suite/ch07/7.2/S7.2_A5_T5.js b/test/suite/ch07/7.2/S7.2_A5_T5.js index 5076c3b24c..f35d220f40 100644 --- a/test/suite/ch07/7.2/S7.2_A5_T5.js +++ b/test/suite/ch07/7.2/S7.2_A5_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White space cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.2/S7.2_A5_T5.js - * @description Use NO-BREAK SPACE (U+00A0) - * @negative - */ +/*--- +info: > + White space cannot be expressed as a Unicode escape sequence consisting + of six characters, namely \u plus four hexadecimal digits +es5id: 7.2_A5_T5 +description: Use NO-BREAK SPACE (U+00A0) +flags: [negative] +---*/ var\u00A0x; - diff --git a/test/suite/ch07/7.3/7.3-1.js b/test/suite/ch07/7.3/7.3-1.js index 3309e649a0..d8276a45c3 100644 --- a/test/suite/ch07/7.3/7.3-1.js +++ b/test/suite/ch07/7.3/7.3-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-1.js - * @description 7.3 - ES5 recognizes the character (\u2028) as line terminators when parsing statements - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-1 +description: > + 7.3 - ES5 recognizes the character (\u2028) as line + terminators when parsing statements +includes: [runTestCase.js] +---*/ + function testcase() { eval("var test7_3_1\u2028prop = 66;"); return (prop === 66) && ((typeof test7_3_1) === "undefined"); } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-10.js b/test/suite/ch07/7.3/7.3-10.js index 141841b9cd..4099254d7a 100644 --- a/test/suite/ch07/7.3/7.3-10.js +++ b/test/suite/ch07/7.3/7.3-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-10.js - * @description 7.3 - ES5 recognizes the character (\u2029) as a NonEscapeCharacter - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-10 +description: > + 7.3 - ES5 recognizes the character (\u2029) as a + NonEscapeCharacter +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var prop = \\u2029;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-11.js b/test/suite/ch07/7.3/7.3-11.js index 42116da208..1ce5b0c8a8 100644 --- a/test/suite/ch07/7.3/7.3-11.js +++ b/test/suite/ch07/7.3/7.3-11.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-11.js - * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character (\u2028) must be treated as a single line terminator for the purposes of semicolon insertion - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-11 +description: > + 7.3 - ES5 specifies that a multiline comment that contains a line + terminator character (\u2028) must be treated as a single + line terminator for the purposes of semicolon insertion +includes: [runTestCase.js] +---*/ + function testcase() { /*MultiLine Comments @@ -16,4 +20,4 @@ function testcase() { */ return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-12.js b/test/suite/ch07/7.3/7.3-12.js index b993f5bde8..b226dda182 100644 --- a/test/suite/ch07/7.3/7.3-12.js +++ b/test/suite/ch07/7.3/7.3-12.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-12.js - * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character (\u2029) must be treated as a single line terminator for the purposes of semicolon insertion - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-12 +description: > + 7.3 - ES5 specifies that a multiline comment that contains a line + terminator character (\u2029) must be treated as a single + line terminator for the purposes of semicolon insertion +includes: [runTestCase.js] +---*/ + function testcase() { /*MultiLine Comments @@ -16,4 +20,4 @@ function testcase() { */ return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-13.js b/test/suite/ch07/7.3/7.3-13.js index d7f941c383..64b5f2f606 100644 --- a/test/suite/ch07/7.3/7.3-13.js +++ b/test/suite/ch07/7.3/7.3-13.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-13.js - * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character (\u000D) must be treated as a single line terminator for the purposes of semicolon insertion - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-13 +description: > + 7.3 - ES5 specifies that a multiline comment that contains a line + terminator character (\u000D) must be treated as a single + line terminator for the purposes of semicolon insertion +includes: [runTestCase.js] +---*/ + function testcase() { /*MultiLine Comments @@ -16,4 +20,4 @@ function testcase() { */ return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-14.js b/test/suite/ch07/7.3/7.3-14.js index 8f973ae06e..8bb2c70605 100644 --- a/test/suite/ch07/7.3/7.3-14.js +++ b/test/suite/ch07/7.3/7.3-14.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-14.js - * @description 7.3 - ES5 specifies that a multiline comment that contains a line terminator character (\u000A) must be treated as a single line terminator for the purposes of semicolon insertion - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-14 +description: > + 7.3 - ES5 specifies that a multiline comment that contains a line + terminator character (\u000A) must be treated as a single + line terminator for the purposes of semicolon insertion +includes: [runTestCase.js] +---*/ + function testcase() { /*MultiLine Comments @@ -16,4 +20,4 @@ function testcase() { */ return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-15.js b/test/suite/ch07/7.3/7.3-15.js index 7dc88a6446..e010f85105 100644 --- a/test/suite/ch07/7.3/7.3-15.js +++ b/test/suite/ch07/7.3/7.3-15.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-15.js - * @description 7.3 - ES5 recognize (\uFFFF) as a whitespace character - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-15 +description: 7.3 - ES5 recognize (\uFFFF) as a whitespace character +includes: [runTestCase.js] +---*/ + function testcase() { var prop = "a\uFFFFa"; return prop.length === 3 && prop !== "aa" && prop[1] === "\uFFFF"; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-2.js b/test/suite/ch07/7.3/7.3-2.js index 95fb242803..2a832530fb 100644 --- a/test/suite/ch07/7.3/7.3-2.js +++ b/test/suite/ch07/7.3/7.3-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-2.js - * @description 7.3 - ES5 recognizes the character (\u2029) as line terminators when parsing statements - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-2 +description: > + 7.3 - ES5 recognizes the character (\u2029) as line + terminators when parsing statements +includes: [runTestCase.js] +---*/ + function testcase() { eval("var test7_3_2\u2029prop = 66;"); return (prop===66) && ((typeof test7_3_2) === "undefined"); } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-3.js b/test/suite/ch07/7.3/7.3-3.js index 5a05cd16e3..72d65a87b6 100644 --- a/test/suite/ch07/7.3/7.3-3.js +++ b/test/suite/ch07/7.3/7.3-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-3.js - * @description 7.3 - ES5 recognizes the character (\u2028) as terminating SingleLineComments - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-3 +description: > + 7.3 - ES5 recognizes the character (\u2028) as terminating + SingleLineComments +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("//Single Line Comments\u2028 var =;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-4.js b/test/suite/ch07/7.3/7.3-4.js index 41285cb465..d7ade3ed17 100644 --- a/test/suite/ch07/7.3/7.3-4.js +++ b/test/suite/ch07/7.3/7.3-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-4.js - * @description 7.3 - ES5 recognizes the character (\u2029) as terminating SingleLineComments - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-4 +description: > + 7.3 - ES5 recognizes the character (\u2029) as terminating + SingleLineComments +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("//Single Line Comments\u2029 var =;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-5.js b/test/suite/ch07/7.3/7.3-5.js index ad65ebbf29..30d756929e 100644 --- a/test/suite/ch07/7.3/7.3-5.js +++ b/test/suite/ch07/7.3/7.3-5.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-5.js - * @description 7.3 - ES5 recognizes the character (\u2028) as terminating string literal - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-5 +description: > + 7.3 - ES5 recognizes the character (\u2028) as terminating + string literal +includes: [runTestCase.js] +---*/ + function testcase() { var prop = "66\u2028123"; return prop === "66\u2028123" && prop[2] === "\u2028" && prop.length === 6; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-6.js b/test/suite/ch07/7.3/7.3-6.js index 5035eae1cf..6ccc29c4e8 100644 --- a/test/suite/ch07/7.3/7.3-6.js +++ b/test/suite/ch07/7.3/7.3-6.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-6.js - * @description 7.3 - ES5 recognizes the character (\u2029) as terminating string literal - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-6 +description: > + 7.3 - ES5 recognizes the character (\u2029) as terminating + string literal +includes: [runTestCase.js] +---*/ + function testcase() { var prop = "66\u2029123"; return prop === "66\u2029123" && prop[2] === "\u2029" && prop.length === 6; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-7.js b/test/suite/ch07/7.3/7.3-7.js index 641117ddfc..4b58a29251 100644 --- a/test/suite/ch07/7.3/7.3-7.js +++ b/test/suite/ch07/7.3/7.3-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-7.js - * @description 7.3 - ES5 recognizes the character (\u2028) as terminating regular expression literals - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-7 +description: > + 7.3 - ES5 recognizes the character (\u2028) as terminating + regular expression literals +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var regExp = /[\u2028]/"); @@ -18,4 +21,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-8.js b/test/suite/ch07/7.3/7.3-8.js index 7ac4481b11..ae2ef40bd4 100644 --- a/test/suite/ch07/7.3/7.3-8.js +++ b/test/suite/ch07/7.3/7.3-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-8.js - * @description 7.3 - ES5 recognizes the character (\u2029) as terminating regular expression literals - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-8 +description: > + 7.3 - ES5 recognizes the character (\u2029) as terminating + regular expression literals +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var regExp = /[\u2029]/"); @@ -18,4 +21,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/7.3-9.js b/test/suite/ch07/7.3/7.3-9.js index 53e964491e..713e1045e8 100644 --- a/test/suite/ch07/7.3/7.3-9.js +++ b/test/suite/ch07/7.3/7.3-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.3/7.3-9.js - * @description 7.3 - ES5 recognizes the character (\u2028) as a NonEscapeCharacter - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.3-9 +description: > + 7.3 - ES5 recognizes the character (\u2028) as a + NonEscapeCharacter +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var prop = \\u2028;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.3/S7.3_A1.1_T1.js b/test/suite/ch07/7.3/S7.3_A1.1_T1.js index b5814c2e05..bd0454128a 100644 --- a/test/suite/ch07/7.3/S7.3_A1.1_T1.js +++ b/test/suite/ch07/7.3/S7.3_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LINE FEED (U+000A) may occur between any two tokens - * - * @path ch07/7.3/S7.3_A1.1_T1.js - * @description Insert LINE FEED (\u000A and \n) between tokens of var x=1 - */ +/*--- +info: LINE FEED (U+000A) may occur between any two tokens +es5id: 7.3_A1.1_T1 +description: Insert LINE FEED (\u000A and \n) between tokens of var x=1 +---*/ // CHECK#1 eval("\u000Avar\u000Ax\u000A=\u000A1\u000A"); @@ -37,4 +36,3 @@ eval("\u000A" + "var" + "\n" + "x" + "\u000A" + "=" + "\n" + "1" + "\u000A"); if (x !== 1) { $ERROR('#5: eval("\\u000A" + "var" + "\\n" + "x" + "\\u000A" + "=" + "\\n" + "1" + "\\u000A"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A1.1_T2.js b/test/suite/ch07/7.3/S7.3_A1.1_T2.js index b4780361ba..e097f41fcc 100644 --- a/test/suite/ch07/7.3/S7.3_A1.1_T2.js +++ b/test/suite/ch07/7.3/S7.3_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LINE FEED (U+000A) may occur between any two tokens - * - * @path ch07/7.3/S7.3_A1.1_T2.js - * @description Insert real LINE FEED between tokens of var x=1 - */ +/*--- +info: LINE FEED (U+000A) may occur between any two tokens +es5id: 7.3_A1.1_T2 +description: Insert real LINE FEED between tokens of var x=1 +---*/ //CHECK#1 var @@ -16,4 +15,3 @@ x if (x !== 1) { $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A1.2_T1.js b/test/suite/ch07/7.3/S7.3_A1.2_T1.js index bb11122f71..7f5bf7acbe 100644 --- a/test/suite/ch07/7.3/S7.3_A1.2_T1.js +++ b/test/suite/ch07/7.3/S7.3_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CARRIAGE RETURN (U+000D) may occur between any two tokens - * - * @path ch07/7.3/S7.3_A1.2_T1.js - * @description Insert CARRIAGE RETURN (\u000D and \r) between tokens of var x=1 - */ +/*--- +info: CARRIAGE RETURN (U+000D) may occur between any two tokens +es5id: 7.3_A1.2_T1 +description: Insert CARRIAGE RETURN (\u000D and \r) between tokens of var x=1 +---*/ // CHECK#1 eval("\u000Dvar\u000Dx\u000D=\u000D1\u000D"); @@ -37,4 +36,3 @@ eval("\u000D" + "var" + "\r" + "x" + "\u000D" + "=" + "\r" + "1" + "\u000D"); if (x !== 1) { $ERROR('#5: eval("\\u000D" + "var" + "\\r" + "x" + "\\u000D" + "=" + "\\r" + "1" + "\\u000D"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A1.2_T2.js b/test/suite/ch07/7.3/S7.3_A1.2_T2.js index 52fb9b52a9..4cdb7d07c2 100644 --- a/test/suite/ch07/7.3/S7.3_A1.2_T2.js +++ b/test/suite/ch07/7.3/S7.3_A1.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CARRIAGE RETURN (U+000D) may occur between any two tokens - * - * @path ch07/7.3/S7.3_A1.2_T2.js - * @description Insert real CARRIAGE RETURN between tokens of var x=1 - */ +/*--- +info: CARRIAGE RETURN (U+000D) may occur between any two tokens +es5id: 7.3_A1.2_T2 +description: Insert real CARRIAGE RETURN between tokens of var x=1 +---*/ //CHECK#1 var @@ -16,4 +15,3 @@ x if (x !== 1) { $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A1.3.js b/test/suite/ch07/7.3/S7.3_A1.3.js index bf82819370..74a088ec65 100644 --- a/test/suite/ch07/7.3/S7.3_A1.3.js +++ b/test/suite/ch07/7.3/S7.3_A1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LINE SEPARATOR (U+2028) may occur between any two tokens - * - * @path ch07/7.3/S7.3_A1.3.js - * @description Insert LINE SEPARATOR (\u2028) between tokens of var x=1 - */ +/*--- +info: LINE SEPARATOR (U+2028) may occur between any two tokens +es5id: 7.3_A1.3 +description: Insert LINE SEPARATOR (\u2028) between tokens of var x=1 +---*/ // CHECK#1 eval("\u2028var\u2028x\u2028=\u20281\u2028"); @@ -19,5 +18,3 @@ eval("\u2028" + "var" + "\u2028" + "x" + "\u2028" + "=" + "\u2028" + "1" + "\u20 if (x !== 1) { $ERROR('#2: eval("\\u2028" + "var" + "\\u2028" + "x" + "\\u2028" + "=" + "\\u2028" + "1" + "\\u2028"); x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch07/7.3/S7.3_A1.4.js b/test/suite/ch07/7.3/S7.3_A1.4.js index f761d03767..1c2bccad2e 100644 --- a/test/suite/ch07/7.3/S7.3_A1.4.js +++ b/test/suite/ch07/7.3/S7.3_A1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * PARAGRAPH SEPARATOR (U+2029) may occur between any two tokens - * - * @path ch07/7.3/S7.3_A1.4.js - * @description Insert PARAGRAPH SEPARATOR (\u2029) between tokens of var x=1 - */ +/*--- +info: PARAGRAPH SEPARATOR (U+2029) may occur between any two tokens +es5id: 7.3_A1.4 +description: Insert PARAGRAPH SEPARATOR (\u2029) between tokens of var x=1 +---*/ // CHECK#1 eval("\u2029var\u2029x\u2029=\u20291\u2029"); @@ -19,7 +18,3 @@ eval("\u2029" + "var" + "\u2029" + "x" + "\u2029" + "=" + "\u2029" + "1" + "\u20 if (x !== 1) { $ERROR('#2: eval("\\u2029" + "var" + "\\u2029" + "x" + "\\u2029" + "=" + "\\u2029" + "1" + "\\u2029"); x === 1. Actual: ' + (x)); } - - - - diff --git a/test/suite/ch07/7.3/S7.3_A2.1_T1.js b/test/suite/ch07/7.3/S7.3_A2.1_T1.js index 16cb25e696..3fc7f84230 100644 --- a/test/suite/ch07/7.3/S7.3_A2.1_T1.js +++ b/test/suite/ch07/7.3/S7.3_A2.1_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LINE FEED (U+000A) within strings is not allowed - * - * @path ch07/7.3/S7.3_A2.1_T1.js - * @description Insert LINE FEED (\u000A) into string - * @negative - */ +/*--- +info: LINE FEED (U+000A) within strings is not allowed +es5id: 7.3_A2.1_T1 +description: Insert LINE FEED (\u000A) into string +flags: [negative] +---*/ // CHECK#1 if (eval("'\u000Astr\u000Aing\u000A'") === "\u000Astr\u000Aing\u000A") { $ERROR('#1: eval("\'\\u000Astr\\u000Aing\\u000A\'") === "\\u000Astr\\u000Aing\\u000A"'); } - diff --git a/test/suite/ch07/7.3/S7.3_A2.1_T2.js b/test/suite/ch07/7.3/S7.3_A2.1_T2.js index f587ec97ee..41a3694c64 100644 --- a/test/suite/ch07/7.3/S7.3_A2.1_T2.js +++ b/test/suite/ch07/7.3/S7.3_A2.1_T2.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LINE FEED (U+000A) within strings is not allowed - * - * @path ch07/7.3/S7.3_A2.1_T2.js - * @description Use real LINE FEED into string - * @negative - */ +/*--- +info: LINE FEED (U+000A) within strings is not allowed +es5id: 7.3_A2.1_T2 +description: Use real LINE FEED into string +flags: [negative] +---*/ //CHECK#1 " str ing "; - diff --git a/test/suite/ch07/7.3/S7.3_A2.2_T1.js b/test/suite/ch07/7.3/S7.3_A2.2_T1.js index b58d20227e..64199e91f9 100644 --- a/test/suite/ch07/7.3/S7.3_A2.2_T1.js +++ b/test/suite/ch07/7.3/S7.3_A2.2_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CARRIAGE RETURN (U+000D) within strings is not allowed - * - * @path ch07/7.3/S7.3_A2.2_T1.js - * @description Insert CARRIAGE RETURN (\u000D) into string - * @negative - */ +/*--- +info: CARRIAGE RETURN (U+000D) within strings is not allowed +es5id: 7.3_A2.2_T1 +description: Insert CARRIAGE RETURN (\u000D) into string +flags: [negative] +---*/ // CHECK#1 if (eval("'\u000Dstr\u000Ding\u000D'") === "\u000Dstr\u000Ding\u000D") { $ERROR('#1: eval("\'\\u000Dstr\\u000Ding\\u000D\'") === "\\u000Dstr\\u000Ding\\u000D"'); } - diff --git a/test/suite/ch07/7.3/S7.3_A2.2_T2.js b/test/suite/ch07/7.3/S7.3_A2.2_T2.js index 9e8c5e30df..a556aa4143 100644 --- a/test/suite/ch07/7.3/S7.3_A2.2_T2.js +++ b/test/suite/ch07/7.3/S7.3_A2.2_T2.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CARRIAGE RETURN (U+000D) within strings is not allowed - * - * @path ch07/7.3/S7.3_A2.2_T2.js - * @description Insert real CARRIAGE RETURN into string - * @negative - */ +/*--- +info: CARRIAGE RETURN (U+000D) within strings is not allowed +es5id: 7.3_A2.2_T2 +description: Insert real CARRIAGE RETURN into string +flags: [negative] +---*/ //CHECK#1 " str ing "; - diff --git a/test/suite/ch07/7.3/S7.3_A2.3.js b/test/suite/ch07/7.3/S7.3_A2.3.js index 645dfaaf39..dd811410c6 100644 --- a/test/suite/ch07/7.3/S7.3_A2.3.js +++ b/test/suite/ch07/7.3/S7.3_A2.3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LINE SEPARATOR (U+2028) within strings is not allowed - * - * @path ch07/7.3/S7.3_A2.3.js - * @description Insert LINE SEPARATOR (\u2028) into string - * @negative - */ +/*--- +info: LINE SEPARATOR (U+2028) within strings is not allowed +es5id: 7.3_A2.3 +description: Insert LINE SEPARATOR (\u2028) into string +flags: [negative] +---*/ // CHECK#1 if (eval("'\u2028str\u2028ing\u2028'") === "\u2028str\u2028ing\u2028") { $ERROR('#1: eval("\'\\u2028str\\u2028ing\\u2028\'") === "\\u2028str\\u2028ing\\u2028"'); } - diff --git a/test/suite/ch07/7.3/S7.3_A2.4.js b/test/suite/ch07/7.3/S7.3_A2.4.js index 00e1850372..debb208959 100644 --- a/test/suite/ch07/7.3/S7.3_A2.4.js +++ b/test/suite/ch07/7.3/S7.3_A2.4.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * PARAGRAPH SEPARATOR (U+2029) within strings is not allowed - * - * @path ch07/7.3/S7.3_A2.4.js - * @description Insert PARAGRAPH SEPARATOR (\u2029) into string - * @negative - */ +/*--- +info: PARAGRAPH SEPARATOR (U+2029) within strings is not allowed +es5id: 7.3_A2.4 +description: Insert PARAGRAPH SEPARATOR (\u2029) into string +flags: [negative] +---*/ // CHECK#1 if (eval("'\u2029str\u2029ing\u2029'") === "\u2029str\u2029ing\u2029") { $ERROR('#1: eval("\'\\u2029str\\u2029ing\\u2029\'") === "\\u2029str\\u2029ing\\u2029"'); } - diff --git a/test/suite/ch07/7.3/S7.3_A3.1_T1.js b/test/suite/ch07/7.3/S7.3_A3.1_T1.js index f44c153cf2..84532006e4 100644 --- a/test/suite/ch07/7.3/S7.3_A3.1_T1.js +++ b/test/suite/ch07/7.3/S7.3_A3.1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain LINE FEED (U+000A) inside - * - * @path ch07/7.3/S7.3_A3.1_T1.js - * @description Insert LINE FEED (\u000A) into single line comment - * @negative - */ +/*--- +info: Single line comments can not contain LINE FEED (U+000A) inside +es5id: 7.3_A3.1_T1 +description: Insert LINE FEED (\u000A) into single line comment +flags: [negative] +---*/ // CHECK#1 eval("// single line \u000A comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.1_T2.js b/test/suite/ch07/7.3/S7.3_A3.1_T2.js index cb808a87ac..b0e74af980 100644 --- a/test/suite/ch07/7.3/S7.3_A3.1_T2.js +++ b/test/suite/ch07/7.3/S7.3_A3.1_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain LINE FEED (U+000A) inside - * - * @path ch07/7.3/S7.3_A3.1_T2.js - * @description Insert LINE FEED (\u000A) into begin of single line comment - * @negative - */ +/*--- +info: Single line comments can not contain LINE FEED (U+000A) inside +es5id: 7.3_A3.1_T2 +description: Insert LINE FEED (\u000A) into begin of single line comment +flags: [negative] +---*/ // CHECK#1 eval("//\u000A single line comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.1_T3.js b/test/suite/ch07/7.3/S7.3_A3.1_T3.js index 6394c939c6..41f3d5c5b2 100644 --- a/test/suite/ch07/7.3/S7.3_A3.1_T3.js +++ b/test/suite/ch07/7.3/S7.3_A3.1_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain LINE FEED (U+000A) inside - * - * @path ch07/7.3/S7.3_A3.1_T3.js - * @description Insert real LINE FEED into single line comment - * @negative - */ +/*--- +info: Single line comments can not contain LINE FEED (U+000A) inside +es5id: 7.3_A3.1_T3 +description: Insert real LINE FEED into single line comment +flags: [negative] +---*/ // CHECK#1 //single line comment - diff --git a/test/suite/ch07/7.3/S7.3_A3.2_T1.js b/test/suite/ch07/7.3/S7.3_A3.2_T1.js index 2fa2706933..5bde268897 100644 --- a/test/suite/ch07/7.3/S7.3_A3.2_T1.js +++ b/test/suite/ch07/7.3/S7.3_A3.2_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain CARRIAGE RETURN (U+000D) inside - * - * @path ch07/7.3/S7.3_A3.2_T1.js - * @description Insert CARRIAGE RETURN (\u000D) into single line comment - * @negative - */ +/*--- +info: Single line comments can not contain CARRIAGE RETURN (U+000D) inside +es5id: 7.3_A3.2_T1 +description: Insert CARRIAGE RETURN (\u000D) into single line comment +flags: [negative] +---*/ // CHECK#1 eval("// single line \u000D comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.2_T2.js b/test/suite/ch07/7.3/S7.3_A3.2_T2.js index 9ffdc5cf92..7c34bcd0df 100644 --- a/test/suite/ch07/7.3/S7.3_A3.2_T2.js +++ b/test/suite/ch07/7.3/S7.3_A3.2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain CARRIAGE RETURN (U+000D) inside - * - * @path ch07/7.3/S7.3_A3.2_T2.js - * @description Insert CARRIAGE RETURN (\u000D) into begin of single line comment - * @negative - */ +/*--- +info: Single line comments can not contain CARRIAGE RETURN (U+000D) inside +es5id: 7.3_A3.2_T2 +description: Insert CARRIAGE RETURN (\u000D) into begin of single line comment +flags: [negative] +---*/ // CHECK#1 eval("//\u000D single line comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.2_T3.js b/test/suite/ch07/7.3/S7.3_A3.2_T3.js index d16ee33beb..b610bd50ad 100644 --- a/test/suite/ch07/7.3/S7.3_A3.2_T3.js +++ b/test/suite/ch07/7.3/S7.3_A3.2_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain CARRIAGE RETURN (U+000D) inside - * - * @path ch07/7.3/S7.3_A3.2_T3.js - * @description Insert real CARRIAGE RETURN into single line comment - * @negative - */ +/*--- +info: Single line comments can not contain CARRIAGE RETURN (U+000D) inside +es5id: 7.3_A3.2_T3 +description: Insert real CARRIAGE RETURN into single line comment +flags: [negative] +---*/ // CHECK#1 //single line comment - diff --git a/test/suite/ch07/7.3/S7.3_A3.3_T1.js b/test/suite/ch07/7.3/S7.3_A3.3_T1.js index ae926c4569..033ed8984d 100644 --- a/test/suite/ch07/7.3/S7.3_A3.3_T1.js +++ b/test/suite/ch07/7.3/S7.3_A3.3_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain LINE SEPARATOR (U+2028) inside - * - * @path ch07/7.3/S7.3_A3.3_T1.js - * @description Insert LINE SEPARATOR (\u2028) into single line comment - * @negative - */ +/*--- +info: Single line comments can not contain LINE SEPARATOR (U+2028) inside +es5id: 7.3_A3.3_T1 +description: Insert LINE SEPARATOR (\u2028) into single line comment +flags: [negative] +---*/ // CHECK#1 eval("// single line \u2028 comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.3_T2.js b/test/suite/ch07/7.3/S7.3_A3.3_T2.js index 43ff458434..d9b9a3a0cf 100644 --- a/test/suite/ch07/7.3/S7.3_A3.3_T2.js +++ b/test/suite/ch07/7.3/S7.3_A3.3_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain LINE SEPARATOR (U+2028) inside - * - * @path ch07/7.3/S7.3_A3.3_T2.js - * @description Insert LINE SEPARATOR (\u2028) into begin of single line comment - * @negative - */ +/*--- +info: Single line comments can not contain LINE SEPARATOR (U+2028) inside +es5id: 7.3_A3.3_T2 +description: Insert LINE SEPARATOR (\u2028) into begin of single line comment +flags: [negative] +---*/ // CHECK#1 eval("//\u2028 single line comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.4_T1.js b/test/suite/ch07/7.3/S7.3_A3.4_T1.js index 1a8fae53f5..2a0b7c8251 100644 --- a/test/suite/ch07/7.3/S7.3_A3.4_T1.js +++ b/test/suite/ch07/7.3/S7.3_A3.4_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside - * - * @path ch07/7.3/S7.3_A3.4_T1.js - * @description Insert PARAGRAPH SEPARATOR (\u2029) into single line comment - * @negative - */ +/*--- +info: Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside +es5id: 7.3_A3.4_T1 +description: Insert PARAGRAPH SEPARATOR (\u2029) into single line comment +flags: [negative] +---*/ // CHECK#1 eval("// single line \u2029 comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A3.4_T2.js b/test/suite/ch07/7.3/S7.3_A3.4_T2.js index 8a6c59d8d1..d483a972a9 100644 --- a/test/suite/ch07/7.3/S7.3_A3.4_T2.js +++ b/test/suite/ch07/7.3/S7.3_A3.4_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside - * - * @path ch07/7.3/S7.3_A3.4_T2.js - * @description Insert PARAGRAPH SEPARATOR (\u2029) into begin of single line comment - * @negative - */ +/*--- +info: Single line comments can not contain PARAGRAPH SEPARATOR (U+2029) inside +es5id: 7.3_A3.4_T2 +description: > + Insert PARAGRAPH SEPARATOR (\u2029) into begin of single line + comment +flags: [negative] +---*/ // CHECK#1 eval("//\u2029 single line comment"); - diff --git a/test/suite/ch07/7.3/S7.3_A4_T1.js b/test/suite/ch07/7.3/S7.3_A4_T1.js index df523f9a30..5f4de83a29 100644 --- a/test/suite/ch07/7.3/S7.3_A4_T1.js +++ b/test/suite/ch07/7.3/S7.3_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can contain Line Terminator at the end of line - * - * @path ch07/7.3/S7.3_A4_T1.js - * @description Insert LINE FEED (U+000A) into the end of single line comment - */ +/*--- +info: Single line comments can contain Line Terminator at the end of line +es5id: 7.3_A4_T1 +description: Insert LINE FEED (U+000A) into the end of single line comment +---*/ // CHECK#1 eval("// single line comment\u000A"); @@ -17,4 +16,3 @@ eval("// single line comment\u000A x = 1;"); if (x !== 1) { $ERROR('#1: var x = 0; eval("// single line comment\\u000A x = 1;"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A4_T2.js b/test/suite/ch07/7.3/S7.3_A4_T2.js index d99dc7dc16..fc1d805d23 100644 --- a/test/suite/ch07/7.3/S7.3_A4_T2.js +++ b/test/suite/ch07/7.3/S7.3_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can contain Line Terminator at the end of line - * - * @path ch07/7.3/S7.3_A4_T2.js - * @description Insert CARRIAGE RETURN (U+000D) into the end of single line comment - */ +/*--- +info: Single line comments can contain Line Terminator at the end of line +es5id: 7.3_A4_T2 +description: Insert CARRIAGE RETURN (U+000D) into the end of single line comment +---*/ // CHECK#1 eval("// single line comment\u000D"); @@ -17,4 +16,3 @@ eval("// single line comment\u000D x = 1;"); if (x !== 1) { $ERROR('#1: var x = 0; eval("// single line comment\\u000D x = 1;"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A4_T3.js b/test/suite/ch07/7.3/S7.3_A4_T3.js index 5677bc0cdb..57b182938c 100644 --- a/test/suite/ch07/7.3/S7.3_A4_T3.js +++ b/test/suite/ch07/7.3/S7.3_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can contain Line Terminator at the end of line - * - * @path ch07/7.3/S7.3_A4_T3.js - * @description Insert LINE SEPARATOR (U+2028) into the end of single line comment - */ +/*--- +info: Single line comments can contain Line Terminator at the end of line +es5id: 7.3_A4_T3 +description: Insert LINE SEPARATOR (U+2028) into the end of single line comment +---*/ // CHECK#1 eval("// single line comment\u2028"); @@ -17,4 +16,3 @@ eval("// single line comment\u2028 x = 1;"); if (x !== 1) { $ERROR('#1: var x = 0; eval("// single line comment\\u2028 x = 1;"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A4_T4.js b/test/suite/ch07/7.3/S7.3_A4_T4.js index c34f0e15ee..9ebd1a4292 100644 --- a/test/suite/ch07/7.3/S7.3_A4_T4.js +++ b/test/suite/ch07/7.3/S7.3_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can contain Line Terminator at the end of line - * - * @path ch07/7.3/S7.3_A4_T4.js - * @description Insert PARAGRAPH SEPARATOR (U+2029) into the end of single line comment - */ +/*--- +info: Single line comments can contain Line Terminator at the end of line +es5id: 7.3_A4_T4 +description: > + Insert PARAGRAPH SEPARATOR (U+2029) into the end of single line + comment +---*/ // CHECK#1 eval("// single line comment\u2029"); @@ -17,4 +18,3 @@ eval("// single line comment\u2029 x = 1;"); if (x !== 1) { $ERROR('#1: var x = 0; eval("// single line comment\\u2029 x = 1;"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A5.1_T1.js b/test/suite/ch07/7.3/S7.3_A5.1_T1.js index fe8d7173ea..95cfa678a2 100644 --- a/test/suite/ch07/7.3/S7.3_A5.1_T1.js +++ b/test/suite/ch07/7.3/S7.3_A5.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain LINE FEED (U+000A) - * - * @path ch07/7.3/S7.3_A5.1_T1.js - * @description Insert LINE FEED (U+000A) into multi line comment - */ +/*--- +info: Multi line comment can contain LINE FEED (U+000A) +es5id: 7.3_A5.1_T1 +description: Insert LINE FEED (U+000A) into multi line comment +---*/ // CHECK#1 eval("/*\u000A multi line \u000A comment \u000A*/"); @@ -17,4 +16,3 @@ eval("/*\u000A multi line \u000A comment \u000A x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u000A multi line \\u000A comment \\u000A x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A5.1_T2.js b/test/suite/ch07/7.3/S7.3_A5.1_T2.js index 661df860e1..168faa99a3 100644 --- a/test/suite/ch07/7.3/S7.3_A5.1_T2.js +++ b/test/suite/ch07/7.3/S7.3_A5.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain LINE FEED (U+000A) - * - * @path ch07/7.3/S7.3_A5.1_T2.js - * @description Insert real LINE FEED into multi line comment - */ +/*--- +info: Multi line comment can contain LINE FEED (U+000A) +es5id: 7.3_A5.1_T2 +description: Insert real LINE FEED into multi line comment +---*/ /*CHECK#1*/ var x = 0; @@ -19,4 +18,3 @@ x = 1; if (x !== 0) { $ERROR('#1: var x = 0; /*\\nmulti\\nline\\ncomment\\nx = 1;\\n*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A5.2_T1.js b/test/suite/ch07/7.3/S7.3_A5.2_T1.js index 20c5dd1943..cb92ec1ccf 100644 --- a/test/suite/ch07/7.3/S7.3_A5.2_T1.js +++ b/test/suite/ch07/7.3/S7.3_A5.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain CARRIAGE RETURN (U+000D) - * - * @path ch07/7.3/S7.3_A5.2_T1.js - * @description Insert CARRIAGE RETURN (U+000D) into multi line comment - */ +/*--- +info: Multi line comment can contain CARRIAGE RETURN (U+000D) +es5id: 7.3_A5.2_T1 +description: Insert CARRIAGE RETURN (U+000D) into multi line comment +---*/ // CHECK#1 eval("/*\u000D multi line \u000D comment \u000D*/"); @@ -17,4 +16,3 @@ eval("/*\u000D multi line \u000D comment \u000D x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u000D multi line \\u000D comment \\u000D x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A5.2_T2.js b/test/suite/ch07/7.3/S7.3_A5.2_T2.js index a83a2be2df..47fe256c25 100644 --- a/test/suite/ch07/7.3/S7.3_A5.2_T2.js +++ b/test/suite/ch07/7.3/S7.3_A5.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain CARRIAGE RETURN (U+000D) - * - * @path ch07/7.3/S7.3_A5.2_T2.js - * @description Insert real CARRIAGE RETURN into multi line comment - */ +/*--- +info: Multi line comment can contain CARRIAGE RETURN (U+000D) +es5id: 7.3_A5.2_T2 +description: Insert real CARRIAGE RETURN into multi line comment +---*/ /*CHECK#1*/ var x = 0; @@ -19,4 +18,3 @@ x = 1; if (x !== 0) { $ERROR('#1: var x = 0; /*\\rmulti\\rline\\rcomment\\rx = 1;\\r*/ x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A5.3.js b/test/suite/ch07/7.3/S7.3_A5.3.js index 501392bc0c..48abd6b12c 100644 --- a/test/suite/ch07/7.3/S7.3_A5.3.js +++ b/test/suite/ch07/7.3/S7.3_A5.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain LINE SEPARATOR (U+2028) - * - * @path ch07/7.3/S7.3_A5.3.js - * @description Insert LINE SEPARATOR (U+2028) into multi line comment - */ +/*--- +info: Multi line comment can contain LINE SEPARATOR (U+2028) +es5id: 7.3_A5.3 +description: Insert LINE SEPARATOR (U+2028) into multi line comment +---*/ // CHECK#1 eval("/*\u2028 multi line \u2028 comment \u2028*/"); @@ -17,4 +16,3 @@ eval("/*\u2028 multi line \u2028 comment \u2028 x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u2028 multi line \\u2028 comment \\u2028 x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A5.4.js b/test/suite/ch07/7.3/S7.3_A5.4.js index 8f85974777..be27973063 100644 --- a/test/suite/ch07/7.3/S7.3_A5.4.js +++ b/test/suite/ch07/7.3/S7.3_A5.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multi line comment can contain LINE SEPARATOR (U+2029) - * - * @path ch07/7.3/S7.3_A5.4.js - * @description Insert PARAGRAPH SEPARATOR (U+2029) into multi line comment - */ +/*--- +info: Multi line comment can contain LINE SEPARATOR (U+2029) +es5id: 7.3_A5.4 +description: Insert PARAGRAPH SEPARATOR (U+2029) into multi line comment +---*/ // CHECK#1 eval("/*\u2029 multi line \u2029 comment \u2029*/"); @@ -17,4 +16,3 @@ eval("/*\u2029 multi line \u2029 comment \u2029 x = 1;*/"); if (x !== 0) { $ERROR('#1: var x = 0; eval("/*\\u2029 multi line \\u2029 comment \\u2029 x = 1;*/"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A6_T1.js b/test/suite/ch07/7.3/S7.3_A6_T1.js index 89b3751f62..fba455c4f7 100644 --- a/test/suite/ch07/7.3/S7.3_A6_T1.js +++ b/test/suite/ch07/7.3/S7.3_A6_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.3/S7.3_A6_T1.js - * @description Insert LINE FEED (U+000A) in var x - * @negative - */ +/*--- +info: > + Line Terminator cannot be expressed as a Unicode escape sequence + consisting of six characters, namely \u plus four hexadecimal digits +es5id: 7.3_A6_T1 +description: Insert LINE FEED (U+000A) in var x +flags: [negative] +---*/ var\u000Ax; - diff --git a/test/suite/ch07/7.3/S7.3_A6_T2.js b/test/suite/ch07/7.3/S7.3_A6_T2.js index 3dc52d206d..2fa68cf2a8 100644 --- a/test/suite/ch07/7.3/S7.3_A6_T2.js +++ b/test/suite/ch07/7.3/S7.3_A6_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.3/S7.3_A6_T2.js - * @description Insert CARRIAGE RETURN (U+000D) in var x - * @negative - */ +/*--- +info: > + Line Terminator cannot be expressed as a Unicode escape sequence + consisting of six characters, namely \u plus four hexadecimal digits +es5id: 7.3_A6_T2 +description: Insert CARRIAGE RETURN (U+000D) in var x +flags: [negative] +---*/ var\u000Dx; - diff --git a/test/suite/ch07/7.3/S7.3_A6_T3.js b/test/suite/ch07/7.3/S7.3_A6_T3.js index 62d6ef10fd..c288088b0e 100644 --- a/test/suite/ch07/7.3/S7.3_A6_T3.js +++ b/test/suite/ch07/7.3/S7.3_A6_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.3/S7.3_A6_T3.js - * @description Insert LINE SEPARATOR (U+2028) in var x - * @negative - */ +/*--- +info: > + Line Terminator cannot be expressed as a Unicode escape sequence + consisting of six characters, namely \u plus four hexadecimal digits +es5id: 7.3_A6_T3 +description: Insert LINE SEPARATOR (U+2028) in var x +flags: [negative] +---*/ var\u2028x; - diff --git a/test/suite/ch07/7.3/S7.3_A6_T4.js b/test/suite/ch07/7.3/S7.3_A6_T4.js index cd5d2d40a2..9f679d5f4a 100644 --- a/test/suite/ch07/7.3/S7.3_A6_T4.js +++ b/test/suite/ch07/7.3/S7.3_A6_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.3/S7.3_A6_T4.js - * @description Insert PARAGRAPH SEPARATOR (U+2029) in var x - * @negative - */ +/*--- +info: > + Line Terminator cannot be expressed as a Unicode escape sequence + consisting of six characters, namely \u plus four hexadecimal digits +es5id: 7.3_A6_T4 +description: Insert PARAGRAPH SEPARATOR (U+2029) in var x +flags: [negative] +---*/ var\u2029x; - diff --git a/test/suite/ch07/7.3/S7.3_A7_T1.js b/test/suite/ch07/7.3/S7.3_A7_T1.js index 861b737e43..e5eefb4999 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T1.js +++ b/test/suite/ch07/7.3/S7.3_A7_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T1.js - * @description Insert Line Terminator in var x=y+z - */ +/*--- +info: Line Terminators between operators are allowed +es5id: 7.3_A7_T1 +description: Insert Line Terminator in var x=y+z +---*/ // CHECK#1 var y=2; @@ -54,4 +53,3 @@ eval("\u2029var\u2029x\u2029=\u2029y\u2029+\u2029z\u2029"); if (x !== 5) { $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029+\\u2029z\\u2029"); x === 5. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A7_T2.js b/test/suite/ch07/7.3/S7.3_A7_T2.js index cdc5801c91..1d18daf5d7 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T2.js +++ b/test/suite/ch07/7.3/S7.3_A7_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T2.js - * @description Insert Line Terminator in var x=y-z - */ +/*--- +info: Line Terminators between operators are allowed +es5id: 7.3_A7_T2 +description: Insert Line Terminator in var x=y-z +---*/ // CHECK#1 var y=3; @@ -54,4 +53,3 @@ eval("\u2029var\u2029x\u2029=\u2029y\u2029-\u2029z\u2029"); if (x !== 1) { $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029-\\u2029z\\u2029"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A7_T3.js b/test/suite/ch07/7.3/S7.3_A7_T3.js index 1c83956da3..301525c607 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T3.js +++ b/test/suite/ch07/7.3/S7.3_A7_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T3.js - * @description Insert Line Terminator in var x=y*z - */ +/*--- +info: Line Terminators between operators are allowed +es5id: 7.3_A7_T3 +description: Insert Line Terminator in var x=y*z +---*/ // CHECK#1 var y=3; @@ -54,4 +53,3 @@ eval("\u2029var\u2029x\u2029=\u2029y\u2029*\u2029z\u2029"); if (x !== 6) { $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029*\\u2029z\\u2029"); x === 6. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A7_T4.js b/test/suite/ch07/7.3/S7.3_A7_T4.js index fad60b4cb8..dc6569cbe3 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T4.js +++ b/test/suite/ch07/7.3/S7.3_A7_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T4.js - * @description Insert Line Terminator in var x=y/z - */ +/*--- +info: Line Terminators between operators are allowed +es5id: 7.3_A7_T4 +description: Insert Line Terminator in var x=y/z +---*/ // CHECK#1 var y=12; @@ -54,4 +53,3 @@ eval("\u2029var\u2029x\u2029=\u2029y\u2029/\u2029z\u2029"); if (x !== 6) { $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029/\\u2029z\\u2029"); x === 6. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A7_T5.js b/test/suite/ch07/7.3/S7.3_A7_T5.js index f7aff01220..93c757ce15 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T5.js +++ b/test/suite/ch07/7.3/S7.3_A7_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T5.js - * @description Insert Line Terminator in var x=y%z - */ +/*--- +info: Line Terminators between operators are allowed +es5id: 7.3_A7_T5 +description: Insert Line Terminator in var x=y%z +---*/ // CHECK#1 var y=16; @@ -54,4 +53,3 @@ eval("\u2029var\u2029x\u2029=\u2029y\u2029%\u2029z\u2029"); if (x !== 6) { $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029%\\u2029z\\u2029"); x === 6. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A7_T6.js b/test/suite/ch07/7.3/S7.3_A7_T6.js index 9dc8c01412..2dec6164c0 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T6.js +++ b/test/suite/ch07/7.3/S7.3_A7_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T6.js - * @description Insert Line Terminator in var x=y>>z - */ +/*--- +info: Line Terminators between operators are allowed +es5id: 7.3_A7_T6 +description: Insert Line Terminator in var x=y>>z +---*/ // CHECK#1 var y=16; @@ -54,4 +53,3 @@ eval("\u2029var\u2029x\u2029=\u2029y\u2029>>\u2029z\u2029"); if (x !== 2) { $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029>>\\u2029z\\u2029"); x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch07/7.3/S7.3_A7_T7.js b/test/suite/ch07/7.3/S7.3_A7_T7.js index 510b958c42..1112a51bf3 100644 --- a/test/suite/ch07/7.3/S7.3_A7_T7.js +++ b/test/suite/ch07/7.3/S7.3_A7_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminators between operators are allowed - * - * @path ch07/7.3/S7.3_A7_T7.js - * @description Insert Line Terminator in var x=y< + Insert Multi line comment with two closed tags into Single line + comment +---*/ /*CHECK#1*/ // var /* x / = */ 1 */ - diff --git a/test/suite/ch07/7.4/S7.4_A4_T7.js b/test/suite/ch07/7.4/S7.4_A4_T7.js index a58aa7d5df..cb5a14c3b5 100644 --- a/test/suite/ch07/7.4/S7.4_A4_T7.js +++ b/test/suite/ch07/7.4/S7.4_A4_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single and Multi line comments are used together - * - * @path ch07/7.4/S7.4_A4_T7.js - * @description Insert Multi line comment into Single line comments - */ +/*--- +info: Single and Multi line comments are used together +es5id: 7.4_A4_T7 +description: Insert Multi line comment into Single line comments +---*/ /*CHECK#1*/ @@ -14,4 +13,3 @@ // x // = // 1*/ - diff --git a/test/suite/ch07/7.4/S7.4_A5.js b/test/suite/ch07/7.4/S7.4_A5.js index bbdba29de3..272ba65a92 100644 --- a/test/suite/ch07/7.4/S7.4_A5.js +++ b/test/suite/ch07/7.4/S7.4_A5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Single line comments can contain any Unicode character without Line Terminators - * - * @path ch07/7.4/S7.4_A5.js - * @description //var " + xx + "yy = -1", insert instead of xx all Unicode characters - */ +/*--- +info: > + Single line comments can contain any Unicode character without Line + Terminators +es5id: 7.4_A5 +description: > + //var " + xx + "yy = -1", insert instead of xx all Unicode + characters +---*/ //CHECK var errorCount = 0; @@ -46,4 +49,3 @@ for (var i1 = 0; i1 < 16; i1++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count); } - diff --git a/test/suite/ch07/7.4/S7.4_A6.js b/test/suite/ch07/7.4/S7.4_A6.js index c51790aebe..b38a5f9fa7 100644 --- a/test/suite/ch07/7.4/S7.4_A6.js +++ b/test/suite/ch07/7.4/S7.4_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If multi line comments csn not nest, they can contain any Unicode character - * - * @path ch07/7.4/S7.4_A6.js - * @description "var"+ yy+ "xx = 1", insert instead of yy all Unicode characters - */ +/*--- +info: > + If multi line comments csn not nest, they can contain any Unicode + character +es5id: 7.4_A6 +description: "\"var\"+ yy+ \"xx = 1\", insert instead of yy all Unicode characters" +---*/ //CHECK var errorCount = 0; @@ -54,4 +55,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch07/7.6/7.6-1.js b/test/suite/ch07/7.6/7.6-1.js index b4bc373263..2e880a7f9e 100644 --- a/test/suite/ch07/7.6/7.6-1.js +++ b/test/suite/ch07/7.6/7.6-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-1.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: null (null) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-1 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: null (null) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u006eull = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-10.js b/test/suite/ch07/7.6/7.6-10.js index 36e6ea6997..f71bfef999 100644 --- a/test/suite/ch07/7.6/7.6-10.js +++ b/test/suite/ch07/7.6/7.6-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-10.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: new (new) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-10 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: new (new) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var n\u0065w = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-11.js b/test/suite/ch07/7.6/7.6-11.js index 4e5fee3bee..0c11b293dc 100644 --- a/test/suite/ch07/7.6/7.6-11.js +++ b/test/suite/ch07/7.6/7.6-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-11.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: var (var) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-11 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: var (var) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var va\u0072 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-12.js b/test/suite/ch07/7.6/7.6-12.js index 3d939c8a98..cade0f5add 100644 --- a/test/suite/ch07/7.6/7.6-12.js +++ b/test/suite/ch07/7.6/7.6-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-12.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: try (try) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-12 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: try (try) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0074\u0072\u0079 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-13.js b/test/suite/ch07/7.6/7.6-13.js index bde18e0996..0edd7bdd27 100644 --- a/test/suite/ch07/7.6/7.6-13.js +++ b/test/suite/ch07/7.6/7.6-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-13.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: catch (catch) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-13 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: catch (catch) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0063atch = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-14.js b/test/suite/ch07/7.6/7.6-14.js index d9c6d794f3..48d3d1f2b5 100644 --- a/test/suite/ch07/7.6/7.6-14.js +++ b/test/suite/ch07/7.6/7.6-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-14.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: finally (finally) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-14 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: finally (finally) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var fina\u006cly = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-15.js b/test/suite/ch07/7.6/7.6-15.js index b2f0347608..48a73cf5ff 100644 --- a/test/suite/ch07/7.6/7.6-15.js +++ b/test/suite/ch07/7.6/7.6-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-15.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: return (return) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-15 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: return (return) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var retur\u006e = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-16.js b/test/suite/ch07/7.6/7.6-16.js index ba98c547bf..e035ec762b 100644 --- a/test/suite/ch07/7.6/7.6-16.js +++ b/test/suite/ch07/7.6/7.6-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-16.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: void (void) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-16 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: void (void) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0076\u006f\u0069\u0064 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-17.js b/test/suite/ch07/7.6/7.6-17.js index 93a309cbde..b84fcdec2c 100644 --- a/test/suite/ch07/7.6/7.6-17.js +++ b/test/suite/ch07/7.6/7.6-17.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-17.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: continue (continue) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-17 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: continue (continue) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0063ontinue = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-18.js b/test/suite/ch07/7.6/7.6-18.js index aba469e602..8dd3558977 100644 --- a/test/suite/ch07/7.6/7.6-18.js +++ b/test/suite/ch07/7.6/7.6-18.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-18.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: for (for) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-18 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: for (for) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var f\u006fr = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-19.js b/test/suite/ch07/7.6/7.6-19.js index b6df7be44a..2cc61b4ddc 100644 --- a/test/suite/ch07/7.6/7.6-19.js +++ b/test/suite/ch07/7.6/7.6-19.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-19.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: switch (switch) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-19 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: switch (switch) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var switc\u0068 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-2.js b/test/suite/ch07/7.6/7.6-2.js index c6ecd71729..48ef2d1cff 100644 --- a/test/suite/ch07/7.6/7.6-2.js +++ b/test/suite/ch07/7.6/7.6-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-2.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: true (true) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-2 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: true (true) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var tr\u0075e = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-20.js b/test/suite/ch07/7.6/7.6-20.js index 1eefcf064e..55269c90f1 100644 --- a/test/suite/ch07/7.6/7.6-20.js +++ b/test/suite/ch07/7.6/7.6-20.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-20.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: while (while) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-20 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: while (while) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0077\u0068\u0069\u006c\u0065 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-21.js b/test/suite/ch07/7.6/7.6-21.js index c1cc483ece..0086e5de21 100644 --- a/test/suite/ch07/7.6/7.6-21.js +++ b/test/suite/ch07/7.6/7.6-21.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-21.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: debugger (debugger) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-21 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: debugger (debugger) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0064ebugger = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-22.js b/test/suite/ch07/7.6/7.6-22.js index a050ca9894..f2d6faa371 100644 --- a/test/suite/ch07/7.6/7.6-22.js +++ b/test/suite/ch07/7.6/7.6-22.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-22.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: function (function) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-22 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: function (function) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var func\u0074ion = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-23.js b/test/suite/ch07/7.6/7.6-23.js index df98f3815a..7214daa065 100644 --- a/test/suite/ch07/7.6/7.6-23.js +++ b/test/suite/ch07/7.6/7.6-23.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-23.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: this (this) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-23 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: this (this) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var thi\u0073 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-24.js b/test/suite/ch07/7.6/7.6-24.js index d5773ebf2d..bcc94ee405 100644 --- a/test/suite/ch07/7.6/7.6-24.js +++ b/test/suite/ch07/7.6/7.6-24.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-24.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: if (if) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-24 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: if (if) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0069\u0066 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-25.js b/test/suite/ch07/7.6/7.6-25.js index ff25f3e022..c0392ccc4b 100644 --- a/test/suite/ch07/7.6/7.6-25.js +++ b/test/suite/ch07/7.6/7.6-25.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-25.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: with (with) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-25 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: with (with) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0077ith = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-26.js b/test/suite/ch07/7.6/7.6-26.js index c740431cba..ebe6f65cf1 100644 --- a/test/suite/ch07/7.6/7.6-26.js +++ b/test/suite/ch07/7.6/7.6-26.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-26.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: default (default) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-26 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: default (default) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var def\u0061ult = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-27.js b/test/suite/ch07/7.6/7.6-27.js index e51bb26d8e..2a5843db32 100644 --- a/test/suite/ch07/7.6/7.6-27.js +++ b/test/suite/ch07/7.6/7.6-27.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-27.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: throw (throw) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-27 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: throw (throw) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var thro\u0077 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-28.js b/test/suite/ch07/7.6/7.6-28.js index 8f4dd26cf2..2e76d06268 100644 --- a/test/suite/ch07/7.6/7.6-28.js +++ b/test/suite/ch07/7.6/7.6-28.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-28.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: in (in) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-28 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: in (in) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0069\u006e = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-29.js b/test/suite/ch07/7.6/7.6-29.js index 9e97c02ba8..69aea9c9f1 100644 --- a/test/suite/ch07/7.6/7.6-29.js +++ b/test/suite/ch07/7.6/7.6-29.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-29.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: delete (delete) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-29 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: delete (delete) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0064elete = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-3.js b/test/suite/ch07/7.6/7.6-3.js index d143570422..62f96c3dcd 100644 --- a/test/suite/ch07/7.6/7.6-3.js +++ b/test/suite/ch07/7.6/7.6-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-3.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: false (false) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-3 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: false (false) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var fals\u0065 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-30.js b/test/suite/ch07/7.6/7.6-30.js index 6e4af63b4a..f0b0db6520 100644 --- a/test/suite/ch07/7.6/7.6-30.js +++ b/test/suite/ch07/7.6/7.6-30.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-30.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: class (class) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-30 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: class (class) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var cla\u0073s = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-31.js b/test/suite/ch07/7.6/7.6-31.js index c9fb1089ef..82e42ed75d 100644 --- a/test/suite/ch07/7.6/7.6-31.js +++ b/test/suite/ch07/7.6/7.6-31.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-31.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: extends (extends) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-31 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: extends (extends) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var extend\u0073 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-32.js b/test/suite/ch07/7.6/7.6-32.js index 86ea96417c..702fb37af6 100644 --- a/test/suite/ch07/7.6/7.6-32.js +++ b/test/suite/ch07/7.6/7.6-32.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-32.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: enum (enum) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-32 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: enum (enum) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0065\u006e\u0075\u006d = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-33.js b/test/suite/ch07/7.6/7.6-33.js index 3d6c8dbe37..8966b033da 100644 --- a/test/suite/ch07/7.6/7.6-33.js +++ b/test/suite/ch07/7.6/7.6-33.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-33.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: super (super) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-33 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: super (super) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0073uper = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-34.js b/test/suite/ch07/7.6/7.6-34.js index 391fa0191e..e717ab6906 100644 --- a/test/suite/ch07/7.6/7.6-34.js +++ b/test/suite/ch07/7.6/7.6-34.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-34.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: const (const) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-34 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: const (const) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var co\u006est = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-35.js b/test/suite/ch07/7.6/7.6-35.js index 5a729ad00e..c76d210f13 100644 --- a/test/suite/ch07/7.6/7.6-35.js +++ b/test/suite/ch07/7.6/7.6-35.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-35.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: export (export) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-35 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: export (export) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var expor\u0074 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-36.js b/test/suite/ch07/7.6/7.6-36.js index afc680a0e4..bddefcc214 100644 --- a/test/suite/ch07/7.6/7.6-36.js +++ b/test/suite/ch07/7.6/7.6-36.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-36.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: import (import) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-36 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: import (import) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0069\u006d\u0070\u006f\u0072\u0074 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-4.js b/test/suite/ch07/7.6/7.6-4.js index b621b8d7eb..07f6c763ee 100644 --- a/test/suite/ch07/7.6/7.6-4.js +++ b/test/suite/ch07/7.6/7.6-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-4.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: break (break) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-4 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: break (break) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0062\u0072\u0065\u0061\u006b = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-5.js b/test/suite/ch07/7.6/7.6-5.js index 5889b2fc60..abd717b0ce 100644 --- a/test/suite/ch07/7.6/7.6-5.js +++ b/test/suite/ch07/7.6/7.6-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-5.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: case (case) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-5 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: case (case) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0063ase = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-6.js b/test/suite/ch07/7.6/7.6-6.js index d70805344d..e453cde819 100644 --- a/test/suite/ch07/7.6/7.6-6.js +++ b/test/suite/ch07/7.6/7.6-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-6.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: instanceof (instanceof) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-6 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: instanceof (instanceof) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var insta\u006eceof = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-7.js b/test/suite/ch07/7.6/7.6-7.js index f388e1302d..688c56c67c 100644 --- a/test/suite/ch07/7.6/7.6-7.js +++ b/test/suite/ch07/7.6/7.6-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-7.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: typeof (typeof) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-7 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: typeof (typeof) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var typeo\u0066 = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-8.js b/test/suite/ch07/7.6/7.6-8.js index ab4f259787..cbc63f1c29 100644 --- a/test/suite/ch07/7.6/7.6-8.js +++ b/test/suite/ch07/7.6/7.6-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-8.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: do (do) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-8 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: do (do) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0064\u006f = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6-9.js b/test/suite/ch07/7.6/7.6-9.js index 2e9f07b03e..ffb6b9ec4c 100644 --- a/test/suite/ch07/7.6/7.6-9.js +++ b/test/suite/ch07/7.6/7.6-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6-9.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: else (else) (null) - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6-9 +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: else (else) (null) +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var \u0065lse = 123;"); @@ -17,4 +20,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-1.js index 20be0698f2..6fb3c06a85 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-1.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-1 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: null, true, false +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { null: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-10.js index 08f1d0026b..f21b2759a1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-10.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-10 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: in, try, class +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { in: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-11.js index 6875887d91..03d1203943 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-11.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-11 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { enum: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-12.js index 52940898d9..f3445accd4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-12.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-12 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: const, export, import +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { const: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-13.js index d355436291..8ec8707ecc 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-13.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-13 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { implements: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-14.js index 6d9270d3ea..97c690604f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-14.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-14 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { public: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-15.js index 4585126a0d..dd1af2e90a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-15.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-15 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { package: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-16.js index 20b61eccf9..cc82ef8d50 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-16.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: undeefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-16 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: undeefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { undefined: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-2.js index 8b0ca79eac..f95c9a6475 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-2.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-2 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: break, case, do +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { break: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-3.js index 5254fdfa33..d167c90756 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-3.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-3 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { instanceof: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-4.js index 5391b5be88..a26c1dd943 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-4.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-4 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { new: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-5.js index cc65a2bd2d..d0b7bce835 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-5.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-5 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { finally: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-6.js index 157b2fec99..e35bea6d43 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-6.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-6 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { continue: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-7.js index 227e58d5ae..f8f4041d34 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-7.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-7 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { while: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-8.js index 0045ead1d1..fa811abf83 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-8.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-8 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: this, with, default +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { this: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-1-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-1-9.js index 285d14ec91..20c7afe167 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-1-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-1-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-1-9.js - * @description Allow reserved words as property names at object initialization, verified with hasOwnProperty: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-1-9 +description: > + Allow reserved words as property names at object initialization, + verified with hasOwnProperty: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase(){ var tokenCodes = { if: 0, @@ -31,4 +34,4 @@ function testcase(){ } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-1.js index d652a22a4f..3ad565fffa 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-1.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-1 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.null = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-10.js index 2d8ed66f18..d981465e8a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-10.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-10 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.in = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-11.js index 2185f2de0b..089ecf6477 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-11.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-11 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.enum = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-12.js index 622ec90675..dc8b91a635 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-12.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-12 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.const = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-13.js index 169cbc798c..eb5d323c8a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-13.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-13 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.implements = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-14.js index 3343b2670d..fecef9bc9a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-14.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-14 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.public = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-15.js index ce04d29001..339109027e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-15.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-15 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.package = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-16.js index e078859fcd..a95446ec22 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-16.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-16 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.undefined = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-2.js index 3a8997852c..2644f305fb 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-2.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-2 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.break = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-3.js index 30e4bc139a..b966f26e6b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-3.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-3 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.instanceof = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-4.js index 0d43d0373f..4a4fe1b737 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-4.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-4 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.new = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-5.js index 542175c028..6499d19da9 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-5.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-5 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.finally = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-6.js index 20a949a700..097394a40d 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-6.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-6 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.continue = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-7.js index 83f5264688..11494a835c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-7.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-7 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.while = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-8.js index 62e39d18ae..1f5e8b73d1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-8.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-8 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.this = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-2-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-2-9.js index 99678952fa..3d34bb500d 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-2-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-2-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-2-9.js - * @description Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-2-9 +description: > + Allow reserved words as property names by dot operator assignment, + verified with hasOwnProperty: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.if = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-1.js index 7f890eb5de..3b782d3d9e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-1.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-1 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['null'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-10.js index 83dddc14eb..5967f0fa5e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-10.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-10 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['in'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-11.js index 4b1f58b419..80edde4a65 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-11.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-11 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['enum'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-12.js index 72cc76dbea..8ed5a86298 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-12.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-12 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['const'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-13.js index 6bd5573578..f20b1c2401 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-13.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-13 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['implements'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-14.js index b70990d6ca..78a2337c27 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-14.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-14 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['public'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-15.js index f5b7664b8e..68d0a87814 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-15.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-15 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['package'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-16.js index afd96393ce..7e67559fa4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-16.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-16 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['undefined'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-2.js index 351e263928..6d6932c335 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-2.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-2 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['break'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-3.js index c756355fe1..981148beb1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-3.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-3 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['instanceof'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-4.js index 15de6619b1..e86cd15c2c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-4.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-4 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['new'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-5.js index cae2bb6e69..ad215b448b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-5.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-5 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['finally'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-6.js index 4520722953..c413a5c559 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-6.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-6 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['continue'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-7.js index 15092a0cfc..ae8b3e1368 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-7.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-7 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['while'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-8.js index 19db5267f0..355d5e70f9 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-8.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-8 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['this'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-3-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-3-9.js index 856cdb1043..8b9ec7e998 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-3-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-3-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-3-9.js - * @description Allow reserved words as property names by index assignment,verified with hasOwnProperty: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-3-9 +description: > + Allow reserved words as property names by index + assignment,verified with hasOwnProperty: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['if'] = 0; @@ -30,4 +33,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-1.js index 8f81d173cd..2611dc6919 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-1.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-1 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-10.js index ae2445a25e..c20f7c9074 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-10.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-10 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-11.js index 081d811700..bcf2bb57c9 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-11.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-11 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-12.js index 3c16683f7a..8aff0d8c13 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-12.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-12 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-13.js index 47dd6e2661..acf825f72c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-13.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-13 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-14.js index 0d1e1aa4ff..4cd3025172 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-14.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-14 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-15.js index 111f007062..785aa32c99 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-15.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-15 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-16.js index 0edafa8e31..6315c3312a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-16.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-16 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-2.js index 8569c9ceaa..07f3f8e4c0 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-2.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-2 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-3.js index 3ef8ea7aa5..bbaa9fbf8f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-3.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-3 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-4.js index afb165ed1d..f25dde2a9a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-4.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-4 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-5.js index e4c6badaea..de075888fc 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-5.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-5 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-6.js index f240ded36c..d00c3ade2b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-6.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-6 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-7.js index 6134976c82..cfac46dd32 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-7.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-7 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-8.js index a027cf608c..d9006e9c41 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-8.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-8 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-4-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-4-9.js index 1828b0d9ac..b0276dcee3 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-4-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-4-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-4-9.js - * @description Allow reserved words as property names by set function within an object, verified with hasOwnProperty: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-4-9 +description: > + Allow reserved words as property names by set function within an + object, verified with hasOwnProperty: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -47,4 +50,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-1.js index 88eb2869f8..4081f75274 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-1.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-1 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { null: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-10.js index a00ce70961..73f22a4af5 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-10.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-10 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { in: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-11.js index 7a3a3af0c1..54565235e3 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-11.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-11 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { enum: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-12.js index b2b7645f58..30d5c7b735 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-12.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-12 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { const : 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-13.js index a7b03b95cf..65d19e7348 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-13.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-13 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { implements: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-14.js index f24467c8fc..3870611182 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-14.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-14 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { public: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-15.js index 498e5e7d5e..fc75f0672e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-15.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-15 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { package: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-16.js index 8bf471549a..75b63535ce 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-16.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-16 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { undefined: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-2.js index 79ccb65b92..877c32bfce 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-2.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-2 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { break: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-3.js index 643fce68f7..436b9cefa5 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-3.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-3 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { instanceof: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-4.js index 8080248a22..3d75800793 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-4.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-4 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { new: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-5.js index bb3280732f..4baaf06784 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-5.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-5 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { finally: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-6.js index c9dc5a1468..fc7cb83526 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-6.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-6 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { continue: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-7.js index a0a5a977bb..aeeef4a933 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-7.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-7 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { while: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-8.js index d659f6acd6..9fab877eac 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-8.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-8 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { this: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-5-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-5-9.js index 6e21dfd782..ab43011b00 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-5-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-5-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-5-9.js - * @description Allow reserved words as property names at object initialization, accessed via indexing: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-5-9 +description: > + Allow reserved words as property names at object initialization, + accessed via indexing: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = { if: 0, @@ -27,4 +30,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-1.js index b2c98910a9..5c9d6317da 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-1.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-1 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.null = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-10.js index 3099c4abca..4e04e2f56e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-10.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-10 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.in = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-11.js index 9fda29ca44..8c705a9b21 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-11.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-11 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.enum = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-12.js index 7cfb6643aa..db74c64eec 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-12.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-12 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.const = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-13.js index ff4bf38cfe..1c2cfb4c88 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-13.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-13 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.implements = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-14.js index 4bea56fe5e..f937d9f15c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-14.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-14 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.public = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-15.js index 0021da41bc..422a354593 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-15.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-15 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.package = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-16.js index bc98a8a5f1..de6edf6364 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-16.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-16 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.undefined = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-2.js index 65c06c957f..ecbf70b68f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-2.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-2 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.break = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-3.js index b403a3efe4..50514e9a51 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-3.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-3 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.instanceof = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-4.js index cbe85b25e2..e651c370dd 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-4.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-4 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.new = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-5.js index 5d2e1b6f65..5bee4a5f13 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-5.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-5 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.finally = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-6.js index df407917b9..b4d861804a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-6.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-6 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.continue = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-7.js index 1c4ca549ca..5a4741124c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-7.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-7 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.while = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-8.js index 945eecf735..30b5a36d1d 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-8.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-8 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.this = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-6-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-6-9.js index ae8bbbcd2c..aab1f58592 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-6-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-6-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-6-9.js - * @description Allow reserved words as property names by dot operator assignment, accessed via indexing: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-6-9 +description: > + Allow reserved words as property names by dot operator assignment, + accessed via indexing: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes.if = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-1.js index 060d98cb9d..c138b5b92d 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-1.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-1 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['null'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-10.js index 22a2e32fb4..0e2f1a6865 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-10.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-10 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['in'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-11.js index 0c01763997..d6ba3ac49b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-11.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-11 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['enum'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-12.js index 56eb9d318e..80eaf39fe5 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-12.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-12 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['const'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-13.js index fd8beb9a21..68c3d25ea2 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-13.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-13 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['implements'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-14.js index 295abc5d12..182e59930b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-14.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-14 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['public'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-15.js index 5c95f6db63..af908af194 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-15.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-15 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['package'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-16.js index f8146c5ab9..19a24b198a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-16.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-16 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['undefined'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-2.js index 62df8ea1d5..8cd52078f3 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-2.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-2 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['break'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-3.js index 772c108b4a..9579d5b3d7 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-3.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-3 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['instanceof'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-4.js index 99d7868b96..9a59b0abe4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-4.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-4 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['new'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-5.js index 3543e4f250..d394c68d9a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-5.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-5 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['finally'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-6.js index 652fc97d70..6cd761545e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-6.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-6 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['continue'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-7.js index 1605d5d0bc..d73a13d40e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-7.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-7 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['while'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-8.js index eab4c423a2..318b732b10 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-8.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-8 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['this'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-7-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-7-9.js index 9f018dfa62..63c94247a0 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-7-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-7-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-7-9.js - * @description Allow reserved words as property names by index assignment, accessed via indexing: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-7-9 +description: > + Allow reserved words as property names by index assignment, + accessed via indexing: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var tokenCodes = {}; tokenCodes['if'] = 0; @@ -26,4 +29,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-1.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-1.js index 7d816111d9..034e485110 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-1.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-1.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: null, true, false - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-1 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: null, true, false +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-10.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-10.js index 3b48de4435..d96e22e9c9 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-10.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-10.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: in, try, class - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-10 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: in, try, class +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-11.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-11.js index ff92952e18..14ec3826ef 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-11.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-11.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: enum, extends, super - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-11 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: enum, extends, super +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-12.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-12.js index 2a4a1d1706..c09b54aefa 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-12.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-12.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: const, export, import - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-12 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: const, export, import +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-13.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-13.js index a2f46d5702..20dbf3a0bb 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-13.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-13.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: implements, let, private - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-13 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: implements, let, private +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-14.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-14.js index 393ae46b0f..3077b65bfc 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-14.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-14.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: public, yield, interface - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-14 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: public, yield, interface +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-15.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-15.js index 81d5f4b7f5..671f66112b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-15.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-15.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: package, protected, static - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-15 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: package, protected, static +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-16.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-16.js index 91ff6b9c89..a02ae1cd05 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-16.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-16.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: undefined, NaN, Infinity - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-16 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: undefined, NaN, Infinity +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-2.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-2.js index 9af6009381..86012a2731 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-2.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-2.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: break, case, do - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-2 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: break, case, do +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-3.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-3.js index b26b4d0209..64dfc89f7a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-3.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-3.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: instanceof, typeof, else - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-3 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: instanceof, typeof, else +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-4.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-4.js index b8de254528..633700ca95 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-4.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-4.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: new, var, catch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-4 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: new, var, catch +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-5.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-5.js index 26d5f3aac1..fada146b02 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-5.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-5.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: finally, return, void - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-5 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: finally, return, void +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-6.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-6.js index 4b5f217f41..ffad982c78 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-6.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-6.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: continue, for, switch - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-6 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: continue, for, switch +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-7.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-7.js index 58555e62ea..6e184c7d82 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-7.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-7.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: while, debugger, function - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-7 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: while, debugger, function +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-8.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-8.js index c6c39dd22a..cb6a00a27e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-8.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-8.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: this, with, default - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-8 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: this, with, default +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1-8-9.js b/test/suite/ch07/7.6/7.6.1/7.6.1-8-9.js index f61ec565bd..d6164e18ed 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1-8-9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1-8-9.js @@ -1,14 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1-8-9.js - * @description Allow reserved words as property names by set function within an object, accessed via indexing: if, throw, delete - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-8-9 +description: > + Allow reserved words as property names by set function within an + object, accessed via indexing: if, throw, delete +includes: [runTestCase.js] +---*/ + function testcase() { var test0 = 0, test1 = 1, test2 = 2; var tokenCodes = { @@ -43,4 +46,4 @@ function testcase() { } return true; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js index 89653b5cdc..f9e5ffb782 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "break" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.1.js - * @description Checking if execution of "break=1" fails - * @negative - */ +/*--- +info: The "break" token can not be used as identifier +es5id: 7.6.1.1_A1.1 +description: Checking if execution of "break=1" fails +flags: [negative] +---*/ break = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js index 0511807b6c..247cff6c71 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "for" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.10.js - * @description Checking if execution of "for=1" fails - * @negative - */ +/*--- +info: The "for" token can not be used as identifier +es5id: 7.6.1.1_A1.10 +description: Checking if execution of "for=1" fails +flags: [negative] +---*/ for = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js index 39d4b7efab..bca8904815 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "function" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.11.js - * @description Checking if execution of "function=1" fails - * @negative - */ +/*--- +info: The "function" token can not be used as identifier +es5id: 7.6.1.1_A1.11 +description: Checking if execution of "function=1" fails +flags: [negative] +---*/ function = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js index 43433a6b52..5fc1157bc1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "if" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.12.js - * @description Checking if execution of "if=1" fails - * @negative - */ +/*--- +info: The "if" token can not be used as identifier +es5id: 7.6.1.1_A1.12 +description: Checking if execution of "if=1" fails +flags: [negative] +---*/ if = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js index 2e52df961b..bf2c822373 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "in" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.13.js - * @description Checking if execution of "in=1" fails - * @negative - */ +/*--- +info: The "in" token can not be used as identifier +es5id: 7.6.1.1_A1.13 +description: Checking if execution of "in=1" fails +flags: [negative] +---*/ in = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js index 5867436c73..34e64144c3 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "instanceof" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.14.js - * @description Checking if execution of "instanceof=1" fails - * @negative - */ +/*--- +info: The "instanceof" token can not be used as identifier +es5id: 7.6.1.1_A1.14 +description: Checking if execution of "instanceof=1" fails +flags: [negative] +---*/ instanceof = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js index 56ec3af72b..57df440349 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "new" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.15.js - * @description Checking if execution of "new=1" fails - * @negative - */ +/*--- +info: The "new" token can not be used as identifier +es5id: 7.6.1.1_A1.15 +description: Checking if execution of "new=1" fails +flags: [negative] +---*/ new = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js index 7f6a21a7c8..f73677136a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "return" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.16.js - * @description Checking if execution of "return=1" fails - * @negative - */ +/*--- +info: The "return" token can not be used as identifier +es5id: 7.6.1.1_A1.16 +description: Checking if execution of "return=1" fails +flags: [negative] +---*/ return = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js index 34024b4d4d..68bbcf7447 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "switch" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.17.js - * @description Checking if execution of "switch=1" fails - * @negative - */ +/*--- +info: The "switch" token can not be used as identifier +es5id: 7.6.1.1_A1.17 +description: Checking if execution of "switch=1" fails +flags: [negative] +---*/ switch = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js index 6068789b66..3f531cd410 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "this" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.18.js - * @description Checking if execution of "this=1" fails - * @negative - */ +/*--- +info: The "this" token can not be used as identifier +es5id: 7.6.1.1_A1.18 +description: Checking if execution of "this=1" fails +flags: [negative] +---*/ this = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js index bb5ce8b7dc..a898256018 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "throw" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.19.js - * @description Checking if execution of "throw=1" fails - * @negative - */ +/*--- +info: The "throw" token can not be used as identifier +es5id: 7.6.1.1_A1.19 +description: Checking if execution of "throw=1" fails +flags: [negative] +---*/ throw = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js index fa0b3a8fdf..9916fa0f1e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "case" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.2.js - * @description Checking if execution of "case=1" fails - * @negative - */ +/*--- +info: The "case" token can not be used as identifier +es5id: 7.6.1.1_A1.2 +description: Checking if execution of "case=1" fails +flags: [negative] +---*/ case = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js index 62ce326f6d..fea685b816 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "try" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.20.js - * @description Checking if execution of "try=1" fails - * @negative - */ +/*--- +info: The "try" token can not be used as identifier +es5id: 7.6.1.1_A1.20 +description: Checking if execution of "try=1" fails +flags: [negative] +---*/ try = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js index d2aeca3fca..91535f9f29 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "typeof" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.21.js - * @description Checking if execution of "typeof=1" fails - * @negative - */ +/*--- +info: The "typeof" token can not be used as identifier +es5id: 7.6.1.1_A1.21 +description: Checking if execution of "typeof=1" fails +flags: [negative] +---*/ typeof = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js index 2530ab8e74..a9c6eb3bed 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "var" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.22.js - * @description Checking if execution of "var=1" fails - * @negative - */ +/*--- +info: The "var" token can not be used as identifier +es5id: 7.6.1.1_A1.22 +description: Checking if execution of "var=1" fails +flags: [negative] +---*/ var = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js index 61f99bce17..0bbce995e4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "void" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.23.js - * @description Checking if execution of "void=1" fails - * @negative - */ +/*--- +info: The "void" token can not be used as identifier +es5id: 7.6.1.1_A1.23 +description: Checking if execution of "void=1" fails +flags: [negative] +---*/ void = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js index 8c6c2816d6..8d3aa5e2bf 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "while" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.24.js - * @description Checking if execution of "while=1" fails - * @negative - */ +/*--- +info: The "while" token can not be used as identifier +es5id: 7.6.1.1_A1.24 +description: Checking if execution of "while=1" fails +flags: [negative] +---*/ while = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js index 15a7745b1c..c71a36033e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "with" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.25.js - * @description Checking if execution of "with=1" fails - * @negative - */ +/*--- +info: The "with" token can not be used as identifier +es5id: 7.6.1.1_A1.25 +description: Checking if execution of "with=1" fails +flags: [negative] +---*/ with = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js index f69193845f..8f2bbad205 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "catch" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.3.js - * @description Checking if execution of "catch=1" fails - * @negative - */ +/*--- +info: The "catch" token can not be used as identifier +es5id: 7.6.1.1_A1.3 +description: Checking if execution of "catch=1" fails +flags: [negative] +---*/ catch = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js index 86c02078d4..ee61da986f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "continue" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.4.js - * @description Checking if execution of "contunue=1" fails - * @negative - */ +/*--- +info: The "continue" token can not be used as identifier +es5id: 7.6.1.1_A1.4 +description: Checking if execution of "contunue=1" fails +flags: [negative] +---*/ continue = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js index 52ad11b46c..376ca18090 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "default" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.5.js - * @description Checking if execution of "default=1" fails - * @negative - */ +/*--- +info: The "default" token can not be used as identifier +es5id: 7.6.1.1_A1.5 +description: Checking if execution of "default=1" fails +flags: [negative] +---*/ default = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js index b6c24d8bfe..cc1f1aec5b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "delete" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.6.js - * @description Checking if execution of "delete=1" fails - * @negative - */ +/*--- +info: The "delete" token can not be used as identifier +es5id: 7.6.1.1_A1.6 +description: Checking if execution of "delete=1" fails +flags: [negative] +---*/ delete = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js index bce1d54ec4..857f0ed41f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "do" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.7.js - * @description Checking if execution of "do=1" fails - * @negative - */ +/*--- +info: The "do" token can not be used as identifier +es5id: 7.6.1.1_A1.7 +description: Checking if execution of "do=1" fails +flags: [negative] +---*/ do = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js index b51909070f..14197fc756 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "else" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.8.js - * @description Checking if execution of "else=1" fails - * @negative - */ +/*--- +info: The "else" token can not be used as identifier +es5id: 7.6.1.1_A1.8 +description: Checking if execution of "else=1" fails +flags: [negative] +---*/ else = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js index cea582656c..8ea4a785b2 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "finally" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.1/S7.6.1.1_A1.9.js - * @description Checking if execution of "finally=1" fails - * @negative - */ +/*--- +info: The "finally" token can not be used as identifier +es5id: 7.6.1.1_A1.9 +description: Checking if execution of "finally=1" fails +flags: [negative] +---*/ finally = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2-1gs.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2-1gs.js index b76c692e7b..bfa17e26c1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2-1gs.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2-1gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch07/7.6/7.6.1/7.6.1.2-1gs.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'implements' occurs in strict mode code - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-1gs +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'implements' occurs in strict mode code +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + "use strict"; throw NotEarlyError; -var implements = 1; +var implements = 1; diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js index 99014065a4..2a9b1626a9 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: implements (implements) - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-17-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: implements (implements) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -20,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js index 3327995db0..45496dfb04 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-18-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: l\u0065t (let) - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-18-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: l\u0065t (let) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -20,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js index 14a5183d88..924b9c2ac4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-19-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: privat\u0065 (private) - * @onlyStrict - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-19-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: privat\u0065 (private) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -19,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js index 846805b69b..175837fb73 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-20-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public) - * @onlyStrict - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-20-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: \u0070\u0075\u0062\u006c\u0069\u0063 (public) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -19,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js index f0536eac32..0617e786b7 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-21-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0079ield (yield) - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-21-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: \u0079ield (yield) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js index 5eb6d1ec69..7106e6a879 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-22-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: inte\u0072face (interface) - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-22-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: inte\u0072face (interface) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js index db11bad05d..20b51647d0 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-23-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: packag\u0065 (package) - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-23-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: packag\u0065 (package) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js index f2c7e9f90b..da966b50a0 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-24-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected) - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-24-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: + \u0070\u0072\u006f\u0074\u0065\u0063\u0074\u0065\u0064 (protected) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +24,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js index b6ca63f82e..65547327e4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1-25-s.js - * @description 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static) - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1-25-s +description: > + 7.6 - SyntaxError expected: reserved words used as Identifier + Names in UTF8: \u0073\u0074\u0061\u0074\u0069\u0063 (static) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js index 3c34bc7cb0..535fa84680 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'implements' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-1-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'implements' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -20,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js index 8c5004d912..bd297e6ea5 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js - * @description Strict Mode - SyntaxError isn't thrown when 'IMPLEMENTS' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-10-s +description: > + Strict Mode - SyntaxError isn't thrown when 'IMPLEMENTS' occurs in + strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; var IMPLEMENTS = 1; return IMPLEMENTS === 1; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js index 34a0178549..0ca15ca118 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js - * @description Strict Mode - SyntaxError isn't thrown when 'Implements' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-11-s +description: > + Strict Mode - SyntaxError isn't thrown when 'Implements' occurs in + strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; var Implements = 1; return Implements === 1; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js index 14796c1645..05a4b9ee9e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js - * @description Strict Mode - SyntaxError isn't thrown when 'implement' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-12-s +description: > + Strict Mode - SyntaxError isn't thrown when 'implement' occurs in + strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; var implement = 1; return implement === 1; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js index 4513e1222e..f8b40c539b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js - * @description Strict Mode - SyntaxError isn't thrown when 'implementss' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-13-s +description: > + Strict Mode - SyntaxError isn't thrown when 'implementss' occurs + in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; var implementss = 1; return implementss === 1; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js index 4863705c04..6d7d483c9c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js - * @description Strict Mode - SyntaxError isn't thrown when 'implements0' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-14-s +description: > + Strict Mode - SyntaxError isn't thrown when 'implements0' occurs + in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; var implements0 = 1; return implements0 === 1; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js index 16f6bc1914..ea53e9172a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js - * @description Strict Mode - SyntaxError isn't thrown when '_implements' occurs in strict mode code - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-16-s +description: > + Strict Mode - SyntaxError isn't thrown when '_implements' occurs + in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; var _implements = 1; return _implements === 1; } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js index 9f922e41de..eabb5de727 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-2-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'let' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-2-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord 'let' + occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js index 77530dd7bb..f760630518 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-3-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'private' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-3-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'private' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js index 6f021380b2..e9fca1dc09 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-4-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'public' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-4-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'public' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js index f6a798385d..89c843b65e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-5-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'yield' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-5-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'yield' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js index 3e1e35ccde..f4bb2215c1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-6-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'interface' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-6-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'interface' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js index 6d2487376d..5564542e8f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-7-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'package' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-7-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'package' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js index 8e2f8e8fef..49e7685fad 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-8-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'protected' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-8-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'protected' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js index 6e5ebfd211..df3b46afba 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.6/7.6.1/7.6.1.2/7.6.1.2-9-s.js - * @description Strict Mode - SyntaxError is thrown when FutureReservedWord 'static' occurs in strict mode code - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.6.1.2-9-s +description: > + Strict Mode - SyntaxError is thrown when FutureReservedWord + 'static' occurs in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; @@ -22,4 +23,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js index 4b7573d26e..8e7406158a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "abstract" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.1.js - * @description Checking if execution of "abstract=1" succeeds - */ +/*--- +info: The "abstract" token can be used as identifier +es5id: 7.6.1.2_A1.1 +description: Checking if execution of "abstract=1" succeeds +---*/ var abstract = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js index d255891bbe..627eef99e1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "export" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.10.js - * @description Checking if execution of "export=1" fails - * @negative - */ +/*--- +info: The "export" token can not be used as identifier +es5id: 7.6.1.2_A1.10 +description: Checking if execution of "export=1" fails +flags: [negative] +---*/ var export = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js index f95dbf77ed..8ed1aca792 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "extends" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.11.js - * @description Checking if execution of "extends=1" fails - * @negative - */ +/*--- +info: The "extends" token can not be used as identifier +es5id: 7.6.1.2_A1.11 +description: Checking if execution of "extends=1" fails +flags: [negative] +---*/ var extends = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js index 41d1a2aa37..9b97734be4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "final" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.12.js - * @description Checking if execution of "final=1" succeeds - */ +/*--- +info: The "final" token can be used as identifier +es5id: 7.6.1.2_A1.12 +description: Checking if execution of "final=1" succeeds +---*/ var final = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js index fcea14220e..5576838dc0 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "float" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.13.js - * @description Checking if execution of "float=1" succeeds - */ +/*--- +info: The "float" token can be used as identifier +es5id: 7.6.1.2_A1.13 +description: Checking if execution of "float=1" succeeds +---*/ var float = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js index a8c81aef61..381b67c8c0 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "goto" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.14.js - * @description Checking if execution of "goto=1" succeeds - */ +/*--- +info: The "goto" token can be used as identifier +es5id: 7.6.1.2_A1.14 +description: Checking if execution of "goto=1" succeeds +---*/ var goto = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js index b1d3adb8a3..b2c41f50ac 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "implements" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15.js - * @description Checking if execution of "implements=1" fails in strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "implements" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.15 +description: Checking if execution of "implements=1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js index 845f7914ad..f6dbc4594d 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js @@ -1,13 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "implements" token can be used as identifier in non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.15ns.js - * @description Checking if execution of "implements=1" succeeds in non-strict code - * @noStrict - */ +/*--- +info: The "implements" token can be used as identifier in non-strict code +es5id: 7.6.1.2_A1.15ns +description: Checking if execution of "implements=1" succeeds in non-strict code +flags: [noStrict] +---*/ var implements = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js index 0e28098f09..fd5126cd45 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "import" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.16.js - * @description Checking if execution of "import=1" fails - * @negative - */ +/*--- +info: The "import" token can not be used as identifier +es5id: 7.6.1.2_A1.16 +description: Checking if execution of "import=1" fails +flags: [negative] +---*/ var import = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js index 97bd273422..2dd1dd26c4 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "int" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.17.js - * @description Checking if execution of "int=1" succeeds - */ +/*--- +info: The "int" token can be used as identifier +es5id: 7.6.1.2_A1.17 +description: Checking if execution of "int=1" succeeds +---*/ var int = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js index e8dd1ff425..a7364bf19c 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "interface" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18.js - * @description Checking if execution of "interface = 1" fails in - * strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "interface" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.18 +description: Checking if execution of "interface = 1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; var interface = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js index 878a7cd424..670401473e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js @@ -1,15 +1,15 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "interface" token can be used as identifier in - * non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.18ns.js - * @description Checking if execution of "interface = 1" succeeds in - * non-strict code - * @noStrict - */ +/*--- +info: > + The "interface" token can be used as identifier in + non-strict code +es5id: 7.6.1.2_A1.18ns +description: > + Checking if execution of "interface = 1" succeeds in non-strict + code +flags: [noStrict] +---*/ var interface = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js index d4905b5aab..689c84f080 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "long" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.19.js - * @description Checking if execution of "long=1" succeeds - */ +/*--- +info: The "long" token can be used as identifier +es5id: 7.6.1.2_A1.19 +description: Checking if execution of "long=1" succeeds +---*/ var long = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js index 16f86cd481..14ece48fe3 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "boolean" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.2.js - * @description Checking if execution of "boolean=1" succeeds - */ +/*--- +info: The "boolean" token can be used as identifier +es5id: 7.6.1.2_A1.2 +description: Checking if execution of "boolean=1" succeeds +---*/ var boolean = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js index 1646a5a8f9..174d92c06f 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "native" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.20.js - * @description Checking if execution of "native=1" succeeds - */ +/*--- +info: The "native" token can be used as identifier +es5id: 7.6.1.2_A1.20 +description: Checking if execution of "native=1" succeeds +---*/ var native = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js index ef2d1daccc..123bb38ff1 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js @@ -1,15 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "package" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21.js - * @description Checking if execution of "package=1" fails in strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "package" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.21 +description: Checking if execution of "package=1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; var package = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js index 3a33532fee..c42d28d5bc 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js @@ -1,13 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "package" token can be used as identifier in non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.21ns.js - * @description Checking if execution of "package=1" succeeds in non-strict code - * @noStrict - */ +/*--- +info: The "package" token can be used as identifier in non-strict code +es5id: 7.6.1.2_A1.21ns +description: Checking if execution of "package=1" succeeds in non-strict code +flags: [noStrict] +---*/ var package = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js index 45fc83f29b..7ff0542122 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js @@ -1,15 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "private" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22.js - * @description Checking if execution of "private=1" fails in strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "private" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.22 +description: Checking if execution of "private=1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; var private = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js index 0562ca843a..27deb7a730 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js @@ -1,13 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "private" token can be used as identifier in non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.22ns.js - * @description Checking if execution of "private=1" succeeds in non-strict code - * @noStrict - */ +/*--- +info: The "private" token can be used as identifier in non-strict code +es5id: 7.6.1.2_A1.22ns +description: Checking if execution of "private=1" succeeds in non-strict code +flags: [noStrict] +---*/ var private = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js index c04b131720..519543a9e8 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "protected" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23.js - * @description Checking if execution of "protected=1" fails in - * strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "protected" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.23 +description: Checking if execution of "protected=1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; var protected = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js index 499512d5b0..627e030e04 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js @@ -1,13 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "protected" token can be used as identifier in non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.23ns.js - * @description Checking if execution of "protected=1" succeeds in non-strict code - * @noStrict - */ +/*--- +info: The "protected" token can be used as identifier in non-strict code +es5id: 7.6.1.2_A1.23ns +description: Checking if execution of "protected=1" succeeds in non-strict code +flags: [noStrict] +---*/ var protected = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js index 55f99e8fdf..117263714a 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js @@ -1,15 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "public" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24.js - * @description Checking if execution of "public=1" fails in strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "public" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.24 +description: Checking if execution of "public=1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; var public = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js index 7090147cd8..b42b2d72d2 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js @@ -1,13 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "public" token can be used as identifier in non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.24ns.js - * @description Checking if execution of "public=1" succeeds in non-strict code - * @noStrict - */ +/*--- +info: The "public" token can be used as identifier in non-strict code +es5id: 7.6.1.2_A1.24ns +description: Checking if execution of "public=1" succeeds in non-strict code +flags: [noStrict] +---*/ var public = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js index 0c11e3cf3d..01681b3c17 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "short" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.25.js - * @description Checking if execution of "short=1" succeeds - */ +/*--- +info: The "short" token can be used as identifier +es5id: 7.6.1.2_A1.25 +description: Checking if execution of "short=1" succeeds +---*/ var short = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js index a1f3369357..5debcde9fb 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js @@ -1,15 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "static" token can not be used as identifier in strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26.js - * @description Checking if execution of "static=1" fails in strict code - * @onlyStrict - * @negative - */ +/*--- +info: The "static" token can not be used as identifier in strict code +es5id: 7.6.1.2_A1.26 +description: Checking if execution of "static=1" fails in strict code +flags: + - onlyStrict + - negative +---*/ "use strict"; var static = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js index 2e7e1f7b7e..d47341431b 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js @@ -1,13 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "static" token can be used as identifier in non-strict code - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.26ns.js - * @description Checking if execution of "static=1" succeeds in non-strict code - * @noStrict - */ +/*--- +info: The "static" token can be used as identifier in non-strict code +es5id: 7.6.1.2_A1.26ns +description: Checking if execution of "static=1" succeeds in non-strict code +flags: [noStrict] +---*/ var static = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js index c78862fb93..cb7c70b8d8 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "super" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.27.js - * @description Checking if execution of "super=1" fails - * @negative - */ +/*--- +info: The "super" token can not be used as identifier +es5id: 7.6.1.2_A1.27 +description: Checking if execution of "super=1" fails +flags: [negative] +---*/ var super = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js index 515372a7a4..38fe3360eb 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "synchronized" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.28.js - * @description Checking if execution of "synchronized=1" succeeds - */ +/*--- +info: The "synchronized" token can be used as identifier +es5id: 7.6.1.2_A1.28 +description: Checking if execution of "synchronized=1" succeeds +---*/ var synchronized = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js index 54dec61554..712fc0a3be 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "throws" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.29.js - * @description Checking if execution of "throws=1" succeeds - */ +/*--- +info: The "throws" token can be used as identifier +es5id: 7.6.1.2_A1.29 +description: Checking if execution of "throws=1" succeeds +---*/ var throws = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js index 50c5d7885f..8b39c2b5a6 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "byte" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.3.js - * @description Checking if execution of "byte=1" succeeds - */ +/*--- +info: The "byte" token can be used as identifier +es5id: 7.6.1.2_A1.3 +description: Checking if execution of "byte=1" succeeds +---*/ var byte = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js index 37128f047d..6de5eed997 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "transient" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.30.js - * @description Checking if execution of "transient=1" succeeds - */ +/*--- +info: The "transient" token can be used as identifier +es5id: 7.6.1.2_A1.30 +description: Checking if execution of "transient=1" succeeds +---*/ var transient = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js index 57fb357d8c..47b065b12e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "volatile" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.31.js - * @description Checking if execution of "volatile=1" succeeds - */ +/*--- +info: The "volatile" token can be used as identifier +es5id: 7.6.1.2_A1.31 +description: Checking if execution of "volatile=1" succeeds +---*/ var volatile = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js index 1af1677e43..48ae03a5a6 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "char" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.4.js - * @description Checking if execution of "char=1" succeeds - */ +/*--- +info: The "char" token can be used as identifier +es5id: 7.6.1.2_A1.4 +description: Checking if execution of "char=1" succeeds +---*/ var char = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js index b84b44248c..98aefffa98 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "class" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.5.js - * @description Checking if execution of "class=1" fails - * @negative - */ +/*--- +info: The "class" token can not be used as identifier +es5id: 7.6.1.2_A1.5 +description: Checking if execution of "class=1" fails +flags: [negative] +---*/ var class = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js index da95d7ebfa..4e9f3746d5 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "const" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.6.js - * @description Checking if execution of "const=1" fails - * @negative - */ +/*--- +info: The "const" token can not be used as identifier +es5id: 7.6.1.2_A1.6 +description: Checking if execution of "const=1" fails +flags: [negative] +---*/ var const = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js index ed4c3f0fcb..f089ca5ebd 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "debugger" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.7.js - * @description Checking if execution of "debugger=1" fails - * @negative - */ +/*--- +info: The "debugger" token can not be used as identifier +es5id: 7.6.1.2_A1.7 +description: Checking if execution of "debugger=1" fails +flags: [negative] +---*/ var debugger = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js index 70a0a0a49d..a8354b3b18 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "double" token can be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.8.js - * @description Checking if execution of "double=1" succeeds - */ +/*--- +info: The "double" token can be used as identifier +es5id: 7.6.1.2_A1.8 +description: Checking if execution of "double=1" succeeds +---*/ var double = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js index 5294cb0d04..c1ed82611e 100644 --- a/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js +++ b/test/suite/ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "enum" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/7.6.1.2/S7.6.1.2_A1.9.js - * @description Checking if execution of "enum=1" fails - * @negative - */ +/*--- +info: The "enum" token can not be used as identifier +es5id: 7.6.1.2_A1.9 +description: Checking if execution of "enum=1" fails +flags: [negative] +---*/ var enum = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.1.js b/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.1.js index d97c7843ac..cd3c57059e 100644 --- a/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.1.js +++ b/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "null" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/S7.6.1_A1.1.js - * @description Checking if execution of "null = 1" fails - * @negative - */ +/*--- +info: The "null" token can not be used as identifier +es5id: 7.6.1_A1.1 +description: Checking if execution of "null = 1" fails +flags: [negative] +---*/ null = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.2.js b/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.2.js index 2c49731cba..1f5a74942c 100644 --- a/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.2.js +++ b/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "true" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/S7.6.1_A1.2.js - * @description Checking if execution of "true=1" fails - * @negative - */ +/*--- +info: The "true" token can not be used as identifier +es5id: 7.6.1_A1.2 +description: Checking if execution of "true=1" fails +flags: [negative] +---*/ true = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.3.js b/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.3.js index 01cf52f757..7e7340424c 100644 --- a/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.3.js +++ b/test/suite/ch07/7.6/7.6.1/S7.6.1_A1.3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "false" token can not be used as identifier - * - * @path ch07/7.6/7.6.1/S7.6.1_A1.3.js - * @description Checking if execution of "false=1" fails - * @negative - */ +/*--- +info: The "false" token can not be used as identifier +es5id: 7.6.1_A1.3 +description: Checking if execution of "false=1" fails +flags: [negative] +---*/ false = 1; - diff --git a/test/suite/ch07/7.6/7.6.1/S7.6.1_A2.js b/test/suite/ch07/7.6/7.6.1/S7.6.1_A2.js index e123f067f2..41da81aa19 100644 --- a/test/suite/ch07/7.6/7.6.1/S7.6.1_A2.js +++ b/test/suite/ch07/7.6/7.6.1/S7.6.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * List of words that are not reserved - * - * @path ch07/7.6/7.6.1/S7.6.1_A2.js - * @description Try assign 1 for not reserved words - */ +/*--- +info: List of words that are not reserved +es5id: 7.6.1_A2 +description: Try assign 1 for not reserved words +---*/ // a var and = 1; @@ -118,4 +117,3 @@ var xor = 1; var xor_eq = 1; // y // z - diff --git a/test/suite/ch07/7.6/S7.6_A1.2_T1.js b/test/suite/ch07/7.6/S7.6_A1.2_T1.js index 54aee1064f..8d394e2ff3 100644 --- a/test/suite/ch07/7.6/S7.6_A1.2_T1.js +++ b/test/suite/ch07/7.6/S7.6_A1.2_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierStart :: $ - * - * @path ch07/7.6/S7.6_A1.2_T1.js - * @description Create variable $ - */ +/*--- +info: "IdentifierStart :: $" +es5id: 7.6_A1.2_T1 +description: Create variable $ +---*/ //CHECK#1 var $ = 1; if ($ !== 1) { $ERROR('#1: var $ = 1; $ === 1. Actual: ' + ($)); } - diff --git a/test/suite/ch07/7.6/S7.6_A1.2_T2.js b/test/suite/ch07/7.6/S7.6_A1.2_T2.js index d6474ac413..35a2feaba4 100644 --- a/test/suite/ch07/7.6/S7.6_A1.2_T2.js +++ b/test/suite/ch07/7.6/S7.6_A1.2_T2.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierStart :: $ - * - * @path ch07/7.6/S7.6_A1.2_T2.js - * @description The $ as unicode character \u0024 - */ +/*--- +info: "IdentifierStart :: $" +es5id: 7.6_A1.2_T2 +description: The $ as unicode character \u0024 +---*/ //CHECK#1 var \u0024 = 1; if ($ !== 1) { $ERROR('#1: var \\u0024 = 1; $ === 1. Actual: ' + ($)); } - diff --git a/test/suite/ch07/7.6/S7.6_A1.2_T3.js b/test/suite/ch07/7.6/S7.6_A1.2_T3.js index 571075a764..5eb1a7578c 100644 --- a/test/suite/ch07/7.6/S7.6_A1.2_T3.js +++ b/test/suite/ch07/7.6/S7.6_A1.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierStart :: $ - * - * @path ch07/7.6/S7.6_A1.2_T3.js - * @description The $ as unicode character \u0024 - */ +/*--- +info: "IdentifierStart :: $" +es5id: 7.6_A1.2_T3 +description: The $ as unicode character \u0024 +---*/ //CHECK#1 var identifier = String.fromCharCode(0x0024); @@ -19,4 +18,3 @@ if (eval(identifier + "===1") !== true) { if ("$" !== String.fromCharCode(0x0024)) { $ERROR('#2: "$" === String.fromCharCode(0x0024)'); } - diff --git a/test/suite/ch07/7.6/S7.6_A1.3_T1.js b/test/suite/ch07/7.6/S7.6_A1.3_T1.js index 8d1164d2bf..1c87bc4bfd 100644 --- a/test/suite/ch07/7.6/S7.6_A1.3_T1.js +++ b/test/suite/ch07/7.6/S7.6_A1.3_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierStart :: _ - * - * @path ch07/7.6/S7.6_A1.3_T1.js - * @description Create variable _ - */ +/*--- +info: "IdentifierStart :: _" +es5id: 7.6_A1.3_T1 +description: Create variable _ +---*/ //CHECK#1 var _ = 1; if (_ !== 1) { $ERROR('#1: var _ = 1; _ === 1. Actual: ' + (_)); } - diff --git a/test/suite/ch07/7.6/S7.6_A1.3_T2.js b/test/suite/ch07/7.6/S7.6_A1.3_T2.js index ba300f76dd..5fa8097a03 100644 --- a/test/suite/ch07/7.6/S7.6_A1.3_T2.js +++ b/test/suite/ch07/7.6/S7.6_A1.3_T2.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierStart :: _ - * - * @path ch07/7.6/S7.6_A1.3_T2.js - * @description The _ as unicode character \u005F - */ +/*--- +info: "IdentifierStart :: _" +es5id: 7.6_A1.3_T2 +description: The _ as unicode character \u005F +---*/ //CHECK#1 var \u005F = 1; if (_ !== 1) { $ERROR('#1: var \\u005F = 1; _ === 1. Actual: ' + (_)); } - diff --git a/test/suite/ch07/7.6/S7.6_A1.3_T3.js b/test/suite/ch07/7.6/S7.6_A1.3_T3.js index e3a8361c23..20725f3bdc 100644 --- a/test/suite/ch07/7.6/S7.6_A1.3_T3.js +++ b/test/suite/ch07/7.6/S7.6_A1.3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierStart :: _ - * - * @path ch07/7.6/S7.6_A1.3_T3.js - * @description The _ as unicode character \u005F - */ +/*--- +info: "IdentifierStart :: _" +es5id: 7.6_A1.3_T3 +description: The _ as unicode character \u005F +---*/ //CHECK#1 var identifier = String.fromCharCode(0x005F); @@ -19,4 +18,3 @@ if (eval(identifier + "===1") !== true) { if ("_" !== String.fromCharCode(0x005F)) { $ERROR('#2: "_" === String.fromCharCode(0x005F)'); } - diff --git a/test/suite/ch07/7.6/S7.6_A2.1_T1.js b/test/suite/ch07/7.6/S7.6_A2.1_T1.js index 5ef24abefd..4571a0bc0b 100644 --- a/test/suite/ch07/7.6/S7.6_A2.1_T1.js +++ b/test/suite/ch07/7.6/S7.6_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierPart :: IdentifierStart - * - * @path ch07/7.6/S7.6_A2.1_T1.js - * @description IdentifierStart :: UnicodeLetter - */ +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T1 +description: "IdentifierStart :: UnicodeLetter" +---*/ //CHECK#1 try { @@ -72,4 +71,3 @@ try { } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); } - diff --git a/test/suite/ch07/7.6/S7.6_A2.1_T2.js b/test/suite/ch07/7.6/S7.6_A2.1_T2.js index 3d595b5662..f163f5bdf6 100644 --- a/test/suite/ch07/7.6/S7.6_A2.1_T2.js +++ b/test/suite/ch07/7.6/S7.6_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierPart :: IdentifierStart - * - * @path ch07/7.6/S7.6_A2.1_T2.js - * @description IdentifierStart :: $ - */ +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T2 +description: "IdentifierStart :: $" +---*/ //CHECK#1 try { @@ -72,4 +71,3 @@ try { } catch (e) { $ERROR('#6.2: var \\u0078$ = 1; x$ === 6. Actual: ' + (x$)); } - diff --git a/test/suite/ch07/7.6/S7.6_A2.1_T3.js b/test/suite/ch07/7.6/S7.6_A2.1_T3.js index 9c1032169b..0e1f21f6e6 100644 --- a/test/suite/ch07/7.6/S7.6_A2.1_T3.js +++ b/test/suite/ch07/7.6/S7.6_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierPart :: IdentifierStart - * - * @path ch07/7.6/S7.6_A2.1_T3.js - * @description IdentifierStart :: _ - */ +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T3 +description: "IdentifierStart :: _" +---*/ //CHECK#1 try { @@ -72,4 +71,3 @@ try { } catch (e) { $ERROR('#6.2: var \\u0078_ = 1; x_ === 6. Actual: ' + (x_)); } - diff --git a/test/suite/ch07/7.6/S7.6_A2.1_T4.js b/test/suite/ch07/7.6/S7.6_A2.1_T4.js index a031822546..892ddc496f 100644 --- a/test/suite/ch07/7.6/S7.6_A2.1_T4.js +++ b/test/suite/ch07/7.6/S7.6_A2.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * IdentifierPart :: IdentifierStart - * - * @path ch07/7.6/S7.6_A2.1_T4.js - * @description IdentifierStart :: \UnicodeEscapeSequence - */ +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T4 +description: "IdentifierStart :: \\UnicodeEscapeSequence" +---*/ //CHECK#1 try { @@ -47,4 +46,3 @@ try { } catch (e) { $ERROR('#4.2: var \\u005F\\u005F = 1; __ === 4. Actual: ' + (__)); } - diff --git a/test/suite/ch07/7.6/S7.6_A4.1_T1.js b/test/suite/ch07/7.6/S7.6_A4.1_T1.js index 1e18ed18d8..f035d0a380 100644 --- a/test/suite/ch07/7.6/S7.6_A4.1_T1.js +++ b/test/suite/ch07/7.6/S7.6_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of ENGLISH ALPHABET - * - * @path ch07/7.6/S7.6_A4.1_T1.js - * @description Check ENGLISH CAPITAL ALPHABET - */ +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es5id: 7.6_A4.1_T1 +description: Check ENGLISH CAPITAL ALPHABET +---*/ //CHECK#A-Z var \u0041 = 1; @@ -113,4 +112,3 @@ var \u005A = 1; if (Z !== 1) { $ERROR('#Z'); } - diff --git a/test/suite/ch07/7.6/S7.6_A4.1_T2.js b/test/suite/ch07/7.6/S7.6_A4.1_T2.js index 20003197e1..b20911eeff 100644 --- a/test/suite/ch07/7.6/S7.6_A4.1_T2.js +++ b/test/suite/ch07/7.6/S7.6_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of ENGLISH ALPHABET - * - * @path ch07/7.6/S7.6_A4.1_T2.js - * @description Check ENGLISH SMALL ALPHABET - */ +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es5id: 7.6_A4.1_T2 +description: Check ENGLISH SMALL ALPHABET +---*/ //CHECK#a-z var \u0061 = 1; @@ -113,5 +112,3 @@ var \u007A = 1; if (z !== 1) { $ERROR('#z'); } - - diff --git a/test/suite/ch07/7.6/S7.6_A4.2_T1.js b/test/suite/ch07/7.6/S7.6_A4.2_T1.js index e588b8c157..5e92a48621 100644 --- a/test/suite/ch07/7.6/S7.6_A4.2_T1.js +++ b/test/suite/ch07/7.6/S7.6_A4.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of RUSSIAN ALPHABET - * - * @path ch07/7.6/S7.6_A4.2_T1.js - * @description Check RUSSIAN CAPITAL ALPHABET - */ +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es5id: 7.6_A4.2_T1 +description: Check RUSSIAN CAPITAL ALPHABET +---*/ //CHECK#А-Я var \u0410 = 1; @@ -141,4 +140,3 @@ var \u0401 = 1; if (Ё !== 1) { $ERROR('#Ё'); } - diff --git a/test/suite/ch07/7.6/S7.6_A4.2_T2.js b/test/suite/ch07/7.6/S7.6_A4.2_T2.js index 119b949181..6f9a3fa967 100644 --- a/test/suite/ch07/7.6/S7.6_A4.2_T2.js +++ b/test/suite/ch07/7.6/S7.6_A4.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of RUSSIAN ALPHABET - * - * @path ch07/7.6/S7.6_A4.2_T2.js - * @description Check RUSSIAN SMALL ALPHABET - */ +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es5id: 7.6_A4.2_T2 +description: Check RUSSIAN SMALL ALPHABET +---*/ //CHECK#а-я var \u0430 = 1; @@ -141,4 +140,3 @@ var \u0451 = 1; if (ё !== 1) { $ERROR('#ё'); } - diff --git a/test/suite/ch07/7.6/S7.6_A4.3_T1.js b/test/suite/ch07/7.6/S7.6_A4.3_T1.js index ab13aa2533..54a46543f0 100644 --- a/test/suite/ch07/7.6/S7.6_A4.3_T1.js +++ b/test/suite/ch07/7.6/S7.6_A4.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of DIGITS - * - * @path ch07/7.6/S7.6_A4.3_T1.js - * @description Identifier is $+ANY_DIGIT - */ +/*--- +info: Correct interpretation of DIGITS +es5id: 7.6_A4.3_T1 +description: Identifier is $+ANY_DIGIT +---*/ //CHECK#0-9 var $\u0030 = 0; @@ -49,4 +48,3 @@ var $\u0039 = 9; if ($9 !== 9) { $ERROR('#9: $\\u0039 = 9; $9 === 9'); } - diff --git a/test/suite/ch07/7.7/S7.7_A1.js b/test/suite/ch07/7.7/S7.7_A1.js index e033e11643..a198567790 100644 --- a/test/suite/ch07/7.7/S7.7_A1.js +++ b/test/suite/ch07/7.7/S7.7_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of all punctuators - * - * @path ch07/7.7/S7.7_A1.js - * @description Using all punctuators - */ +/*--- +info: Correct interpretation of all punctuators +es5id: 7.7_A1 +description: Using all punctuators +---*/ //CHECK#1 ({});[]; @@ -18,5 +17,4 @@ 1 ? 2 : 3; this.NaN = 1; this.NaN += 2; this.NaN -= 3; this.NaN *= 4; this.NaN /= 5; this.NaN %= 6; this.NaN <<= 7; this.NaN >>= 8; this.NaN >>>= 9; - this.NaN &= 1; this.NaN |= 2; this.NaN ^= 3; - + this.NaN &= 1; this.NaN |= 2; this.NaN ^= 3; diff --git a/test/suite/ch07/7.7/S7.7_A2_T1.js b/test/suite/ch07/7.7/S7.7_A2_T1.js index 1a545639de..c9b44f5b27 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T1.js +++ b/test/suite/ch07/7.7/S7.7_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T1.js - * @description Try to use {} as a Unicode \u007B\u007D - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T1 +description: Try to use {} as a Unicode \u007B\u007D +flags: [negative] +---*/ \u007B\u007D; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T10.js b/test/suite/ch07/7.7/S7.7_A2_T10.js index 6d71a5617f..8077691216 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T10.js +++ b/test/suite/ch07/7.7/S7.7_A2_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T10.js - * @description Try to use / as a Unicode \u002F - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T10 +description: Try to use / as a Unicode \u002F +flags: [negative] +---*/ 1\u002F2; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T2.js b/test/suite/ch07/7.7/S7.7_A2_T2.js index 1a06e190e3..29933c497e 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T2.js +++ b/test/suite/ch07/7.7/S7.7_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T2.js - * @description Try to use () as Unicode \u00281\u0029 - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T2 +description: Try to use () as Unicode \u00281\u0029 +flags: [negative] +---*/ \u00281\u0029; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T3.js b/test/suite/ch07/7.7/S7.7_A2_T3.js index 1b9b950f4e..28dce54839 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T3.js +++ b/test/suite/ch07/7.7/S7.7_A2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T3.js - * @description Try to use [] as a Unicode \u005B\u005D - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T3 +description: Try to use [] as a Unicode \u005B\u005D +flags: [negative] +---*/ \u005B\u005D; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T4.js b/test/suite/ch07/7.7/S7.7_A2_T4.js index c877858e27..30cb76d784 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T4.js +++ b/test/suite/ch07/7.7/S7.7_A2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T4.js - * @description Try to use ; as a Unicode \u003B - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T4 +description: Try to use ; as a Unicode \u003B +flags: [negative] +---*/ \u003B; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T5.js b/test/suite/ch07/7.7/S7.7_A2_T5.js index 1b92226af5..13d4f5d4b4 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T5.js +++ b/test/suite/ch07/7.7/S7.7_A2_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T5.js - * @description Try to use . as a Unicode \u002E - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T5 +description: Try to use . as a Unicode \u002E +flags: [negative] +---*/ x = 1; this\u002Ex; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T6.js b/test/suite/ch07/7.7/S7.7_A2_T6.js index e0cb0382fe..45455c1d64 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T6.js +++ b/test/suite/ch07/7.7/S7.7_A2_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T6.js - * @description Try to use , as a Unicode \u002C - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T6 +description: Try to use , as a Unicode \u002C +flags: [negative] +---*/ 1\u002C2; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T7.js b/test/suite/ch07/7.7/S7.7_A2_T7.js index aff3092a63..fdf78e26d8 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T7.js +++ b/test/suite/ch07/7.7/S7.7_A2_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T7.js - * @description Try to use + as a Unicode \u002B - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T7 +description: Try to use + as a Unicode \u002B +flags: [negative] +---*/ 1\u002B2; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T8.js b/test/suite/ch07/7.7/S7.7_A2_T8.js index 9e9cd1ac48..a39e6a6fb7 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T8.js +++ b/test/suite/ch07/7.7/S7.7_A2_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T8.js - * @description Try to use - as a Unicode \u002D - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T8 +description: Try to use - as a Unicode \u002D +flags: [negative] +---*/ 1\u002D2; - diff --git a/test/suite/ch07/7.7/S7.7_A2_T9.js b/test/suite/ch07/7.7/S7.7_A2_T9.js index 7ba61f5a95..e625cfb99f 100644 --- a/test/suite/ch07/7.7/S7.7_A2_T9.js +++ b/test/suite/ch07/7.7/S7.7_A2_T9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Punctuator cannot be expressed as a Unicode escape sequence consisting of six characters, namely \u plus four hexadecimal digits - * - * @path ch07/7.7/S7.7_A2_T9.js - * @description Try to use * as a Unicode \u002A - * @negative - */ +/*--- +info: > + Punctuator cannot be expressed as a Unicode escape sequence consisting of + six characters, namely \u plus four hexadecimal digits +es5id: 7.7_A2_T9 +description: Try to use * as a Unicode \u002A +flags: [negative] +---*/ 1\u002A2; - diff --git a/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T1.js b/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T1.js index e7b188b6cc..87f04501b4 100644 --- a/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T1.js +++ b/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Literal :: NullLiteral - * - * @path ch07/7.8/7.8.1/S7.8.1_A1_T1.js - * @description Check null === null - */ +/*--- +info: "Literal :: NullLiteral" +es5id: 7.8.1_A1_T1 +description: Check null === null +---*/ //CHECK#1 if (null !== null) { $ERROR('#1: null === null'); -} - +} diff --git a/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T2.js b/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T2.js index 340f8bed42..10461ee43c 100644 --- a/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T2.js +++ b/test/suite/ch07/7.8/7.8.1/S7.8.1_A1_T2.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Literal :: NullLiteral - * - * @path ch07/7.8/7.8.1/S7.8.1_A1_T2.js - * @description Check RegExp("0").exec("1") === null - */ +/*--- +info: "Literal :: NullLiteral" +es5id: 7.8.1_A1_T2 +description: Check RegExp("0").exec("1") === null +---*/ //CHECK#1 if (RegExp("0").exec("1") !== null) { $ERROR('#1: RegExp("0").exec("1") === null'); -} - - +} diff --git a/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T1.js b/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T1.js index f2925a291e..1272de7604 100644 --- a/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T1.js +++ b/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Literal :: BooleanLiteral - * - * @path ch07/7.8/7.8.2/S7.8.2_A1_T1.js - * @description BooleanLiteral :: true - */ +/*--- +info: "Literal :: BooleanLiteral" +es5id: 7.8.2_A1_T1 +description: "BooleanLiteral :: true" +---*/ //CHECK#1 if (Boolean(true) !== true) { $ERROR('#1: Boolean(true) === true. Actual: Boolean(true) === ' + (Boolean(true))); -} - +} diff --git a/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T2.js b/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T2.js index 5adaf379d0..5f2267f0a6 100644 --- a/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T2.js +++ b/test/suite/ch07/7.8/7.8.2/S7.8.2_A1_T2.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Literal :: BooleanLiteral - * - * @path ch07/7.8/7.8.2/S7.8.2_A1_T2.js - * @description BooleanLiteral :: false - */ +/*--- +info: "Literal :: BooleanLiteral" +es5id: 7.8.2_A1_T2 +description: "BooleanLiteral :: false" +---*/ //CHECK#1 if (Boolean(false) !== false) { $ERROR('#1: Boolean(false) === false. Actual: Boolean(false) === ' + (Boolean(false))); -} - - +} diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-1-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-1-s.js index fa67b50956..d979d2a3eb 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-1-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-1-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-1-s.js - * @description Strict Mode - octal extension (010) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-1-s +description: Strict Mode - octal extension (010) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_1 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-1gs.js b/test/suite/ch07/7.8/7.8.3/7.8.3-1gs.js index 91b6ceae28..313736c5a7 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-1gs.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-1gs.js @@ -1,16 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch07/7.8/7.8.3/7.8.3-1gs.js - * @description Strict Mode - octal extension(010) is forbidden in strict mode - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-1gs +description: Strict Mode - octal extension(010) is forbidden in strict mode +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + "use strict"; throw NotEarlyError; -var y = 010; +var y = 010; diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-2-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-2-s.js index 79755f8df9..669cf64ca1 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-2-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-2-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-2-s.js - * @description Strict Mode - octal extension (00) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-2-s +description: Strict Mode - octal extension (00) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_2 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-2gs.js b/test/suite/ch07/7.8/7.8.3/7.8.3-2gs.js index dae203a53e..40e5d4eca6 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-2gs.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-2gs.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-2gs.js - * @description Strict Mode - octal extension is forbidden in strict mode (after a hex number is assigned to a variable) - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-2gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable) +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + "use strict"; throw NotEarlyError; var a; a = 0x1; -a = 01; +a = 01; diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-3-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-3-s.js index 7d33f9a5c7..78e480960e 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-3-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-3-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-3-s.js - * @description Strict Mode - octal extension (01) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-3-s +description: Strict Mode - octal extension (01) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_3 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-3gs.js b/test/suite/ch07/7.8/7.8.3/7.8.3-3gs.js index 48d56d63ec..c06dc4e198 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-3gs.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-3gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-3gs.js - * @description Strict Mode - octal extension is forbidden in strict mode (after a hex number is assigned to a variable from an eval) - * @onlyStrict - * @negative SyntaxError - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-3gs +description: > + Strict Mode - octal extension is forbidden in strict mode (after a + hex number is assigned to a variable from an eval) +negative: SyntaxError +flags: [onlyStrict] +---*/ + "use strict"; var a; -eval("a = 0x1;a = 01;"); +eval("a = 0x1;a = 01;"); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-4-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-4-s.js index 53a486b054..9f1c88db97 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-4-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-4-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-4-s.js - * @description Strict Mode - octal extension (06) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-4-s +description: Strict Mode - octal extension (06) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_4 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-5-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-5-s.js index 98ac43f588..fa44b1e8a2 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-5-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-5-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-5-s.js - * @description Strict Mode - octal extension (07) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-5-s +description: Strict Mode - octal extension (07) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_5 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-6-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-6-s.js index fe2f60c645..11a8191084 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-6-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-6-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-6-s.js - * @description Strict Mode - octal extension (000) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-6-s +description: Strict Mode - octal extension (000) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_6 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/7.8.3-7-s.js b/test/suite/ch07/7.8/7.8.3/7.8.3-7-s.js index d0ffda8820..83fbb11095 100644 --- a/test/suite/ch07/7.8/7.8.3/7.8.3-7-s.js +++ b/test/suite/ch07/7.8/7.8.3/7.8.3-7-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.3/7.8.3-7-s.js - * @description Strict Mode - octal extension (005) is forbidden in strict mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.3-7-s +description: Strict Mode - octal extension (005) is forbidden in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { "use strict"; try { @@ -19,4 +20,4 @@ function testcase() { return e instanceof SyntaxError && typeof _7_8_3_7 === "undefined"; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T1.js index ff82f498e4..c12aeac91d 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.1_T1.js - * @description DecimalIntegerLiteral :: 0, NoNZeroDigit - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral" +es5id: 7.8.3_A1.1_T1 +description: "DecimalIntegerLiteral :: 0, NoNZeroDigit" +---*/ //CHECK#0 if (0 !== 0) { @@ -57,4 +56,3 @@ if (8 !== 8) { if (9 !== 9) { $ERROR('#9: 9 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T2.js index df2206462d..119f73be0f 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.1_T2.js - * @description DecimalIntegerLiteral :: NoNZeroDigit DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral" +es5id: 7.8.3_A1.1_T2 +description: "DecimalIntegerLiteral :: NoNZeroDigit DecimalDigits" +---*/ //CHECK#1 if (11 !== 11) { @@ -52,4 +51,3 @@ if (88 !== 88) { if (99 !== 99) { $ERROR('#9: 99 === 99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T1.js index 50a042d2cc..c259c6a62c 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T1.js - * @description ExponentPart :: e DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T1 +description: "ExponentPart :: e DecimalDigits" +---*/ //CHECK#0 if (0e1 !== 0) { @@ -57,4 +56,3 @@ if (8e1 !== 80) { if (9e1 !== 90) { $ERROR('#9: 9e1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T2.js index f2398a460f..413a440278 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T2.js - * @description ExponentPart :: E DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T2 +description: "ExponentPart :: E DecimalDigits" +---*/ //CHECK#0 if (0E1 !== 0) { @@ -57,4 +56,3 @@ if (8E1 !== 80) { if (9E1 !== 90) { $ERROR('#9: 9E1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T3.js index 352745f8a7..a0201ac4a7 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T3.js - * @description ExponentPart :: e -DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T3 +description: "ExponentPart :: e -DecimalDigits" +---*/ //CHECK#0 if (0e-1 !== 0) { @@ -57,4 +56,3 @@ if (8e-1 !== 0.8) { if (9e-1 !== 0.9) { $ERROR('#9: 9e-1 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T4.js index b0f95210ff..05c90ba954 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T4.js - * @description ExponentPart :: E -DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T4 +description: "ExponentPart :: E -DecimalDigits" +---*/ //CHECK#0 if (0E-1 !== 0) { @@ -57,4 +56,3 @@ if (8E-1 !== 0.8) { if (9E-1 !== 0.9) { $ERROR('#9: 9E-1 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T5.js index 87c79f63d1..20d3b8303c 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T5.js - * @description ExponentPart :: e +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T5 +description: "ExponentPart :: e +DecimalDigits" +---*/ //CHECK#0 if (0e+1 !== 0) { @@ -57,4 +56,3 @@ if (8e+1 !== 80) { if (9e+1 !== 90) { $ERROR('#9: 9e+1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T6.js index bdfc65d335..64c81ff1d9 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T6.js - * @description ExponentPart :: E +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T6 +description: "ExponentPart :: E +DecimalDigits" +---*/ //CHECK#0 if (0E+1 !== 0) { @@ -57,4 +56,3 @@ if (8E+1 !== 80) { if (9E+1 !== 90) { $ERROR('#9: 9E+1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T7.js index d636e7e6b7..619ec32b34 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T7.js - * @description ExponentPart :: e 0 - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T7 +description: "ExponentPart :: e 0" +---*/ //CHECK#0 if (0e0 !== 0) { @@ -57,4 +56,3 @@ if (8e0 !== 8) { if (9e0 !== 9) { $ERROR('#9: 9e0 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T8.js index c45e4353d7..a74ff3015c 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A1.2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A1.2_T8.js - * @description ExponentPart :: E 0 - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral ExponentPart" +es5id: 7.8.3_A1.2_T8 +description: "ExponentPart :: E 0" +---*/ //CHECK#0 if (0E0 !== 0) { @@ -57,4 +56,3 @@ if (8E0 !== 8) { if (9E0 !== 9) { $ERROR('#9: 9E0 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T1.js index 571cfe65e1..8811326f91 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.1_T1.js - * @description Use .DecimalDigit - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits" +es5id: 7.8.3_A2.1_T1 +description: Use .DecimalDigit +---*/ //CHECK#0 if (.0 !== 0.0) { @@ -57,4 +56,3 @@ if (.8 !== 0.8) { if (.9 !== 0.9) { $ERROR('#9: .9 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T2.js index 88ed6fc02b..93ed870e0a 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.1_T2.js - * @description Use .DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits" +es5id: 7.8.3_A2.1_T2 +description: Use .DecimalDigits +---*/ //CHECK#0 if (.00 !== 0.00) { @@ -57,4 +56,3 @@ if (.88 !== 0.88) { if (.99 !== 0.99) { $ERROR('#9: .99 === 0.99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T3.js index 2b5d47bd12..206aaaa674 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.1_T3.js - * @description Use .DecimalDigits that have at the end zeros - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits" +es5id: 7.8.3_A2.1_T3 +description: Use .DecimalDigits that have at the end zeros +---*/ //CHECK#0 if (.00 !== 0.0) { @@ -57,4 +56,3 @@ if (.80 !== 0.8) { if (.90 !== 0.9) { $ERROR('#9: .9 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T1.js index bd80eb9d71..fd6b2b101c 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T1.js - * @description ExponentPart :: e DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T1 +description: "ExponentPart :: e DecimalDigits" +---*/ //CHECK#0 if (.0e1 !== 0) { @@ -57,4 +56,3 @@ if (.8e1 !== 8) { if (.9e1 !== 9) { $ERROR('#9: .9e1 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T2.js index 0e6db79256..03b29bed46 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T2.js - * @description ExponentPart :: E DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T2 +description: "ExponentPart :: E DecimalDigits" +---*/ //CHECK#0 if (.0E1 !== 0) { @@ -57,4 +56,3 @@ if (.8E1 !== 8) { if (.9E1 !== 9) { $ERROR('#9: .9E1 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T3.js index 513868760e..3294ec5518 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T3.js - * @description ExponentPart :: e +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T3 +description: "ExponentPart :: e +DecimalDigits" +---*/ //CHECK#0 if (.0e-1 !== 0) { @@ -57,4 +56,3 @@ if (.8e-1 !== 0.08) { if (.9e-1 !== 0.09) { $ERROR('#9: .9e-1 === 0.09'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T4.js index 88ddf98586..87f7fe8295 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T4.js - * @description ExponentPart :: E +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T4 +description: "ExponentPart :: E +DecimalDigits" +---*/ //CHECK#0 if (.0E-1 !== 0) { @@ -57,4 +56,3 @@ if (.8E-1 !== 0.08) { if (.9E-1 !== 0.09) { $ERROR('#9: .9E-1 === 0.09'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T5.js index 881511a107..7eda4c7104 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T5.js - * @description ExponentPart :: e +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T5 +description: "ExponentPart :: e +DecimalDigits" +---*/ //CHECK#0 if (.0e+1 !== 0) { @@ -57,4 +56,3 @@ if (.8e+1 !== 8) { if (.9e+1 !== 9) { $ERROR('#9: .9e+1 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T6.js index 8b206eee7b..e250e2e54a 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T6.js - * @description ExponentPart :: E +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T6 +description: "ExponentPart :: E +DecimalDigits" +---*/ //CHECK#0 if (.0E+1 !== 0) { @@ -57,4 +56,3 @@ if (.8E+1 !== 8) { if (.9E+1 !== 9) { $ERROR('#9: .9E+1 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T7.js index a3701e00c8..0df0dbc80a 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T7.js - * @description ExponentPart :: e 0 - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T7 +description: "ExponentPart :: e 0" +---*/ //CHECK#0 if (.0e0 !== 0.0) { @@ -57,4 +56,3 @@ if (.8e0 !== 0.8) { if (.9e0 !== 0.9) { $ERROR('#9: .9e0 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T8.js index d8bca29e1a..1da6cb4562 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A2.2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: .DecimalDigits ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A2.2_T8.js - * @description ExponentPart :: E 0 - */ +/*--- +info: "DecimalLiteral :: .DecimalDigits ExponentPart" +es5id: 7.8.3_A2.2_T8 +description: "ExponentPart :: E 0" +---*/ //CHECK#0 if (.0E0 !== 0.0) { @@ -57,4 +56,3 @@ if (.8E0 !== 0.8) { if (.9E0 !== 0.9) { $ERROR('#9: .9E0 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T1.js index 0e34b120be..c671d04be9 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.1_T1.js - * @description DecimalIntegerLiteral :: 0, NoNZeroDigit - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral." +es5id: 7.8.3_A3.1_T1 +description: "DecimalIntegerLiteral :: 0, NoNZeroDigit" +---*/ //CHECK#0 if (0. !== 0) { @@ -57,4 +56,3 @@ if (8. !== 8) { if (9. !== 9) { $ERROR('#9: 9. === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T2.js index 6dcdd78e38..a3cda160cf 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.1_T2.js - * @description DecimalIntegerLiteral :: NoNZeroDigit DecimalDigigts - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral." +es5id: 7.8.3_A3.1_T2 +description: "DecimalIntegerLiteral :: NoNZeroDigit DecimalDigigts" +---*/ //CHECK#1 if (11. !== 11) { @@ -52,4 +51,3 @@ if (88. !== 88) { if (99. !== 99) { $ERROR('#9: 99. === 99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T1.js index 5c0a5ffa70..d1e0315538 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigits - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.2_T1.js - * @description After DecimalIntegerLiteral. used ZeroDigit - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigits" +es5id: 7.8.3_A3.2_T1 +description: After DecimalIntegerLiteral. used ZeroDigit +---*/ //CHECK#0 if (0.0 !== 0) { @@ -57,4 +56,3 @@ if (8.0 !== 8) { if (9.0 !== 9) { $ERROR('#9: 9.0 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T2.js index 110c931e52..616e592210 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigits - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.2_T2.js - * @description After DecimalIntegerLiteral. used ZeroDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigits" +es5id: 7.8.3_A3.2_T2 +description: After DecimalIntegerLiteral. used ZeroDigits +---*/ //CHECK#0 if (0.00 !== 0) { @@ -57,4 +56,3 @@ if (8.00 !== 8) { if (9.00 !== 9) { $ERROR('#9: 9.00 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T3.js index fe293b95be..5d7ddee23a 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigits - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.2_T3.js - * @description After DecimalIntegerLiteral. used NoNZeroDigit - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigits" +es5id: 7.8.3_A3.2_T3 +description: After DecimalIntegerLiteral. used NoNZeroDigit +---*/ //CHECK#0 if (0.0 !== 0.0) { @@ -57,4 +56,3 @@ if (8.8 !== 8.8) { if (9.9 !== 9.9) { $ERROR('#9: 9.9 === 9.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T1.js index e0a6edba5f..d87acc871a 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T1.js - * @description ExponentPart :: e DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T1 +description: "ExponentPart :: e DecimalDigits" +---*/ //CHECK#0 if (0.e1 !== 0) { @@ -57,4 +56,3 @@ if (8.e1 !== 80) { if (9.e1 !== 90) { $ERROR('#9: 9.e1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T2.js index 034d2c5484..dba1d0d87d 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T2.js - * @description ExponentPart :: E DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T2 +description: "ExponentPart :: E DecimalDigits" +---*/ //CHECK#0 if (0.E1 !== 0) { @@ -57,4 +56,3 @@ if (8.E1 !== 80) { if (9.E1 !== 90) { $ERROR('#9: 9.E1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T3.js index a60c83d587..7b5d4477c3 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T3.js - * @description ExponentPart :: e -DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T3 +description: "ExponentPart :: e -DecimalDigits" +---*/ //CHECK#0 if (0.e-1 !== 0) { @@ -57,4 +56,3 @@ if (8.e-1 !== 0.8) { if (9.e-1 !== 0.9) { $ERROR('#9: 9.e-1 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T4.js index 9dc5be7a2e..05c0e2ea22 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T4.js - * @description ExponentPart :: E -DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T4 +description: "ExponentPart :: E -DecimalDigits" +---*/ //CHECK#0 if (0.E-1 !== 0) { @@ -57,4 +56,3 @@ if (8.E-1 !== 0.8) { if (9.E-1 !== 0.9) { $ERROR('#9: 9.E-1 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T5.js index 9b2e9b8207..c439e95b90 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T5.js - * @description ExponentPart :: e +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T5 +description: "ExponentPart :: e +DecimalDigits" +---*/ //CHECK#0 if (0.e+1 !== 0) { @@ -57,4 +56,3 @@ if (8.e+1 !== 80) { if (9.e+1 !== 90) { $ERROR('#9: 9.e+1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T6.js index 33c8a84c99..f5fa2dceb9 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T6.js - * @description ExponentPart :: E +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T6 +description: "ExponentPart :: E +DecimalDigits" +---*/ //CHECK#0 if (0.E+1 !== 0) { @@ -57,4 +56,3 @@ if (8.E+1 !== 80) { if (9.E+1 !== 90) { $ERROR('#9: 9.E+1 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T7.js index 628581d66f..7819eb98cc 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T7.js - * @description ExponentPart :: e 0 - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T7 +description: "ExponentPart :: e 0" +---*/ //CHECK#0 if (0.e0 !== 0) { @@ -57,4 +56,3 @@ if (8.e0 !== 8) { if (9.e0 !== 9) { $ERROR('#9: 9.e0 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T8.js index b6f2491243..4321d72e36 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.3_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.3_T8.js - * @description ExponentPart :: E 0 - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. ExponentPart" +es5id: 7.8.3_A3.3_T8 +description: "ExponentPart :: E 0" +---*/ //CHECK#0 if (0.E0 !== 0) { @@ -57,4 +56,3 @@ if (8.E0 !== 8) { if (9.E0 !== 9) { $ERROR('#9: 9.E0 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T1.js index 15ad5b2246..f4db101a9f 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T1.js - * @description ExponentPart :: e DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T1 +description: "ExponentPart :: e DecimalDigits" +---*/ //CHECK#0 if (0.0e1 !== 0) { @@ -57,4 +56,3 @@ if (8.8e1 !== 88) { if (9.9e1 !== 99) { $ERROR('#9: 9.9e1 === 99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T2.js index a3a67a30ee..2b551d5d67 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T2.js - * @description ExponentPart :: E DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T2 +description: "ExponentPart :: E DecimalDigits" +---*/ //CHECK#0 if (0.0E1 !== 0) { @@ -57,4 +56,3 @@ if (8.8E1 !== 88) { if (9.9E1 !== 99) { $ERROR('#9: 9.9E1 === 99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T3.js index fef945e475..8a7f039c91 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T3.js - * @description ExponentPart :: e -DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T3 +description: "ExponentPart :: e -DecimalDigits" +---*/ //CHECK#0 if (0.0e-1 !== 0) { @@ -57,4 +56,3 @@ if (8.8e-1 !== 0.88) { if (9.9e-1 !== 0.99) { $ERROR('#9: 9.9e-1 === 0.99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T4.js index f68532fd87..013ab4252f 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T4.js - * @description ExponentPart :: E -DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T4 +description: "ExponentPart :: E -DecimalDigits" +---*/ //CHECK#0 if (0.0E-1 !== 0) { @@ -57,4 +56,3 @@ if (8.8E-1 !== 0.88) { if (9.9E-1 !== 0.99) { $ERROR('#9: 9.9E-1 === 0.99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T5.js index 161105928a..967dceb296 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T5.js - * @description ExponentPart :: e +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T5 +description: "ExponentPart :: e +DecimalDigits" +---*/ //CHECK#0 if (0.0e+1 !== 0) { @@ -57,4 +56,3 @@ if (8.8e+1 !== 88) { if (9.9e+1 !== 99) { $ERROR('#9: 9.9e+1 === 99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T6.js index 5d28f66094..2984b46f4f 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T6.js - * @description ExponentPart :: E +DecimalDigits - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T6 +description: "ExponentPart :: E +DecimalDigits" +---*/ //CHECK#0 if (0.0E+1 !== 0) { @@ -57,4 +56,3 @@ if (8.8E+1 !== 88) { if (9.9E+1 !== 99) { $ERROR('#9: 9.9E+1 === 99'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T7.js index b5ebe39d4f..617489d8c7 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T7.js - * @description ExponentPart :: e 0 - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T7 +description: "ExponentPart :: e 0" +---*/ //CHECK#0 if (0.0e0 !== 0.0) { @@ -57,4 +56,3 @@ if (8.8e0 !== 8.8) { if (9.9e0 !== 9.9) { $ERROR('#9: 9.9e0 === 9.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T8.js index 36b643364d..47c3f9b886 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A3.4_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart - * - * @path ch07/7.8/7.8.3/S7.8.3_A3.4_T8.js - * @description ExponentPart :: E 0 - */ +/*--- +info: "DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart" +es5id: 7.8.3_A3.4_T8 +description: "ExponentPart :: E 0" +---*/ //CHECK#0 if (0.0E0 !== 0.0) { @@ -57,4 +56,3 @@ if (8.8E0 !== 8.8) { if (9.9E0 !== 9.9) { $ERROR('#9: 9.9E0 === 9.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T1.js index eaed76725c..000dce748e 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T1.js - * @description ExponentPart :: e DecimalDigits - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T1 +description: "ExponentPart :: e DecimalDigits" +flags: [negative] +---*/ //CHECK#1 e1 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T2.js index 306ed8ba2c..6625ffdf27 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T2.js - * @description ExponentPart :: E DecimalDigits - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T2 +description: "ExponentPart :: E DecimalDigits" +flags: [negative] +---*/ //CHECK#1 E1 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T3.js index b7c5e5a9fd..1d299cb344 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T3.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T3.js - * @description ExponentPart :: e DecimalDigits - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T3 +description: "ExponentPart :: e DecimalDigits" +flags: [negative] +---*/ //CHECK#1 e-1 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T4.js index fb21413d42..b8324463fb 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T4.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T4.js - * @description ExponentPart :: E DecimalDigits - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T4 +description: "ExponentPart :: E DecimalDigits" +flags: [negative] +---*/ //CHECK#1 E-1 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T5.js index 89719f0f70..ece71ed0fa 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T5.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T5.js - * @description ExponentPart :: e DecimalDigits - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T5 +description: "ExponentPart :: e DecimalDigits" +flags: [negative] +---*/ //CHECK#1 e+1 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T6.js index 533e23bc41..f4c2710492 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T6.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T6.js - * @description ExponentPart :: E DecimalDigits - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T6 +description: "ExponentPart :: E DecimalDigits" +flags: [negative] +---*/ //CHECK#1 E+1 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T7.js index d6475e50fd..b65398adce 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T7.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T7.js - * @description ExponentPart :: e 0 - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T7 +description: "ExponentPart :: e 0" +flags: [negative] +---*/ //CHECK#1 e0 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T8.js index 89e284f4f8..7e56e0b129 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.1_T8.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: ExponentPart is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.1_T8.js - * @description ExponentPart :: E 0 - * @negative - */ +/*--- +info: "DecimalLiteral :: ExponentPart is incorrect" +es5id: 7.8.3_A4.1_T8 +description: "ExponentPart :: E 0" +flags: [negative] +---*/ //CHECK#1 E0 - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T1.js index a925aaed9a..3784919ba0 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T1.js - * @description ExponentIndicator :: e - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T1 +description: "ExponentIndicator :: e" +---*/ //CHECK#0 if (0e01 !== 0) { @@ -57,4 +56,3 @@ if (8e01 !== 80) { if (9e01 !== 90) { $ERROR('#9: 9e01 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T2.js index bfc6f4eee1..eea1e62418 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T2.js - * @description ExponentIndicator :: E - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T2 +description: "ExponentIndicator :: E" +---*/ //CHECK#0 if (0E01 !== 0) { @@ -57,4 +56,3 @@ if (8E01 !== 80) { if (9E01 !== 90) { $ERROR('#9: 9E01 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T3.js index 15f7bf7bd9..8ff02c4299 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T3.js - * @description ExponentIndicator :: e - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T3 +description: "ExponentIndicator :: e" +---*/ //CHECK#0 if (0e-01 !== 0) { @@ -57,4 +56,3 @@ if (8e-01 !== 0.8) { if (9e-01 !== 0.9) { $ERROR('#9: 9e-01 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T4.js index 2682b8f0ec..e239359d3b 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T4.js - * @description ExponentIndicator :: E - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T4 +description: "ExponentIndicator :: E" +---*/ //CHECK#0 if (0E-01 !== 0) { @@ -57,4 +56,3 @@ if (8E-01 !== 0.8) { if (9E-01 !== 0.9) { $ERROR('#9: 9E-01 === 0.9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T5.js index 386daa9302..e05507ea51 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T5.js - * @description ExponentIndicator :: e - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T5 +description: "ExponentIndicator :: e" +---*/ //CHECK#0 if (0e+01 !== 0) { @@ -57,4 +56,3 @@ if (8e+01 !== 80) { if (9e+01 !== 90) { $ERROR('#9: 9e+01 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T6.js index df360f5ea8..5fa7379993 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T6.js - * @description ExponentIndicator :: E - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T6 +description: "ExponentIndicator :: E" +---*/ //CHECK#0 if (0E+01 !== 0) { @@ -57,4 +56,3 @@ if (8E+01 !== 80) { if (9E+01 !== 90) { $ERROR('#9: 9E+01 === 90'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T7.js index 9fbd8a679c..fa88dbb685 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T7.js - * @description ExponentIndicator :: e - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T7 +description: "ExponentIndicator :: e" +---*/ //CHECK#0 if (0e00 !== 0) { @@ -57,4 +56,3 @@ if (8e00 !== 8) { if (9e00 !== 9) { $ERROR('#9: 9e00 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T8.js index 2c62351faa..def21ea0d9 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A4.2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed - * - * @path ch07/7.8/7.8.3/S7.8.3_A4.2_T8.js - * @description ExponentIndicator :: E - */ +/*--- +info: "ExponentPart :: ExponentIndicator ( /+/-) 0 DecimalDigits is allowed" +es5id: 7.8.3_A4.2_T8 +description: "ExponentIndicator :: E" +---*/ //CHECK#0 if (0E00 !== 0) { @@ -57,4 +56,3 @@ if (8E00 !== 8) { if (9E00 !== 9) { $ERROR('#9: 9E00 === 9'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T1.js index 2e6b786b44..245c818b12 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T1.js - * @description HexIntegerLiteral :: 0x Digit - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T1 +description: "HexIntegerLiteral :: 0x Digit" +---*/ //CHECK#0 if (0x0 !== 0) { @@ -87,4 +86,3 @@ if (0xE !== 14) { if (0xF !== 15) { $ERROR('#F: 0xF === 15'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T2.js index ca55655e2e..7e465a5225 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T2.js - * @description HexIntegerLiteral :: 0X Digit - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T2 +description: "HexIntegerLiteral :: 0X Digit" +---*/ //CHECK#0 if (0X0 !== 0) { @@ -87,4 +86,3 @@ if (0XE !== 14) { if (0XF !== 15) { $ERROR('#F: 0XF === 15'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T3.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T3.js index 089a84112a..6857650766 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T3.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T3.js - * @description HexIntegerLiteral :: 0x NonZeroDigit Digits - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T3 +description: "HexIntegerLiteral :: 0x NonZeroDigit Digits" +---*/ //CHECK#0 if (0x0 !== 0) { @@ -52,4 +51,3 @@ if (0x1000000 !== 16777216) { if (0x10000000 !== 268435456) { $ERROR('#8: 0x10000000 === 268435456'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T4.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T4.js index 5ddc484a8b..9218cc90ba 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T4.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T4.js - * @description HexIntegerLiteral :: 0X NonZeroDigit Digits - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T4 +description: "HexIntegerLiteral :: 0X NonZeroDigit Digits" +---*/ //CHECK#0 if (0X0 !== 0) { @@ -52,4 +51,3 @@ if (0X1000000 !== 16777216) { if (0X10000000 !== 268435456) { $ERROR('#8: 0X10000000 === 268435456'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T5.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T5.js index da8e61ed48..df71987a70 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T5.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T5.js - * @description HexIntegerLiteral :: 0x0 Digits - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T5 +description: "HexIntegerLiteral :: 0x0 Digits" +---*/ //CHECK#0 if (0x00 !== 0) { @@ -52,4 +51,3 @@ if (0x01000000 !== 16777216) { if (0x010000000 !== 268435456) { $ERROR('#8: 0x010000000 === 268435456'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T6.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T6.js index 659c7dfbba..25a226cb4d 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T6.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T6.js - * @description HexIntegerLiteral :: 0X0 Digits - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T6 +description: "HexIntegerLiteral :: 0X0 Digits" +---*/ //CHECK#0 if (0X00 !== 0) { @@ -52,4 +51,3 @@ if (0X01000000 !== 16777216) { if (0X010000000 !== 268435456) { $ERROR('#8: 0X010000000 === 268435456'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T7.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T7.js index 7bc52989cd..c54720022f 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T7.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T7.js - * @description HexIntegerLiteral :: 0x one of a, b, c, d, e, f - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T7 +description: "HexIntegerLiteral :: 0x one of a, b, c, d, e, f" +---*/ //CHECK#a if (0xa !== 10) { @@ -37,4 +36,3 @@ if (0xe !== 14) { if (0xf !== 15) { $ERROR('#f: 0xf === 15'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T8.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T8.js index 1f95ab586e..e58bd227be 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T8.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A5.1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalLiteral :: HexIntegerLiteral - * - * @path ch07/7.8/7.8.3/S7.8.3_A5.1_T8.js - * @description HexIntegerLiteral :: 0X one of a, b, c, d, e, f - */ +/*--- +info: "DecimalLiteral :: HexIntegerLiteral" +es5id: 7.8.3_A5.1_T8 +description: "HexIntegerLiteral :: 0X one of a, b, c, d, e, f" +---*/ //CHECK#a if (0Xa !== 10) { @@ -37,4 +36,3 @@ if (0Xe !== 14) { if (0Xf !== 15) { $ERROR('#f: 0Xf === 15'); } - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T1.js index 3be2b908f5..ece509cfca 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HexIntegerLiteral :: 0(x/X) is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A6.1_T1.js - * @description Checking if execution of "0x" passes - * @negative - */ +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T1 +description: Checking if execution of "0x" passes +flags: [negative] +---*/ //CHECK#1 0x - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T2.js index 8b813b81fe..c99ba95879 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.1_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * HexIntegerLiteral :: 0(x/X) is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A6.1_T2.js - * @description Checking if execution of "0X" passes - * @negative - */ +/*--- +info: "HexIntegerLiteral :: 0(x/X) is incorrect" +es5id: 7.8.3_A6.1_T2 +description: Checking if execution of "0X" passes +flags: [negative] +---*/ //CHECK#1 0X - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T1.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T1.js index accd265894..c5283e76dc 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T1.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 0xG is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A6.2_T1.js - * @description Checking if execution of "0xG" fails - * @negative - */ +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T1 +description: Checking if execution of "0xG" fails +flags: [negative] +---*/ //CHECK#1 0xG - diff --git a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T2.js b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T2.js index 7a14fef29e..6fdd49ea23 100644 --- a/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T2.js +++ b/test/suite/ch07/7.8/7.8.3/S7.8.3_A6.2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 0xG is incorrect - * - * @path ch07/7.8/7.8.3/S7.8.3_A6.2_T2.js - * @description Checking if execution of "0xg" fails - * @negative - */ +/*--- +info: 0xG is incorrect +es5id: 7.8.3_A6.2_T2 +description: Checking if execution of "0xg" fails +flags: [negative] +---*/ //CHECK#1 0xg - diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-1-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-1-s.js index f5548e4f30..27ce5ba69a 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-1-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-1-s.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-1-s.js - * @description A directive preceeding an 'use strict' directive may not contain an OctalEscapeSequence - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-1-s +description: > + A directive preceeding an 'use strict' directive may not contain + an OctalEscapeSequence +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +24,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-10-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-10-s.js index c7069c0fac..37f467c118 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-10-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-10-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-10-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-10-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-11-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-11-s.js index 02e5264b9a..8d6956b9a1 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-11-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-11-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-11-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-11-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-12-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-12-s.js index 27211ab837..bf1c50dbd5 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-12-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-12-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-12-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-12-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-13-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-13-s.js index a5641d4918..141042526d 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-13-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-13-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-13-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-13-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-14-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-14-s.js index 11a3ceabaa..7fe0971c65 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-14-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-14-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-14-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-14-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-15-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-15-s.js index ddf59df331..47bdbad8bc 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-15-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-15-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-15-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-15-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-16-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-16-s.js index add6f1b163..260c999f7f 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-16-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-16-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-16-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-16-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-17-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-17-s.js index f132d927cc..15d97d7791 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-17-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-17-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-17-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-17-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-18-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-18-s.js index db679216f6..742b9d33f8 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-18-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-18-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-18-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-18-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-19-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-19-s.js index c1792cfa3c..f581442543 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-19-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-19-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-19-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-19-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-1gs.js b/test/suite/ch07/7.8/7.8.4/7.8.4-1gs.js index 4974d0b5f6..e0cbd6d5a4 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-1gs.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-1gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-1gs.js - * @description Strict Mode - OctalEscapeSequence(\0110) is forbidden in strict mode - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-1gs +description: > + Strict Mode - OctalEscapeSequence(\0110) is forbidden in strict + mode +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + "use strict"; throw NotEarlyError; -var _7_8_4_2 = '100abc\0110def'; +var _7_8_4_2 = '100abc\0110def'; diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-2-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-2-s.js index 5d5e02dc37..262d29db67 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-2-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-2-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-2-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-2-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-20-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-20-s.js index 170cb4c5a2..7a6cb4aab5 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-20-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-20-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-20-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-20-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-21-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-21-s.js index 1dca614fca..3f8f6366a6 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-21-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-21-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-21-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-21-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-22-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-22-s.js index dc73991479..d6c00a4463 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-22-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-22-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-22-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-22-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-23-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-23-s.js index e8d7c12040..549bc3ee99 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-23-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-23-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-23-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-23-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-24-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-24-s.js index e0cea8f6e6..aa8b0b2019 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-24-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-24-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-24-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-24-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-25-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-25-s.js index 060d0cd077..e372d80783 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-25-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-25-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-25-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-25-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-26-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-26-s.js index d986b4de94..e5394f8a50 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-26-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-26-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-26-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-26-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-27-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-27-s.js index b208bdb6fe..fe43a5b371 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-27-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-27-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-27-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-27-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-28-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-28-s.js index a0967eb8eb..5bb9710108 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-28-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-28-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-28-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-28-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-29-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-29-s.js index 60e65af657..c22ed6410f 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-29-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-29-s.js @@ -1,17 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-29-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-29-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -23,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-3-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-3-s.js index 0885c5c745..9354680722 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-3-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-3-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-3-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-3-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-30-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-30-s.js index 73cbdfedce..a74774b790 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-30-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-30-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-30-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-30-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-31-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-31-s.js index a33c8bbc64..96265d8edd 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-31-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-31-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-31-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-31-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-32-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-32-s.js index 312e870c3a..82d2ff934c 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-32-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-32-s.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-32-s.js - * @description Two OctalEscapeSequences in a String are not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-32-s +description: > + Two OctalEscapeSequences in a String are not allowed in a String + under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +24,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-33-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-33-s.js index 639313c92d..5f42d25fe4 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-33-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-33-s.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-33-s.js - * @description Three OctalEscapeSequences in a String are not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-33-s +description: > + Three OctalEscapeSequences in a String are not allowed in a String + under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +24,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-4-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-4-s.js index bd4e93fe62..fb1c366acc 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-4-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-4-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-4-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-4-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-5-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-5-s.js index 1108364abe..04d8e7418e 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-5-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-5-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-5-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-5-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-6-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-6-s.js index 1194157966..13b171900a 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-6-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-6-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-6-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-6-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-7-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-7-s.js index 254d2953e0..a2cf6f8af5 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-7-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-7-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-7-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-7-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-8-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-8-s.js index 04e3eac9ba..486f2ee061 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-8-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-8-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-8-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-8-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/7.8.4-9-s.js b/test/suite/ch07/7.8/7.8.4/7.8.4-9-s.js index 1efa2e57ae..afcd1cc668 100644 --- a/test/suite/ch07/7.8/7.8.4/7.8.4-9-s.js +++ b/test/suite/ch07/7.8/7.8.4/7.8.4-9-s.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.4/7.8.4-9-s.js - * @description An OctalEscapeSequence is not allowed in a String under Strict Mode - * @onlyStrict - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.4-9-s +description: An OctalEscapeSequence is not allowed in a String under Strict Mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + function testcase() { try @@ -21,4 +22,4 @@ function testcase() return (e instanceof SyntaxError); } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T1.js index 02c823418d..26e9ff8e6e 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: "DoubleStringCharacters_opt" - * - * @path ch07/7.8/7.8.4/S7.8.4_A1.1_T1.js - * @description DoubleStringCharacter :: SourceCharacter but not double-quote " or LineTerminator - * @negative - */ +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T1 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +flags: [negative] +---*/ //CHECK#1 """ - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T2.js index bedbcea865..e9f19686d0 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.1_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: "DoubleStringCharacters_opt" - * - * @path ch07/7.8/7.8.4/S7.8.4_A1.1_T2.js - * @description DoubleStringCharacter :: SourceCharacter but not double-quote " or LineTerminator - * @negative - */ +/*--- +info: "StringLiteral :: \"DoubleStringCharacters_opt\"" +es5id: 7.8.4_A1.1_T2 +description: > + DoubleStringCharacter :: SourceCharacter but not double-quote " or + LineTerminator +flags: [negative] +---*/ //CHECK#1 " " - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T1.js index 964e5be6c4..6d42906ef4 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: 'SingleStringCharacters_opt' - * - * @path ch07/7.8/7.8.4/S7.8.4_A1.2_T1.js - * @description SingleStringCharacter :: SourceCharacter but not single-quote ' or LineTerminator - * @negative - */ +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T1 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +flags: [negative] +---*/ //CHECK#1 ''' - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T2.js index 82890f5c27..2fee0e8d03 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A1.2_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: 'SingleStringCharacters_opt' - * - * @path ch07/7.8/7.8.4/S7.8.4_A1.2_T2.js - * @description SingleStringCharacter :: SourceCharacter but not single-quote ' or LineTerminator - * @negative - */ +/*--- +info: "StringLiteral :: 'SingleStringCharacters_opt'" +es5id: 7.8.4_A1.2_T2 +description: > + SingleStringCharacter :: SourceCharacter but not single-quote ' or + LineTerminator +flags: [negative] +---*/ //CHECK#1 ' ' - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T1.js index 9a555b814b..e434bb7f6b 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of ENGLISH ALPHABET - * - * @path ch07/7.8/7.8.4/S7.8.4_A2.1_T1.js - * @description Check ENGLISH CAPITAL ALPHABET - */ +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es5id: 7.8.4_A2.1_T1 +description: Check ENGLISH CAPITAL ALPHABET +---*/ //CHECK#A-Z var unicode = ["\u0041", "\u0042", "\u0043", "\u0044", "\u0045", "\u0046", "\u0047", "\u0048", "\u0049", "\u004A", "\u004B", "\u004C", "\u004D", "\u004E", "\u004F", "\u0050", "\u0051", "\u0052", "\u0053", "\u0054", "\u0055", "\u0056", "\u0057", "\u0058", "\u0059", "\u005A"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T2.js index f7e8ccfa35..b311a3228d 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of ENGLISH ALPHABET - * - * @path ch07/7.8/7.8.4/S7.8.4_A2.1_T2.js - * @description Check ENGLISH SMALL ALPHABET - */ +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es5id: 7.8.4_A2.1_T2 +description: Check ENGLISH SMALL ALPHABET +---*/ //CHECK#a-z var hex = ["\u0061", "\u0062", "\u0063", "\u0064", "\u0065", "\u0066", "\u0067", "\u0068", "\u0069", "\u006A", "\u006B", "\u006C", "\u006D", "\u006E", "\u006F", "\u0070", "\u0071", "\u0072", "\u0073", "\u0074", "\u0075", "\u0076", "\u0077", "\u0078", "\u0079", "\u007A"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T1.js index cefe28d570..f21a4ecf60 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of RUSSIAN ALPHABET - * - * @path ch07/7.8/7.8.4/S7.8.4_A2.2_T1.js - * @description Check RUSSIAN CAPITAL ALPHABET - */ +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es5id: 7.8.4_A2.2_T1 +description: Check RUSSIAN CAPITAL ALPHABET +---*/ //CHECK#А-Я var unicode = ["\u0410", "\u0411", "\u0412", "\u0413", "\u0414", "\u0415", "\u0416", "\u0417", "\u0418", "\u0419", "\u041A", "\u041B", "\u041C", "\u041D", "\u041E", "\u041F", "\u0420", "\u0421", "\u0422", "\u0423", "\u0424", "\u0425", "\u0426", "\u0427", "\u0428", "\u0429", "\u042A", "\u042B", "\u042C", "\u042D", "\u042E", "\u042F", "\u0401"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 32; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T2.js index 09fc5877b6..909459e805 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of RUSSIAN ALPHABET - * - * @path ch07/7.8/7.8.4/S7.8.4_A2.2_T2.js - * @description Check RUSSIAN SMALL ALPHABET - */ +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es5id: 7.8.4_A2.2_T2 +description: Check RUSSIAN SMALL ALPHABET +---*/ //CHECK#а-я var unicode = ["\u0430", "\u0431", "\u0432", "\u0433", "\u0434", "\u0435", "\u0436", "\u0437", "\u0438", "\u0439", "\u043A", "\u043B", "\u043C", "\u043D", "\u043E", "\u043F", "\u0440", "\u0441", "\u0442", "\u0443", "\u0444", "\u0445", "\u0446", "\u0447", "\u0448", "\u0449", "\u044A", "\u044B", "\u044C", "\u044D", "\u044E", "\u044F", "\u0451"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 32; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.3_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.3_T1.js index 30e6133b70..2e1cb1af00 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.3_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A2.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Correct interpretation of DIGITS - * - * @path ch07/7.8/7.8.4/S7.8.4_A2.3_T1.js - * @description Check DIGITS - */ +/*--- +info: Correct interpretation of DIGITS +es5id: 7.8.4_A2.3_T1 +description: Check DIGITS +---*/ //CHECK#0-9 var unicode = ["\u0030", "\u0031", "\u0032", "\u0033", "\u0034", "\u0035", "\u0036", "\u0037", "\u0038", "\u0039"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 9; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T1.js index f25e6538d3..7833281e1d 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: "\" or '\' is not correct - * - * @path ch07/7.8/7.8.4/S7.8.4_A3.1_T1.js - * @description Checking if execution of "\" fails - * @negative - */ +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T1 +description: Checking if execution of "\" fails +flags: [negative] +---*/ //CHECK#1 "\" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T2.js index 82cf8717b8..41d611118d 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.1_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: "\" or '\' is not correct - * - * @path ch07/7.8/7.8.4/S7.8.4_A3.1_T2.js - * @description Checking if execution of "'\'" fails - * @negative - */ +/*--- +info: "StringLiteral :: \"\\\" or '\\' is not correct" +es5id: 7.8.4_A3.1_T2 +description: Checking if execution of "'\'" fails +flags: [negative] +---*/ //CHECK#1 '\' - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T1.js index 54aaf12c67..4e06f85249 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: "\\\" or '\\\' is not correct - * - * @path ch07/7.8/7.8.4/S7.8.4_A3.2_T1.js - * @description Checking if execution of "\\\" fails - * @negative - */ +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T1 +description: Checking if execution of "\\\" fails +flags: [negative] +---*/ //CHECK#1 "\\\" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T2.js index a26421e766..a97f65464a 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A3.2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StringLiteral :: "\\\" or '\\\' is not correct - * - * @path ch07/7.8/7.8.4/S7.8.4_A3.2_T2.js - * @description Checking if execution of '\\\' fails - * @negative - */ +/*--- +info: "StringLiteral :: \"\\\\\\\" or '\\\\\\' is not correct" +es5id: 7.8.4_A3.2_T2 +description: Checking if execution of '\\\' fails +flags: [negative] +---*/ //CHECK#1 '\\\' - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T1.js index 9cac9a2d93..d7052418aa 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: SingleEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.1_T1.js - * @description SingleEscapeSequence :: one of b f n r t v - */ +/*--- +info: "CharacterEscapeSequnce :: SingleEscapeSequence" +es5id: 7.8.4_A4.1_T1 +description: "SingleEscapeSequence :: one of b f n r t v" +---*/ //CHECK#1 if (String.fromCharCode(0x0008) !== "\b") { @@ -37,4 +36,3 @@ if (String.fromCharCode(0x000C) !== "\f") { if (String.fromCharCode(0x000D) !== "\r") { $ERROR('#6: String.fromCharCode(0x000D) === "\\r"'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T2.js index c99f669efb..f41eeef4e9 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: SingleEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.1_T2.js - * @description SingleEscapeSequence :: one of ' " \ - */ +/*--- +info: "CharacterEscapeSequnce :: SingleEscapeSequence" +es5id: 7.8.4_A4.1_T2 +description: "SingleEscapeSequence :: one of ' \" \\" +---*/ //CHECK#1 if (String.fromCharCode(0x0027) !== "\'") { @@ -32,4 +31,3 @@ if ("\'" !== "'") { if ('\"' !== '"') { $ERROR('#5: \'\"\' === \'\\\"\''); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T1.js index 8abfdd0318..1d2a070f8b 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T1.js - * @description NonEscapeSequence :: ENGLISH CAPITAL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T1 +description: "NonEscapeSequence :: ENGLISH CAPITAL ALPHABET" +---*/ //CHECK#A-Z var CharacterCode = [0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + NonEscapeCharacter[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T2.js index 660d2e62ee..63627d64b2 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T2.js - * @description NonEscapeSequence :: ENGLISH CAPITAL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T2 +description: "NonEscapeSequence :: ENGLISH CAPITAL ALPHABET" +---*/ //CHECK#A-Z if ("A" !== "\A") { @@ -112,4 +111,3 @@ if ("Y" !== "\Y") { if ("Z" !== "\Z") { $ERROR('#Z'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T3.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T3.js index 39194063ae..eb845ba9c5 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T3.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T3.js - * @description NonEscapeSequence :: ENGLISH SMALL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T3 +description: "NonEscapeSequence :: ENGLISH SMALL ALPHABET" +---*/ //CHECK#a-z without b, f, n, r, t, v, x, u var CharacterCode = [0x0061, 0x0063, 0x0064, 0x0065, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006F, 0x0070, 0x0071, 0x0073, 0x0077, 0x0079, 0x007A]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 17; index++) { $ERROR('#' + NonEscapeCharacter[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T4.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T4.js index 19e61c5e14..99c90ca1e3 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T4.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T4.js - * @description NonEscapeSequence :: ENGLISH SMALL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T4 +description: "NonEscapeSequence :: ENGLISH SMALL ALPHABET" +---*/ //CHECK#a-z without b, f, n, r, t, v, x, u @@ -82,5 +81,3 @@ if ("y" !== "\y") { if ("z" !== "\z") { $ERROR('#z'); } - - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T5.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T5.js index 57c1b8efdc..7126d3eee3 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T5.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T5.js - * @description NonEscapeSequence :: RUSSIAN CAPITAL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T5 +description: "NonEscapeSequence :: RUSSIAN CAPITAL ALPHABET" +---*/ //CHECK#А-Я var CharacterCode = [0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, 0x0401]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 32; index++) { $ERROR('#' + NonEscapeCharacter[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T6.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T6.js index 86e7ac2cad..099e42565a 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T6.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T6.js - * @description NonEscapeSequence :: RUSSIAN CAPITAL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T6 +description: "NonEscapeSequence :: RUSSIAN CAPITAL ALPHABET" +---*/ //CHECK#А-Я @@ -141,4 +140,3 @@ if ("Я" !== "\Я") { if ("Ё" !== "\Ё") { $ERROR('#Ё'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T7.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T7.js index 78915dce4f..ba1d85f384 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T7.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T7.js - * @description NonEscapeSequence :: RUSSIAN SMALL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T7 +description: "NonEscapeSequence :: RUSSIAN SMALL ALPHABET" +---*/ //CHECK#а-я var CharacterCode = [0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, 0x0451]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 32; index++) { $ERROR('#' + NonEscapeCharacter[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T8.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T8.js index 3ef3f843e6..0800f04e39 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T8.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscapeSequnce :: NonEscapeSequence - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.2_T8.js - * @description NonEscapeSequence :: RUSSIAN SMALL ALPHABET - */ +/*--- +info: "CharacterEscapeSequnce :: NonEscapeSequence" +es5id: 7.8.4_A4.2_T8 +description: "NonEscapeSequence :: RUSSIAN SMALL ALPHABET" +---*/ //CHECK#а-я @@ -141,4 +140,3 @@ if ("я" !== "\я") { if ("ё" !== "\ё") { $ERROR('#ё'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T1.js index 96c823ee86..b0f5f43b1a 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NonEscapeSequence is not EscapeCharacter - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.3_T1.js - * @description EscapeCharacter :: DecimalDigits :: 1 - * @onlyStrict - * @negative - */ +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T1 +description: "EscapeCharacter :: DecimalDigits :: 1" +flags: + - onlyStrict + - negative +---*/ "use strict"; //CHECK#1 "\1" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T2.js index b7f743e49f..bf7cdd3f0d 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T2.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NonEscapeSequence is not EscapeCharacter - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.3_T2.js - * @description EscapeCharacter :: DecimalDigits :: 7 - * @onlyStrict - * @negative - */ +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T2 +description: "EscapeCharacter :: DecimalDigits :: 7" +flags: + - onlyStrict + - negative +---*/ "use strict"; //CHECK#1 "\7" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T7.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T7.js index 0639303429..cc46118dec 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T7.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A4.3_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NonEscapeSequence is not EscapeCharacter - * - * @path ch07/7.8/7.8.4/S7.8.4_A4.3_T7.js - * @description EscapeCharacter :: SingleEscapeCharacter :: one of b f n r t v - */ +/*--- +info: NonEscapeSequence is not EscapeCharacter +es5id: 7.8.4_A4.3_T7 +description: "EscapeCharacter :: SingleEscapeCharacter :: one of b f n r t v" +---*/ //CHECK#bfnrtv if ("b" === "\b") { @@ -32,5 +31,3 @@ if ("t" === "\t") { if ("v" === "\v") { $ERROR('#v'); } - - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T1.js index aa0acecb6c..537238b36b 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: 0 - * - * @path ch07/7.8/7.8.4/S7.8.4_A5.1_T1.js - * @description String.fromCharCode(0x0000) - */ +/*--- +info: "EscapeSequence :: 0" +es5id: 7.8.4_A5.1_T1 +description: String.fromCharCode(0x0000) +---*/ //CHECK#1 if (String.fromCharCode(0x0000) !== "\0") { $ERROR('#1: String.fromCharCode(0x0000) === "\\0"'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T2.js index 06830f0800..a07ed6a970 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: 0 - * - * @path ch07/7.8/7.8.4/S7.8.4_A5.1_T2.js - * @description "\u0000" - */ +/*--- +info: "EscapeSequence :: 0" +es5id: 7.8.4_A5.1_T2 +description: "\"\\u0000\"" +---*/ //CHECK#1 if ("\u0000" !== "\0") { $ERROR('#1: "\\u0000" === "\\0"'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T3.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T3.js index f7a1de6ac6..9e435c6788 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T3.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A5.1_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: 0 - * - * @path ch07/7.8/7.8.4/S7.8.4_A5.1_T3.js - * @description "\x00" - */ +/*--- +info: "EscapeSequence :: 0" +es5id: 7.8.4_A5.1_T3 +description: "\"\\x00\"" +---*/ //CHECK#1 if ("\x00" !== "\0") { $ERROR('#1: "\\x00" === "\\0"'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T1.js index ce8f5dae87..6e31e84c1c 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A6.1_T1.js - * @description HexEscapeSequence :: HexDigit - */ +/*--- +info: "EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit" +es5id: 7.8.4_A6.1_T1 +description: "HexEscapeSequence :: HexDigit" +---*/ //CHECK#0 if ("\x00" !== String.fromCharCode("0")) { @@ -87,4 +86,3 @@ if ("\x0E" !== String.fromCharCode("14")) { if ("\x0F" !== String.fromCharCode("15")) { $ERROR('#F: "\\x0F" === String.fromCharCode("15")'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T2.js index 64cdc0ebea..128da0eb2b 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A6.1_T2.js - * @description HexEscapeSequence :: ENGLISH CAPITAL ALPHABET - */ +/*--- +info: "EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit" +es5id: 7.8.4_A6.1_T2 +description: "HexEscapeSequence :: ENGLISH CAPITAL ALPHABET" +---*/ //CHECK#A-Z var hex = ["\x41", "\x42", "\x43", "\x44", "\x45", "\x46", "\x47", "\x48", "\x49", "\x4A", "\x4B", "\x4C", "\x4D", "\x4E", "\x4F", "\x50", "\x51", "\x52", "\x53", "\x54", "\x55", "\x56", "\x57", "\x58", "\x59", "\x5A"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T3.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T3.js index c3ef6e4d33..fa7a9fc5e0 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T3.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A6.1_T3.js - * @description HexEscapeSequence :: ENGLISH SMALL ALPHABET - */ +/*--- +info: "EscapeSequence :: HexEscapeSequence :: x HexDigit HexDigit" +es5id: 7.8.4_A6.1_T3 +description: "HexEscapeSequence :: ENGLISH SMALL ALPHABET" +---*/ //CHECK#a-z var hex = ["\x61", "\x62", "\x63", "\x64", "\x65", "\x66", "\x67", "\x68", "\x69", "\x6A", "\x6B", "\x6C", "\x6D", "\x6E", "\x6F", "\x70", "\x71", "\x72", "\x73", "\x74", "\x75", "\x76", "\x77", "\x78", "\x79", "\x7A"]; @@ -16,4 +15,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.3_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.3_T1.js index 4611ba25a5..1ac49225a4 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.3_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A6.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * \x HexDigit HexDigit SingleStringCharacter - * - * @path ch07/7.8/7.8.4/S7.8.4_A6.3_T1.js - * @description Check similar to ('\x01F' === String.fromCharCode('1') + 'F') - */ +/*--- +info: \x HexDigit HexDigit SingleStringCharacter +es5id: 7.8.4_A6.3_T1 +description: Check similar to ('\x01F' === String.fromCharCode('1') + 'F') +---*/ //CHECK#1 if ('\x01F' !== String.fromCharCode('1') + 'F') { @@ -82,4 +81,3 @@ if ('\x0E2' !== String.fromCharCode('14') + '2') { if ('\x0F1' !== String.fromCharCode('15') + '1') { $ERROR("#F: '\x0F1' === String.fromCharCode('15') + '1'"); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T1.js index 512de11f22..d8d6bc701d 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.1_T1.js - * @description Check similar to ("\u0000" === String.fromCharCode("0")) - */ +/*--- +info: > + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T1 +description: Check similar to ("\u0000" === String.fromCharCode("0")) +---*/ //CHECK#0 if ("\u0000" !== String.fromCharCode("0")) { @@ -87,4 +88,3 @@ if ("\u000E" !== String.fromCharCode("14")) { if ("\u000F" !== String.fromCharCode("15")) { $ERROR('#F: "\\u000F" === String.fromCharCode("15")'); } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T2.js index 32c6c34551..05a54383c9 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.1_T2.js - * @description UnicodeEscapeSequence :: ENGLISH CAPITAL ALPHABET - */ +/*--- +info: > + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T2 +description: "UnicodeEscapeSequence :: ENGLISH CAPITAL ALPHABET" +---*/ //CHECK#A-Z var unicode = ["\u0041", "\u0042", "\u0043", "\u0044", "\u0045", "\u0046", "\u0047", "\u0048", "\u0049", "\u004A", "\u004B", "\u004C", "\u004D", "\u004E", "\u004F", "\u0050", "\u0051", "\u0052", "\u0053", "\u0054", "\u0055", "\u0056", "\u0057", "\u0058", "\u0059", "\u005A"]; @@ -16,4 +17,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T3.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T3.js index 7bf3ef85c3..0b3cdb7f89 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T3.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.1_T3.js - * @description UnicodeEscapeSequence :: ENGLISH SMALL ALPHABET - */ +/*--- +info: > + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T3 +description: "UnicodeEscapeSequence :: ENGLISH SMALL ALPHABET" +---*/ //CHECK#a-z var unicode = ["\u0061", "\u0062", "\u0063", "\u0064", "\u0065", "\u0066", "\u0067", "\u0068", "\u0069", "\u006A", "\u006B", "\u006C", "\u006D", "\u006E", "\u006F", "\u0070", "\u0071", "\u0072", "\u0073", "\u0074", "\u0075", "\u0076", "\u0077", "\u0078", "\u0079", "\u007A"]; @@ -16,4 +17,3 @@ for (var index = 0; index <= 25; index++) { $ERROR('#' + character[index] + ' '); } } - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T4.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T4.js index 11b4f5620d..119d49822e 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T4.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.1_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.1_T4.js - * @description UnicodeEscapeSequence :: u000G is incorrect - * @negative - */ +/*--- +info: > + EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 7.8.4_A7.1_T4 +description: "UnicodeEscapeSequence :: u000G is incorrect" +flags: [negative] +---*/ //CHECK# "\u000G" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T1.js index 6c3cff0dd1..5ead748858 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.2_T1.js - * @description :: HexDigit :: 1 - * @negative - */ +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T1 +description: ":: HexDigit :: 1" +flags: [negative] +---*/ //CHECK#1 "\u1" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T2.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T2.js index c1918f4141..58cea9c898 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T2.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.2_T2.js - * @description :: HexDigit :: A - * @negative - */ +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T2 +description: ":: HexDigit :: A" +flags: [negative] +---*/ //CHECK#1 "\uA" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T3.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T3.js index b1eee59236..37a53be1dd 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T3.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T3.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.2_T3.js - * @description :: HexDigit :: 1 - * @negative - */ +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T3 +description: ":: HexDigit :: 1" +flags: [negative] +---*/ //CHECK#1 "\u11" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T4.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T4.js index 6fe1c8afe4..791a7c9d4a 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T4.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T4.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.2_T4.js - * @description :: HexDigit :: A - * @negative - */ +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T4 +description: ":: HexDigit :: A" +flags: [negative] +---*/ //CHECK#1 "\uAA" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T5.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T5.js index f047e53378..7d25bb2c32 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T5.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T5.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.2_T5.js - * @description :: HexDigit :: 1 - * @negative - */ +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T5 +description: ":: HexDigit :: 1" +flags: [negative] +---*/ //CHECK#1 "\u111" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T6.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T6.js index 5d28d4a5e7..a140caed84 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T6.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.2_T6.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.2_T6.js - * @description :: HexDigit :: A - * @negative - */ +/*--- +info: "UnicodeEscapeSequence :: u HexDigit (one, two or three time) is incorrect" +es5id: 7.8.4_A7.2_T6 +description: ":: HexDigit :: A" +flags: [negative] +---*/ //CHECK#1 "\uAAA" - diff --git a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.3_T1.js b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.3_T1.js index baaeaae6fa..7138e64922 100644 --- a/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.3_T1.js +++ b/test/suite/ch07/7.8/7.8.4/S7.8.4_A7.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * \u HexDigit HexDigit HexDigit HexDigit DoubleStringCharacter - * - * @path ch07/7.8/7.8.4/S7.8.4_A7.3_T1.js - * @description Check similar to ("\u0001F" === String.fromCharCode("1") + "F") - */ +/*--- +info: \u HexDigit HexDigit HexDigit HexDigit DoubleStringCharacter +es5id: 7.8.4_A7.3_T1 +description: Check similar to ("\u0001F" === String.fromCharCode("1") + "F") +---*/ //CHECK#1 if ("\u0001F" !== String.fromCharCode("1") + "F") { @@ -82,4 +81,3 @@ if ("\u000E2" !== String.fromCharCode("14") + "2") { if ("\u000F1" !== String.fromCharCode("15") + "1") { $ERROR('#F: "\\u000F1" === String.fromCharCode("15") + "1"'); } - diff --git a/test/suite/ch07/7.8/7.8.5/7.8.5-1.js b/test/suite/ch07/7.8/7.8.5/7.8.5-1.js index a8fe6e29fb..0c6037364d 100644 --- a/test/suite/ch07/7.8/7.8.5/7.8.5-1.js +++ b/test/suite/ch07/7.8/7.8.5/7.8.5-1.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch07/7.8/7.8.5/7.8.5-1.js - * @description Literal RegExp Objects - SyntaxError exception is thrown if the RegularExpressionNonTerminator position of a RegularExpressionBackslashSequence is a LineTerminator. - */ - - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.5-1 +description: > + Literal RegExp Objects - SyntaxError exception is thrown if the + RegularExpressionNonTerminator position of a + RegularExpressionBackslashSequence is a LineTerminator. +includes: [runTestCase.js] +---*/ + function testcase() { try { eval("var regExp = /\\\rn/;"); @@ -17,4 +21,4 @@ function testcase() { return e instanceof SyntaxError; } } -runTestCase(testcase); +runTestCase(testcase); diff --git a/test/suite/ch07/7.8/7.8.5/7.8.5-1gs.js b/test/suite/ch07/7.8/7.8.5/7.8.5-1gs.js index 4b22a61936..6cad8ce678 100644 --- a/test/suite/ch07/7.8/7.8.5/7.8.5-1gs.js +++ b/test/suite/ch07/7.8/7.8.5/7.8.5-1gs.js @@ -1,15 +1,14 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch07/7.8/7.8.5/7.8.5-1gs.js - * @description Empty literal RegExp should result in a SyntaxError - * @negative ^((?!NotEarlyError).)*$ - */ - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.5-1gs +description: Empty literal RegExp should result in a SyntaxError +negative: ^((?!NotEarlyError).)*$ +---*/ + throw NotEarlyError; -var re = //; - +var re = //; diff --git a/test/suite/ch07/7.8/7.8.5/7.8.5-2gs.js b/test/suite/ch07/7.8/7.8.5/7.8.5-2gs.js index b67638b03c..ca02dc3e09 100644 --- a/test/suite/ch07/7.8/7.8.5/7.8.5-2gs.js +++ b/test/suite/ch07/7.8/7.8.5/7.8.5-2gs.js @@ -1,13 +1,12 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch07/7.8/7.8.5/7.8.5-2gs.js - * @description Empty dynamic RegExp should not result in a SyntaxError - */ - -var re = new RegExp(""); - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 7.8.5-2gs +description: Empty dynamic RegExp should not result in a SyntaxError +---*/ + +var re = new RegExp(""); diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T1.js index 638177170a..f0f4f0112b 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: NonTerminator but not * or \ or /, - * RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.1_T1.js - * @description Without eval - */ +/*--- +info: > + RegularExpressionFirstChar :: NonTerminator but not * or \ or /, + RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] +es5id: 7.8.5_A1.1_T1 +description: Without eval +---*/ //CHECK#1 if (/1/.source !== "1") { @@ -32,5 +32,4 @@ if (/ /.source !== " ") { //CHECK#5 if (/\u0041/.source !== "\\u0041") { $ERROR('#5: /\\u0041/'); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T2.js index e46d2e24dc..c4b9db604b 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: NonTerminator but not * or \ or /, - * RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.1_T2.js - * @description Complex test with eval, using syntax pattern - */ +/*--- +info: > + RegularExpressionFirstChar :: NonTerminator but not * or \ or /, + RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] +es5id: 7.8.5_A1.1_T2 +description: Complex test with eval, using syntax pattern +---*/ //CHECK var errorCount = 0; @@ -52,4 +52,3 @@ for (var i1 = 0; i1 < 16; i1++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count); } - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T1.js index d7013d049b..4f285a3323 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: * or \ or / or [empty] is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.2_T1.js - * @description * - * @negative - */ +/*--- +info: "RegularExpressionFirstChar :: * or \\ or / or [empty] is incorrect" +es5id: 7.8.5_A1.2_T1 +description: "*" +flags: [negative] +---*/ //CHECK#1 /*/ - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T2.js index b050d8c536..f5788af9ac 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: * or \ or / or [empty] is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.2_T2.js - * @description \ - * @negative - */ +/*--- +info: "RegularExpressionFirstChar :: * or \\ or / or [empty] is incorrect" +es5id: 7.8.5_A1.2_T2 +description: \ +flags: [negative] +---*/ //CHECK#1 /\/ - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T3.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T3.js index abd943bac7..1f83641ebc 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T3.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: * or \ or / or [empty] is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.2_T3.js - * @description / - * @negative - */ +/*--- +info: "RegularExpressionFirstChar :: * or \\ or / or [empty] is incorrect" +es5id: 7.8.5_A1.2_T3 +description: / +flags: [negative] +---*/ //CHECK#1 /// .source; - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T4.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T4.js index 6d341f9913..c8e613b474 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T4.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.2_T4.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: * or \ or / or [empty] is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.2_T4.js - * @description [empty] - * @negative - */ +/*--- +info: "RegularExpressionFirstChar :: * or \\ or / or [empty] is incorrect" +es5id: 7.8.5_A1.2_T4 +description: "[empty]" +flags: [negative] +---*/ //CHECK#1 // .source; - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T1.js index 4fdba3e4cc..03a40762f7 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.3_T1.js - * @description Line Feed, without eval - * @negative - */ +/*--- +info: "RegularExpressionFirstChar :: LineTerminator is incorrect" +es5id: 7.8.5_A1.3_T1 +description: Line Feed, without eval +flags: [negative] +---*/ //CHECK#1 / / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T2.js index a2ac51235e..0a0a459c9a 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.3_T2.js - * @description Line Feed, with eval - */ +/*--- +info: "RegularExpressionFirstChar :: LineTerminator is incorrect" +es5id: 7.8.5_A1.3_T2 +description: Line Feed, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: Line Feed is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T3.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T3.js index 95d7ebcd6b..eb6727ff3b 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T3.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.3_T3.js - * @description Carriage Return, without eval - * @negative - */ +/*--- +info: "RegularExpressionFirstChar :: LineTerminator is incorrect" +es5id: 7.8.5_A1.3_T3 +description: Carriage Return, without eval +flags: [negative] +---*/ //CHECK#1 / / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T4.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T4.js index 638eecf69a..5f0e456b67 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T4.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.3_T4.js - * @description Carriage Return, with eval - */ +/*--- +info: "RegularExpressionFirstChar :: LineTerminator is incorrect" +es5id: 7.8.5_A1.3_T4 +description: Carriage Return, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: Carriage Return is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T5.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T5.js index c621df543f..a18ac77784 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T5.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.3_T5.js - * @description Line separator, with eval - */ +/*--- +info: "RegularExpressionFirstChar :: LineTerminator is incorrect" +es5id: 7.8.5_A1.3_T5 +description: Line separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: Line separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T6.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T6.js index 1ad88db223..3acb6c2c3b 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T6.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.3_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.3_T6.js - * @description Paragraph separator, with eval - */ +/*--- +info: "RegularExpressionFirstChar :: LineTerminator is incorrect" +es5id: 7.8.5_A1.3_T6 +description: Paragraph separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: Paragraph separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T1.js index 0c87e0b3df..ae824ab027 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator, - * RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.4_T1.js - * @description Check similar to (/\1/.source === "\\1") - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator, + RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] +es5id: 7.8.5_A1.4_T1 +description: Check similar to (/\1/.source === "\\1") +---*/ //CHECK#1 if (/\1/.source !== "\\1") { @@ -27,5 +27,4 @@ if (/\;/.source !== "\\;") { //CHECK#4 if (/\ /.source !== "\\ ") { $ERROR('#4: /\\ /'); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T2.js index f17d8332ae..1b4ceda621 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator, - * RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.4_T2.js - * @description Complex test with eval, using syntax pattern - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator, + RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty] +es5id: 7.8.5_A1.4_T2 +description: Complex test with eval, using syntax pattern +---*/ //CHECK var errorCount = 0; @@ -52,4 +52,3 @@ for (var i1 = 0; i1 < 16; i1++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count); } - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T1.js index 94a9734d0a..d691a51e3f 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.5_T1.js - * @description Line Feed, without eval - * @negative - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is + incorrect +es5id: 7.8.5_A1.5_T1 +description: Line Feed, without eval +flags: [negative] +---*/ //CHECK#1 /\ / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T2.js index 923e3f737e..dbdbbd91fc 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.5_T2.js - * @description Line Feed, with eval - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is + incorrect +es5id: 7.8.5_A1.5_T2 +description: Line Feed, with eval +---*/ //CHECK#1 try { @@ -17,5 +18,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\Line Feed is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T3.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T3.js index 3c349c10bd..fd05081ab6 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T3.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T3.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.5_T3.js - * @description Carriage Return, without eval - * @negative - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is + incorrect +es5id: 7.8.5_A1.5_T3 +description: Carriage Return, without eval +flags: [negative] +---*/ //CHECK#1 /\ / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T4.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T4.js index e5b89920a7..a5517a6b61 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T4.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.5_T4.js - * @description Carriage Return, with eval - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is + incorrect +es5id: 7.8.5_A1.5_T4 +description: Carriage Return, with eval +---*/ //CHECK#1 try { @@ -17,5 +18,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\Carriage Return is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T5.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T5.js index a9b6d96968..d1d019c7af 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T5.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.5_T5.js - * @description Line separator, with eval - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is + incorrect +es5id: 7.8.5_A1.5_T5 +description: Line separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +18,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\Line separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T6.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T6.js index 73345ed41a..d1818bc6c5 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T6.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A1.5_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A1.5_T6.js - * @description Paragraph separator, with eval - */ +/*--- +info: > + RegularExpressionFirstChar :: BackslashSequence :: \LineTerminator is + incorrect +es5id: 7.8.5_A1.5_T6 +description: Paragraph separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +18,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\Paragraph separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T1.js index 5b69da20da..ae16869f12 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: NonTerminator but not \ or /, - * RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.1_T1.js - * @description Without eval - */ +/*--- +info: > + RegularExpressionChar :: NonTerminator but not \ or /, + RegularExpressionFlags :: [empty] +es5id: 7.8.5_A2.1_T1 +description: Without eval +---*/ //CHECK#1 if (/1a/.source !== "1a") { @@ -32,5 +32,4 @@ if (/ /.source !== " ") { //CHECK#5 if (/a\u0041/.source !== "a\\u0041") { $ERROR('#5: /a\\u0041/'); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T2.js index b8e66b23ee..216918c58d 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: NonTerminator but not \ or /, - * RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.1_T2.js - * @description Complex test with eval, using syntax pattern - */ +/*--- +info: > + RegularExpressionChar :: NonTerminator but not \ or /, + RegularExpressionFlags :: [empty] +es5id: 7.8.5_A2.1_T2 +description: Complex test with eval, using syntax pattern +---*/ //CHECK var errorCount = 0; @@ -53,4 +53,3 @@ for (var i1 = 0; i1 < 16; i1++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count); } - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T1.js index 8231c04076..a177c10296 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: \ or / is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.2_T1.js - * @description \ - * @negative - */ +/*--- +info: "RegularExpressionChar :: \\ or / is incorrect" +es5id: 7.8.5_A2.2_T1 +description: \ +flags: [negative] +---*/ //CHECK#1 /a\/ - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T2.js index b80f21691d..4c6b4235c5 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: \ or / is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.2_T2.js - * @description / - * @negative - */ +/*--- +info: "RegularExpressionChar :: \\ or / is incorrect" +es5id: 7.8.5_A2.2_T2 +description: / +flags: [negative] +---*/ //CHECK#1 /a//.source; - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T1.js index fd42341e0e..508d99009e 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.3_T1.js - * @description Line Feed, without eval - * @negative - */ +/*--- +info: "RegularExpressionChar :: LineTerminator is incorrect" +es5id: 7.8.5_A2.3_T1 +description: Line Feed, without eval +flags: [negative] +---*/ //CHECK#1 /a / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T2.js index 8f3523088b..d6929c98be 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.3_T2.js - * @description Line Feed, with eval - */ +/*--- +info: "RegularExpressionChar :: LineTerminator is incorrect" +es5id: 7.8.5_A2.3_T2 +description: Line Feed, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: Line Feed is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T3.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T3.js index c9debb5c53..437b6737ad 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T3.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.3_T3.js - * @description Carriage Return, without eval - * @negative - */ +/*--- +info: "RegularExpressionChar :: LineTerminator is incorrect" +es5id: 7.8.5_A2.3_T3 +description: Carriage Return, without eval +flags: [negative] +---*/ //CHECK#1 /a / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T4.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T4.js index 4c2dda3848..1a1e0698bf 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T4.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.3_T4.js - * @description Carriage Return, with eval - */ +/*--- +info: "RegularExpressionChar :: LineTerminator is incorrect" +es5id: 7.8.5_A2.3_T4 +description: Carriage Return, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: Carriage Retur is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T5.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T5.js index 85d43801f7..eda5ce5e22 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T5.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.3_T5.js - * @description Line separator, with eval - */ +/*--- +info: "RegularExpressionChar :: LineTerminator is incorrect" +es5id: 7.8.5_A2.3_T5 +description: Line separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: Line separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T6.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T6.js index abf9833c5f..f658cc5025 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T6.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.3_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.3_T6.js - * @description Paragraph separator, with eval - */ +/*--- +info: "RegularExpressionChar :: LineTerminator is incorrect" +es5id: 7.8.5_A2.3_T6 +description: Paragraph separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: Paragraph separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T1.js index 8a67dc42ae..72f4ea5467 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \NonTerminator, - * RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.4_T1.js - * @description Check similar to (/a\1/.source === "a\\1") - */ +/*--- +info: > + RegularExpressionChar :: BackslashSequence :: \NonTerminator, + RegularExpressionFlags :: [empty] +es5id: 7.8.5_A2.4_T1 +description: Check similar to (/a\1/.source === "a\\1") +---*/ //CHECK#1 if (/a\1/.source !== "a\\1") { @@ -27,5 +27,4 @@ if (/,\;/.source !== ",\\;") { //CHECK#4 if (/ \ /.source !== " \\ ") { $ERROR('#4: / \\ /'); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T2.js index fa26a976bd..b64ded43f0 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \NonTerminator, - * RegularExpressionFlags :: [empty] - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.4_T2.js - * @description Complex test with eval, using syntax pattern - */ +/*--- +info: > + RegularExpressionChar :: BackslashSequence :: \NonTerminator, + RegularExpressionFlags :: [empty] +es5id: 7.8.5_A2.4_T2 +description: Complex test with eval, using syntax pattern +---*/ //CHECK var errorCount = 0; @@ -52,4 +52,3 @@ for (var i1 = 0; i1 < 16; i1++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count); } - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T1.js index a3d5e5b4e9..6c901c6e1b 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.5_T1.js - * @description Line Feed, without eval - * @negative - */ +/*--- +info: "RegularExpressionChar :: BackslashSequence :: \\LineTerminator is incorrect" +es5id: 7.8.5_A2.5_T1 +description: Line Feed, without eval +flags: [negative] +---*/ //CHECK#1 /a\ / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T2.js index 685ada093e..6b459e34fe 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.5_T2.js - * @description Line Feed, with eval - */ +/*--- +info: "RegularExpressionChar :: BackslashSequence :: \\LineTerminator is incorrect" +es5id: 7.8.5_A2.5_T2 +description: Line Feed, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\Line Feed is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T3.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T3.js index e858218706..414da68fba 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T3.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.5_T3.js - * @description Carriage Return, without eval - * @negative - */ +/*--- +info: "RegularExpressionChar :: BackslashSequence :: \\LineTerminator is incorrect" +es5id: 7.8.5_A2.5_T3 +description: Carriage Return, without eval +flags: [negative] +---*/ //CHECK#1 /a\ / - diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T4.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T4.js index 5cdea0817a..18ba23b647 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T4.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.5_T4.js - * @description Carriage Return, with eval - */ +/*--- +info: "RegularExpressionChar :: BackslashSequence :: \\LineTerminator is incorrect" +es5id: 7.8.5_A2.5_T4 +description: Carriage Return, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\Carriage Return is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T5.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T5.js index acc1f30802..1e74d005f8 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T5.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.5_T5.js - * @description Line separator, with eval - */ +/*--- +info: "RegularExpressionChar :: BackslashSequence :: \\LineTerminator is incorrect" +es5id: 7.8.5_A2.5_T5 +description: Line separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\Line separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T6.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T6.js index d330410216..2ed5331429 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T6.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A2.5_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionChar :: BackslashSequence :: \LineTerminator is incorrect - * - * @path ch07/7.8/7.8.5/S7.8.5_A2.5_T6.js - * @description Paragraph separator, with eval - */ +/*--- +info: "RegularExpressionChar :: BackslashSequence :: \\LineTerminator is incorrect" +es5id: 7.8.5_A2.5_T6 +description: Paragraph separator, with eval +---*/ //CHECK#1 try { @@ -17,5 +16,4 @@ catch (e) { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\Paragraph separator is incorrect. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T1.js index 14ea4d7eaf..fff21e44f3 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T1.js - * @description IdentifierPart :: g - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T1 +description: "IdentifierPart :: g" +---*/ //CHECK#1 var regexp = /(?:)/g; @@ -22,5 +21,4 @@ if (regexp.ignoreCase !== false) { //CHECK#3 if (regexp.multiline !== false) { $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === false. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T2.js index f247140d28..fa1375a610 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T2.js - * @description IdentifierPart :: i - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T2 +description: "IdentifierPart :: i" +---*/ //CHECK#1 var regexp = /(?:)/i; @@ -22,5 +21,4 @@ if (regexp.ignoreCase !== true) { //CHECK#3 if (regexp.multiline !== false) { $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === false. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T3.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T3.js index 4f0e6f14d2..9aabdd8fbb 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T3.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T3.js - * @description IdentifierPart :: m - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T3 +description: "IdentifierPart :: m" +---*/ //CHECK#1 var regexp = /(?:)/m; @@ -22,5 +21,4 @@ if (regexp.ignoreCase !== false) { //CHECK#3 if (regexp.multiline !== true) { $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === true. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T4.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T4.js index fd56ca01cc..648d83d85e 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T4.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T4.js - * @description IdentifierPart :: gi - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T4 +description: "IdentifierPart :: gi" +---*/ //CHECK#1 var regexp = /(?:)/gi; @@ -22,5 +21,4 @@ if (regexp.ignoreCase !== true) { //CHECK#3 if (regexp.multiline !== false) { $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === false. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T5.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T5.js index 3b45a94ca8..4509698a79 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T5.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T5.js - * @description IdentifierPart :: mg - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T5 +description: "IdentifierPart :: mg" +---*/ //CHECK#1 var regexp = /(?:)/mg; @@ -22,5 +21,4 @@ if (regexp.ignoreCase !== false) { //CHECK#3 if (regexp.multiline !== true) { $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === true. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T6.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T6.js index fb188ed6c1..bdd843002c 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T6.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T6.js - * @description IdentifierPart :: mig - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T6 +description: "IdentifierPart :: mig" +---*/ //CHECK#1 var regexp = /(?:)/mig; @@ -22,5 +21,4 @@ if (regexp.ignoreCase !== true) { //CHECK#3 if (regexp.multiline !== true) { $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === true. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T7.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T7.js index 299241d4c3..32ea84b120 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T7.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T7.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T7.js - * @description IdentifierPart :: \u0067 (g) - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T7 +description: "IdentifierPart :: \\u0067 (g)" +---*/ //CHECK#1 var regexp; eval("regexp = /(?:)/\u0067"); if (regexp.global !== true) { $ERROR('#1: var regexp = /(?:)/\\u0067; regexp.global === true. Actual: ' + (regexp.global)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T8.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T8.js index de78b6f23c..1a44b782e1 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T8.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T8.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T8.js - * @description IdentifierPart :: \u0069 (i) - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T8 +description: "IdentifierPart :: \\u0069 (i)" +---*/ //CHECK#1 var regexp; eval("regexp = /(?:)/\u0069"); if (regexp.ignoreCase !== true) { $ERROR('#1: var regexp = /(?:)/\\u0069; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T9.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T9.js index 132586af41..1032903d56 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T9.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A3.1_T9.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegularExpressionFlags :: IdentifierPart - * - * @path ch07/7.8/7.8.5/S7.8.5_A3.1_T9.js - * @description IdentifierPart :: \u006D (m) - */ +/*--- +info: "RegularExpressionFlags :: IdentifierPart" +es5id: 7.8.5_A3.1_T9 +description: "IdentifierPart :: \\u006D (m)" +---*/ //CHECK#1 var regexp; eval("regexp = /(?:)/\u006D"); if (regexp.multiline !== true) { $ERROR('#1: var regexp = /(?:)/\\u006D; regexp.multiline === true. Actual: ' + (regexp.multiline)); -} - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.1.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.1.js index d8f33d67df..5a5de447dc 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.1.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A regular expression literal is an input element that is converted to - * a RegExp object when it is scanned - * - * @path ch07/7.8/7.8.5/S7.8.5_A4.1.js - * @description Check ((/(?:)/ instanceof RegExp) === true) - */ +/*--- +info: > + A regular expression literal is an input element that is converted to + a RegExp object when it is scanned +es5id: 7.8.5_A4.1 +description: "Check ((/(?:)/ instanceof RegExp) === true)" +---*/ //CHECK#1 if ((/(?:)/ instanceof RegExp) !== true) { $ERROR('#1: (/(?:)/ instanceof RegExp) === true. Actual: ' + ((/(?:)/ instanceof RegExp))); -} - - +} diff --git a/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.2.js b/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.2.js index 569e4cbd2d..c1ce2b4847 100644 --- a/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.2.js +++ b/test/suite/ch07/7.8/7.8.5/S7.8.5_A4.2.js @@ -1,20 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Two regular expression literals in a program evaluate to - * regular expression objects that never compare as === to each other even - * if the two literals' contents are identical - * - * @path ch07/7.8/7.8.5/S7.8.5_A4.2.js - * @description Check equality two regular expression literals - */ +/*--- +info: > + Two regular expression literals in a program evaluate to + regular expression objects that never compare as === to each other even + if the two literals' contents are identical +es5id: 7.8.5_A4.2 +description: Check equality two regular expression literals +---*/ //CHECK#1 var regexp1 = /(?:)/; var regexp2 = /(?:)/; if (regexp1 === regexp2) { $ERROR('#1: var regexp1 = /(?:)/; var regexp2 = /(?:)/; regexp1 !== regexp2'); -} - - +} diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T1.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T1.js index 566fbbf47a..873318739a 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T1.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T1.js - * @description { 1 2 } 3 is not a valid sentence in the ECMAScript grammar - * @negative - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T1 +description: "{ 1 2 } 3 is not a valid sentence in the ECMAScript grammar" +flags: [negative] +---*/ //CHECK#1 { 1 2 } 3 - diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T2.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T2.js index 565d860a23..08c269009a 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T2.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T2.js - * @description { 1 \n 2 } 3 is a valid sentence in the ECMAScript grammar with automatic semicolon insertion - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T2 +description: > + { 1 \n 2 } 3 is a valid sentence in the ECMAScript grammar with + automatic semicolon insertion +---*/ //CHECK#1 { 1 2 } 3 - diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T3.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T3.js index ab0d032659..96ada674c9 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T3.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T3.js - * @description for( a ; b \n ) is not a valid sentence in the ECMAScript grammar - * @negative - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T3 +description: for( a ; b \n ) is not a valid sentence in the ECMAScript grammar +flags: [negative] +---*/ //CHECK#1 for( a ; b ) - diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T4.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T4.js index e4c39798a2..616c9d34a7 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T4.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T4.js - * @description return \n a+b is a valid sentence in the ECMAScript grammar - * with automatic semicolon insertion, but returned undefined - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T4 +description: > + return \n a+b is a valid sentence in the ECMAScript grammar with + automatic semicolon insertion, but returned undefined +---*/ //CHECK#1 var a=1,b=2; @@ -17,4 +17,3 @@ function test(){ } var x=test(); if (x!==undefined) $ERROR('#1: Automatic semicolon insertion not work with return'); - diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T5.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T5.js index 3ca074a17d..4ceaf7da7a 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T5.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T5.js - * @description a=b \n ++c is a valid sentence in the ECMAScript grammar - * with automatic semicolon insertion, but a!==b++c - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T5 +description: > + a=b \n ++c is a valid sentence in the ECMAScript grammar with + automatic semicolon insertion, but a!==b++c +---*/ //CHECK#1 var a=1,b=2,c=3; @@ -15,4 +15,3 @@ a=b ++c if (a!==b) $ERROR('#1: Automatic semicolon insertion not work with ++'); - diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T6.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T6.js index 8284f932a3..1873d39921 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T6.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T6.js - * @description if(a>b) \n else c=d is not a valid sentence in the ECMAScript grammar - * @negative - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T6 +description: > + if(a>b) \n else c=d is not a valid sentence in the ECMAScript + grammar +flags: [negative] +---*/ //CHECK#1 var a=1,b=2,c=3,d; if(a>b) else c=d - diff --git a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T7.js b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T7.js index b2e1697bb0..a434fb317e 100644 --- a/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T7.js +++ b/test/suite/ch07/7.9/7.9.2/S7.9.2_A1_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check examples for automatic semicolon insertion from the Standart - * - * @path ch07/7.9/7.9.2/S7.9.2_A1_T7.js - * @description a=b+c \n (d+e).print() is a valid sentence in the ECMAScript grammar, - * and automatic semicolon insertion not run - */ +/*--- +info: Check examples for automatic semicolon insertion from the Standart +es5id: 7.9.2_A1_T7 +description: > + a=b+c \n (d+e).print() is a valid sentence in the ECMAScript + grammar, and automatic semicolon insertion not run +---*/ //CHECK#1 function c (a){ @@ -20,4 +20,3 @@ a=b+c (d+e) if (a !== 20) $ERROR('#1: Automatic semicolon insertion work wrong'); - diff --git a/test/suite/ch07/7.9/S7.9_A1.js b/test/suite/ch07/7.9/S7.9_A1.js index 47b1453b5e..c22fd5a565 100644 --- a/test/suite/ch07/7.9/S7.9_A1.js +++ b/test/suite/ch07/7.9/S7.9_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Continue Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A1.js - * @description Try use continue \n Label construction - */ +/*--- +info: Check Continue Statement for automatic semicolon insertion +es5id: 7.9_A1 +description: Try use continue \n Label construction +---*/ //CHECK#1 label1: for (var i = 0; i <= 0; i++) { @@ -35,4 +34,3 @@ label2: for (var i = 0; i <= 1; i++) { if (result !== true) { $ERROR('#2: Check continue statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A10_T1.js b/test/suite/ch07/7.9/S7.9_A10_T1.js index 6b884101eb..b5f291023d 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T1.js +++ b/test/suite/ch07/7.9/S7.9_A10_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T1.js - * @description Checking if execution of "1 * {}" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T1 +description: Checking if execution of "1 * {}" passes +---*/ //CHECK#1 1 * {} - diff --git a/test/suite/ch07/7.9/S7.9_A10_T10.js b/test/suite/ch07/7.9/S7.9_A10_T10.js index b1fff1247f..6e2808217c 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T10.js +++ b/test/suite/ch07/7.9/S7.9_A10_T10.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T10.js - * @description Checking if execution of "{a:1 \n} 3" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T10 +description: "Checking if execution of \"{a:1 \\n} 3\" passes" +---*/ //CHECK#1 {a:1 } 3 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T11.js b/test/suite/ch07/7.9/S7.9_A10_T11.js index 0b28b5e11e..137eb88c81 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T11.js +++ b/test/suite/ch07/7.9/S7.9_A10_T11.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T11.js - * @description Checking if execution of "{a:1 \n} \n 3" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T11 +description: "Checking if execution of \"{a:1 \\n} \\n 3\" passes" +---*/ //CHECK#1 {a:1 } 3 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T12.js b/test/suite/ch07/7.9/S7.9_A10_T12.js index 600aaa5ac4..58ce4c5943 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T12.js +++ b/test/suite/ch07/7.9/S7.9_A10_T12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T12.js - * @description Checking if execution of "{ \n a: \n 1 \n } \n 3" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T12 +description: "Checking if execution of \"{ \\n a: \\n 1 \\n } \\n 3\" passes" +---*/ //CHECK#1 { @@ -14,4 +13,3 @@ a: 1 } 3 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T2.js b/test/suite/ch07/7.9/S7.9_A10_T2.js index 762a4a9107..b028e20fbf 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T2.js +++ b/test/suite/ch07/7.9/S7.9_A10_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T2.js - * @description Checking if execution of "{}*1" fails - * @negative - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T2 +description: Checking if execution of "{}*1" fails +flags: [negative] +---*/ //CHECK#1 {} * 1 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T3.js b/test/suite/ch07/7.9/S7.9_A10_T3.js index 9026314819..432b952e85 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T3.js +++ b/test/suite/ch07/7.9/S7.9_A10_T3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T3.js - * @description Checking if execution of "({}) * 1" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T3 +description: Checking if execution of "({}) * 1" passes +---*/ //CHECK#1 ({}) * 1 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T4.js b/test/suite/ch07/7.9/S7.9_A10_T4.js index fcd18b6657..80ee69fa1f 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T4.js +++ b/test/suite/ch07/7.9/S7.9_A10_T4.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T4.js - * @description Checking if execution of "({};)*1" fails - * @negative - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T4 +description: Checking if execution of "({};)*1" fails +flags: [negative] +---*/ //CHECK#1 ({};) * 1 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T5.js b/test/suite/ch07/7.9/S7.9_A10_T5.js index 47b59d8c09..80e1a0ba47 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T5.js +++ b/test/suite/ch07/7.9/S7.9_A10_T5.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T5.js - * @description Checking if execution of "( \n {} \n ) * 1" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T5 +description: Checking if execution of "( \n {} \n ) * 1" passes +---*/ //CHECK#1 ( {} ) * 1 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T6.js b/test/suite/ch07/7.9/S7.9_A10_T6.js index e900fc8c5a..e4b4e6826a 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T6.js +++ b/test/suite/ch07/7.9/S7.9_A10_T6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T6.js - * @description Checking if execution of "{} \n * 1" fails - * @negative - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T6 +description: Checking if execution of "{} \n * 1" fails +flags: [negative] +---*/ //CHECK#1 {} * 1 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T7.js b/test/suite/ch07/7.9/S7.9_A10_T7.js index 7cc00a70e6..dba768216b 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T7.js +++ b/test/suite/ch07/7.9/S7.9_A10_T7.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T7.js - * @description Checking if execution of "{1} 2" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T7 +description: Checking if execution of "{1} 2" passes +---*/ //CHECK#1 {1} 2 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T8.js b/test/suite/ch07/7.9/S7.9_A10_T8.js index 08b3fe5640..27ca52fff2 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T8.js +++ b/test/suite/ch07/7.9/S7.9_A10_T8.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T8.js - * @description Checking if execution of "{1 2} 3" fails - * @negative - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T8 +description: Checking if execution of "{1 2} 3" fails +flags: [negative] +---*/ //CHECK#1 {1 2} 3 - diff --git a/test/suite/ch07/7.9/S7.9_A10_T9.js b/test/suite/ch07/7.9/S7.9_A10_T9.js index 03daf8d9da..144d411732 100644 --- a/test/suite/ch07/7.9/S7.9_A10_T9.js +++ b/test/suite/ch07/7.9/S7.9_A10_T9.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check {} for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A10_T9.js - * @description Checking if execution of "{1 \n 2} 3" passes - */ +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T9 +description: Checking if execution of "{1 \n 2} 3" passes +---*/ //CHECK#1 {1 2} 3 - diff --git a/test/suite/ch07/7.9/S7.9_A11_T1.js b/test/suite/ch07/7.9/S7.9_A11_T1.js index 7acebb81ef..29460995af 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T1.js +++ b/test/suite/ch07/7.9/S7.9_A11_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T1.js - * @description Use if (false) x = 1 (without semicolon) and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T1 +description: Use if (false) x = 1 (without semicolon) and check x +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ if (false) x = 1 if (x !== 0) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T10.js b/test/suite/ch07/7.9/S7.9_A11_T10.js index d7304465b9..ad970be298 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T10.js +++ b/test/suite/ch07/7.9/S7.9_A11_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T10.js - * @description Use if (false) {x = 1} else {x=-1} and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T10 +description: Use if (false) {x = 1} else {x=-1} and check x +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ if (false) {x = 1} else {x = -1} if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T11.js b/test/suite/ch07/7.9/S7.9_A11_T11.js index 008a365bbc..74d3cf338d 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T11.js +++ b/test/suite/ch07/7.9/S7.9_A11_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T11.js - * @description Use if (false) {{x = 1};} \n else x=-1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T11 +description: Use if (false) {{x = 1};} \n else x=-1 and check x +---*/ //CHECK#1 var x = 0; @@ -15,4 +14,3 @@ else x = -1 if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T2.js b/test/suite/ch07/7.9/S7.9_A11_T2.js index bcb0ccd65a..2f41ca16e2 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T2.js +++ b/test/suite/ch07/7.9/S7.9_A11_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T2.js - * @description Use if (false) \n x = 1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T2 +description: Use if (false) \n x = 1 and check x +---*/ //CHECK#1 var x = 0; @@ -15,4 +14,3 @@ x = 1 if (x !== 0) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T3.js b/test/suite/ch07/7.9/S7.9_A11_T3.js index 12df0b4a96..87e5b6f431 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T3.js +++ b/test/suite/ch07/7.9/S7.9_A11_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T3.js - * @description Use if (false);\n x = 1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T3 +description: Use if (false);\n x = 1 and check x +---*/ //CHECK#1 var x = 0; @@ -15,4 +14,3 @@ x = 1 if (x !== 1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T4.js b/test/suite/ch07/7.9/S7.9_A11_T4.js index d5ab788db3..e2a63e8cc0 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T4.js +++ b/test/suite/ch07/7.9/S7.9_A11_T4.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T4.js - * @description Checking if execution of "if (false) x = 1 else x = -1" fails - * @negative - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T4 +description: Checking if execution of "if (false) x = 1 else x = -1" fails +flags: [negative] +---*/ //CHECK#1 var x = 0; if (false) x = 1 else x = -1 - diff --git a/test/suite/ch07/7.9/S7.9_A11_T5.js b/test/suite/ch07/7.9/S7.9_A11_T5.js index 22cfac9cfd..b681576ce3 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T5.js +++ b/test/suite/ch07/7.9/S7.9_A11_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T5.js - * @description Use if (false) x = 1; else x=-1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T5 +description: Use if (false) x = 1; else x=-1 and check x +---*/ //CHECK#1 var x = 0; @@ -14,4 +13,3 @@ if (false) x = 1; else x = -1 if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T6.js b/test/suite/ch07/7.9/S7.9_A11_T6.js index b5555429cc..6ac0504815 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T6.js +++ b/test/suite/ch07/7.9/S7.9_A11_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T6.js - * @description Use if (false) x = 1 \n else x=-1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T6 +description: Use if (false) x = 1 \n else x=-1 and check x +---*/ //CHECK#1 var x = 0; @@ -15,4 +14,3 @@ else x = -1 if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T7.js b/test/suite/ch07/7.9/S7.9_A11_T7.js index 98fc0aea9e..2faa59c0e3 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T7.js +++ b/test/suite/ch07/7.9/S7.9_A11_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T7.js - * @description Use if (false) x = 1; \n else x=-1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T7 +description: Use if (false) x = 1; \n else x=-1 and check x +---*/ //CHECK#1 var x = 0; @@ -15,4 +14,3 @@ else x = -1 if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T8.js b/test/suite/ch07/7.9/S7.9_A11_T8.js index 24d5881527..3356f1f3cf 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T8.js +++ b/test/suite/ch07/7.9/S7.9_A11_T8.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T8.js - * @description Use if (false) {x = 1}; \n else x=-1 and check x - * @negative - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T8 +description: Use if (false) {x = 1}; \n else x=-1 and check x +flags: [negative] +---*/ //CHECK#1 var x = 0; @@ -16,4 +15,3 @@ else x = -1 if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A11_T9.js b/test/suite/ch07/7.9/S7.9_A11_T9.js index f0d6878fd4..8161f3abec 100644 --- a/test/suite/ch07/7.9/S7.9_A11_T9.js +++ b/test/suite/ch07/7.9/S7.9_A11_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check If Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A11_T9.js - * @description Use if (false) {x = 1} \n else x=-1 and check x - */ +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T9 +description: Use if (false) {x = 1} \n else x=-1 and check x +---*/ //CHECK#1 var x = 0; @@ -15,4 +14,3 @@ else x = -1 if (x !== -1) { $ERROR('#1: Check If Statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A2.js b/test/suite/ch07/7.9/S7.9_A2.js index fdc2189f9f..8ce13c2333 100644 --- a/test/suite/ch07/7.9/S7.9_A2.js +++ b/test/suite/ch07/7.9/S7.9_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Break Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A2.js - * @description Try use break \n Label construction - */ +/*--- +info: Check Break Statement for automatic semicolon insertion +es5id: 7.9_A2 +description: Try use break \n Label construction +---*/ //CHECK#1 label1: for (var i = 0; i <= 0; i++) { @@ -29,4 +28,3 @@ label2: for (var i = 0; i <= 0; i++) { if (result !== true) { $ERROR('#2: Check break statement for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A3.js b/test/suite/ch07/7.9/S7.9_A3.js index e52b887603..bd1e516bc7 100644 --- a/test/suite/ch07/7.9/S7.9_A3.js +++ b/test/suite/ch07/7.9/S7.9_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Return Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A3.js - * @description Try use return \n Expression construction - */ +/*--- +info: Check Return Statement for automatic semicolon insertion +es5id: 7.9_A3 +description: Try use return \n Expression construction +---*/ //CHECK#1 function f1() @@ -25,5 +24,4 @@ function f2() } if (f2() !== undefined) { $ERROR('#2: Check return statement for automatic semicolon insertion'); -} - +} diff --git a/test/suite/ch07/7.9/S7.9_A4.js b/test/suite/ch07/7.9/S7.9_A4.js index d8a5ac6075..73cb507c47 100644 --- a/test/suite/ch07/7.9/S7.9_A4.js +++ b/test/suite/ch07/7.9/S7.9_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Throw Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A4.js - * @description Try use Throw \n Expression construction - * @negative - */ +/*--- +info: Check Throw Statement for automatic semicolon insertion +es5id: 7.9_A4 +description: Try use Throw \n Expression construction +flags: [negative] +---*/ //CHECK#1 try { @@ -16,4 +15,3 @@ try { } catch(e) { } $ERROR('#1: Check throw statement for automatic semicolon insertion'); - diff --git a/test/suite/ch07/7.9/S7.9_A5.1_T1.js b/test/suite/ch07/7.9/S7.9_A5.1_T1.js index b0c69d298f..022c45fe5a 100644 --- a/test/suite/ch07/7.9/S7.9_A5.1_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.1_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Postfix Increment Operator for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.1_T1.js - * @description Try use Variable \n ++ construction - * @negative - */ +/*--- +info: Check Postfix Increment Operator for automatic semicolon insertion +es5id: 7.9_A5.1_T1 +description: Try use Variable \n ++ construction +flags: [negative] +---*/ //CHECK#1 var x = 0; x ++; $ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion'); - diff --git a/test/suite/ch07/7.9/S7.9_A5.2_T1.js b/test/suite/ch07/7.9/S7.9_A5.2_T1.js index 24fcf4e7c5..5d3ac12ed6 100644 --- a/test/suite/ch07/7.9/S7.9_A5.2_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Prefix Increment Operator for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.2_T1.js - * @description Try use Variable1 \n ++Variable2 construction - */ +/*--- +info: Check Prefix Increment Operator for automatic semicolon insertion +es5id: 7.9_A5.2_T1 +description: Try use Variable1 \n ++Variable2 construction +---*/ //CHECK#1 var x = 0; @@ -20,5 +19,3 @@ if (x !== 0) { $ERROR('#2: Check Prefix Increment Operator for automatic semicolon insertion'); } } - - diff --git a/test/suite/ch07/7.9/S7.9_A5.3_T1.js b/test/suite/ch07/7.9/S7.9_A5.3_T1.js index 283e73879b..e075106956 100644 --- a/test/suite/ch07/7.9/S7.9_A5.3_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.3_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Postfix Decrement Operator for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.3_T1.js - * @description Try use Variable \n -- construction - * @negative - */ +/*--- +info: Check Postfix Decrement Operator for automatic semicolon insertion +es5id: 7.9_A5.3_T1 +description: Try use Variable \n -- construction +flags: [negative] +---*/ //CHECK#1 var x = 1; x --; $ERROR('#1: Check Postfix Decrement Operator for automatic semicolon insertion'); - diff --git a/test/suite/ch07/7.9/S7.9_A5.4_T1.js b/test/suite/ch07/7.9/S7.9_A5.4_T1.js index 6d58c1f69b..f4bdb87d65 100644 --- a/test/suite/ch07/7.9/S7.9_A5.4_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Prefix Decrement Operator for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.4_T1.js - * @description Try use Variable1 \n --Variable2 construction - */ +/*--- +info: Check Prefix Decrement Operator for automatic semicolon insertion +es5id: 7.9_A5.4_T1 +description: Try use Variable1 \n --Variable2 construction +---*/ //CHECK#1 var x = 1; @@ -20,4 +19,3 @@ if (x !== 1) { $ERROR('#1: Check Prefix Decrement Operator for automatic semicolon insertion'); } } - diff --git a/test/suite/ch07/7.9/S7.9_A5.5_T1.js b/test/suite/ch07/7.9/S7.9_A5.5_T1.js index 872803b602..c4832ee2af 100644 --- a/test/suite/ch07/7.9/S7.9_A5.5_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Function Expression for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.5_T1.js - * @description Try use 1 + function_name\n(2 + 3) construction - */ +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T1 +description: Try use 1 + function_name\n(2 + 3) construction +---*/ //CHECK#1 function f(t) { @@ -16,5 +15,4 @@ var x = 1 + f (2 + 3) if (x !== 6) { $ERROR('#1: Check Function Expression for automatic semicolon insertion'); -} - +} diff --git a/test/suite/ch07/7.9/S7.9_A5.5_T2.js b/test/suite/ch07/7.9/S7.9_A5.5_T2.js index be29e1dca2..352755854e 100644 --- a/test/suite/ch07/7.9/S7.9_A5.5_T2.js +++ b/test/suite/ch07/7.9/S7.9_A5.5_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Function Expression for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.5_T2.js - * @description Try use function f(o) {o.x = 1; return o;}; \n (new Object()).x; construction - */ +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T2 +description: > + Try use function f(o) {o.x = 1; return o;}; \n (new Object()).x; + construction +---*/ //CHECK#1 var result = function f(o) {o.x = 1; return o;}; @@ -14,4 +15,3 @@ var result = function f(o) {o.x = 1; return o;}; if (typeof result !== "function") { $ERROR('#1: Check Function Expression for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A5.5_T3.js b/test/suite/ch07/7.9/S7.9_A5.5_T3.js index e3dc89b38f..8176c7b0d8 100644 --- a/test/suite/ch07/7.9/S7.9_A5.5_T3.js +++ b/test/suite/ch07/7.9/S7.9_A5.5_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Function Expression for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.5_T3.js - * @description Try use function f(o) {o.x = 1; return o;} \n (new Object()).x; construction - */ +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T3 +description: > + Try use function f(o) {o.x = 1; return o;} \n (new Object()).x; + construction +---*/ //CHECK#1 var result = function f(o) {o.x = 1; return o;} @@ -14,4 +15,3 @@ var result = function f(o) {o.x = 1; return o;} if (result !== 1) { $ERROR('#1: Check Function Expression for automatic semicolon insertion'); } - diff --git a/test/suite/ch07/7.9/S7.9_A5.5_T4.js b/test/suite/ch07/7.9/S7.9_A5.5_T4.js index a005f11091..42c009314f 100644 --- a/test/suite/ch07/7.9/S7.9_A5.5_T4.js +++ b/test/suite/ch07/7.9/S7.9_A5.5_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Function Expression for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.5_T4.js - * @description Insert some LineTerminators into function body - */ +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T4 +description: Insert some LineTerminators into function body +---*/ //CHECK#1 var x = @@ -18,5 +17,4 @@ a if (x !== 6) { $ERROR('#1: Check Function Expression for automatic semicolon insertion'); -} - +} diff --git a/test/suite/ch07/7.9/S7.9_A5.5_T5.js b/test/suite/ch07/7.9/S7.9_A5.5_T5.js index 1c1942d734..3a74286a87 100644 --- a/test/suite/ch07/7.9/S7.9_A5.5_T5.js +++ b/test/suite/ch07/7.9/S7.9_A5.5_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Function Expression for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A5.5_T5.js - * @description Insert some LineTerminators into rerutn expression; - */ +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T5 +description: Insert some LineTerminators into rerutn expression; +---*/ //CHECK#1 var x = @@ -26,5 +25,4 @@ a if (x !== 7) { $ERROR('#1: Check Function Expression for automatic semicolon insertion'); -} - +} diff --git a/test/suite/ch07/7.9/S7.9_A5.6_T1.js b/test/suite/ch07/7.9/S7.9_A5.6_T1.js index 3381c5187f..9d6e37f5d4 100644 --- a/test/suite/ch07/7.9/S7.9_A5.6_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.6_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since LineTerminator between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but - * between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result - * - * @path ch07/7.9/S7.9_A5.6_T1.js - * @description Try use Variable1 \n ++ \n Variable2 construction - */ +/*--- +info: > + Since LineTerminator between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but + between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result +es5id: 7.9_A5.6_T1 +description: Try use Variable1 \n ++ \n Variable2 construction +---*/ var x=0, y=0; @@ -33,4 +33,3 @@ if ((x!==0)&(y!==2)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch07/7.9/S7.9_A5.6_T2.js b/test/suite/ch07/7.9/S7.9_A5.6_T2.js index 6861e96e54..41cb62fe99 100644 --- a/test/suite/ch07/7.9/S7.9_A5.6_T2.js +++ b/test/suite/ch07/7.9/S7.9_A5.6_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since LineTerminator between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but - * between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result - * - * @path ch07/7.9/S7.9_A5.6_T2.js - * @description Try use Variable1 \n -- \n Variable2 construction - */ +/*--- +info: > + Since LineTerminator between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but + between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result +es5id: 7.9_A5.6_T2 +description: Try use Variable1 \n -- \n Variable2 construction +---*/ var x=0, y=2; @@ -33,5 +33,3 @@ if ((x!==0)&(y!==0)) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch07/7.9/S7.9_A5.7_T1.js b/test/suite/ch07/7.9/S7.9_A5.7_T1.js index 696ba3c323..ccaddcc05e 100644 --- a/test/suite/ch07/7.9/S7.9_A5.7_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.7_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since LineTerminator(LT) between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed, two IO(just as two DO and their combination) - * between two references separated by [LT] after automatic semicolon insertion lead to syntax error - * - * @path ch07/7.9/S7.9_A5.7_T1.js - * @description Try use Variable1 \n ++ \n ++ \n Variable2 construction - * @negative - */ +/*--- +info: > + Since LineTerminator(LT) between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed, two IO(just as two DO and their combination) + between two references separated by [LT] after automatic semicolon insertion lead to syntax error +es5id: 7.9_A5.7_T1 +description: Try use Variable1 \n ++ \n ++ \n Variable2 construction +flags: [negative] +---*/ var x=0, y=0; var z= @@ -16,4 +16,3 @@ x ++ ++ y - diff --git a/test/suite/ch07/7.9/S7.9_A5.8_T1.js b/test/suite/ch07/7.9/S7.9_A5.8_T1.js index 9f3b7a75d1..d943ff4608 100644 --- a/test/suite/ch07/7.9/S7.9_A5.8_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.8_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since LineTerminator(LT) between Postfix Increment/Decrement Operator(I/DO) and operand is admitted, - * Additive/Substract Operator(A/SO) in combination with I/DO separated by LT or white spaces after automatic semicolon insertion gives valid result - * - * @path ch07/7.9/S7.9_A5.8_T1.js - * @description Try use Variable1 \n + \n ++ \n Variable2 construction - */ +/*--- +info: > + Since LineTerminator(LT) between Postfix Increment/Decrement Operator(I/DO) and operand is admitted, + Additive/Substract Operator(A/SO) in combination with I/DO separated by LT or white spaces after automatic semicolon insertion gives valid result +es5id: 7.9_A5.8_T1 +description: Try use Variable1 \n + \n ++ \n Variable2 construction +---*/ var x=0, y=0; var z= @@ -49,4 +49,3 @@ if ((z!==3)&&(y!==3)&&(x!==0)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch07/7.9/S7.9_A5.9_T1.js b/test/suite/ch07/7.9/S7.9_A5.9_T1.js index 98f47ab9ad..4a4f62f684 100644 --- a/test/suite/ch07/7.9/S7.9_A5.9_T1.js +++ b/test/suite/ch07/7.9/S7.9_A5.9_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Additive/Substract Operator(A/SO) in combination with itself separated by LT or white spaces - * after automatic semicolon insertion gives valid result - * - * @path ch07/7.9/S7.9_A5.9_T1.js - * @description Try use Variable1 (different combinations of three +) Variable2 construction - */ +/*--- +info: > + Additive/Substract Operator(A/SO) in combination with itself separated by LT or white spaces + after automatic semicolon insertion gives valid result +es5id: 7.9_A5.9_T1 +description: > + Try use Variable1 (different combinations of three +) Variable2 + construction +---*/ var x=1, y=1; var z= @@ -49,4 +51,3 @@ if ((z!==2)&&(y!==1)&&(x!==1)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T1.js b/test/suite/ch07/7.9/S7.9_A6.1_T1.js index 65bc949851..dfb77fa0d2 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T1.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T1.js - * @description for( Empty two semicolons and \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T1 +description: for( Empty two semicolons and \n) +---*/ //CHECK#1 for(;; ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T10.js b/test/suite/ch07/7.9/S7.9_A6.1_T10.js index 973ac4fe9a..fb8ae56e8d 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T10.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T10.js - * @description for (false \n two semicolons false \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T10 +description: for (false \n two semicolons false \n) +---*/ //CHECK#1 for(false @@ -14,4 +13,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T11.js b/test/suite/ch07/7.9/S7.9_A6.1_T11.js index 27da10fff0..32d0ae6a7b 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T11.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T11.js - * @description for (false \n semicolon \n semicolon \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T11 +description: for (false \n semicolon \n semicolon \n) +---*/ //CHECK#1 for(false @@ -15,4 +14,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T12.js b/test/suite/ch07/7.9/S7.9_A6.1_T12.js index b787911945..41581acd54 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T12.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T12.js - * @description for (false \n semicolon false \n semicolon \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T12 +description: for (false \n semicolon false \n semicolon \n) +---*/ //CHECK#1 for(false @@ -15,4 +14,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T13.js b/test/suite/ch07/7.9/S7.9_A6.1_T13.js index 1762f3182f..0028966455 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T13.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T13.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T13.js - * @description for (false \n semicolon false \n semicolon false \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T13 +description: for (false \n semicolon false \n semicolon false \n) +---*/ //CHECK#1 for(false @@ -15,4 +14,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T2.js b/test/suite/ch07/7.9/S7.9_A6.1_T2.js index ef2ac4e468..c3b9b6af90 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T2.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T2.js - * @description for (semicolon \n semicolon \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T2 +description: for (semicolon \n semicolon \n) +---*/ //CHECK#1 for(; @@ -14,4 +13,3 @@ for(; ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T3.js b/test/suite/ch07/7.9/S7.9_A6.1_T3.js index 71ee0b4d54..4a8a271071 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T3.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T3.js - * @description for (\n two semicolons \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T3 +description: for (\n two semicolons \n) +---*/ //CHECK#1 for( @@ -14,4 +13,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T4.js b/test/suite/ch07/7.9/S7.9_A6.1_T4.js index 8055a790ad..23a89775a4 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T4.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T4.js - * @description for( \n semicolon \n semicolon \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T4 +description: for( \n semicolon \n semicolon \n) +---*/ //CHECK#1 for( @@ -15,4 +14,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T5.js b/test/suite/ch07/7.9/S7.9_A6.1_T5.js index ce5e585dc5..77c703e621 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T5.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T5.js - * @description for ( \n semicolon \n\n semicolon \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T5 +description: for ( \n semicolon \n\n semicolon \n) +---*/ //CHECK#1 for( @@ -16,4 +15,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T6.js b/test/suite/ch07/7.9/S7.9_A6.1_T6.js index 578b88fbe6..9a4a572318 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T6.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T6.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T6.js - * @description for(false semicolon false semicolon false \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T6 +description: for(false semicolon false semicolon false \n) +---*/ //CHECK#1 for(false;false;false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T7.js b/test/suite/ch07/7.9/S7.9_A6.1_T7.js index ce53a6f9ec..699933370f 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T7.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T7.js - * @description for (false semicolon false \n semicolon \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T7 +description: for (false semicolon false \n semicolon \n) +---*/ //CHECK#1 for(false;false @@ -14,4 +13,3 @@ for(false;false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T8.js b/test/suite/ch07/7.9/S7.9_A6.1_T8.js index fca8ddc800..bb722f6ee6 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T8.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T8.js - * @description for (false semicolon false \n semicolon false \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T8 +description: for (false semicolon false \n semicolon false \n) +---*/ //CHECK#1 for(false;false @@ -14,4 +13,3 @@ for(false;false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.1_T9.js b/test/suite/ch07/7.9/S7.9_A6.1_T9.js index 977b90b9e7..0d0b1ee99b 100644 --- a/test/suite/ch07/7.9/S7.9_A6.1_T9.js +++ b/test/suite/ch07/7.9/S7.9_A6.1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.1_T9.js - * @description for (false \n two semicolons \n) - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T9 +description: for (false \n two semicolons \n) +---*/ //CHECK#1 for(false @@ -14,4 +13,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T1.js b/test/suite/ch07/7.9/S7.9_A6.2_T1.js index e3461b9077..b7d11f8df1 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T1.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T1.js @@ -1,19 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T1.js - * @description For header is (semicolon \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T1 +description: For header is (semicolon \n) +flags: [negative] +---*/ //CHECK#1 for(; ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T10.js b/test/suite/ch07/7.9/S7.9_A6.2_T10.js index 1e65032ca6..c86136d070 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T10.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T10.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T10.js - * @description For header is (\n false \n semicolon) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T10 +description: For header is (\n false \n semicolon) +flags: [negative] +---*/ //CHECK#1 for( @@ -17,4 +17,3 @@ for( ;) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T2.js b/test/suite/ch07/7.9/S7.9_A6.2_T2.js index bbe5fb83c2..8a9a3f16dc 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T2.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T2.js - * @description For header is (\n semicolon \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T2 +description: For header is (\n semicolon \n) +flags: [negative] +---*/ //CHECK#1 for( @@ -17,4 +17,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T3.js b/test/suite/ch07/7.9/S7.9_A6.2_T3.js index 0dfd551257..ff6df09530 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T3.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T3.js @@ -1,19 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T3.js - * @description For header is (\n semicolon) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T3 +description: For header is (\n semicolon) +flags: [negative] +---*/ //CHECK#1 for( ;) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T4.js b/test/suite/ch07/7.9/S7.9_A6.2_T4.js index d642789723..6e938b54b6 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T4.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T4.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T4.js - * @description For header is (\n \n semicolon) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T4 +description: For header is (\n \n semicolon) +flags: [negative] +---*/ //CHECK#1 for( @@ -17,4 +17,3 @@ for( ;) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T5.js b/test/suite/ch07/7.9/S7.9_A6.2_T5.js index de9ed973b6..5a736005c2 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T5.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T5.js @@ -1,19 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T5.js - * @description For header is (false semicolon false\n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T5 +description: For header is (false semicolon false\n) +flags: [negative] +---*/ //CHECK#1 for(false;false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T6.js b/test/suite/ch07/7.9/S7.9_A6.2_T6.js index 1efe468d2d..7c9f03e5c9 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T6.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T6.js - * @description For header is (false semicolon \n false) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T6 +description: For header is (false semicolon \n false) +flags: [negative] +---*/ //CHECK#1 for(false; @@ -17,4 +17,3 @@ false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T7.js b/test/suite/ch07/7.9/S7.9_A6.2_T7.js index 5050697acd..a96ad0b0b9 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T7.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T7.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T7.js - * @description For header is (false \n semicolon \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T7 +description: For header is (false \n semicolon \n) +flags: [negative] +---*/ //CHECK#1 for(false @@ -17,4 +17,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T8.js b/test/suite/ch07/7.9/S7.9_A6.2_T8.js index 526809c867..5f8a513619 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T8.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T8.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T8.js - * @description For header is (false \n semicolon false \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T8 +description: For header is (false \n semicolon false \n) +flags: [negative] +---*/ //CHECK#1 for(false @@ -17,4 +17,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.2_T9.js b/test/suite/ch07/7.9/S7.9_A6.2_T9.js index 21e635ad0c..ea04419767 100644 --- a/test/suite/ch07/7.9/S7.9_A6.2_T9.js +++ b/test/suite/ch07/7.9/S7.9_A6.2_T9.js @@ -1,19 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Use one semicolon - * - * @path ch07/7.9/S7.9_A6.2_T9.js - * @description For header is (\n semicolon false) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T9 +description: For header is (\n semicolon false) +flags: [negative] +---*/ //CHECK#1 for( ;false) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T1.js b/test/suite/ch07/7.9/S7.9_A6.3_T1.js index 4089c29ef9..8b774ddb20 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T1.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T1.js @@ -1,19 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T1.js - * @description For header is (\n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T1 +description: For header is (\n) +flags: [negative] +---*/ //CHECK#1 for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T2.js b/test/suite/ch07/7.9/S7.9_A6.3_T2.js index 6b54313e2a..0b3b703570 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T2.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T2.js - * @description For header is (\n \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T2 +description: For header is (\n \n) +flags: [negative] +---*/ //CHECK#1 for( @@ -17,4 +17,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T3.js b/test/suite/ch07/7.9/S7.9_A6.3_T3.js index ee52d6181e..8d39015d5b 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T3.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T3.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T3.js - * @description For header is (\n \n \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T3 +description: For header is (\n \n \n) +flags: [negative] +---*/ //CHECK#1 for( @@ -18,4 +18,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T4.js b/test/suite/ch07/7.9/S7.9_A6.3_T4.js index 41b80740ad..acbd8dc15c 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T4.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T4.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T4.js - * @description For header is (\n false \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T4 +description: For header is (\n false \n) +flags: [negative] +---*/ //CHECK#1 for( @@ -17,4 +17,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T5.js b/test/suite/ch07/7.9/S7.9_A6.3_T5.js index 2377faaa5d..fb291d5000 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T5.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T5.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T5.js - * @description For header is (false \n false \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T5 +description: For header is (false \n false \n) +flags: [negative] +---*/ //CHECK#1 for(false @@ -17,4 +17,3 @@ for(false ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T6.js b/test/suite/ch07/7.9/S7.9_A6.3_T6.js index b400c9de3d..5f185b600b 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T6.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T6.js - * @description For header is (\n false \n false \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T6 +description: For header is (\n false \n false \n) +flags: [negative] +---*/ //CHECK#1 for( @@ -18,4 +18,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.3_T7.js b/test/suite/ch07/7.9/S7.9_A6.3_T7.js index ec63c02bce..3fd1a1fd56 100644 --- a/test/suite/ch07/7.9/S7.9_A6.3_T7.js +++ b/test/suite/ch07/7.9/S7.9_A6.3_T7.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion. - * If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. - * Don`t use semicolons - * - * @path ch07/7.9/S7.9_A6.3_T7.js - * @description For header is (\n false \n false \n false \n) - * @negative - */ +/*--- +info: > + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T7 +description: For header is (\n false \n false \n false \n) +flags: [negative] +---*/ //CHECK#1 for( @@ -19,4 +19,3 @@ for( ) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.4_T1.js b/test/suite/ch07/7.9/S7.9_A6.4_T1.js index 44169a23f9..d41d81e28a 100644 --- a/test/suite/ch07/7.9/S7.9_A6.4_T1.js +++ b/test/suite/ch07/7.9/S7.9_A6.4_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.4_T1.js - * @description Three semicolons. For header is (false semicolon false semicolon false semicolon) - * @negative - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.4_T1 +description: > + Three semicolons. For header is (false semicolon false semicolon + false semicolon) +flags: [negative] +---*/ //CHECK#1 for(false;false;false;) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A6.4_T2.js b/test/suite/ch07/7.9/S7.9_A6.4_T2.js index f930cf830e..d89eeb5980 100644 --- a/test/suite/ch07/7.9/S7.9_A6.4_T2.js +++ b/test/suite/ch07/7.9/S7.9_A6.4_T2.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check For Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A6.4_T2.js - * @description Three semicolons. For header is (false semicolon false two semicolons false) - * @negative - */ +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.4_T2 +description: > + Three semicolons. For header is (false semicolon false two + semicolons false) +flags: [negative] +---*/ //CHECK#1 for(false;false;;false) { break; } - diff --git a/test/suite/ch07/7.9/S7.9_A7_T1.js b/test/suite/ch07/7.9/S7.9_A7_T1.js index ac730d59f4..7f07f49a65 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T1.js +++ b/test/suite/ch07/7.9/S7.9_A7_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T1.js - * @description Checking if execution of "var x \n = 1" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T1 +description: Checking if execution of "var x \n = 1" passes +---*/ //CHECK#1 var x = 1 - diff --git a/test/suite/ch07/7.9/S7.9_A7_T2.js b/test/suite/ch07/7.9/S7.9_A7_T2.js index 91900bb1f6..3367005649 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T2.js +++ b/test/suite/ch07/7.9/S7.9_A7_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T2.js - * @description Checking if execution of "var x = \n 1" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T2 +description: Checking if execution of "var x = \n 1" passes +---*/ //CHECK#1 var x = 1 - diff --git a/test/suite/ch07/7.9/S7.9_A7_T3.js b/test/suite/ch07/7.9/S7.9_A7_T3.js index bddc5e4d14..b9932771c4 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T3.js +++ b/test/suite/ch07/7.9/S7.9_A7_T3.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T3.js - * @description Checking if execution of "var x \n x = 1" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T3 +description: Checking if execution of "var x \n x = 1" passes +---*/ //CHECK#1 var x x = 1 - - diff --git a/test/suite/ch07/7.9/S7.9_A7_T4.js b/test/suite/ch07/7.9/S7.9_A7_T4.js index 46f17a4779..97335dd861 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T4.js +++ b/test/suite/ch07/7.9/S7.9_A7_T4.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T4.js - * @description Checking if execution of "var \n x" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T4 +description: Checking if execution of "var \n x" passes +---*/ //CHECK#1 var x - - diff --git a/test/suite/ch07/7.9/S7.9_A7_T5.js b/test/suite/ch07/7.9/S7.9_A7_T5.js index d1e1be650d..f8847257e6 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T5.js +++ b/test/suite/ch07/7.9/S7.9_A7_T5.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T5.js - * @description Checking if execution of "var \n x \n = \n 1" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T5 +description: Checking if execution of "var \n x \n = \n 1" passes +---*/ //CHECK#1 var x = 1 - - diff --git a/test/suite/ch07/7.9/S7.9_A7_T6.js b/test/suite/ch07/7.9/S7.9_A7_T6.js index df79117174..770eddab37 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T6.js +++ b/test/suite/ch07/7.9/S7.9_A7_T6.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T6.js - * @description Checking if execution of "var x, \n y" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T6 +description: Checking if execution of "var x, \n y" passes +---*/ //CHECK#1 var x, -y - - +y diff --git a/test/suite/ch07/7.9/S7.9_A7_T7.js b/test/suite/ch07/7.9/S7.9_A7_T7.js index 9beb8822c0..fc314abc50 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T7.js +++ b/test/suite/ch07/7.9/S7.9_A7_T7.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T7.js - * @description Checking if execution of "var x \n y" passes - * @negative - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T7 +description: Checking if execution of "var x \n y" passes +flags: [negative] +---*/ //CHECK#1 var x -y - - +y diff --git a/test/suite/ch07/7.9/S7.9_A7_T8.js b/test/suite/ch07/7.9/S7.9_A7_T8.js index 9b9057ad90..6a6cc87bf8 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T8.js +++ b/test/suite/ch07/7.9/S7.9_A7_T8.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T8.js - * @description Checking if execution of "var x \n ,y" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T8 +description: Checking if execution of "var x \n ,y" passes +---*/ //CHECK#1 var x -,y - - +,y diff --git a/test/suite/ch07/7.9/S7.9_A7_T9.js b/test/suite/ch07/7.9/S7.9_A7_T9.js index 826ce4651b..ddfab1f15c 100644 --- a/test/suite/ch07/7.9/S7.9_A7_T9.js +++ b/test/suite/ch07/7.9/S7.9_A7_T9.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Var Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A7_T9.js - * @description Checking if execution of "var x \n ,y = 1" passes - */ +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T9 +description: Checking if execution of "var x \n ,y = 1" passes +---*/ //CHECK#1 var x ,y = 1 - - diff --git a/test/suite/ch07/7.9/S7.9_A8_T1.js b/test/suite/ch07/7.9/S7.9_A8_T1.js index d708cb3f60..2d95a1f7e3 100644 --- a/test/suite/ch07/7.9/S7.9_A8_T1.js +++ b/test/suite/ch07/7.9/S7.9_A8_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Empty Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A8_T1.js - * @description Checking if execution of one semicolon passes - */ +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T1 +description: Checking if execution of one semicolon passes +---*/ //CHECK#1 ; - diff --git a/test/suite/ch07/7.9/S7.9_A8_T2.js b/test/suite/ch07/7.9/S7.9_A8_T2.js index 8cf2691f80..280e197833 100644 --- a/test/suite/ch07/7.9/S7.9_A8_T2.js +++ b/test/suite/ch07/7.9/S7.9_A8_T2.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Empty Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A8_T2.js - * @description Checking if execution of some semicolons with LineTerminators pases - */ +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T2 +description: Checking if execution of some semicolons with LineTerminators pases +---*/ //CHECK#1 ; ; ; ; - diff --git a/test/suite/ch07/7.9/S7.9_A8_T3.js b/test/suite/ch07/7.9/S7.9_A8_T3.js index 4a91d79f28..64079b91a2 100644 --- a/test/suite/ch07/7.9/S7.9_A8_T3.js +++ b/test/suite/ch07/7.9/S7.9_A8_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Empty Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A8_T3.js - * @description Checking if execution of some semicolons without LineTerminators passes - */ +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T3 +description: > + Checking if execution of some semicolons without LineTerminators + passes +---*/ //CHECK#1 ;;;; - diff --git a/test/suite/ch07/7.9/S7.9_A8_T4.js b/test/suite/ch07/7.9/S7.9_A8_T4.js index 6017d8221a..b1f9ddeb4c 100644 --- a/test/suite/ch07/7.9/S7.9_A8_T4.js +++ b/test/suite/ch07/7.9/S7.9_A8_T4.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Empty Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A8_T4.js - * @description Checking if execution of some semicolons with LineTerminators and numbers passes - */ +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T4 +description: > + Checking if execution of some semicolons with LineTerminators and + numbers passes +---*/ //CHECK#1 ;1; ;1 ;1; ;1 - diff --git a/test/suite/ch07/7.9/S7.9_A8_T5.js b/test/suite/ch07/7.9/S7.9_A8_T5.js index 339d7e24d0..dcabbf506e 100644 --- a/test/suite/ch07/7.9/S7.9_A8_T5.js +++ b/test/suite/ch07/7.9/S7.9_A8_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Empty Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A8_T5.js - * @description Checking if execution of some semicolons without LineTerminators but with numbers passes - */ +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T5 +description: > + Checking if execution of some semicolons without LineTerminators + but with numbers passes +---*/ //CHECK#1 ;;1;;1;;1 - diff --git a/test/suite/ch07/7.9/S7.9_A9_T1.js b/test/suite/ch07/7.9/S7.9_A9_T1.js index 0ee175bc3f..1556a5f84f 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T1.js +++ b/test/suite/ch07/7.9/S7.9_A9_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T1.js - * @description Execute do { \n }while(false) - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T1 +description: Execute do { \n }while(false) +---*/ //CHECK#1 do { } while (false) - diff --git a/test/suite/ch07/7.9/S7.9_A9_T2.js b/test/suite/ch07/7.9/S7.9_A9_T2.js index 3417ff15d6..36ada6dfdb 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T2.js +++ b/test/suite/ch07/7.9/S7.9_A9_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T2.js - * @description Execute do; while(false) \n true - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T2 +description: Execute do; while(false) \n true +---*/ //CHECK#1 do ; while (false) true - diff --git a/test/suite/ch07/7.9/S7.9_A9_T5.js b/test/suite/ch07/7.9/S7.9_A9_T5.js index 0e0be2ee95..5658f8d663 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T5.js +++ b/test/suite/ch07/7.9/S7.9_A9_T5.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T5.js - * @description Execute do { \n ; \n }while((false) \n ) - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T5 +description: Execute do { \n ; \n }while((false) \n ) +---*/ //CHECK#1 do { ; } while ((false) ) - diff --git a/test/suite/ch07/7.9/S7.9_A9_T6.js b/test/suite/ch07/7.9/S7.9_A9_T6.js index dfff034d79..95119d67f3 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T6.js +++ b/test/suite/ch07/7.9/S7.9_A9_T6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T6.js - * @description Execute do \n while(false) - * @negative - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T6 +description: Execute do \n while(false) +flags: [negative] +---*/ //CHECK#1 do -while (false) - +while (false) diff --git a/test/suite/ch07/7.9/S7.9_A9_T7.js b/test/suite/ch07/7.9/S7.9_A9_T7.js index 853144bc2c..70264d0d47 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T7.js +++ b/test/suite/ch07/7.9/S7.9_A9_T7.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T7.js - * @description Execute do \n\n while(false) - * @negative - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T7 +description: Execute do \n\n while(false) +flags: [negative] +---*/ //CHECK#1 do -while (false) - +while (false) diff --git a/test/suite/ch07/7.9/S7.9_A9_T8.js b/test/suite/ch07/7.9/S7.9_A9_T8.js index 398a75efc8..847f2ac099 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T8.js +++ b/test/suite/ch07/7.9/S7.9_A9_T8.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T8.js - * @description Execute do {}; \n while(false) - * @negative - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T8 +description: Execute do {}; \n while(false) +flags: [negative] +---*/ //CHECK#1 do {}; -while (false) - +while (false) diff --git a/test/suite/ch07/7.9/S7.9_A9_T9.js b/test/suite/ch07/7.9/S7.9_A9_T9.js index cc5948759d..5626037e81 100644 --- a/test/suite/ch07/7.9/S7.9_A9_T9.js +++ b/test/suite/ch07/7.9/S7.9_A9_T9.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check Do-While Statement for automatic semicolon insertion - * - * @path ch07/7.9/S7.9_A9_T9.js - * @description Execute do {} \n while(false) - */ +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T9 +description: Execute do {} \n while(false) +---*/ //CHECK#1 do {} -while (false) - +while (false) diff --git a/test/suite/ch08/8.1/S8.1_A1_T1.js b/test/suite/ch08/8.1/S8.1_A1_T1.js index cadea188de..335f07f728 100644 --- a/test/suite/ch08/8.1/S8.1_A1_T1.js +++ b/test/suite/ch08/8.1/S8.1_A1_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Undefined type has one value, called undefined - * - * @path ch08/8.1/S8.1_A1_T1.js - * @description Checking if execution of "var x = undefined" passes - */ +/*--- +info: The Undefined type has one value, called undefined +es5id: 8.1_A1_T1 +description: Checking if execution of "var x = undefined" passes +---*/ // CHECK#1 var x = undefined; - diff --git a/test/suite/ch08/8.1/S8.1_A1_T2.js b/test/suite/ch08/8.1/S8.1_A1_T2.js index eeea0b7da7..ebd9e2368b 100644 --- a/test/suite/ch08/8.1/S8.1_A1_T2.js +++ b/test/suite/ch08/8.1/S8.1_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Undefined type has one value, called undefined - * - * @path ch08/8.1/S8.1_A1_T2.js - * @description Check typeof(undefined) and typeof(void 0) - */ +/*--- +info: The Undefined type has one value, called undefined +es5id: 8.1_A1_T2 +description: Check typeof(undefined) and typeof(void 0) +---*/ // CHECK#1 if (!(typeof(undefined) === "undefined")) { @@ -22,4 +21,3 @@ if (!(typeof(void 0) === "undefined")) { if (!(undefined === void 0)) { ERROR('#3: undefined === void 0'); } - diff --git a/test/suite/ch08/8.1/S8.1_A2_T1.js b/test/suite/ch08/8.1/S8.1_A2_T1.js index 5fd35b2dce..eb7a24030a 100644 --- a/test/suite/ch08/8.1/S8.1_A2_T1.js +++ b/test/suite/ch08/8.1/S8.1_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Any variable that has not been assigned a value has the value undefined - * - * @path ch08/8.1/S8.1_A2_T1.js - * @description Check that var x have value and type undefined - */ +/*--- +info: Any variable that has not been assigned a value has the value undefined +es5id: 8.1_A2_T1 +description: Check that var x have value and type undefined +---*/ var x; @@ -33,4 +32,3 @@ if (!(x === void 0)) { } // /////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.1/S8.1_A2_T2.js b/test/suite/ch08/8.1/S8.1_A2_T2.js index 1c03d668f4..60c3ba099d 100644 --- a/test/suite/ch08/8.1/S8.1_A2_T2.js +++ b/test/suite/ch08/8.1/S8.1_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Any variable that has not been assigned a value has the value undefined - * - * @path ch08/8.1/S8.1_A2_T2.js - * @description Function return undefined - */ +/*--- +info: Any variable that has not been assigned a value has the value undefined +es5id: 8.1_A2_T2 +description: Function return undefined +---*/ // CHECK#1 function test1(x) { @@ -24,4 +23,3 @@ function test2() { if (!(test2() === void 0)) { $ERROR('#2: function test2(){} test2() === void 0. Actual: ' + (test2())); } - diff --git a/test/suite/ch08/8.1/S8.1_A3.js b/test/suite/ch08/8.1/S8.1_A3.js index 056a136a9a..60d0e3a578 100644 --- a/test/suite/ch08/8.1/S8.1_A3.js +++ b/test/suite/ch08/8.1/S8.1_A3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * undefined is not a keyword - * - * @path ch08/8.1/S8.1_A3.js - * @description Create variable named undefined - */ +/*--- +info: undefined is not a keyword +es5id: 8.1_A3 +description: Create variable named undefined +---*/ ////////////////////////////////////////////////////////// // CHECK1# var undefined = 1; // ////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.1/S8.1_A4.js b/test/suite/ch08/8.1/S8.1_A4.js index 9d8a256d04..8d8f806492 100644 --- a/test/suite/ch08/8.1/S8.1_A4.js +++ b/test/suite/ch08/8.1/S8.1_A4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If property of object not exist, return undefined - * - * @path ch08/8.1/S8.1_A4.js - * @description Check value of not existed property - */ +/*--- +info: If property of object not exist, return undefined +es5id: 8.1_A4 +description: Check value of not existed property +---*/ // CHECK#1 if ((new Object()).newProperty !== undefined) { $ERROR('#1: (new Object()).newProperty === undefined. Actual: ' + ((new Object()).newProperty)); -} - - +} diff --git a/test/suite/ch08/8.1/S8.1_A5.js b/test/suite/ch08/8.1/S8.1_A5.js index 89539ea89d..cb40ddf2ff 100644 --- a/test/suite/ch08/8.1/S8.1_A5.js +++ b/test/suite/ch08/8.1/S8.1_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function argument that isn't provided has a value of undefined - * - * @path ch08/8.1/S8.1_A5.js - * @description Call function without provided argument - */ +/*--- +info: Function argument that isn't provided has a value of undefined +es5id: 8.1_A5 +description: Call function without provided argument +---*/ /////////////////////////////////////// // @@ -20,4 +19,3 @@ function test(arg) { test(); // //////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_1.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_1.js index fc417c8d80..f97ea08f5f 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_1.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_1.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_1.js - * @description Properties - [[HasOwnProperty]] (property does not exist) - */ - -function testcase() { - - var o = {}; - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_1 +description: Properties - [[HasOwnProperty]] (property does not exist) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_10.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_10.js index 88dd4d9982..870078245a 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_10.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_10.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_10.js - * @description Properties - [[HasOwnProperty]] (writable, configurable, non-enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, writable:true, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_10 +description: > + Properties - [[HasOwnProperty]] (writable, configurable, + non-enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, writable:true, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_11.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_11.js index c000d08619..76cf14786d 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_11.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_11.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_11.js - * @description Properties - [[HasOwnProperty]] (writable, configurable, enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, writable:true, enumerable:true, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_11 +description: > + Properties - [[HasOwnProperty]] (writable, configurable, + enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, writable:true, enumerable:true, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_12.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_12.js index 41bc3b61b8..021d9841ed 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_12.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_12.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_12.js - * @description Properties - [[HasOwnProperty]] (non-writable, non-configurable, non-enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_12 +description: > + Properties - [[HasOwnProperty]] (non-writable, non-configurable, + non-enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_13.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_13.js index a07ec849f7..89e1a13e37 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_13.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_13.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_13.js - * @description Properties - [[HasOwnProperty]] (non-writable, non-configurable, enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, enumerable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_13 +description: > + Properties - [[HasOwnProperty]] (non-writable, non-configurable, + enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, enumerable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_14.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_14.js index 923e64cb2b..b96842421b 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_14.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_14.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_14.js - * @description Properties - [[HasOwnProperty]] (non-writable, configurable, non-enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_14 +description: > + Properties - [[HasOwnProperty]] (non-writable, configurable, + non-enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_15.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_15.js index 9cfa1640b5..063c08392c 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_15.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_15.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_15.js - * @description Properties - [[HasOwnProperty]] (writable, non-configurable, non-enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, writable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_15 +description: > + Properties - [[HasOwnProperty]] (writable, non-configurable, + non-enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, writable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_16.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_16.js index 1115e6ee57..1f0a1cb87e 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_16.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_16.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_16.js - * @description Properties - [[HasOwnProperty]] (non-writable, configurable, enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, configurable:true, enumerable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_16 +description: > + Properties - [[HasOwnProperty]] (non-writable, configurable, + enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, configurable:true, enumerable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_17.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_17.js index 09bf0f6df2..8d1f8ff470 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_17.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_17.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_17.js - * @description Properties - [[HasOwnProperty]] (writable, non-configurable, enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, writable:true, enumerable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_17 +description: > + Properties - [[HasOwnProperty]] (writable, non-configurable, + enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, writable:true, enumerable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_18.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_18.js index 14c1f8c65d..ae82b62c23 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_18.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_18.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_18.js - * @description Properties - [[HasOwnProperty]] (writable, configurable, non-enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, writable:true, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_18 +description: > + Properties - [[HasOwnProperty]] (writable, configurable, + non-enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, writable:true, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_19.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_19.js index ef0a55559b..4056de4078 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_19.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_19.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_19.js - * @description Properties - [[HasOwnProperty]] (writable, configurable, enumerable inherited value property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {value: 42, writable:true, enumerable:true, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_19 +description: > + Properties - [[HasOwnProperty]] (writable, configurable, + enumerable inherited value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {value: 42, writable:true, enumerable:true, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_2.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_2.js index 0314123aae..be637262a4 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_2.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_2.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_2.js - * @description Properties - [[HasOwnProperty]] (old style own property) - */ - -function testcase() { - - var o = {foo: 42}; - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_2 +description: Properties - [[HasOwnProperty]] (old style own property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {foo: 42}; + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_20.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_20.js index a4cb6f5f2a..8b6d0f6578 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_20.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_20.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_20.js - * @description Properties - [[HasOwnProperty]] (literal own getter property) - */ - -function testcase() { - - var o = { get foo() { return 42;} }; - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_20 +description: Properties - [[HasOwnProperty]] (literal own getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = { get foo() { return 42;} }; + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_21.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_21.js index e52f6e6918..8c2ff8f6a5 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_21.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_21.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_21.js - * @description Properties - [[HasOwnProperty]] (literal own setter property) - */ - -function testcase() { - - var o = { set foo(x) {;} }; - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_21 +description: Properties - [[HasOwnProperty]] (literal own setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = { set foo(x) {;} }; + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_22.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_22.js index c5a836d527..98d2c97a0a 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_22.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_22.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_22.js - * @description Properties - [[HasOwnProperty]] (literal own getter/setter property) - */ - -function testcase() { - - var o = { get foo() { return 42;}, set foo(x) {;} }; - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_22 +description: > + Properties - [[HasOwnProperty]] (literal own getter/setter + property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = { get foo() { return 42;}, set foo(x) {;} }; + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_23.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_23.js index 9e2bc5cf1d..73794bac11 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_23.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_23.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_23.js - * @description Properties - [[HasOwnProperty]] (literal inherited getter property) - */ - -function testcase() { - - var base = { get foo() { return 42;} }; - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_23 +description: Properties - [[HasOwnProperty]] (literal inherited getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = { get foo() { return 42;} }; + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_24.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_24.js index 2bc8e3264a..b0f77316c2 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_24.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_24.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_24.js - * @description Properties - [[HasOwnProperty]] (literal inherited setter property) - */ - -function testcase() { - - var base = { set foo(x) {;} }; - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_24 +description: Properties - [[HasOwnProperty]] (literal inherited setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = { set foo(x) {;} }; + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_25.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_25.js index b735c28d0e..88ad564cd6 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_25.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_25.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_25.js - * @description Properties - [[HasOwnProperty]] (literal inherited getter/setter property) - */ - -function testcase() { - - var base = { get foo() { return 42;}, set foo(x) {;} }; - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_25 +description: > + Properties - [[HasOwnProperty]] (literal inherited getter/setter + property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = { get foo() { return 42;}, set foo(x) {;} }; + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_26.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_26.js index fb35559669..4881b9d9f3 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_26.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_26.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_26.js - * @description Properties - [[HasOwnProperty]] (non-configurable, non-enumerable own getter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_26 +description: > + Properties - [[HasOwnProperty]] (non-configurable, non-enumerable + own getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_27.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_27.js index ff95ff414a..c5f7e28672 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_27.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_27.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_27.js - * @description Properties - [[HasOwnProperty]] (non-configurable, enumerable own getter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, enumerable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_27 +description: > + Properties - [[HasOwnProperty]] (non-configurable, enumerable own + getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, enumerable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_28.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_28.js index 5b177ded69..488e06700c 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_28.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_28.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_28.js - * @description Properties - [[HasOwnProperty]] (configurable, non-enumerable own getter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_28 +description: > + Properties - [[HasOwnProperty]] (configurable, non-enumerable own + getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_29.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_29.js index b9b2bd5ea3..da86da0fba 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_29.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_29.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_29.js - * @description Properties - [[HasOwnProperty]] (configurable, enumerable own getter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, enumerable:true, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_29 +description: > + Properties - [[HasOwnProperty]] (configurable, enumerable own + getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, enumerable:true, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_3.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_3.js index 742077a2b3..c7a3e6e984 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_3.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_3.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_3.js - * @description Properties - [[HasOwnProperty]] (old style inherited property) - */ - -function testcase() { - - var base = {foo:42}; - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_3 +description: Properties - [[HasOwnProperty]] (old style inherited property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {foo:42}; + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_30.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_30.js index db063f6f61..b0cda1e0f6 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_30.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_30.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_30.js - * @description Properties - [[HasOwnProperty]] (non-configurable, non-enumerable own setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {set: function() {;}}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_30 +description: > + Properties - [[HasOwnProperty]] (non-configurable, non-enumerable + own setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {set: function() {;}}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_31.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_31.js index 4555da40ea..df07006021 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_31.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_31.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_31.js - * @description Properties - [[HasOwnProperty]] (non-configurable, enumerable own setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {set: function() {;}, enumerable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_31 +description: > + Properties - [[HasOwnProperty]] (non-configurable, enumerable own + setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {set: function() {;}, enumerable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_32.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_32.js index 7fcff86a2c..fd4207f4cd 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_32.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_32.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_32.js - * @description Properties - [[HasOwnProperty]] (configurable, non-enumerable own setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {set: function() {;}, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_32 +description: > + Properties - [[HasOwnProperty]] (configurable, non-enumerable own + setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {set: function() {;}, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_33.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_33.js index fb02941277..d717283fdd 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_33.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_33.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_33.js - * @description Properties - [[HasOwnProperty]] (configurable, enumerable own setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {set: function() {;}, enumerable:true, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_33 +description: > + Properties - [[HasOwnProperty]] (configurable, enumerable own + setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {set: function() {;}, enumerable:true, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_34.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_34.js index e72c99496d..fae9f022df 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_34.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_34.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_34.js - * @description Properties - [[HasOwnProperty]] (non-configurable, non-enumerable own getter/setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_34 +description: > + Properties - [[HasOwnProperty]] (non-configurable, non-enumerable + own getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_35.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_35.js index 7f56d79ae2..6c412e3e5a 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_35.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_35.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_35.js - * @description Properties - [[HasOwnProperty]] (non-configurable, enumerable own getter/setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_35 +description: > + Properties - [[HasOwnProperty]] (non-configurable, enumerable own + getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_36.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_36.js index 5d6a1162b3..df3ebf4560 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_36.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_36.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_36.js - * @description Properties - [[HasOwnProperty]] (configurable, non-enumerable own getter/setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_36 +description: > + Properties - [[HasOwnProperty]] (configurable, non-enumerable own + getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_37.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_37.js index c58438ef74..10685cf7dd 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_37.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_37.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_37.js - * @description Properties - [[HasOwnProperty]] (configurable, enumerable own getter/setter property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_37 +description: > + Properties - [[HasOwnProperty]] (configurable, enumerable own + getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_38.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_38.js index 9860592921..85b45114c4 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_38.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_38.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_38.js - * @description Properties - [[HasOwnProperty]] (non-configurable, non-enumerable inherited getter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_38 +description: > + Properties - [[HasOwnProperty]] (non-configurable, non-enumerable + inherited getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_39.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_39.js index 2ec9acd723..34c9f34751 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_39.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_39.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_39.js - * @description Properties - [[HasOwnProperty]] (non-configurable, enumerable inherited getter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, enumerable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_39 +description: > + Properties - [[HasOwnProperty]] (non-configurable, enumerable + inherited getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, enumerable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_4.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_4.js index cb67d3f39b..c5e4b9df0f 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_4.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_4.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_4.js - * @description Properties - [[HasOwnProperty]] (non-writable, non-configurable, non-enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_4 +description: > + Properties - [[HasOwnProperty]] (non-writable, non-configurable, + non-enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_40.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_40.js index f0aad260e9..1bf45fc778 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_40.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_40.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_40.js - * @description Properties - [[HasOwnProperty]] (configurable, non-enumerable inherited getter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_40 +description: > + Properties - [[HasOwnProperty]] (configurable, non-enumerable + inherited getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_41.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_41.js index b3e3ecdff8..dbcd77f02f 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_41.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_41.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_41.js - * @description Properties - [[HasOwnProperty]] (configurable, enumerable inherited getter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, enumerable:true, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_41 +description: > + Properties - [[HasOwnProperty]] (configurable, enumerable + inherited getter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, enumerable:true, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_42.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_42.js index 5f4679697e..9acd557efb 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_42.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_42.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_42.js - * @description Properties - [[HasOwnProperty]] (non-configurable, non-enumerable inherited setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {set: function() {;}}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_42 +description: > + Properties - [[HasOwnProperty]] (non-configurable, non-enumerable + inherited setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {set: function() {;}}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_43.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_43.js index 52632881f8..63c67dfe86 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_43.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_43.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_43.js - * @description Properties - [[HasOwnProperty]] (non-configurable, enumerable inherited setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {set: function() {;}, enumerable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_43 +description: > + Properties - [[HasOwnProperty]] (non-configurable, enumerable + inherited setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {set: function() {;}, enumerable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_44.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_44.js index e76b7ffa2d..3e452800f4 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_44.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_44.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_44.js - * @description Properties - [[HasOwnProperty]] (configurable, non-enumerable inherited setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {set: function() {;}, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_44 +description: > + Properties - [[HasOwnProperty]] (configurable, non-enumerable + inherited setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {set: function() {;}, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_45.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_45.js index c1dda50f5c..4ae513552f 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_45.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_45.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_45.js - * @description Properties - [[HasOwnProperty]] (configurable, enumerable inherited setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {set: function() {;}, enumerable:true, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_45 +description: > + Properties - [[HasOwnProperty]] (configurable, enumerable + inherited setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {set: function() {;}, enumerable:true, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_46.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_46.js index 2f2cb4a6dc..20c50dada0 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_46.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_46.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_46.js - * @description Properties - [[HasOwnProperty]] (non-configurable, non-enumerable inherited getter/setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_46 +description: > + Properties - [[HasOwnProperty]] (non-configurable, non-enumerable + inherited getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_47.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_47.js index 032dcff5bf..057ded226c 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_47.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_47.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_47.js - * @description Properties - [[HasOwnProperty]] (non-configurable, enumerable inherited getter/setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_47 +description: > + Properties - [[HasOwnProperty]] (non-configurable, enumerable + inherited getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_48.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_48.js index f7901fbcac..850cbdd2a9 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_48.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_48.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_48.js - * @description Properties - [[HasOwnProperty]] (configurable, non-enumerable inherited getter/setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_48 +description: > + Properties - [[HasOwnProperty]] (configurable, non-enumerable + inherited getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_49.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_49.js index c43be6a731..85aa109422 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_49.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_49.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_49.js - * @description Properties - [[HasOwnProperty]] (configurable, enumerable inherited getter/setter property) - */ - -function testcase() { - - var base = {}; - Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true, configurable:true}); - var o = Object.create(base); - return o.hasOwnProperty("foo")===false; - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_49 +description: > + Properties - [[HasOwnProperty]] (configurable, enumerable + inherited getter/setter property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var base = {}; + Object.defineProperty(base, "foo", {get: function() {return 42;}, set: function() {;}, enumerable:true, configurable:true}); + var o = Object.create(base); + return o.hasOwnProperty("foo")===false; + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_5.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_5.js index 2c6ff46438..2b5fe848db 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_5.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_5.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_5.js - * @description Properties - [[HasOwnProperty]] (non-writable, non-configurable, enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, enumerable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_5 +description: > + Properties - [[HasOwnProperty]] (non-writable, non-configurable, + enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, enumerable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_6.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_6.js index 02b14b2060..2bf456ae9d 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_6.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_6.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_6.js - * @description Properties - [[HasOwnProperty]] (non-writable, configurable, non-enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, configurable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_6 +description: > + Properties - [[HasOwnProperty]] (non-writable, configurable, + non-enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, configurable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_7.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_7.js index 4b7845365d..9740a93fab 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_7.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_7.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_7.js - * @description Properties - [[HasOwnProperty]] (writable, non-configurable, non-enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, writable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_7 +description: > + Properties - [[HasOwnProperty]] (writable, non-configurable, + non-enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, writable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_8.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_8.js index d462883fa2..7c4508aca9 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_8.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_8.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_8.js - * @description Properties - [[HasOwnProperty]] (non-writable, configurable, enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, configurable:true, enumerable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_8 +description: > + Properties - [[HasOwnProperty]] (non-writable, configurable, + enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, configurable:true, enumerable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.1/8.12.1-1_9.js b/test/suite/ch08/8.12/8.12.1/8.12.1-1_9.js index 5fe54362c4..0730b4f060 100644 --- a/test/suite/ch08/8.12/8.12.1/8.12.1-1_9.js +++ b/test/suite/ch08/8.12/8.12.1/8.12.1-1_9.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.1/8.12.1-1_9.js - * @description Properties - [[HasOwnProperty]] (writable, non-configurable, enumerable own value property) - */ - -function testcase() { - - var o = {}; - Object.defineProperty(o, "foo", {value: 42, writable:true, enumerable:true}); - return o.hasOwnProperty("foo"); - -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.1-1_9 +description: > + Properties - [[HasOwnProperty]] (writable, non-configurable, + enumerable own value property) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {}; + Object.defineProperty(o, "foo", {value: 42, writable:true, enumerable:true}); + return o.hasOwnProperty("foo"); + +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.3/S8.12.3_A1.js b/test/suite/ch08/8.12/8.12.3/S8.12.3_A1.js index 4bf7b45904..374c9e275f 100644 --- a/test/suite/ch08/8.12/8.12.3/S8.12.3_A1.js +++ b/test/suite/ch08/8.12/8.12.3/S8.12.3_A1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]](P) method should return value when property P does not exist in instance but prototype contain it - * - * @path ch08/8.12/8.12.3/S8.12.3_A1.js - * @description Try to get P when property P does not exist in instance but prototype contain it - */ +/*--- +info: > + [[Get]](P) method should return value when property P does not exist in + instance but prototype contain it +es5id: 8.12.3_A1 +description: > + Try to get P when property P does not exist in instance but + prototype contain it +---*/ //Establish foo object function FooObj(){}; FooObj.prototype.propFoo="some"; @@ -29,4 +32,3 @@ if (__obj['propFoo'] !== "some"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.3/S8.12.3_A2.js b/test/suite/ch08/8.12/8.12.3/S8.12.3_A2.js index 8f261da8e6..b5f78ea7b8 100644 --- a/test/suite/ch08/8.12/8.12.3/S8.12.3_A2.js +++ b/test/suite/ch08/8.12/8.12.3/S8.12.3_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]](P) method should return undefined when property P does not exist both in instance and prototype - * - * @path ch08/8.12/8.12.3/S8.12.3_A2.js - * @description Try to get P when property P does not exist both in instance and prototype - */ +/*--- +info: > + [[Get]](P) method should return undefined when property P does not exist + both in instance and prototype +es5id: 8.12.3_A2 +description: > + Try to get P when property P does not exist both in instance and + prototype +---*/ var __obj={}; @@ -25,4 +28,3 @@ if (__obj['propFoo'] !== undefined){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.3/S8.12.3_A3.js b/test/suite/ch08/8.12/8.12.3/S8.12.3_A3.js index dbe1250ad7..9f20ae23a1 100644 --- a/test/suite/ch08/8.12/8.12.3/S8.12.3_A3.js +++ b/test/suite/ch08/8.12/8.12.3/S8.12.3_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Get]] method of O is called with property name P value of P returns - * - * @path ch08/8.12/8.12.3/S8.12.3_A3.js - * @description Try to get P property P exist in instance - */ +/*--- +info: > + When the [[Get]] method of O is called with property name P value of P + returns +es5id: 8.12.3_A3 +description: Try to get P property P exist in instance +---*/ var __map={shape:"cube", 5:"five", "6":"six"}; @@ -57,4 +58,3 @@ if (__map[6] !== "six"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_1.js b/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_1.js index 38249d0568..68466814a4 100644 --- a/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_1.js +++ b/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_1.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.4/8.14.4-8-b_1.js - * @description Non-writable property on a prototype written to. - */ - -function testcase() { - function foo() {}; - Object.defineProperty(foo.prototype, "bar", {value: "unwritable"}); - - var o = new foo(); - o.bar = "overridden"; - return o.hasOwnProperty("bar")===false && o.bar==="unwritable"; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.14.4-8-b_1 +description: Non-writable property on a prototype written to. +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() {}; + Object.defineProperty(foo.prototype, "bar", {value: "unwritable"}); + + var o = new foo(); + o.bar = "overridden"; + return o.hasOwnProperty("bar")===false && o.bar==="unwritable"; +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_2.js b/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_2.js index f6b5f1c148..28c18d3bd3 100644 --- a/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_2.js +++ b/test/suite/ch08/8.12/8.12.4/8.14.4-8-b_2.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.4/8.14.4-8-b_2.js - * @description Non-writable property on a prototype written to in strict mode. - * @onlyStrict - */ - -function testcase() { - "use strict"; - - function foo() {}; - Object.defineProperty(foo.prototype, "bar", {value: "unwritable"}); - - var o = new foo(); - try { - o.bar = "overridden"; - return false; - } catch(e) { - return (e instanceof TypeError) && (o.bar==="unwritable"); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.14.4-8-b_2 +description: Non-writable property on a prototype written to in strict mode. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + function foo() {}; + Object.defineProperty(foo.prototype, "bar", {value: "unwritable"}); + + var o = new foo(); + try { + o.bar = "overridden"; + return false; + } catch(e) { + return (e instanceof TypeError) && (o.bar==="unwritable"); + } +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.4/S8.12.4_A1.js b/test/suite/ch08/8.12/8.12.4/S8.12.4_A1.js index cbe11f0f7a..0c69f1a109 100644 --- a/test/suite/ch08/8.12/8.12.4/S8.12.4_A1.js +++ b/test/suite/ch08/8.12/8.12.4/S8.12.4_A1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the property has the ReadOnly attribute, [[CanPut]](P) return false - * - * @path ch08/8.12/8.12.4/S8.12.4_A1.js - * @description Try put other value for Math.E property - * @noStrict - */ +/*--- +info: If the property has the ReadOnly attribute, [[CanPut]](P) return false +es5id: 8.12.4_A1 +description: Try put other value for Math.E property +flags: [noStrict] +---*/ var __e = Math.E; Math.E = 1; if (Math.E !== __e){ $ERROR('#1: __e = Math.E; Math.E = 1; Math.E === __e. Actual: ' + (Math.E)); } - diff --git a/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_1.js b/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_1.js index 0ed875ef41..96ce36c823 100644 --- a/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_1.js +++ b/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_1.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.5/8.12.5-3-b_1.js - * @description Changing the value of a data property should not affect it's non-value property descriptor attributes. - */ - - -function testcase() { - var origReduce = Array.prototype.reduce; - var origDesc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); - var newDesc; - - try { - Array.prototype.reduce = function () {;}; - newDesc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); - var descArray = [origDesc, newDesc]; - - for (var j in descArray) { //Ensure no attributes are magically added to newDesc - for (var i in descArray[j]) { - if (i==="value") { - if (origDesc[i]===newDesc[i]) { - return false; - } - } - else if (origDesc[i]!==newDesc[i]) { - return false; - } - } - } - return true; - - } finally { - Array.prototype.reduce = origReduce; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.5-3-b_1 +description: > + Changing the value of a data property should not affect it's + non-value property descriptor attributes. +includes: [runTestCase.js] +---*/ + +function testcase() { + var origReduce = Array.prototype.reduce; + var origDesc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); + var newDesc; + + try { + Array.prototype.reduce = function () {;}; + newDesc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); + var descArray = [origDesc, newDesc]; + + for (var j in descArray) { //Ensure no attributes are magically added to newDesc + for (var i in descArray[j]) { + if (i==="value") { + if (origDesc[i]===newDesc[i]) { + return false; + } + } + else if (origDesc[i]!==newDesc[i]) { + return false; + } + } + } + return true; + + } finally { + Array.prototype.reduce = origReduce; + } +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_2.js b/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_2.js index f6b760ce3e..8c393de38b 100644 --- a/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_2.js +++ b/test/suite/ch08/8.12/8.12.5/8.12.5-3-b_2.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.5/8.12.5-3-b_2.js - * @description Changing the value of a data property should not affect it's non-value property descriptor attributes. - */ - - -function testcase() { - var tempObj = {}; - - Object.defineProperty(tempObj, "reduce", { value:456, enumerable:false, writable:true}); - var origReduce = tempObj.reduce; - var origDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); - - var newDesc; - - try { - tempObj.reduce = 123; - newDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); - var descArray = [origDesc, newDesc]; - - for (var j in descArray) { - for (var i in descArray[j]) { - if (i==="value") { - if (origDesc[i]===newDesc[i]) { - return false; - } - } - else if (origDesc[i]!==newDesc[i]) { - return false; - } - } - } - return true; - - } finally { - tempObj.reduce = origReduce; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.5-3-b_2 +description: > + Changing the value of a data property should not affect it's + non-value property descriptor attributes. +includes: [runTestCase.js] +---*/ + +function testcase() { + var tempObj = {}; + + Object.defineProperty(tempObj, "reduce", { value:456, enumerable:false, writable:true}); + var origReduce = tempObj.reduce; + var origDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); + + var newDesc; + + try { + tempObj.reduce = 123; + newDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); + var descArray = [origDesc, newDesc]; + + for (var j in descArray) { + for (var i in descArray[j]) { + if (i==="value") { + if (origDesc[i]===newDesc[i]) { + return false; + } + } + else if (origDesc[i]!==newDesc[i]) { + return false; + } + } + } + return true; + + } finally { + tempObj.reduce = origReduce; + } +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.5/8.12.5-5-b_1.js b/test/suite/ch08/8.12/8.12.5/8.12.5-5-b_1.js index b3c013ef5b..29a071c238 100644 --- a/test/suite/ch08/8.12/8.12.5/8.12.5-5-b_1.js +++ b/test/suite/ch08/8.12/8.12.5/8.12.5-5-b_1.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.5/8.12.5-5-b_1.js - * @description Changing the value of an accessor property should not affect it's property descriptor attributes. - */ - - -function testcase() { - var tempObj = {}; - - Object.defineProperty(tempObj, "reduce", { get: function() {return 456;}, enumerable:false, set: function() {;}}); - var origReduce = tempObj.reduce; - var origDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); - - var newDesc; - - try { - tempObj.reduce = 123; - newDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); - var descArray = [origDesc, newDesc]; - - for (var j in descArray) { - for (var i in descArray[j]) { - if (origDesc[i]!==newDesc[i]) { - return false; - } - } - } - return tempObj.reduce===456; - - } finally { - tempObj.reduce = origReduce; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.5-5-b_1 +description: > + Changing the value of an accessor property should not affect it's + property descriptor attributes. +includes: [runTestCase.js] +---*/ + +function testcase() { + var tempObj = {}; + + Object.defineProperty(tempObj, "reduce", { get: function() {return 456;}, enumerable:false, set: function() {;}}); + var origReduce = tempObj.reduce; + var origDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); + + var newDesc; + + try { + tempObj.reduce = 123; + newDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce"); + var descArray = [origDesc, newDesc]; + + for (var j in descArray) { + for (var i in descArray[j]) { + if (origDesc[i]!==newDesc[i]) { + return false; + } + } + } + return tempObj.reduce===456; + + } finally { + tempObj.reduce = origReduce; + } +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.5/S8.12.5_A1.js b/test/suite/ch08/8.12/8.12.5/S8.12.5_A1.js index e6f4bba208..871c31bd41 100644 --- a/test/suite/ch08/8.12/8.12.5/S8.12.5_A1.js +++ b/test/suite/ch08/8.12/8.12.5/S8.12.5_A1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Put]] method of O is called with property P and value V, - * and If O doesn't have a property with name P, then - * creates a property with name P, set its value to V and give it empty attributes - * - * @path ch08/8.12/8.12.5/S8.12.5_A1.js - * @description Put to not existent properties - */ +/*--- +info: > + When the [[Put]] method of O is called with property P and value V, + and If O doesn't have a property with name P, then + creates a property with name P, set its value to V and give it empty attributes +es5id: 8.12.5_A1 +description: Put to not existent properties +---*/ var __map={}; __map[1]="one"; __map["two"]=2; __map["3"]="tre"; @@ -35,4 +35,3 @@ if (__map["3"] !== "tre") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.5/S8.12.5_A2.js b/test/suite/ch08/8.12/8.12.5/S8.12.5_A2.js index 02f67e0b87..6c86e354e9 100644 --- a/test/suite/ch08/8.12/8.12.5/S8.12.5_A2.js +++ b/test/suite/ch08/8.12/8.12.5/S8.12.5_A2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Put]] method of O is called with property P and value V, - * then set the value of the property to V. The attributes of the property are not changed - * - * @path ch08/8.12/8.12.5/S8.12.5_A2.js - * @description Put to existent properties - */ +/*--- +info: > + When the [[Put]] method of O is called with property P and value V, + then set the value of the property to V. The attributes of the property are not changed +es5id: 8.12.5_A2 +description: Put to existent properties +---*/ var _map={1:"one",two:2}; @@ -46,4 +46,3 @@ if (_map.two !== "duo") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.6/S8.12.6_A1.js b/test/suite/ch08/8.12/8.12.6/S8.12.6_A1.js index 20a2676f73..38d914a64a 100644 --- a/test/suite/ch08/8.12/8.12.6/S8.12.6_A1.js +++ b/test/suite/ch08/8.12/8.12.6/S8.12.6_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[HasProperty]] method of O is called with property name P and if O has a property with name P, return true - * - * @path ch08/8.12/8.12.6/S8.12.6_A1.js - * @description Try find existent property of any Object - */ +/*--- +info: > + When the [[HasProperty]] method of O is called with property name P and + if O has a property with name P, return true +es5id: 8.12.6_A1 +description: Try find existent property of any Object +---*/ var __obj={fooProp:"fooooooo"}; @@ -17,4 +18,3 @@ if (!("fooProp" in __obj)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T1.js b/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T1.js index 4a2eac8a34..d2174b638f 100644 --- a/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T1.js +++ b/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[HasProperty]] method of O is called with property name P and if O has not a property with name P - * then If the [[Prototype]] of O is null, return false or call the [[HasProperty]] method of [[Prototype]] with property name P - * - * @path ch08/8.12/8.12.6/S8.12.6_A2_T1.js - * @description Try find not existent property of any Object - */ +/*--- +info: > + When the [[HasProperty]] method of O is called with property name P and if O has not a property with name P + then If the [[Prototype]] of O is null, return false or call the [[HasProperty]] method of [[Prototype]] with property name P +es5id: 8.12.6_A2_T1 +description: Try find not existent property of any Object +---*/ var __obj={}; @@ -18,4 +18,3 @@ if (!("valueOf" in __obj)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T2.js b/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T2.js index 536b8ceb48..c3293b8473 100644 --- a/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T2.js +++ b/test/suite/ch08/8.12/8.12.6/S8.12.6_A2_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[HasProperty]] method of O is called with property name P and if O has not a property with name P - * then If the [[Prototype]] of O is null, return false or call the [[HasProperty]] method of [[Prototype]] with property name P - * - * @path ch08/8.12/8.12.6/S8.12.6_A2_T2.js - * @description Try find not existent property of any Object, but existent property of this Object prototype - */ +/*--- +info: > + When the [[HasProperty]] method of O is called with property name P and if O has not a property with name P + then If the [[Prototype]] of O is null, return false or call the [[HasProperty]] method of [[Prototype]] with property name P +es5id: 8.12.6_A2_T2 +description: > + Try find not existent property of any Object, but existent + property of this Object prototype +---*/ var __proto={phylum:"avis"}; @@ -40,4 +42,3 @@ if (__my__robin.hasOwnProperty("phylum")) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.6/S8.12.6_A3.js b/test/suite/ch08/8.12/8.12.6/S8.12.6_A3.js index c2c34fa2cc..7b97beec46 100644 --- a/test/suite/ch08/8.12/8.12.6/S8.12.6_A3.js +++ b/test/suite/ch08/8.12/8.12.6/S8.12.6_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[hasProperty]] is sensitive to property existence but [[Get]] is not - * - * @path ch08/8.12/8.12.6/S8.12.6_A3.js - * @description Use [[hasProperty]] and [[Get]] for existent and not existent properties - */ +/*--- +info: "[[hasProperty]] is sensitive to property existence but [[Get]] is not" +es5id: 8.12.6_A3 +description: > + Use [[hasProperty]] and [[Get]] for existent and not existent + properties +---*/ var __obj={}; __obj.hole=undefined; @@ -41,4 +42,3 @@ if (("notexist" in __obj)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.7/S8.12.7_A1.js b/test/suite/ch08/8.12/8.12.7/S8.12.7_A1.js index b6944fd48e..8a989cb06d 100644 --- a/test/suite/ch08/8.12/8.12.7/S8.12.7_A1.js +++ b/test/suite/ch08/8.12/8.12.7/S8.12.7_A1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Delete]] method of O is called with property name P, - * and If the property has the DontDelete attribute, return false - * - * @path ch08/8.12/8.12.7/S8.12.7_A1.js - * @description Try to delete Math.E, that has the DontDelete attribute - * @noStrict - */ +/*--- +info: > + When the [[Delete]] method of O is called with property name P, + and If the property has the DontDelete attribute, return false +es5id: 8.12.7_A1 +description: Try to delete Math.E, that has the DontDelete attribute +flags: [noStrict] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -25,5 +25,3 @@ if (Math.E === undefined){ }; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T1.js b/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T1.js index 6c416b525d..9a0b87545b 100644 --- a/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T1.js +++ b/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Delete]] method of O is called with property name P, - * and if O doesn't have a property with name P, return true - * - * @path ch08/8.12/8.12.7/S8.12.7_A2_T1.js - * @description Try to delete not existent properties - */ +/*--- +info: > + When the [[Delete]] method of O is called with property name P, + and if O doesn't have a property with name P, return true +es5id: 8.12.7_A2_T1 +description: Try to delete not existent properties +---*/ var __color__map = {}; @@ -35,5 +35,3 @@ if (delete __color__map[blue] !== true){ }; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T2.js b/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T2.js index e3182463ab..318ec3e2f1 100644 --- a/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T2.js +++ b/test/suite/ch08/8.12/8.12.7/S8.12.7_A2_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Delete]] method of O is called with property name P, - * and if O doesn't have a property with name P, return true - * - * @path ch08/8.12/8.12.7/S8.12.7_A2_T2.js - * @description Try to delete not existent properties of O, but existent property of prototype - */ +/*--- +info: > + When the [[Delete]] method of O is called with property name P, + and if O doesn't have a property with name P, return true +es5id: 8.12.7_A2_T2 +description: > + Try to delete not existent properties of O, but existent property + of prototype +---*/ function Palette(){}; Palette.prototype = {red:0xFF0000, green:0x00FF00}; @@ -36,5 +38,3 @@ if (__palette.red !== 0xFF0000){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.12/8.12.7/S8.12.7_A3.js b/test/suite/ch08/8.12/8.12.7/S8.12.7_A3.js index c9abe19d90..fdda97a706 100644 --- a/test/suite/ch08/8.12/8.12.7/S8.12.7_A3.js +++ b/test/suite/ch08/8.12/8.12.7/S8.12.7_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Delete]] method of O is called with property name P, - * removes the property with name P from O and return true - * - * @path ch08/8.12/8.12.7/S8.12.7_A3.js - * @description Delete existent properties - */ +/*--- +info: > + When the [[Delete]] method of O is called with property name P, + removes the property with name P from O and return true +es5id: 8.12.7_A3 +description: Delete existent properties +---*/ var BLUE_NUM=1; var BLUE_STR="1"; @@ -46,4 +46,3 @@ if (__color__map[BLUE_NUM] !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.12/8.12.8/S8.12.8_A1.js b/test/suite/ch08/8.12/8.12.8/S8.12.8_A1.js index 9fa13f537c..71debcdb11 100644 --- a/test/suite/ch08/8.12/8.12.8/S8.12.8_A1.js +++ b/test/suite/ch08/8.12/8.12.8/S8.12.8_A1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * This should generate a TypeError, - * Cause we overload toString method so it return non Primitive value - * See ECMA reference at http://bugzilla.mozilla.org/show_bug.cgi?id=167325 - * - * @path ch08/8.12/8.12.8/S8.12.8_A1.js - * @description Try to overload toString method - */ +/*--- +info: > + This should generate a TypeError, + Cause we overload toString method so it return non Primitive value + See ECMA reference at http://bugzilla.mozilla.org/show_bug.cgi?id=167325 +es5id: 8.12.8_A1 +description: Try to overload toString method +---*/ try { @@ -21,6 +21,4 @@ catch(e) if ((e instanceof TypeError) !== true) { $ERROR('#1.2: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (e)); } -} - - +} diff --git a/test/suite/ch08/8.12/8.12.8/S8.12.8_A2.js b/test/suite/ch08/8.12/8.12.8/S8.12.8_A2.js index 1a4cd4f912..6d3238d21a 100644 --- a/test/suite/ch08/8.12/8.12.8/S8.12.8_A2.js +++ b/test/suite/ch08/8.12/8.12.8/S8.12.8_A2.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * This should generate no TypeError, - * Cause we overload toString method so it return non Primitive value - * but we overloaded valueOf method too. - * See ECMA reference at http://bugzilla.mozilla.org/show_bug.cgi?id=167325 - * - * @path ch08/8.12/8.12.8/S8.12.8_A2.js - * @description Try to overload toString, that returned new Object, and valueOf methods - */ +/*--- +info: > + This should generate no TypeError, + Cause we overload toString method so it return non Primitive value + but we overloaded valueOf method too. + See ECMA reference at http://bugzilla.mozilla.org/show_bug.cgi?id=167325 +es5id: 8.12.8_A2 +description: > + Try to overload toString, that returned new Object, and valueOf + methods +---*/ try { @@ -21,6 +23,4 @@ try catch(e) { $ERROR('#1.2: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === "1". Actual: ' + (e)); -} - - +} diff --git a/test/suite/ch08/8.12/8.12.8/S8.12.8_A3.js b/test/suite/ch08/8.12/8.12.8/S8.12.8_A3.js index a54d3c2a81..70b2331ff2 100644 --- a/test/suite/ch08/8.12/8.12.8/S8.12.8_A3.js +++ b/test/suite/ch08/8.12/8.12.8/S8.12.8_A3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * We overload valueOf method so it return non Primitive value - * Thus [[DefaultValue]] must return Object.toString() value - * - * @path ch08/8.12/8.12.8/S8.12.8_A3.js - * @description Try to overload toString method, that returned Primitive, and valueOf method, that returned new Object - */ +/*--- +info: > + We overload valueOf method so it return non Primitive value + Thus [[DefaultValue]] must return Object.toString() value +es5id: 8.12.8_A3 +description: > + Try to overload toString method, that returned Primitive, and + valueOf method, that returned new Object +---*/ try { @@ -19,10 +21,4 @@ try catch(e) { $ERROR('#1.2: var __obj = {toNumber: function() {return "1"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (e)); -} - - - - - - +} diff --git a/test/suite/ch08/8.12/8.12.8/S8.12.8_A4.js b/test/suite/ch08/8.12/8.12.8/S8.12.8_A4.js index cec14497bd..ab7e5fa04b 100644 --- a/test/suite/ch08/8.12/8.12.8/S8.12.8_A4.js +++ b/test/suite/ch08/8.12/8.12.8/S8.12.8_A4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * We overload valueOf method so it return non Primitive value and toString method so it return non Primitive value too - * Thus [[DefaultValue]] must generate TypeError error - * - * @path ch08/8.12/8.12.8/S8.12.8_A4.js - * @description Try to overload toString and valueOf methods, they returned new Objects - */ +/*--- +info: > + We overload valueOf method so it return non Primitive value and toString method so it return non Primitive value too + Thus [[DefaultValue]] must generate TypeError error +es5id: 8.12.8_A4 +description: > + Try to overload toString and valueOf methods, they returned new + Objects +---*/ try { @@ -20,5 +22,4 @@ catch(e) if ((e instanceof TypeError) !== true) { $ERROR('#1.2: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js b/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js index 84ea475326..f857f76c6c 100644 --- a/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js +++ b/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.9/8.12.9-9-b-i_1.js - * @description Redefine a configurable data property to be an accessor property on a newly non-extensible object - */ - - -function testcase() { - var o = {}; - Object.defineProperty(o, "foo", - { value: "hello", - configurable: true}); - Object.preventExtensions(o); - Object.defineProperty(o, "foo", { get: function() { return 5;} }); - - var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); - return o.foo===5 && fooDescrip.get!==undefined && fooDescrip.set===undefined && fooDescrip.value===undefined && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===undefined; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.9-9-b-i_1 +description: > + Redefine a configurable data property to be an accessor property + on a newly non-extensible object +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + Object.defineProperty(o, "foo", + { value: "hello", + configurable: true}); + Object.preventExtensions(o); + Object.defineProperty(o, "foo", { get: function() { return 5;} }); + + var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); + return o.foo===5 && fooDescrip.get!==undefined && fooDescrip.set===undefined && fooDescrip.value===undefined && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===undefined; +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js b/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js index f7ba3048a8..e0c90bc8b5 100644 --- a/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js +++ b/test/suite/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.9/8.12.9-9-b-i_2.js - * @description Redefine a configurable data property to be an accessor property on a newly non-extensible object - */ - - -function testcase() { - var o = {}; - Object.defineProperty(o, "foo", - { value: "hello", - configurable: true, - enumerable: true, - writable: true}); - Object.preventExtensions(o); - Object.defineProperty(o, "foo", { get: function() { return 5;} }); - - var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); - return o.foo===5 && fooDescrip.get!==undefined && fooDescrip.set===undefined && fooDescrip.value===undefined && fooDescrip.configurable===true && fooDescrip.enumerable===true && fooDescrip.writable===undefined; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.9-9-b-i_2 +description: > + Redefine a configurable data property to be an accessor property + on a newly non-extensible object +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + Object.defineProperty(o, "foo", + { value: "hello", + configurable: true, + enumerable: true, + writable: true}); + Object.preventExtensions(o); + Object.defineProperty(o, "foo", { get: function() { return 5;} }); + + var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); + return o.foo===5 && fooDescrip.get!==undefined && fooDescrip.set===undefined && fooDescrip.value===undefined && fooDescrip.configurable===true && fooDescrip.enumerable===true && fooDescrip.writable===undefined; +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js b/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js index bef7ddc7d0..d314ec77ab 100644 --- a/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js +++ b/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.9/8.12.9-9-c-i_1.js - * @description Redefine a configurable accessor property to be a data property on a non-extensible object - */ - - -function testcase() { - var o = {}; - Object.defineProperty(o, "foo", - { get: function() { return 5;}, - configurable: true}); - Object.preventExtensions(o); - Object.defineProperty(o, "foo", { value: "hello"}); - - var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); - return o.foo==="hello" && fooDescrip.get===undefined && fooDescrip.set===undefined && fooDescrip.value==="hello" && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===false; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.9-9-c-i_1 +description: > + Redefine a configurable accessor property to be a data property on + a non-extensible object +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + Object.defineProperty(o, "foo", + { get: function() { return 5;}, + configurable: true}); + Object.preventExtensions(o); + Object.defineProperty(o, "foo", { value: "hello"}); + + var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); + return o.foo==="hello" && fooDescrip.get===undefined && fooDescrip.set===undefined && fooDescrip.value==="hello" && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===false; +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js b/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js index 0c4833ab6a..9d8ead4d41 100644 --- a/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js +++ b/test/suite/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.12/8.12.9/8.12.9-9-c-i_2.js - * @description Redefine a configurable accessor property to be a data property on a non-extensible object - */ - - -function testcase() { - var o = {}; - Object.defineProperty(o, "foo", - { get: function() { return 5;}, - configurable: true}); - Object.preventExtensions(o); - Object.defineProperty(o, "foo", - { value: "hello", - writable: true}); - - var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); - return o.foo==="hello" && fooDescrip.get===undefined && fooDescrip.set===undefined && fooDescrip.value==="hello" && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===true; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.12.9-9-c-i_2 +description: > + Redefine a configurable accessor property to be a data property on + a non-extensible object +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + Object.defineProperty(o, "foo", + { get: function() { return 5;}, + configurable: true}); + Object.preventExtensions(o); + Object.defineProperty(o, "foo", + { value: "hello", + writable: true}); + + var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo"); + return o.foo==="hello" && fooDescrip.get===undefined && fooDescrip.set===undefined && fooDescrip.value==="hello" && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===true; +} +runTestCase(testcase); diff --git a/test/suite/ch08/8.2/S8.2_A1_T1.js b/test/suite/ch08/8.2/S8.2_A1_T1.js index bf67b16cca..8776ce911e 100644 --- a/test/suite/ch08/8.2/S8.2_A1_T1.js +++ b/test/suite/ch08/8.2/S8.2_A1_T1.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Null Type has one value, called null - * - * @path ch08/8.2/S8.2_A1_T1.js - * @description Checking if execution of "var x = null" passes - */ +/*--- +info: The Null Type has one value, called null +es5id: 8.2_A1_T1 +description: Checking if execution of "var x = null" passes +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x = null; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.2/S8.2_A1_T2.js b/test/suite/ch08/8.2/S8.2_A1_T2.js index e0bcda72a8..a2330e2763 100644 --- a/test/suite/ch08/8.2/S8.2_A1_T2.js +++ b/test/suite/ch08/8.2/S8.2_A1_T2.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Null Type has one value, called null - * - * @path ch08/8.2/S8.2_A1_T2.js - * @description Checking if execution of "x = null" passes - */ +/*--- +info: The Null Type has one value, called null +es5id: 8.2_A1_T2 +description: Checking if execution of "x = null" passes +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x = null; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.2/S8.2_A2.js b/test/suite/ch08/8.2/S8.2_A2.js index 8cecf3cf81..fbd42c6760 100644 --- a/test/suite/ch08/8.2/S8.2_A2.js +++ b/test/suite/ch08/8.2/S8.2_A2.js @@ -1,15 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The null is resrved word - * - * @path ch08/8.2/S8.2_A2.js - * @description Checking if execution of "var null" fails - * @negative - */ +/*--- +info: The null is resrved word +es5id: 8.2_A2 +description: Checking if execution of "var null" fails +flags: [negative] +---*/ var null; - - - diff --git a/test/suite/ch08/8.2/S8.2_A3.js b/test/suite/ch08/8.2/S8.2_A3.js index 2d5d49bdf7..0f991e90ff 100644 --- a/test/suite/ch08/8.2/S8.2_A3.js +++ b/test/suite/ch08/8.2/S8.2_A3.js @@ -1,17 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * For the keyword null the typeof operator returns the "object" - * See also - * http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Operators:Special_Operators:typeof_Operator - * and - * http://bugs.ecmascript.org/ticket/250 - * for example - * - * @path ch08/8.2/S8.2_A3.js - * @description Check type of null - */ +/*--- +info: > + For the keyword null the typeof operator returns the "object" + See also + http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Operators:Special_Operators:typeof_Operator + and + http://bugs.ecmascript.org/ticket/250 + for example +es5id: 8.2_A3 +description: Check type of null +---*/ ////////////////////////////////////////////////////////////// // CHECK#1 @@ -20,4 +20,3 @@ if (typeof(null) !== "object") { } // ///////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.3/S8.3_A1_T1.js b/test/suite/ch08/8.3/S8.3_A1_T1.js index 3c48685261..c5f14672f8 100644 --- a/test/suite/ch08/8.3/S8.3_A1_T1.js +++ b/test/suite/ch08/8.3/S8.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Boolean type have two values, called true and false - * - * @path ch08/8.3/S8.3_A1_T1.js - * @description Assign true and false to variables - */ +/*--- +info: The Boolean type have two values, called true and false +es5id: 8.3_A1_T1 +description: Assign true and false to variables +---*/ if (x !== undefined) { $ERROR("#0 x !== undefined, but actual is "+ x); @@ -27,4 +26,3 @@ if (y !== false) { // //////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.3/S8.3_A1_T2.js b/test/suite/ch08/8.3/S8.3_A1_T2.js index b5740852eb..d11d67c3c4 100644 --- a/test/suite/ch08/8.3/S8.3_A1_T2.js +++ b/test/suite/ch08/8.3/S8.3_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Boolean type have two values, called true and false - * - * @path ch08/8.3/S8.3_A1_T2.js - * @description Check type of true/false and it`s equality - */ +/*--- +info: The Boolean type have two values, called true and false +es5id: 8.3_A1_T2 +description: Check type of true/false and it`s equality +---*/ ////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -71,5 +70,3 @@ if (false == true) { } // ////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.3/S8.3_A2.1.js b/test/suite/ch08/8.3/S8.3_A2.1.js index e8dfba19d9..55f2f83cc1 100644 --- a/test/suite/ch08/8.3/S8.3_A2.1.js +++ b/test/suite/ch08/8.3/S8.3_A2.1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The true is reserved word - * - * @path ch08/8.3/S8.3_A2.1.js - * @description Checking if execution of "true=1" fails - * @negative - */ +/*--- +info: The true is reserved word +es5id: 8.3_A2.1 +description: Checking if execution of "true=1" fails +flags: [negative] +---*/ true = 1; - diff --git a/test/suite/ch08/8.3/S8.3_A2.2.js b/test/suite/ch08/8.3/S8.3_A2.2.js index a3ab639cba..9258a21810 100644 --- a/test/suite/ch08/8.3/S8.3_A2.2.js +++ b/test/suite/ch08/8.3/S8.3_A2.2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The false is reserved word - * - * @path ch08/8.3/S8.3_A2.2.js - * @description Checking if execution of "false=0" fails - * @negative - */ +/*--- +info: The false is reserved word +es5id: 8.3_A2.2 +description: Checking if execution of "false=0" fails +flags: [negative] +---*/ false = 0; - diff --git a/test/suite/ch08/8.3/S8.3_A3.js b/test/suite/ch08/8.3/S8.3_A3.js index a3aa585c87..5d06b23565 100644 --- a/test/suite/ch08/8.3/S8.3_A3.js +++ b/test/suite/ch08/8.3/S8.3_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Applaing negation to boolean works well - * - * @path ch08/8.3/S8.3_A3.js - * @description Check not false equals true, not true equals false - */ +/*--- +info: Applaing negation to boolean works well +es5id: 8.3_A3 +description: Check not false equals true, not true equals false +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -39,4 +38,3 @@ if (!true != false){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A1.js b/test/suite/ch08/8.4/S8.4_A1.js index eb27fc3b31..4d378ca1bf 100644 --- a/test/suite/ch08/8.4/S8.4_A1.js +++ b/test/suite/ch08/8.4/S8.4_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Any variable that has been assigned with string literal has the type string - * - * @path ch08/8.4/S8.4_A1.js - * @description Check type of variable that has been assigned with string literal - */ +/*--- +info: > + Any variable that has been assigned with string literal has the type + string +es5id: 8.4_A1 +description: Check type of variable that has been assigned with string literal +---*/ ///////////////////////////////////////////////////////// // CHECK#1 @@ -43,4 +44,3 @@ if (typeof(str__)!=="string"){ } // //////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A10.js b/test/suite/ch08/8.4/S8.4_A10.js index fa2906fcff..9bc4414dff 100644 --- a/test/suite/ch08/8.4/S8.4_A10.js +++ b/test/suite/ch08/8.4/S8.4_A10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Both unicode and ascii chars are allowed - * - * @path ch08/8.4/S8.4_A10.js - * @description Create string using both unicode and ascii chars - */ +/*--- +info: Both unicode and ascii chars are allowed +es5id: 8.4_A10 +description: Create string using both unicode and ascii chars +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -34,4 +33,3 @@ if (str__ !== "ABCABC"){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A11.js b/test/suite/ch08/8.4/S8.4_A11.js index 8293382ecf..99311d4e8a 100644 --- a/test/suite/ch08/8.4/S8.4_A11.js +++ b/test/suite/ch08/8.4/S8.4_A11.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Presence of reserved words in string literal are allowed - * - * @path ch08/8.4/S8.4_A11.js - * @description Create string variable, thet include all reserved words - */ +/*--- +info: Presence of reserved words in string literal are allowed +es5id: 8.4_A11 +description: Create string variable, thet include all reserved words +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var __delete=" break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof "; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A12.js b/test/suite/ch08/8.4/S8.4_A12.js index 6073e08a3a..7229bf46c3 100644 --- a/test/suite/ch08/8.4/S8.4_A12.js +++ b/test/suite/ch08/8.4/S8.4_A12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assignment to string literal calls String constructor - * - * @path ch08/8.4/S8.4_A12.js - * @description Check constructor of simple assigned variable - */ +/*--- +info: Assignment to string literal calls String constructor +es5id: 8.4_A12 +description: Check constructor of simple assigned variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (str.constructor !== String){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A13_T1.js b/test/suite/ch08/8.4/S8.4_A13_T1.js index cefef0d815..46841c4a5d 100644 --- a/test/suite/ch08/8.4/S8.4_A13_T1.js +++ b/test/suite/ch08/8.4/S8.4_A13_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When appears not closed single-quote program failes - * - * @path ch08/8.4/S8.4_A13_T1.js - * @description Try to create variable using 3 single-quote - * @negative - */ +/*--- +info: When appears not closed single-quote program failes +es5id: 8.4_A13_T1 +description: Try to create variable using 3 single-quote +flags: [negative] +---*/ var str = '''; - diff --git a/test/suite/ch08/8.4/S8.4_A13_T2.js b/test/suite/ch08/8.4/S8.4_A13_T2.js index 085b17a3d0..e13fabf743 100644 --- a/test/suite/ch08/8.4/S8.4_A13_T2.js +++ b/test/suite/ch08/8.4/S8.4_A13_T2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When appears not closed single-quote program failes - * - * @path ch08/8.4/S8.4_A13_T2.js - * @description Try to create variable using 1 single-quote - * @negative - */ +/*--- +info: When appears not closed single-quote program failes +es5id: 8.4_A13_T2 +description: Try to create variable using 1 single-quote +flags: [negative] +---*/ var str = '; - diff --git a/test/suite/ch08/8.4/S8.4_A13_T3.js b/test/suite/ch08/8.4/S8.4_A13_T3.js index c777d754a4..444e34f243 100644 --- a/test/suite/ch08/8.4/S8.4_A13_T3.js +++ b/test/suite/ch08/8.4/S8.4_A13_T3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When appears not closed single-quote program failes - * - * @path ch08/8.4/S8.4_A13_T3.js - * @description Try to create variable using 4 single-quote - * @negative - */ +/*--- +info: When appears not closed single-quote program failes +es5id: 8.4_A13_T3 +description: Try to create variable using 4 single-quote +flags: [negative] +---*/ var str = ''''; - diff --git a/test/suite/ch08/8.4/S8.4_A14_T1.js b/test/suite/ch08/8.4/S8.4_A14_T1.js index 309704fef9..802e3fa28b 100644 --- a/test/suite/ch08/8.4/S8.4_A14_T1.js +++ b/test/suite/ch08/8.4/S8.4_A14_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When appears not closed double-quote program failes - * - * @path ch08/8.4/S8.4_A14_T1.js - * @description Try to create variable using 1 double-quote - * @negative - */ +/*--- +info: When appears not closed double-quote program failes +es5id: 8.4_A14_T1 +description: Try to create variable using 1 double-quote +flags: [negative] +---*/ var str = "; - diff --git a/test/suite/ch08/8.4/S8.4_A14_T2.js b/test/suite/ch08/8.4/S8.4_A14_T2.js index ee16cbd738..fa07f66622 100644 --- a/test/suite/ch08/8.4/S8.4_A14_T2.js +++ b/test/suite/ch08/8.4/S8.4_A14_T2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When appears not closed double-quote program failes - * - * @path ch08/8.4/S8.4_A14_T2.js - * @description Try to create variable using 3 double-quote - * @negative - */ +/*--- +info: When appears not closed double-quote program failes +es5id: 8.4_A14_T2 +description: Try to create variable using 3 double-quote +flags: [negative] +---*/ var str = """; - diff --git a/test/suite/ch08/8.4/S8.4_A14_T3.js b/test/suite/ch08/8.4/S8.4_A14_T3.js index 85a5ba9bc8..bd3d8919bf 100644 --- a/test/suite/ch08/8.4/S8.4_A14_T3.js +++ b/test/suite/ch08/8.4/S8.4_A14_T3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When appears not closed double-quote program failes - * - * @path ch08/8.4/S8.4_A14_T3.js - * @description Try to create variable using 4 double-quote - * @negative - */ +/*--- +info: When appears not closed double-quote program failes +es5id: 8.4_A14_T3 +description: Try to create variable using 4 double-quote +flags: [negative] +---*/ var str = """"; - diff --git a/test/suite/ch08/8.4/S8.4_A2.js b/test/suite/ch08/8.4/S8.4_A2.js index f18e343a91..4001507b52 100644 --- a/test/suite/ch08/8.4/S8.4_A2.js +++ b/test/suite/ch08/8.4/S8.4_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Empty string has type string - * - * @path ch08/8.4/S8.4_A2.js - * @description Create empty string and check it type - */ +/*--- +info: Empty string has type string +es5id: 8.4_A2 +description: Create empty string and check it type +---*/ ///////////////////////////////////////////////////////// // CHECK#1 @@ -25,4 +24,3 @@ if (typeof(str) !== "string"){ } // //////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A3.js b/test/suite/ch08/8.4/S8.4_A3.js index 8b3e180348..d32aa57d67 100644 --- a/test/suite/ch08/8.4/S8.4_A3.js +++ b/test/suite/ch08/8.4/S8.4_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String type has a length property - * - * @path ch08/8.4/S8.4_A3.js - * @description Try read length property of string variable - */ +/*--- +info: String type has a length property +es5id: 8.4_A3 +description: Try read length property of string variable +---*/ var __str = "ABCDEFGH"; ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +15,3 @@ if (__str.length !== 8) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A4.js b/test/suite/ch08/8.4/S8.4_A4.js index a89314fdbb..93bb8a2e14 100644 --- a/test/suite/ch08/8.4/S8.4_A4.js +++ b/test/suite/ch08/8.4/S8.4_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Empty string variable has a length property - * - * @path ch08/8.4/S8.4_A4.js - * @description Try read length property of empty string variable - */ +/*--- +info: Empty string variable has a length property +es5id: 8.4_A4 +description: Try read length property of empty string variable +---*/ var __str = ""; ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +15,3 @@ if (__str.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A5.js b/test/suite/ch08/8.4/S8.4_A5.js index 178891c3b8..15eeaf324d 100644 --- a/test/suite/ch08/8.4/S8.4_A5.js +++ b/test/suite/ch08/8.4/S8.4_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Zero "\0" not terminates the string(C string) - * - * @path ch08/8.4/S8.4_A5.js - * @description Insert "\0" into string - */ +/*--- +info: Zero "\0" not terminates the string(C string) +es5id: 8.4_A5 +description: Insert "\0" into string +---*/ // CHECK#1 if ("x\0y" === "x") { @@ -17,4 +16,3 @@ if ("x\0y" === "x") { if (!(("x\0a" < "x\0b") && ("x\0b" < "x\0c"))) { $ERROR('#2: (("x\\0a" < "x\\0b") && ("x\\0b" < "x\\0c")) === true'); } - diff --git a/test/suite/ch08/8.4/S8.4_A6.1.js b/test/suite/ch08/8.4/S8.4_A6.1.js index 29a8691e1b..f0564cd92d 100644 --- a/test/suite/ch08/8.4/S8.4_A6.1.js +++ b/test/suite/ch08/8.4/S8.4_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Large string 4096 bytes - * - * @path ch08/8.4/S8.4_A6.1.js - * @description Assign variable by large string - */ +/*--- +info: Large string 4096 bytes +es5id: 8.4_A6.1 +description: Assign variable by large string +---*/ //////////////////////////////////////////////////// // Check#1 @@ -16,4 +15,3 @@ if(largeStr !== 'Standard ECMA-2623r d Edition - December 1999S t a n d a r d i } // //////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A6.2.js b/test/suite/ch08/8.4/S8.4_A6.2.js index 5794b030d6..bc5d70b113 100644 --- a/test/suite/ch08/8.4/S8.4_A6.2.js +++ b/test/suite/ch08/8.4/S8.4_A6.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Large string 8192 bytes - * - * @path ch08/8.4/S8.4_A6.2.js - * @description Assign variable by large string - */ +/*--- +info: Large string 8192 bytes +es5id: 8.4_A6.2 +description: Assign variable by large string +---*/ //////////////////////////////////////////////////// // Check#2 @@ -16,4 +15,3 @@ if(largeStr !== 'Standard ECMA-2623r d Edition - December 1999S t a n d a r d i } // //////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A7.1.js b/test/suite/ch08/8.4/S8.4_A7.1.js index 137cf30bf0..9249c0e060 100644 --- a/test/suite/ch08/8.4/S8.4_A7.1.js +++ b/test/suite/ch08/8.4/S8.4_A7.1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * between chunks of one string not allowed - * - * @path ch08/8.4/S8.4_A7.1.js - * @description Insert between chunks of one string - * @negative - */ +/*--- +info: between chunks of one string not allowed +es5id: 8.4_A7.1 +description: Insert between chunks of one string +flags: [negative] +---*/ eval("var x = asdf\u000Aghjk"); - diff --git a/test/suite/ch08/8.4/S8.4_A7.2.js b/test/suite/ch08/8.4/S8.4_A7.2.js index bd2cfd25f1..fa0187002c 100644 --- a/test/suite/ch08/8.4/S8.4_A7.2.js +++ b/test/suite/ch08/8.4/S8.4_A7.2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * between chunks of one string not allowed - * - * @path ch08/8.4/S8.4_A7.2.js - * @description Insert between chunks of one string - * @negative - */ +/*--- +info: between chunks of one string not allowed +es5id: 8.4_A7.2 +description: Insert between chunks of one string +flags: [negative] +---*/ eval("var x = asdf\u000Dghjk"); - diff --git a/test/suite/ch08/8.4/S8.4_A7.3.js b/test/suite/ch08/8.4/S8.4_A7.3.js index 37ee22caeb..70a746e932 100644 --- a/test/suite/ch08/8.4/S8.4_A7.3.js +++ b/test/suite/ch08/8.4/S8.4_A7.3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * between chunks of one string not allowed - * - * @path ch08/8.4/S8.4_A7.3.js - * @description Insert between chunks of one string - * @negative - */ +/*--- +info: between chunks of one string not allowed +es5id: 8.4_A7.3 +description: Insert between chunks of one string +flags: [negative] +---*/ eval("var x = asdf\u2028ghjk"); - diff --git a/test/suite/ch08/8.4/S8.4_A7.4.js b/test/suite/ch08/8.4/S8.4_A7.4.js index 7c8373c547..32ea695bb7 100644 --- a/test/suite/ch08/8.4/S8.4_A7.4.js +++ b/test/suite/ch08/8.4/S8.4_A7.4.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * between chunks of one string not allowed - * - * @path ch08/8.4/S8.4_A7.4.js - * @description Insert between chunks of one string - * @negative - */ +/*--- +info: between chunks of one string not allowed +es5id: 8.4_A7.4 +description: Insert between chunks of one string +flags: [negative] +---*/ eval("var x = asdf\u2029ghjk"); - diff --git a/test/suite/ch08/8.4/S8.4_A8.js b/test/suite/ch08/8.4/S8.4_A8.js index 89872cd4c0..0009744c7c 100644 --- a/test/suite/ch08/8.4/S8.4_A8.js +++ b/test/suite/ch08/8.4/S8.4_A8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Empty string, 0, false are all equal (==) to each other, since they all evaluate to 0 - * - * @path ch08/8.4/S8.4_A8.js - * @description Compare empty string with undefined, null, 0 and false - */ +/*--- +info: > + Empty string, 0, false are all equal (==) to each other, since they all + evaluate to 0 +es5id: 8.4_A8 +description: Compare empty string with undefined, null, 0 and false +---*/ var str=''; @@ -41,4 +42,3 @@ if (str != false){ } // ///////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A9_T1.js b/test/suite/ch08/8.4/S8.4_A9_T1.js index 736648079b..ca0d836916 100644 --- a/test/suite/ch08/8.4/S8.4_A9_T1.js +++ b/test/suite/ch08/8.4/S8.4_A9_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assignment to string literals calls String constructor - * - * @path ch08/8.4/S8.4_A9_T1.js - * @description Simple string variable compare with object String - */ +/*--- +info: Assignment to string literals calls String constructor +es5id: 8.4_A9_T1 +description: Simple string variable compare with object String +---*/ var str='ABC'; var strObj=new String('ABC'); @@ -34,4 +33,3 @@ if (str === strObj){ } // ///////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A9_T2.js b/test/suite/ch08/8.4/S8.4_A9_T2.js index a32f5b1462..156dbfe4c4 100644 --- a/test/suite/ch08/8.4/S8.4_A9_T2.js +++ b/test/suite/ch08/8.4/S8.4_A9_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assignment to string literals calls String constructor - * - * @path ch08/8.4/S8.4_A9_T2.js - * @description Compare empty string variable, object String('') and object String() - */ +/*--- +info: Assignment to string literals calls String constructor +es5id: 8.4_A9_T2 +description: > + Compare empty string variable, object String('') and object + String() +---*/ var str=""; var strObj=new String(""); @@ -59,4 +60,3 @@ if (str === strObj_){ } // ///////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.4/S8.4_A9_T3.js b/test/suite/ch08/8.4/S8.4_A9_T3.js index 3008839575..c389cece25 100644 --- a/test/suite/ch08/8.4/S8.4_A9_T3.js +++ b/test/suite/ch08/8.4/S8.4_A9_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assignment to string literals calls String constructor - * - * @path ch08/8.4/S8.4_A9_T3.js - * @description Simple empty string variable compare with empty object String - */ +/*--- +info: Assignment to string literals calls String constructor +es5id: 8.4_A9_T3 +description: Simple empty string variable compare with empty object String +---*/ var str=""; var strObj=new String; @@ -42,5 +41,3 @@ if (typeof str == typeof strObj){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.5/8.5.1.js b/test/suite/ch08/8.5/8.5.1.js index 076eebfba3..c9c98830af 100644 --- a/test/suite/ch08/8.5/8.5.1.js +++ b/test/suite/ch08/8.5/8.5.1.js @@ -1,12 +1,13 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.5/8.5.1.js - * @description Valid Number ranges - */ +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.5.1 +description: Valid Number ranges +---*/ // Check range support for Number values (IEEE 754 64-bit floats having the form s*m*2**e) // diff --git a/test/suite/ch08/8.5/S8.5_A1.js b/test/suite/ch08/8.5/S8.5_A1.js index 23a14a3254..006f35f4e2 100644 --- a/test/suite/ch08/8.5/S8.5_A1.js +++ b/test/suite/ch08/8.5/S8.5_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NaN !== NaN - * - * @path ch08/8.5/S8.5_A1.js - * @description Compare NaN with NaN - */ +/*--- +info: NaN !== NaN +es5id: 8.5_A1 +description: Compare NaN with NaN +---*/ var x = Number.NaN; var x_ = Number.NaN; @@ -18,4 +17,3 @@ if (x === x_){ } // ////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.5/S8.5_A10.js b/test/suite/ch08/8.5/S8.5_A10.js index 436c920c5f..78e2bacd2b 100644 --- a/test/suite/ch08/8.5/S8.5_A10.js +++ b/test/suite/ch08/8.5/S8.5_A10.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Infinity is not a keyword - * - * @path ch08/8.5/S8.5_A10.js - * @description Create variable entitled Infinity - */ +/*--- +info: Infinity is not a keyword +es5id: 8.5_A10 +description: Create variable entitled Infinity +---*/ var Infinity=1.0; Infinity='asdf'; Infinity=true; - diff --git a/test/suite/ch08/8.5/S8.5_A11_T1.js b/test/suite/ch08/8.5/S8.5_A11_T1.js index e298d32ea0..b518cb1d84 100644 --- a/test/suite/ch08/8.5/S8.5_A11_T1.js +++ b/test/suite/ch08/8.5/S8.5_A11_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The integer 0 has two representations, +0 and -0 - * - * @path ch08/8.5/S8.5_A11_T1.js - * @description Check 1.0/p_zero !== 1.0/n_zero - */ +/*--- +info: The integer 0 has two representations, +0 and -0 +es5id: 8.5_A11_T1 +description: Check 1.0/p_zero !== 1.0/n_zero +---*/ var p_zero=+0; var n_zero=-0; @@ -14,4 +13,3 @@ var n_zero=-0; if (1.0/p_zero === 1.0/n_zero){ $ERROR('#1: var p_zero=+0; var n_zero=-0; 1.0/p_zero !== 1.0/n_zero'); } - diff --git a/test/suite/ch08/8.5/S8.5_A11_T2.js b/test/suite/ch08/8.5/S8.5_A11_T2.js index 122c345edc..982a7df371 100644 --- a/test/suite/ch08/8.5/S8.5_A11_T2.js +++ b/test/suite/ch08/8.5/S8.5_A11_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The integer 0 has two representations, +0 and -0 - * - * @path ch08/8.5/S8.5_A11_T2.js - * @description Compare positive_zero and negative_zero - */ +/*--- +info: The integer 0 has two representations, +0 and -0 +es5id: 8.5_A11_T2 +description: Compare positive_zero and negative_zero +---*/ var p_zero=+0; var n_zero=-0; @@ -35,4 +34,3 @@ if ((p_zero === 0) !== true){ if ((n_zero === -0) !== true){ $ERROR('#5: var p_zero=+0; var n_zero=-0; n_zero === -0'); } - diff --git a/test/suite/ch08/8.5/S8.5_A12.1.js b/test/suite/ch08/8.5/S8.5_A12.1.js index 846aab24d9..90b0d7fc78 100644 --- a/test/suite/ch08/8.5/S8.5_A12.1.js +++ b/test/suite/ch08/8.5/S8.5_A12.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * +Infinity and Infinity are the same as Number.POSITIVE_INFINITY - * - * @path ch08/8.5/S8.5_A12.1.js - * @description Compare Infinity and +Infinity with Number.POSITIVE_INFINITY - */ +/*--- +info: +Infinity and Infinity are the same as Number.POSITIVE_INFINITY +es5id: 8.5_A12.1 +description: Compare Infinity and +Infinity with Number.POSITIVE_INFINITY +---*/ var p_inf=+Infinity; var inf=Infinity; @@ -20,4 +19,3 @@ if (p_inf!==Number.POSITIVE_INFINITY){ if (inf!==Number.POSITIVE_INFINITY){ $ERROR('#2: Infinity is the same as Number.POSITIVE_INFINITY'); } - diff --git a/test/suite/ch08/8.5/S8.5_A12.2.js b/test/suite/ch08/8.5/S8.5_A12.2.js index e1397ed1dc..6702a45547 100644 --- a/test/suite/ch08/8.5/S8.5_A12.2.js +++ b/test/suite/ch08/8.5/S8.5_A12.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * -Infinity is the same as Number.NEGATIVE_INFINITY - * - * @path ch08/8.5/S8.5_A12.2.js - * @description Compare -Infinity with Number.NEGATIVE_INFINITY - */ +/*--- +info: -Infinity is the same as Number.NEGATIVE_INFINITY +es5id: 8.5_A12.2 +description: Compare -Infinity with Number.NEGATIVE_INFINITY +---*/ var n_inf=-Infinity; @@ -14,4 +13,3 @@ var n_inf=-Infinity; if (n_inf !== Number.NEGATIVE_INFINITY){ $ERROR('#1: -Infinity is the same as Number.NEGATIVE_INFINITY'); } - diff --git a/test/suite/ch08/8.5/S8.5_A13_T2.js b/test/suite/ch08/8.5/S8.5_A13_T2.js index ef7e2a5ca2..ffbec78c46 100644 --- a/test/suite/ch08/8.5/S8.5_A13_T2.js +++ b/test/suite/ch08/8.5/S8.5_A13_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Finite nonzero values that are Normalised having the form s*m*2**e - * where s is +1 or -1, m is a positive integer less than 2**53 but not - * less than s**52 and e is an integer ranging from -1074 to 971 - * - * @path ch08/8.5/S8.5_A13_T2.js - * @description Finite Non zero values where e is 971 - */ +/*--- +info: > + Finite nonzero values that are Normalised having the form s*m*2**e + where s is +1 or -1, m is a positive integer less than 2**53 but not + less than s**52 and e is an integer ranging from -1074 to 971 +es5id: 8.5_A13_T2 +description: Finite Non zero values where e is 971 +---*/ //CHECK #1 if ((1*(Math.pow(2,52))*(Math.pow(2,971))) !== 8.98846567431158e+307){ @@ -24,4 +24,3 @@ if ((1*((Math.pow(2,53))-1)*(Math.pow(2,971))) !== 1.7976931348623157e+308){ if ((-1*(Math.pow(2,52))*(Math.pow(2,971))) !== -8.98846567431158e+307){ $ERROR('#3: (-1*(Math.pow(2,52))*(Math.pow(2,971))) === -8.98846567431158e+307. Actual: ' + ((-1*(Math.pow(2,52))*(Math.pow(2,971))))); } - diff --git a/test/suite/ch08/8.5/S8.5_A14_T1.js b/test/suite/ch08/8.5/S8.5_A14_T1.js index 0b5e87b3ee..d95f23f2da 100644 --- a/test/suite/ch08/8.5/S8.5_A14_T1.js +++ b/test/suite/ch08/8.5/S8.5_A14_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When number absolute value is bigger of 2**1024 should convert to Infinity - * - * @path ch08/8.5/S8.5_A14_T1.js - * @description Create number bigger of 2**1024 - */ +/*--- +info: When number absolute value is bigger of 2**1024 should convert to Infinity +es5id: 8.5_A14_T1 +description: Create number bigger of 2**1024 +---*/ //CHECK #1 if (1e+308*2 !== Infinity){ @@ -17,4 +16,3 @@ if (1e+308*2 !== Infinity){ if ((1*(Math.pow(2,53))*(Math.pow(2,971))) !== Infinity){ $ERROR('#2: (1*(Math.pow(2,53))*(Math.pow(2,971))) === Infinity. Actual: ' + ((1*(Math.pow(2,53))*(Math.pow(2,971))))); } - diff --git a/test/suite/ch08/8.5/S8.5_A14_T2.js b/test/suite/ch08/8.5/S8.5_A14_T2.js index 37dc8cd5fa..72144e3550 100644 --- a/test/suite/ch08/8.5/S8.5_A14_T2.js +++ b/test/suite/ch08/8.5/S8.5_A14_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When number absolute value is bigger of 2**1024 should convert to Infinity - * - * @path ch08/8.5/S8.5_A14_T2.js - * @description Create number smaller of -2**1024 - */ +/*--- +info: When number absolute value is bigger of 2**1024 should convert to Infinity +es5id: 8.5_A14_T2 +description: Create number smaller of -2**1024 +---*/ //CHECK #1 if (-1e+308*3 !== -Infinity){ @@ -17,4 +16,3 @@ if (-1e+308*3 !== -Infinity){ if ((-1*(Math.pow(2,53))*(Math.pow(2,971))) !== -Infinity){ $ERROR('#2: (-1*(Math.pow(2,53))*(Math.pow(2,971))) === Infinity. Actual: ' + ((-1*(Math.pow(2,53))*(Math.pow(2,971))))); } - diff --git a/test/suite/ch08/8.5/S8.5_A2.1.js b/test/suite/ch08/8.5/S8.5_A2.1.js index 0baca20f99..616887fc92 100644 --- a/test/suite/ch08/8.5/S8.5_A2.1.js +++ b/test/suite/ch08/8.5/S8.5_A2.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number type represented as the double precision 64-bit format IEEE 754 - * - * @path ch08/8.5/S8.5_A2.1.js - * @description Use 2^53 + 2 number and do some operation with it - */ +/*--- +info: Number type represented as the double precision 64-bit format IEEE 754 +es5id: 8.5_A2.1 +description: Use 2^53 + 2 number and do some operation with it +---*/ var x = 9007199254740994.0; /* 2^53 + 2 */ var y = 1.0 - 1/65536.0; @@ -16,4 +15,3 @@ var d = z - x; if (d !== 0){ $ERROR('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d === 0. Actual: ' + (d)); } - diff --git a/test/suite/ch08/8.5/S8.5_A2.2.js b/test/suite/ch08/8.5/S8.5_A2.2.js index eec0622018..4418f8483b 100644 --- a/test/suite/ch08/8.5/S8.5_A2.2.js +++ b/test/suite/ch08/8.5/S8.5_A2.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number type represented as the extended precision 64-bit format IEEE 754 - * - * @path ch08/8.5/S8.5_A2.2.js - * @description Use 2^53 + 2 number and do some operation with it - */ +/*--- +info: Number type represented as the extended precision 64-bit format IEEE 754 +es5id: 8.5_A2.2 +description: Use 2^53 + 2 number and do some operation with it +---*/ var x = 9007199254740994.0; /* 2^53 + 2 */ var y = 1.0 - 1/65536.0; @@ -16,4 +15,3 @@ var d = z - x; if (d === 2){ $ERROR('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d !== 2'); } - diff --git a/test/suite/ch08/8.5/S8.5_A3.js b/test/suite/ch08/8.5/S8.5_A3.js index 89f1299a63..af136dd4a6 100644 --- a/test/suite/ch08/8.5/S8.5_A3.js +++ b/test/suite/ch08/8.5/S8.5_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NaN expression has a type Number - * - * @path ch08/8.5/S8.5_A3.js - * @description Check type of NaN - */ +/*--- +info: NaN expression has a type Number +es5id: 8.5_A3 +description: Check type of NaN +---*/ var x=NaN; @@ -25,4 +24,3 @@ if (typeof(NaN) !== "number"){ } // ////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.5/S8.5_A4.js b/test/suite/ch08/8.5/S8.5_A4.js index b54f8dbef3..2f580f67b3 100644 --- a/test/suite/ch08/8.5/S8.5_A4.js +++ b/test/suite/ch08/8.5/S8.5_A4.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NaN is not a keyword - * - * @path ch08/8.5/S8.5_A4.js - * @description Create variable entitled NaN - */ +/*--- +info: NaN is not a keyword +es5id: 8.5_A4 +description: Create variable entitled NaN +---*/ var NaN=1.0; NaN='asdf'; NaN=true; NaN=Number.NaN; - diff --git a/test/suite/ch08/8.5/S8.5_A5.js b/test/suite/ch08/8.5/S8.5_A5.js index 6587609c2f..1ce6f77e43 100644 --- a/test/suite/ch08/8.5/S8.5_A5.js +++ b/test/suite/ch08/8.5/S8.5_A5.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * NaN not greater or equal zero - * - * @path ch08/8.5/S8.5_A5.js - * @description Compare NaN with zero - */ +/*--- +info: NaN not greater or equal zero +es5id: 8.5_A5 +description: Compare NaN with zero +includes: [$PRINT.js] +---*/ var x = NaN; var x_geq_0=(x >= 0.0); @@ -54,4 +54,3 @@ if (x_geq_0_ADD_leq_0){ } // /////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.5/S8.5_A6.js b/test/suite/ch08/8.5/S8.5_A6.js index e621f75630..dfe3567864 100644 --- a/test/suite/ch08/8.5/S8.5_A6.js +++ b/test/suite/ch08/8.5/S8.5_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * -Infinity expression has a type Number - * - * @path ch08/8.5/S8.5_A6.js - * @description Check type of -Infinity - */ +/*--- +info: -Infinity expression has a type Number +es5id: 8.5_A6 +description: Check type of -Infinity +---*/ var x=-Infinity; @@ -25,4 +24,3 @@ if (typeof(-Infinity) !== "number"){ } // ////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.5/S8.5_A7.js b/test/suite/ch08/8.5/S8.5_A7.js index 0f17e85f06..740a9c7c3b 100644 --- a/test/suite/ch08/8.5/S8.5_A7.js +++ b/test/suite/ch08/8.5/S8.5_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * +Infinity expression has a type Number - * - * @path ch08/8.5/S8.5_A7.js - * @description Check type of +Infinity - */ +/*--- +info: +Infinity expression has a type Number +es5id: 8.5_A7 +description: Check type of +Infinity +---*/ var x=+Infinity; @@ -25,4 +24,3 @@ if (typeof(+Infinity) !== "number"){ } // ////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.5/S8.5_A8.js b/test/suite/ch08/8.5/S8.5_A8.js index 95c87824be..2c232cd8a6 100644 --- a/test/suite/ch08/8.5/S8.5_A8.js +++ b/test/suite/ch08/8.5/S8.5_A8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Infinity is the same as +Infinity - * - * @path ch08/8.5/S8.5_A8.js - * @description Compare Infinity and +Infinity - */ +/*--- +info: Infinity is the same as +Infinity +es5id: 8.5_A8 +description: Compare Infinity and +Infinity +---*/ var p_inf=+Infinity; var inf=Infinity; @@ -18,4 +17,3 @@ if (p_inf!==inf){ } // ////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.5/S8.5_A9.js b/test/suite/ch08/8.5/S8.5_A9.js index ff783d50f3..44340dc26a 100644 --- a/test/suite/ch08/8.5/S8.5_A9.js +++ b/test/suite/ch08/8.5/S8.5_A9.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Globally defined variable NaN has not been altered by program execution - * - * @path ch08/8.5/S8.5_A9.js - * @description Try alter globally defined variable NaN - * @noStrict - */ +/*--- +info: Globally defined variable NaN has not been altered by program execution +es5id: 8.5_A9 +description: Try alter globally defined variable NaN +flags: [noStrict] +---*/ Number.NaN = 1; if (Number.NaN === 1) { $ERROR('#1: Globally defined variable NaN has not been altered by program execution'); } - diff --git a/test/suite/ch08/8.6/8.6.1/S8.6.1_A1.js b/test/suite/ch08/8.6/8.6.1/S8.6.1_A1.js index df5609b38a..86e6718ca0 100644 --- a/test/suite/ch08/8.6/8.6.1/S8.6.1_A1.js +++ b/test/suite/ch08/8.6/8.6.1/S8.6.1_A1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property can have attribute ReadOnly like E in Math - * - * @path ch08/8.6/8.6.1/S8.6.1_A1.js - * @description Try change Math.E property - * @noStrict - */ +/*--- +info: A property can have attribute ReadOnly like E in Math +es5id: 8.6.1_A1 +description: Try change Math.E property +flags: [noStrict] +---*/ var __e = Math.E; Math.E=1; if (Math.E !==__e){ $ERROR('#1: __e = Math.E; Math.E=1; Math.E ===__e'); } - diff --git a/test/suite/ch08/8.6/8.6.1/S8.6.1_A2.js b/test/suite/ch08/8.6/8.6.1/S8.6.1_A2.js index c8fe932c58..d1f17c96c5 100644 --- a/test/suite/ch08/8.6/8.6.1/S8.6.1_A2.js +++ b/test/suite/ch08/8.6/8.6.1/S8.6.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property can have attribute DontEnum like all properties of Number - * - * @path ch08/8.6/8.6.1/S8.6.1_A2.js - * @description Try to enumerate properties of Number - */ +/*--- +info: A property can have attribute DontEnum like all properties of Number +es5id: 8.6.1_A2 +description: Try to enumerate properties of Number +---*/ //CHECK#1 var count=0; @@ -14,4 +13,3 @@ for (p in Number) count++; if (count > 0){ $ERROR('#1: count=0; for (p in Number) count++; count > 0. Actual: ' + (count)); } - diff --git a/test/suite/ch08/8.6/8.6.1/S8.6.1_A3.js b/test/suite/ch08/8.6/8.6.1/S8.6.1_A3.js index 099dc46c9e..59e71a0ea9 100644 --- a/test/suite/ch08/8.6/8.6.1/S8.6.1_A3.js +++ b/test/suite/ch08/8.6/8.6.1/S8.6.1_A3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property can have attribute DontDelete like NaN propertie of Number object - * - * @path ch08/8.6/8.6.1/S8.6.1_A3.js - * @description Try to delete Number.NaN - * @noStrict - */ +/*--- +info: > + A property can have attribute DontDelete like NaN propertie of Number + object +es5id: 8.6.1_A3 +description: Try to delete Number.NaN +flags: [noStrict] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -24,4 +25,3 @@ if (typeof(Number.NaN) === "undefined"){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A1.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A1.js index 371d16848f..e3046c0832 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A1.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Native ECMAScript objects have an internal property called [[Prototype]]. The value of this property is - * either null or an object and is used for implementing inheritance - * - * @path ch08/8.6/8.6.2/S8.6.2_A1.js - * @description Check [[Prototype]] property of object - */ +/*--- +info: > + Native ECMAScript objects have an internal property called [[Prototype]]. The value of this property is + either null or an object and is used for implementing inheritance +es5id: 8.6.2_A1 +description: Check [[Prototype]] property of object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -70,4 +70,3 @@ if (!protoObj.isPrototypeOf(__foo)){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A2.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A2.js index 5d4ccbd3ef..c33c10882d 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A2.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Properties of the [[Prototype]] object - * are visible as properties of the child object for the purposes of get access, but not for put access - * - * @path ch08/8.6/8.6.2/S8.6.2_A2.js - * @description Check visibility properties of the child object for the purposes of get access, but not for put access - */ +/*--- +info: > + Properties of the [[Prototype]] object + are visible as properties of the child object for the purposes of get access, but not for put access +es5id: 8.6.2_A2 +description: > + Check visibility properties of the child object for the purposes + of get access, but not for put access +---*/ //Establish foo object function FooObj(){}; @@ -34,4 +36,3 @@ if (foo__.prop !== "some"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A3.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A3.js index 506471148c..a992800e60 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A3.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The specification does not provide any means for a program to access [[class]] value except through Object.prototype.toString - * - * @path ch08/8.6/8.6.2/S8.6.2_A3.js - * @description Get [[class]] value except through Object.prototype.toString - */ +/*--- +info: > + The specification does not provide any means for a program to access + [[class]] value except through Object.prototype.toString +es5id: 8.6.2_A3 +description: Get [[class]] value except through Object.prototype.toString +---*/ var __obj={}; ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +17,3 @@ if (__obj.toString() !== "[object " + 'Object' + "]"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A4.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A4.js index f147e6aaa1..966ceb0ebe 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A4.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[HasInstance]] returns a boolean value indicating whether Value delegates behaviour to this object - * - * @path ch08/8.6/8.6.2/S8.6.2_A4.js - * @description Check that the obj instance of Object, but not instance - * of Function, String, Number, Array - */ +/*--- +info: > + [[HasInstance]] returns a boolean value indicating whether Value + delegates behaviour to this object +es5id: 8.6.2_A4 +description: > + Check that the obj instance of Object, but not instance of + Function, String, Number, Array +---*/ var __obj={}; @@ -50,4 +52,3 @@ if (__obj instanceof Array) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T1.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T1.js index 47fa0ef6f8..f4f7dcab4e 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T1.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Call]] executes code associated with the object - * - * @path ch08/8.6/8.6.2/S8.6.2_A5_T1.js - * @description Call function-property of object, property defined - * as testScreen = {touch:function(){count++}} - */ +/*--- +info: "[[Call]] executes code associated with the object" +es5id: 8.6.2_A5_T1 +description: > + Call function-property of object, property defined as testScreen + = {touch:function(){count++}} +---*/ this.count=0; @@ -29,4 +29,3 @@ if (count !==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T2.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T2.js index 391122473f..df7eaf7a0e 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T2.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Call]] executes code associated with the object - * - * @path ch08/8.6/8.6.2/S8.6.2_A5_T2.js - * @description Call function-property of object, property defined - * as seat['move']=function(){position++} - */ +/*--- +info: "[[Call]] executes code associated with the object" +es5id: 8.6.2_A5_T2 +description: > + Call function-property of object, property defined as + seat['move']=function(){position++} +---*/ this.position=0; var seat = {}; @@ -29,4 +29,3 @@ if (position !==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T3.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T3.js index bbd603e4c8..8de5c06e82 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T3.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Call]] executes code associated with the object - * - * @path ch08/8.6/8.6.2/S8.6.2_A5_T3.js - * @description Call function-property of global object, property defined - * as knock=function(){count++} - */ +/*--- +info: "[[Call]] executes code associated with the object" +es5id: 8.6.2_A5_T3 +description: > + Call function-property of global object, property defined as + knock=function(){count++} +---*/ var count=0; var knock=function(){count++}; @@ -28,4 +28,3 @@ if (count !==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T4.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T4.js index 7f38b27a00..2230c4473c 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T4.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A5_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Call]] executes code associated with the object - * - * @path ch08/8.6/8.6.2/S8.6.2_A5_T4.js - * @description Call function-property of global object, property defined - * as this['beep']=function(){__count++} - */ +/*--- +info: "[[Call]] executes code associated with the object" +es5id: 8.6.2_A5_T4 +description: > + Call function-property of global object, property defined as + this['beep']=function(){__count++} +---*/ var __count=0; @@ -29,4 +29,3 @@ if (__count !==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A6.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A6.js index d62d34b47e..01292ca4e4 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A6.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Construct]] constructs an object. Invoked via the new operator. Objects that implement this internal method are called constructors - * - * @path ch08/8.6/8.6.2/S8.6.2_A6.js - * @description Create a few Objects via the new operator - */ +/*--- +info: > + [[Construct]] constructs an object. Invoked via the new operator. Objects + that implement this internal method are called constructors +es5id: 8.6.2_A6 +description: Create a few Objects via the new operator +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -25,4 +26,3 @@ if (numInstance.constructor !== Number){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A7.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A7.js index 6e996d7794..eee46c1815 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A7.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A7.js @@ -1,17 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Objects that implement internal method [[Construct]] are called constructors. Math object is NOT constructor - * - * @path ch08/8.6/8.6.2/S8.6.2_A7.js - * @description Checking if execution of "var objMath=new Math" passes - * @negative - */ +/*--- +info: > + Objects that implement internal method [[Construct]] are called + constructors. Math object is NOT constructor +es5id: 8.6.2_A7 +description: Checking if execution of "var objMath=new Math" passes +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var objMath=new Math; ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/8.6.2/S8.6.2_A8.js b/test/suite/ch08/8.6/8.6.2/S8.6.2_A8.js index d57a56132c..a36daab475 100644 --- a/test/suite/ch08/8.6/8.6.2/S8.6.2_A8.js +++ b/test/suite/ch08/8.6/8.6.2/S8.6.2_A8.js @@ -1,11 +1,12 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch08/8.6/8.6.2/S8.6.2_A8.js - * @description It should not be possible to change the [[Prototype]] - * of a non-extensible object - */ +/*--- +es5id: 8.6.2_A8 +description: > + It should not be possible to change the [[Prototype]] of a + non-extensible object +---*/ var x = Object.preventExtensions({}); var y = {}; @@ -19,4 +20,3 @@ try { if (Object.getPrototypeOf(x) !== Object.prototype) { $ERROR("Prototype of non-extensible object mutated"); } - diff --git a/test/suite/ch08/8.6/S8.6_A2_T1.js b/test/suite/ch08/8.6/S8.6_A2_T1.js index 4e13df6678..c9f209cce8 100644 --- a/test/suite/ch08/8.6/S8.6_A2_T1.js +++ b/test/suite/ch08/8.6/S8.6_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Do not crash with postincrement custom property - * - * @path ch08/8.6/S8.6_A2_T1.js - * @description Try to implement postincrement for custom property - */ +/*--- +info: Do not crash with postincrement custom property +es5id: 8.6_A2_T1 +description: Try to implement postincrement for custom property +---*/ var __map={foo:"bar"}; @@ -20,4 +19,3 @@ if (!isNaN(__map.foo)) { // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/S8.6_A2_T2.js b/test/suite/ch08/8.6/S8.6_A2_T2.js index b96be42ad9..06976ab7ed 100644 --- a/test/suite/ch08/8.6/S8.6_A2_T2.js +++ b/test/suite/ch08/8.6/S8.6_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Do not crash with postincrement custom property - * - * @path ch08/8.6/S8.6_A2_T2.js - * @description Try to implement postincrement for not declared custom property - */ +/*--- +info: Do not crash with postincrement custom property +es5id: 8.6_A2_T2 +description: Try to implement postincrement for not declared custom property +---*/ var __map={}; @@ -25,4 +24,3 @@ if (!("foo" in __map)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/S8.6_A3_T1.js b/test/suite/ch08/8.6/S8.6_A3_T1.js index 4311485206..3412fce325 100644 --- a/test/suite/ch08/8.6/S8.6_A3_T1.js +++ b/test/suite/ch08/8.6/S8.6_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Do not crash with pefixincrement custom property - * - * @path ch08/8.6/S8.6_A3_T1.js - * @description Try to implement pefixincrement for custom property - */ +/*--- +info: Do not crash with pefixincrement custom property +es5id: 8.6_A3_T1 +description: Try to implement pefixincrement for custom property +---*/ var __map={foo:'bar'}; @@ -20,4 +19,3 @@ if (!isNaN(__map.foo)) { // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/S8.6_A3_T2.js b/test/suite/ch08/8.6/S8.6_A3_T2.js index 08a425a135..f57c37dc34 100644 --- a/test/suite/ch08/8.6/S8.6_A3_T2.js +++ b/test/suite/ch08/8.6/S8.6_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Do not crash with pefixincrement custom property - * - * @path ch08/8.6/S8.6_A3_T2.js - * @description Try to implement pefixincrement for not declared custom property - */ +/*--- +info: Do not crash with pefixincrement custom property +es5id: 8.6_A3_T2 +description: Try to implement pefixincrement for not declared custom property +---*/ var __map={}; @@ -25,4 +24,3 @@ if (!("foo" in __map)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.6/S8.6_A4_T1.js b/test/suite/ch08/8.6/S8.6_A4_T1.js index 94424118af..014cab75aa 100644 --- a/test/suite/ch08/8.6/S8.6_A4_T1.js +++ b/test/suite/ch08/8.6/S8.6_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An Object is an unordered collection of properties - * - * @path ch08/8.6/S8.6_A4_T1.js - * @description Simple using a few custom properties - */ +/*--- +info: An Object is an unordered collection of properties +es5id: 8.6_A4_T1 +description: Simple using a few custom properties +---*/ /////////////////////////////////////////////////////// // CHECK#1 @@ -54,4 +53,3 @@ if (count !== 3){ } // //////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-1-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-1-s.js index a7f5f5b2c2..fc2653e35c 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-1-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-1-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-1-s.js - * @description Strict Mode - ReferenceError is thrown if LeftHandSide evaluates to an unresolvable Reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_8_7_2_1 = 11;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-1-s +description: > + Strict Mode - ReferenceError is thrown if LeftHandSide evaluates + to an unresolvable Reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_8_7_2_1 = 11;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-2-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-2-s.js index abbfbc7fe9..b5dd449f50 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-2-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-2-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-2-s.js - * @description Strict Mode - ReferenceError isn't thrown if LeftHandSide evaluates to a resolvable Reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var b = 11; - return b === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-2-s +description: > + Strict Mode - ReferenceError isn't thrown if LeftHandSide + evaluates to a resolvable Reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var b = 11; + return b === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-3-1-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-3-1-s.js index 7695a3cb82..4005975cb6 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-3-1-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-3-1-s.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-3-1-s.js - * @description eval - a property named 'eval' is permitted - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - var o = { eval: 42}; - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-3-1-s +description: eval - a property named 'eval' is permitted +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + var o = { eval: 42}; + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js b/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js index 88dc77f61f..15e4bb1191 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-1gs.js @@ -1,15 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch08/8.7/8.7.2/8.7.2-3-a-1gs.js - * @description Strict Mode - ReferenceError is thrown if LeftHandSide evaluate to an unresolvable Reference - * @onlyStrict - * @negative . - */ - -"use strict"; -b = 11; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-3-a-1gs +description: > + Strict Mode - ReferenceError is thrown if LeftHandSide evaluate to + an unresolvable Reference +negative: . +flags: [onlyStrict] +---*/ + +"use strict"; +b = 11; diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js b/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js index 402e7dcfb9..38c32f3d2b 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-3-a-2gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch08/8.7/8.7.2/8.7.2-3-a-2gs.js - * @description Strict Mode - 'runtime' error is thrown before LeftHandSide evaluates to an unresolvable Reference - * @onlyStrict - * @negative NotEarlyError - */ - -"use strict"; -throw NotEarlyError; -b = 11; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-3-a-2gs +description: > + Strict Mode - 'runtime' error is thrown before LeftHandSide + evaluates to an unresolvable Reference +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +"use strict"; +throw new Test262Error(); +b = 11; diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-3-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-3-s.js index b61a530465..8408012282 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-3-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-3-s.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-3-s.js - * @description Strict Mode - TypeError is thrown if LeftHandSide is a reference to a non-writable data property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _8_7_2_3 = {}; - Object.defineProperty(_8_7_2_3, "b", { - writable: false - }); - - try { - _8_7_2_3.b = 11; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-3-s +description: > + Strict Mode - TypeError is thrown if LeftHandSide is a reference + to a non-writable data property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _8_7_2_3 = {}; + Object.defineProperty(_8_7_2_3, "b", { + writable: false + }); + + try { + _8_7_2_3.b = 11; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-4-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-4-s.js index f8bb3cfc2f..4007379795 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-4-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-4-s.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-4-s.js - * @description Strict Mode - TypeError is thrown if LeftHandSide is a reference to an accessor property with no setter - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _8_7_2_4 = {}; - var _8_7_2_4_bValue = 1; - Object.defineProperty(_8_7_2_4, "b", { - get: function () { return _8_7_2_4_bValue; } - }); - - try { - _8_7_2_4.b = 11; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-4-s +description: > + Strict Mode - TypeError is thrown if LeftHandSide is a reference + to an accessor property with no setter +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _8_7_2_4 = {}; + var _8_7_2_4_bValue = 1; + Object.defineProperty(_8_7_2_4, "b", { + get: function () { return _8_7_2_4_bValue; } + }); + + try { + _8_7_2_4.b = 11; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-5-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-5-s.js index ece3729348..b822a0f9f1 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-5-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-5-s.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-5-s.js - * @description Strict Mode - TypeError is thrown if LeftHandSide is a reference to a non-existent property of an non-extensible object - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _8_7_2_5 = {}; - Object.preventExtensions(_8_7_2_5); - - try { - _8_7_2_5.b = 11; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-5-s +description: > + Strict Mode - TypeError is thrown if LeftHandSide is a reference + to a non-existent property of an non-extensible object +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _8_7_2_5 = {}; + Object.preventExtensions(_8_7_2_5); + + try { + _8_7_2_5.b = 11; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-6-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-6-s.js index 298485f94d..6dde2a5444 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-6-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-6-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-6-s.js - * @description Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to a writable data property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _8_7_2_6 = {}; - Object.defineProperty(_8_7_2_6, "b", { - writable: true - }); - - _8_7_2_6.b = 11; - - return _8_7_2_6.b === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-6-s +description: > + Strict Mode - TypeError isn't thrown if LeftHandSide is a + reference to a writable data property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _8_7_2_6 = {}; + Object.defineProperty(_8_7_2_6, "b", { + writable: true + }); + + _8_7_2_6.b = 11; + + return _8_7_2_6.b === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-7-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-7-s.js index bc2f195431..ad8bfa2d1e 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-7-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-7-s.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-7-s.js - * @description Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to an accessor property with setter - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _8_7_2_7 = {}; - var _8_7_2_7_bValue = 1; - Object.defineProperty(_8_7_2_7, "b", { - get: function () { return _8_7_2_7_bValue; }, - set: function (value) { _8_7_2_7_bValue = value; } - }); - - _8_7_2_7.b = 11; - return _8_7_2_7.b === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-7-s +description: > + Strict Mode - TypeError isn't thrown if LeftHandSide is a + reference to an accessor property with setter +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _8_7_2_7 = {}; + var _8_7_2_7_bValue = 1; + Object.defineProperty(_8_7_2_7, "b", { + get: function () { return _8_7_2_7_bValue; }, + set: function (value) { _8_7_2_7_bValue = value; } + }); + + _8_7_2_7.b = 11; + return _8_7_2_7.b === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/8.7.2/8.7.2-8-s.js b/test/suite/ch08/8.7/8.7.2/8.7.2-8-s.js index 1e69c3305d..0843a8dbf1 100644 --- a/test/suite/ch08/8.7/8.7.2/8.7.2-8-s.js +++ b/test/suite/ch08/8.7/8.7.2/8.7.2-8-s.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch08/8.7/8.7.2/8.7.2-8-s.js - * @description Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to a property of an extensible object - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _8_7_2_8 = {}; - - _8_7_2_8.b = 11; - - return _8_7_2_8.b === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 8.7.2-8-s +description: > + Strict Mode - TypeError isn't thrown if LeftHandSide is a + reference to a property of an extensible object +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _8_7_2_8 = {}; + + _8_7_2_8.b = 11; + + return _8_7_2_8.b === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch08/8.7/S8.7.1_A1.js b/test/suite/ch08/8.7/S8.7.1_A1.js index 624b2d71fb..83d9e9c6b3 100644 --- a/test/suite/ch08/8.7/S8.7.1_A1.js +++ b/test/suite/ch08/8.7/S8.7.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Delete operator deletes pure property, so it returns true to be applyed to this.property - * - * @path ch08/8.7/S8.7.1_A1.js - * @description Try to delete this.y, where y is this.y=1 - */ +/*--- +info: > + Delete operator deletes pure property, so it returns true to be applyed + to this.property +es5id: 8.7.1_A1 +description: Try to delete this.y, where y is this.y=1 +---*/ this.y = 1; ////////////////////////////////////////////////////////////////////////////// @@ -25,4 +26,3 @@ if (this.y !== undefined){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7.1_A2.js b/test/suite/ch08/8.7/S8.7.1_A2.js index eb9c4caffd..921775fa7c 100644 --- a/test/suite/ch08/8.7/S8.7.1_A2.js +++ b/test/suite/ch08/8.7/S8.7.1_A2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Delete operator can't delete reference, so it returns false to be applyed to reference - * - * @path ch08/8.7/S8.7.1_A2.js - * @description Try to delete y, where y is var y=1 - * @noStrict - */ +/*--- +info: > + Delete operator can't delete reference, so it returns false to be applyed + to reference +es5id: 8.7.1_A2 +description: Try to delete y, where y is var y=1 +flags: [noStrict] +---*/ var y = 1; @@ -26,4 +27,3 @@ if (y !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7.2_A1_T1.js b/test/suite/ch08/8.7/S8.7.2_A1_T1.js index c7908106da..d6a75cf5bd 100644 --- a/test/suite/ch08/8.7/S8.7.2_A1_T1.js +++ b/test/suite/ch08/8.7/S8.7.2_A1_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * GetValue(V) mast fail - * - * @path ch08/8.7/S8.7.2_A1_T1.js - * @description Checking if execution of "'litera'=1;" fails - * @negative - */ +/*--- +info: GetValue(V) mast fail +es5id: 8.7.2_A1_T1 +description: Checking if execution of "'litera'=1;" fails +flags: [negative] +---*/ 'litera'=1; - diff --git a/test/suite/ch08/8.7/S8.7.2_A1_T2.js b/test/suite/ch08/8.7/S8.7.2_A1_T2.js index 97a38cc0ba..a26bf80d8a 100644 --- a/test/suite/ch08/8.7/S8.7.2_A1_T2.js +++ b/test/suite/ch08/8.7/S8.7.2_A1_T2.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * GetValue(V) mast fail - * - * @path ch08/8.7/S8.7.2_A1_T2.js - * @description Checking if execution of "1=1" fails - * @negative - */ +/*--- +info: GetValue(V) mast fail +es5id: 8.7.2_A1_T2 +description: Checking if execution of "1=1" fails +flags: [negative] +---*/ 1=1; - diff --git a/test/suite/ch08/8.7/S8.7.2_A2.js b/test/suite/ch08/8.7/S8.7.2_A2.js index 53f3a8d5b5..21b285ffb6 100644 --- a/test/suite/ch08/8.7/S8.7.2_A2.js +++ b/test/suite/ch08/8.7/S8.7.2_A2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * x++ calls GetValue then PutValue so after applying postfix increment(actually conrete operator type is unimportant) - * we must have reference to defined value - * - * @path ch08/8.7/S8.7.2_A2.js - * @description Execute x++, where x is var x - */ +/*--- +info: > + x++ calls GetValue then PutValue so after applying postfix increment(actually conrete operator type is unimportant) + we must have reference to defined value +es5id: 8.7.2_A2 +description: Execute x++, where x is var x +---*/ var x; ////////////////////////////////////////////////////////////////////////////// @@ -25,4 +25,3 @@ if (x === undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7.2_A3.js b/test/suite/ch08/8.7/S8.7.2_A3.js index 7877e4e2b0..565362a8f0 100644 --- a/test/suite/ch08/8.7/S8.7.2_A3.js +++ b/test/suite/ch08/8.7/S8.7.2_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * this.x++ calls GetValue then PutValue so after applying postfix increment(actually conrete operator type is unimportan) - * we must have reference to defined value - * - * @path ch08/8.7/S8.7.2_A3.js - * @description Execute this.x++, where this.x is undefined - */ +/*--- +info: > + this.x++ calls GetValue then PutValue so after applying postfix increment(actually conrete operator type is unimportan) + we must have reference to defined value +es5id: 8.7.2_A3 +description: Execute this.x++, where this.x is undefined +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -24,4 +24,3 @@ if (x === undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A1.js b/test/suite/ch08/8.7/S8.7_A1.js index 7743600bbe..9a964111b4 100644 --- a/test/suite/ch08/8.7/S8.7_A1.js +++ b/test/suite/ch08/8.7/S8.7_A1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Multiple Variables should Referring to a Single Object - * - * @path ch08/8.7/S8.7_A1.js - * @description Create object and refers to the other object, modify a property in the original object. - * We now see that that change is represented in both variables - */ +/*--- +info: Multiple Variables should Referring to a Single Object +es5id: 8.7_A1 +description: > + Create object and refers to the other object, modify a property in + the original object. We now see that that change is represented + in both variables +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -27,4 +28,3 @@ if(objRef.oneProperty !== true){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A2.js b/test/suite/ch08/8.7/S8.7_A2.js index 8e1e1e933b..ed97941522 100644 --- a/test/suite/ch08/8.7/S8.7_A2.js +++ b/test/suite/ch08/8.7/S8.7_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Reference to Self-Modifying Object remain the integrity - * - * @path ch08/8.7/S8.7_A2.js - * @description Create a reference to the array, and change original array - */ +/*--- +info: Reference to Self-Modifying Object remain the integrity +es5id: 8.7_A2 +description: Create a reference to the array, and change original array +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -39,4 +38,3 @@ if( itemsRef[1] !== "duo"){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A3.js b/test/suite/ch08/8.7/S8.7_A3.js index b7266bee73..69046d1cd3 100644 --- a/test/suite/ch08/8.7/S8.7_A3.js +++ b/test/suite/ch08/8.7/S8.7_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing the Reference of an Object While Maintaining Integrity - * - * @path ch08/8.7/S8.7_A3.js - * @description Create a reference to the array, and redefine original array with new array - */ +/*--- +info: Changing the Reference of an Object While Maintaining Integrity +es5id: 8.7_A3 +description: > + Create a reference to the array, and redefine original array with + new array +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -26,4 +27,3 @@ if( items == itemsRef ){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A4.js b/test/suite/ch08/8.7/S8.7_A4.js index f2c7b4562e..5a1c4b51d7 100644 --- a/test/suite/ch08/8.7/S8.7_A4.js +++ b/test/suite/ch08/8.7/S8.7_A4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object Modification Resulting in a New Object for Not a Self-Modified Object leads to loss of integrity - * - * @path ch08/8.7/S8.7_A4.js - * @description Create a reference to the string, and Concatenate some new text onto the string object - */ +/*--- +info: > + Object Modification Resulting in a New Object for Not a Self-Modified + Object leads to loss of integrity +es5id: 8.7_A4 +description: > + Create a reference to the string, and Concatenate some new text + onto the string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -25,4 +28,3 @@ if( item == itemRef ){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A5_T1.js b/test/suite/ch08/8.7/S8.7_A5_T1.js index 32796bdd36..7e12e86910 100644 --- a/test/suite/ch08/8.7/S8.7_A5_T1.js +++ b/test/suite/ch08/8.7/S8.7_A5_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Delete unary operator can't delete object to be referenced - * - * @path ch08/8.7/S8.7_A5_T1.js - * @description Delete referenced object, var __ref = obj - * @noStrict - */ +/*--- +info: Delete unary operator can't delete object to be referenced +es5id: 8.7_A5_T1 +description: Delete referenced object, var __ref = obj +flags: [noStrict] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -51,4 +50,3 @@ if (typeof(obj) !== "object"){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A5_T2.js b/test/suite/ch08/8.7/S8.7_A5_T2.js index a76b36c19a..37afe18ff2 100644 --- a/test/suite/ch08/8.7/S8.7_A5_T2.js +++ b/test/suite/ch08/8.7/S8.7_A5_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Delete unary operator can't delete object to be referenced - * - * @path ch08/8.7/S8.7_A5_T2.js - * @description Delete referenced object, __ref = obj - * @noStrict - */ +/*--- +info: Delete unary operator can't delete object to be referenced +es5id: 8.7_A5_T2 +description: Delete referenced object, __ref = obj +flags: [noStrict] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -51,4 +50,3 @@ if (typeof(obj) !== "object"){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.7/S8.7_A6.js b/test/suite/ch08/8.7/S8.7_A6.js index 40882f1a54..f25377b2b2 100644 --- a/test/suite/ch08/8.7/S8.7_A6.js +++ b/test/suite/ch08/8.7/S8.7_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Passing arguments by value differs from by reference and do not change values to be passed - * - * @path ch08/8.7/S8.7_A6.js - * @description Adding original variable with referenced one inside function - */ +/*--- +info: > + Passing arguments by value differs from by reference and do not change + values to be passed +es5id: 8.7_A6 +description: Adding original variable with referenced one inside function +---*/ var n = 1; var m = n; @@ -23,5 +24,3 @@ if (m !== 1) { // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.7/S8.7_A7.js b/test/suite/ch08/8.7/S8.7_A7.js index 17e8eb59c9..64c0ad14b6 100644 --- a/test/suite/ch08/8.7/S8.7_A7.js +++ b/test/suite/ch08/8.7/S8.7_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Passing arguments by reference do change values of reference to be passed - * - * @path ch08/8.7/S8.7_A7.js - * @description Add new property to original variable inside function - */ +/*--- +info: Passing arguments by reference do change values of reference to be passed +es5id: 8.7_A7 +description: Add new property to original variable inside function +---*/ var n = {}; var m = n; @@ -31,5 +30,3 @@ if (n.age !== 50) { // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch08/8.8/S8.8_A2_T1.js b/test/suite/ch08/8.8/S8.8_A2_T1.js index ed9f8c10d7..8907cabd42 100644 --- a/test/suite/ch08/8.8/S8.8_A2_T1.js +++ b/test/suite/ch08/8.8/S8.8_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Values of the List type are simply ordered sequences of values - * - * @path ch08/8.8/S8.8_A2_T1.js - * @description Call function __mFunc(1,2,3) with 3 arguments - */ +/*--- +info: Values of the List type are simply ordered sequences of values +es5id: 8.8_A2_T1 +description: Call function __mFunc(1,2,3) with 3 arguments +---*/ function __mFunc(){return arguments.length;}; ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +15,3 @@ if (__mFunc(1,2,3) !== 3){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.8/S8.8_A2_T2.js b/test/suite/ch08/8.8/S8.8_A2_T2.js index 4ab032de02..f670586e05 100644 --- a/test/suite/ch08/8.8/S8.8_A2_T2.js +++ b/test/suite/ch08/8.8/S8.8_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Values of the List type are simply ordered sequences of values - * - * @path ch08/8.8/S8.8_A2_T2.js - * @description Call function __mFunc([,,]) with 1 arguments - */ +/*--- +info: Values of the List type are simply ordered sequences of values +es5id: 8.8_A2_T2 +description: Call function __mFunc([,,]) with 1 arguments +---*/ function __mFunc(){return arguments.length;}; ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +15,3 @@ if (__mFunc([,,]) !== 1){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch08/8.8/S8.8_A2_T3.js b/test/suite/ch08/8.8/S8.8_A2_T3.js index 281c0397ce..9b2db26367 100644 --- a/test/suite/ch08/8.8/S8.8_A2_T3.js +++ b/test/suite/ch08/8.8/S8.8_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Values of the List type are simply ordered sequences of values - * - * @path ch08/8.8/S8.8_A2_T3.js - * @description Call function, that concatenate all it`s arguments - */ +/*--- +info: Values of the List type are simply ordered sequences of values +es5id: 8.8_A2_T3 +description: Call function, that concatenate all it`s arguments +---*/ function __mFunc(){var __accum=""; for (var i = 0; i < arguments.length; ++i){__accum += arguments[i]};return __accum;}; ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +15,3 @@ if (__mFunc("A","B","C","D","E","F") !== "ABCDEF"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch09/9.1/S9.1_A1_T1.js b/test/suite/ch09/9.1/S9.1_A1_T1.js index 6625910545..8533981f03 100644 --- a/test/suite/ch09/9.1/S9.1_A1_T1.js +++ b/test/suite/ch09/9.1/S9.1_A1_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of primitive conversion from object is a default value for the Object - * - * @path ch09/9.1/S9.1_A1_T1.js - * @description Using operator Number. The operator calls ToPrimitive with hint Number - */ +/*--- +info: > + Result of primitive conversion from object is a default value for the + Object +es5id: 9.1_A1_T1 +description: > + Using operator Number. The operator calls ToPrimitive with hint + Number +---*/ // CHECK#1 var object = {valueOf: function() {return "1"}, toString: function() {return 0}}; @@ -19,5 +22,3 @@ var object = {valueOf: function() {return {}}, toString: function() {return "0"} if (Number(object) !== 0) { $ERROR('#2: var object = {valueOf: function() {return {}}, toString: function() {return "0"}}; Number(object) === 0. Actual: ' + (Number(object))); } - - diff --git a/test/suite/ch09/9.1/S9.1_A1_T2.js b/test/suite/ch09/9.1/S9.1_A1_T2.js index 636591dabc..bb314462fe 100644 --- a/test/suite/ch09/9.1/S9.1_A1_T2.js +++ b/test/suite/ch09/9.1/S9.1_A1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of primitive conversion from object is a default value for the Object - * - * @path ch09/9.1/S9.1_A1_T2.js - * @description Using operator Number. This operator calls ToPrimitive with hint Number - */ +/*--- +info: > + Result of primitive conversion from object is a default value for the + Object +es5id: 9.1_A1_T2 +description: > + Using operator Number. This operator calls ToPrimitive with hint + Number +---*/ // CHECK#1 var object = {valueOf: function() {return 0}, toString: function() {return 1}}; @@ -19,5 +22,3 @@ var object = {valueOf: function() {return 0}, toString: function() {return {}}}; if (String(object) !== "0") { $ERROR('#2: var object = {valueOf: function() {return 0}, toString: function() {return {}}}; String(object) === "0". Actual: ' + (String(object))); } - - diff --git a/test/suite/ch09/9.1/S9.1_A1_T3.js b/test/suite/ch09/9.1/S9.1_A1_T3.js index cf418eeef8..93dfaabc62 100644 --- a/test/suite/ch09/9.1/S9.1_A1_T3.js +++ b/test/suite/ch09/9.1/S9.1_A1_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of primitive conversion from object is a default value for the Object - * - * @path ch09/9.1/S9.1_A1_T3.js - * @description Using operator "+". This operator firstly calls ToPrimitive and then calls ToString or ToNumber - */ +/*--- +info: > + Result of primitive conversion from object is a default value for the + Object +es5id: 9.1_A1_T3 +description: > + Using operator "+". This operator firstly calls ToPrimitive and + then calls ToString or ToNumber +---*/ // CHECK#1 var object = {valueOf: function() {return 1}, toString: function() {return 0}}; @@ -19,5 +22,3 @@ var object = {valueOf: function() {return "1"}, toString: function() {return 0}} if (object + 0 !== "10") { $ERROR('#2: var object = {valueOf: function() {return "1"}, toString: function() {return 0}}; object + 0 === "10". Actual: ' + (object + 0)); } - - diff --git a/test/suite/ch09/9.1/S9.1_A1_T4.js b/test/suite/ch09/9.1/S9.1_A1_T4.js index 9dcd88f504..014cac1887 100644 --- a/test/suite/ch09/9.1/S9.1_A1_T4.js +++ b/test/suite/ch09/9.1/S9.1_A1_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of primitive conversion from object is a default value for the Object - * - * @path ch09/9.1/S9.1_A1_T4.js - * @description Using operator "<". The operator firstly calls ToPrimitive and then calls ToString or ToNumber - */ +/*--- +info: > + Result of primitive conversion from object is a default value for the + Object +es5id: 9.1_A1_T4 +description: > + Using operator "<". The operator firstly calls ToPrimitive and + then calls ToString or ToNumber +---*/ // CHECK#1 var object = {valueOf: function() {return -2}, toString: function() {return "-2"}}; @@ -19,5 +22,3 @@ var object = {valueOf: function() {return "-2"}, toString: function() {return -2 if (object < "-1") { $ERROR('#2: var object = {valueOf: function() {return "-2"}, toString: function() {return -2}}; object < "-1"'); } - - diff --git a/test/suite/ch09/9.2/S9.2_A1_T1.js b/test/suite/ch09/9.2/S9.2_A1_T1.js index 44bbaae6a3..c675931590 100644 --- a/test/suite/ch09/9.2/S9.2_A1_T1.js +++ b/test/suite/ch09/9.2/S9.2_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from undefined value is false - * - * @path ch09/9.2/S9.2_A1_T1.js - * @description Undefined, void and others are converted to Boolean by explicit transformation - */ +/*--- +info: Result of boolean conversion from undefined value is false +es5id: 9.2_A1_T1 +description: > + Undefined, void and others are converted to Boolean by explicit + transformation +---*/ // CHECK#1 if (Boolean(undefined) !== false) { @@ -27,4 +28,3 @@ if (Boolean(eval("var x")) !== false) { if (Boolean() !== false) { $ERROR('#4: Boolean() === false. Actual: ' + (Boolean())); } - diff --git a/test/suite/ch09/9.2/S9.2_A1_T2.js b/test/suite/ch09/9.2/S9.2_A1_T2.js index 0700b8da63..1b34d323be 100644 --- a/test/suite/ch09/9.2/S9.2_A1_T2.js +++ b/test/suite/ch09/9.2/S9.2_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from undefined value is false - * - * @path ch09/9.2/S9.2_A1_T2.js - * @description Undefined, void and others are converted to Boolean by implicit transformation - */ +/*--- +info: Result of boolean conversion from undefined value is false +es5id: 9.2_A1_T2 +description: > + Undefined, void and others are converted to Boolean by implicit + transformation +---*/ // CHECK#1 if (!(undefined) !== true) { @@ -22,4 +23,3 @@ if (!(void 0) !== true) { if (!(eval("var x")) !== true) { $ERROR('#3: !(eval("var x")) === true. Actual: ' + (!(eval("var x")))); } - diff --git a/test/suite/ch09/9.2/S9.2_A2_T1.js b/test/suite/ch09/9.2/S9.2_A2_T1.js index c53da91bf9..e80d53226b 100644 --- a/test/suite/ch09/9.2/S9.2_A2_T1.js +++ b/test/suite/ch09/9.2/S9.2_A2_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from null value is false - * - * @path ch09/9.2/S9.2_A2_T1.js - * @description null convert to Boolean by explicit transformation - */ +/*--- +info: Result of boolean conversion from null value is false +es5id: 9.2_A2_T1 +description: null convert to Boolean by explicit transformation +---*/ // CHECK#1 if (Boolean(null) !== false) { $ERROR('#1: Boolean(null) === false. Actual: ' + (Boolean(null))); } - diff --git a/test/suite/ch09/9.2/S9.2_A2_T2.js b/test/suite/ch09/9.2/S9.2_A2_T2.js index ffd391b90a..332ba7d980 100644 --- a/test/suite/ch09/9.2/S9.2_A2_T2.js +++ b/test/suite/ch09/9.2/S9.2_A2_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from null value is false - * - * @path ch09/9.2/S9.2_A2_T2.js - * @description null convert to Boolean by implicit transformation - */ +/*--- +info: Result of boolean conversion from null value is false +es5id: 9.2_A2_T2 +description: null convert to Boolean by implicit transformation +---*/ // CHECK#1 if (!(null) !== true) { $ERROR('#1: !(null) === true. Actual: ' + (!(null))); } - diff --git a/test/suite/ch09/9.2/S9.2_A3_T1.js b/test/suite/ch09/9.2/S9.2_A3_T1.js index 103f4eab3b..f10717b656 100644 --- a/test/suite/ch09/9.2/S9.2_A3_T1.js +++ b/test/suite/ch09/9.2/S9.2_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from boolean value is no conversion - * - * @path ch09/9.2/S9.2_A3_T1.js - * @description true and false convert to Boolean by explicit transformation - */ +/*--- +info: Result of boolean conversion from boolean value is no conversion +es5id: 9.2_A3_T1 +description: true and false convert to Boolean by explicit transformation +---*/ // CHECK#1 if (Boolean(true) !== true) { @@ -17,4 +16,3 @@ if (Boolean(true) !== true) { if (Boolean(false) !== false) { $ERROR('#2: Boolean(false) === false. Actual: ' + (Boolean(false))); } - diff --git a/test/suite/ch09/9.2/S9.2_A3_T2.js b/test/suite/ch09/9.2/S9.2_A3_T2.js index d1ede1c6d5..393af609d5 100644 --- a/test/suite/ch09/9.2/S9.2_A3_T2.js +++ b/test/suite/ch09/9.2/S9.2_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from boolean value is no conversion - * - * @path ch09/9.2/S9.2_A3_T2.js - * @description true and false convert to Boolean by implicit transformation - */ +/*--- +info: Result of boolean conversion from boolean value is no conversion +es5id: 9.2_A3_T2 +description: true and false convert to Boolean by implicit transformation +---*/ // CHECK#1 if (!(true) !== false) { @@ -17,4 +16,3 @@ if (!(true) !== false) { if (!(false) !== true) { $ERROR('#2: !(false) === true. Actual: ' + (!(false))); } - diff --git a/test/suite/ch09/9.2/S9.2_A4_T1.js b/test/suite/ch09/9.2/S9.2_A4_T1.js index 71860cac87..1dd205c94b 100644 --- a/test/suite/ch09/9.2/S9.2_A4_T1.js +++ b/test/suite/ch09/9.2/S9.2_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from number value is false if the argument is +0, -0, or NaN; otherwise, is true - * - * @path ch09/9.2/S9.2_A4_T1.js - * @description +0, -0 and NaN convert to Boolean by explicit transformation - */ +/*--- +info: > + Result of boolean conversion from number value is false if the argument + is +0, -0, or NaN; otherwise, is true +es5id: 9.2_A4_T1 +description: +0, -0 and NaN convert to Boolean by explicit transformation +---*/ // CHECK#1 if (Boolean(+0) !== false) { @@ -22,4 +23,3 @@ if (Boolean(-0) !== false) { if (Boolean(Number.NaN) !== false) { $ERROR('#3: Boolean(Number.NaN) === false. Actual: ' + (Boolean(Number.NaN))); } - diff --git a/test/suite/ch09/9.2/S9.2_A4_T2.js b/test/suite/ch09/9.2/S9.2_A4_T2.js index 66047bea52..db32cc0384 100644 --- a/test/suite/ch09/9.2/S9.2_A4_T2.js +++ b/test/suite/ch09/9.2/S9.2_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from number value is false if the argument is +0, -0, or NaN; otherwise, is true - * - * @path ch09/9.2/S9.2_A4_T2.js - * @description +0, -0 and NaN convert to Boolean by implicit transformation - */ +/*--- +info: > + Result of boolean conversion from number value is false if the argument + is +0, -0, or NaN; otherwise, is true +es5id: 9.2_A4_T2 +description: +0, -0 and NaN convert to Boolean by implicit transformation +---*/ // CHECK#1 if (!(+0) !== true) { @@ -22,4 +23,3 @@ if (!(-0) !== true) { if (!(Number.NaN) !== true) { $ERROR('#3: !(Number.NaN) === true. Actual: ' + (!(Number.NaN))); } - diff --git a/test/suite/ch09/9.2/S9.2_A4_T3.js b/test/suite/ch09/9.2/S9.2_A4_T3.js index 9a16966d64..760ba408d5 100644 --- a/test/suite/ch09/9.2/S9.2_A4_T3.js +++ b/test/suite/ch09/9.2/S9.2_A4_T3.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from number value is false if the argument is +0, -0, or NaN; otherwise, is true - * - * @path ch09/9.2/S9.2_A4_T3.js - * @description Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, - * Number.MAX_VALUE, Number.MIN_VALUE and some numbers convert to Boolean by explicit transformation - */ +/*--- +info: > + Result of boolean conversion from number value is false if the argument + is +0, -0, or NaN; otherwise, is true +es5id: 9.2_A4_T3 +description: > + Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, + Number.MAX_VALUE, Number.MIN_VALUE and some numbers convert to + Boolean by explicit transformation +---*/ // CHECK#1 if (Boolean(Number.POSITIVE_INFINITY) !== true) { @@ -47,5 +50,4 @@ if (Boolean(1.3) !== true) { // CHECK#8 if (Boolean(-1.3) !== true) { $ERROR('#8: Boolean(-1.3) === true. Actual: ' + (Boolean(-1.3))); -} - +} diff --git a/test/suite/ch09/9.2/S9.2_A4_T4.js b/test/suite/ch09/9.2/S9.2_A4_T4.js index 692ab77bf3..1fa9d2e71b 100644 --- a/test/suite/ch09/9.2/S9.2_A4_T4.js +++ b/test/suite/ch09/9.2/S9.2_A4_T4.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from number value is false if the argument is +0, -0, or NaN; otherwise, is true - * - * @path ch09/9.2/S9.2_A4_T4.js - * @description Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, - * Number.MAX_VALUE, Number.MIN_VALUE and some other numbers are converted to Boolean by implicit transformation - */ +/*--- +info: > + Result of boolean conversion from number value is false if the argument + is +0, -0, or NaN; otherwise, is true +es5id: 9.2_A4_T4 +description: > + Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, + Number.MAX_VALUE, Number.MIN_VALUE and some other numbers are + converted to Boolean by implicit transformation +---*/ // CHECK#1 if (!(Number.POSITIVE_INFINITY) !== false) { @@ -47,5 +50,4 @@ if (!(1.3) !== false) { // CHECK#8 if (!(-1.3) !== false) { $ERROR('#8: !(-1.3) === false. Actual: ' + (!(-1.3))); -} - +} diff --git a/test/suite/ch09/9.2/S9.2_A5_T1.js b/test/suite/ch09/9.2/S9.2_A5_T1.js index 293ee23757..a3b17788a9 100644 --- a/test/suite/ch09/9.2/S9.2_A5_T1.js +++ b/test/suite/ch09/9.2/S9.2_A5_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from nonempty string value (length is not zero) is true; from empty String (length is zero) is false - * - * @path ch09/9.2/S9.2_A5_T1.js - * @description "" is converted to Boolean by explicit transformation - */ +/*--- +info: > + Result of boolean conversion from nonempty string value (length is not + zero) is true; from empty String (length is zero) is false +es5id: 9.2_A5_T1 +description: "\"\" is converted to Boolean by explicit transformation" +---*/ // CHECK#1 if (Boolean("") !== false) { $ERROR('#1: Boolean("") === false. Actual: ' + (Boolean(""))); } - diff --git a/test/suite/ch09/9.2/S9.2_A5_T2.js b/test/suite/ch09/9.2/S9.2_A5_T2.js index de391a3292..5c0bfdb59c 100644 --- a/test/suite/ch09/9.2/S9.2_A5_T2.js +++ b/test/suite/ch09/9.2/S9.2_A5_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from nonempty string value (length is not zero) is true; from empty String (length is zero) is false - * - * @path ch09/9.2/S9.2_A5_T2.js - * @description "" convert to Boolean by implicit transformation - */ +/*--- +info: > + Result of boolean conversion from nonempty string value (length is not + zero) is true; from empty String (length is zero) is false +es5id: 9.2_A5_T2 +description: "\"\" convert to Boolean by implicit transformation" +---*/ // CHECK#1 if (!("") !== true) { $ERROR('#1: !("") === true. Actual: ' + (!(""))); } - diff --git a/test/suite/ch09/9.2/S9.2_A5_T3.js b/test/suite/ch09/9.2/S9.2_A5_T3.js index f8f185c593..d8cf685a28 100644 --- a/test/suite/ch09/9.2/S9.2_A5_T3.js +++ b/test/suite/ch09/9.2/S9.2_A5_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from nonempty string value (length is not zero) is true; from empty String (length is zero) is false - * - * @path ch09/9.2/S9.2_A5_T3.js - * @description Any nonempty string convert to Boolean by explicit transformation - */ +/*--- +info: > + Result of boolean conversion from nonempty string value (length is not + zero) is true; from empty String (length is zero) is false +es5id: 9.2_A5_T3 +description: Any nonempty string convert to Boolean by explicit transformation +---*/ // CHECK#1 if (Boolean(" ") !== true) { @@ -17,4 +18,3 @@ if (Boolean(" ") !== true) { if (Boolean("Nonempty String") !== true) { $ERROR('#2: Boolean("Nonempty String") === true. Actual: ' + (Boolean("Nonempty String"))); } - diff --git a/test/suite/ch09/9.2/S9.2_A5_T4.js b/test/suite/ch09/9.2/S9.2_A5_T4.js index c8ea44e9d6..7400ba153c 100644 --- a/test/suite/ch09/9.2/S9.2_A5_T4.js +++ b/test/suite/ch09/9.2/S9.2_A5_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from nonempty string value (length is not zero) is true; from empty String (length is zero) is false - * - * @path ch09/9.2/S9.2_A5_T4.js - * @description Any nonempty string convert to Boolean by implicit transformation - */ +/*--- +info: > + Result of boolean conversion from nonempty string value (length is not + zero) is true; from empty String (length is zero) is false +es5id: 9.2_A5_T4 +description: Any nonempty string convert to Boolean by implicit transformation +---*/ // CHECK#1 if (!(" ") !== false) { @@ -17,4 +18,3 @@ if (!(" ") !== false) { if (!("Nonempty String") !== false) { $ERROR('#2: !("Nonempty String") === false. Actual: ' + (!("Nonempty String"))); } - diff --git a/test/suite/ch09/9.2/S9.2_A6_T1.js b/test/suite/ch09/9.2/S9.2_A6_T1.js index 72bb34e264..1b530ce894 100644 --- a/test/suite/ch09/9.2/S9.2_A6_T1.js +++ b/test/suite/ch09/9.2/S9.2_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from object is true - * - * @path ch09/9.2/S9.2_A6_T1.js - * @description Different objects convert to Boolean by explicit transformation - */ +/*--- +info: Result of boolean conversion from object is true +es5id: 9.2_A6_T1 +description: Different objects convert to Boolean by explicit transformation +---*/ // CHECK#1 if (Boolean(new Object()) !== true) { @@ -102,4 +101,3 @@ if (Boolean(new Date()) !== true) { if (Boolean(new Date(0)) !== true) { $ERROR('#19: Boolean(new Date(0)) === true. Actual: ' + (Boolean(new Date(0)))); } - diff --git a/test/suite/ch09/9.2/S9.2_A6_T2.js b/test/suite/ch09/9.2/S9.2_A6_T2.js index 54dbbb6f37..73755f5c2d 100644 --- a/test/suite/ch09/9.2/S9.2_A6_T2.js +++ b/test/suite/ch09/9.2/S9.2_A6_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of boolean conversion from object is true - * - * @path ch09/9.2/S9.2_A6_T2.js - * @description Different objects convert to Boolean by implicit transformation - */ +/*--- +info: Result of boolean conversion from object is true +es5id: 9.2_A6_T2 +description: Different objects convert to Boolean by implicit transformation +---*/ // CHECK#1 if (!(new Object()) !== false) { @@ -102,4 +101,3 @@ if (!(new Date()) !== false) { if (!(new Date(0)) !== false) { $ERROR('#19: !(new Date(0)) === false. Actual: ' + (!(new Date(0)))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A1.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A1.js index 35b235fa3f..030b818344 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A1.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StringNumericLiteral ::: [empty] is 0 - * - * @path ch09/9.3/9.3.1/S9.3.1_A1.js - * @description Number('') convert to Number by explicit transformation - */ +/*--- +info: "The MV of StringNumericLiteral ::: [empty] is 0" +es5id: 9.3.1_A1 +description: Number('') convert to Number by explicit transformation +---*/ // CHECK#1 if (Number("") !== 0) { @@ -16,4 +15,3 @@ if (Number("") !== 0) { $ERROR('#1.2: Number("") == +0. Actual: -0'); } } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A10.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A10.js index 1f7d3f958b..d5902f4722 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A10.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A10.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral:::. DecimalDigits is the - * MV of DecimalDigits times 10-n, where n is the - * number of characters in DecimalDigits - * - * @path ch09/9.3/9.3.1/S9.3.1_A10.js - * @description Compare Number('.12345') with +('12345')*1e-5 - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral:::. DecimalDigits is the + MV of DecimalDigits times 10-n, where n is the + number of characters in DecimalDigits +es5id: 9.3.1_A10 +description: Compare Number('.12345') with +('12345')*1e-5 +---*/ // CHECK#1 if (Number(".12345") !== +("12345")*1e-5) { $ERROR('#1: Number(".12345") === +("12345")*1e-5'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A11.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A11.js index 9f58e16f2d..39c2735d05 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A11.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A11.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral:::. DecimalDigits ExponentPart - * is the MV of DecimalDigits times 10e-n, where n is - * the number of characters in DecimalDigits and e is the MV of ExponentPart - * - * @path ch09/9.3/9.3.1/S9.3.1_A11.js - * @description Compare Number('.12345e6') with +('12345')*1e1, - * and Number('.12345e-3') !== Number('12345')*1e-8 - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral:::. DecimalDigits ExponentPart + is the MV of DecimalDigits times 10e-n, where n is + the number of characters in DecimalDigits and e is the MV of ExponentPart +es5id: 9.3.1_A11 +description: > + Compare Number('.12345e6') with +('12345')*1e1, and + Number('.12345e-3') !== Number('12345')*1e-8 +---*/ // CHECK#1 if (Number(".12345e6") !== +("12345")*1e1) { @@ -20,4 +21,3 @@ if (Number(".12345e6") !== +("12345")*1e1) { if (Number(".12345e-3") !== Number("12345")*1e-8) { $ERROR('#2: Number(".12345e-3") === Number("12345")*1e-8'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A12.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A12.js index 2010409462..bd7ef9a52f 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A12.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A12.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral::: DecimalDigits ExponentPart - * is the MV of DecimalDigits times 10e, where e is the MV of ExponentPart - * - * @path ch09/9.3/9.3.1/S9.3.1_A12.js - * @description Compare Number('12345e6') with +('12345')*1e1, - * and Number('12345e-6') !== Number('12345')*1e-6 - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral::: DecimalDigits ExponentPart + is the MV of DecimalDigits times 10e, where e is the MV of ExponentPart +es5id: 9.3.1_A12 +description: > + Compare Number('12345e6') with +('12345')*1e1, and + Number('12345e-6') !== Number('12345')*1e-6 +---*/ // CHECK#1 if (Number("12345e6") !== +("12345")*1e6) { @@ -19,4 +20,3 @@ if (Number("12345e6") !== +("12345")*1e6) { if (Number("12345e-6") !== Number("12345")*1e-6) { $ERROR('#2: Number("12345e-6") === Number("12345")*1e-6'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A13.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A13.js index 8d51f4b020..4c3e407f3d 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A13.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A13.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigits ::: DecimalDigits DecimalDigit is - * (the MV of DecimalDigits times 10) plus the MV of DecimalDigit - * - * @path ch09/9.3/9.3.1/S9.3.1_A13.js - * @description Compare '12' with Number("1")*10+Number("2") and analogous - */ +/*--- +info: > + The MV of DecimalDigits ::: DecimalDigits DecimalDigit is + (the MV of DecimalDigits times 10) plus the MV of DecimalDigit +es5id: 9.3.1_A13 +description: Compare '12' with Number("1")*10+Number("2") and analogous +---*/ // CHECK#1 if (+("12") !== Number("1")*10+Number("2")) { @@ -23,4 +23,3 @@ if (Number("123") !== Number("12")*10+Number("3")) { if (Number("1234") !== Number("123")*10+Number("4")) { $ERROR('#2: Number("1234") === Number("123")*10+Number("4")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A14.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A14.js index 4ed80b0825..5b83689c80 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A14.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A14.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of SignedInteger ::: + DecimalDigits is the MV of DecimalDigits - * - * @path ch09/9.3/9.3.1/S9.3.1_A14.js - * @description Compare Number('+1234567890') with +('1234567890') - */ +/*--- +info: "The MV of SignedInteger ::: + DecimalDigits is the MV of DecimalDigits" +es5id: 9.3.1_A14 +description: Compare Number('+1234567890') with +('1234567890') +---*/ // CHECK#1 if (Number("+1234567890") !== +("1234567890")) { $ERROR('#1: Number("+1234567890") === +("1234567890")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A15.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A15.js index d0ba80b6e1..3d843d6e94 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A15.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A15.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of SignedInteger ::: - DecimalDigits is the negative of the MV of DecimalDigits - * - * @path ch09/9.3/9.3.1/S9.3.1_A15.js - * @description Compare -Number('1234567890') with ('-1234567890') - */ +/*--- +info: > + The MV of SignedInteger ::: - DecimalDigits is the negative of the MV of + DecimalDigits +es5id: 9.3.1_A15 +description: Compare -Number('1234567890') with ('-1234567890') +---*/ // CHECK#1 if (+("-1234567890") !== -Number("1234567890")) { $ERROR('#1: +("-1234567890") === -Number("1234567890")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A16.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A16.js index 6163fbb4a2..09cb7198b8 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A16.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A16.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 0 or of HexDigit ::: 0 is 0 - * - * @path ch09/9.3/9.3.1/S9.3.1_A16.js - * @description Compare Number('0x0') and Number('0X0') with 0 - */ +/*--- +info: "The MV of DecimalDigit ::: 0 or of HexDigit ::: 0 is 0" +es5id: 9.3.1_A16 +description: Compare Number('0x0') and Number('0X0') with 0 +---*/ // CHECK#1 if (Number("0") !== 0) { @@ -22,4 +21,3 @@ if (+("0x0") !== 0) { if (Number("0X0") !== 0) { $ERROR('#3: Number("0X0") === 0. Actual: ' + (Number("0X0"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A17.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A17.js index d4b72bbf5a..a41a110fb0 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A17.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A17.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 1 or of HexDigit ::: 1 is 1 - * - * @path ch09/9.3/9.3.1/S9.3.1_A17.js - * @description Compare Number('0x1') and Number('0X1') with 1 - */ +/*--- +info: "The MV of DecimalDigit ::: 1 or of HexDigit ::: 1 is 1" +es5id: 9.3.1_A17 +description: Compare Number('0x1') and Number('0X1') with 1 +---*/ // CHECK#1 if (Number("1") !== 1) { @@ -22,4 +21,3 @@ if (Number("0x1") !== 1) { if (+("0X1") !== 1) { $ERROR('#3: +("0X1") === 1. Actual: ' + (+("0X1"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A18.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A18.js index b4375494ca..0bccc171dc 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A18.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A18.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 2 or of HexDigit ::: 2 is 2 - * - * @path ch09/9.3/9.3.1/S9.3.1_A18.js - * @description Compare Number('0x2') and Number('0X2') with 2 - */ +/*--- +info: "The MV of DecimalDigit ::: 2 or of HexDigit ::: 2 is 2" +es5id: 9.3.1_A18 +description: Compare Number('0x2') and Number('0X2') with 2 +---*/ // CHECK#1 if (+("2") !== 2) { @@ -22,4 +21,3 @@ if (Number("0x2") !== 2) { if (Number("0X2") !== 2) { $ERROR('#3: Number("0X2") === 2. Actual: ' + (Number("0X2"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A19.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A19.js index 0abc0200ae..1982f636a3 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A19.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A19.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 3 or of HexDigit ::: 3 is 3 - * - * @path ch09/9.3/9.3.1/S9.3.1_A19.js - * @description Compare Number('0x3') and Number('0X3') with 3 - */ +/*--- +info: "The MV of DecimalDigit ::: 3 or of HexDigit ::: 3 is 3" +es5id: 9.3.1_A19 +description: Compare Number('0x3') and Number('0X3') with 3 +---*/ // CHECK#1 if (Number("3") !== 3) { @@ -22,4 +21,3 @@ if (+("0x3") !== 3) { if (Number("0X3") !== 3) { $ERROR('#3: Number("0X3") === 3. Actual: ' + (Number("0X3"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A2.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A2.js index f9bb014658..4293afb335 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A2.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StringNumericLiteral ::: StrWhiteSpace is 0 - * - * @path ch09/9.3/9.3.1/S9.3.1_A2.js - * @description Strings with various WhiteSpaces convert to Number by explicit transformation - */ +/*--- +info: "The MV of StringNumericLiteral ::: StrWhiteSpace is 0" +es5id: 9.3.1_A2 +description: > + Strings with various WhiteSpaces convert to Number by explicit + transformation +---*/ // CHECK#1 if (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") !== 0) { @@ -286,4 +287,3 @@ if (Number("\u3000") !== 0) { $ERROR('#31.2: Number("\\u3000") === +0. Actual: -0'); } } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A20.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A20.js index 78689d42d7..76c6c6f8f3 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A20.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A20.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 4 or of HexDigit ::: 4 is 4 - * - * @path ch09/9.3/9.3.1/S9.3.1_A20.js - * @description Compare Number('0x4') and Number('0X4') with 4 - */ +/*--- +info: "The MV of DecimalDigit ::: 4 or of HexDigit ::: 4 is 4" +es5id: 9.3.1_A20 +description: Compare Number('0x4') and Number('0X4') with 4 +---*/ // CHECK#1 if (Number("4") !== 4) { @@ -22,4 +21,3 @@ if (Number("0x4") !== 4) { if (+("0X4") !== 4) { $ERROR('#3: +("0X4") === 4. Actual: ' + (+("0X4"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A21.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A21.js index de8fe9fe1f..1fbf9ab104 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A21.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A21.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 5 or of HexDigit ::: 5 is 5 - * - * @path ch09/9.3/9.3.1/S9.3.1_A21.js - * @description Compare Number('0x5') and Number('0X5') with 5 - */ +/*--- +info: "The MV of DecimalDigit ::: 5 or of HexDigit ::: 5 is 5" +es5id: 9.3.1_A21 +description: Compare Number('0x5') and Number('0X5') with 5 +---*/ // CHECK#1 if (+("5") !== 5) { @@ -22,4 +21,3 @@ if (Number("0x5") !== 5) { if (Number("0X5") !== 5) { $ERROR('#3: Number("0X5") === 5. Actual: ' + (Number("0X5"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A22.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A22.js index 02aa703a3e..d2f8a03dde 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A22.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A22.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 6 or of HexDigit ::: 6 is 6 - * - * @path ch09/9.3/9.3.1/S9.3.1_A22.js - * @description Compare Number('0x6') and Number('0X6') with 6 - */ +/*--- +info: "The MV of DecimalDigit ::: 6 or of HexDigit ::: 6 is 6" +es5id: 9.3.1_A22 +description: Compare Number('0x6') and Number('0X6') with 6 +---*/ // CHECK#1 if (Number("6") !== 6) { @@ -22,4 +21,3 @@ if (+("0x6") !== 6) { if (Number("0X6") !== 6) { $ERROR('#3: Number("0X6") === 6. Actual: ' + (Number("0X6"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A23.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A23.js index d1745156d0..18cf4300da 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A23.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A23.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 7 or of HexDigit ::: 7 is 7 - * - * @path ch09/9.3/9.3.1/S9.3.1_A23.js - * @description Compare Number('0x7') and Number('0X7') with 7 - */ +/*--- +info: "The MV of DecimalDigit ::: 7 or of HexDigit ::: 7 is 7" +es5id: 9.3.1_A23 +description: Compare Number('0x7') and Number('0X7') with 7 +---*/ // CHECK#1 if (Number("7") !== 7) { @@ -22,4 +21,3 @@ if (Number("0x7") !== 7) { if (+("0X7") !== 7) { $ERROR('#3: +("0X7") === 7. Actual: ' + (+("0X7"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A24.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A24.js index 91409bead5..7f439f7296 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A24.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A24.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 8 or of HexDigit ::: 8 is 8 - * - * @path ch09/9.3/9.3.1/S9.3.1_A24.js - * @description Compare Number('0x8') and Number('0X8') with 8 - */ +/*--- +info: "The MV of DecimalDigit ::: 8 or of HexDigit ::: 8 is 8" +es5id: 9.3.1_A24 +description: Compare Number('0x8') and Number('0X8') with 8 +---*/ // CHECK#1 if (+("8") !== 8) { @@ -22,4 +21,3 @@ if (Number("0x8") !== 8) { if (Number("0X8") !== 8) { $ERROR('#3: Number("0X8") === 8. Actual: ' + (Number("0X8"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A25.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A25.js index 761ceb4436..0a96493939 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A25.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A25.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of DecimalDigit ::: 9 or of HexDigit ::: 9 is 9 - * - * @path ch09/9.3/9.3.1/S9.3.1_A25.js - * @description Compare Number('0x9') and Number('0X9') with 9 - */ +/*--- +info: "The MV of DecimalDigit ::: 9 or of HexDigit ::: 9 is 9" +es5id: 9.3.1_A25 +description: Compare Number('0x9') and Number('0X9') with 9 +---*/ // CHECK#1 if (Number("9") !== 9) { @@ -22,4 +21,3 @@ if (+("0x9") !== 9) { if (Number("0X9") !== 9) { $ERROR('#3: Number("0X9") === 9. Actual: ' + (Number("0X9"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A26.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A26.js index 404203f596..526af63de9 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A26.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A26.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of HexDigit ::: a or of HexDigit ::: A is 10 - * - * @path ch09/9.3/9.3.1/S9.3.1_A26.js - * @description Compare Number('0xA'), Number('0XA'), Number('0xa') and Number('0Xa') with 10 - */ +/*--- +info: "The MV of HexDigit ::: a or of HexDigit ::: A is 10" +es5id: 9.3.1_A26 +description: > + Compare Number('0xA'), Number('0XA'), Number('0xa') and + Number('0Xa') with 10 +---*/ // CHECK#1 if (Number("0xa") !== 10) { @@ -27,4 +28,3 @@ if (Number("0Xa") !== 10) { if (+("0XA") !== 10) { $ERROR('#4: +("0XA") === 10. Actual: ' + (+("0XA"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A27.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A27.js index 67e6a6e5f0..95a1c48030 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A27.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A27.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of HexDigit ::: b or of HexDigit ::: B is 11 - * - * @path ch09/9.3/9.3.1/S9.3.1_A27.js - * @description Compare Number('0xB'), Number('0XB'), Number('0xb') and Number('0Xb') with 11 - */ +/*--- +info: "The MV of HexDigit ::: b or of HexDigit ::: B is 11" +es5id: 9.3.1_A27 +description: > + Compare Number('0xB'), Number('0XB'), Number('0xb') and + Number('0Xb') with 11 +---*/ // CHECK#1 if (Number("0xb") !== 11) { @@ -27,4 +28,3 @@ if (+("0Xb") !== 11) { if (Number("0XB") !== 11) { $ERROR('#4: Number("0XB") === 11. Actual: ' + (Number("0XB"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A28.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A28.js index d29b8c2893..d7fe6d8cb9 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A28.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A28.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of HexDigit ::: c or of HexDigit ::: C is 12 - * - * @path ch09/9.3/9.3.1/S9.3.1_A28.js - * @description Compare Number('0xC'), Number('0XC'), Number('0xc') and Number('0Xc') with 12 - */ +/*--- +info: "The MV of HexDigit ::: c or of HexDigit ::: C is 12" +es5id: 9.3.1_A28 +description: > + Compare Number('0xC'), Number('0XC'), Number('0xc') and + Number('0Xc') with 12 +---*/ // CHECK#1 if (Number("0xc") !== 12) { @@ -27,4 +28,3 @@ if (Number("0Xc") !== 12) { if (Number("0XC") !== 12) { $ERROR('#4: Number("0XC") === 12. Actual: ' + (Number("0XC"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A29.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A29.js index 88473af858..f62f3a778b 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A29.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A29.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of HexDigit ::: d or of HexDigit ::: D is 13 - * - * @path ch09/9.3/9.3.1/S9.3.1_A29.js - * @description Compare Number('0xD'), Number('0XD'), Number('0xd') and Number('0Xd') with 13 - */ +/*--- +info: "The MV of HexDigit ::: d or of HexDigit ::: D is 13" +es5id: 9.3.1_A29 +description: > + Compare Number('0xD'), Number('0XD'), Number('0xd') and + Number('0Xd') with 13 +---*/ // CHECK#1 if (+("0xd") !== 13) { @@ -27,4 +28,3 @@ if (Number("0Xd") !== 13) { if (Number("0XD") !== 13) { $ERROR('#4: Number("0XD") === 13. Actual: ' + (Number("0XD"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A30.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A30.js index b94bacbd73..261bd8b1e4 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A30.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A30.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of HexDigit ::: e or of HexDigit ::: E is 14 - * - * @path ch09/9.3/9.3.1/S9.3.1_A30.js - * @description Compare Number('0xE'), Number('0XE'), Number('0xe') and Number('0Xe') with 14 - */ +/*--- +info: "The MV of HexDigit ::: e or of HexDigit ::: E is 14" +es5id: 9.3.1_A30 +description: > + Compare Number('0xE'), Number('0XE'), Number('0xe') and + Number('0Xe') with 14 +---*/ // CHECK#1 if (Number("0xe") !== 14) { @@ -27,4 +28,3 @@ if (Number("0Xe") !== 14) { if (+("0XE") !== 14) { $ERROR('#4: +("0XE") === 14. Actual: ' + (+("0XE"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A31.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A31.js index f5f151b767..6cc699d2bd 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A31.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A31.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of HexDigit ::: f or of HexDigit ::: F is 15 - * - * @path ch09/9.3/9.3.1/S9.3.1_A31.js - * @description Compare Number('0xF'), Number('0XF'), Number('0xf') and Number('0Xf') with 15 - */ +/*--- +info: "The MV of HexDigit ::: f or of HexDigit ::: F is 15" +es5id: 9.3.1_A31 +description: > + Compare Number('0xF'), Number('0XF'), Number('0xf') and + Number('0Xf') with 15 +---*/ // CHECK#1 if (Number("0xf") !== 15) { @@ -27,4 +28,3 @@ if (+("0Xf") !== 15) { if (Number("0XF") !== 15) { $ERROR('#4: Number("0XF") === 15. Actual: ' + (Number("0XF"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A32.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A32.js index 700feb7172..42bec83e27 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A32.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A32.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Once the exact MV for a string numeric literal has been - * determined, it is then rounded to a value of the Number type with 20 - * significant digits by replacing each significant digit after the 20th - * with a 0 digit or the number value - * - * @path ch09/9.3/9.3.1/S9.3.1_A32.js - * @description Use various long numbers, for example, 1234567890.1234567890 - */ +/*--- +info: > + Once the exact MV for a string numeric literal has been + determined, it is then rounded to a value of the Number type with 20 + significant digits by replacing each significant digit after the 20th + with a 0 digit or the number value +es5id: 9.3.1_A32 +description: Use various long numbers, for example, 1234567890.1234567890 +---*/ // CHECK#1 if (Number("1234567890.1234567890") !== 1234567890.1234567890) { @@ -35,4 +35,3 @@ if (Number("0.12345678901234567890") !== 0.123456789012345678) { if (Number("00.12345678901234567890") !== 0.123456789012345678) { $ERROR('#4: Number("00.12345678901234567890") === 0.123456789012345678. Actual: ' + (Number("00.12345678901234567890"))); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T1.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T1.js index 304f5ba4e1..d549a588d8 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T1.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StringNumericLiteral ::: StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt is the MV of StrNumericLiteral, no matter whether white space is present or not - * - * @path ch09/9.3/9.3.1/S9.3.1_A3_T1.js - * @description static string - */ +/*--- +info: > + The MV of StringNumericLiteral ::: StrWhiteSpaceopt StrNumericLiteral + StrWhiteSpaceopt is the MV of StrNumericLiteral, no matter whether white + space is present or not +es5id: 9.3.1_A3_T1 +description: static string +---*/ // CHECK#1 if (Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") !== Number("")) { @@ -27,4 +29,3 @@ if (!(+("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u180E\u200 if (!(Number("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000-Infinity\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000") == Number(-"Infinity"))) { $ERROR('#4: Number("\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000-Infinity\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000") == Number("-Infinity")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T2.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T2.js index 0969dd9bb0..e398188f8c 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T2.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StringNumericLiteral ::: StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt is the MV of StrNumericLiteral, no matter whether white space is present or not - * - * @path ch09/9.3/9.3.1/S9.3.1_A3_T2.js - * @description dynamic string - */ +/*--- +info: > + The MV of StringNumericLiteral ::: StrWhiteSpaceopt StrNumericLiteral + StrWhiteSpaceopt is the MV of StrNumericLiteral, no matter whether white + space is present or not +es5id: 9.3.1_A3_T2 +description: dynamic string +---*/ function dynaString(s1, s2){ return String(s1)+String(s2); @@ -31,4 +33,3 @@ if (!(Number(dynaString("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029I if (!(Number(dynaString("\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029-Infi", "nity\u0009\u000C\u0020\u00A0\u000B\u000A\u000D\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000")) == Number(-"Infinity"))) { $ERROR('#4: Number("\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029-Infi"+"nity\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000") == Number("-Infinity")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T1.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T1.js index 8d20511408..8c3a2c3a23 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T1.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrDecimalLiteral::: + StrUnsignedDecimalLiteral is the MV of StrUnsignedDecimalLiteral - * - * @path ch09/9.3/9.3.1/S9.3.1_A4_T1.js - * @description Compare Number('+any_number') with Number('any_number') - */ +/*--- +info: > + The MV of StrDecimalLiteral::: + StrUnsignedDecimalLiteral is the MV of + StrUnsignedDecimalLiteral +es5id: 9.3.1_A4_T1 +description: Compare Number('+any_number') with Number('any_number') +---*/ // CHECK#1 if (Number("+0") !== Number("0")) { @@ -47,4 +48,3 @@ if (Number("+1234.5678e-90") !== Number("1234.5678e-90")) { if (Number("+1234.5678E-90") !== Number("1234.5678E-90")) { $ERROR('#8: Number("+1234.5678E-90") === Number("1234.5678E-90")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T2.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T2.js index e10d517ce3..14aab6c404 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T2.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrDecimalLiteral::: + StrUnsignedDecimalLiteral is the MV of StrUnsignedDecimalLiteral - * - * @path ch09/9.3/9.3.1/S9.3.1_A4_T2.js - * @description Compare Number('+' + 'any_number') with Number('any_number') - */ +/*--- +info: > + The MV of StrDecimalLiteral::: + StrUnsignedDecimalLiteral is the MV of + StrUnsignedDecimalLiteral +es5id: 9.3.1_A4_T2 +description: Compare Number('+' + 'any_number') with Number('any_number') +---*/ function dynaString(s1, s2){ return String(s1)+String(s2); @@ -51,4 +52,3 @@ if (Number(dynaString("+1234.", "5678e-90")) !== Number("1234.5678e-90")) { if (Number(dynaString("+1234.", "5678E-90")) !== Number("1234.5678E-90")) { $ERROR('#8: Number("+1234."+"5678E-90") === Number("1234.5678E-90")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T1.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T1.js index b6bb8137d0..766eb3f130 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T1.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative - * of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) - * - * @path ch09/9.3/9.3.1/S9.3.1_A5_T1.js - * @description Compare Number('-any_number') with -Number('any_number') - */ +/*--- +info: > + The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative + of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) +es5id: 9.3.1_A5_T1 +description: Compare Number('-any_number') with -Number('any_number') +---*/ // CHECK#1 if (Number("-0") !== -Number("0")) { @@ -58,4 +58,3 @@ if (Number("-1234.5678E-90") !== -Number("1234.5678E-90")) { if (Number("-Infinity") !== Number.NEGATIVE_INFINITY) { $ERROR('#3: Number("-Infinity") === Number.NEGATIVE_INFINITY'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T2.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T2.js index 47bc6549eb..e88dce34c3 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T2.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative - * of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) - * - * @path ch09/9.3/9.3.1/S9.3.1_A5_T2.js - * @description Compare Number('-[or +]any_number') with -[or without -]any_number) - */ +/*--- +info: > + The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative + of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) +es5id: 9.3.1_A5_T2 +description: Compare Number('-[or +]any_number') with -[or without -]any_number) +---*/ // CHECK#1 if (Number("1") !== 1) { @@ -143,4 +143,3 @@ if (Number("+9") !== 9) { if (Number("-9") !== -9) { $ERROR('#27: Number("-9") === -9'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T3.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T3.js index c062e198f9..ed33501951 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T3.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A5_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative - * of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) - * - * @path ch09/9.3/9.3.1/S9.3.1_A5_T3.js - * @description Compare Number('-' + 'any_number') with -Number('any_number') - */ +/*--- +info: > + The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative + of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) +es5id: 9.3.1_A5_T3 +description: Compare Number('-' + 'any_number') with -Number('any_number') +---*/ function dynaString(s1, s2){ return String(s1)+String(s2); @@ -62,4 +62,3 @@ if (Number(dynaString("-1234.", "5678E-90")) !== -Number("1234.5678E-90")) { if (Number(dynaString("-Infi", "nity")) !== Number.NEGATIVE_INFINITY) { $ERROR('#3: Number("-Infi"+"nity") === Number.NEGATIVE_INFINITY'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T1.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T1.js index 6aeeef2422..f27b67b87f 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T1.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral::: Infinity is 1010000 - * (a value so large that it will round to +∞) - * - * @path ch09/9.3/9.3.1/S9.3.1_A6_T1.js - * @description Compare Number('Infinity') with Number.POSITIVE_INFINITY, 10e10000, 10E10000 and Number("10e10000") - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral::: Infinity is 1010000 + (a value so large that it will round to +∞) +es5id: 9.3.1_A6_T1 +description: > + Compare Number('Infinity') with Number.POSITIVE_INFINITY, + 10e10000, 10E10000 and Number("10e10000") +---*/ // CHECK#1 if (Number("Infinity") !== Number.POSITIVE_INFINITY) { @@ -28,4 +30,3 @@ if (Number("Infinity") !== 10E10000) { if (Number("Infinity") !== Number("10e10000")) { $ERROR('#4: Number("Infinity") === Number("10e10000")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T2.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T2.js index 9e4659873a..be6c4158bd 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T2.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A6_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral::: Infinity is 1010000 - * (a value so large that it will round to +∞) - * - * @path ch09/9.3/9.3.1/S9.3.1_A6_T2.js - * @description Compare Number('Infi'+'nity') with Number.POSITIVE_INFINITY, 10e10000, 10E10000 and Number("10e10000") - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral::: Infinity is 1010000 + (a value so large that it will round to +∞) +es5id: 9.3.1_A6_T2 +description: > + Compare Number('Infi'+'nity') with Number.POSITIVE_INFINITY, + 10e10000, 10E10000 and Number("10e10000") +---*/ function dynaString(s1, s2){ return String(s1)+String(s2); @@ -33,4 +35,3 @@ if (Number(dynaString("Infi", "nity")) !== 10E10000) { if (Number(dynaString("Infi", "nity")) !== Number("10e10000")) { $ERROR('#4: Number("Infi"+"nity") === Number("10e10000")'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A7.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A7.js index 50a7f357fb..3530a97add 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A7.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A7.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral::: DecimalDigits. DecimalDigits - * is the MV of the first DecimalDigits plus the MV of the second DecimalDigits times - * 10-n, where n is the number of characters in the second DecimalDigits - * - * @path ch09/9.3/9.3.1/S9.3.1_A7.js - * @description Compare Number('1234.5678') with Number('1234')+(+('5678')*1e-4) - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral::: DecimalDigits. DecimalDigits + is the MV of the first DecimalDigits plus the MV of the second DecimalDigits times + 10-n, where n is the number of characters in the second DecimalDigits +es5id: 9.3.1_A7 +description: Compare Number('1234.5678') with Number('1234')+(+('5678')*1e-4) +---*/ // CHECK#1 if (Number("1234.5678") !== Number("1234")+(+("5678")*1e-4)) { $ERROR('#1: Number("1234.5678") === Number("1234")+(+("5678")*1e-4)'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A8.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A8.js index 6b7a5d4a3f..34fec85b11 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A8.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A8.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral::: DecimalDigits. ExponentPart - * is the MV of DecimalDigits times 10e , where e is the MV of ExponentPart - * - * @path ch09/9.3/9.3.1/S9.3.1_A8.js - * @description Compare Number('1234e5') and Number('1234.e5') with Number('1234')*1e5 - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral::: DecimalDigits. ExponentPart + is the MV of DecimalDigits times 10e , where e is the MV of ExponentPart +es5id: 9.3.1_A8 +description: > + Compare Number('1234e5') and Number('1234.e5') with + Number('1234')*1e5 +---*/ // CHECK#1 if (Number("1234e5") !== Number("1234")*1e5) { @@ -18,4 +20,3 @@ if (Number("1234e5") !== Number("1234")*1e5) { if (Number("1234.e5") !== +("1234")*1e5) { $ERROR('#2: Number("1234.e5") === +("1234")*1e5'); } - diff --git a/test/suite/ch09/9.3/9.3.1/S9.3.1_A9.js b/test/suite/ch09/9.3/9.3.1/S9.3.1_A9.js index 1c88a53226..6db83de34d 100644 --- a/test/suite/ch09/9.3/9.3.1/S9.3.1_A9.js +++ b/test/suite/ch09/9.3/9.3.1/S9.3.1_A9.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The MV of StrUnsignedDecimalLiteral::: DecimalDigits. DecimalDigits ExponentPart - * is (the MV of the first DecimalDigits plus (the MV of the second DecimalDigits times - * 10-n)) times 10e, where n is the number - * of characters in the second DecimalDigits and e is the MV of ExponentPart - * - * @path ch09/9.3/9.3.1/S9.3.1_A9.js - * @description Compare Number('1234.5678e9') with (Number('1234')+(Number('5678')*1e-4))*1e9, - * and +('1234.5678e-9') with (Number('1234')+(Number('5678')*1e-4))*1e-9 - */ +/*--- +info: > + The MV of StrUnsignedDecimalLiteral::: DecimalDigits. DecimalDigits ExponentPart + is (the MV of the first DecimalDigits plus (the MV of the second DecimalDigits times + 10-n)) times 10e, where n is the number + of characters in the second DecimalDigits and e is the MV of ExponentPart +es5id: 9.3.1_A9 +description: > + Compare Number('1234.5678e9') with + (Number('1234')+(Number('5678')*1e-4))*1e9, and +('1234.5678e-9') + with (Number('1234')+(Number('5678')*1e-4))*1e-9 +---*/ // CHECK#1 if (Number("1234.5678e9") !== (Number("1234")+(Number("5678")*1e-4))*1e9) { @@ -21,4 +23,3 @@ if (Number("1234.5678e9") !== (Number("1234")+(Number("5678")*1e-4))*1e9) { if (+("1234.5678e-9") !== (Number("1234")+(Number("5678")*1e-4))*1e-9) { $ERROR('#2: +("1234.5678e-9") === (Number("1234")+(Number("5678")*1e-4))*1e-9'); } - diff --git a/test/suite/ch09/9.3/S9.3_A1_T1.js b/test/suite/ch09/9.3/S9.3_A1_T1.js index bd7869f1e5..cd22aa04ac 100644 --- a/test/suite/ch09/9.3/S9.3_A1_T1.js +++ b/test/suite/ch09/9.3/S9.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from undefined value is NaN - * - * @path ch09/9.3/S9.3_A1_T1.js - * @description Undefined convert to Number by explicit transformation - */ +/*--- +info: Result of number conversion from undefined value is NaN +es5id: 9.3_A1_T1 +description: Undefined convert to Number by explicit transformation +---*/ // CHECK#1 if (isNaN(Number(undefined)) !== true) { @@ -22,4 +21,3 @@ if (isNaN(Number(void 0)) !== true) { if (isNaN(Number(eval("var x"))) !== true) { $ERROR('#3: Number(eval("var x")) === Not-a-Number. Actual: ' + (Number(eval("var x")))); } - diff --git a/test/suite/ch09/9.3/S9.3_A1_T2.js b/test/suite/ch09/9.3/S9.3_A1_T2.js index 930e96919c..b21b0c8505 100644 --- a/test/suite/ch09/9.3/S9.3_A1_T2.js +++ b/test/suite/ch09/9.3/S9.3_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from undefined value is NaN - * - * @path ch09/9.3/S9.3_A1_T2.js - * @description Undefined convert to Number by implicit transformation - */ +/*--- +info: Result of number conversion from undefined value is NaN +es5id: 9.3_A1_T2 +description: Undefined convert to Number by implicit transformation +---*/ // CHECK#1 if (isNaN(+(undefined)) !== true) { @@ -22,4 +21,3 @@ if (isNaN(+(void 0)) !== true) { if (isNaN(+(eval("var x"))) !== true) { $ERROR('#3: +(eval("var x")) === Not-a-Number. Actual: ' + (+(eval("var x")))); } - diff --git a/test/suite/ch09/9.3/S9.3_A2_T1.js b/test/suite/ch09/9.3/S9.3_A2_T1.js index 2be743bc7e..6094444ecc 100644 --- a/test/suite/ch09/9.3/S9.3_A2_T1.js +++ b/test/suite/ch09/9.3/S9.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from null value is +0 - * - * @path ch09/9.3/S9.3_A2_T1.js - * @description null convert to Number by explicit transformation - */ +/*--- +info: Result of number conversion from null value is +0 +es5id: 9.3_A2_T1 +description: null convert to Number by explicit transformation +---*/ // CHECK #1 if (Number(null) !== 0) { @@ -16,4 +15,3 @@ if (Number(null) !== 0) { $ERROR('#1.2: Number(null) === +0. Actual: -0'); } } - diff --git a/test/suite/ch09/9.3/S9.3_A2_T2.js b/test/suite/ch09/9.3/S9.3_A2_T2.js index ce035b90a6..f9c166c75d 100644 --- a/test/suite/ch09/9.3/S9.3_A2_T2.js +++ b/test/suite/ch09/9.3/S9.3_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from null value is +0 - * - * @path ch09/9.3/S9.3_A2_T2.js - * @description null convert to Number by implicit transformation - */ +/*--- +info: Result of number conversion from null value is +0 +es5id: 9.3_A2_T2 +description: null convert to Number by implicit transformation +---*/ // CHECK #1 if (+(null) !== 0) { @@ -16,4 +15,3 @@ if (+(null) !== 0) { $ERROR('#1.2: +(null) === +0. Actual: -0'); } } - diff --git a/test/suite/ch09/9.3/S9.3_A3_T1.js b/test/suite/ch09/9.3/S9.3_A3_T1.js index 1feee2b6b5..75a3795f6f 100644 --- a/test/suite/ch09/9.3/S9.3_A3_T1.js +++ b/test/suite/ch09/9.3/S9.3_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from boolean value is 1 if the argument is true, else is +0 - * - * @path ch09/9.3/S9.3_A3_T1.js - * @description False and true convert to Number by explicit transformation - */ +/*--- +info: > + Result of number conversion from boolean value is 1 if the argument is + true, else is +0 +es5id: 9.3_A3_T1 +description: False and true convert to Number by explicit transformation +---*/ // CHECK#1 if (Number(false) !== +0) { @@ -21,4 +22,3 @@ if (Number(false) !== +0) { if (Number(true) !== 1) { $ERROR('#2: Number(true) === 1. Actual: ' + (Number(true))); } - diff --git a/test/suite/ch09/9.3/S9.3_A3_T2.js b/test/suite/ch09/9.3/S9.3_A3_T2.js index 4b7f30539f..fb3f4419bd 100644 --- a/test/suite/ch09/9.3/S9.3_A3_T2.js +++ b/test/suite/ch09/9.3/S9.3_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from boolean value is 1 if the argument is true, else is +0 - * - * @path ch09/9.3/S9.3_A3_T2.js - * @description False and true convert to Number by implicit transformation - */ +/*--- +info: > + Result of number conversion from boolean value is 1 if the argument is + true, else is +0 +es5id: 9.3_A3_T2 +description: False and true convert to Number by implicit transformation +---*/ // CHECK#1 if (+(false) !== +0) { @@ -21,4 +22,3 @@ if (+(false) !== +0) { if (+(true) !== 1) { $ERROR('#2: +(true) === 1. Actual: ' + (+(true))); } - diff --git a/test/suite/ch09/9.3/S9.3_A4.1_T1.js b/test/suite/ch09/9.3/S9.3_A4.1_T1.js index 96d24be9f5..aea8a515d8 100644 --- a/test/suite/ch09/9.3/S9.3_A4.1_T1.js +++ b/test/suite/ch09/9.3/S9.3_A4.1_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from number value equals to the input argument (no conversion) - * - * @path ch09/9.3/S9.3_A4.1_T1.js - * @description Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are converted to Number with explicit transformation - */ +/*--- +info: > + Result of number conversion from number value equals to the input + argument (no conversion) +es5id: 9.3_A4.1_T1 +description: > + Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are + converted to Number with explicit transformation +---*/ // CHECK#1 if (Number(13) !== 13) { @@ -36,5 +39,4 @@ if (Number(Number.MAX_VALUE) !== 1.7976931348623157e308) { // CHECK#6 if (Number(Number.MIN_VALUE) !== 5e-324) { $ERROR('#6: Number(Number.MIN_VALUE) === 5e-324. Actual: ' + (Number(Number.MIN_VALUE))); -} - +} diff --git a/test/suite/ch09/9.3/S9.3_A4.1_T2.js b/test/suite/ch09/9.3/S9.3_A4.1_T2.js index 6c1c28b3da..9b84b011d2 100644 --- a/test/suite/ch09/9.3/S9.3_A4.1_T2.js +++ b/test/suite/ch09/9.3/S9.3_A4.1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from number value equals to the input argument (no conversion) - * - * @path ch09/9.3/S9.3_A4.1_T2.js - * @description Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are converted to Number with implicit transformation - */ +/*--- +info: > + Result of number conversion from number value equals to the input + argument (no conversion) +es5id: 9.3_A4.1_T2 +description: > + Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are + converted to Number with implicit transformation +---*/ // CHECK#1 if (+(13) !== 13) { @@ -36,5 +39,4 @@ if (+(Number.MAX_VALUE) !== 1.7976931348623157e308) { // CHECK#6 if (+(Number.MIN_VALUE) !== 5e-324) { $ERROR('#6: +(Number.MIN_VALUE) === 5e-324. Actual: ' + (+(Number.MIN_VALUE))); -} - +} diff --git a/test/suite/ch09/9.3/S9.3_A4.2_T1.js b/test/suite/ch09/9.3/S9.3_A4.2_T1.js index 788f20cb9d..a123d98745 100644 --- a/test/suite/ch09/9.3/S9.3_A4.2_T1.js +++ b/test/suite/ch09/9.3/S9.3_A4.2_T1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from number value equals to the input argument (no conversion) - * - * @path ch09/9.3/S9.3_A4.2_T1.js - * @description Number.NaN, +0, -0, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, - * Number.MAX_VALUE and Number.MIN_VALUE convert to Number by explicit transformation - */ +/*--- +info: > + Result of number conversion from number value equals to the input + argument (no conversion) +es5id: 9.3_A4.2_T1 +description: > + Number.NaN, +0, -0, Number.POSITIVE_INFINITY, + Number.NEGATIVE_INFINITY, Number.MAX_VALUE and Number.MIN_VALUE + convert to Number by explicit transformation +---*/ // CHECK#1 if (isNaN(Number(Number.NaN)) !== true) { @@ -51,4 +54,3 @@ if (Number(Number.MAX_VALUE) !== Number.MAX_VALUE) { if (Number(Number.MIN_VALUE) !== Number.MIN_VALUE) { $ERROR('#7: Number(Number.MIN_VALUE) === Number.MIN_VALUE. Actual: ' + (Number(Number.MIN_VALUE))); } - diff --git a/test/suite/ch09/9.3/S9.3_A4.2_T2.js b/test/suite/ch09/9.3/S9.3_A4.2_T2.js index 3e4d8ad4ac..5eee5f10a6 100644 --- a/test/suite/ch09/9.3/S9.3_A4.2_T2.js +++ b/test/suite/ch09/9.3/S9.3_A4.2_T2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from number value equals to the input argument (no conversion) - * - * @path ch09/9.3/S9.3_A4.2_T2.js - * @description Number.NaN, +0, -0, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, - * Number.MAX_VALUE and Number.MIN_VALUE convert to Number by implicit transformation - */ +/*--- +info: > + Result of number conversion from number value equals to the input + argument (no conversion) +es5id: 9.3_A4.2_T2 +description: > + Number.NaN, +0, -0, Number.POSITIVE_INFINITY, + Number.NEGATIVE_INFINITY, Number.MAX_VALUE and Number.MIN_VALUE + convert to Number by implicit transformation +---*/ // CHECK#1 if (isNaN(+(Number.NaN)) !== true) { @@ -51,4 +54,3 @@ if (+(Number.MAX_VALUE) !== Number.MAX_VALUE) { if (+(Number.MIN_VALUE) !== Number.MIN_VALUE) { $ERROR('#7: +(Number.MIN_VALUE) === Number.MIN_VALUE. Actual: ' + (+(Number.MIN_VALUE))); } - diff --git a/test/suite/ch09/9.3/S9.3_A5_T1.js b/test/suite/ch09/9.3/S9.3_A5_T1.js index a76f65b1da..739d701343 100644 --- a/test/suite/ch09/9.3/S9.3_A5_T1.js +++ b/test/suite/ch09/9.3/S9.3_A5_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from object value is the result - * of conversion from primitive value - * - * @path ch09/9.3/S9.3_A5_T1.js - * @description new Number(), new Number(0), new Number(Number.NaN), new Number(null), - * new Number(void 0) and others convert to Number by explicit transformation - */ +/*--- +info: > + Result of number conversion from object value is the result + of conversion from primitive value +es5id: 9.3_A5_T1 +description: > + new Number(), new Number(0), new Number(Number.NaN), new + Number(null), new Number(void 0) and others convert to Number by + explicit transformation +---*/ // CHECK#1 if (Number(new Number()) !== 0) { @@ -123,4 +125,3 @@ var myobj5 = { if (isNaN(Number(myobj5)) !== true){ $ERROR("#15: Number(myobj5) calls ToPrimitive with hint Number. Exptected: Not-a-Number. Actual: " + (Number(myobj5))); } - diff --git a/test/suite/ch09/9.3/S9.3_A5_T2.js b/test/suite/ch09/9.3/S9.3_A5_T2.js index b4ebb54222..b0133208a2 100644 --- a/test/suite/ch09/9.3/S9.3_A5_T2.js +++ b/test/suite/ch09/9.3/S9.3_A5_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of number conversion from object value is the result - * of conversion from primitive value - * - * @path ch09/9.3/S9.3_A5_T2.js - * @description new Number(), new Number(0), new Number(Number.NaN), new Number(null), - * new Number(void 0) and others convert to Number by implicit transformation - */ +/*--- +info: > + Result of number conversion from object value is the result + of conversion from primitive value +es5id: 9.3_A5_T2 +description: > + new Number(), new Number(0), new Number(Number.NaN), new + Number(null), new Number(void 0) and others convert to Number by + implicit transformation +---*/ // CHECK#1 if (+(new Number()) !== 0) { @@ -123,4 +125,3 @@ var myobj5 = { if (isNaN(+(myobj5)) !== true){ $ERROR("#15: +(myobj5) calls ToPrimitive with hint +. Exptected: 12345. Actual: " + (+(myobj5))); } - diff --git a/test/suite/ch09/9.4/S9.4_A1.js b/test/suite/ch09/9.4/S9.4_A1.js index 6c1b354c43..eca4d2b87d 100644 --- a/test/suite/ch09/9.4/S9.4_A1.js +++ b/test/suite/ch09/9.4/S9.4_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToNumber(value) is NaN, ToInteger(value) returns +0 - * - * @path ch09/9.4/S9.4_A1.js - * @description Check what position is defined by Number.NaN in string "abc": "abc".charAt(Number.NaN) - */ +/*--- +info: If ToNumber(value) is NaN, ToInteger(value) returns +0 +es5id: 9.4_A1 +description: > + Check what position is defined by Number.NaN in string "abc": + "abc".charAt(Number.NaN) +---*/ // CHECK#1 if ("abc".charAt(Number.NaN) !== "a") { @@ -17,4 +18,3 @@ if ("abc".charAt(Number.NaN) !== "a") { if ("abc".charAt("x") !== "a") { $ERROR('#2: "abc".charAt("x") === "a". Actual: ' + ("abc".charAt("x"))); } - diff --git a/test/suite/ch09/9.4/S9.4_A2.js b/test/suite/ch09/9.4/S9.4_A2.js index 6b0ac54ac8..8d6aa662e6 100644 --- a/test/suite/ch09/9.4/S9.4_A2.js +++ b/test/suite/ch09/9.4/S9.4_A2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToNumber(value) is +0, -0, +Infinity, or -Infinity, - * return ToNumber(value) - * - * @path ch09/9.4/S9.4_A2.js - * @description Check what position is defined by Number.NaN in string "abc": "abc".charAt(Number.NaN) - */ +/*--- +info: > + If ToNumber(value) is +0, -0, +Infinity, or -Infinity, + return ToNumber(value) +es5id: 9.4_A2 +description: > + Check what position is defined by Number.NaN in string "abc": + "abc".charAt(Number.NaN) +---*/ // CHECK#1 if ("abc".charAt(0.0) !== "a") { @@ -18,4 +20,3 @@ if ("abc".charAt(0.0) !== "a") { if ("abc".charAt(-0.0) !== "a") { $ERROR('#2: "abc".charAt(-0.0) === "a". Actual: ' + ("abc".charAt(-0.0))); } - diff --git a/test/suite/ch09/9.4/S9.4_A3_T1.js b/test/suite/ch09/9.4/S9.4_A3_T1.js index d16c30b38b..b0e2a5a1b3 100644 --- a/test/suite/ch09/9.4/S9.4_A3_T1.js +++ b/test/suite/ch09/9.4/S9.4_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToInteger(value) conversion is the result of computing - * sign(ToNumber(value)) * floor(abs(ToNumber(value))) - * - * @path ch09/9.4/S9.4_A3_T1.js - * @description For testing constructor Date(Number) is used - */ +/*--- +info: > + Result of ToInteger(value) conversion is the result of computing + sign(ToNumber(value)) * floor(abs(ToNumber(value))) +es5id: 9.4_A3_T1 +description: For testing constructor Date(Number) is used +---*/ // CHECK#1 var d1 = new Date(6.54321); @@ -80,4 +80,3 @@ var d12 = new Date(-1.23e-15); if (d12.valueOf() !== -0) { $ERROR('#12: var d12 = new Date(-1.23e-15); d12.valueOf() === -0;'); } - diff --git a/test/suite/ch09/9.4/S9.4_A3_T2.js b/test/suite/ch09/9.4/S9.4_A3_T2.js index f3a9796e8f..3d9d34efb4 100644 --- a/test/suite/ch09/9.4/S9.4_A3_T2.js +++ b/test/suite/ch09/9.4/S9.4_A3_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToInteger(value) conversion is the result of computing - * sign(ToNumber(value)) * floor(abs(ToNumber(value))) - * - * @path ch09/9.4/S9.4_A3_T2.js - * @description For testing constructor Date(NaN, Infinity, Infinity, +0 and -0) is used - */ +/*--- +info: > + Result of ToInteger(value) conversion is the result of computing + sign(ToNumber(value)) * floor(abs(ToNumber(value))) +es5id: 9.4_A3_T2 +description: > + For testing constructor Date(NaN, Infinity, Infinity, +0 and -0) + is used +---*/ // CHECK#1 var d1 = new Date(Number.NaN); @@ -38,4 +40,3 @@ var d5 = new Date(-0); if (d5.valueOf() !== -0) { $ERROR('#5: var d5 = new Date(-0); d5.valueOf() === -0;'); } - diff --git a/test/suite/ch09/9.5/S9.5_A1_T1.js b/test/suite/ch09/9.5/S9.5_A1_T1.js index 76296a3a98..d81579265c 100644 --- a/test/suite/ch09/9.5/S9.5_A1_T1.js +++ b/test/suite/ch09/9.5/S9.5_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If value is NaN, +0, -0, +Infinity, or -Infinity, return +0 - * - * @path ch09/9.5/S9.5_A1_T1.js - * @description For testing use operator <<0 - */ +/*--- +info: If value is NaN, +0, -0, +Infinity, or -Infinity, return +0 +es5id: 9.5_A1_T1 +description: For testing use operator <<0 +---*/ // CHECK#1 if ((Number.NaN << 0) !== +0) { @@ -49,4 +48,3 @@ if ((Number.NEGATIVE_INFINITY << 0) !== +0) { } else if (1/(Number.NEGATIVE_INFINITY << 0) !== Number.POSITIVE_INFINITY) { $ERROR("#6.2: (Number.NEGATIVE_INFINITY << 0) === +0. Actual: -0"); } - diff --git a/test/suite/ch09/9.5/S9.5_A2.1_T1.js b/test/suite/ch09/9.5/S9.5_A2.1_T1.js index 943425e85f..851031fd7f 100644 --- a/test/suite/ch09/9.5/S9.5_A2.1_T1.js +++ b/test/suite/ch09/9.5/S9.5_A2.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToInt32 returns values between -2^31 and 2^31-1 - * - * @path ch09/9.5/S9.5_A2.1_T1.js - * @description Converting some numbers, which are in\outside of Int32 scopes, with <<0 operator - */ +/*--- +info: ToInt32 returns values between -2^31 and 2^31-1 +es5id: 9.5_A2.1_T1 +description: > + Converting some numbers, which are in\outside of Int32 scopes, + with <<0 operator +---*/ // CHECK#1 if ((-2147483647 << 0) !== -2147483647) { @@ -47,4 +48,3 @@ if ((2147483648 << 0) !== -2147483648) { if ((4294967296 << 0) !== 0) { $ERROR('#8: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0))); } - diff --git a/test/suite/ch09/9.5/S9.5_A2.1_T2.js b/test/suite/ch09/9.5/S9.5_A2.1_T2.js index 9037035c89..5473a225e2 100644 --- a/test/suite/ch09/9.5/S9.5_A2.1_T2.js +++ b/test/suite/ch09/9.5/S9.5_A2.1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToInt32 returns values between -2^31 and 2^31-1 - * - * @path ch09/9.5/S9.5_A2.1_T2.js - * @description Converting some numbers, which are in\outside of Int32 scopes, with ~ operator - */ +/*--- +info: ToInt32 returns values between -2^31 and 2^31-1 +es5id: 9.5_A2.1_T2 +description: > + Converting some numbers, which are in\outside of Int32 scopes, + with ~ operator +---*/ // CHECK#1 if (~-2147483649 !== ~2147483647) { @@ -27,4 +28,3 @@ if (~2147483648 !== ~-2147483648) { if (~4294967296 !== ~0) { $ERROR('#4: ~4294967296 === ~0'); } - diff --git a/test/suite/ch09/9.5/S9.5_A2.2_T1.js b/test/suite/ch09/9.5/S9.5_A2.2_T1.js index e8c4544985..6dc1867b70 100644 --- a/test/suite/ch09/9.5/S9.5_A2.2_T1.js +++ b/test/suite/ch09/9.5/S9.5_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute result modulo 2^32 - * - * @path ch09/9.5/S9.5_A2.2_T1.js - * @description Use operator <<0 - */ +/*--- +info: Compute result modulo 2^32 +es5id: 9.5_A2.2_T1 +description: Use operator <<0 +---*/ // CHECK#1 if ((-2147483647 << 0) !== -2147483647) { @@ -67,4 +66,3 @@ if ((8589934592 << 0) !== 0) { if ((8589934593 << 0) !== 1) { $ERROR('#12: (8589934593 << 0) === 1. Actual: ' + ((8589934593 << 0))); } - diff --git a/test/suite/ch09/9.5/S9.5_A2.2_T2.js b/test/suite/ch09/9.5/S9.5_A2.2_T2.js index a138d03d76..03ca6f58c9 100644 --- a/test/suite/ch09/9.5/S9.5_A2.2_T2.js +++ b/test/suite/ch09/9.5/S9.5_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute result modulo 2^32 - * - * @path ch09/9.5/S9.5_A2.2_T2.js - * @description Use operator ~ - */ +/*--- +info: Compute result modulo 2^32 +es5id: 9.5_A2.2_T2 +description: Use operator ~ +---*/ // CHECK#1 if (~-2147483647 !== 2147483646) { @@ -67,4 +66,3 @@ if ((~8589934592 << 0) !== ~0) { if ((~8589934593 << 0) !== ~1) { $ERROR('#12: (~8589934593 << 0) === ~1)'); } - diff --git a/test/suite/ch09/9.5/S9.5_A2.3_T1.js b/test/suite/ch09/9.5/S9.5_A2.3_T1.js index af0e3702ee..22287622d3 100644 --- a/test/suite/ch09/9.5/S9.5_A2.3_T1.js +++ b/test/suite/ch09/9.5/S9.5_A2.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If result is greater than or equal to 2^31, return result -2^32 - * - * @path ch09/9.5/S9.5_A2.3_T1.js - * @description Use operator <<0 - */ +/*--- +info: If result is greater than or equal to 2^31, return result -2^32 +es5id: 9.5_A2.3_T1 +description: Use operator <<0 +---*/ // CHECK#1 if ((2147483647 << 0) !== 2147483647) { @@ -37,6 +36,3 @@ if ((4294967296 << 0) !== 0) { if ((4294967297 << 0) !== 1) { $ERROR('#6: (4294967297 << 0) === 1. Actual: ' + ((4294967297 << 0))); } - - - diff --git a/test/suite/ch09/9.5/S9.5_A2.3_T2.js b/test/suite/ch09/9.5/S9.5_A2.3_T2.js index 70c23270b2..4573628b07 100644 --- a/test/suite/ch09/9.5/S9.5_A2.3_T2.js +++ b/test/suite/ch09/9.5/S9.5_A2.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If result is greater than or equal to 2^31, return result -2^32 - * - * @path ch09/9.5/S9.5_A2.3_T2.js - * @description Use operator ~ - */ +/*--- +info: If result is greater than or equal to 2^31, return result -2^32 +es5id: 9.5_A2.3_T2 +description: Use operator ~ +---*/ // CHECK#1 if (~2147483647 !== -2147483648) { @@ -37,4 +36,3 @@ if (~4294967296 !== ~0) { if (~4294967297 !== ~1) { $ERROR('#6: ~4294967297 ==== ~1)'); } - diff --git a/test/suite/ch09/9.5/S9.5_A3.1_T1.js b/test/suite/ch09/9.5/S9.5_A3.1_T1.js index ea9cc20482..54fb67574b 100644 --- a/test/suite/ch09/9.5/S9.5_A3.1_T1.js +++ b/test/suite/ch09/9.5/S9.5_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.5/S9.5_A3.1_T1.js - * @description Type(x) is Boolean - */ +/*--- +info: Operator uses ToNumber +es5id: 9.5_A3.1_T1 +description: Type(x) is Boolean +---*/ // CHECK#1 if ((new Boolean(true) << 0) !== 1) { @@ -17,4 +16,3 @@ if ((new Boolean(true) << 0) !== 1) { if ((false << 0) !== 0) { $ERROR('#2: (false << 0) === 0. Actual: ' + ((false << 0))); } - diff --git a/test/suite/ch09/9.5/S9.5_A3.1_T2.js b/test/suite/ch09/9.5/S9.5_A3.1_T2.js index 0a8769ba8c..0711a1d689 100644 --- a/test/suite/ch09/9.5/S9.5_A3.1_T2.js +++ b/test/suite/ch09/9.5/S9.5_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.5/S9.5_A3.1_T2.js - * @description Type(x) is Number - */ +/*--- +info: Operator uses ToNumber +es5id: 9.5_A3.1_T2 +description: Type(x) is Number +---*/ // CHECK#1 if ((new Number(1) << 0) !== 1) { @@ -17,4 +16,3 @@ if ((new Number(1) << 0) !== 1) { if ((-1.234 << 0) !== -1) { $ERROR('#2: (-1.234 << 0) === -1. Actual: ' + ((-1.234 << 0))); } - diff --git a/test/suite/ch09/9.5/S9.5_A3.1_T3.js b/test/suite/ch09/9.5/S9.5_A3.1_T3.js index 5886b0dafd..2d508208fc 100644 --- a/test/suite/ch09/9.5/S9.5_A3.1_T3.js +++ b/test/suite/ch09/9.5/S9.5_A3.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.5/S9.5_A3.1_T3.js - * @description Type(x) is String - */ +/*--- +info: Operator uses ToNumber +es5id: 9.5_A3.1_T3 +description: Type(x) is String +---*/ // CHECK#1 if ((new String(1) << 0) !== 1) { @@ -17,4 +16,3 @@ if ((new String(1) << 0) !== 1) { if (("-1.234" << 0) !== -1) { $ERROR('#2: ("-1.234" << 0) === -1. Actual: ' + (("-1.234" << 0))); } - diff --git a/test/suite/ch09/9.5/S9.5_A3.1_T4.js b/test/suite/ch09/9.5/S9.5_A3.1_T4.js index a4a701fc54..862c51935d 100644 --- a/test/suite/ch09/9.5/S9.5_A3.1_T4.js +++ b/test/suite/ch09/9.5/S9.5_A3.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.5/S9.5_A3.1_T4.js - * @description Type(x) is Object - */ +/*--- +info: Operator uses ToNumber +es5id: 9.5_A3.1_T4 +description: Type(x) is Object +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch09/9.5/S9.5_A3.2_T1.js b/test/suite/ch09/9.5/S9.5_A3.2_T1.js index 6a53855b4b..6a90cc7e14 100644 --- a/test/suite/ch09/9.5/S9.5_A3.2_T1.js +++ b/test/suite/ch09/9.5/S9.5_A3.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses floor, abs - * - * @path ch09/9.5/S9.5_A3.2_T1.js - * @description Use operator <<0 - */ +/*--- +info: Operator uses floor, abs +es5id: 9.5_A3.2_T1 +description: Use operator <<0 +---*/ // CHECK#1 if ((1.2345 << 0) !== 1) { @@ -17,4 +16,3 @@ if ((1.2345 << 0) !== 1) { if ((-5.4321 << 0) !== -5) { $ERROR('#2: (-5.4321 << 0) === -5. Actual: ' + ((-5.4321 << 0))); } - diff --git a/test/suite/ch09/9.5/S9.5_A3.2_T2.js b/test/suite/ch09/9.5/S9.5_A3.2_T2.js index 47838f6a15..f8f2209e3d 100644 --- a/test/suite/ch09/9.5/S9.5_A3.2_T2.js +++ b/test/suite/ch09/9.5/S9.5_A3.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses floor, abs - * - * @path ch09/9.5/S9.5_A3.2_T2.js - * @description Use operator ~ - */ +/*--- +info: Operator uses floor, abs +es5id: 9.5_A3.2_T2 +description: Use operator ~ +---*/ // CHECK#1 if (~1.2345 !== ~1) { @@ -17,4 +16,3 @@ if (~1.2345 !== ~1) { if (~-5.4321 !== ~-5) { $ERROR('#2: ~-5.4321 === ~-5)'); } - diff --git a/test/suite/ch09/9.6/S9.6_A1.js b/test/suite/ch09/9.6/S9.6_A1.js index 6e370541b1..036992f497 100644 --- a/test/suite/ch09/9.6/S9.6_A1.js +++ b/test/suite/ch09/9.6/S9.6_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If value is NaN, +0, -0, +Infinity, or -Infinity, return +0 - * - * @path ch09/9.6/S9.6_A1.js - * @description For testing use operator >>>0 - */ +/*--- +info: If value is NaN, +0, -0, +Infinity, or -Infinity, return +0 +es5id: 9.6_A1 +description: For testing use operator >>>0 +---*/ // CHECK#1 if ((Number.NaN >>> 0) !== +0) { @@ -49,6 +48,3 @@ if ((Number.NEGATIVE_INFINITY >>> 0) !== +0) { } else if (1/(Number.NEGATIVE_INFINITY >>> 0) !== Number.POSITIVE_INFINITY) { $ERROR("#6.2: (Number.NEGATIVE_INFINITY >>> 0) === +0. Actual: -0"); } - - - diff --git a/test/suite/ch09/9.6/S9.6_A2.1.js b/test/suite/ch09/9.6/S9.6_A2.1.js index cc2f38c85b..7e0daa908a 100644 --- a/test/suite/ch09/9.6/S9.6_A2.1.js +++ b/test/suite/ch09/9.6/S9.6_A2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToUint32 returns values between 0 and 2^32-1 - * - * @path ch09/9.6/S9.6_A2.1.js - * @description Converting numbers, which are in\outside of Uint32 scopes, with >>>0 operator - */ +/*--- +info: ToUint32 returns values between 0 and 2^32-1 +es5id: 9.6_A2.1 +description: > + Converting numbers, which are in\outside of Uint32 scopes, with + >>>0 operator +---*/ // CHECK#1 if ((0 >>> 0) !== 0) { @@ -37,4 +38,3 @@ if ((4294967294 >>> 0) !== 4294967294) { if ((4294967296 >>> 0) !== 0) { $ERROR('#6: (4294967296 >>> 0) === 0. Actual: ' + ((4294967296 >>> 0))); } - diff --git a/test/suite/ch09/9.6/S9.6_A2.2.js b/test/suite/ch09/9.6/S9.6_A2.2.js index 7438cbe958..bd3baa4061 100644 --- a/test/suite/ch09/9.6/S9.6_A2.2.js +++ b/test/suite/ch09/9.6/S9.6_A2.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute result modulo 2^32 - * - * @path ch09/9.6/S9.6_A2.2.js - * @description Use operator >>>0 - */ +/*--- +info: Compute result modulo 2^32 +es5id: 9.6_A2.2 +description: Use operator >>>0 +---*/ // CHECK#1 if ((-2147483647 >>> 0) !== 2147483649) { @@ -67,4 +66,3 @@ if ((8589934592 >>> 0) !== 0) { if ((8589934593 >>> 0) !== 1) { $ERROR('#12: (8589934593 >>> 0) === 1. Actual: ' + ((8589934593 >>> 0))); } - diff --git a/test/suite/ch09/9.6/S9.6_A3.1_T1.js b/test/suite/ch09/9.6/S9.6_A3.1_T1.js index d73f715b9a..91fb291151 100644 --- a/test/suite/ch09/9.6/S9.6_A3.1_T1.js +++ b/test/suite/ch09/9.6/S9.6_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.6/S9.6_A3.1_T1.js - * @description Type(x) is Boolean - */ +/*--- +info: Operator uses ToNumber +es5id: 9.6_A3.1_T1 +description: Type(x) is Boolean +---*/ // CHECK#1 if ((new Boolean(true) >>> 0) !== 1) { @@ -17,4 +16,3 @@ if ((new Boolean(true) >>> 0) !== 1) { if ((false >>> 0) !== 0) { $ERROR('#2: (false >>> 0) === 0. Actual: ' + ((false >>> 0))); } - diff --git a/test/suite/ch09/9.6/S9.6_A3.1_T2.js b/test/suite/ch09/9.6/S9.6_A3.1_T2.js index 5e99b13b31..325e5b349f 100644 --- a/test/suite/ch09/9.6/S9.6_A3.1_T2.js +++ b/test/suite/ch09/9.6/S9.6_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.6/S9.6_A3.1_T2.js - * @description Type(x) is Number - */ +/*--- +info: Operator uses ToNumber +es5id: 9.6_A3.1_T2 +description: Type(x) is Number +---*/ // CHECK#1 if ((new Number(1) >>> 0) !== 1) { @@ -17,4 +16,3 @@ if ((new Number(1) >>> 0) !== 1) { if ((-1.234 >>> 0) !== 4294967295) { $ERROR('#2: (-1.234 >>> 0) === 4294967295. Actual: ' + ((-1.234 >>> 0))); } - diff --git a/test/suite/ch09/9.6/S9.6_A3.1_T3.js b/test/suite/ch09/9.6/S9.6_A3.1_T3.js index 480ffd0cc2..1f0e12339e 100644 --- a/test/suite/ch09/9.6/S9.6_A3.1_T3.js +++ b/test/suite/ch09/9.6/S9.6_A3.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.6/S9.6_A3.1_T3.js - * @description Type(x) is String - */ +/*--- +info: Operator uses ToNumber +es5id: 9.6_A3.1_T3 +description: Type(x) is String +---*/ // CHECK#1 if ((new String(1) >>> 0) !== 1) { @@ -17,4 +16,3 @@ if ((new String(1) >>> 0) !== 1) { if (("-1.234" >>> 0) !== 4294967295) { $ERROR('#2: ("-1.234" >>> 0) === 4294967295. Actual: ' + (("-1.234" >>> 0))); } - diff --git a/test/suite/ch09/9.6/S9.6_A3.1_T4.js b/test/suite/ch09/9.6/S9.6_A3.1_T4.js index 65381fd0d7..35b3b5a7ac 100644 --- a/test/suite/ch09/9.6/S9.6_A3.1_T4.js +++ b/test/suite/ch09/9.6/S9.6_A3.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.6/S9.6_A3.1_T4.js - * @description Type(x) is Object - */ +/*--- +info: Operator uses ToNumber +es5id: 9.6_A3.1_T4 +description: Type(x) is Object +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch09/9.6/S9.6_A3.2_T1.js b/test/suite/ch09/9.6/S9.6_A3.2_T1.js index 87d0b2a846..28527da528 100644 --- a/test/suite/ch09/9.6/S9.6_A3.2_T1.js +++ b/test/suite/ch09/9.6/S9.6_A3.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses floor, abs - * - * @path ch09/9.6/S9.6_A3.2_T1.js - * @description Use operator >>>0 - */ +/*--- +info: Operator uses floor, abs +es5id: 9.6_A3.2_T1 +description: Use operator >>>0 +---*/ // CHECK#1 if ((1.2345 >>> 0) !== 1) { @@ -17,4 +16,3 @@ if ((1.2345 >>> 0) !== 1) { if ((-5.4321 >>> 0) !== 4294967291) { $ERROR('#2: (-5.4321 >>> 0) === 4294967291. Actual: ' + ((-5.4321 >>> 0))); } - diff --git a/test/suite/ch09/9.7/S9.7_A1.js b/test/suite/ch09/9.7/S9.7_A1.js index 443711768e..513c563a5a 100644 --- a/test/suite/ch09/9.7/S9.7_A1.js +++ b/test/suite/ch09/9.7/S9.7_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If value is NaN, +0, -0, +Infinity, or -Infinity, return +0 - * - * @path ch09/9.7/S9.7_A1.js - * @description For testing use String.fromCharCode(Number).charCodeAt(0) construction - */ +/*--- +info: If value is NaN, +0, -0, +Infinity, or -Infinity, return +0 +es5id: 9.7_A1 +description: > + For testing use String.fromCharCode(Number).charCodeAt(0) + construction +---*/ // CHECK#1 if (String.fromCharCode(Number.NaN).charCodeAt(0) !== +0) { @@ -49,6 +50,3 @@ if (String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== +0) { } else if (1/String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) { $ERROR("#6.2: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0. Actual: -0"); } - - - diff --git a/test/suite/ch09/9.7/S9.7_A2.1.js b/test/suite/ch09/9.7/S9.7_A2.1.js index 5073f9c873..61604a1f85 100644 --- a/test/suite/ch09/9.7/S9.7_A2.1.js +++ b/test/suite/ch09/9.7/S9.7_A2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToUint16 returns values between 0 and 2^16-1 - * - * @path ch09/9.7/S9.7_A2.1.js - * @description Converting numbers, which are in\outside of Uint16 scopes, with String.fromCharCode(Number).charCodeAt(0) construction - */ +/*--- +info: ToUint16 returns values between 0 and 2^16-1 +es5id: 9.7_A2.1 +description: > + Converting numbers, which are in\outside of Uint16 scopes, with + String.fromCharCode(Number).charCodeAt(0) construction +---*/ // CHECK#1 if (String.fromCharCode(0).charCodeAt(0) !== 0) { @@ -52,4 +53,3 @@ if (String.fromCharCode(4294967294).charCodeAt(0) !== 65534) { if (String.fromCharCode(4294967296).charCodeAt(0) !== 0) { $ERROR('#9: String.fromCharCode(4294967296).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(4294967296).charCodeAt(0))); } - diff --git a/test/suite/ch09/9.7/S9.7_A2.2.js b/test/suite/ch09/9.7/S9.7_A2.2.js index d631bd9120..f18c6f64e0 100644 --- a/test/suite/ch09/9.7/S9.7_A2.2.js +++ b/test/suite/ch09/9.7/S9.7_A2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute result modulo 2^16 - * - * @path ch09/9.7/S9.7_A2.2.js - * @description For testing use String.fromCharCode(Number).charCodeAt(0) construction - */ +/*--- +info: Compute result modulo 2^16 +es5id: 9.7_A2.2 +description: > + For testing use String.fromCharCode(Number).charCodeAt(0) + construction +---*/ // CHECK#1 if (String.fromCharCode(-32767).charCodeAt(0) !== 32769) { @@ -67,4 +68,3 @@ if (String.fromCharCode(131072).charCodeAt(0) !== 0) { if (String.fromCharCode(131073).charCodeAt(0) !== 1) { $ERROR('#12: String.fromCharCode(131073).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(131073).charCodeAt(0))); } - diff --git a/test/suite/ch09/9.7/S9.7_A3.1_T1.js b/test/suite/ch09/9.7/S9.7_A3.1_T1.js index 315b133d23..855267eb3a 100644 --- a/test/suite/ch09/9.7/S9.7_A3.1_T1.js +++ b/test/suite/ch09/9.7/S9.7_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.7/S9.7_A3.1_T1.js - * @description Type(x) is Boolean - */ +/*--- +info: Operator uses ToNumber +es5id: 9.7_A3.1_T1 +description: Type(x) is Boolean +---*/ // CHECK#1 if (String.fromCharCode(new Boolean(true)).charCodeAt(0) !== 1) { @@ -17,4 +16,3 @@ if (String.fromCharCode(new Boolean(true)).charCodeAt(0) !== 1) { if (String.fromCharCode(false).charCodeAt(0) !== 0) { $ERROR('#2: String.fromCharCode(false).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(false).charCodeAt(0))); } - diff --git a/test/suite/ch09/9.7/S9.7_A3.1_T2.js b/test/suite/ch09/9.7/S9.7_A3.1_T2.js index 613229333b..37726aea2c 100644 --- a/test/suite/ch09/9.7/S9.7_A3.1_T2.js +++ b/test/suite/ch09/9.7/S9.7_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.7/S9.7_A3.1_T2.js - * @description Type(x) is Number - */ +/*--- +info: Operator uses ToNumber +es5id: 9.7_A3.1_T2 +description: Type(x) is Number +---*/ // CHECK#1 if (String.fromCharCode(new Number(1)).charCodeAt(0) !== 1) { @@ -17,4 +16,3 @@ if (String.fromCharCode(new Number(1)).charCodeAt(0) !== 1) { if (String.fromCharCode(-1.234).charCodeAt(0) !== 65535) { $ERROR('#2: String.fromCharCode(-1.234).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1.234).charCodeAt(0))); } - diff --git a/test/suite/ch09/9.7/S9.7_A3.1_T3.js b/test/suite/ch09/9.7/S9.7_A3.1_T3.js index ff66475cad..3ce9b35c67 100644 --- a/test/suite/ch09/9.7/S9.7_A3.1_T3.js +++ b/test/suite/ch09/9.7/S9.7_A3.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.7/S9.7_A3.1_T3.js - * @description Type(x) is String - */ +/*--- +info: Operator uses ToNumber +es5id: 9.7_A3.1_T3 +description: Type(x) is String +---*/ // CHECK#1 if (String.fromCharCode(new String(1)).charCodeAt(0) !== 1) { @@ -17,4 +16,3 @@ if (String.fromCharCode(new String(1)).charCodeAt(0) !== 1) { if (String.fromCharCode("-1.234").charCodeAt(0) !== 65535) { $ERROR('#2: String.fromCharCode("-1.234").charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode("-1.234").charCodeAt(0))); } - diff --git a/test/suite/ch09/9.7/S9.7_A3.1_T4.js b/test/suite/ch09/9.7/S9.7_A3.1_T4.js index 49627e7599..fd601b4097 100644 --- a/test/suite/ch09/9.7/S9.7_A3.1_T4.js +++ b/test/suite/ch09/9.7/S9.7_A3.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses ToNumber - * - * @path ch09/9.7/S9.7_A3.1_T4.js - * @description Type(x) is Object - */ +/*--- +info: Operator uses ToNumber +es5id: 9.7_A3.1_T4 +description: Type(x) is Object +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch09/9.7/S9.7_A3.2_T1.js b/test/suite/ch09/9.7/S9.7_A3.2_T1.js index b7b6ecbbeb..b76cd72688 100644 --- a/test/suite/ch09/9.7/S9.7_A3.2_T1.js +++ b/test/suite/ch09/9.7/S9.7_A3.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses floor, abs - * - * @path ch09/9.7/S9.7_A3.2_T1.js - * @description For testing use String.fromCharCode(Number).charCodeAt(0) construction - */ +/*--- +info: Operator uses floor, abs +es5id: 9.7_A3.2_T1 +description: > + For testing use String.fromCharCode(Number).charCodeAt(0) + construction +---*/ // CHECK#1 if (String.fromCharCode(1.2345).charCodeAt(0) !== 1) { @@ -17,4 +18,3 @@ if (String.fromCharCode(1.2345).charCodeAt(0) !== 1) { if (String.fromCharCode(-5.4321).charCodeAt(0) !== 65531) { $ERROR('#2: String.fromCharCode(-5.4321).charCodeAt(0) === 65531. Actual: ' + (String.fromCharCode(-5.4321).charCodeAt(0))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A1.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A1.js index b51e4cca17..7e1131cc53 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A1.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If m is NaN, return the string "NaN" - * - * @path ch09/9.8/9.8.1/S9.8.1_A1.js - * @description NaN convert to String by explicit transformation - */ +/*--- +info: If m is NaN, return the string "NaN" +es5id: 9.8.1_A1 +description: NaN convert to String by explicit transformation +---*/ // CHECK#1 if (String(NaN) !== "NaN") { @@ -22,4 +21,3 @@ if (String(Number.NaN) !== "NaN") { if (String(Number("asasa")) !== "NaN") { $ERROR('#3: String(Number("asasa")) === Not-a-Number Actual: ' + (String(Number("asasa")))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A10.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A10.js index 17fa406971..fb299159e7 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A10.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A10.js @@ -1,17 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the string consisting of the most significant - * digit of the decimal representation of s, followed by a decimal point '.', - * followed by the remaining k-1 digits of the decimal representation of s, - * followed by the lowercase character 'e', followed by a plus sign '+' or - * minus sign '-' according to whether n-1 is positive or negative, followed - * by the decimal representation of the integer abs(n-1) (with no leading zeros) - * - * @path ch09/9.8/9.8.1/S9.8.1_A10.js - * @description Various float numbers convert to String by explicit transformation - */ +/*--- +info: > + Return the string consisting of the most significant + digit of the decimal representation of s, followed by a decimal point '.', + followed by the remaining k-1 digits of the decimal representation of s, + followed by the lowercase character 'e', followed by a plus sign '+' or + minus sign '-' according to whether n-1 is positive or negative, followed + by the decimal representation of the integer abs(n-1) (with no leading zeros) +es5id: 9.8.1_A10 +description: Various float numbers convert to String by explicit transformation +---*/ // CHECK#1 if (String(1.2345) !== "1.2345") { @@ -57,4 +57,3 @@ if (String(.0000012345) !== "0.0000012345") { if (String(.00000012345) !== "1.2345e-7") { $ERROR('#9: String(.00000012345) === "1.2345e-7". Actual: ' + (String(.00000012345))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A2.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A2.js index adc8e1f5e3..bf7aed8571 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A2.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If m is +0 or -0, return the string "0" - * - * @path ch09/9.8/9.8.1/S9.8.1_A2.js - * @description +0 and -0 convert to String by explicit transformation - */ +/*--- +info: If m is +0 or -0, return the string "0" +es5id: 9.8.1_A2 +description: +0 and -0 convert to String by explicit transformation +---*/ // CHECK#1 if (String(+0) !== "0") { @@ -17,4 +16,3 @@ if (String(+0) !== "0") { if (String(-0) !== "0") { $ERROR('#2: String(-0) === "0". Actual: ' + (String(-0))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A3.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A3.js index 3945f22797..a15b439334 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A3.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If m is less than zero, return the string concatenation of the - * string "-" and ToString(-m) - * - * @path ch09/9.8/9.8.1/S9.8.1_A3.js - * @description -1234567890 convert to String by explicit transformation - */ +/*--- +info: > + If m is less than zero, return the string concatenation of the + string "-" and ToString(-m) +es5id: 9.8.1_A3 +description: -1234567890 convert to String by explicit transformation +---*/ // CHECK#1 if (String(-1234567890) !== "-1234567890") { @@ -18,4 +18,3 @@ if (String(-1234567890) !== "-1234567890") { if ("-"+String(-(-1234567890)) !== "-1234567890") { $ERROR('#2: "-"+String(-(-1234567890)) === "-1234567890". Actual: ' + ("-"+String(-(-1234567890)))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A4.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A4.js index f71ac7557a..c08239b48e 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A4.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If m is infinity, return the string "Infinity" - * - * @path ch09/9.8/9.8.1/S9.8.1_A4.js - * @description +/-Infinity convert to String by explicit transformation - */ +/*--- +info: If m is infinity, return the string "Infinity" +es5id: 9.8.1_A4 +description: +/-Infinity convert to String by explicit transformation +---*/ // CHECK#1 if (String(Infinity) !== "Infinity") { @@ -27,4 +26,3 @@ if (String(-Infinity) !== "-Infinity") { if (String(Number.NEGATIVE_INFINITY) !== "-Infinity") { $ERROR('#4: String(Number.NEGATIVE_INFINITY) === "-Infinity". Actual: ' + (String(Number.NEGATIVE_INFINITY))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A6.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A6.js index 8b9ddf42e8..1e8b28eb5f 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A6.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A6.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If 1 <= s < 1e21 or -1e21 s < -1, return the string - * consisting of the k digits of the decimal representation of s (in order, - * with no leading zeroes), followed by n-k occurrences of the character '0' - * - * @path ch09/9.8/9.8.1/S9.8.1_A6.js - * @description Various integer numbers convert to String by explicit transformation - */ +/*--- +info: > + If 1 <= s < 1e21 or -1e21 s < -1, return the string + consisting of the k digits of the decimal representation of s (in order, + with no leading zeroes), followed by n-k occurrences of the character '0' +es5id: 9.8.1_A6 +description: > + Various integer numbers convert to String by explicit + transformation +---*/ // CHECK#1 if (String(1) !== "1") { @@ -89,5 +91,3 @@ if (String(1E20) !== "100000000000000000000") { if (String(-1E20) !== "-100000000000000000000") { $ERROR('#15: String(-1E20) === "-100000000000000000000". Actual: ' + (String(-1E20))); } - - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A7.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A7.js index 5ad14c25df..f993e1cc82 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A7.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A7.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If 1 <= s < 1e21 or -1e21 s < -1 and s has a fractional - * component, return the string consisting of the most significant n digits of - * the decimal representation of s, followed by a decimal point '.', - * followed by the remaining k-n digits of the decimal representation of s - * - * @path ch09/9.8/9.8.1/S9.8.1_A7.js - * @description 1.0000001 and -1.0000001 convert to String by explicit transformation - */ +/*--- +info: > + If 1 <= s < 1e21 or -1e21 s < -1 and s has a fractional + component, return the string consisting of the most significant n digits of + the decimal representation of s, followed by a decimal point '.', + followed by the remaining k-n digits of the decimal representation of s +es5id: 9.8.1_A7 +description: > + 1.0000001 and -1.0000001 convert to String by explicit + transformation +---*/ // CHECK#1 if (String(1.0000001) !== "1.0000001") { @@ -20,4 +22,3 @@ if (String(1.0000001) !== "1.0000001") { if (String(-1.0000001) !== "-1.0000001") { $ERROR('#2: String(-1.0000001) === "-1.0000001". Actual: ' + (String(-1.0000001))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A8.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A8.js index 91efe0b52b..d2130c05b5 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A8.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A8.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If 1 > s > -1, and -6 < n <= 0, return the string consisting of the - * character '0', followed by a decimal point '.', followed by -n occurrences - * of the character '0', followed by the k digits of the decimal - * representation of s - * - * @path ch09/9.8/9.8.1/S9.8.1_A8.js - * @description Various float numbers convert to String by explicit transformation - */ +/*--- +info: > + If 1 > s > -1, and -6 < n <= 0, return the string consisting of the + character '0', followed by a decimal point '.', followed by -n occurrences + of the character '0', followed by the k digits of the decimal + representation of s +es5id: 9.8.1_A8 +description: Various float numbers convert to String by explicit transformation +---*/ // CHECK#1 if (String(0.1) !== "0.1") { @@ -50,5 +50,3 @@ if (String(-1e-6) !== "-0.000001") { if (String(-1E-6) !== "-0.000001") { $ERROR('#8: String(-1E-6) === "0.000001". Actual: ' + (String(-1E-6))); } - - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T1.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T1.js index d4614194b8..da882e15e0 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T1.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the string consisting of the single digit of s, - * followed by lowercase character 'e', followed by a plus sign '+' or minus - * sign '-' according to whether n-1 is positive or negative, followed by the - * decimal representation of the integer abs(n-1) (with no leading zeros) - * - * @path ch09/9.8/9.8.1/S9.8.1_A9_T1.js - * @description Various big numbers convert to String by explicit transformation - */ +/*--- +info: > + Return the string consisting of the single digit of s, + followed by lowercase character 'e', followed by a plus sign '+' or minus + sign '-' according to whether n-1 is positive or negative, followed by the + decimal representation of the integer abs(n-1) (with no leading zeros) +es5id: 9.8.1_A9_T1 +description: Various big numbers convert to String by explicit transformation +---*/ // CHECK#1 if (String(1000000000000000000000) !== "1e+21") { @@ -70,4 +70,3 @@ if (String(-1E21) !== "-1e+21") { if (String(-1.0E22) !== "-1e+22") { $ERROR('#12: String(-1.0E22) === "-1e+22". Actual: ' + (String(-1.0E22))); } - diff --git a/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T2.js b/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T2.js index 79ca7873ed..4c7bcd9eb3 100644 --- a/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T2.js +++ b/test/suite/ch09/9.8/9.8.1/S9.8.1_A9_T2.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the string consisting of the single digit of s, - * followed by lowercase character 'e', followed by a plus sign '+' or minus - * sign '-' according to whether n-1 is positive or negative, followed by the - * decimal representation of the integer abs(n-1) (with no leading zeros) - * - * @path ch09/9.8/9.8.1/S9.8.1_A9_T2.js - * @description Various float numbers with many zeros convert to String by explicit transformation - */ +/*--- +info: > + Return the string consisting of the single digit of s, + followed by lowercase character 'e', followed by a plus sign '+' or minus + sign '-' according to whether n-1 is positive or negative, followed by the + decimal representation of the integer abs(n-1) (with no leading zeros) +es5id: 9.8.1_A9_T2 +description: > + Various float numbers with many zeros convert to String by + explicit transformation +---*/ // CHECK#1 if (String(0.0000001) !== "1e-7") { @@ -70,4 +72,3 @@ if (String(-1E-7) !== "-1e-7") { if (String(-1.0E-10) !== "-1e-10") { $ERROR('#12: String(-1.0E-10) === "-1e-10". Actual: ' + (String(-1.0E-10))); } - diff --git a/test/suite/ch09/9.8/S9.8_A1_T1.js b/test/suite/ch09/9.8/S9.8_A1_T1.js index efce3a5468..cfebf9ce14 100644 --- a/test/suite/ch09/9.8/S9.8_A1_T1.js +++ b/test/suite/ch09/9.8/S9.8_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToString conversion from undefined value is "undefined" - * - * @path ch09/9.8/S9.8_A1_T1.js - * @description Undefined values is undefined, void 0 and eval("var x"). Use explicit transformation - */ +/*--- +info: Result of ToString conversion from undefined value is "undefined" +es5id: 9.8_A1_T1 +description: > + Undefined values is undefined, void 0 and eval("var x"). Use + explicit transformation +---*/ // CHECK#1 if (String(undefined) !== "undefined") { @@ -22,4 +23,3 @@ if (String(void 0) !== "undefined") { if (String(eval("var x")) !== "undefined") { $ERROR('#3: String(eval("var x")) === "undefined" . Actual: ' + (String(eval("var x")))); } - diff --git a/test/suite/ch09/9.8/S9.8_A1_T2.js b/test/suite/ch09/9.8/S9.8_A1_T2.js index dd26c11b44..4e54e8c83e 100644 --- a/test/suite/ch09/9.8/S9.8_A1_T2.js +++ b/test/suite/ch09/9.8/S9.8_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToString conversion from undefined value is "undefined" - * - * @path ch09/9.8/S9.8_A1_T2.js - * @description Undefined values is undefined, void 0 and eval("var x"). Use implicit transformation - */ +/*--- +info: Result of ToString conversion from undefined value is "undefined" +es5id: 9.8_A1_T2 +description: > + Undefined values is undefined, void 0 and eval("var x"). Use + implicit transformation +---*/ // CHECK#1 if (undefined + "" !== "undefined") { @@ -22,4 +23,3 @@ if (void 0 + "" !== "undefined") { if (eval("var x") + "" !== "undefined") { $ERROR('#3: eval("var x") + "" === "undefined". Actual: ' + (eval("var x") + "")); } - diff --git a/test/suite/ch09/9.8/S9.8_A2_T1.js b/test/suite/ch09/9.8/S9.8_A2_T1.js index 0a1b982b74..846d1ce46f 100644 --- a/test/suite/ch09/9.8/S9.8_A2_T1.js +++ b/test/suite/ch09/9.8/S9.8_A2_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToString conversion from null value is "null" - * - * @path ch09/9.8/S9.8_A2_T1.js - * @description null convert to String by explicit transformation - */ +/*--- +info: Result of ToString conversion from null value is "null" +es5id: 9.8_A2_T1 +description: null convert to String by explicit transformation +---*/ // CHECK#1 if (String(null) !== "null") { $ERROR('#1: String(null) === "null". Actual: ' + (String(null))); -} - +} diff --git a/test/suite/ch09/9.8/S9.8_A2_T2.js b/test/suite/ch09/9.8/S9.8_A2_T2.js index 3b760909ba..90d8d7b306 100644 --- a/test/suite/ch09/9.8/S9.8_A2_T2.js +++ b/test/suite/ch09/9.8/S9.8_A2_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToString conversion from null value is "null" - * - * @path ch09/9.8/S9.8_A2_T2.js - * @description null convert to String by implicit transformation - */ +/*--- +info: Result of ToString conversion from null value is "null" +es5id: 9.8_A2_T2 +description: null convert to String by implicit transformation +---*/ // CHECK#1 if (null + "" !== "null") { $ERROR('#1: null + "" === "null". Actual: ' + (null + "")); -} - +} diff --git a/test/suite/ch09/9.8/S9.8_A3_T1.js b/test/suite/ch09/9.8/S9.8_A3_T1.js index cc267edc8f..710d7ef4aa 100644 --- a/test/suite/ch09/9.8/S9.8_A3_T1.js +++ b/test/suite/ch09/9.8/S9.8_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToString conversion from boolean value is "true" if - * the argument is "true", else is "false" - * - * @path ch09/9.8/S9.8_A3_T1.js - * @description True and false convert to String by explicit transformation - */ +/*--- +info: > + Result of ToString conversion from boolean value is "true" if + the argument is "true", else is "false" +es5id: 9.8_A3_T1 +description: True and false convert to String by explicit transformation +---*/ // CHECK#1 if (String(false) !== "false") { @@ -18,4 +18,3 @@ if (String(false) !== "false") { if (String(true) !== "true") { $ERROR('#2: String(true) === "true". Actual: ' + (String(true))); } - diff --git a/test/suite/ch09/9.8/S9.8_A3_T2.js b/test/suite/ch09/9.8/S9.8_A3_T2.js index 788bcb58dd..be083ec5bb 100644 --- a/test/suite/ch09/9.8/S9.8_A3_T2.js +++ b/test/suite/ch09/9.8/S9.8_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of ToString conversion from boolean value is "true" if - * the argument is "true", else is "false" - * - * @path ch09/9.8/S9.8_A3_T2.js - * @description True and false convert to String by implicit transformation - */ +/*--- +info: > + Result of ToString conversion from boolean value is "true" if + the argument is "true", else is "false" +es5id: 9.8_A3_T2 +description: True and false convert to String by implicit transformation +---*/ // CHECK#1 if (false + "" !== "false") { @@ -18,4 +18,3 @@ if (false + "" !== "false") { if (true + "" !== "true") { $ERROR('#2: true + "" === "true". Actual: ' + (true + "")); } - diff --git a/test/suite/ch09/9.8/S9.8_A4_T1.js b/test/suite/ch09/9.8/S9.8_A4_T1.js index 0644584614..997b4dfd12 100644 --- a/test/suite/ch09/9.8/S9.8_A4_T1.js +++ b/test/suite/ch09/9.8/S9.8_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of String conversion from string value is the input argument (no conversion) - * - * @path ch09/9.8/S9.8_A4_T1.js - * @description Some strings convert to String with explicit transformation - */ +/*--- +info: > + Result of String conversion from string value is the input argument (no + conversion) +es5id: 9.8_A4_T1 +description: Some strings convert to String with explicit transformation +---*/ // CHECK#1 var x1 = "abc"; @@ -19,4 +20,3 @@ var x2 = "abc"; if (typeof String(x2) !== typeof x2) { $ERROR('#2: typeof String("abc") === "string". Actual: ' + (typeof String("abc"))); } - diff --git a/test/suite/ch09/9.8/S9.8_A4_T2.js b/test/suite/ch09/9.8/S9.8_A4_T2.js index fdde4c38e2..e4fe0f126b 100644 --- a/test/suite/ch09/9.8/S9.8_A4_T2.js +++ b/test/suite/ch09/9.8/S9.8_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of String conversion from string value is the input argument (no conversion) - * - * @path ch09/9.8/S9.8_A4_T2.js - * @description Some strings convert to String by implicit transformation - */ +/*--- +info: > + Result of String conversion from string value is the input argument (no + conversion) +es5id: 9.8_A4_T2 +description: Some strings convert to String by implicit transformation +---*/ // CHECK#1 var x1 = "abc"; @@ -19,4 +20,3 @@ var x2 = "abc"; if (typeof x2 + "" !== typeof x2) { $ERROR('#2: typeof "abc" + "" === "string". Actual: ' + (typeof "abc" + "")); } - diff --git a/test/suite/ch09/9.8/S9.8_A5_T1.js b/test/suite/ch09/9.8/S9.8_A5_T1.js index 55d88c1026..c7e55c818b 100644 --- a/test/suite/ch09/9.8/S9.8_A5_T1.js +++ b/test/suite/ch09/9.8/S9.8_A5_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of String conversion from Object value is conversion - * from primitive value - * - * @path ch09/9.8/S9.8_A5_T1.js - * @description Some objects convert to String by explicit transformation - */ +/*--- +info: > + Result of String conversion from Object value is conversion + from primitive value +es5id: 9.8_A5_T1 +description: Some objects convert to String by explicit transformation +---*/ // CHECK#1 if (String(new Number()) !== "0") { @@ -90,4 +90,3 @@ var myobj3 = { if (String(myobj3) !== "[object Object]"){ $ERROR("#13: String(myobj) calls ToPrimitive with hint String"); } - diff --git a/test/suite/ch09/9.8/S9.8_A5_T2.js b/test/suite/ch09/9.8/S9.8_A5_T2.js index 7911adaee1..880ce20277 100644 --- a/test/suite/ch09/9.8/S9.8_A5_T2.js +++ b/test/suite/ch09/9.8/S9.8_A5_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of String conversion from Object value is conversion - * from primitive value - * - * @path ch09/9.8/S9.8_A5_T2.js - * @description Some objects convert to String by implicit transformation - */ +/*--- +info: > + Result of String conversion from Object value is conversion + from primitive value +es5id: 9.8_A5_T2 +description: Some objects convert to String by implicit transformation +---*/ // CHECK#1 if (new Number() + "" !== "0") { @@ -89,4 +89,3 @@ var myobj3 = { if (myobj3 + "" !== "[object Object]"){ $ERROR('#13: myobj3 + "" calls ToPrimitive with hint Number. Exptected: "[object Object]". Actual: ' + (myobj3 + "")); } - diff --git a/test/suite/ch09/9.9/S9.9_A1.js b/test/suite/ch09/9.9/S9.9_A1.js index a1d36aabd6..4287efd3e3 100644 --- a/test/suite/ch09/9.9/S9.9_A1.js +++ b/test/suite/ch09/9.9/S9.9_A1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToObject conversion from undefined value must throw TypeError - * - * @path ch09/9.9/S9.9_A1.js - * @description Trying to convert undefined to Object - * @noStrict - */ +/*--- +info: ToObject conversion from undefined value must throw TypeError +es5id: 9.9_A1 +description: Trying to convert undefined to Object +flags: [noStrict] +---*/ // CHECK#1 try{ @@ -30,4 +29,3 @@ catch(e){ $ERROR('#2.2: with(undefined) x = 2 must throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch09/9.9/S9.9_A2.js b/test/suite/ch09/9.9/S9.9_A2.js index 42e1980e7f..f62620423a 100644 --- a/test/suite/ch09/9.9/S9.9_A2.js +++ b/test/suite/ch09/9.9/S9.9_A2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToObject conversion from null value must throw TypeError - * - * @path ch09/9.9/S9.9_A2.js - * @description Trying to convert null to Object - * @noStrict - */ +/*--- +info: ToObject conversion from null value must throw TypeError +es5id: 9.9_A2 +description: Trying to convert null to Object +flags: [noStrict] +---*/ // CHECK#1 try{ @@ -30,4 +29,3 @@ catch(e){ $ERROR('#2.2: with(null) x = 2 must throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch09/9.9/S9.9_A3.js b/test/suite/ch09/9.9/S9.9_A3.js index f91cd8e82d..d42e04eab2 100644 --- a/test/suite/ch09/9.9/S9.9_A3.js +++ b/test/suite/ch09/9.9/S9.9_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToObject conversion from Boolean: create a new Boolean object - * whose [[value]] property is set to the value of the boolean - * - * @path ch09/9.9/S9.9_A3.js - * @description Trying to convert from Boolean to Object - */ +/*--- +info: > + ToObject conversion from Boolean: create a new Boolean object + whose [[value]] property is set to the value of the boolean +es5id: 9.9_A3 +description: Trying to convert from Boolean to Object +---*/ // CHECK#1 if (Object(true).valueOf() !== true){ @@ -38,4 +38,3 @@ if (typeof Object(false) !== "object"){ if (Object(false).constructor.prototype !== Boolean.prototype){ $ERROR('#6: Object(false).constructor.prototype === Boolean.prototype. Actual: ' + (Object(false).constructor.prototype)); } - diff --git a/test/suite/ch09/9.9/S9.9_A4.js b/test/suite/ch09/9.9/S9.9_A4.js index 2f08bf52cd..673b8900bc 100644 --- a/test/suite/ch09/9.9/S9.9_A4.js +++ b/test/suite/ch09/9.9/S9.9_A4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToObject conversion from Number: create a new Number object - * whose [[value]] property is set to the value of the number - * - * @path ch09/9.9/S9.9_A4.js - * @description Converting from various numbers to Object - */ +/*--- +info: > + ToObject conversion from Number: create a new Number object + whose [[value]] property is set to the value of the number +es5id: 9.9_A4 +description: Converting from various numbers to Object +---*/ // CHECK#1 if (Object(0).valueOf() !== 0){ @@ -175,4 +175,3 @@ if (typeof Object(-1.2345) !== "object"){ if (Object(-1.2345).constructor.prototype !== Number.prototype){ $ERROR('#33: Object(-1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(-1.2345).constructor.prototype)); } - diff --git a/test/suite/ch09/9.9/S9.9_A5.js b/test/suite/ch09/9.9/S9.9_A5.js index 2f59c1182a..513c01c03a 100644 --- a/test/suite/ch09/9.9/S9.9_A5.js +++ b/test/suite/ch09/9.9/S9.9_A5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToObject conversion from String: create a new String object - * whose [[value]] property is set to the value of the string - * - * @path ch09/9.9/S9.9_A5.js - * @description Converting from various strings to Object - */ +/*--- +info: > + ToObject conversion from String: create a new String object + whose [[value]] property is set to the value of the string +es5id: 9.9_A5 +description: Converting from various strings to Object +---*/ // CHECK#1 if (Object("some string").valueOf() !== "some string"){ @@ -68,4 +68,3 @@ if (typeof Object(String(10)) !== "object"){ if (Object(String(10)).constructor.prototype !== String.prototype){ $ERROR('#12: Object(String(10)).constructor.prototype === String.prototype. Actual: ' + (Object(String(10)).constructor.prototype)); } - diff --git a/test/suite/ch09/9.9/S9.9_A6.js b/test/suite/ch09/9.9/S9.9_A6.js index a256790162..22b611c938 100644 --- a/test/suite/ch09/9.9/S9.9_A6.js +++ b/test/suite/ch09/9.9/S9.9_A6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToObject conversion from Object: The result is the input - * argument (no conversion) - * - * @path ch09/9.9/S9.9_A6.js - * @description Converting from Objects to Object - */ +/*--- +info: > + ToObject conversion from Object: The result is the input + argument (no conversion) +es5id: 9.9_A6 +description: Converting from Objects to Object +---*/ function MyObject( val ) { this.value = val; @@ -37,4 +37,3 @@ if (y.constructor.prototype !== x.constructor.prototype){ if (y !== x){ $ERROR('#4: Object(obj) === obj'); } - diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-1-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-1-s.js index a9cf025bc8..8b9fc2df73 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-1-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-1-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-1-s.js - * @description Strict Mode - Use Strict Directive Prologue is 'use strict'; which contains two space between 'use' and 'strict' - * @noStrict - */ - - -function testcase() { - "use strict"; - var public = 1; - return public === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-1-s +description: > + Strict Mode - Use Strict Directive Prologue is 'use strict'; + which contains two space between 'use' and 'strict' +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-10-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-10-s.js index 51aa8ca733..51acb49312 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-10-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-10-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-10-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''USE STRICT';' in which all characters are uppercase - * @noStrict - */ - - -function testcase() { - "USE STRICT"; - var public = 1; - return public === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-10-s +description: > + Strict Mode - Use Strict Directive Prologue is ''USE STRICT';' in + which all characters are uppercase +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "USE STRICT"; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-11-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-11-s.js index 6d7794d971..7adb6335ae 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-11-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-11-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-11-s.js - * @description Strict Mode - Eval code is strict code with a Use Strict Directive at the beginning of the block - * @noStrict - */ - - -function testcase() { - try { - eval("'use strict'; var public = 1; var anotherVariableNotReserveWord = 2;"); - - return false; - } catch (e) { - return e instanceof SyntaxError && typeof public === "undefined" && - typeof anotherVariableNotReserveWord === "undefined"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-11-s +description: > + Strict Mode - Eval code is strict code with a Use Strict Directive + at the beginning of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("'use strict'; var public = 1; var anotherVariableNotReserveWord = 2;"); + + return false; + } catch (e) { + return e instanceof SyntaxError && typeof public === "undefined" && + typeof anotherVariableNotReserveWord === "undefined"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-12-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-12-s.js index 09fdffe842..71c087e017 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-12-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-12-s.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-12-s.js - * @description Strict Mode - Eval code is strict eval code with a Use Strict Directive in the middle of the block - * @noStrict - */ - - -function testcase() { - eval("var public = 1; 'use strict'; var anotherVariableNotReserveWord = 2;"); - return public === 1 && anotherVariableNotReserveWord === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-12-s +description: > + Strict Mode - Eval code is strict eval code with a Use Strict + Directive in the middle of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + eval("var public = 1; 'use strict'; var anotherVariableNotReserveWord = 2;"); + return public === 1 && anotherVariableNotReserveWord === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-13-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-13-s.js index 0a4ba30ffb..978e2a6775 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-13-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-13-s.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-13-s.js - * @description Strict Mode - Eval code is strict eval code with a Use Strict Directive at the end of the block - * @noStrict - */ - - -function testcase() { - eval("var public = 1; var anotherVariableNotReserveWord = 2; 'use strict';"); - return public === 1 && anotherVariableNotReserveWord === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-13-s +description: > + Strict Mode - Eval code is strict eval code with a Use Strict + Directive at the end of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + eval("var public = 1; var anotherVariableNotReserveWord = 2; 'use strict';"); + return public === 1 && anotherVariableNotReserveWord === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-14-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-14-s.js index dff4133664..af347a9e88 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-14-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-14-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-14-s.js - * @description Strict Mode - The call to eval function is contained in a Strict Mode block - * @noStrict - */ - - -function testcase() { - 'use strict'; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-14-s +description: > + Strict Mode - The call to eval function is contained in a Strict + Mode block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-15-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-15-s.js index b7f7664f54..1b983c8641 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-15-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-15-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-15-s.js - * @description Strict Mode - Function code that is part of a FunctionDeclaration is strict function code if FunctionDeclaration is contained in use strict - * @noStrict - */ - - -function testcase() { - "use strict"; - function fun() { - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } - - return fun(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-15-s +description: > + Strict Mode - Function code that is part of a FunctionDeclaration + is strict function code if FunctionDeclaration is contained in use + strict +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function fun() { + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } + + return fun(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-16-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-16-s.js index 35ef8803fb..2019680690 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-16-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-16-s.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-16-s.js - * @description Strict Mode - Function code that is part of a FunctionExpression is strict function code if FunctionExpression is contained in use strict - * @noStrict - */ - - -function testcase() { - "use strict"; - return function () { - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } (); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-16-s +description: > + Strict Mode - Function code that is part of a FunctionExpression + is strict function code if FunctionExpression is contained in use + strict +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + return function () { + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } (); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-17-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-17-s.js index 976e644fe1..2458c5cb08 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-17-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-17-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-17-s.js - * @description Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(getter) - * @noStrict - */ - - -function testcase() { - "use strict"; - try { - var obj = {}; - Object.defineProperty(obj, "accProperty", { - get: function () { - eval("public = 1;"); - return 11; - } - }); - - var temp = obj.accProperty === 11; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-17-s +description: > + Strict Mode - Function code that is part of a Accessor + PropertyAssignment is in Strict Mode if Accessor + PropertyAssignment is contained in use strict(getter) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + var obj = {}; + Object.defineProperty(obj, "accProperty", { + get: function () { + eval("public = 1;"); + return 11; + } + }); + + var temp = obj.accProperty === 11; + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-18-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-18-s.js index b384ebfe51..d67d98b112 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-18-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-18-s.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-18-s.js - * @description Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(setter) - * @noStrict - */ - - -function testcase() { - "use strict"; - try { - var obj = {}; - var data = "data"; - Object.defineProperty(obj, "accProperty", { - set: function (value) { - eval("var public = 1;"); - data = value; - } - }); - - obj.accProperty = "overrideData"; - return false; - } catch (e) { - return e instanceof SyntaxError && data === "data"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-18-s +description: > + Strict Mode - Function code that is part of a Accessor + PropertyAssignment is in Strict Mode if Accessor + PropertyAssignment is contained in use strict(setter) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + var obj = {}; + var data = "data"; + Object.defineProperty(obj, "accProperty", { + set: function (value) { + eval("var public = 1;"); + data = value; + } + }); + + obj.accProperty = "overrideData"; + return false; + } catch (e) { + return e instanceof SyntaxError && data === "data"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-19-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-19-s.js index 6643ec7f16..36921780f8 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-19-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-19-s.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-19-s.js - * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the start of the block - * @noStrict - */ - - -function testcase() { - function fun() { - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } - return fun(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-19-s +description: > + Strict Mode - Function code of a FunctionDeclaration contains Use + Strict Directive which appears at the start of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function fun() { + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } + return fun(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-2-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-2-s.js index 42e6bce785..bcc7137845 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-2-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-2-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-2-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' - * @noStrict - */ - - -function testcase() { - "use strict" - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-2-s +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict'' + which lost the last character ';' +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict" + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-20-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-20-s.js index cc30e88e6c..91ba7bae21 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-20-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-20-s.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-20-s.js - * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - function fun() { - eval("var public = 1;"); - "use strict"; - return public === 1; - } - return fun(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-20-s +description: > + Strict Mode - Function code of a FunctionDeclaration contains Use + Strict Directive which appears in the middle of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function fun() { + eval("var public = 1;"); + "use strict"; + return public === 1; + } + return fun(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-21-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-21-s.js index 6c0245461e..fa0c7b788f 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-21-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-21-s.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-21-s.js - * @description Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the end of the block - * @noStrict - */ - - -function testcase() { - function fun() { - eval("var public = 1;"); - return public === 1; - "use strict"; - } - return fun(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-21-s +description: > + Strict Mode - Function code of a FunctionDeclaration contains Use + Strict Directive which appears at the end of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function fun() { + eval("var public = 1;"); + return public === 1; + "use strict"; + } + return fun(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-22-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-22-s.js index 875ad9780c..a22282e49b 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-22-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-22-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-22-s.js - * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the start of the block - * @noStrict - */ - - -function testcase() { - return function () { - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } (); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-22-s +description: > + Strict Mode - Function code of a FunctionExpression contains Use + Strict Directive which appears at the start of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return function () { + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } (); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-23-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-23-s.js index 680e928cd7..5cbc72d7e0 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-23-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-23-s.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-23-s.js - * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - return function () { - eval("var public = 1;"); - return public === 1; - "use strict"; - } (); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-23-s +description: > + Strict Mode - Function code of a FunctionExpression contains Use + Strict Directive which appears in the middle of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return function () { + eval("var public = 1;"); + return public === 1; + "use strict"; + } (); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-24-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-24-s.js index ef67dbe592..f32bce204a 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-24-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-24-s.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-24-s.js - * @description Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the end of the block - * @noStrict - */ - - -function testcase() { - return function () { - eval("var public = 1;"); - "use strict"; - return public === 1; - } (); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-24-s +description: > + Strict Mode - Function code of a FunctionExpression contains Use + Strict Directive which appears at the end of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return function () { + eval("var public = 1;"); + "use strict"; + return public === 1; + } (); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-25-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-25-s.js index 206518f72b..1915bab574 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-25-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-25-s.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-25-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(getter) - * @noStrict - */ - - -function testcase() { - try { - var obj = {}; - Object.defineProperty(obj, "accProperty", { - get: function () { - "use strict"; - eval("var public = 1;"); - return 11; - } - }); - var temp = obj.accProperty === 11; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-25-s +description: > + Strict Mode - Function code of Accessor PropertyAssignment + contains Use Strict Directive which appears at the start of the + block(getter) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var obj = {}; + Object.defineProperty(obj, "accProperty", { + get: function () { + "use strict"; + eval("var public = 1;"); + return 11; + } + }); + var temp = obj.accProperty === 11; + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-26-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-26-s.js index 9da18136bb..af3773045e 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-26-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-26-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-26-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(setter) - * @noStrict - */ - - -function testcase() { - try { - var obj = {}; - var data = "data"; - Object.defineProperty(obj, "accProperty", { - set: function (value) { - "use strict"; - eval("var public = 1;"); - data = value; - } - }); - - obj.accProperty = "overrideData"; - - return false; - } catch (e) { - return e instanceof SyntaxError && data === "data"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-26-s +description: > + Strict Mode - Function code of Accessor PropertyAssignment + contains Use Strict Directive which appears at the start of the + block(setter) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var obj = {}; + var data = "data"; + Object.defineProperty(obj, "accProperty", { + set: function (value) { + "use strict"; + eval("var public = 1;"); + data = value; + } + }); + + obj.accProperty = "overrideData"; + + return false; + } catch (e) { + return e instanceof SyntaxError && data === "data"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-27-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-27-s.js index 94b01f5af8..c87b69bc93 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-27-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-27-s.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-27-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears in the middle of the block(getter) - * @noStrict - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "accProperty", { - get: function () { - eval("public = 1;"); - "use strict"; - return 11; - } - }); - return obj.accProperty === 11 && public === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-27-s +description: > + Strict Mode - Function code of Accessor PropertyAssignment + contains Use Strict Directive which appears in the middle of the + block(getter) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "accProperty", { + get: function () { + eval("public = 1;"); + "use strict"; + return 11; + } + }); + return obj.accProperty === 11 && public === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-28-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-28-s.js index f3ebe7d11e..f4934145c4 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-28-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-28-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-28-s.js - * @description Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the end of the block(setter) - * @noStrict - */ - - -function testcase() { - var obj = {}; - var data; - - Object.defineProperty(obj, "accProperty", { - set: function (value) { - var _10_1_1_28_s = {a:1, a:2}; - data = value; - "use strict"; - } - }); - obj.accProperty = "overrideData"; - return data==="overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-28-s +description: > + Strict Mode - Function code of Accessor PropertyAssignment + contains Use Strict Directive which appears at the end of the + block(setter) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data; + + Object.defineProperty(obj, "accProperty", { + set: function (value) { + var _10_1_1_28_s = {a:1, a:2}; + data = value; + "use strict"; + } + }); + obj.accProperty = "overrideData"; + return data==="overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-29-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-29-s.js index 9745777b18..9a33001e16 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-29-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-29-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-29-s.js - * @description Strict Mode - The built-in Function constructor is contained in use strict code - * @noStrict - */ - - -function testcase() { - "use strict"; - var funObj = new Function("a", "eval('public = 1;');"); - funObj(); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-29-s +description: > + Strict Mode - The built-in Function constructor is contained in + use strict code +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var funObj = new Function("a", "eval('public = 1;');"); + funObj(); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-2gs.js b/test/suite/ch10/10.1/10.1.1/10.1.1-2gs.js index dd30cb215f..0c2dbe840e 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-2gs.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-2gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.1/10.1.1/10.1.1-2gs.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';' - * @noStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict" -throw NotEarlyError; -var public = 1; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-2gs +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict'' + which lost the last character ';' +negative: ^((?!NotEarlyError).)*$ +flags: [noStrict] +---*/ + +"use strict" +throw NotEarlyError; +var public = 1; diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-3-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-3-s.js index 8c4e4fb5d4..0365d8c0ba 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-3-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-3-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-3-s.js - * @description Strict Mode - Use Strict Directive Prologue is '' use strict';' which the first character is space - * @noStrict - */ - - -function testcase() { - " use strict"; - var public = 1; - - return public === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-3-s +description: > + Strict Mode - Use Strict Directive Prologue is '' use strict';' + which the first character is space +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + " use strict"; + var public = 1; + + return public === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-30-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-30-s.js index 79c68e7c23..c85a46fcf7 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-30-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-30-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-30-s.js - * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the start of the block - * @noStrict - */ - - -function testcase() { - try { - var funObj = new Function("a", "'use strict'; eval('public = 1;');"); - funObj(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-30-s +description: > + Strict Mode - Function code of built-in Function constructor + contains Use Strict Directive which appears at the start of the + block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var funObj = new Function("a", "'use strict'; eval('public = 1;');"); + funObj(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-31-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-31-s.js index 21c84976bc..f3fe6952c8 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-31-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-31-s.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-31-s.js - * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - var funObj = new Function("a", "eval('public = 1;'); 'use strict'; anotherVariable = 2;"); - funObj(); - return public === 1 && anotherVariable === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-31-s +description: > + Strict Mode - Function code of built-in Function constructor + contains Use Strict Directive which appears in the middle of the + block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = new Function("a", "eval('public = 1;'); 'use strict'; anotherVariable = 2;"); + funObj(); + return public === 1 && anotherVariable === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-32-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-32-s.js index a7cbc1d8c2..25dd59fbf5 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-32-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-32-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-32-s.js - * @description Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the end of the block - * @noStrict - */ - - -function testcase() { - var funObj = new Function("a", "eval('public = 1;'); anotherVariable = 2; 'use strict';"); - funObj(); - return public === 1 && anotherVariable === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-32-s +description: > + Strict Mode - Function code of built-in Function constructor + contains Use Strict Directive which appears at the end of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = new Function("a", "eval('public = 1;'); anotherVariable = 2; 'use strict';"); + funObj(); + return public === 1 && anotherVariable === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-4-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-4-s.js index 3d7db18627..16b4565ba7 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-4-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-4-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-4-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict ';' which the last character is space - * @noStrict - */ - - -function testcase() { - "use strict "; - var public = 1; - return public === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-4-s +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict ';' + which the last character is space +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict "; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-5-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-5-s.js index 6a9f07af47..019342219f 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-5-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-5-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-5-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the beginning of the block - * @noStrict - */ - - -function testcase() { - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-5-s +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict';' + which appears at the beginning of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-5gs.js b/test/suite/ch10/10.1/10.1.1/10.1.1-5gs.js index 63698e5e62..3b0c23dcfc 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-5gs.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-5gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.1/10.1.1/10.1.1-5gs.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the start of the code - * @noStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -var public = 1; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-5gs +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict';' + which appears at the start of the code +negative: ^((?!NotEarlyError).)*$ +flags: [noStrict] +---*/ + +"use strict"; +throw NotEarlyError; +var public = 1; diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-6-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-6-s.js index 6434c25159..8a294e43cb 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-6-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-6-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-6-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears in the middle of the block - * @noStrict - */ - - -function testcase() { - var interface = 2; - "use strict"; - var public = 1; - return public === 1 && interface === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-6-s +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict';' + which appears in the middle of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var interface = 2; + "use strict"; + var public = 1; + return public === 1 && interface === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-7-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-7-s.js index 42b5e1ee20..fe5518a5bd 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-7-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-7-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-7-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the end of the block - * @noStrict - */ - - -function testcase() { - var public = 1; - return public === 1; - "use strict"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-7-s +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict';' + which appears at the end of the block +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var public = 1; + return public === 1; + "use strict"; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-8-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-8-s.js index 3fc4df80e7..8ac369f19e 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-8-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-8-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-8-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the directive prologue - * @noStrict - */ - - -function testcase() { - "use strict"; - "use strict"; - try { - eval("var public = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-8-s +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict';' + which appears twice in the directive prologue +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + "use strict"; + try { + eval("var public = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-8gs.js b/test/suite/ch10/10.1/10.1.1/10.1.1-8gs.js index 88476ac4a7..518b4e9464 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-8gs.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-8gs.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.1/10.1.1/10.1.1-8gs.js - * @description Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the code - * @noStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -"use strict"; -throw NotEarlyError; -var public = 1; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-8gs +description: > + Strict Mode - Use Strict Directive Prologue is ''use strict';' + which appears twice in the code +negative: ^((?!NotEarlyError).)*$ +flags: [noStrict] +---*/ + +"use strict"; +"use strict"; +throw NotEarlyError; +var public = 1; diff --git a/test/suite/ch10/10.1/10.1.1/10.1.1-9-s.js b/test/suite/ch10/10.1/10.1.1/10.1.1-9-s.js index b294ef1467..6e82a4debb 100644 --- a/test/suite/ch10/10.1/10.1.1/10.1.1-9-s.js +++ b/test/suite/ch10/10.1/10.1.1/10.1.1-9-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.1/10.1.1/10.1.1-9-s.js - * @description Strict Mode - Use Strict Directive Prologue is ''Use strict';' in which the first character is uppercase - * @noStrict - */ - - -function testcase() { - "Use strict"; - var public = 1; - return public === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.1.1-9-s +description: > + Strict Mode - Use Strict Directive Prologue is ''Use strict';' in + which the first character is uppercase +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "Use strict"; + var public = 1; + return public === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.1/S10.1.1_A1_T1.js b/test/suite/ch10/10.1/S10.1.1_A1_T1.js index 4085aa5ace..0f58cf9e6e 100644 --- a/test/suite/ch10/10.1/S10.1.1_A1_T1.js +++ b/test/suite/ch10/10.1/S10.1.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Program functions are defined in source text by a FunctionDeclaration or created dynamically either - * by using a FunctionExpression or by using the built-in Function object as a constructor - * - * @path ch10/10.1/S10.1.1_A1_T1.js - * @description Defining function by a FunctionDeclaration - */ +/*--- +info: > + Program functions are defined in source text by a FunctionDeclaration or created dynamically either + by using a FunctionExpression or by using the built-in Function object as a constructor +es5id: 10.1.1_A1_T1 +description: Defining function by a FunctionDeclaration +---*/ //CHECK#1 function f1(){ @@ -15,4 +15,3 @@ function f1(){ } if(typeof(f1)!=="function") $ERROR('#1: typeof(f1)!=="function"'); - diff --git a/test/suite/ch10/10.1/S10.1.1_A1_T2.js b/test/suite/ch10/10.1/S10.1.1_A1_T2.js index d453d6e596..dcf4e5e48a 100644 --- a/test/suite/ch10/10.1/S10.1.1_A1_T2.js +++ b/test/suite/ch10/10.1/S10.1.1_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Program functions are defined in source text by a FunctionDeclaration or created dynamically either - * by using a FunctionExpression or by using the built-in Function object as a constructor - * - * @path ch10/10.1/S10.1.1_A1_T2.js - * @description Creating function dynamically by using a FunctionExpression - */ +/*--- +info: > + Program functions are defined in source text by a FunctionDeclaration or created dynamically either + by using a FunctionExpression or by using the built-in Function object as a constructor +es5id: 10.1.1_A1_T2 +description: Creating function dynamically by using a FunctionExpression +---*/ //CHECK#1 var x=function f1(){return 1;}(); @@ -25,4 +25,3 @@ var z = (function(){return 3;})(); if(z!==3){ $ERROR('#3: Create an anonymous function dynamically either by using a FunctionExpression wrapped in a group operator'); } - diff --git a/test/suite/ch10/10.1/S10.1.1_A1_T3.js b/test/suite/ch10/10.1/S10.1.1_A1_T3.js index 5e49dcd594..479e1588d4 100644 --- a/test/suite/ch10/10.1/S10.1.1_A1_T3.js +++ b/test/suite/ch10/10.1/S10.1.1_A1_T3.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Program functions are defined in source text by a FunctionDeclaration or created dynamically either - * by using a FunctionExpression or by using the built-in Function object as a constructor - * - * @path ch10/10.1/S10.1.1_A1_T3.js - * @description Creating function dynamically by using the built-in Function object as a constructor - */ +/*--- +info: > + Program functions are defined in source text by a FunctionDeclaration or created dynamically either + by using a FunctionExpression or by using the built-in Function object as a constructor +es5id: 10.1.1_A1_T3 +description: > + Creating function dynamically by using the built-in Function + object as a constructor +---*/ //CHECK#1 var x=new function f1(){return 1;}; if(typeof(x.constructor)!=="function") $ERROR('#1: typeof(x.constructor)!=="function"'); - diff --git a/test/suite/ch10/10.1/S10.1.1_A2_T1.js b/test/suite/ch10/10.1/S10.1.1_A2_T1.js index aa5701155d..f072707120 100644 --- a/test/suite/ch10/10.1/S10.1.1_A2_T1.js +++ b/test/suite/ch10/10.1/S10.1.1_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * There are two types of Function objects. Internal functions - * are built-in objects of the language, such as parseInt and Math.exp - * - * @path ch10/10.1/S10.1.1_A2_T1.js - * @description Checking types of parseInt and Math.exp - */ +/*--- +info: > + There are two types of Function objects. Internal functions + are built-in objects of the language, such as parseInt and Math.exp +es5id: 10.1.1_A2_T1 +description: Checking types of parseInt and Math.exp +---*/ //CHECK#1 if(typeof(Math.exp)!=="function") @@ -16,5 +16,3 @@ if(typeof(Math.exp)!=="function") //CHECK#2 if(typeof(parseInt)!=="function") $ERROR('#2: typeof(parseInt())!=="function" '+typeof(parseInt())); - - diff --git a/test/suite/ch10/10.1/S10.1.6_A1_T1.js b/test/suite/ch10/10.1/S10.1.6_A1_T1.js index 5dee9bf43d..6f56730f84 100644 --- a/test/suite/ch10/10.1/S10.1.6_A1_T1.js +++ b/test/suite/ch10/10.1/S10.1.6_A1_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The activation object is initialised with a property with name arguments and attributes {DontDelete} - * - * @path ch10/10.1/S10.1.6_A1_T1.js - * @description Checking if deleting function parameter is possible - * @noStrict - */ +/*--- +info: > + The activation object is initialised with a property with name arguments + and attributes {DontDelete} +es5id: 10.1.6_A1_T1 +description: Checking if deleting function parameter is possible +flags: [noStrict] +---*/ //CHECK#1 function f1(a){ @@ -16,5 +17,3 @@ function f1(a){ } if (f1(1) !== 1) $ERROR('#1: Function parameter was deleted'); - - diff --git a/test/suite/ch10/10.1/S10.1.6_A1_T2.js b/test/suite/ch10/10.1/S10.1.6_A1_T2.js index 8747b2f110..89e5ec6906 100644 --- a/test/suite/ch10/10.1/S10.1.6_A1_T2.js +++ b/test/suite/ch10/10.1/S10.1.6_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The activation object is initialised with a property with name arguments and attributes {DontDelete} - * - * @path ch10/10.1/S10.1.6_A1_T2.js - * @description Checking funtion which returns property "arguments" - */ +/*--- +info: > + The activation object is initialised with a property with name arguments + and attributes {DontDelete} +es5id: 10.1.6_A1_T2 +description: Checking funtion which returns property "arguments" +---*/ var ARG_STRING = "value of the argument property"; @@ -30,4 +31,3 @@ if (delete x[3] !== true) if (x[3] === 4) $ERROR('#3.2: Function parameters have attribute {DontDelete}'); - diff --git a/test/suite/ch10/10.1/S10.1.6_A1_T3.js b/test/suite/ch10/10.1/S10.1.6_A1_T3.js index 95e1bf2ef3..4349aa4a91 100644 --- a/test/suite/ch10/10.1/S10.1.6_A1_T3.js +++ b/test/suite/ch10/10.1/S10.1.6_A1_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The activation object is initialised with a property with name arguments and attributes {DontDelete} - * - * @path ch10/10.1/S10.1.6_A1_T3.js - * @description Checking function which returns "this" - * @noStrict - */ +/*--- +info: > + The activation object is initialised with a property with name arguments + and attributes {DontDelete} +es5id: 10.1.6_A1_T3 +description: Checking function which returns "this" +flags: [noStrict] +---*/ function f1() { if (delete arguments) { @@ -17,4 +18,3 @@ function f1() { } f1(); - diff --git a/test/suite/ch10/10.1/S10.1.7_A1_T1.js b/test/suite/ch10/10.1/S10.1.7_A1_T1.js index f7e7a0b0cc..f4f5db1e21 100644 --- a/test/suite/ch10/10.1/S10.1.7_A1_T1.js +++ b/test/suite/ch10/10.1/S10.1.7_A1_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The this value associated with an executioncontext is immutable - * - * @path ch10/10.1/S10.1.7_A1_T1.js - * @description Checking if deleting "this" fails - */ +/*--- +info: The this value associated with an executioncontext is immutable +es5id: 10.1.7_A1_T1 +description: Checking if deleting "this" fails +---*/ //CHECK#1 if (delete this !== true) $ERROR('#1: The this value associated with an executioncontext is immutable. Actual: this was deleted'); - - diff --git a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js index bfc1f5eced..23fb89e4cb 100644 --- a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js +++ b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js - * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (NaN) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - NaN = 12; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.2.1.1.3-4-16-s +description: > + Strict Mode - TypeError is thrown when changing the value of a + Value Property of the Global Object under strict mode (NaN) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + NaN = 12; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js index e608369787..ad6e6bd87e 100644 --- a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js +++ b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js - * @description Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (undefined) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - undefined = 12; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.2.1.1.3-4-18-s +description: > + Strict Mode - TypeError is thrown when changing the value of a + Value Property of the Global Object under strict mode (undefined) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + undefined = 12; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js index 9303b79b59..8480ffeb09 100644 --- a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js +++ b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js - * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Object) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var objBak = Object; - - try { - Object = 12; - return true; - } finally { - Object = objBak; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.2.1.1.3-4-22-s +description: > + Strict Mode - TypeError is not thrown when changing the value of + the Constructor Properties of the Global Object under strict mode + (Object) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var objBak = Object; + + try { + Object = 12; + return true; + } finally { + Object = objBak; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js index 9ecdf64a5e..d54c66c156 100644 --- a/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js +++ b/test/suite/ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js - * @description Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Number) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var numBak = Number; - try { - Number = 12; - return true; - } finally { - Number = numBak; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.2.1.1.3-4-27-s +description: > + Strict Mode - TypeError is not thrown when changing the value of + the Constructor Properties of the Global Object under strict mode + (Number) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var numBak = Number; + try { + Number = 12; + return true; + } finally { + Number = numBak; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A1.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A1.js index 6206633b24..7650f714e2 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A1.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the caller supplies fewer parameter values than there are - * formal parameters, the extra formal parameters have value undefined - * - * @path ch10/10.2/10.2.1/S10.2.1_A1.js - * @description Calling function excluding a few parameters - */ +/*--- +info: > + If the caller supplies fewer parameter values than there are + formal parameters, the extra formal parameters have value undefined +es5id: 10.2.1_A1 +description: Calling function excluding a few parameters +---*/ //CHECK#1 function f1(a, b){ @@ -26,4 +26,3 @@ function f2(a, b, c){ if(!(f2(1) === true)){ $ERROR('#2: f2(1, 2) === true'); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A2.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A2.js index e622c54626..57e74db825 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A2.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A2.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If two or more formal parameters share the same name, hence - * the same property, the corresponding property is given the value that was - * supplied for the last parameter with this name - * - * @path ch10/10.2/10.2.1/S10.2.1_A2.js - * @description Creating functions initialized with two or more formal parameters, which have the same name - * @noStrict - */ +/*--- +info: > + If two or more formal parameters share the same name, hence + the same property, the corresponding property is given the value that was + supplied for the last parameter with this name +es5id: 10.2.1_A2 +description: > + Creating functions initialized with two or more formal parameters, + which have the same name +flags: [noStrict] +---*/ //CHECK#1 function f1(x, x) { @@ -34,4 +36,3 @@ function f3(x, x) { if(!(f3(1, 2) === 'a2')){ $ERROR("#3: f3(1, 2) === 'a2'"); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js index 1c15c0621d..0ff9385ff8 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A3.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the value of this last parameter (which has the same - * name as some previous parameters do) was not supplied by the - * caller, the value of the corresponding property is undefined - * - * @path ch10/10.2/10.2.1/S10.2.1_A3.js - * @description Creating functions with two or more formal parameters, - * that have the same name. Calling this function excluding a few last parameters - */ +/*--- +info: > + If the value of this last parameter (which has the same + name as some previous parameters do) was not supplied by the + caller, the value of the corresponding property is undefined +es5id: 10.2.1_A3 +description: > + Creating functions with two or more formal parameters, that have + the same name. Calling this function excluding a few last + parameters +---*/ //CHECK#1 function f1(x, a, b, x){ @@ -18,4 +20,3 @@ function f1(x, a, b, x){ if(!(f1(1, 2) === undefined)){ $ERROR('#1: f1(1, 2) === undefined'); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T1.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T1.js index a153af430f..e0a31d55b2 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T1.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declaration in function code - If the variable object - * already has a property with the name of Function Identifier, replace its - * value and attributes. Semantically, this step must follow the creation of - * FormalParameterList properties - * - * @path ch10/10.2/10.2.1/S10.2.1_A4_T1.js - * @description Checking existence of a function with passed parameter - * @noStrict - */ +/*--- +info: > + Function declaration in function code - If the variable object + already has a property with the name of Function Identifier, replace its + value and attributes. Semantically, this step must follow the creation of + FormalParameterList properties +es5id: 10.2.1_A4_T1 +description: Checking existence of a function with passed parameter +flags: [noStrict] +---*/ //CHECK#1 function f1(x){ @@ -46,4 +46,3 @@ function f3() { if (!(f3() === "function")){ $ERROR('#3: f3() === "function"'); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T2.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T2.js index 16661df91d..6733dec451 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T2.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A4_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declaration in function code - If the variable object - * already has a property with the name of Function Identifier, replace its - * value and attributes. Semantically, this step must follow the creation of - * FormalParameterList properties - * - * @path ch10/10.2/10.2.1/S10.2.1_A4_T2.js - * @description Checking existence of a function with declared variable - */ +/*--- +info: > + Function declaration in function code - If the variable object + already has a property with the name of Function Identifier, replace its + value and attributes. Semantically, this step must follow the creation of + FormalParameterList properties +es5id: 10.2.1_A4_T2 +description: Checking existence of a function with declared variable +includes: [$PRINT.js] +---*/ //CHECK#1 function f1(){ @@ -38,4 +39,3 @@ function f2(){ if(!(f2() === "function")){ $PRINT('#2: f2() === "function"'); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js index 824aedeeec..c68a53d9c1 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * For each VariableDeclaration or VariableDeclarationNoIn in the - * code, create a property of the variable object whose name is the Identifier - * in the VariableDeclaration or VariableDeclarationNoIn, whose value is - * undefined and whose attributes are determined by the type of code - * - * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js - * @description Checking variable existence only - */ +/*--- +info: > + For each VariableDeclaration or VariableDeclarationNoIn in the + code, create a property of the variable object whose name is the Identifier + in the VariableDeclaration or VariableDeclarationNoIn, whose value is + undefined and whose attributes are determined by the type of code +es5id: 10.2.1_A5.1_T1 +description: Checking variable existence only +includes: [$PRINT.js] +---*/ //CHECK#1 function f1(){ @@ -32,4 +33,3 @@ function f2(){ if(!(f2() === undefined)){ $PRINT('#1: f2() === undefined'); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js index adef8b5c5d..63295f9568 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * For each VariableDeclaration or VariableDeclarationNoIn in the - * code, create a property of the variable object whose name is the Identifier - * in the VariableDeclaration or VariableDeclarationNoIn, whose value is - * undefined and whose attributes are determined by the type of code - * - * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js - * @description Checking existence of the variable object property with formal parameter - */ +/*--- +info: > + For each VariableDeclaration or VariableDeclarationNoIn in the + code, create a property of the variable object whose name is the Identifier + in the VariableDeclaration or VariableDeclarationNoIn, whose value is + undefined and whose attributes are determined by the type of code +es5id: 10.2.1_A5.1_T2 +description: > + Checking existence of the variable object property with formal + parameter +includes: [$PRINT.js] +---*/ //CHECK#1 function f1(x){ @@ -32,4 +35,3 @@ function f2(x){ if(!(f2() === undefined)){ $PRINT('#1: f2(1) === undefined'); } - diff --git a/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js b/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js index d5321c9079..faae57d533 100644 --- a/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js +++ b/test/suite/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If there is already a property of the variable object with the - * name of a declared variable, the value of the property and its attributes - * are not changed - * - * @path ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js - * @description Checking existence of the variable object property with formal parameter - */ +/*--- +info: > + If there is already a property of the variable object with the + name of a declared variable, the value of the property and its attributes + are not changed +es5id: 10.2.1_A5.2_T1 +description: > + Checking existence of the variable object property with formal + parameter +includes: [$PRINT.js] +---*/ //CHECK#1 function f1(x){ @@ -31,4 +34,3 @@ function f2(x){ if(!(f2(1) === 1)){ $PRINT('#1: f2(1) === 1'); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T1.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T1.js index 7aba918d17..4ce80710a7 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T1.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T1.js - * @description Checking scope chain containing function declarations - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T1 +description: Checking scope chain containing function declarations +---*/ var x = 0; @@ -23,4 +23,3 @@ function f1(){ if(!(f1() === 1)){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T2.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T2.js index 33b4724188..d891cf0c08 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T2.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T2.js - * @description Checking scope chain containing function declarations - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T2 +description: Checking scope chain containing function declarations +---*/ var x = 0; @@ -22,4 +22,3 @@ function f1(){ if(!(f1() === 0)){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T3.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T3.js index a9a85deff0..90f8c0003d 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T3.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T3.js - * @description Checking scope chain containing function declarations - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T3 +description: Checking scope chain containing function declarations +---*/ var x = 0; @@ -24,5 +24,3 @@ function f1(){ if(!(f1() === undefined)){ $ERROR("#1: Scope chain disturbed"); } - - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T4.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T4.js index e32ffac352..5731e5c673 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T4.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T4.js - * @description Checking scope chain containing function declarations - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T4 +description: Checking scope chain containing function declarations +---*/ var x = 0; @@ -24,4 +24,3 @@ function f1(){ if(!(f1() === 1)){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T5.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T5.js index c71654f6fe..460c736e6e 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T5.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T5.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T5.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T5 +description: Checking scope chain containing function declarations and "with" +flags: [noStrict] +---*/ var x = 0; @@ -28,4 +28,3 @@ function f1(){ if(!(f1() === "obj")){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T6.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T6.js index 990c27ef3c..37b54a5860 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T6.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T6.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T6 +description: Checking scope chain containing function declarations and "with" +flags: [noStrict] +---*/ var x = 0; @@ -27,4 +27,3 @@ function f1(){ if(!(f1() === "obj")){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T7.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T7.js index cc719b5046..b4745c5351 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T7.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T7.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T7.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T7 +description: Checking scope chain containing function declarations and "with" +flags: [noStrict] +---*/ var x = 0; @@ -29,4 +29,3 @@ function f1(){ if(!(f1() === "obj")){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T8.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T8.js index 3aaefcf14b..16cf64fde3 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T8.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T8.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T8.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T8 +description: Checking scope chain containing function declarations and "with" +flags: [noStrict] +---*/ var x = 0; @@ -29,4 +29,3 @@ function f1(){ if(!(f1() === "obj")){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T9.js b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T9.js index c03fdd1cf4..72bf0da8cd 100644 --- a/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T9.js +++ b/test/suite/ch10/10.2/10.2.2/S10.2.2_A1_T9.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every execution context has associated with it a scope chain. - * A scope chain is a list of objects that are searched when evaluating an - * Identifier - * - * @path ch10/10.2/10.2.2/S10.2.2_A1_T9.js - * @description Checking scope chain containing function declarations and "with" - * @noStrict - */ +/*--- +info: > + Every execution context has associated with it a scope chain. + A scope chain is a list of objects that are searched when evaluating an + Identifier +es5id: 10.2.2_A1_T9 +description: Checking scope chain containing function declarations and "with" +flags: [noStrict] +---*/ var x = 0; @@ -24,4 +24,3 @@ function f1(){ if(!(f1() === "obj")){ $ERROR("#1: Scope chain disturbed"); } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js index 6a133d7889..c4bc324eee 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T1.js - * @description Global execution context - Value Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.1_T1 +description: Global execution context - Value Properties +---*/ //CHECK#1 if ( NaN === null ) { @@ -23,4 +23,3 @@ if ( Infinity === null ) { if ( undefined === null ) { $ERROR("#3: undefined === null"); } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js index 1fafadc99f..ace34ff729 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T2.js - * @description Global execution context - Function Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.1_T2 +description: Global execution context - Function Properties +---*/ //CHECK#4 if ( eval === null ) { @@ -53,4 +53,3 @@ if ( encodeURI === null ) { if ( encodeURIComponent === null ) { $ERROR("#12: encodeURIComponent === null"); } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js index 3407039e88..5f0f903490 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T3.js - * @description Global execution context - Constructor Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.1_T3 +description: Global execution context - Constructor Properties +---*/ //CHECK#13 if ( Object === null ) { @@ -83,5 +83,3 @@ if ( TypeError === null ) { if ( URIError === null ) { $ERROR("#26: URIError === null"); } - - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js index f59cc646e9..a6156c450d 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.1_T4.js - * @description Global execution context - Other Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.1_T4 +description: Global execution context - Other Properties +---*/ //CHECK#27 if ( Math === null ) { $ERROR("#27: Math === null"); } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js index a6b6c4bbf0..43266f570d 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T1.js - * @description Function execution context - Value Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.2_T1 +description: Function execution context - Value Properties +---*/ function test() { //CHECK#1 @@ -27,4 +27,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js index 45ca89f366..2341a0eaba 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T2.js - * @description Function execution context - Function Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.2_T2 +description: Function execution context - Function Properties +---*/ function test() { //CHECK#4 @@ -57,4 +57,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js index 295943cb75..a1c5b2f29f 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T3.js - * @description Function execution context - Constructor Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.2_T3 +description: Function execution context - Constructor Properties +---*/ function test() { //CHECK#13 @@ -87,4 +87,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js index 01d02fb393..f5e66ef826 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.2_T4.js - * @description Function execution context - Other Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.2_T4 +description: Function execution context - Other Properties +---*/ function test() { //CHECK#27 @@ -17,4 +17,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js index 695f0acf5f..e6ddaeb75e 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T1.js - * @description Eval execution context - Value Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.3_T1 +description: Eval execution context - Value Properties +---*/ var evalStr = '//CHECK#1\n'+ @@ -27,4 +27,3 @@ var evalStr = ';\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js index 5afd0ef935..8e6f338fba 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T2.js - * @description Eval execution context - Function Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.3_T2 +description: Eval execution context - Function Properties +---*/ var evalStr = '//CHECK#4\n'+ @@ -57,4 +57,3 @@ var evalStr = ';\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js index b34b1e252e..7513836e09 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T3.js - * @description Eval execution context - Constructor Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.3_T3 +description: Eval execution context - Constructor Properties +---*/ var evalStr = '//CHECK#13\n'+ @@ -87,4 +87,3 @@ var evalStr = ';\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js index 054969ce2d..c93ce29a76 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object has properties such as built-in objects such as - * Math, String, Date, parseInt, etc - * - * @path ch10/10.2/10.2.3/S10.2.3_A1.3_T4.js - * @description Eval execution context - Other Properties - */ +/*--- +info: > + Global object has properties such as built-in objects such as + Math, String, Date, parseInt, etc +es5id: 10.2.3_A1.3_T4 +description: Eval execution context - Other Properties +---*/ var evalStr = '//CHECK#27\n'+ @@ -17,4 +17,3 @@ var evalStr = ';\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js index db57ad5bae..195ca44b73 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T1.js - * @description Global execution context - Value Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.1_T1 +description: Global execution context - Value Properties +---*/ //CHECK#1 for (var x in this) { @@ -18,4 +17,3 @@ for (var x in this) { $ERROR("#1: 'undefined' have attribute DontEnum"); } } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js index 6a39d43a17..c2d4f98a47 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T2.js - * @description Global execution context - Function Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.1_T2 +description: Global execution context - Function Properties +---*/ //CHECK#1 for (var x in this) { @@ -30,4 +29,3 @@ for (var x in this) { $ERROR("#1: 'encodeURIComponent' have attribute DontEnum"); } } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js index c684a649a2..d011b2a39e 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T3.js - * @description Global execution context - Constructor Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.1_T3 +description: Global execution context - Constructor Properties +---*/ //CHECK#1 for (var x in this) { @@ -42,4 +41,3 @@ for (var x in this) { $ERROR("#1: 'URIError' have attribute DontEnum"); } } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js index cb575c5330..9dbb49b355 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.1_T4.js - * @description Global execution context - Other Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.1_T4 +description: Global execution context - Other Properties +---*/ //CHECK#1 for (var x in this) { @@ -14,4 +13,3 @@ for (var x in this) { $ERROR("#1: 'Math' have attribute DontEnum"); } } - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js index 808cc1b605..8851a43a32 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T1.js - * @description Function execution context - Value Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.2_T1 +description: Function execution context - Value Properties +---*/ function test() { //CHECK#1 @@ -22,4 +21,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js index ac87a58efd..86e1fe9d22 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js - * @description Function execution context - Function Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.2_T2 +description: Function execution context - Function Properties +---*/ function test() { //CHECK#1 @@ -34,4 +33,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js index e6f5f4ac7b..5e1934e64c 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T3.js - * @description Function execution context - Constructor Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.2_T3 +description: Function execution context - Constructor Properties +---*/ function test() { //CHECK#1 @@ -46,4 +45,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js index 3a6afa5cc0..b166a659ee 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.2_T4.js - * @description Function execution context - Other Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.2_T4 +description: Function execution context - Other Properties +---*/ function test() { //CHECK#1 @@ -18,4 +17,3 @@ function test() { } test(); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js index f7f32c563e..1bdf921796 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T1.js - * @description Global execution context - Value Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.3_T1 +description: Global execution context - Value Properties +---*/ var evalStr = '//CHECK#1\n'+ @@ -21,4 +20,3 @@ var evalStr = '}\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js index 8d3cfe7ee0..2768188973 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js - * @description Global execution context - Function Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.3_T2 +description: Global execution context - Function Properties +---*/ var evalStr = '//CHECK#1\n'+ @@ -33,4 +32,3 @@ var evalStr = '}\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js index 9ae75beb9a..ecbbd49c57 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js - * @description Global execution context - Constructor Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.3_T3 +description: Global execution context - Constructor Properties +---*/ var evalStr = '//CHECK#1\n'+ @@ -45,4 +44,3 @@ var evalStr = '}\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js index ed60835c9f..6bb61a7ef9 100644 --- a/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js +++ b/test/suite/ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global object properties have attributes { DontEnum } - * - * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T4.js - * @description Global execution context - Other Properties - */ +/*--- +info: Global object properties have attributes { DontEnum } +es5id: 10.2.3_A2.3_T4 +description: Global execution context - Other Properties +---*/ var evalStr = '//CHECK#1\n'+ @@ -17,4 +16,3 @@ var evalStr = '}\n'; eval(evalStr); - diff --git a/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T1.js b/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T1.js index 04abf8bef3..e303cbcef3 100644 --- a/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T1.js +++ b/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Variable instantiation is performed using the global object as - * the variable object and using property attributes { DontDelete } - * - * @path ch10/10.4/10.4.1/S10.4.1_A1_T1.js - * @description Checking if deleting variable x, that is defined as var x = 1, fails - * @noStrict - */ +/*--- +info: > + Variable instantiation is performed using the global object as + the variable object and using property attributes { DontDelete } +es5id: 10.4.1_A1_T1 +description: > + Checking if deleting variable x, that is defined as var x = 1, + fails +flags: [noStrict] +---*/ var x = 1; @@ -19,4 +21,3 @@ if (this.x !== 1) { if(delete this.x !== false){ $ERROR("#2: variable x has property attribute DontDelete"); } - diff --git a/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T2.js b/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T2.js index 107381f2d4..43ab538cba 100644 --- a/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T2.js +++ b/test/suite/ch10/10.4/10.4.1/S10.4.1_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Variable instantiation is performed using the global object as - * the variable object and using property attributes { DontDelete } - * - * @path ch10/10.4/10.4.1/S10.4.1_A1_T2.js - * @description Checking if deleting variable x, that is defined as x = 1, fails - * @noStrict - */ +/*--- +info: > + Variable instantiation is performed using the global object as + the variable object and using property attributes { DontDelete } +es5id: 10.4.1_A1_T2 +description: Checking if deleting variable x, that is defined as x = 1, fails +flags: [noStrict] +---*/ x = 1; @@ -19,4 +19,3 @@ if (this.x !== 1) { if(delete this.x !== true){ $ERROR("#2: variable x has property attribute DontDelete"); } - diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-1-1.js b/test/suite/ch10/10.4/10.4.2/10.4.2-1-1.js index 233eac2c81..59c66786f9 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-1-1.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-1-1.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-1.js - * @description Indirect call to eval has context set to global context - */ - -var __10_4_2_1_1_1 = "str"; -function testcase() { - try { - - var _eval = eval; - var __10_4_2_1_1_1 = "str1"; - if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval - eval("\'str1\' === __10_4_2_1_1_1") === true) { // direct eval - return true; - } - return false; - } finally { - delete this.__10_4_2_1_1_1; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-1-1 +description: Indirect call to eval has context set to global context +includes: [runTestCase.js] +---*/ + +var __10_4_2_1_1_1 = "str"; +function testcase() { + try { + + var _eval = eval; + var __10_4_2_1_1_1 = "str1"; + if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval + eval("\'str1\' === __10_4_2_1_1_1") === true) { // direct eval + return true; + } + return false; + } finally { + delete this.__10_4_2_1_1_1; + } +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-1-2.js b/test/suite/ch10/10.4/10.4.2/10.4.2-1-2.js index 7c144f5529..71b048d0e0 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-1-2.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-1-2.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-2.js - * @description Indirect call to eval has context set to global context (nested function) - */ - -var __10_4_2_1_2 = "str"; -function testcase() { - try { - - var _eval = eval; - var __10_4_2_1_2 = "str1"; - function foo() { - var __10_4_2_1_2 = "str2"; - if(_eval("\'str\' === __10_4_2_1_2") === true && // indirect eval - eval("\'str2\' === __10_4_2_1_2") === true) { // direct eval - return true; - } else { - return false; - } - } - return foo(); - } finally { - delete this.__10_4_2_1_1_2; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-1-2 +description: > + Indirect call to eval has context set to global context (nested + function) +includes: [runTestCase.js] +---*/ + +var __10_4_2_1_2 = "str"; +function testcase() { + try { + + var _eval = eval; + var __10_4_2_1_2 = "str1"; + function foo() { + var __10_4_2_1_2 = "str2"; + if(_eval("\'str\' === __10_4_2_1_2") === true && // indirect eval + eval("\'str2\' === __10_4_2_1_2") === true) { // direct eval + return true; + } else { + return false; + } + } + return foo(); + } finally { + delete this.__10_4_2_1_1_2; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-1-3.js b/test/suite/ch10/10.4/10.4.2/10.4.2-1-3.js index 078ea21abf..327903e598 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-1-3.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-1-3.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-3.js - * @description Indirect call to eval has context set to global context (catch block) - */ - -var __10_4_2_1_3 = "str"; -function testcase() { - - try { - - var _eval = eval; - var __10_4_2_1_3 = "str1"; - try { - throw "error"; - } - catch (e) { - var __10_4_2_1_3 = "str2"; - if (_eval("\'str\' === __10_4_2_1_3") === true && // indirect eval - eval("\'str2\' === __10_4_2_1_3") === true) { // direct eval - return true; - } else { - return false; - } - } - } finally { - delete this.__10_4_2_1_3; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-1-3 +description: > + Indirect call to eval has context set to global context (catch + block) +includes: [runTestCase.js] +---*/ + +var __10_4_2_1_3 = "str"; +function testcase() { + + try { + + var _eval = eval; + var __10_4_2_1_3 = "str1"; + try { + throw "error"; + } + catch (e) { + var __10_4_2_1_3 = "str2"; + if (_eval("\'str\' === __10_4_2_1_3") === true && // indirect eval + eval("\'str2\' === __10_4_2_1_3") === true) { // direct eval + return true; + } else { + return false; + } + } + } finally { + delete this.__10_4_2_1_3; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-1-4.js b/test/suite/ch10/10.4/10.4.2/10.4.2-1-4.js index 8a025f0d9c..af518a34d1 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-1-4.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-1-4.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-4.js - * @description Indirect call to eval has context set to global context (with block) - */ - -var __10_4_2_1_4 = "str"; -function testcase() { - try { - var o = new Object(); - o.__10_4_2_1_4 = "str2"; - var _eval = eval; - var __10_4_2_1_4 = "str1"; - with (o) { - if (_eval("\'str\' === __10_4_2_1_4") === true && // indirect eval - eval("\'str2\' === __10_4_2_1_4") === true) { // direct eval - return true; - } - } - return false; - } finally { - delete this.__10_4_2_1_4; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-1-4 +description: > + Indirect call to eval has context set to global context (with + block) +includes: [runTestCase.js] +---*/ + +var __10_4_2_1_4 = "str"; +function testcase() { + try { + var o = new Object(); + o.__10_4_2_1_4 = "str2"; + var _eval = eval; + var __10_4_2_1_4 = "str1"; + with (o) { + if (_eval("\'str\' === __10_4_2_1_4") === true && // indirect eval + eval("\'str2\' === __10_4_2_1_4") === true) { // direct eval + return true; + } + } + return false; + } finally { + delete this.__10_4_2_1_4; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-1-5.js b/test/suite/ch10/10.4/10.4.2/10.4.2-1-5.js index 3808a9988d..6a7cb55875 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-1-5.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-1-5.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-1-5.js - * @description Indirect call to eval has context set to global context (inside another eval) - */ - -var __10_4_2_1_5 = "str"; -function testcase() { - try { - - var __10_4_2_1_5 = "str1"; - var r = eval("\ - var _eval = eval; \ - var __10_4_2_1_5 = \'str2\'; \ - _eval(\"\'str\' === __10_4_2_1_5 \") && \ - eval(\"\'str2\' === __10_4_2_1_5\")\ - "); - return r; - } finally { - delete this.__10_4_2_1_5; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-1-5 +description: > + Indirect call to eval has context set to global context (inside + another eval) +includes: [runTestCase.js] +---*/ + +var __10_4_2_1_5 = "str"; +function testcase() { + try { + + var __10_4_2_1_5 = "str1"; + var r = eval("\ + var _eval = eval; \ + var __10_4_2_1_5 = \'str2\'; \ + _eval(\"\'str\' === __10_4_2_1_5 \") && \ + eval(\"\'str2\' === __10_4_2_1_5\")\ + "); + return r; + } finally { + delete this.__10_4_2_1_5; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-2-c-1.js b/test/suite/ch10/10.4/10.4.2/10.4.2-2-c-1.js index 61d85cec01..4747e1ba68 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-2-c-1.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-2-c-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-2-c-1.js - * @description Direct val code in non-strict mode - can instantiate variable in calling context - */ - - -function testcase() { - var x = 0; - return function inner() { - eval("var x = 1"); - if (x === 1) - return true; - } (); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-2-c-1 +description: > + Direct val code in non-strict mode - can instantiate variable in + calling context +includes: [runTestCase.js] +---*/ + +function testcase() { + var x = 0; + return function inner() { + eval("var x = 1"); + if (x === 1) + return true; + } (); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-2-s.js b/test/suite/ch10/10.4/10.4.2/10.4.2-2-s.js index fb00b04f5a..0f46e9dff7 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-2-s.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-2-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-2-s.js - * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - eval("(function fun(x){ return x })(10)"); - return typeof (fun) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-2-s +description: > + Strict Mode - Strict mode eval code cannot instantiate functions + in the variable environment of the caller to eval +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + eval("(function fun(x){ return x })(10)"); + return typeof (fun) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js b/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js index 57ee1912d0..267ef99c06 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-3-c-1-s.js - * @description Direct eval code in strict mode - cannot instantiate variable in the variable environment of the calling context - * @onlyStrict - */ - - -function testcase() { - var _10_4_2_3_c_1_s = 0; - function _10_4_2_3_c_1_sFunc() { - eval("'use strict';var _10_4_2_3_c_1_s = 1"); - return _10_4_2_3_c_1_s===0; - } - return _10_4_2_3_c_1_sFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-3-c-1-s +description: > + Direct eval code in strict mode - cannot instantiate variable in + the variable environment of the calling context +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var _10_4_2_3_c_1_s = 0; + function _10_4_2_3_c_1_sFunc() { + eval("'use strict';var _10_4_2_3_c_1_s = 1"); + return _10_4_2_3_c_1_s===0; + } + return _10_4_2_3_c_1_sFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js b/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js index 91caa626b7..d97f75bc86 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2-3-c-2-s.js - * @description Calling code in strict mode - eval cannot instantiate variable in the variable environment of the calling context - * @onlyStrict - */ - - -function testcase() { - var _10_4_2_3_c_2_s = 0; - function _10_4_2_3_c_2_sFunc() { - 'use strict'; - eval("var _10_4_2_3_c_2_s = 1"); - return _10_4_2_3_c_2_s===0; - } - return _10_4_2_3_c_2_sFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2-3-c-2-s +description: > + Calling code in strict mode - eval cannot instantiate variable in + the variable environment of the calling context +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var _10_4_2_3_c_2_s = 0; + function _10_4_2_3_c_2_sFunc() { + 'use strict'; + eval("var _10_4_2_3_c_2_s = 1"); + return _10_4_2_3_c_2_s===0; + } + return _10_4_2_3_c_2_sFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2.1-1gs.js b/test/suite/ch10/10.4/10.4.2/10.4.2.1-1gs.js index e0d77031f7..b786bdb839 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2.1-1gs.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2.1-1gs.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.4/10.4.2/10.4.2.1-1gs.js - * @description Strict Mode - eval code cannot instantiate variable in the variable environment of the calling context that invoked the eval if the code of the calling context is strict code - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -eval("var x = 7;"); -x = 9; -throw NotEarlyError; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2.1-1gs +description: > + Strict Mode - eval code cannot instantiate variable in the + variable environment of the calling context that invoked the eval + if the code of the calling context is strict code +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +eval("var x = 7;"); +x = 9; +throw NotEarlyError; diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2.1-2-s.js b/test/suite/ch10/10.4/10.4.2/10.4.2.1-2-s.js index 5fc76cb35c..6e824770e7 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2.1-2-s.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2.1-2-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2.1-2-s.js - * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - eval("function _10_4_2_1_2_fun(){}"); - return typeof _10_4_2_1_2_fun === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2.1-2-s +description: > + Strict Mode - Strict mode eval code cannot instantiate functions + in the variable environment of the caller to eval +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + eval("function _10_4_2_1_2_fun(){}"); + return typeof _10_4_2_1_2_fun === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/10.4.2.1-4-s.js b/test/suite/ch10/10.4/10.4.2/10.4.2.1-4-s.js index 89ce853994..bc92701eef 100644 --- a/test/suite/ch10/10.4/10.4.2/10.4.2.1-4-s.js +++ b/test/suite/ch10/10.4/10.4.2/10.4.2.1-4-s.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.2/10.4.2.1-4-s.js - * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval which is contained in strict mode code - * @onlyStrict - */ - - -function testcase() { - - eval("'use strict'; function _10_4_2_1_4_fun(){}"); - return typeof _10_4_2_1_4_fun === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.2.1-4-s +description: > + Strict Mode - Strict mode eval code cannot instantiate functions + in the variable environment of the caller to eval which is + contained in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("'use strict'; function _10_4_2_1_4_fun(){}"); + return typeof _10_4_2_1_4_fun === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2.1_A1.js b/test/suite/ch10/10.4/10.4.2/S10.4.2.1_A1.js index 3a3690ce93..175b5e9545 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2.1_A1.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch10/10.4/10.4.2/S10.4.2.1_A1.js - * @description Strict indirect eval should not leak top level - * declarations into the global scope - * @onlyStrict - */ +/*--- +es5id: 10.4.2.1_A1 +description: > + Strict indirect eval should not leak top level declarations into + the global scope +flags: [onlyStrict] +---*/ "use strict"; if (!('foo' in this)) { diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js index 077ae7be11..1e085af9d5 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T1 +description: eval within global execution context +---*/ var i; var j; @@ -25,4 +25,3 @@ eval('for(j in this){\nstr2+=j;\n}'); if(!(str1 === str2)){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js index 4903b5b3b9..fe2d03eacb 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T10 +description: eval within global execution context +---*/ var i; var j; @@ -25,4 +25,3 @@ eval('for(j in this){\nstr2+=j;\n}'); if(!(str1 === str2)){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js index fb7b1690e2..f140700938 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T11 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ this.x = 1; this.y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js index b7eb20df00..811ebfa607 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T2 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ var x = 1; var y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js index 3b32b2bc2d..6b5572d040 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T3 +description: eval within global execution context +---*/ var i; var j; @@ -25,4 +25,3 @@ eval('for(j in this){\nstr2+=j;\n}'); if(!(str1 === str2)){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js index c5e5d0a046..0226e73daf 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T4 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ } y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js index 927a8007df..56479a22c9 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T5 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ } var y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js index b9fb461f6c..0b8cfd0459 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T6 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ } this.y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js index 93160490c4..c0aa554012 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T7 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ } var y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js index 5376140af6..a6e452c705 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T8 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ } var y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js index 76d75b8f9c..83bd435e0f 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.1_T9 +description: eval within global execution context +---*/ var i; var j; @@ -26,4 +26,3 @@ if(!(str1 === str2)){ x = 1; y = 2; - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js index 229cfc63f8..d670a5fac6 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T1 +description: eval within global execution context +---*/ function f(){ var i; @@ -28,4 +28,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js index 1707379cf2..2a1caa67ad 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T10 +description: eval within global execution context +---*/ function f(){ var i; @@ -29,4 +29,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js index b94f2aa56e..9e80ebb489 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js - * @description eval within global execution context - * @noStrict - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T11 +description: eval within global execution context +flags: [noStrict] +---*/ function f(){ var i; @@ -31,4 +31,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js index 72611dc49a..070b1822e7 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T2 +description: eval within global execution context +---*/ function f(){ var i; @@ -29,4 +29,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js index f3cd1b0bf6..1d685682d4 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T3 +description: eval within global execution context +---*/ function f(){ var i; @@ -29,4 +29,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js index cebe8f3a28..9bd33e38be 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T4 +description: eval within global execution context +---*/ function f(){ var i; @@ -30,4 +30,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js index 8024348499..ad9759a297 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T5 +description: eval within global execution context +---*/ function f(){ var i; @@ -30,5 +30,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js index 275f8ce987..03ecd0ff31 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T6 +description: eval within global execution context +---*/ function f(){ var i; @@ -30,5 +30,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js index 1870bc1fd6..dd3f344ec9 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T7 +description: eval within global execution context +---*/ function f(){ var i; @@ -30,6 +30,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - - - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js index 8f12824601..9802136542 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T8 +description: eval within global execution context +---*/ function f(){ var i; @@ -30,5 +30,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - - diff --git a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js index e77ca4323f..56018e52b6 100644 --- a/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js +++ b/test/suite/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The scope chain is initialised to contain the same objects, - * in the same order, as the calling context's scope chain - * - * @path ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js - * @description eval within global execution context - */ +/*--- +info: > + The scope chain is initialised to contain the same objects, + in the same order, as the calling context's scope chain +es5id: 10.4.2_A1.2_T9 +description: eval within global execution context +---*/ function f(){ var i; @@ -30,5 +30,3 @@ function f(){ if(!f()){ $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); } - - diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-1-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-1-s.js index 9ed7152e40..7507204c6a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-1-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-1-s.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-1-s.js - * @description this is not coerced to an object in strict mode (Number) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - - return foo.call(1) === 'number' && bar.call(1) === 'object'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-1-s +description: this is not coerced to an object in strict mode (Number) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + + return foo.call(1) === 'number' && bar.call(1) === 'object'; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-10-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-10-s.js index d737cff1ac..5067e2ee96 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-10-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-10-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-10-s.js - * @description Strict Mode - checking 'this' (FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = function () { - "use strict"; - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-10-s +description: > + Strict Mode - checking 'this' (FunctionExpression includes strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var f = function () { + "use strict"; + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-100-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-100-s.js index 98deb941e5..e5dbb0047e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-100-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-100-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-100-s.js - * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ - -function testcase() { -var x = 3; - -function f() { - "use strict"; - x = this; - return "a"; -} -return ("ab".replace("b", f)==="aa") && (x===undefined); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-100-s +description: > + Strict Mode - checking 'this' (strict function passed as arg to + String.prototype.replace from non-strict context) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var x = 3; + +function f() { + "use strict"; + x = this; + return "a"; +} +return ("ab".replace("b", f)==="aa") && (x===undefined); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-100gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-100gs.js index b78f816608..5ddbc42a1f 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-100gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-100gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-100gs.js - * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ -var x = 3; - -function f() { - "use strict"; - x = this; - return "a"; -} -if (("ab".replace("b", f)!=="aa") || (x!==undefined)) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-100gs +description: > + Strict Mode - checking 'this' (strict function passed as arg to + String.prototype.replace from non-strict context) +flags: [onlyStrict] +---*/ + +var x = 3; + +function f() { + "use strict"; + x = this; + return "a"; +} +if (("ab".replace("b", f)!=="aa") || (x!==undefined)) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-101-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-101-s.js index bb7c2c7a97..7f3f96eb83 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-101-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-101-s.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-101-s.js - * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) - * @noStrict - */ - -function testcase() { -var x = 3; - -function f() { - x = this; - return "a"; -} - -return (function() {"use strict"; return "ab".replace("b", f)==="aa";}()) && (x===fnGlobalObject()); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-101-s +description: > + Strict Mode - checking 'this' (non-strict function passed as arg + to String.prototype.replace from strict context) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var x = 3; + +function f() { + x = this; + return "a"; +} + +return (function() {"use strict"; return "ab".replace("b", f)==="aa";}()) && (x===fnGlobalObject()); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-101gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-101gs.js index bc6eba526d..4c9c147ff2 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-101gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-101gs.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-101gs.js - * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) - * @noStrict - */ -var x = 3; - -function f() { - x = this; - return "a"; -} - -if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==fnGlobalObject())) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-101gs +description: > + Strict Mode - checking 'this' (non-strict function passed as arg + to String.prototype.replace from strict context) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +var x = 3; + +function f() { + x = this; + return "a"; +} + +if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==fnGlobalObject())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-102-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-102-s.js index 0a11390eff..683a9621a8 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-102-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-102-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-102-s.js - * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ - -function testcase() { -var x = 3; - -return ("ab".replace("b", (function () { - "use strict"; - return function () { - x = this; - return "a"; - } - })())==="aa") && (x===undefined); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-102-s +description: > + Strict Mode - checking 'this' (strict anonymous function passed as + arg to String.prototype.replace from non-strict context) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var x = 3; + +return ("ab".replace("b", (function () { + "use strict"; + return function () { + x = this; + return "a"; + } + })())==="aa") && (x===undefined); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-102gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-102gs.js index 90505a2fd7..6f8e27e255 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-102gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-102gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-102gs.js - * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context) - * @onlyStrict - */ -var x = 3; -if ( ("ab".replace("b", (function () { - "use strict"; - return function () { - x = this; - return "a"; - } - })())!=="aa") || (x!==undefined)) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-102gs +description: > + Strict Mode - checking 'this' (strict anonymous function passed as + arg to String.prototype.replace from non-strict context) +flags: [onlyStrict] +---*/ + +var x = 3; +if ( ("ab".replace("b", (function () { + "use strict"; + return function () { + x = this; + return "a"; + } + })())!=="aa") || (x!==undefined)) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-103.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-103.js index a0bc90873d..885d3b8ead 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-103.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-103.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-103.js - * @description Non strict mode should ToObject thisArg if not an object. Abstract equality operator should succeed. - */ - -function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); - if((5).x == 0) return false; - if(!((5).x == 5)) return false; - return true; -} - -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-103 +description: > + Non strict mode should ToObject thisArg if not an object. + Abstract equality operator should succeed. +includes: [runTestCase.js] +---*/ + +function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); + if((5).x == 0) return false; + if(!((5).x == 5)) return false; + return true; +} + +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-104.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-104.js index 42f89deb3c..db504bb449 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-104.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-104.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * - * @path ch10/10.4/10.4.3/10.4.3-1-104.js - * @onlyStrict - * @description Strict mode should not ToObject thisArg if not an object. Strict equality operator should succeed. - */ - - -function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); - if(!((5).x === 5)) return false; - return true; -} - -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-104 +description: > + Strict mode should not ToObject thisArg if not an object. Strict + equality operator should succeed. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); + if(!((5).x === 5)) return false; + return true; +} + +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-105.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-105.js index a66b850cf2..5d5479d0b4 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-105.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-105.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333 - * - * @path ch10/10.4/10.4.3/10.4.3-1-105.js - * @description Non strict mode should ToObject thisArg if not an object. Return type should be object and strict equality should fail. - */ - - function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); - if((5).x === 5) return false; - if(!(typeof (5).x === "object")) return false; - return true; -} - -runTestCase(testcase); - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Created based on feedback in + https://bugs.ecmascript.org/show_bug.cgi?id=333 +es5id: 10.4.3-1-105 +description: > + Non strict mode should ToObject thisArg if not an object. Return + type should be object and strict equality should fail. +includes: [runTestCase.js] +---*/ + +function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { return this; } }); + if((5).x === 5) return false; + if(!(typeof (5).x === "object")) return false; + return true; +} + +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-106.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-106.js index 36afbda2ad..c5ea985e17 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-106.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-106.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333 - * - * @path ch10/10.4/10.4.3/10.4.3-1-106.js - * @onlyStrict - * @description Strict mode should not ToObject thisArg if not an object. Return type should be 'number'. - */ - - function testcase(){ - Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); - if(!(typeof (5).x === "number")) return false; - return true; -} - -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Created based on feedback in + https://bugs.ecmascript.org/show_bug.cgi?id=333 +es5id: 10.4.3-1-106 +description: > + Strict mode should not ToObject thisArg if not an object. Return + type should be 'number'. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase(){ + Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } }); + if(!(typeof (5).x === "number")) return false; + return true; +} + +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-10gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-10gs.js index 74ee475ae6..e66ac27d1d 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-10gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-10gs.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-10gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -var f = function () { - "use strict"; - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-10gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var f = function () { + "use strict"; + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-11-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-11-s.js index 8f78133382..787ecaf9f8 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-11-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-11-s.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-11-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - return typeof this; -})() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-11-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +return (function () { + return typeof this; +})() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-11gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-11gs.js index 3be7db62a0..a340500e18 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-11gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-11gs.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-11gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -if ((function () { - return typeof this; -})() !== "undefined") { - throw "'this' had incorrect value!"; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-11gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +if ((function () { + return typeof this; +})() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-12-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-12-s.js index a88b4c03f9..971fad946d 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-12-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-12-s.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-12-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - return typeof this; -})() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-12-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + includes strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +return (function () { + "use strict"; + return typeof this; +})() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-12gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-12gs.js index 0bb4a97811..dafa25b3b3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-12gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-12gs.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-12gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -if ((function () { - "use strict"; - return typeof this; -})() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-12gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression includes strict directive prologue) +flags: [onlyStrict] +---*/ + +if ((function () { + "use strict"; + return typeof this; +})() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-13-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-13-s.js index c4ebc9d390..1f81da5aed 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-13-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-13-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-13-s.js - * @description Strict Mode - checking 'this' (Function constructor defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = Function("return typeof this;"); -return f() !== "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-13-s +description: > + Strict Mode - checking 'this' (Function constructor defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var f = Function("return typeof this;"); +return f() !== "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-13gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-13gs.js index d6c4d550aa..98c5d565c5 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-13gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-13gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-13gs.js - * @description Strict - checking 'this' from a global scope (Function constructor defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = Function("return typeof this;"); -if (f() === "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-13gs +description: > + Strict - checking 'this' from a global scope (Function constructor + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var f = Function("return typeof this;"); +if (f() === "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-14-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-14-s.js index fe45b69317..5012e6cfc8 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-14-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-14-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-14-s.js - * @description Strict Mode - checking 'this' (Function constructor includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = Function("\"use strict\";\nreturn typeof this;"); -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-14-s +description: > + Strict Mode - checking 'this' (Function constructor includes + strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var f = Function("\"use strict\";\nreturn typeof this;"); +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-14gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-14gs.js index cec5e66d82..dd374264b9 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-14gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-14gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-14gs.js - * @description Strict - checking 'this' from a global scope (Function constructor includes strict directive prologue) - * @onlyStrict - */ - -var f = Function("\"use strict\";\nreturn typeof this;"); -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-14gs +description: > + Strict - checking 'this' from a global scope (Function constructor + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var f = Function("\"use strict\";\nreturn typeof this;"); +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-15-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-15-s.js index 961d55b6d7..441e10b039 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-15-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-15-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-15-s.js - * @description Strict Mode - checking 'this' (New'ed Function constructor defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = new Function("return typeof this;"); -return f() !== "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-15-s +description: > + Strict Mode - checking 'this' (New'ed Function constructor defined + within strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var f = new Function("return typeof this;"); +return f() !== "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-15gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-15gs.js index 26d75fa641..5a5d56f8b8 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-15gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-15gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-15gs.js - * @description Strict - checking 'this' from a global scope (New'ed Function constructor defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = new Function("return typeof this;"); -if (f() === "undefined") { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-15gs +description: > + Strict - checking 'this' from a global scope (New'ed Function + constructor defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var f = new Function("return typeof this;"); +if (f() === "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-16-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-16-s.js index 6167f4c4ac..b6677aceff 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-16-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-16-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-16-s.js - * @description Strict Mode - checking 'this' (New'ed Function constructor includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = new Function("\"use strict\";\nreturn typeof this;"); -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-16-s +description: > + Strict Mode - checking 'this' (New'ed Function constructor + includes strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var f = new Function("\"use strict\";\nreturn typeof this;"); +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-16gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-16gs.js index b7a2287e7b..379be40f9f 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-16gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-16gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-16gs.js - * @description Strict - checking 'this' from a global scope (New'ed Function constructor includes strict directive prologue) - * @onlyStrict - */ - -var f = new Function("\"use strict\";\nreturn typeof this;"); -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-16gs +description: > + Strict - checking 'this' from a global scope (New'ed Function + constructor includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var f = new Function("\"use strict\";\nreturn typeof this;"); +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-17-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-17-s.js index 4d2caf0635..890dff1ec3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-17-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-17-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-17-s.js - * @description Strict Mode - checking 'this' (eval used within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (eval("typeof this") === "undefined") && (eval("this") !== fnGlobalObject()); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-17-s +description: Strict Mode - checking 'this' (eval used within strict mode) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +"use strict"; +return (eval("typeof this") === "undefined") && (eval("this") !== fnGlobalObject()); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-17gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-17gs.js index f583c6e895..3f4397f68c 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-17gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-17gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-17gs.js - * @description Strict - checking 'this' from a global scope (eval used within strict mode) - * @onlyStrict - */ - -"use strict"; -if (eval("this") !== fnGlobalObject()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-17gs +description: > + Strict - checking 'this' from a global scope (eval used within + strict mode) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +"use strict"; +if (eval("this") !== fnGlobalObject()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-18gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-18gs.js index e1d35e4976..cdd174920a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-18gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-18gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-18gs.js - * @description Strict - checking 'this' from a global scope (eval includes strict directive prologue) - * @onlyStrict - */ - -if (eval("\"use strict\";\nthis") !== fnGlobalObject()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-18gs +description: > + Strict - checking 'this' from a global scope (eval includes strict + directive prologue) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +if (eval("\"use strict\";\nthis") !== fnGlobalObject()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-19-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-19-s.js index c2d412838d..3eeb1111c8 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-19-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-19-s.js @@ -1,17 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-19-s.js - * @description Strict Mode - checking 'this' (indirect eval used within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var my_eval = eval; -return my_eval("this") === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-19-s +description: > + Strict Mode - checking 'this' (indirect eval used within strict + mode) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +"use strict"; +var my_eval = eval; +return my_eval("this") === fnGlobalObject(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-19gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-19gs.js index 2d1c35edcd..f590daf7dd 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-19gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-19gs.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-19gs.js - * @description Strict - checking 'this' from a global scope (indirect eval used within strict mode) - * @onlyStrict - */ - -"use strict"; -var my_eval = eval; -if (my_eval("this") !== fnGlobalObject()) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-19gs +description: > + Strict - checking 'this' from a global scope (indirect eval used + within strict mode) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +"use strict"; +var my_eval = eval; +if (my_eval("this") !== fnGlobalObject()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-2-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-2-s.js index 0efe7fd65d..631ebabf9c 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-2-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-2-s.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-2-s.js - * @description this is not coerced to an object in strict mode (string) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - - return foo.call('1') === 'string' && bar.call('1') === 'object'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-2-s +description: this is not coerced to an object in strict mode (string) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + + return foo.call('1') === 'string' && bar.call('1') === 'object'; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-20-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-20-s.js index 869bc53e4b..1ad0818128 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-20-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-20-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-20-s.js - * @description Strict Mode - checking 'this' (indirect eval includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var my_eval = eval; -return my_eval("\"use strict\";\nthis") === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-20-s +description: > + Strict Mode - checking 'this' (indirect eval includes strict + directive prologue) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var my_eval = eval; +return my_eval("\"use strict\";\nthis") === fnGlobalObject(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-20gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-20gs.js index 48544cb0ea..a8fcd83671 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-20gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-20gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-20gs.js - * @description Strict - checking 'this' from a global scope (indirect eval includes strict directive prologue) - * @onlyStrict - */ - -var my_eval = eval; -if (my_eval("\"use strict\";\nthis") !== fnGlobalObject() ) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-20gs +description: > + Strict - checking 'this' from a global scope (indirect eval + includes strict directive prologue) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +var my_eval = eval; +if (my_eval("\"use strict\";\nthis") !== fnGlobalObject() ) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-21-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-21-s.js index 915f54ce8b..228a9e963c 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-21-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-21-s.js @@ -1,19 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-21-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f() { - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-21-s +description: > + Strict Mode - checking 'this' (New'ed object from + FunctionDeclaration defined within strict mode) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +"use strict"; +function f() { + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-21gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-21gs.js index b126340490..d5adf03166 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-21gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-21gs.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-21gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - -"use strict"; -function f() { - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-21gs +description: > + Strict - checking 'this' from a global scope (New'ed object from + FunctionDeclaration defined within strict mode) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +"use strict"; +function f() { + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-22-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-22-s.js index 55d66e60c2..170c680daf 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-22-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-22-s.js @@ -1,20 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-22-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f() { - "use strict"; - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); - -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-22-s +description: > + Strict Mode - checking 'this' (New'ed object from + FunctionDeclaration includes strict directive prologue) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { + "use strict"; + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); + +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-22gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-22gs.js index 1abde0e2f4..92eacaf004 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-22gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-22gs.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-22gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - -function f() { - "use strict"; - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-22gs +description: > + Strict - checking 'this' from a global scope (New'ed object from + FunctionDeclaration includes strict directive prologue) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { + "use strict"; + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-23-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-23-s.js index b2c40be4f0..9ac3fa3f49 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-23-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-23-s.js @@ -1,20 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-23-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = function () { - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); - -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-23-s +description: > + Strict Mode - checking 'this' (New'ed object from + FunctionExpression defined within strict mode) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +"use strict"; +var f = function () { + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); + +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-23gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-23gs.js index 4aab842916..c3831a6be7 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-23gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-23gs.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-23gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = function () { - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-23gs +description: > + Strict - checking 'this' from a global scope (New'ed object from + FunctionExpression defined within strict mode) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +"use strict"; +var f = function () { + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-24-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-24-s.js index 3499abe4dd..7f25e9960b 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-24-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-24-s.js @@ -1,19 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-24-s.js - * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f = function () { - "use strict"; - return this; -} -return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-24-s +description: > + Strict Mode - checking 'this' (New'ed object from + FunctionExpression includes strict directive prologue) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var f = function () { + "use strict"; + return this; +} +return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined"); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-24gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-24gs.js index 38d5e14909..af9dbfbf93 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-24gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-24gs.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-24gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -var f = function () { - "use strict"; - return this; -} -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-24gs +description: > + Strict - checking 'this' from a global scope (New'ed object from + FunctionExpression includes strict directive prologue) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +var f = function () { + "use strict"; + return this; +} +if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-25-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-25-s.js index 138802f648..ad6d42e836 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-25-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-25-s.js @@ -1,19 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-25-s.js - * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var obj = new (function () { - return this; -}); -return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-25-s +description: > + Strict Mode - checking 'this' (New'ed object from Anonymous + FunctionExpression defined within strict mode) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +"use strict"; +var obj = new (function () { + return this; +}); +return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-25gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-25gs.js index 30ac917cbd..2425d30b62 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-25gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-25gs.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-25gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var obj = new (function () { - return this; -}); -if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { - throw "'this' had incorrect value!"; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-25gs +description: > + Strict - checking 'this' from a global scope (New'ed object from + Anonymous FunctionExpression defined within strict mode) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +"use strict"; +var obj = new (function () { + return this; +}); +if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-26-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-26-s.js index a015f4082f..0872b44701 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-26-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-26-s.js @@ -1,19 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-26-s.js - * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var obj = new (function () { - "use strict"; - return this; -}); -return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-26-s +description: > + Strict Mode - checking 'this' (New'ed object from Anonymous + FunctionExpression includes strict directive prologue) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var obj = new (function () { + "use strict"; + return this; +}); +return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined"); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-26gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-26gs.js index e19bce342d..4f1357c721 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-26gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-26gs.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-26gs.js - * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression includes strict directive prologue) - * @onlyStrict - */ - -var obj = new (function () { - "use strict"; - return this; -}); -if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-26gs +description: > + Strict - checking 'this' from a global scope (New'ed object from + Anonymous FunctionExpression includes strict directive prologue) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +var obj = new (function () { + "use strict"; + return this; +}); +if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-27-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-27-s.js index 54eda820f8..dd5709a115 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-27-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-27-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-27-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f1() { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-27-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + a FunctionDeclaration inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +function f1() { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-27gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-27gs.js index 0cb1cb4f27..102880e9fb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-27gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-27gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-27gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -"use strict"; -function f1() { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-27gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within a FunctionDeclaration inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +function f1() { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-28-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-28-s.js index c2a5578a84..c4dc405e1e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-28-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-28-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-28-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f1() { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-28-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within a + FunctionDeclaration inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +function f1() { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-28gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-28gs.js index 663a18e00c..dc5014ef24 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-28gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-28gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-28gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -"use strict"; -function f1() { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-28gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within a FunctionDeclaration inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +function f1() { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-29-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-29-s.js index 87ea431d7b..25e62e418d 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-29-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-29-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-29-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -function f1() { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-29-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within a FunctionDeclaration inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +function f1() { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-29gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-29gs.js index 416f1b4f33..a148602bbe 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-29gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-29gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-29gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - */ - -"use strict"; -function f1() { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-29gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within a FunctionDeclaration inside + strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +function f1() { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-3-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-3-s.js index 19bafdcff9..b978fcee06 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-3-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-3-s.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-3-s.js - * @description this is not coerced to an object in strict mode (undefined) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - return foo.call(undefined) === 'undefined' && bar.call() === 'object'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-3-s +description: this is not coerced to an object in strict mode (undefined) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + return foo.call(undefined) === 'undefined' && bar.call() === 'object'; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-30-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-30-s.js index b4085931b3..54e527dd11 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-30-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-30-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-30-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f1 = function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-30-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + a FunctionExpression inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var f1 = function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-30gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-30gs.js index ab3c6222d5..5fedb07337 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-30gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-30gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-30gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -var f1 = function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-30gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within a FunctionExpression inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var f1 = function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-31-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-31-s.js index dc32ca19ee..ca989d4b33 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-31-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-31-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-31-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f1 = function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-31-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within a + FunctionExpression inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var f1 = function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-31gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-31gs.js index 1bbb2d1616..aa5284c2e8 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-31gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-31gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-31gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -var f1 = function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-31gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within a FunctionExpression inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var f1 = function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-32-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-32-s.js index 4ba988920d..6a4801c142 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-32-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-32-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-32-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f1 = function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-32-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within a FunctionExpression inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var f1 = function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-32gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-32gs.js index 1cd2ad05ad..b0c542a45b 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-32gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-32gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-32gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -var f1 = function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-32gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within a FunctionExpression inside + strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var f1 = function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-33-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-33-s.js index 6c4d66e2e3..a6104e8ea2 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-33-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-33-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-33-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-33-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + an Anonymous FunctionExpression inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +return (function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-33gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-33gs.js index c288566cb6..83f073aefb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-33gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-33gs.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-33gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -if (! ((function () { - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-33gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within an Anonymous FunctionExpression inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +if (! ((function () { + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-34-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-34-s.js index 9cf25b53dc..94744f6b78 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-34-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-34-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-34-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-34-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within + an Anonymous FunctionExpression inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +return (function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-34gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-34gs.js index 72980aa411..0e94df5251 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-34gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-34gs.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-34gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -if (! ((function () { - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-34gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within an Anonymous FunctionExpression inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +if (! ((function () { + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-35-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-35-s.js index 8f7abb36fc..3d7a2fbd59 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-35-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-35-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-35-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -return (function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-35-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within an Anonymous FunctionExpression inside strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +return (function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-35gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-35gs.js index ecee18fe32..7c67755e1f 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-35gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-35gs.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-35gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - */ - -"use strict"; -if (! ((function () { - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-35gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within an Anonymous FunctionExpression + inside strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +if (! ((function () { + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-36-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-36-s.js index 08bea7cc43..9c88cbe47b 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-36-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-36-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-36-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f1() { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-36-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + a FunctionDeclaration with a strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f1() { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-36gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-36gs.js index 88fab9f20a..71a7f9c2fa 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-36gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-36gs.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-36gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function f1() { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-36gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within a FunctionDeclaration with a strict directive + prologue) +flags: [onlyStrict] +---*/ + +function f1() { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-37-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-37-s.js index 93e7fde288..4330593ff1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-37-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-37-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-37-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f1() { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-37-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within a + FunctionDeclaration with a strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f1() { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-37gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-37gs.js index 795b6032db..4ce9b7cf7e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-37gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-37gs.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-37gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function f1() { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-37gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within a FunctionDeclaration with a strict directive + prologue) +flags: [onlyStrict] +---*/ + +function f1() { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-38-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-38-s.js index f496d4ed08..773a07108b 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-38-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-38-s.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-38-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -function f1() { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-38-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within a FunctionDeclaration with a strict directive + prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f1() { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-38gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-38gs.js index 1c00b742e4..34bd493217 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-38gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-38gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-38gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @onlyStrict - */ - -function f1() { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-38gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within a FunctionDeclaration with a + strict directive prologue) +flags: [onlyStrict] +---*/ + +function f1() { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-39-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-39-s.js index 22478bc26d..20ae974c77 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-39-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-39-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-39-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f1 = function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-39-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + a FunctionExpression with a strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var f1 = function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-39gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-39gs.js index 7ec3adf91a..6ffca51995 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-39gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-39gs.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-39gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -var f1 = function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-39gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within a FunctionExpression with a strict directive + prologue) +flags: [onlyStrict] +---*/ + +var f1 = function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-4-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-4-s.js index 28bd8f0590..292904c9fe 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-4-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-4-s.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-4-s.js - * @description this is not coerced to an object in strict mode (boolean) - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - - return foo.call(true) === 'boolean' && bar.call(true) === 'object'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-4-s +description: this is not coerced to an object in strict mode (boolean) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + + return foo.call(true) === 'boolean' && bar.call(true) === 'object'; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-40-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-40-s.js index b90817f638..3acd6ed16c 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-40-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-40-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-40-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f1 = function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-40-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within a + FunctionExpression with a strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var f1 = function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-40gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-40gs.js index 2d8fbf0ba9..c0ad89dc73 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-40gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-40gs.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-40gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -var f1 = function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-40gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within a FunctionExpression with a strict directive + prologue) +flags: [onlyStrict] +---*/ + +var f1 = function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-41-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-41-s.js index 48495e3929..90acc8f617 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-41-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-41-s.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-41-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var f1 = function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-41-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within a FunctionExpression with a strict directive + prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var f1 = function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-41gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-41gs.js index 43cba61c8e..64d3111cf7 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-41gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-41gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-41gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -var f1 = function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-41gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within a FunctionExpression with a + strict directive prologue) +flags: [onlyStrict] +---*/ + +var f1 = function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-42-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-42-s.js index c4f7058579..65bd712a09 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-42-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-42-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-42-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-42-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + an Anonymous FunctionExpression with a strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +return (function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-42gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-42gs.js index b1802bf160..da586a8dba 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-42gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-42gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-42gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -if (! ((function () { - "use strict"; - function f() { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-42gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within an Anonymous FunctionExpression with a strict + directive prologue) +flags: [onlyStrict] +---*/ + +if (! ((function () { + "use strict"; + function f() { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-43-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-43-s.js index 6575e56b9d..80481f7a75 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-43-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-43-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-43-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-43-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within + an Anonymous FunctionExpression with a strict directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +return (function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-43gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-43gs.js index 0da4b78713..ca6df34cd6 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-43gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-43gs.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-43gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -if (! ((function () { - "use strict"; - var f = function () { - return typeof this; - } - return (f()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-43gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within an Anonymous FunctionExpression with a strict + directive prologue) +flags: [onlyStrict] +---*/ + +if (! ((function () { + "use strict"; + var f = function () { + return typeof this; + } + return (f()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-44-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-44-s.js index b7ac11d8d8..660e2bce15 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-44-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-44-s.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-44-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -function testcase() { -return (function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-44-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression + defined within an Anonymous FunctionExpression with a strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +return (function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-44gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-44gs.js index 2300e4acba..0cea61d533 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-44gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-44gs.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-44gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @onlyStrict - */ - -if (! ((function () { - "use strict"; - return ((function () { - return typeof this; - })()==="undefined") && ((typeof this)==="undefined"); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-44gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression defined within an Anonymous FunctionExpression + with a strict directive prologue) +flags: [onlyStrict] +---*/ + +if (! ((function () { + "use strict"; + return ((function () { + return typeof this; + })()==="undefined") && ((typeof this)==="undefined"); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-45-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-45-s.js index e23f9fef05..ce0c1c5b23 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-45-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-45-s.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-45-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function testcase() { -function f1() { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-45-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration with a strict + directive prologue defined within a FunctionDeclaration) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f1() { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-45gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-45gs.js index ce99d65746..09e1eda85a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-45gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-45gs.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-45gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function f1() { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-45gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + with a strict directive prologue defined within a + FunctionDeclaration) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f1() { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-46-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-46-s.js index 5945b2b215..11fb9fae8b 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-46-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-46-s.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-46-s.js - * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function testcase() { -function f1() { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-46-s +description: > + Strict Mode - checking 'this' (FunctionExpression with a strict + directive prologue defined within a FunctionDeclaration) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f1() { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-46gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-46gs.js index 3d0ddd895c..31e495ab25 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-46gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-46gs.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-46gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function f1() { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-46gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + with a strict directive prologue defined within a + FunctionDeclaration) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f1() { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-47-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-47-s.js index 6a5fe9d407..29fd5c2def 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-47-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-47-s.js @@ -1,21 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-47-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function testcase() { -function f1() { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-47-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression with a + strict directive prologue defined within a FunctionDeclaration) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f1() { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-47gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-47gs.js index 78884f8c6b..28dd225794 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-47gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-47gs.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-47gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - */ - -function f1() { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-47gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression with a strict directive prologue defined within + a FunctionDeclaration) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f1() { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-48-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-48-s.js index 3c4d49af4c..2792091475 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-48-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-48-s.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-48-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -function testcase() { -var f1 = function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-48-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration with a strict + directive prologue defined within a FunctionExpression) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var f1 = function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-48gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-48gs.js index b6d619176a..c6b8efd599 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-48gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-48gs.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-48gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -var f1 = function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-48gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + with a strict directive prologue defined within a + FunctionExpression) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +var f1 = function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-49-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-49-s.js index 3ae616eaa2..f8e9e34191 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-49-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-49-s.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-49-s.js - * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -function testcase() { -var f1 = function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-49-s +description: > + Strict Mode - checking 'this' (FunctionExpression with a strict + directive prologue defined within a FunctionExpression) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var f1 = function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-49gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-49gs.js index d6aee3a918..e10adc97de 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-49gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-49gs.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-49gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -var f1 = function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-49gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + with a strict directive prologue defined within a + FunctionExpression) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +var f1 = function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-5-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-5-s.js index 5d64cea6b7..d8daeb83d1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-5-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-5-s.js @@ -1,32 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-5-s.js - * @description this is not coerced to an object in strict mode (function) - * @onlyStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return typeof(this); - } - - function bar() - { - return typeof(this); - } - - function foobar() - { - } - - return foo.call(foobar) === 'function' && bar.call(foobar) === 'function'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-5-s +description: this is not coerced to an object in strict mode (function) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return typeof(this); + } + + function bar() + { + return typeof(this); + } + + function foobar() + { + } + + return foo.call(foobar) === 'function' && bar.call(foobar) === 'function'; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-50-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-50-s.js index ad273ecb1f..3f748296bf 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-50-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-50-s.js @@ -1,21 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-50-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -function testcase() { -var f1 = function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -return f1(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-50-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression with a + strict directive prologue defined within a FunctionExpression) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +var f1 = function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +return f1(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-50gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-50gs.js index 21cd879efa..c189abc6b5 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-50gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-50gs.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-50gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - */ - -var f1 = function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -} -if (! f1()) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-50gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression with a strict directive prologue defined within + a FunctionExpression) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +var f1 = function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +} +if (! f1()) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-51-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-51-s.js index e8935366e0..7a933541e3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-51-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-51-s.js @@ -1,21 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-51-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -function testcase() { -return (function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-51-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration with a strict + directive prologue defined within an Anonymous FunctionExpression) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +return (function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-51gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-51gs.js index 52f8e35a6a..ed01025808 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-51gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-51gs.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-51gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -if (! ((function () { - function f() { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-51gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + with a strict directive prologue defined within an Anonymous + FunctionExpression) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +if (! ((function () { + function f() { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-52-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-52-s.js index b2c3a00820..06fe64f31e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-52-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-52-s.js @@ -1,21 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-52-s.js - * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -function testcase() { -return (function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-52-s +description: > + Strict Mode - checking 'this' (FunctionExpression with a strict + directive prologue defined within an Anonymous FunctionExpression) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +return (function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-52gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-52gs.js index cc617750d2..3e6f626fa3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-52gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-52gs.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-52gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -if (! ((function () { - var f = function () { - "use strict"; - return typeof this; - } - return (f()==="undefined") && (this===fnGlobalObject()); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-52gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + with a strict directive prologue defined within an Anonymous + FunctionExpression) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +if (! ((function () { + var f = function () { + "use strict"; + return typeof this; + } + return (f()==="undefined") && (this===fnGlobalObject()); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-53-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-53-s.js index 2324bf44f6..245b52da48 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-53-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-53-s.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-53-s.js - * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -function testcase() { -return (function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-53-s +description: > + Strict Mode - checking 'this' (Anonymous FunctionExpression with a + strict directive prologue defined within an Anonymous + FunctionExpression) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +return (function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-53gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-53gs.js index 0c6581f2e1..7e57820a72 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-53gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-53gs.js @@ -1,19 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-53gs.js - * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - */ - -if (! ((function () { - return ((function () { - "use strict"; - return typeof this; - })()==="undefined") && (this===fnGlobalObject()); -})())) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-53gs +description: > + Strict - checking 'this' from a global scope (Anonymous + FunctionExpression with a strict directive prologue defined within + an Anonymous FunctionExpression) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +if (! ((function () { + return ((function () { + "use strict"; + return typeof this; + })()==="undefined") && (this===fnGlobalObject()); +})())) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-54-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-54-s.js index ac481d6109..9f8a6f2167 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-54-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-54-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-54-s.js - * @description Strict Mode - checking 'this' (Literal getter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var o = { get foo() { return this; } } -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-54-s +description: > + Strict Mode - checking 'this' (Literal getter defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var o = { get foo() { return this; } } +return o.foo===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-54gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-54gs.js index 571ad634e9..ee92de2484 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-54gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-54gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-54gs.js - * @description Strict - checking 'this' from a global scope (Literal getter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var o = { get foo() { return this; } } -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-54gs +description: > + Strict - checking 'this' from a global scope (Literal getter + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var o = { get foo() { return this; } } +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-55-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-55-s.js index 49acc2d11b..222e89cc19 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-55-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-55-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-55-s.js - * @description Strict Mode - checking 'this' (Literal getter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var o = { get foo() { "use strict"; return this; } } -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-55-s +description: > + Strict Mode - checking 'this' (Literal getter includes strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = { get foo() { "use strict"; return this; } } +return o.foo===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-55gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-55gs.js index ab3ccbbc54..5b3e03cdf0 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-55gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-55gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-55gs.js - * @description Strict - checking 'this' from a global scope (Literal getter includes strict directive prologue) - * @onlyStrict - */ - -var o = { get foo() { "use strict"; return this; } } -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-55gs +description: > + Strict - checking 'this' from a global scope (Literal getter + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var o = { get foo() { "use strict"; return this; } } +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-56-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-56-s.js index 1a492c4620..700670aad1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-56-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-56-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-56-s.js - * @description Strict Mode - checking 'this' (Literal setter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var x = 2; -var o = { set foo(stuff) { x=this; } } -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-56-s +description: > + Strict Mode - checking 'this' (Literal setter defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var x = 2; +var o = { set foo(stuff) { x=this; } } +o.foo = 3; +return x===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-56gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-56gs.js index 7ea7c7a3f5..421c0960fa 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-56gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-56gs.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-56gs.js - * @description Strict - checking 'this' from a global scope (Literal setter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var x = 2; -var o = { set foo(stuff) { x=this; } } -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-56gs +description: > + Strict - checking 'this' from a global scope (Literal setter + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var x = 2; +var o = { set foo(stuff) { x=this; } } +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-57-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-57-s.js index bcd4ef62cf..ef95dc9635 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-57-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-57-s.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-57-s.js - * @description Strict Mode - checking 'this' (Literal setter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var x = 2; -var o = { set foo(stuff) { "use strict"; x=this; } } -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-57-s +description: > + Strict Mode - checking 'this' (Literal setter includes strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var x = 2; +var o = { set foo(stuff) { "use strict"; x=this; } } +o.foo = 3; +return x===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-57gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-57gs.js index e59df33573..abffec5fc1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-57gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-57gs.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-57gs.js - * @description Strict - checking 'this' from a global scope (Literal setter includes strict directive prologue) - * @onlyStrict - */ - -var x = 2; -var o = { set foo(stuff) { "use strict"; x=this; } } -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-57gs +description: > + Strict - checking 'this' from a global scope (Literal setter + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var x = 2; +var o = { set foo(stuff) { "use strict"; x=this; } } +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-58-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-58-s.js index 964f8d4358..e442dc2ccb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-58-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-58-s.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-58-s.js - * @description Strict Mode - checking 'this' (Injected getter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var o = {}; -Object.defineProperty(o, "foo", { get: function() { return this; } }); -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-58-s +description: > + Strict Mode - checking 'this' (Injected getter defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var o = {}; +Object.defineProperty(o, "foo", { get: function() { return this; } }); +return o.foo===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-58gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-58gs.js index 166e440795..5288ad37b1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-58gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-58gs.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-58gs.js - * @description Strict - checking 'this' from a global scope (Injected getter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var o = {}; -Object.defineProperty(o, "foo", { get : function() { return this; } }); -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-58gs +description: > + Strict - checking 'this' from a global scope (Injected getter + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var o = {}; +Object.defineProperty(o, "foo", { get : function() { return this; } }); +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-59-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-59-s.js index 7d0afddf50..1e3aa9e36d 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-59-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-59-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-59-s.js - * @description Strict Mode - checking 'this' (Injected getter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var o = {}; -Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); -return o.foo===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-59-s +description: > + Strict Mode - checking 'this' (Injected getter includes strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); +return o.foo===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-59gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-59gs.js index 09e1d06487..e1b367a787 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-59gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-59gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-59gs.js - * @description Strict - checking 'this' from a global scope (Injected getter includes strict directive prologue) - * @onlyStrict - */ - -var o = {}; -Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); -if (o.foo!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-59gs +description: > + Strict - checking 'this' from a global scope (Injected getter + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var o = {}; +Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } }); +if (o.foo!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-60-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-60-s.js index 1bd803beec..9f7ef7bc90 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-60-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-60-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-60-s.js - * @description Strict Mode - checking 'this' (Injected setter defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-60-s +description: > + Strict Mode - checking 'this' (Injected setter defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); +o.foo = 3; +return x===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-60gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-60gs.js index 09053dbd18..da480d381d 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-60gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-60gs.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-60gs.js - * @description Strict - checking 'this' from a global scope (Injected setter defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-60gs +description: > + Strict - checking 'this' from a global scope (Injected setter + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } }); +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-61-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-61-s.js index 23586b2507..cdeed96007 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-61-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-61-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-61-s.js - * @description Strict Mode - checking 'this' (Injected setter includes strict directive prologue) - * @onlyStrict - */ - -function testcase() { -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); -o.foo = 3; -return x===o; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-61-s +description: > + Strict Mode - checking 'this' (Injected setter includes strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); +o.foo = 3; +return x===o; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-61gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-61gs.js index 2d31c32d8a..ee4b3641c3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-61gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-61gs.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-61gs.js - * @description Strict - checking 'this' from a global scope (Injected setter includes strict directive prologue) - * @onlyStrict - */ - -var o = {}; -var x = 2; -Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); -o.foo = 3; -if (x!==o) { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-61gs +description: > + Strict - checking 'this' from a global scope (Injected setter + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +var o = {}; +var x = 2; +Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } }); +o.foo = 3; +if (x!==o) { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-62-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-62-s.js index a2e3c0bb89..c8c42d2b93 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-62-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-62-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-62-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict function declaration) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -function foo() { return f();} -return foo()===undefined; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-62-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by non-strict function declaration) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this;}; +function foo() { return f();} +return foo()===undefined; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-62gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-62gs.js index 9cd2ae0e76..4e859faee3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-62gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-62gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-62gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict function declaration) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -function foo() { return f();} -if (foo()!==undefined){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-62gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by non-strict function declaration) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this;}; +function foo() { return f();} +if (foo()!==undefined){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-63-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-63-s.js index 5b93d280bd..69de47905c 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-63-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-63-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-63-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict eval) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return eval("f();"); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-63-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by non-strict eval) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return eval("f();"); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-63gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-63gs.js index 07f7a9ceef..5e6bb27f21 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-63gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-63gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-63gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict eval) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! eval("f();")){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-63gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by non-strict eval) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! eval("f();")){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-64-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-64-s.js index ddb042449c..d37732fcc1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-64-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-64-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-64-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict Function constructor) - * @onlyStrict - */ - -function testcase() { -fnGlobalObject().f = function() { "use strict"; return this===undefined;}; -return Function("return f();")(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-64-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by non-strict Function constructor) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +fnGlobalObject().f = function() { "use strict"; return this===undefined;}; +return Function("return f();")(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-64gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-64gs.js index 6877c83413..e2e5f1c45b 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-64gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-64gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-64gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict Function constructor) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! (Function("return f();")())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-64gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by non-strict Function constructor) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! (Function("return f();")())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-65-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-65-s.js index 5b0f20a65f..97eeb9d86e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-65-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-65-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-65-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by non-strict new'ed Function constructor) - * @onlyStrict - */ - -function testcase() { -fnGlobalObject().f = function() { "use strict"; return this===undefined;}; -return (new Function("return f();"))(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-65-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by non-strict new'ed Function constructor) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +fnGlobalObject().f = function() { "use strict"; return this===undefined;}; +return (new Function("return f();"))(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-65gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-65gs.js index 567a123604..c3ee2c53cb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-65gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-65gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-65gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict new'ed Function constructor) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! ( (new Function("return f();")) () )){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-65gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by non-strict new'ed Function constructor) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! ( (new Function("return f();")) () )){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-66-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-66-s.js index 3b44018277..7296d2e0fa 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-66-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-66-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-66-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.apply(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-66-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.apply()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.apply(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-66gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-66gs.js index 29a609b7a9..3509879da7 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-66gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-66gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-66gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.apply()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-66gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.apply()) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! f.apply()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-67-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-67-s.js index baf57dc0c8..62e0ca57c1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-67-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-67-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-67-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(null)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===null;}; -return f.apply(null); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-67-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.apply(null)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===null;}; +return f.apply(null); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-67gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-67gs.js index 9122b9fdec..01ca6dcc00 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-67gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-67gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-67gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(null)) - * @onlyStrict - */ - -function f() { "use strict"; return this===null;}; -if (! f.apply(null)){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-67gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.apply(null)) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===null;}; +if (! f.apply(null)){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-68-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-68-s.js index 10a5294e10..8ca7afcd8e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-68-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-68-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-68-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(undefined)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.apply(undefined); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-68-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.apply(undefined)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.apply(undefined); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-68gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-68gs.js index 5bfeee3f05..cf4b35f66a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-68gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-68gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-68gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(undefined)) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.apply(undefined)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-68gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.apply(undefined)) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! f.apply(undefined)){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-69-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-69-s.js index 8db3b94ce7..abeab46c1a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-69-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-69-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-69-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { "use strict"; return this===o;}; -return f.apply(o); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-69-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.apply(someObject)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +function f() { "use strict"; return this===o;}; +return f.apply(o); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-69gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-69gs.js index f32b45575c..a16e0ba4ab 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-69gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-69gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-69gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { "use strict"; return this===o;}; -if (! f.apply(o)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-69gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.apply(someObject)) +flags: [onlyStrict] +---*/ + +var o = {}; +function f() { "use strict"; return this===o;}; +if (! f.apply(o)){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-7-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-7-s.js index ae370f766e..7570eaacfc 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-7-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-7-s.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-7-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - - -function testcase() { -"use strict"; -function f() { - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-7-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +function f() { + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-70-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-70-s.js index d1bf918ee8..717e2d4841 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-70-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-70-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-70-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -return f.apply(fnGlobalObject()) === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-70-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.apply(globalObject)) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { "use strict"; return this;}; +return f.apply(fnGlobalObject()) === fnGlobalObject(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-70gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-70gs.js index 0044b8afd7..c72d8146a4 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-70gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-70gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-70gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -if (f.apply(fnGlobalObject()) !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-70gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.apply(globalObject)) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { "use strict"; return this;}; +if (f.apply(fnGlobalObject()) !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-71-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-71-s.js index 5fe5dcba30..2bc18a157a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-71-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-71-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-71-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.call(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-71-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.call()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.call(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-71gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-71gs.js index c978be9ad8..0e9f4e3239 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-71gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-71gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-71gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.call()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-71gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.call()) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! f.call()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-72-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-72-s.js index b9c669291c..18d97c980c 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-72-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-72-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-72-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(null)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===null;}; -return f.call(null); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-72-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.call(null)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===null;}; +return f.call(null); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-72gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-72gs.js index 49ca243d1f..02970c77a9 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-72gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-72gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-72gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(null)) - * @onlyStrict - */ - -function f() { "use strict"; return this===null;}; -if (! f.call(null)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-72gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.call(null)) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===null;}; +if (! f.call(null)){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-73-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-73-s.js index e04b5d7be5..79e1842cf9 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-73-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-73-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-73-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(undefined)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.call(undefined); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-73-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.call(undefined)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.call(undefined); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-73gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-73gs.js index 10a3176db8..57470bf823 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-73gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-73gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-73gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(undefined)) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! f.call(undefined)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-73gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.call(undefined)) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! f.call(undefined)){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-74-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-74-s.js index 7e2d746e3a..5dafb56c37 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-74-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-74-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-74-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { "use strict"; return this===o;}; -return f.call(o); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-74-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.call(someObject)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +function f() { "use strict"; return this===o;}; +return f.call(o); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-74gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-74gs.js index 27a73d67f8..74fa570893 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-74gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-74gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-74gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { "use strict"; return this===o;}; -if (! f.call(o)){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-74gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.call(someObject)) +flags: [onlyStrict] +---*/ + +var o = {}; +function f() { "use strict"; return this===o;}; +if (! f.call(o)){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-75-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-75-s.js index fa8f4d4b08..f86c4860fd 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-75-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-75-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-75-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -return f.call(fnGlobalObject()) === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-75-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.call(globalObject)) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { "use strict"; return this;}; +return f.call(fnGlobalObject()) === fnGlobalObject(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-75gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-75gs.js index 3df699177b..a5b7b3b5de 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-75gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-75gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-75gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -if (f.call(fnGlobalObject()) !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-75gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.call(globalObject)) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { "use strict"; return this;}; +if (f.call(fnGlobalObject()) !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-76-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-76-s.js index 7918f0dfae..b2232543c4 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-76-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-76-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-76-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind()()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.bind()(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-76-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.bind()()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.bind()(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-76gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-76gs.js index f61d0e324e..8473b15a75 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-76gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-76gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-76gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind()()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! (f.bind()())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-76gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.bind()()) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! (f.bind()())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-77-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-77-s.js index fb5614dd9a..d9ee6394c7 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-77-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-77-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-77-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(null)()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===null;}; -return f.bind(null)(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-77-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.bind(null)()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===null;}; +return f.bind(null)(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-77gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-77gs.js index 51d38c3985..5cce027e02 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-77gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-77gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-77gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(null)()) - * @onlyStrict - */ - -function f() { "use strict"; return this===null;}; -if (! (f.bind(null)())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-77gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.bind(null)()) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===null;}; +if (! (f.bind(null)())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-78-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-78-s.js index 3d50f279c9..1f5fe727bb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-78-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-78-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-78-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(undefined)()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this===undefined;}; -return f.bind(undefined)(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-78-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.bind(undefined)()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { "use strict"; return this===undefined;}; +return f.bind(undefined)(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-78gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-78gs.js index 8d67642faf..c2e54acbcb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-78gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-78gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-78gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(undefined)()) - * @onlyStrict - */ - -function f() { "use strict"; return this===undefined;}; -if (! (f.bind(undefined)())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-78gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.bind(undefined)()) +flags: [onlyStrict] +---*/ + +function f() { "use strict"; return this===undefined;}; +if (! (f.bind(undefined)())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-79-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-79-s.js index 5dace0a459..520db0f9a5 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-79-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-79-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-79-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { "use strict"; return this===o;}; -return f.bind(o)(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-79-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.bind(someObject)()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +function f() { "use strict"; return this===o;}; +return f.bind(o)(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-79gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-79gs.js index a347c004a8..0a5c6c0b86 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-79gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-79gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-79gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -var o = {}; -function f() { "use strict"; return this===o;}; -if (! (f.bind(o)())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-79gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.bind(someObject)()) +flags: [onlyStrict] +---*/ + +var o = {}; +function f() { "use strict"; return this===o;}; +if (! (f.bind(o)())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-7gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-7gs.js index 23b1c05839..40707ae2be 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-7gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-7gs.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-7gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within strict mode) - * @onlyStrict - */ - -"use strict"; -function f() { - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-7gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +function f() { + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-8-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-8-s.js index 7d6beaa1ac..5734cbb02d 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-8-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-8-s.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-8-s.js - * @description Strict Mode - checking 'this' (FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - - -function testcase() { -function f() { - "use strict"; - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-8-s +description: > + Strict Mode - checking 'this' (FunctionDeclaration includes strict + directive prologue) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { + "use strict"; + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-80-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-80-s.js index 86951b61ac..81587d5862 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-80-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-80-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-80-s.js - * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function testcase() { -function f() { "use strict"; return this;}; -return f.bind(fnGlobalObject())() === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-80-s +description: > + Strict Mode - checking 'this' (strict function declaration called + by Function.prototype.bind(globalObject)()) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { "use strict"; return this;}; +return f.bind(fnGlobalObject())() === fnGlobalObject(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-80gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-80gs.js index e3ed02e6a9..6e98c030d3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-80gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-80gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-80gs.js - * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function f() { "use strict"; return this;}; -if (f.bind(fnGlobalObject())() !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-80gs +description: > + Strict - checking 'this' from a global scope (strict function + declaration called by Function.prototype.bind(globalObject)()) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { "use strict"; return this;}; +if (f.bind(fnGlobalObject())() !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-81-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-81-s.js index 61be6b784f..21b7f8ee94 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-81-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-81-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-81-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict function declaration) - * @noStrict - */ - -function testcase() { -function f() { return this!==undefined;}; -function foo() { "use strict"; return f();} -return foo(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-81-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict function declaration) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { return this!==undefined;}; +function foo() { "use strict"; return f();} +return foo(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-81gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-81gs.js index 0544e0cd76..097a8ad3cc 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-81gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-81gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-81gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict function declaration) - * @noStrict - */ - -function f() { return this!==undefined;}; -function foo() { "use strict"; return f();} -if (! foo()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-81gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict function declaration) +flags: [noStrict] +---*/ + +function f() { return this!==undefined;}; +function foo() { "use strict"; return f();} +if (! foo()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-82-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-82-s.js index 0a2b166005..a46160d3ad 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-82-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-82-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-82-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict eval) - * @noStrict - */ - -function testcase() { -function f() { return this!==undefined;}; -return (function () {"use strict"; return eval("f();");})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-82-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict eval) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { return this!==undefined;}; +return (function () {"use strict"; return eval("f();");})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-82gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-82gs.js index 305435eebb..64069cfd92 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-82gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-82gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-82gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict eval) - * @noStrict - */ - -function f() { return this!==undefined;}; -if (! ((function () {"use strict"; return eval("f();");})()) ){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-82gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict eval) +flags: [noStrict] +---*/ + +function f() { return this!==undefined;}; +if (! ((function () {"use strict"; return eval("f();");})()) ){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-83-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-83-s.js index f03adeff56..e5c69968da 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-83-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-83-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-83-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function constructor) - * @noStrict - */ - -function testcase() { -fnGlobalObject().f = function() {return this!==undefined;}; -return (function () {return Function("\"use strict\";return f();")();})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-83-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function constructor) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +fnGlobalObject().f = function() {return this!==undefined;}; +return (function () {return Function("\"use strict\";return f();")();})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-83gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-83gs.js index dfe59d84e7..ea0b70b2db 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-83gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-83gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-83gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function constructor) - * @noStrict - */ - -function f() {return this!==undefined;}; -if (! ((function () {return Function("\"use strict\";return f();")();})()) ){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-83gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function constructor) +flags: [noStrict] +---*/ + +function f() {return this!==undefined;}; +if (! ((function () {return Function("\"use strict\";return f();")();})()) ){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-84-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-84-s.js index 8078178462..e583539aea 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-84-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-84-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-84-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict new'ed Function constructor) - * @noStrict - */ - -function testcase() { -fnGlobalObject().f = function() { return this!==undefined;}; -return (function () {return new Function("\"use strict\";return f();")();})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-84-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict new'ed Function constructor) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +fnGlobalObject().f = function() { return this!==undefined;}; +return (function () {return new Function("\"use strict\";return f();")();})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-84gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-84gs.js index 23a20910d8..afad190985 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-84gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-84gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-84gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict new'ed Function constructor) - * @noStrict - */ - -function f() { return this!==undefined;}; -if (! ((function () {return new Function("\"use strict\";return f();")();})()) ){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-84gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict new'ed Function constructor) +flags: [noStrict] +---*/ + +function f() { return this!==undefined;}; +if (! ((function () {return new Function("\"use strict\";return f();")();})()) ){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-85-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-85-s.js index abdb33b92a..134e4c7300 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-85-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-85-s.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-85-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply()) - * @noStrict - */ - -function testcase() { -function f() { return this!==undefined;}; -return (function () {"use strict"; return f.apply();})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-85-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.apply()) +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +function f() { return this!==undefined;}; +return (function () {"use strict"; return f.apply();})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-85gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-85gs.js index 093115f32f..7d75208fe3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-85gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-85gs.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-85gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply()) - * @noStrict - */ - -function f() { return this!==undefined;}; -if (! ((function () {"use strict"; return f.apply();})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-85gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.apply()) +flags: [noStrict] +---*/ + +function f() { return this!==undefined;}; +if (! ((function () {"use strict"; return f.apply();})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-86-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-86-s.js index fca8007f33..594c02efa6 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-86-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-86-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-86-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(null)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.apply(null);})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-86-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.apply(null)) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.apply(null);})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-86gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-86gs.js index f1e23cce2b..92ee3eee63 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-86gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-86gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-86gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(null)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.apply(null);})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-86gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.apply(null)) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.apply(null);})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-87-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-87-s.js index be4505ace2..ee70fd3198 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-87-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-87-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-87-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(undefined)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject()}; -return (function () {"use strict"; return f.apply(undefined);})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-87-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.apply(undefined)) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject()}; +return (function () {"use strict"; return f.apply(undefined);})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-87gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-87gs.js index af76c9a8be..925c1c8d2e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-87gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-87gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-87gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(undefined)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.apply(undefined);})())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-87gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.apply(undefined)) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.apply(undefined);})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-88-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-88-s.js index 72c4245678..b8a408f5b0 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-88-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-88-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-88-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { return this===o;}; -return (function () {"use strict"; return f.apply(o);})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-88-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.apply(someObject)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +function f() { return this===o;}; +return (function () {"use strict"; return f.apply(o);})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-88gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-88gs.js index 8b85f6993e..b2f0c62788 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-88gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-88gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-88gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { return this===o;}; -if (! ((function () {"use strict"; return f.apply(o);})())){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-88gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.apply(someObject)) +flags: [onlyStrict] +---*/ + +var o = {}; +function f() { return this===o;}; +if (! ((function () {"use strict"; return f.apply(o);})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-89-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-89-s.js index 451851d5b5..8bf1f4e944 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-89-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-89-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-89-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { return this;}; -return (function () {"use strict"; return f.apply(fnGlobalObject()); })() === fnGlobalObject(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-89-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.apply(globalObject)) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this;}; +return (function () {"use strict"; return f.apply(fnGlobalObject()); })() === fnGlobalObject(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-89gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-89gs.js index 68f415a642..0169f6b159 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-89gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-89gs.js @@ -1,15 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-89gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(globalObject)) - * @onlyStrict - */ - -function f() { return this;}; -if ((function () {"use strict"; return f.apply(fnGlobalObject());})() !== fnGlobalObject()){ - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-89gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict + Function.prototype.apply(globalObject)) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this;}; +if ((function () {"use strict"; return f.apply(fnGlobalObject());})() !== fnGlobalObject()){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-8gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-8gs.js index 814fb7ec71..aa1c852974 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-8gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-8gs.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-8gs.js - * @description Strict - checking 'this' from a global scope (FunctionDeclaration includes strict directive prologue) - * @onlyStrict - */ - -function f() { - "use strict"; - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-8gs +description: > + Strict - checking 'this' from a global scope (FunctionDeclaration + includes strict directive prologue) +flags: [onlyStrict] +---*/ + +function f() { + "use strict"; + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-9-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-9-s.js index 38ca374e73..9a27cdfdfe 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-9-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-9-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-9-s.js - * @description Strict Mode - checking 'this' (FunctionExpression defined within strict mode) - * @onlyStrict - */ - -function testcase() { -"use strict"; -var f = function () { - return typeof this; -} -return f() === "undefined"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-9-s +description: > + Strict Mode - checking 'this' (FunctionExpression defined within + strict mode) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +"use strict"; +var f = function () { + return typeof this; +} +return f() === "undefined"; +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-90-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-90-s.js index 0b6a4b3f12..6a4c20c696 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-90-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-90-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-90-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(); })(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-90-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.call()) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(); })(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-90gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-90gs.js index 78a91247fa..18ec5b7ca4 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-90gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-90gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-90gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call();})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-90gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.call()) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call();})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-91-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-91-s.js index 2dc4007e9a..4979b4df1a 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-91-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-91-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-91-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(null)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(null); })(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-91-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.call(null)) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(null); })(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-91gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-91gs.js index c1052a773f..ec3cac5bd7 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-91gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-91gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-91gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(null)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(null); })())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-91gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.call(null)) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call(null); })())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-92-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-92-s.js index 3a04a7b6fa..b06a2691d9 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-92-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-92-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-92-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(undefined)) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(undefined);})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-92-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.call(undefined)) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(undefined);})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-92gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-92gs.js index 4517302f35..1344bb81c3 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-92gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-92gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-92gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(undefined)) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(undefined);})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-92gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.call(undefined)) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call(undefined);})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-93-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-93-s.js index e8da599e75..840a130ad7 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-93-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-93-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-93-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(someObject)) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { return this===o;}; -return (function () {"use strict"; return f.call(o); })(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-93-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.call(someObject)) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +function f() { return this===o;}; +return (function () {"use strict"; return f.call(o); })(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-93gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-93gs.js index 44bd495b4f..0342a02fbd 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-93gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-93gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-93gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(someObject)) - * @onlyStrict - */ - -var o = {}; -function f() { return this===o;}; -if (! ((function () {"use strict"; return f.call(o); })())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-93gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.call(someObject)) +flags: [onlyStrict] +---*/ + +var o = {}; +function f() { return this===o;}; +if (! ((function () {"use strict"; return f.call(o); })())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-94-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-94-s.js index 655ac9e76d..8402303723 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-94-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-94-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-94-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.call(fnGlobalObject());})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-94-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.call(globalObject)) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.call(fnGlobalObject());})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-94gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-94gs.js index e752c688e9..bfa23d5772 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-94gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-94gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-94gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(globalObject)) - * @onlyStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(fnGlobalObject());})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-94gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.call(globalObject)) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.call(fnGlobalObject());})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-95-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-95-s.js index db48e89d9c..d4f2fe2529 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-95-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-95-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-95-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind()()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind()(); })(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-95-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.bind()()) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind()(); })(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-95gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-95gs.js index 5d5fc09b80..c427a3cb90 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-95gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-95gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-95gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind()()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind()(); })())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-95gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.bind()()) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind()(); })())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-96-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-96-s.js index 3c4e652c3c..e319495bfb 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-96-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-96-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-96-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(null)()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind(null)(); })(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-96-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.bind(null)()) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind(null)(); })(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-96gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-96gs.js index cbfe417c4b..16d81f3175 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-96gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-96gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-96gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(null)()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(null)(); })())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-96gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.bind(null)()) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind(null)(); })())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-97-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-97-s.js index feac73bd63..3159e50575 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-97-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-97-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-97-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(undefined)()) - * @noStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind(undefined)();})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-97-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.bind(undefined)()) +flags: [noStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind(undefined)();})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-97gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-97gs.js index 1e79dd96e1..72f600a65e 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-97gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-97gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-97gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(undefined)()) - * @noStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(undefined)(); })())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-97gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.bind(undefined)()) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind(undefined)(); })())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-98-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-98-s.js index 1c07cafc69..d7338692b1 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-98-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-98-s.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-98-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -function testcase() { -var o = {}; -function f() { return this===o;}; -return (function () {"use strict"; return f.bind(o)();})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-98-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.bind(someObject)()) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { +var o = {}; +function f() { return this===o;}; +return (function () {"use strict"; return f.bind(o)();})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-98gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-98gs.js index c72e9dcc6f..fe85d50020 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-98gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-98gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-98gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(someObject)()) - * @onlyStrict - */ - -var o = {}; -function f() { return this===o;}; -if (! ((function () {"use strict"; return f.bind(o)();})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-98gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict Function.prototype.bind(someObject)()) +flags: [onlyStrict] +---*/ + +var o = {}; +function f() { return this===o;}; +if (! ((function () {"use strict"; return f.bind(o)();})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-99-s.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-99-s.js index 47b1dac4d2..5381391a53 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-99-s.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-99-s.js @@ -1,16 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-99-s.js - * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function testcase() { -function f() { return this===fnGlobalObject();}; -return (function () {"use strict"; return f.bind(fnGlobalObject())();})(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-99-s +description: > + Strict Mode - checking 'this' (non-strict function declaration + called by strict Function.prototype.bind(globalObject)()) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { +function f() { return this===fnGlobalObject();}; +return (function () {"use strict"; return f.bind(fnGlobalObject())();})(); +} +runTestCase(testcase); diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-99gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-99gs.js index 5e9730d9f3..20e1d7c459 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-99gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-99gs.js @@ -1,15 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-99gs.js - * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) - * @onlyStrict - */ - -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(fnGlobalObject())();})())){ - throw "'this' had incorrect value!"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-99gs +description: > + Strict - checking 'this' from a global scope (non-strict function + declaration called by strict + Function.prototype.bind(globalObject)()) +flags: [onlyStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return this===fnGlobalObject();}; +if (! ((function () {"use strict"; return f.bind(fnGlobalObject())();})())){ + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/10.4.3-1-9gs.js b/test/suite/ch10/10.4/10.4.3/10.4.3-1-9gs.js index 56c150c897..d701b00c16 100644 --- a/test/suite/ch10/10.4/10.4.3/10.4.3-1-9gs.js +++ b/test/suite/ch10/10.4/10.4.3/10.4.3-1-9gs.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.4/10.4.3/10.4.3-1-9gs.js - * @description Strict - checking 'this' from a global scope (FunctionExpression defined within strict mode) - * @onlyStrict - */ - -"use strict"; -var f = function () { - return typeof this; -} -if (f() !== "undefined") { - throw "'this' had incorrect value!"; -} \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.4.3-1-9gs +description: > + Strict - checking 'this' from a global scope (FunctionExpression + defined within strict mode) +flags: [onlyStrict] +---*/ + +"use strict"; +var f = function () { + return typeof this; +} +if (f() !== "undefined") { + throw "'this' had incorrect value!"; +} diff --git a/test/suite/ch10/10.4/10.4.3/S10.4.3_A1.js b/test/suite/ch10/10.4/10.4.3/S10.4.3_A1.js index ea2432219a..447ab46d5e 100644 --- a/test/suite/ch10/10.4/10.4.3/S10.4.3_A1.js +++ b/test/suite/ch10/10.4/10.4.3/S10.4.3_A1.js @@ -1,16 +1,16 @@ // Copyright 2011 Google, Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch10/10.4/10.4.3/S10.4.3_A1.js - * @description When calling a strict anonymous function as a - * function, "this" should be bound to undefined. - * @onlyStrict - */ +/*--- +es5id: 10.4.3_A1 +description: > + When calling a strict anonymous function as a function, "this" + should be bound to undefined. +flags: [onlyStrict] +---*/ "use strict"; var that = (function() { return this; })(); if (that !== undefined) { $ERROR('#1: "this" leaked as: ' + that); } - diff --git a/test/suite/ch10/10.4/S10.4A1.1_T2.js b/test/suite/ch10/10.4/S10.4A1.1_T2.js index 080aad06ab..21060a8f19 100644 --- a/test/suite/ch10/10.4/S10.4A1.1_T2.js +++ b/test/suite/ch10/10.4/S10.4A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every function call enters a new execution context - * - * @path ch10/10.4/S10.4A1.1_T2.js - * @description Recursive function call - */ +/*--- +info: Every function call enters a new execution context +es5id: 10.4A1.1_T2 +description: Recursive function call +---*/ var y; @@ -30,4 +29,3 @@ y = f(0); if(!(y === undefined)){ $ERROR("#1: Recursive function calls shares execution context"); } - diff --git a/test/suite/ch10/10.4/S10.4_A1.1_T1.js b/test/suite/ch10/10.4/S10.4_A1.1_T1.js index 408d507706..d44b753e3c 100644 --- a/test/suite/ch10/10.4/S10.4_A1.1_T1.js +++ b/test/suite/ch10/10.4/S10.4_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every function call enters a new execution context - * - * @path ch10/10.4/S10.4_A1.1_T1.js - * @description Sequence of function calls - */ +/*--- +info: Every function call enters a new execution context +es5id: 10.4_A1.1_T1 +description: Sequence of function calls +---*/ var y; @@ -28,4 +27,3 @@ y = f(); if(!(y === 0)){ $ERROR("#1: Sequenced function calls shares execution context"); } - diff --git a/test/suite/ch10/10.5/10.5-1-s.js b/test/suite/ch10/10.5/10.5-1-s.js index fc841a5e40..8d4f6947c3 100644 --- a/test/suite/ch10/10.5/10.5-1-s.js +++ b/test/suite/ch10/10.5/10.5-1-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-1-s.js - * @description Strict Mode - arguments object is immutable - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - (function fun() { - eval("arguments = 10"); - })(30); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.5-1-s +description: Strict Mode - arguments object is immutable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + (function fun() { + eval("arguments = 10"); + })(30); + return false; + } catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.5/10.5-1gs.js b/test/suite/ch10/10.5/10.5-1gs.js index aafbeb3339..7e94a44c28 100644 --- a/test/suite/ch10/10.5/10.5-1gs.js +++ b/test/suite/ch10/10.5/10.5-1gs.js @@ -1,20 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.5/10.5-1gs.js - * @description Strict Mode - arguments cannot be assigned to in a strict function - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; - -function f_10_5_1_gs(){ - arguments = 7; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.5-1gs +description: Strict Mode - arguments cannot be assigned to in a strict function +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; + +function f_10_5_1_gs(){ + arguments = 7; +} diff --git a/test/suite/ch10/10.5/10.5-7-b-1-s.js b/test/suite/ch10/10.5/10.5-7-b-1-s.js index e1855c7c66..6c5c1b0ba9 100644 --- a/test/suite/ch10/10.5/10.5-7-b-1-s.js +++ b/test/suite/ch10/10.5/10.5-7-b-1-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-1-s.js - * @description Strict Mode - arguments object is immutable in eval'ed functions - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.5-7-b-1-s +description: Strict Mode - arguments object is immutable in eval'ed functions +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("(function _10_5_7_b_1_fun() { arguments = 10;} ());"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.5/10.5-7-b-2-s.js b/test/suite/ch10/10.5/10.5-7-b-2-s.js index 47820009e1..b443416e3f 100644 --- a/test/suite/ch10/10.5/10.5-7-b-2-s.js +++ b/test/suite/ch10/10.5/10.5-7-b-2-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-2-s.js - * @description Strict Mode - arguments object index assignment is allowed - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function _10_5_7_b_2_fun() { - arguments[7] = 12; - return arguments[7] === 12; - }; - - return _10_5_7_b_2_fun(30); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.5-7-b-2-s +description: Strict Mode - arguments object index assignment is allowed +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + function _10_5_7_b_2_fun() { + arguments[7] = 12; + return arguments[7] === 12; + }; + + return _10_5_7_b_2_fun(30); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.5/10.5-7-b-3-s.js b/test/suite/ch10/10.5/10.5-7-b-3-s.js index cde0b88c6d..b9fc991e2a 100644 --- a/test/suite/ch10/10.5/10.5-7-b-3-s.js +++ b/test/suite/ch10/10.5/10.5-7-b-3-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-3-s.js - * @description Strict Mode - Adding property to the arguments object successful under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function _10_5_7_b_3_fun() { - arguments[1] = 12; - return arguments[0] === 30 && arguments[1] === 12; - }; - - return _10_5_7_b_3_fun(30); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.5-7-b-3-s +description: > + Strict Mode - Adding property to the arguments object successful + under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + function _10_5_7_b_3_fun() { + arguments[1] = 12; + return arguments[0] === 30 && arguments[1] === 12; + }; + + return _10_5_7_b_3_fun(30); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.5/10.5-7-b-4-s.js b/test/suite/ch10/10.5/10.5-7-b-4-s.js index c695446b41..3f9f1ec68e 100644 --- a/test/suite/ch10/10.5/10.5-7-b-4-s.js +++ b/test/suite/ch10/10.5/10.5-7-b-4-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.5/10.5-7-b-4-s.js - * @description Strict Mode - Deleting property of the arguments object successful under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function _10_5_7_b_4_fun() { - var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12; - delete arguments[1]; - var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === "undefined"; - return _10_5_7_b_4_1 && _10_5_7_b_4_2; - }; - return _10_5_7_b_4_fun(30, 12); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.5-7-b-4-s +description: > + Strict Mode - Deleting property of the arguments object successful + under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + function _10_5_7_b_4_fun() { + var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12; + delete arguments[1]; + var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === "undefined"; + return _10_5_7_b_4_1 && _10_5_7_b_4_2; + }; + return _10_5_7_b_4_fun(30, 12); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-10-c-ii-1-s.js b/test/suite/ch10/10.6/10.6-10-c-ii-1-s.js index dcc3c49f90..771355e5cb 100644 --- a/test/suite/ch10/10.6/10.6-10-c-ii-1-s.js +++ b/test/suite/ch10/10.6/10.6-10-c-ii-1-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-1-s.js - * @description arguments[i] remains same after changing actual parameters in strict mode - * @onlyStrict - */ - - -function testcase() { - function foo(a,b,c) - { - 'use strict'; - a = 1; b = 'str'; c = 2.1; - return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1); - } - return foo(10, 'sss', 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-10-c-ii-1-s +description: > + arguments[i] remains same after changing actual parameters in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(a,b,c) + { + 'use strict'; + a = 1; b = 'str'; c = 2.1; + return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1); + } + return foo(10, 'sss', 1); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-10-c-ii-1.js b/test/suite/ch10/10.6/10.6-10-c-ii-1.js index f0db64ee24..c9ad44df8d 100644 --- a/test/suite/ch10/10.6/10.6-10-c-ii-1.js +++ b/test/suite/ch10/10.6/10.6-10-c-ii-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-1.js - * @description arguments[i] change with actual parameters - */ - - -function testcase() { - function foo(a,b,c) - { - a = 1; b = 'str'; c = 2.1; - if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1) - return true; - } - return foo(10,'sss',1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-10-c-ii-1 +description: arguments[i] change with actual parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(a,b,c) + { + a = 1; b = 'str'; c = 2.1; + if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1) + return true; + } + return foo(10,'sss',1); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-10-c-ii-2-s.js b/test/suite/ch10/10.6/10.6-10-c-ii-2-s.js index 58143f8416..b39ec15b2f 100644 --- a/test/suite/ch10/10.6/10.6-10-c-ii-2-s.js +++ b/test/suite/ch10/10.6/10.6-10-c-ii-2-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-2-s.js - * @description arguments[i] doesn't map to actual parameters in strict mode - * @onlyStrict - */ - - -function testcase() { - - function foo(a,b,c) - { - 'use strict'; - arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; - return 10 === a && 'sss' === b && 1 === c; - } - return foo(10,'sss',1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-10-c-ii-2-s +description: arguments[i] doesn't map to actual parameters in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo(a,b,c) + { + 'use strict'; + arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; + return 10 === a && 'sss' === b && 1 === c; + } + return foo(10,'sss',1); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-10-c-ii-2.js b/test/suite/ch10/10.6/10.6-10-c-ii-2.js index 5891dfe3b2..c1eee201f3 100644 --- a/test/suite/ch10/10.6/10.6-10-c-ii-2.js +++ b/test/suite/ch10/10.6/10.6-10-c-ii-2.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-10-c-ii-2.js - * @description arguments[i] map to actual parameter - */ - - -function testcase() { - - function foo(a,b,c) - { - arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; - if(1 === a && 'str' === b && 2.1 === c) - return true; - } - return foo(10,'sss',1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-10-c-ii-2 +description: arguments[i] map to actual parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo(a,b,c) + { + arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1; + if(1 === a && 'str' === b && 2.1 === c) + return true; + } + return foo(10,'sss',1); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-11-b-1.js b/test/suite/ch10/10.6/10.6-11-b-1.js index bcf937d63a..cd6949ceaa 100644 --- a/test/suite/ch10/10.6/10.6-11-b-1.js +++ b/test/suite/ch10/10.6/10.6-11-b-1.js @@ -1,54 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-11-b-1.js - * @description Arguments Object has index property '0' as its own property, it shoulde be writable, enumerable, configurable and does not invoke the setter defined on Object.prototype[0] (Step 11.b) - */ - - -function testcase() { - try { - var data = "data"; - var getFunc = function () { - return data; - }; - - var setFunc = function (value) { - data = value; - }; - - Object.defineProperty(Object.prototype, "0", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var argObj = (function () { return arguments })(1); - - var verifyValue = false; - verifyValue = (argObj[0] === 1); - - var verifyEnumerable = false; - for (var p in argObj) { - if (p === "0" && argObj.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } - - var verifyWritable = false; - argObj[0] = 1001; - verifyWritable = (argObj[0] === 1001); - - var verifyConfigurable = false; - delete argObj[0]; - verifyConfigurable = argObj.hasOwnProperty("0"); - - return verifyValue && verifyWritable && verifyEnumerable && !verifyConfigurable && data === "data"; - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-11-b-1 +description: > + Arguments Object has index property '0' as its own property, it + shoulde be writable, enumerable, configurable and does not invoke + the setter defined on Object.prototype[0] (Step 11.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var data = "data"; + var getFunc = function () { + return data; + }; + + var setFunc = function (value) { + data = value; + }; + + Object.defineProperty(Object.prototype, "0", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var argObj = (function () { return arguments })(1); + + var verifyValue = false; + verifyValue = (argObj[0] === 1); + + var verifyEnumerable = false; + for (var p in argObj) { + if (p === "0" && argObj.hasOwnProperty("0")) { + verifyEnumerable = true; + } + } + + var verifyWritable = false; + argObj[0] = 1001; + verifyWritable = (argObj[0] === 1001); + + var verifyConfigurable = false; + delete argObj[0]; + verifyConfigurable = argObj.hasOwnProperty("0"); + + return verifyValue && verifyWritable && verifyEnumerable && !verifyConfigurable && data === "data"; + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-12-1.js b/test/suite/ch10/10.6/10.6-12-1.js index 12746eb1ed..539b49c626 100644 --- a/test/suite/ch10/10.6/10.6-12-1.js +++ b/test/suite/ch10/10.6/10.6-12-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-12-1.js - * @description Accessing callee property of Arguments object is allowed - */ - - -function testcase() { - try - { - arguments.callee; - return true; - } - catch (e) { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-12-1 +description: Accessing callee property of Arguments object is allowed +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + arguments.callee; + return true; + } + catch (e) { + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-12-2.js b/test/suite/ch10/10.6/10.6-12-2.js index 11a1793f41..2376d2c47a 100644 --- a/test/suite/ch10/10.6/10.6-12-2.js +++ b/test/suite/ch10/10.6/10.6-12-2.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-12-2.js - * @description arguments.callee has correct attributes - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); - if(desc.configurable === true && - desc.enumerable === false && - desc.writable === true && - desc.hasOwnProperty('get') == false && - desc.hasOwnProperty('put') == false) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-12-2 +description: arguments.callee has correct attributes +includes: [runTestCase.js] +---*/ + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); + if(desc.configurable === true && + desc.enumerable === false && + desc.writable === true && + desc.hasOwnProperty('get') == false && + desc.hasOwnProperty('put') == false) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-1.js b/test/suite/ch10/10.6/10.6-13-1.js index d871a9ccba..3def632fd7 100644 --- a/test/suite/ch10/10.6/10.6-13-1.js +++ b/test/suite/ch10/10.6/10.6-13-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-1.js - * @description Accessing caller property of Arguments object is allowed - */ - - -function testcase() { - try - { - arguments.caller; - return true; - } - catch (e) { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-1 +description: Accessing caller property of Arguments object is allowed +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + arguments.caller; + return true; + } + catch (e) { + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-a-1.js b/test/suite/ch10/10.6/10.6-13-a-1.js index a7b3f2ee6a..9bedd01ed6 100644 --- a/test/suite/ch10/10.6/10.6-13-a-1.js +++ b/test/suite/ch10/10.6/10.6-13-a-1.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-a-1.js - * @description In non-strict mode, arguments object should have its own 'callee' property defined (Step 13.a) - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "callee", { - value: 1, - writable: false, - configurable: true - }); - - var argObj = (function () { return arguments })(); - - var verifyValue = false; - verifyValue = typeof argObj.callee === "function"; - - var verifyWritable = false; - argObj.callee = 1001; - verifyWritable = (argObj.callee === 1001); - - var verifyEnumerable = false; - for (var p in argObj) { - if (p === "callee" && argObj.hasOwnProperty("callee")) { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete argObj.callee; - verifyConfigurable = argObj.hasOwnProperty("callee"); - - return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable; - } finally { - delete Object.prototype.callee; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-a-1 +description: > + In non-strict mode, arguments object should have its own 'callee' + property defined (Step 13.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "callee", { + value: 1, + writable: false, + configurable: true + }); + + var argObj = (function () { return arguments })(); + + var verifyValue = false; + verifyValue = typeof argObj.callee === "function"; + + var verifyWritable = false; + argObj.callee = 1001; + verifyWritable = (argObj.callee === 1001); + + var verifyEnumerable = false; + for (var p in argObj) { + if (p === "callee" && argObj.hasOwnProperty("callee")) { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete argObj.callee; + verifyConfigurable = argObj.hasOwnProperty("callee"); + + return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable; + } finally { + delete Object.prototype.callee; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-a-2.js b/test/suite/ch10/10.6/10.6-13-a-2.js index b681712589..3cdce0d6f6 100644 --- a/test/suite/ch10/10.6/10.6-13-a-2.js +++ b/test/suite/ch10/10.6/10.6-13-a-2.js @@ -1,35 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-a-2.js - * @description A direct call to arguments.callee.caller should work - */ - - -function testcase() { - var called = false; - - function test1(flag) { - if (flag!==true) { - test2(); - } else { - called = true; - } - } - - function test2() { - if(arguments.callee.caller===undefined) { - called=true; // Extension not supported - fake it - } else { - arguments.callee.caller(true); - } - } - - test1(); - return called; -} - -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-a-2 +description: A direct call to arguments.callee.caller should work +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = false; + + function test1(flag) { + if (flag!==true) { + test2(); + } else { + called = true; + } + } + + function test2() { + if(arguments.callee.caller===undefined) { + called=true; // Extension not supported - fake it + } else { + arguments.callee.caller(true); + } + } + + test1(); + return called; +} + +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-a-3.js b/test/suite/ch10/10.6/10.6-13-a-3.js index ddd03a68c4..86454f9ce7 100644 --- a/test/suite/ch10/10.6/10.6-13-a-3.js +++ b/test/suite/ch10/10.6/10.6-13-a-3.js @@ -1,36 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-a-3.js - * @description An indirect call to arguments.callee.caller should work - */ - - -function testcase() { - var called = false; - - function test1(flag) { - if (flag!==true) { - test2(); - } else { - called = true; - } - } - - function test2() { - if (arguments.callee.caller===undefined) { - called = true; //Extension not supported - fake it - } else { - var explicit = arguments.callee.caller; - explicit(true); - } - } - - test1(); - return called; -} - -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-a-3 +description: An indirect call to arguments.callee.caller should work +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = false; + + function test1(flag) { + if (flag!==true) { + test2(); + } else { + called = true; + } + } + + function test2() { + if (arguments.callee.caller===undefined) { + called = true; //Extension not supported - fake it + } else { + var explicit = arguments.callee.caller; + explicit(true); + } + } + + test1(); + return called; +} + +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-b-1-s.js b/test/suite/ch10/10.6/10.6-13-b-1-s.js index d44b475afd..c266619485 100644 --- a/test/suite/ch10/10.6/10.6-13-b-1-s.js +++ b/test/suite/ch10/10.6/10.6-13-b-1-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-b-1-s.js - * @description Accessing caller property of Arguments object throws TypeError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - try - { - arguments.caller; - } - catch (e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-b-1-s +description: > + Accessing caller property of Arguments object throws TypeError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + try + { + arguments.caller; + } + catch (e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-b-2-s.js b/test/suite/ch10/10.6/10.6-13-b-2-s.js index 0f1b2b7644..8db28513b2 100644 --- a/test/suite/ch10/10.6/10.6-13-b-2-s.js +++ b/test/suite/ch10/10.6/10.6-13-b-2-s.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-b-2-s.js - * @description arguments.caller exists in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); - return desc!== undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-b-2-s +description: arguments.caller exists in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); + return desc!== undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-b-3-s.js b/test/suite/ch10/10.6/10.6-13-b-3-s.js index d85e084f16..c7b564137c 100644 --- a/test/suite/ch10/10.6/10.6-13-b-3-s.js +++ b/test/suite/ch10/10.6/10.6-13-b-3-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-b-3-s.js - * @description arguments.caller is non-configurable in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); - - return (desc.configurable === false && - desc.enumerable === false && - desc.hasOwnProperty('value') == false && - desc.hasOwnProperty('writable') == false && - desc.hasOwnProperty('get') == true && - desc.hasOwnProperty('set') == true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-b-3-s +description: arguments.caller is non-configurable in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"caller"); + + return (desc.configurable === false && + desc.enumerable === false && + desc.hasOwnProperty('value') == false && + desc.hasOwnProperty('writable') == false && + desc.hasOwnProperty('get') == true && + desc.hasOwnProperty('set') == true); + + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-c-1-s.js b/test/suite/ch10/10.6/10.6-13-c-1-s.js index f17a9b37bb..4f25f14a68 100644 --- a/test/suite/ch10/10.6/10.6-13-c-1-s.js +++ b/test/suite/ch10/10.6/10.6-13-c-1-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-c-1-s.js - * @description Accessing callee property of Arguments object throws TypeError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - try - { - arguments.callee; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-c-1-s +description: > + Accessing callee property of Arguments object throws TypeError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + try + { + arguments.callee; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-c-2-s.js b/test/suite/ch10/10.6/10.6-13-c-2-s.js index e08e770031..125852d3d6 100644 --- a/test/suite/ch10/10.6/10.6-13-c-2-s.js +++ b/test/suite/ch10/10.6/10.6-13-c-2-s.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-c-2-s.js - * @description arguments.callee is exists in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); - return desc !== undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-c-2-s +description: arguments.callee is exists in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); + return desc !== undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-13-c-3-s.js b/test/suite/ch10/10.6/10.6-13-c-3-s.js index 8122932bd8..6182ad0f52 100644 --- a/test/suite/ch10/10.6/10.6-13-c-3-s.js +++ b/test/suite/ch10/10.6/10.6-13-c-3-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-13-c-3-s.js - * @description arguments.callee is non-configurable in strict mode - * @onlyStrict - */ - - -function testcase() { - - 'use strict'; - var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); - return (desc.configurable === false && - desc.enumerable === false && - desc.hasOwnProperty('value') == false && - desc.hasOwnProperty('writable') == false && - desc.hasOwnProperty('get') == true && - desc.hasOwnProperty('set') == true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-13-c-3-s +description: arguments.callee is non-configurable in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + 'use strict'; + var desc = Object.getOwnPropertyDescriptor(arguments,"callee"); + return (desc.configurable === false && + desc.enumerable === false && + desc.hasOwnProperty('value') == false && + desc.hasOwnProperty('writable') == false && + desc.hasOwnProperty('get') == true && + desc.hasOwnProperty('set') == true); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-14-1-s.js b/test/suite/ch10/10.6/10.6-14-1-s.js index aebc6fa1c6..f7f76465c4 100644 --- a/test/suite/ch10/10.6/10.6-14-1-s.js +++ b/test/suite/ch10/10.6/10.6-14-1-s.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-1-s.js - * @description Strict Mode - 'callee' exists and 'caller' exists under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var argObj = function () { - return arguments; - } (); - return argObj.hasOwnProperty("callee") && argObj.hasOwnProperty("caller"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-14-1-s +description: Strict Mode - 'callee' exists and 'caller' exists under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var argObj = function () { + return arguments; + } (); + return argObj.hasOwnProperty("callee") && argObj.hasOwnProperty("caller"); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-14-b-1-s.js b/test/suite/ch10/10.6/10.6-14-b-1-s.js index 51cbfff4db..488b443dac 100644 --- a/test/suite/ch10/10.6/10.6-14-b-1-s.js +++ b/test/suite/ch10/10.6/10.6-14-b-1-s.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-b-1-s.js - * @description Strict Mode - [[Enumerable]] attribute value in 'caller' is false under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - var verifyEnumerable = false; - for (var _10_6_14_b_1 in argObj) { - if (argObj.hasOwnProperty(_10_6_14_b_1) && _10_6_14_b_1 === "caller") { - verifyEnumerable = true; - } - } - return !verifyEnumerable && argObj.hasOwnProperty("caller"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-14-b-1-s +description: > + Strict Mode - [[Enumerable]] attribute value in 'caller' is false + under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + var verifyEnumerable = false; + for (var _10_6_14_b_1 in argObj) { + if (argObj.hasOwnProperty(_10_6_14_b_1) && _10_6_14_b_1 === "caller") { + verifyEnumerable = true; + } + } + return !verifyEnumerable && argObj.hasOwnProperty("caller"); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-14-b-4-s.js b/test/suite/ch10/10.6/10.6-14-b-4-s.js index 748c630a9e..8a8b54a7ff 100644 --- a/test/suite/ch10/10.6/10.6-14-b-4-s.js +++ b/test/suite/ch10/10.6/10.6-14-b-4-s.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-b-4-s.js - * @description Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'caller' under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - try { - argObj.caller = {}; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-14-b-4-s +description: > + Strict Mode - TypeError is thrown when accessing the [[Set]] + attribute in 'caller' under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + try { + argObj.caller = {}; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-14-c-1-s.js b/test/suite/ch10/10.6/10.6-14-c-1-s.js index cade0a5377..215e95dbef 100644 --- a/test/suite/ch10/10.6/10.6-14-c-1-s.js +++ b/test/suite/ch10/10.6/10.6-14-c-1-s.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-c-1-s.js - * @description Strict Mode - [[Enumerable]] attribute value in 'callee' is false under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - var verifyEnumerable = false; - for (var _10_6_14_c_1 in argObj) { - if (argObj.hasOwnProperty(_10_6_14_c_1) && _10_6_14_c_1 === "callee") { - verifyEnumerable = true; - } - } - return !verifyEnumerable && argObj.hasOwnProperty("callee"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-14-c-1-s +description: > + Strict Mode - [[Enumerable]] attribute value in 'callee' is false + under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + var verifyEnumerable = false; + for (var _10_6_14_c_1 in argObj) { + if (argObj.hasOwnProperty(_10_6_14_c_1) && _10_6_14_c_1 === "callee") { + verifyEnumerable = true; + } + } + return !verifyEnumerable && argObj.hasOwnProperty("callee"); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-14-c-4-s.js b/test/suite/ch10/10.6/10.6-14-c-4-s.js index 1238570c4f..9f2baa39f0 100644 --- a/test/suite/ch10/10.6/10.6-14-c-4-s.js +++ b/test/suite/ch10/10.6/10.6-14-c-4-s.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-14-c-4-s.js - * @description Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'callee' under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var argObj = function () { - return arguments; - } (); - - try { - argObj.callee = {}; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-14-c-4-s +description: > + Strict Mode - TypeError is thrown when accessing the [[Set]] + attribute in 'callee' under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var argObj = function () { + return arguments; + } (); + + try { + argObj.callee = {}; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-1gs.js b/test/suite/ch10/10.6/10.6-1gs.js index f77fd3c57e..b4bf6b2882 100644 --- a/test/suite/ch10/10.6/10.6-1gs.js +++ b/test/suite/ch10/10.6/10.6-1gs.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.6/10.6-1gs.js - * @description Strict Mode - arguments.callee cannot be accessed in a strict function, but does not throw an early error - * @onlyStrict - */ - -"use strict"; -function f_10_6_1_gs(){ - return arguments.callee; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-1gs +description: > + Strict Mode - arguments.callee cannot be accessed in a strict + function, but does not throw an early error +flags: [onlyStrict] +---*/ + +"use strict"; +function f_10_6_1_gs(){ + return arguments.callee; +} diff --git a/test/suite/ch10/10.6/10.6-2gs.js b/test/suite/ch10/10.6/10.6-2gs.js index e13cc02f5c..d5782511eb 100644 --- a/test/suite/ch10/10.6/10.6-2gs.js +++ b/test/suite/ch10/10.6/10.6-2gs.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch10/10.6/10.6-2gs.js - * @description Strict Mode - arguments.callee cannot be accessed in a strict function - * @onlyStrict - * @negative . - */ - -"use strict"; -function f_10_6_1_gs(){ - return arguments.callee; -} -f_10_6_1_gs(); - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-2gs +description: > + Strict Mode - arguments.callee cannot be accessed in a strict + function +negative: . +flags: [onlyStrict] +---*/ + +"use strict"; +function f_10_6_1_gs(){ + return arguments.callee; +} +f_10_6_1_gs(); diff --git a/test/suite/ch10/10.6/10.6-5-1.js b/test/suite/ch10/10.6/10.6-5-1.js index f058239fe9..058a96c764 100644 --- a/test/suite/ch10/10.6/10.6-5-1.js +++ b/test/suite/ch10/10.6/10.6-5-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-5-1.js - * @description [[Prototype]] property of Arguments is set to Object prototype object - */ - - -function testcase() { - if(Object.getPrototypeOf(arguments) === Object.getPrototypeOf({})) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-5-1 +description: > + [[Prototype]] property of Arguments is set to Object prototype + object +includes: [runTestCase.js] +---*/ + +function testcase() { + if(Object.getPrototypeOf(arguments) === Object.getPrototypeOf({})) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-6-1.js b/test/suite/ch10/10.6/10.6-6-1.js index d0ec15e273..3ac99bd383 100644 --- a/test/suite/ch10/10.6/10.6-6-1.js +++ b/test/suite/ch10/10.6/10.6-6-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-1.js - * @description 'length property of arguments object exists - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(arguments,"length"); - return desc !== undefined - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-6-1 +description: "'length property of arguments object exists" +includes: [runTestCase.js] +---*/ + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(arguments,"length"); + return desc !== undefined + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-6-2.js b/test/suite/ch10/10.6/10.6-6-2.js index afad35fd02..6a1f56e466 100644 --- a/test/suite/ch10/10.6/10.6-6-2.js +++ b/test/suite/ch10/10.6/10.6-6-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-2.js - * @description 'length' property of arguments object has correct attributes - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(arguments,"length"); - if(desc.configurable === true && - desc.enumerable === false && - desc.writable === true ) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-6-2 +description: "'length' property of arguments object has correct attributes" +includes: [runTestCase.js] +---*/ + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(arguments,"length"); + if(desc.configurable === true && + desc.enumerable === false && + desc.writable === true ) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-6-3.js b/test/suite/ch10/10.6/10.6-6-3.js index e7838e8a41..bd461a05a1 100644 --- a/test/suite/ch10/10.6/10.6-6-3.js +++ b/test/suite/ch10/10.6/10.6-6-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-3.js - * @description 'length' property of arguments object for 0 argument function exists - */ - - -function testcase() { - var arguments= undefined; - return (function () {return arguments.length !== undefined})(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-6-3 +description: > + 'length' property of arguments object for 0 argument function + exists +includes: [runTestCase.js] +---*/ + +function testcase() { + var arguments= undefined; + return (function () {return arguments.length !== undefined})(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-6-4.js b/test/suite/ch10/10.6/10.6-6-4.js index 6a3a77b232..1ece6916ad 100644 --- a/test/suite/ch10/10.6/10.6-6-4.js +++ b/test/suite/ch10/10.6/10.6-6-4.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-6-4.js - * @description 'length' property of arguments object for 0 argument function call is 0 even with formal parameters - */ - - -function testcase() { - var arguments= undefined; - return (function (a,b,c) {return arguments.length === 0})(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-6-4 +description: > + 'length' property of arguments object for 0 argument function call + is 0 even with formal parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + var arguments= undefined; + return (function (a,b,c) {return arguments.length === 0})(); + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/10.6-7-1.js b/test/suite/ch10/10.6/10.6-7-1.js index 30fd4f373a..ca2238d42b 100644 --- a/test/suite/ch10/10.6/10.6-7-1.js +++ b/test/suite/ch10/10.6/10.6-7-1.js @@ -1,53 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch10/10.6/10.6-7-1.js - * @description Arguments Object has length as its own property and does not invoke the setter defined on Object.prototype.length (Step 7) - */ - - -function testcase() { - try { - var data = "data"; - var getFunc = function () { - return 12; - }; - - var setFunc = function (value) { - data = value; - }; - - Object.defineProperty(Object.prototype, "length", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var verifyValue = false; - var argObj = (function () { return arguments })(); - verifyValue = (argObj.length === 0); - - var verifyWritable = false; - argObj.length = 1001; - verifyWritable = (argObj.length === 1001); - - var verifyEnumerable = false; - for (var p in argObj) { - if (p === "length") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete argObj.length; - verifyConfigurable = argObj.hasOwnProperty("length"); - - return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === "data"; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 10.6-7-1 +description: > + Arguments Object has length as its own property and does not + invoke the setter defined on Object.prototype.length (Step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var data = "data"; + var getFunc = function () { + return 12; + }; + + var setFunc = function (value) { + data = value; + }; + + Object.defineProperty(Object.prototype, "length", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var verifyValue = false; + var argObj = (function () { return arguments })(); + verifyValue = (argObj.length === 0); + + var verifyWritable = false; + argObj.length = 1001; + verifyWritable = (argObj.length === 1001); + + var verifyEnumerable = false; + for (var p in argObj) { + if (p === "length") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete argObj.length; + verifyConfigurable = argObj.hasOwnProperty("length"); + + return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === "data"; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch10/10.6/S10.6_A1.js b/test/suite/ch10/10.6/S10.6_A1.js index 89df9c4dd3..e1ff784195 100644 --- a/test/suite/ch10/10.6/S10.6_A1.js +++ b/test/suite/ch10/10.6/S10.6_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When control enters an execution context for function code, - * an arguments object is created and initialised - * - * @path ch10/10.6/S10.6_A1.js - * @description Executing function which uses arguments object - */ +/*--- +info: > + When control enters an execution context for function code, + an arguments object is created and initialised +es5id: 10.6_A1 +description: Executing function which uses arguments object +---*/ //CHECK#1 function f1(){ @@ -32,4 +32,3 @@ try{ catch(e){ $ERROR("#2: arguments doesn't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A2.js b/test/suite/ch10/10.6/S10.6_A2.js index 18698be004..f5b4d7772c 100644 --- a/test/suite/ch10/10.6/S10.6_A2.js +++ b/test/suite/ch10/10.6/S10.6_A2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the - * created arguments object is the original Object prototype object, the one - * that is the initial value of Object.prototype - * - * @path ch10/10.6/S10.6_A2.js - * @description Checking arguments.constructor.prototype===Object.prototype - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the + created arguments object is the original Object prototype object, the one + that is the initial value of Object.prototype +es5id: 10.6_A2 +description: Checking arguments.constructor.prototype===Object.prototype +---*/ //CHECK#1 function f1(){ @@ -33,4 +33,3 @@ try{ catch(e){ $ERROR("#2: arguments doesn't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A3_T1.js b/test/suite/ch10/10.6/S10.6_A3_T1.js index 234d6ad1ae..8e4ad5c755 100644 --- a/test/suite/ch10/10.6/S10.6_A3_T1.js +++ b/test/suite/ch10/10.6/S10.6_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T1.js - * @description Checking existence of arguments.callee property - */ +/*--- +info: > + A property is created with name callee with property + attributes { DontEnum } and no others +es5id: 10.6_A3_T1 +description: Checking existence of arguments.callee property +---*/ //CHECK#1 function f1(){ @@ -32,4 +32,3 @@ try{ catch(e){ $ERROR("#2: arguments object doesn't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A3_T2.js b/test/suite/ch10/10.6/S10.6_A3_T2.js index 327e5cf365..d06369d681 100644 --- a/test/suite/ch10/10.6/S10.6_A3_T2.js +++ b/test/suite/ch10/10.6/S10.6_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T2.js - * @description Checking if enumerating the arguments.callee property fails - */ +/*--- +info: > + A property is created with name callee with property + attributes { DontEnum } and no others +es5id: 10.6_A3_T2 +description: Checking if enumerating the arguments.callee property fails +---*/ //CHECK#1 function f1(){ @@ -46,4 +46,3 @@ try{ catch(e){ $ERROR("#2: arguments object don't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A3_T3.js b/test/suite/ch10/10.6/S10.6_A3_T3.js index 4b26265702..3d735cd308 100644 --- a/test/suite/ch10/10.6/S10.6_A3_T3.js +++ b/test/suite/ch10/10.6/S10.6_A3_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T3.js - * @description Checking if deleting arguments.callee property fails - * @noStrict - */ +/*--- +info: > + A property is created with name callee with property + attributes { DontEnum } and no others +es5id: 10.6_A3_T3 +description: Checking if deleting arguments.callee property fails +flags: [noStrict] +---*/ //CHECK#1 function f1(){ @@ -37,4 +37,3 @@ try{ catch(e){ $ERROR("#2: arguments object don't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A3_T4.js b/test/suite/ch10/10.6/S10.6_A3_T4.js index c83983507d..6be7774ff9 100644 --- a/test/suite/ch10/10.6/S10.6_A3_T4.js +++ b/test/suite/ch10/10.6/S10.6_A3_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name callee with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A3_T4.js - * @description Overriding arguments.callee property - * @noStrict - */ +/*--- +info: > + A property is created with name callee with property + attributes { DontEnum } and no others +es5id: 10.6_A3_T4 +description: Overriding arguments.callee property +flags: [noStrict] +---*/ var str = "something different"; //CHECK#1 @@ -39,4 +39,3 @@ try{ catch(e){ $ERROR("#2: arguments object don't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A4.js b/test/suite/ch10/10.6/S10.6_A4.js index b49902a45e..0ed7598b2a 100644 --- a/test/suite/ch10/10.6/S10.6_A4.js +++ b/test/suite/ch10/10.6/S10.6_A4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of the created property callee is the - * Function object being executed - * - * @path ch10/10.6/S10.6_A4.js - * @description Checking that arguments.callee === function object - * @noStrict - */ +/*--- +info: > + The initial value of the created property callee is the + Function object being executed +es5id: 10.6_A4 +description: Checking that arguments.callee === function object +flags: [noStrict] +---*/ //CHECK#1 function f1(){ @@ -35,4 +35,3 @@ try{ catch(e){ $ERROR("#1: arguments object doesn't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A5_T1.js b/test/suite/ch10/10.6/S10.6_A5_T1.js index a76e58d47b..df17297846 100644 --- a/test/suite/ch10/10.6/S10.6_A5_T1.js +++ b/test/suite/ch10/10.6/S10.6_A5_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T1.js - * @description Checking existence of arguments.length property - */ +/*--- +info: > + A property is created with name length with property + attributes { DontEnum } and no others +es5id: 10.6_A5_T1 +description: Checking existence of arguments.length property +---*/ //CHECK#1 function f1(){ @@ -32,4 +32,3 @@ try{ catch(e){ $ERROR("#2: arguments object doesn't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A5_T2.js b/test/suite/ch10/10.6/S10.6_A5_T2.js index a0f4df7a9e..47027610b3 100644 --- a/test/suite/ch10/10.6/S10.6_A5_T2.js +++ b/test/suite/ch10/10.6/S10.6_A5_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T2.js - * @description Checking if enumerating the arguments.length property fails - */ +/*--- +info: > + A property is created with name length with property + attributes { DontEnum } and no others +es5id: 10.6_A5_T2 +description: Checking if enumerating the arguments.length property fails +---*/ //CHECK#1 function f1(){ @@ -46,4 +46,3 @@ try{ catch(e){ $ERROR("#2: arguments object don't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A5_T3.js b/test/suite/ch10/10.6/S10.6_A5_T3.js index c8187fac85..b28595585b 100644 --- a/test/suite/ch10/10.6/S10.6_A5_T3.js +++ b/test/suite/ch10/10.6/S10.6_A5_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T3.js - * @description Checking if deleting arguments.length property fails - */ +/*--- +info: > + A property is created with name length with property + attributes { DontEnum } and no others +es5id: 10.6_A5_T3 +description: Checking if deleting arguments.length property fails +---*/ //CHECK#1 function f1(){ @@ -36,4 +36,3 @@ try{ catch(e){ $ERROR("#2: arguments object don't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A5_T4.js b/test/suite/ch10/10.6/S10.6_A5_T4.js index 7178bf4240..4336f11c5c 100644 --- a/test/suite/ch10/10.6/S10.6_A5_T4.js +++ b/test/suite/ch10/10.6/S10.6_A5_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property is created with name length with property - * attributes { DontEnum } and no others - * - * @path ch10/10.6/S10.6_A5_T4.js - * @description Overriding arguments.length property - */ +/*--- +info: > + A property is created with name length with property + attributes { DontEnum } and no others +es5id: 10.6_A5_T4 +description: Overriding arguments.length property +---*/ var str = "something different"; //CHECK#1 @@ -38,4 +38,3 @@ try{ catch(e){ $ERROR("#2: arguments object don't exists"); } - diff --git a/test/suite/ch10/10.6/S10.6_A6.js b/test/suite/ch10/10.6/S10.6_A6.js index 3f1d0d1c1d..e0eaf30a4b 100644 --- a/test/suite/ch10/10.6/S10.6_A6.js +++ b/test/suite/ch10/10.6/S10.6_A6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of the created property length is the number - * of actual parameter values supplied by the caller - * - * @path ch10/10.6/S10.6_A6.js - * @description Create function, that returned arguments.length - */ +/*--- +info: > + The initial value of the created property length is the number + of actual parameter values supplied by the caller +es5id: 10.6_A6 +description: Create function, that returned arguments.length +---*/ function f1(){ return arguments.length; @@ -64,4 +64,3 @@ if(!(f2(0, 1, 2) === 3)){ if(!(f2(0, 1, 2, 3) === 4)){ $ERROR('#10: argument.length === 4'); } - diff --git a/test/suite/ch10/10.6/S10.6_A7.js b/test/suite/ch10/10.6/S10.6_A7.js index f013ba0133..7012e9f9f7 100644 --- a/test/suite/ch10/10.6/S10.6_A7.js +++ b/test/suite/ch10/10.6/S10.6_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Get arguments of function - * - * @path ch10/10.6/S10.6_A7.js - * @description Use property arguments - */ +/*--- +info: Get arguments of function +es5id: 10.6_A7 +description: Use property arguments +---*/ function f1() { return arguments; @@ -17,4 +16,3 @@ for(var i = 1; i < 5; i++){ if (f1(1,2,3,4,5)[i] !== (i+1)) $ERROR("#"+i+": Returning function's arguments work wrong, f1(1,2,3,4,5)["+i+"] !== "+(i+1)); } - diff --git a/test/suite/ch11/11.1/11.1.1/11.1.1-1gs.js b/test/suite/ch11/11.1/11.1.1/11.1.1-1gs.js index 0f2b30b5df..3d105319ad 100644 --- a/test/suite/ch11/11.1/11.1.1/11.1.1-1gs.js +++ b/test/suite/ch11/11.1/11.1.1/11.1.1-1gs.js @@ -1,16 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch11/11.1/11.1.1/11.1.1-1gs.js - * @description Strict Mode - 'this' object at the global scope is not undefined - * @onlyStrict - */ - -"use strict"; -if (this===undefined) { - throw NotEarlyError; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.1-1gs +description: Strict Mode - 'this' object at the global scope is not undefined +flags: [onlyStrict] +---*/ + +"use strict"; +if (this===undefined) { + throw NotEarlyError; +} diff --git a/test/suite/ch11/11.1/11.1.1/S11.1.1_A1.js b/test/suite/ch11/11.1/11.1.1/S11.1.1_A1.js index c68c327360..3932674f57 100644 --- a/test/suite/ch11/11.1/11.1.1/S11.1.1_A1.js +++ b/test/suite/ch11/11.1/11.1.1/S11.1.1_A1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "this" is reserved word - * - * @path ch11/11.1/11.1.1/S11.1.1_A1.js - * @description Checking if execution of "this=1" fails - * @negative - */ +/*--- +info: The "this" is reserved word +es5id: 11.1.1_A1 +description: Checking if execution of "this=1" fails +flags: [negative] +---*/ this = 1; - diff --git a/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.1.js b/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.1.js index 4094fa9142..13e1d3fdde 100644 --- a/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.1.js +++ b/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Being in function code, "this" and eval("this"), called as a functions, return the global object - * - * @path ch11/11.1/11.1.1/S11.1.1_A3.1.js - * @description Creating function which returns "this" or eval("this") - * @noStrict - */ +/*--- +info: > + Being in function code, "this" and eval("this"), called as a functions, + return the global object +es5id: 11.1.1_A3.1 +description: Creating function which returns "this" or eval("this") +flags: [noStrict] +---*/ //CHECK#1 function MyFunction() {return this} @@ -20,6 +21,3 @@ function MyFunction() {return eval("this")} if (MyFunction() !== this) { $ERROR('#2: function MyFunction() {return eval("this")} MyFunction() === this. Actual: ' + (MyFunction())); } - - - diff --git a/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.2.js b/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.2.js index ca0d5e6990..4e0ce6e96e 100644 --- a/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.2.js +++ b/test/suite/ch11/11.1/11.1.1/S11.1.1_A3.2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Being in function code, "this" and eval("this"), called as a constructors, return the object - * - * @path ch11/11.1/11.1.1/S11.1.1_A3.2.js - * @description Create function. It have property, that returned "this" - * @noStrict - */ +/*--- +info: > + Being in function code, "this" and eval("this"), called as a + constructors, return the object +es5id: 11.1.1_A3.2 +description: Create function. It have property, that returned "this" +flags: [noStrict] +---*/ //CHECK#1 function MyFunction() {this.THIS = this} @@ -20,5 +21,3 @@ function MyFunction() {this.THIS = eval("this")} if ((new MyFunction()).THIS.toString() !== "[object Object]") { $ERROR('#2: function MyFunction() {this.THIS = eval("this")} (new MyFunction()).THIS.toString() !== "[object Object]". Actual: ' + ((new MyFunction()).THIS.toString())); } - - diff --git a/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.1.js b/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.1.js index 38e2adbbda..43b7245fb0 100644 --- a/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.1.js +++ b/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Being in anonymous code, "this" and eval("this"), called as a function, return the global object - * - * @path ch11/11.1/11.1.1/S11.1.1_A4.1.js - * @description Creating function with new Function() constructor - */ +/*--- +info: > + Being in anonymous code, "this" and eval("this"), called as a function, + return the global object +es5id: 11.1.1_A4.1 +description: Creating function with new Function() constructor +---*/ //CHECK#1 var MyFunction = new Function("return this"); @@ -19,6 +20,3 @@ MyFunction = new Function("return eval(\'this\')"); if (MyFunction() !== this) { $ERROR('#2: var MyFunction = new Function("return eval(\'this\')"); MyFunction() === this. Actual: ' + (MyFunction())); } - - - diff --git a/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.2.js b/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.2.js index cd37d68244..2591080149 100644 --- a/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.2.js +++ b/test/suite/ch11/11.1/11.1.1/S11.1.1_A4.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Being in anonymous code, "this" and eval("this"), called as a constructor, return the object - * - * @path ch11/11.1/11.1.1/S11.1.1_A4.2.js - * @description Creating function by using new Function() constructor. It has the property, which returns "this" - */ +/*--- +info: > + Being in anonymous code, "this" and eval("this"), called as a + constructor, return the object +es5id: 11.1.1_A4.2 +description: > + Creating function by using new Function() constructor. It has the + property, which returns "this" +---*/ //CHECK#1 var MyFunction = new Function("this.THIS = this"); @@ -21,5 +24,3 @@ MyObject = new MyFunction(); if (MyObject.THIS.toString() !== "[object Object]") { $ERROR('#2: var MyFunction = new Function("this.THIS = eval(\'this\')"); var MyObject = new MyFunction(); MyObject.THIS.toString() === "[object Object]". Actual: ' + (MyObject.THIS.toString())); } - - diff --git a/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T1.js b/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T1.js index 46955d3cad..36c73a46cb 100644 --- a/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T1.js +++ b/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of evaluating an Identifier is always a value of type Reference - * - * @path ch11/11.1/11.1.2/S11.1.2_A1_T1.js - * @description Creating variables without defining it - */ +/*--- +info: The result of evaluating an Identifier is always a value of type Reference +es5id: 11.1.2_A1_T1 +description: Creating variables without defining it +---*/ //CHECK#1 if (this.x !== undefined) { @@ -24,4 +23,3 @@ this.y++; if (isNaN(y) !== true) { $ERROR('#3: this.y++; y === Not-a-Number. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T2.js b/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T2.js index df170468d0..4ddc65b33c 100644 --- a/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T2.js +++ b/test/suite/ch11/11.1/11.1.2/S11.1.2_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of evaluating an Identifier is always a value of type Reference - * - * @path ch11/11.1/11.1.2/S11.1.2_A1_T2.js - * @description Trying to generate ReferenceError - */ +/*--- +info: The result of evaluating an Identifier is always a value of type Reference +es5id: 11.1.2_A1_T2 +description: Trying to generate ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ try { $ERROR('#1.2: this.z; z === undefined throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.1/11.1.4/11.1.4-0.js b/test/suite/ch11/11.1/11.1.4/11.1.4-0.js index 60d4b1d8c7..02aad8b68d 100644 --- a/test/suite/ch11/11.1/11.1.4/11.1.4-0.js +++ b/test/suite/ch11/11.1/11.1.4/11.1.4-0.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.4/11.1.4-0.js - * @description elements elided at the end of an array do not contribute to its length - */ - - -function testcase() { - var a = [,]; - if (a.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.4-0 +description: > + elements elided at the end of an array do not contribute to its + length +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = [,]; + if (a.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.4/11.1.4_4-5-1.js b/test/suite/ch11/11.1/11.1.4/11.1.4_4-5-1.js index 15de1077bc..9b9e86c186 100644 --- a/test/suite/ch11/11.1/11.1.4/11.1.4_4-5-1.js +++ b/test/suite/ch11/11.1/11.1.4/11.1.4_4-5-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.4; - * The production - * ElementList : Elisionopt AssignmentExpression - * 5.Call the [[DefineOwnProperty]] internal method of array with arguments ToString(firstIndex), the Property Descriptor { [[Value]]: initValue, [[Writable]]: true - * , [[Enumerable]]: true, [[Configurable]]: true}, and false. - * - * @path ch11/11.1/11.1.4/11.1.4_4-5-1.js - * @description Initialize array using ElementList (Elisionopt AssignmentExpression) when index property (read-only) exists in Array.prototype (step 5) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 100, - writable: false, - configurable: true - }); - var arr = [101]; - - return arr.hasOwnProperty("0") && arr[0] === 101; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.4; + The production + ElementList : Elisionopt AssignmentExpression + 5.Call the [[DefineOwnProperty]] internal method of array with arguments ToString(firstIndex), the Property Descriptor { [[Value]]: initValue, [[Writable]]: true + , [[Enumerable]]: true, [[Configurable]]: true}, and false. +es5id: 11.1.4_4-5-1 +description: > + Initialize array using ElementList (Elisionopt + AssignmentExpression) when index property (read-only) exists in + Array.prototype (step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 100, + writable: false, + configurable: true + }); + var arr = [101]; + + return arr.hasOwnProperty("0") && arr[0] === 101; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.4/11.1.4_5-6-1.js b/test/suite/ch11/11.1/11.1.4/11.1.4_5-6-1.js index 14e02a1b71..07d48005f2 100644 --- a/test/suite/ch11/11.1/11.1.4/11.1.4_5-6-1.js +++ b/test/suite/ch11/11.1/11.1.4/11.1.4_5-6-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.4; - * The production - * ElementList : ElementList , Elisionopt AssignmentExpression - * 6.Call the [[DefineOwnProperty]] internal method of array with arguments ToString(ToUint32((pad+len)) and the Property Descriptor { [[Value]]: initValue - * , [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}, and false. - * - * @path ch11/11.1/11.1.4/11.1.4_5-6-1.js - * @description Initialize array using ElementList (ElementList , Elisionopt AssignmentExpression) when index property (read-only) exists in Array.prototype (step 6) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "1", { - value: 100, - writable: false, - configurable: true - }); - var arr = [101, 12]; - - return arr.hasOwnProperty("1") && arr[1] === 12; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.4; + The production + ElementList : ElementList , Elisionopt AssignmentExpression + 6.Call the [[DefineOwnProperty]] internal method of array with arguments ToString(ToUint32((pad+len)) and the Property Descriptor { [[Value]]: initValue + , [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}, and false. +es5id: 11.1.4_5-6-1 +description: > + Initialize array using ElementList (ElementList , Elisionopt + AssignmentExpression) when index property (read-only) exists in + Array.prototype (step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "1", { + value: 100, + writable: false, + configurable: true + }); + var arr = [101, 12]; + + return arr.hasOwnProperty("1") && arr[1] === 12; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.1.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.1.js index 6e202534bb..c1c39c6601 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.1.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.1.js - * @description Checking various properties of the array defined with expression "var array = []" - */ +/*--- +info: "Evaluate the production ArrayLiteral: [ ]" +es5id: 11.1.4_A1.1 +description: > + Checking various properties of the array defined with expression + "var array = []" +---*/ var array = []; @@ -29,4 +30,3 @@ if (array.toString !== Array.prototype.toString) { if (array.length !== 0) { $ERROR('#4: var array = []; array.length === 0. Actual: ' + (array.length)); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.2.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.2.js index e1b0ff3ee1..d27d5eaee1 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.2.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ Elision ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.2.js - * @description Checking various properties the array defined with "var array = [,,,,,]" - */ +/*--- +info: "Evaluate the production ArrayLiteral: [ Elision ]" +es5id: 11.1.4_A1.2 +description: > + Checking various properties the array defined with "var array = + [,,,,,]" +---*/ var array = [,,,,,]; @@ -29,4 +30,3 @@ if (array.toString !== Array.prototype.toString) { if (array.length !== 5) { $ERROR('#4: var array = [,,,,,]; array.length === 5. Actual: ' + (array.length)); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.3.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.3.js index 6682a8eef9..277aac9823 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.3.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ AssignmentExpression ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.3.js - * @description Checking various properteis and contents of the array defined with "var array = [1,2,3,4,5]" - */ +/*--- +info: "Evaluate the production ArrayLiteral: [ AssignmentExpression ]" +es5id: 11.1.4_A1.3 +description: > + Checking various properteis and contents of the array defined with + "var array = [1,2,3,4,5]" +---*/ var array = [1,2,3,4,5]; @@ -54,4 +55,3 @@ if (array[3] !== 4) { if (array[4] !== 5) { $ERROR('#9: var array = [1,2,3,4,5]; array[4] === 5. Actual: ' + (array[4])); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.4.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.4.js index 28e67233e2..190b43ff65 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.4.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ Elision, AssignmentExpression ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.4.js - * @description Checking various properteis and content of the array defined with "var array = [,,,1,2]" - */ +/*--- +info: "Evaluate the production ArrayLiteral: [ Elision, AssignmentExpression ]" +es5id: 11.1.4_A1.4 +description: > + Checking various properteis and content of the array defined with + "var array = [,,,1,2]" +---*/ var array = [,,,1,2]; @@ -54,4 +55,3 @@ if (array[3] !== 1) { if (array[4] !== 2) { $ERROR('#9: var array = [,,,1,2]; array[4] === 2. Actual: ' + (array[4])); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.5.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.5.js index d08183f2e5..68235545c6 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.5.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ AssignmentExpression, Elision ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.5.js - * @description Checking various properteis and contents of the array defined with "var array = [4,5,,,,]" - */ +/*--- +info: "Evaluate the production ArrayLiteral: [ AssignmentExpression, Elision ]" +es5id: 11.1.4_A1.5 +description: > + Checking various properteis and contents of the array defined with + "var array = [4,5,,,,]" +---*/ var array = [4,5,,,,]; @@ -54,4 +55,3 @@ if (array[3] !== undefined) { if (array[4] !== undefined) { $ERROR('#9: var array = [4,5,,,,]; array[4] === undefined. Actual: ' + (array[4])); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.6.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.6.js index 589eb3c0d8..a2d42e7dff 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.6.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ Elision, AssignmentExpression, Elision ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.6.js - * @description Checking various properteis and contents of the array defined with "var array = [,,3,,,]" - */ +/*--- +info: > + Evaluate the production ArrayLiteral: [ Elision, AssignmentExpression, + Elision ] +es5id: 11.1.4_A1.6 +description: > + Checking various properteis and contents of the array defined with + "var array = [,,3,,,]" +---*/ var array = [,,3,,,]; @@ -54,4 +57,3 @@ if (array[3] !== undefined) { if (array[4] !== undefined) { $ERROR('#9: var array = [,,3,,,]; array[4] === undefined. Actual: ' + (array[4])); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.7.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.7.js index 4689d6b00d..58d577928c 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.7.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A1.7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ArrayLiteral: [ AssignmentExpression, Elision, AssignmentExpression ] - * - * @path ch11/11.1/11.1.4/S11.1.4_A1.7.js - * @description Checking various properteis and contents of the array defined with "var array = [1,2,,4,5]" - */ +/*--- +info: > + Evaluate the production ArrayLiteral: [ AssignmentExpression, Elision, + AssignmentExpression ] +es5id: 11.1.4_A1.7 +description: > + Checking various properteis and contents of the array defined with + "var array = [1,2,,4,5]" +---*/ var array = [1,2,,4,5]; @@ -54,4 +57,3 @@ if (array[3] !== 4) { if (array[4] !== 5) { $ERROR('#9: var array = [1,2,,4,5]; array[4] === 5. Actual: ' + (array[4])); } - diff --git a/test/suite/ch11/11.1/11.1.4/S11.1.4_A2.js b/test/suite/ch11/11.1/11.1.4/S11.1.4_A2.js index 3e1c699fb0..3b15c90aea 100644 --- a/test/suite/ch11/11.1/11.1.4/S11.1.4_A2.js +++ b/test/suite/ch11/11.1/11.1.4/S11.1.4_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Create multi dimensional array - * - * @path ch11/11.1/11.1.4/S11.1.4_A2.js - * @description Checking various properteis and contents of the arrya defined with "var array = [[1,2], [3], []]" - */ +/*--- +info: Create multi dimensional array +es5id: 11.1.4_A2 +description: > + Checking various properteis and contents of the arrya defined with + "var array = [[1,2], [3], []]" +---*/ var array = [[1,2], [3], []]; @@ -125,4 +126,3 @@ if (array[0][1] !== 2) { if (array[1][0] !== 3) { $ERROR('#722: var array = [[1,2], [3], []]; array[1][0] === 3. Actual: ' + (array[1][0])); } - diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-0-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5-0-1.js index 5ff963de54..993e9e423d 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-0-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-0-1.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * it isn't clear what specific requirements of the specificaiton are being tested here. This test should - * probably be replaced by some more targeted tests. AllenWB - * - * @path ch11/11.1/11.1.5/11.1.5-0-1.js - * @description Object literal - get set property - */ - - -function testcase() { - var s1 = "In getter"; - var s2 = "In setter"; - var s3 = "Modified by setter"; - eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}};"); - if(o.foo !== s1) - return false; - o.foo=10; - if(s2 !== s3) - return false; - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + it isn't clear what specific requirements of the specificaiton are being tested here. This test should + probably be replaced by some more targeted tests. AllenWB +es5id: 11.1.5-0-1 +description: Object literal - get set property +includes: [runTestCase.js] +---*/ + +function testcase() { + var s1 = "In getter"; + var s2 = "In setter"; + var s3 = "Modified by setter"; + eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}};"); + if(o.foo !== s1) + return false; + o.foo=10; + if(s2 !== s3) + return false; + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-0-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5-0-2.js index 3f820b4412..3e2464ff68 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-0-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-0-2.js @@ -1,32 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * it isn't clear what specific requirements of the specificaiton are being tested here. This test should - * probably be replaced by some more targeted tests. AllenWB - * - * @path ch11/11.1/11.1.5/11.1.5-0-2.js - * @description Object literal - multiple get set properties - */ - - -function testcase() { - var s1 = "First getter"; - var s2 = "First setter"; - var s3 = "Second getter"; - eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}, get bar(){ return s3}, set bar(arg){ s3 = arg;}};"); - if(o.foo !== s1) - return false; - o.foo = 10; - if(s2 !== s3) - return false; - if(o.bar !== s3) - return false; - o.bar = "Second setter"; - if(o.bar !== "Second setter") - return false; - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + it isn't clear what specific requirements of the specificaiton are being tested here. This test should + probably be replaced by some more targeted tests. AllenWB +es5id: 11.1.5-0-2 +description: Object literal - multiple get set properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var s1 = "First getter"; + var s2 = "First setter"; + var s3 = "Second getter"; + eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}, get bar(){ return s3}, set bar(arg){ s3 = arg;}};"); + if(o.foo !== s1) + return false; + o.foo = 10; + if(s2 !== s3) + return false; + if(o.bar !== s3) + return false; + o.bar = "Second setter"; + if(o.bar !== "Second setter") + return false; + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-1-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5-1-s.js index 371c0aceb3..3cf4a31f62 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-1-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-1-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5-1-s.js - * @description Strict Mode - SyntaxError is thrown when 'eval' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var obj = {set _11_1_5_1_fun(eval) {}};"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5-1-s +description: > + Strict Mode - SyntaxError is thrown when 'eval' occurs as the + Identifier in a PropertySetParameterList of a PropertyAssignment + that is contained in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var obj = {set _11_1_5_1_fun(eval) {}};"); + return false; + } catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-1gs.js b/test/suite/ch11/11.1/11.1.5/11.1.5-1gs.js index 6d7766e3e1..d05c3479fe 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-1gs.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-1gs.js @@ -1,14 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5-1gs.js - * @description Strict Mode - SyntaxError is thrown when 'eval' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -var obj = { set _11_1_5_1_fun(eval) {}}; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5-1gs +description: > + Strict Mode - SyntaxError is thrown when 'eval' occurs as the + Identifier in a PropertySetParameterList of a PropertyAssignment + that is contained in strict code +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +var obj = { set _11_1_5_1_fun(eval) {}}; diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-2-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5-2-s.js index 5b763b78a8..bea5ab3aa5 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-2-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-2-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5-2-s.js - * @description Strict Mode - SyntaxError is thrown when 'arguments' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var obj = {set _11_1_5_2_fun(arguments) {} };"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5-2-s +description: > + Strict Mode - SyntaxError is thrown when 'arguments' occurs as the + Identifier in a PropertySetParameterList of a PropertyAssignment + that is contained in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var obj = {set _11_1_5_2_fun(arguments) {} };"); + return false; + } catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-2gs.js b/test/suite/ch11/11.1/11.1.5/11.1.5-2gs.js index f45f20b518..19d13b794b 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-2gs.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-2gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5-2gs.js - * @description Strict Mode - SyntaxError is thrown when eval code contains an ObjectLiteral with more than one definition of any data property - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -var obj = { _11_1_5_2_gs: 10, _11_1_5_2_gs: 10 }; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5-2gs +description: > + Strict Mode - SyntaxError is thrown when eval code contains an + ObjectLiteral with more than one definition of any data property +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +var obj = { _11_1_5_2_gs: 10, _11_1_5_2_gs: 10 }; diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-3-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5-3-s.js index 72219037e6..73604b6311 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-3-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-3-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5-3-s.js - * @description Strict Mode - SyntaxError is thrown when 'evals' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment if its FunctionBody is strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var obj = {set _11_1_5_3_fun(eval) { \"use strict\"; }};"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5-3-s +description: > + Strict Mode - SyntaxError is thrown when 'evals' occurs as the + Identifier in a PropertySetParameterList of a PropertyAssignment + if its FunctionBody is strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var obj = {set _11_1_5_3_fun(eval) { \"use strict\"; }};"); + return false; + } catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-4-4-a-1-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5-4-4-a-1-s.js index a192b85e49..fb4c4790bf 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-4-4-a-1-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-4-4-a-1-s.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true - * - * @path ch11/11.1/11.1.5/11.1.5-4-4-a-1-s.js - * @description Object literal - SyntaxError for duplicate date property name in strict mode - * @onlyStrict - */ - - -function testcase() { - - try - { - eval("'use strict'; ({foo:0,foo:1});"); - return false; - } - catch(e) - { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true +es5id: 11.1.5-4-4-a-1-s +description: > + Object literal - SyntaxError for duplicate date property name in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try + { + eval("'use strict'; ({foo:0,foo:1});"); + return false; + } + catch(e) + { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5-4-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5-4-s.js index 8e4185c916..fc5289f667 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5-4-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5-4-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5-4-s.js - * @description Strict Mode - SyntaxError is thrown when 'arguments' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment if its FunctionBody is strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var obj = {set _11_1_5_4_fun(arguments) {\"use strict\";}};"); - return false; - } catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5-4-s +description: > + Strict Mode - SyntaxError is thrown when 'arguments' occurs as + the Identifier in a PropertySetParameterList of a + PropertyAssignment if its FunctionBody is strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var obj = {set _11_1_5_4_fun(arguments) {\"use strict\";}};"); + return false; + } catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_3-3-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_3-3-1.js index 54b381128f..59138c0e8d 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_3-3-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_3-3-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyAssignment - * 3.Call the [[DefineOwnProperty]] internal method of obj with arguments propId.name, propId.descriptor, and false. - * - * @path ch11/11.1/11.1.5/11.1.5_3-3-1.js - * @description Object initialization using PropertyNameAndValueList (PropertyAssignment) when property (read-only) exists in Object.prototype (step 3) - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "prop", { - value: 100, - writable: false, - configurable: true - }); - var obj = { prop: 12 }; - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } finally { - delete Object.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyAssignment + 3.Call the [[DefineOwnProperty]] internal method of obj with arguments propId.name, propId.descriptor, and false. +es5id: 11.1.5_3-3-1 +description: > + Object initialization using PropertyNameAndValueList + (PropertyAssignment) when property (read-only) exists in + Object.prototype (step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "prop", { + value: 100, + writable: false, + configurable: true + }); + var obj = { prop: 12 }; + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } finally { + delete Object.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-2.js index 837c309b31..c170d87724 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-a-2.js - * @description Object literal - Duplicate data property name allowed if not in strict mode - */ - - -function testcase() { - - eval("({foo:0,foo:1});"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true +es5id: 11.1.5_4-4-a-2 +description: > + Object literal - Duplicate data property name allowed if not in + strict mode +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("({foo:0,foo:1});"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-3.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-3.js index 9d37ec89dd..7de96ab337 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-3.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-a-3.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-a-3.js - * @description Object literal - Duplicate data property name allowed gets last defined value - */ - - -function testcase() { - - var o = eval("({foo:0,foo:1});"); - return o.foo===1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true +es5id: 11.1.5_4-4-a-3 +description: > + Object literal - Duplicate data property name allowed gets last + defined value +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = eval("({foo:0,foo:1});"); + return o.foo===1; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-1.js index 9eb9c6dd4e..3959664120 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-b-1.js - * @description Object literal - SyntaxError if a data property definition is followed by get accessor definition with the same name - */ - - -function testcase() { - try - { - eval("({foo : 1, get foo(){}});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. +es5id: 11.1.5_4-4-b-1 +description: > + Object literal - SyntaxError if a data property definition is + followed by get accessor definition with the same name +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({foo : 1, get foo(){}});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-2.js index 39ace4e17e..c3594c1139 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-b-2.js - * @description Object literal - SyntaxError if a data property definition is followed by set accessor definition with the same name - */ - - -function testcase() { - try - { - eval("({foo : 1, set foo(x){}});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. +es5id: 11.1.5_4-4-b-2 +description: > + Object literal - SyntaxError if a data property definition is + followed by set accessor definition with the same name +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({foo : 1, set foo(x){}});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-1.js index b194489e0a..26fc6ce124 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-c-1.js - * @description Object literal - SyntaxError if a get accessor property definition is followed by a data property definition with the same name - */ - - -function testcase() { - try - { - eval("({get foo(){}, foo : 1});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. +es5id: 11.1.5_4-4-c-1 +description: > + Object literal - SyntaxError if a get accessor property definition + is followed by a data property definition with the same name +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({get foo(){}, foo : 1});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-2.js index 17b2080c3e..bce72625a1 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-c-2.js - * @description Object literal - SyntaxError if a set accessor property definition is followed by a data property definition with the same name - */ - - -function testcase() { - try - { - eval("({set foo(x){}, foo : 1});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. +es5id: 11.1.5_4-4-c-2 +description: > + Object literal - SyntaxError if a set accessor property definition + is followed by a data property definition with the same name +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({set foo(x){}, foo : 1});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-1.js index 3c08ae3916..2d3a2b619c 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-1.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-d-1.js - * @description Object literal - SyntaxError for duplicate property name (get,get) - */ - - -function testcase() { - try - { - eval("({get foo(){}, get foo(){}});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields +es5id: 11.1.5_4-4-d-1 +description: Object literal - SyntaxError for duplicate property name (get,get) +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({get foo(){}, get foo(){}});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-2.js index cad28d8766..05b31725da 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-2.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-d-2.js - * @description Object literal - SyntaxError for duplicate property name (set,set) - */ - - -function testcase() { - try - { - eval("({set foo(arg){}, set foo(arg1){}});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields +es5id: 11.1.5_4-4-d-2 +description: Object literal - SyntaxError for duplicate property name (set,set) +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({set foo(arg){}, set foo(arg1){}});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-3.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-3.js index 8bfacb42e4..c289c38f03 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-3.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-d-3.js - * @description Object literal - SyntaxError for duplicate property name (get,set,get) - */ - - -function testcase() { - try - { - eval("({get foo(){}, set foo(arg){}, get foo(){}});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields +es5id: 11.1.5_4-4-d-3 +description: > + Object literal - SyntaxError for duplicate property name + (get,set,get) +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({get foo(){}, set foo(arg){}, get foo(){}});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-4.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-4.js index d43c0d18b1..ef9c8c7468 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-4.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - * d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields - * - * @path ch11/11.1/11.1.5/11.1.5_4-4-d-4.js - * @description Object literal - SyntaxError for duplicate property name (set,get,set) - */ - - -function testcase() { - try - { - eval("({set foo(arg){}, get foo(){}, set foo(arg1){}});"); - return false; - } - catch(e) - { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true + d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields +es5id: 11.1.5_4-4-d-4 +description: > + Object literal - SyntaxError for duplicate property name + (set,get,set) +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + eval("({set foo(arg){}, get foo(){}, set foo(arg1){}});"); + return false; + } + catch(e) + { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_4-5-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_4-5-1.js index ff06c134b4..5eb7de9cce 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_4-5-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_4-5-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment - * 5.Call the [[DefineOwnProperty]] internal method of obj with arguments propId.name, propId.descriptor, and false. - * - * @path ch11/11.1/11.1.5/11.1.5_4-5-1.js - * @description Object initialization using PropertyNameAndValueList (PropertyNameAndValueList , PropertyAssignment) when property (read-only) exists in Object.prototype (Step 5) - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "prop2", { - value: 100, - writable: false, - configurable: true - }); - - var obj = { prop1: 101, prop2: 12 }; - - return obj.hasOwnProperty("prop2"); - } finally { - delete Object.prototype.prop2; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment + 5.Call the [[DefineOwnProperty]] internal method of obj with arguments propId.name, propId.descriptor, and false. +es5id: 11.1.5_4-5-1 +description: > + Object initialization using PropertyNameAndValueList + (PropertyNameAndValueList , PropertyAssignment) when property + (read-only) exists in Object.prototype (Step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "prop2", { + value: 100, + writable: false, + configurable: true + }); + + var obj = { prop1: 101, prop2: 12 }; + + return obj.hasOwnProperty("prop2"); + } finally { + delete Object.prototype.prop2; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_5-4-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_5-4-1.js index 7af0a34ecb..8f2daadd28 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_5-4-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_5-4-1.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyAssignment : PropertyName : AssignmentExpression - * 4.Let desc be the Property Descriptor{[[Value]]: propValue, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true} - * - * @path ch11/11.1/11.1.5/11.1.5_5-4-1.js - * @description Object literal - property descriptor for assignment expression - */ - - -function testcase() { - - var o = {foo : 1}; - var desc = Object.getOwnPropertyDescriptor(o,"foo"); - if(desc.value === 1 && - desc.writable === true && - desc.enumerable === true && - desc.configurable === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyAssignment : PropertyName : AssignmentExpression + 4.Let desc be the Property Descriptor{[[Value]]: propValue, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true} +es5id: 11.1.5_5-4-1 +description: Object literal - property descriptor for assignment expression +includes: [runTestCase.js] +---*/ + +function testcase() { + + var o = {foo : 1}; + var desc = Object.getOwnPropertyDescriptor(o,"foo"); + if(desc.value === 1 && + desc.writable === true && + desc.enumerable === true && + desc.configurable === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-1-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-1-s.js index 090d909443..246808fa9d 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-1-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-1-s.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5_6-2-1-s.js - * @description Strict Mode - SyntaxError is thrown when an assignment to a reserved word or a future reserved word is contained in strict code - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var obj = {\ - get _11_1_5_6_2_1() {\ - public = 42;\ - return public;\ - }\ - };"); - - var _11_1_5_6_2_1 = obj._11_1_5_6_2_1; - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5_6-2-1-s +description: > + Strict Mode - SyntaxError is thrown when an assignment to a + reserved word or a future reserved word is contained in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var obj = {\ + get _11_1_5_6_2_1() {\ + public = 42;\ + return public;\ + }\ + };"); + + var _11_1_5_6_2_1 = obj._11_1_5_6_2_1; + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-2-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-2-s.js index 32afa56ed4..62c2932ac0 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-2-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_6-2-2-s.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5_6-2-2-s.js - * @description Strict Mode - SyntaxError is thrown when an assignment to a reserved word or a future reserved word is made inside a strict mode FunctionBody of a PropertyAssignment - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var obj = {\ - get _11_1_5_6_2_2() {\ - \"use strict\";\ - public = 42;\ - return public;\ - }\ - };\ - var _11_1_5_6_2_2 = obj._11_1_5_6_2_2;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5_6-2-2-s +description: > + Strict Mode - SyntaxError is thrown when an assignment to a + reserved word or a future reserved word is made inside a strict + mode FunctionBody of a PropertyAssignment +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var obj = {\ + get _11_1_5_6_2_2() {\ + \"use strict\";\ + public = 42;\ + return public;\ + }\ + };\ + var _11_1_5_6_2_2 = obj._11_1_5_6_2_2;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-1.js index 6514561d97..c426b34274 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyAssignment : get PropertyName ( ) { FunctionBody } - * 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} - * - * @path ch11/11.1/11.1.5/11.1.5_6-3-1.js - * @description Object literal - property descriptor for get property assignment - */ - - -function testcase() { - - eval("var o = {get foo(){return 1;}};"); - var desc = Object.getOwnPropertyDescriptor(o,"foo"); - if(desc.enumerable === true && - desc.configurable === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyAssignment : get PropertyName ( ) { FunctionBody } + 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} +es5id: 11.1.5_6-3-1 +description: Object literal - property descriptor for get property assignment +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("var o = {get foo(){return 1;}};"); + var desc = Object.getOwnPropertyDescriptor(o,"foo"); + if(desc.enumerable === true && + desc.configurable === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-2.js index dc0665d696..d5907527f8 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_6-3-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyAssignment : get PropertyName ( ) { FunctionBody } - * 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} - * - * @path ch11/11.1/11.1.5/11.1.5_6-3-2.js - * @description Object literal - property descriptor for get property assignment should not create a set function - */ - - -function testcase() { - - eval("var o = {get foo(){return 1;}};"); - var desc = Object.getOwnPropertyDescriptor(o,"foo"); - return desc.set === undefined - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyAssignment : get PropertyName ( ) { FunctionBody } + 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} +es5id: 11.1.5_6-3-2 +description: > + Object literal - property descriptor for get property assignment + should not create a set function +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("var o = {get foo(){return 1;}};"); + var desc = Object.getOwnPropertyDescriptor(o,"foo"); + return desc.set === undefined + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-1-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-1-s.js index 71aacfa2eb..ff4b810903 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-1-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-1-s.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5_7-2-1-s.js - * @description Strict Mode - SyntaxError is thrown when an assignment to a reserved word is contained in strict code - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var data = \"data\";\ - var obj = {\ - set _11_1_5_7_2_1(value) {\ - public = 42;\ - data = value;\ - }\ - };\ - obj._11_1_5_7_2_1 = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5_7-2-1-s +description: > + Strict Mode - SyntaxError is thrown when an assignment to a + reserved word is contained in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var data = \"data\";\ + var obj = {\ + set _11_1_5_7_2_1(value) {\ + public = 42;\ + data = value;\ + }\ + };\ + obj._11_1_5_7_2_1 = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-2-s.js b/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-2-s.js index b351a43f70..de928be568 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-2-s.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_7-2-2-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.1/11.1.5/11.1.5_7-2-2-s.js - * @description Strict Mode - SyntaxError is thrown when an assignment to a reserved word is made in a strict FunctionBody of a PropertyAssignment - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var data = \"data\";\ - var obj = {\ - set _11_1_5_7_2_2(value) {\ - public = 42;\ - data = value;\ - }\ - };\ - obj._11_1_5_7_2_2 = 1;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.1.5_7-2-2-s +description: > + Strict Mode - SyntaxError is thrown when an assignment to a + reserved word is made in a strict FunctionBody of a + PropertyAssignment +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var data = \"data\";\ + var obj = {\ + set _11_1_5_7_2_2(value) {\ + public = 42;\ + data = value;\ + }\ + };\ + obj._11_1_5_7_2_2 = 1;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-1.js b/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-1.js index ae453873d8..746c935a9a 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-1.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyAssignment : set PropertyName( PropertySetParameterList ) { FunctionBody } - * 3.Let desc be the Property Descriptor{[[Set]]: closure, [[Enumerable]]: true, [[Configurable]]: true} - * - * @path ch11/11.1/11.1.5/11.1.5_7-3-1.js - * @description Object literal - property descriptor for set property assignment - */ - - -function testcase() { - - eval("var o = {set foo(arg){return 1;}};"); - var desc = Object.getOwnPropertyDescriptor(o,"foo"); - if(desc.enumerable === true && - desc.configurable === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyAssignment : set PropertyName( PropertySetParameterList ) { FunctionBody } + 3.Let desc be the Property Descriptor{[[Set]]: closure, [[Enumerable]]: true, [[Configurable]]: true} +es5id: 11.1.5_7-3-1 +description: Object literal - property descriptor for set property assignment +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("var o = {set foo(arg){return 1;}};"); + var desc = Object.getOwnPropertyDescriptor(o,"foo"); + if(desc.enumerable === true && + desc.configurable === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-2.js b/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-2.js index 216f80a2ec..3499deaa57 100644 --- a/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-2.js +++ b/test/suite/ch11/11.1/11.1.5/11.1.5_7-3-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 11.1.5; - * The production - * PropertyAssignment : get PropertyName ( ) { FunctionBody } - * 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} - * - * @path ch11/11.1/11.1.5/11.1.5_7-3-2.js - * @description Object literal - property descriptor for set property assignment should not create a get function - */ - - -function testcase() { - - eval("var o = {set foo(arg){}};"); - var desc = Object.getOwnPropertyDescriptor(o,"foo"); - return desc.get === undefined - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 11.1.5; + The production + PropertyAssignment : get PropertyName ( ) { FunctionBody } + 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true} +es5id: 11.1.5_7-3-2 +description: > + Object literal - property descriptor for set property assignment + should not create a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("var o = {set foo(arg){}};"); + var desc = Object.getOwnPropertyDescriptor(o,"foo"); + return desc.get === undefined + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.1.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.1.js index 0f4a1936eb..6a24e1512b 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.1.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ObjectLiteral: { } - * - * @path ch11/11.1/11.1.5/S11.1.5_A1.1.js - * @description Checking various properteis of the object defined with "var object = {}" - */ +/*--- +info: "Evaluate the production ObjectLiteral: { }" +es5id: 11.1.5_A1.1 +description: > + Checking various properteis of the object defined with "var object + = {}" +---*/ var object = {}; @@ -29,4 +30,3 @@ if (object.toString !== Object.prototype.toString) { if (object.toString() !== "[object Object]") { $ERROR('#4: var object = {}; object.toString === "[object Object]". Actual: ' + (object.toString)); } - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.2.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.2.js index 9eff826401..0c444ecf99 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.2.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ObjectLiteral: { NumericLiteral : AssignmentExpression} - * - * @path ch11/11.1/11.1.5/S11.1.5_A1.2.js - * @description Checking various properteis and contents of the object defined with "var object = {1 : true}" - */ +/*--- +info: > + Evaluate the production ObjectLiteral: { NumericLiteral : + AssignmentExpression} +es5id: 11.1.5_A1.2 +description: > + Checking various properteis and contents of the object defined + with "var object = {1 : true}" +---*/ var object = {1 : true}; @@ -34,5 +37,3 @@ if (object[1] !== true) { if (object["1"] !== true) { $ERROR('#5: var object = {1 : true}; object["1"] === true'); } - - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.3.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.3.js index dea77e509e..322dc9ad93 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.3.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ObjectLiteral: { StringLiteral : AssignmentExpression} - * - * @path ch11/11.1/11.1.5/S11.1.5_A1.3.js - * @description Checking various properteis and contents of the object defined with "var object = {"x" : true}" - */ +/*--- +info: > + Evaluate the production ObjectLiteral: { StringLiteral : + AssignmentExpression} +es5id: 11.1.5_A1.3 +description: > + Checking various properteis and contents of the object defined + with "var object = {"x" : true}" +---*/ var object = {"x" : true}; @@ -34,4 +37,3 @@ if (object["x"] !== true) { if (object.x !== true) { $ERROR('#5: var object = {"x" : true}; object.x === true'); } - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.4.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.4.js index 5919596dc6..17539211a5 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.4.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A1.4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ObjectLiteral: { Identifier : AssignmentExpression} - * - * @path ch11/11.1/11.1.5/S11.1.5_A1.4.js - * @description Checking various properteis and contents of the object defined with "var object = {prop : true}" - */ +/*--- +info: > + Evaluate the production ObjectLiteral: { Identifier : + AssignmentExpression} +es5id: 11.1.5_A1.4 +description: > + Checking various properteis and contents of the object defined + with "var object = {prop : true}" +---*/ var object = {prop : true}; @@ -34,4 +37,3 @@ if (object["prop"] !== true) { if (object.prop !== true) { $ERROR('#5: var object = {prop : true}; object.prop === true'); } - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A2.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A2.js index 8085783925..a4a474a932 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A2.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ObjectLiteral: { PropertyName : AssignmentExpression } - * - * @path ch11/11.1/11.1.5/S11.1.5_A2.js - * @description Creating property "prop" of various types(boolean, number and etc.) - */ +/*--- +info: > + Evaluate the production ObjectLiteral: { PropertyName : + AssignmentExpression } +es5id: 11.1.5_A2 +description: Creating property "prop" of various types(boolean, number and etc.) +---*/ //CHECK#1 var x = true; @@ -91,4 +92,3 @@ var object = {prop : x}; if (object.prop !== x) { $ERROR('#12: var x = this; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop)); } - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A3.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A3.js index 1d0024a9f8..7fc864a9ed 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A3.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluate the production ObjectLiteral: { PropertyNameAndValueList } - * - * @path ch11/11.1/11.1.5/S11.1.5_A3.js - * @description Creating the object defined with "var object = {0 : 1, "1" : "x", o : {}}" - */ +/*--- +info: "Evaluate the production ObjectLiteral: { PropertyNameAndValueList }" +es5id: 11.1.5_A3 +description: > + Creating the object defined with "var object = {0 : 1, "1" : "x", + o : {}}" +---*/ var object = {0 : 1, "1" : "x", o : {}}; @@ -24,4 +25,3 @@ if (object["1"] !== "x") { if (typeof object.o !== "object") { $ERROR('#1: var object = {0 : 1; "1" : "x"; o : {}}; typeof object.o === "object". Actual: ' + (typeof object.o)); } - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.1.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.1.js index b1d2a2f90f..9d3f09fc15 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.1.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The PropertyName is not really a BooleanLiteral - * - * @path ch11/11.1/11.1.5/S11.1.5_A4.1.js - * @description Checking if execution of "var object = {true : 1}" does not fail - */ +/*--- +info: The PropertyName is not really a BooleanLiteral +es5id: 11.1.5_A4.1 +description: "Checking if execution of \"var object = {true : 1}\" does not fail" +---*/ //CHECK#1 var object = {true : 1}; - diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.2.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.2.js index ebeb5fbc68..2c98651fb1 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.2.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The PropertyName is not really a nullLiteral - * - * @path ch11/11.1/11.1.5/S11.1.5_A4.2.js - * @description Checking if execution of "var object = {null : true}" does not fail - */ +/*--- +info: The PropertyName is not really a nullLiteral +es5id: 11.1.5_A4.2 +description: "Checking if execution of \"var object = {null : true}\" does not fail" +---*/ //CHECK#1 var object = {null : true}; diff --git a/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.3.js b/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.3.js index 03c89ee992..d04db0d0d5 100644 --- a/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.3.js +++ b/test/suite/ch11/11.1/11.1.5/S11.1.5_A4.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The PropertyName is undefined, ToString(BooleanLiteral), ToString(nullLiteral) - * - * @path ch11/11.1/11.1.5/S11.1.5_A4.3.js - * @description Creating properties with following names: undefined, 'true', 'null' - */ +/*--- +info: > + The PropertyName is undefined, ToString(BooleanLiteral), + ToString(nullLiteral) +es5id: 11.1.5_A4.3 +description: "Creating properties with following names: undefined, 'true', 'null'" +---*/ //CHECK#1 var object = {undefined : true}; @@ -31,4 +32,3 @@ var object = {"null" : true}; if (object["null"] !== true) { $ERROR('#4: var object = {"null" : true}; object["null"] === true'); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A1.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A1.js index d6b8323a8a..124bc20a3d 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A1.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator inside "grouping" operator are allowed - * - * @path ch11/11.1/11.1.6/S11.1.6_A1.js - * @description Inserting WhiteSpaces and LineTerminators into grouping operator. Eval is used - */ +/*--- +info: White Space and Line Terminator inside "grouping" operator are allowed +es5id: 11.1.6_A1 +description: > + Inserting WhiteSpaces and LineTerminators into grouping operator. + Eval is used +---*/ //CHECK#1 if (eval("(\u00091\u0009)") !== 1) { @@ -57,4 +58,3 @@ if (eval("(\u20291\u2029)") !== 1) { if (eval("(\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029)") !== 1) { $ERROR('#10: (\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029) === 1'); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A2.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A2.js index 30d5c290cd..eb6bd364ff 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A2.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator doesn't use GetValue. The operators "delete" and "typeof" can be applied to parenthesised expressions - * - * @path ch11/11.1/11.1.6/S11.1.6_A2.js - * @description Applying "delete" and "typeof" operators to an undefined variable and a property of an object - */ +/*--- +info: > + "This" operator doesn't use GetValue. The operators "delete" and "typeof" + can be applied to parenthesised expressions +es5id: 11.1.6_A2 +description: > + Applying "delete" and "typeof" operators to an undefined variable + and a property of an object +---*/ //CHECK#1 if (delete (x) !== true) { @@ -28,4 +31,3 @@ if (delete (object.prop) !== true) { if (typeof (object.prop) !== "undefined") { $ERROR('#4: var object = {}; typeof (object.prop) === "undefined". Actual: ' + (typeof (object.prop))); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T1.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T1.js index 26a0301043..a806aa41e6 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T1.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator only evaluates Expression - * - * @path ch11/11.1/11.1.6/S11.1.6_A3_T1.js - * @description Applying grouping operator to Boolean - */ +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T1 +description: Applying grouping operator to Boolean +---*/ // Check for Boolean @@ -20,4 +19,3 @@ var x = new Boolean(true); if ((x) !== x) { $ERROR('#2: var x = new Boolean(true); (x) === x. Actual: ' + ((x))); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T2.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T2.js index e29e039f46..3162573a83 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T2.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator only evaluates Expression - * - * @path ch11/11.1/11.1.6/S11.1.6_A3_T2.js - * @description Applying grouping operator to Number - */ +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T2 +description: Applying grouping operator to Number +---*/ //Check for Number @@ -20,4 +19,3 @@ var x = new Number(1); if ((x) !== x) { $ERROR('#2: var x = new Number(1); (x) === x. Actual: ' + ((x))); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T3.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T3.js index a673bd31d8..07274dbdc1 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T3.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator only evaluates Expression - * - * @path ch11/11.1/11.1.6/S11.1.6_A3_T3.js - * @description Applying grouping operator to String - */ +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T3 +description: Applying grouping operator to String +---*/ //Check for String @@ -25,4 +24,3 @@ var x = new Number("1"); if ((x) !== x) { $ERROR('#3: var x = new Number("1"); (x) === x. Actual: ' + ((x))); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T4.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T4.js index 2c049ccc96..8d26480586 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T4.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator only evaluates Expression - * - * @path ch11/11.1/11.1.6/S11.1.6_A3_T4.js - * @description Applying grouping operator to undefined - */ +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T4 +description: Applying grouping operator to undefined +---*/ //Check for undefined and null @@ -24,4 +23,3 @@ if ((void 0) !== void 0) { if ((null) !== null) { $ERROR('#2: (null) === null. Actual: ' + ((null))); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T5.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T5.js index 6fe51bbe93..8090be52e2 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T5.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator only evaluates Expression - * - * @path ch11/11.1/11.1.6/S11.1.6_A3_T5.js - * @description Using grouping operator in declaration of variables - */ +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T5 +description: Using grouping operator in declaration of variables +---*/ //CHECK#1 (x) = 1; @@ -19,4 +18,3 @@ var y = 1; (y)++; ++(y); (y)--; --(y); if (y !== 1) { $ERROR('#2: var y = 1; (y)++; ++(y); (y)--; --(y); y === 1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T6.js b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T6.js index e4398bfffa..d8c0f41ed8 100644 --- a/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T6.js +++ b/test/suite/ch11/11.1/11.1.6/S11.1.6_A3_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "This" operator only evaluates Expression - * - * @path ch11/11.1/11.1.6/S11.1.6_A3_T6.js - * @description Applying grouping operator to delete and typeof operators - */ +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T6 +description: Applying grouping operator to delete and typeof operators +---*/ //CHECK#1 if (delete (x) !== true) { @@ -17,4 +16,3 @@ if (delete (x) !== true) { if (typeof (x) !== "undefined") { $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A1.js index 25416cdca1..aa8b4cbdd8 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between BitwiseANDExpression and "&" or between "&" and EqualityExpression are allowed - * - * @path ch11/11.10/11.10.1/S11.10.1_A1.js - * @description Checking uses eval - */ +/*--- +info: > + White Space and Line Terminator between BitwiseANDExpression and "&" or + between "&" and EqualityExpression are allowed +es5id: 11.10.1_A1 +description: Checking uses eval +---*/ //CHECK#1 if ((eval("1\u0009&\u00091")) !== 1) { @@ -58,4 +59,3 @@ if ((eval("1\u2029&\u20291")) !== 1) { if ((eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029&\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { $ERROR('#10: (1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T1.js index 4acb431bc9..0e398d3c92 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y uses GetValue - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x & y uses GetValue +es5id: 11.10.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((1 & 1) !== 1) { @@ -40,4 +39,3 @@ objecty.prop = 1; if ((objectx.prop & objecty.prop) !== 1) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop & objecty.prop) === 1. Actual: ' + ((objectx.prop & objecty.prop))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T2.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T2.js index 91f0369a6b..bd3b4dca9d 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T2.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y uses GetValue - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x & y uses GetValue +es5id: 11.10.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x & 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T3.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T3.js index eb308b1b83..393dc4ad39 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T3.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y uses GetValue - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x & y uses GetValue +es5id: 11.10.1_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 & y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.2_T1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.2_T1.js index b5aafe3d8d..443c3ada8f 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.2_T1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y uses [[Default Value]] - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x & y uses [[Default Value]] +es5id: 11.10.1_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if (({valueOf: function() {return 1}} & 1) !== 1) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 & {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.3_T1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.3_T1.js index 079e2ccb49..95b938e2d5 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.3_T1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToInt32(first expression) is called first, and then ToInt32(second expression) - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.3_T1.js - * @description Checking by using "throw" - */ +/*--- +info: > + ToInt32(first expression) is called first, and then ToInt32(second + expression) +es5id: 11.10.1_A2.3_T1 +description: Checking by using "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T1.js index c77c23d5de..87e93a4080 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if ((x & (x = 1)) !== 0) { $ERROR('#2: var x = 0; (x & (x = 1)) === 0. Actual: ' + ((x & (x = 1)))); } - - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T2.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T2.js index 23b8d91cf7..eb67b87817 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T2.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T3.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T3.js index 2aef6019b2..0fe3d6acf7 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T3.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A2.4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.1/S11.10.1_A2.4_T3.js - * @description Checking with undeclarated variables - * @noStrict - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.1_A2.4_T3 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ //CHECK#1 try { @@ -24,5 +23,3 @@ catch (e) { if (((y = 1) & y) !== 1) { $ERROR('#2: ((y = 1) & y) === 1. Actual: ' + (((y = 1) & y))); } - - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.1.js index 3818831d22..5cd977580e 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T1.1.js - * @description Type(x) and Type(y) are primitive boolean and Boolean object - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T1.1 +description: Type(x) and Type(y) are primitive boolean and Boolean object +---*/ //CHECK#1 if ((true & true) !== 1) { @@ -27,4 +26,3 @@ if ((true & new Boolean(true)) !== 1) { if ((new Boolean(true) & new Boolean(true)) !== 1) { $ERROR('#4: (new Boolean(true) & new Boolean(true)) === 1. Actual: ' + ((new Boolean(true) & new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.2.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.2.js index 96f0a7c524..ebba690675 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.2.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T1.2.js - * @description Type(x) and Type(y) are primitive number and Number object - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T1.2 +description: Type(x) and Type(y) are primitive number and Number object +---*/ //CHECK#1 if ((1 & 1) !== 1) { @@ -27,5 +26,3 @@ if ((1 & new Number(1)) !== 1) { if ((new Number(1) & new Number(1)) !== 1) { $ERROR('#4: (new Number(1) & new Number(1)) === 1. Actual: ' + ((new Number(1) & new Number(1)))); } - - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.3.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.3.js index e94451b589..899f957a31 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.3.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T1.3.js - * @description Type(x) and Type(y) are primitive string and String object - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T1.3 +description: Type(x) and Type(y) are primitive string and String object +---*/ //CHECK#1 if (("1" & "1") !== 1) { @@ -37,4 +36,3 @@ if (("x" & "1") !== 0) { if (("1" & "x") !== 0) { $ERROR('#6: ("1" & "x") === 0. Actual: ' + (("1" & "x"))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.4.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.4.js index ba187bd355..48442a21e9 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.4.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T1.4.js - * @description Type(x) and Type(y) are null and undefined - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T1.4 +description: Type(x) and Type(y) are null and undefined +---*/ //CHECK#1 if ((null & undefined) !== 0) { @@ -27,4 +26,3 @@ if ((undefined & undefined) !== 0) { if ((null & null) !== 0) { $ERROR('#4: (null & null) === 0. Actual: ' + ((null & null))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.5.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.5.js index 437336a4b9..a44cbfe921 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.5.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T1.5.js - * @description Type(x) and Type(y) are Object object and Function object - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T1.5 +description: Type(x) and Type(y) are Object object and Function object +---*/ //CHECK#1 if (({} & function(){return 1}) !== 0) { @@ -27,5 +26,3 @@ if ((function(){return 1} & function(){return 1}) !== 0) { if (({} & {}) !== 0) { $ERROR('#4: ({} & {}) === 0. Actual: ' + (({} & {}))); } - - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.1.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.1.js index 7a70acf5fa..5ece2d66e5 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.1.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if ((true & 1) !== 1) { @@ -47,4 +48,3 @@ if ((new Boolean(true) & new Number(1)) !== 1) { if ((new Number(1) & new Boolean(true)) !== 1) { $ERROR('#8: (new Number(1) & new Boolean(true)) === 1. Actual: ' + ((new Number(1) & new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.2.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.2.js index 72765faf28..abca250cf9 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.2.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if (("1" & 1) !== 1) { @@ -57,4 +58,3 @@ if (("x" & 1) !== 0) { if ((1 & "x") !== 0) { $ERROR('#10: (1 & "x") === 0. Actual: ' + ((1 & "x"))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.3.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.3.js index a133e1f43c..1c9f652ce0 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.3.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if ((1 & null) !== 0) { @@ -27,4 +28,3 @@ if ((new Number(1) & null) !== 0) { if ((null & new Number(1)) !== 0) { $ERROR('#4: (null & new Number(1)) === 0. Actual: ' + ((null & new Number(1)))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.4.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.4.js index 1ceb71fa04..841df96f83 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.4.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if ((1 & undefined) !== 0) { @@ -27,4 +28,3 @@ if ((new Number(1) & undefined) !== 0) { if ((undefined & new Number(1)) !== 0) { $ERROR('#4: (undefined & new Number(1)) === 0. Actual: ' + ((undefined & new Number(1)))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.5.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.5.js index 3983069f4f..3eb6816a8c 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.5.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.5.js - * @description Type(x) us different from Type(y) and both types are String (primitive or object) or Boolean (primitive and object) - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.5 +description: > + Type(x) us different from Type(y) and both types are String + (primitive or object) or Boolean (primitive and object) +---*/ //CHECK#1 if ((true & "1") !== 1) { @@ -47,4 +48,3 @@ if ((new Boolean(true) & new String("1")) !== 1) { if ((new String("1") & new Boolean(true)) !== 1) { $ERROR('#8: (new String("1") & new Boolean(true)) === 1. Actual: ' + ((new String("1") & new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.6.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.6.js index b9f66bb79e..94f0c3bdc0 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.6.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if (("1" & undefined) !== 0) { @@ -27,4 +28,3 @@ if ((new String("1") & undefined) !== 0) { if ((undefined & new String("1")) !== 0) { $ERROR('#4: (undefined & new String("1")) === 0. Actual: ' + ((undefined & new String("1")))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.7.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.7.js index 0dbabe1f0e..0b3030b4ad 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.7.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if (("1" & null) !== 0) { @@ -27,4 +28,3 @@ if ((new String("1") & null) !== 0) { if ((null & new String("1")) !== 0) { $ERROR('#4: (null & new String("1")) === 0. Actual: ' + ((null & new String("1")))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.8.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.8.js index 33eec32410..23bbd0e2a8 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.8.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if ((true & undefined) !== 0) { @@ -27,4 +28,3 @@ if ((new Boolean(true) & undefined) !== 0) { if ((undefined & new Boolean(true)) !== 0) { $ERROR('#4: (undefined & new Boolean(true)) === 0. Actual: ' + ((undefined & new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.9.js b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.9.js index 9c94ad0e7d..265b35c480 100644 --- a/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.9.js +++ b/test/suite/ch11/11.10/11.10.1/S11.10.1_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x & y returns ToNumber(x) & ToNumber(y) - * - * @path ch11/11.10/11.10.1/S11.10.1_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x & y returns ToNumber(x) & ToNumber(y) +es5id: 11.10.1_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if ((true & null) !== 0) { @@ -27,4 +28,3 @@ if ((new Boolean(true) & null) !== 0) { if ((null & new Boolean(true)) !== 0) { $ERROR('#4: (null & new Boolean(true)) === 0. Actual: ' + ((null & new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A1.js index 6798a9ea4c..57ca714dee 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between BitwiseXORExpression and "^" or between "^" and BitwiseANDExpression are allowed - * - * @path ch11/11.10/11.10.2/S11.10.2_A1.js - * @description The check uses eval - */ +/*--- +info: > + White Space and Line Terminator between BitwiseXORExpression and "^" or + between "^" and BitwiseANDExpression are allowed +es5id: 11.10.2_A1 +description: The check uses eval +---*/ //CHECK#1 if ((eval("1\u0009^\u00091")) !== 0) { @@ -58,4 +59,3 @@ if ((eval("1\u2029^\u20291")) !== 0) { if ((eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029^\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { $ERROR('#10: (1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029^\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T1.js index f4aad4a197..6c2c21df17 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y uses GetValue - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x ^ y uses GetValue +es5id: 11.10.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((1 ^ 1) !== 0) { @@ -40,5 +39,3 @@ objecty.prop = 1; if ((objectx.prop ^ objecty.prop) !== 0) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop ^ objecty.prop) === 0. Actual: ' + ((objectx.prop ^ objecty.prop))); } - - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T2.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T2.js index 503ac96785..d17b97fac0 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T2.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y uses GetValue - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x ^ y uses GetValue +es5id: 11.10.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x ^ 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T3.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T3.js index 6c59696145..89eb918f60 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T3.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y uses GetValue - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x ^ y uses GetValue +es5id: 11.10.2_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1 ^ y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.2_T1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.2_T1.js index 0a00ada6de..510828d6f3 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.2_T1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y uses [[Default Value]] - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x ^ y uses [[Default Value]] +es5id: 11.10.2_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if (({valueOf: function() {return 1}} ^ 1) !== 0) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 ^ {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.3_T1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.3_T1.js index cbf3009a1b..35deb500e0 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.3_T1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToInt32(first expression) is called first, and then ToInt32(second expression) - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToInt32(first expression) is called first, and then ToInt32(second + expression) +es5id: 11.10.2_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T1.js index e1af1b864e..5c03a5acb7 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 1; @@ -19,6 +18,3 @@ var x = 0; if ((x ^ (x = 1)) !== 1) { $ERROR('#2: var x = 0; (x ^ (x = 1)) === 1. Actual: ' + ((x ^ (x = 1)))); } - - - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T2.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T2.js index 5cc5a15408..c335788008 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T2.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T3.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T3.js index 5241ec5578..67019d7895 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T3.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A2.4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.2/S11.10.2_A2.4_T3.js - * @description Checking with undeclarated variables - * @noStrict - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.2_A2.4_T3 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ //CHECK#1 try { @@ -24,6 +23,3 @@ catch (e) { if (((y = 1) ^ y) !== 0) { $ERROR('#2: ((y = 1) ^ y) === 0. Actual: ' + (((y = 1) ^ y))); } - - - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.1.js index e6466e7840..c8422380c2 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T1.1.js - * @description Type(x) and Type(y) are primitive boolean and Boolean object - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T1.1 +description: Type(x) and Type(y) are primitive boolean and Boolean object +---*/ //CHECK#1 if ((true ^ true) !== 0) { @@ -27,4 +26,3 @@ if ((true ^ new Boolean(true)) !== 0) { if ((new Boolean(true) ^ new Boolean(true)) !== 0) { $ERROR('#4: (new Boolean(true) ^ new Boolean(true)) === 0. Actual: ' + ((new Boolean(true) ^ new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.2.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.2.js index 9b997e82f3..5e155ba648 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.2.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T1.2.js - * @description Type(x) and Type(y) are primitive number and Number object - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T1.2 +description: Type(x) and Type(y) are primitive number and Number object +---*/ //CHECK#1 if ((1 ^ 1) !== 0) { @@ -27,5 +26,3 @@ if ((1 ^ new Number(1)) !== 0) { if ((new Number(1) ^ new Number(1)) !== 0) { $ERROR('#4: (new Number(1) ^ new Number(1)) === 0. Actual: ' + ((new Number(1) ^ new Number(1)))); } - - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.3.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.3.js index acd61cf117..dd170a4006 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.3.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T1.3.js - * @description Type(x) and Type(y) are primitive string and String object - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T1.3 +description: Type(x) and Type(y) are primitive string and String object +---*/ //CHECK#1 if (("1" ^ "1") !== 0) { @@ -37,4 +36,3 @@ if (("x" ^ "1") !== 1) { if (("1" ^ "x") !== 1) { $ERROR('#6: ("1" ^ "x") === 1. Actual: ' + (("1" ^ "x"))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.4.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.4.js index 72698a6560..2f6eb86838 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.4.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T1.4.js - * @description Type(x) and Type(y) are null and undefined - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T1.4 +description: Type(x) and Type(y) are null and undefined +---*/ //CHECK#1 if ((null ^ undefined) !== 0) { @@ -27,4 +26,3 @@ if ((undefined ^ undefined) !== 0) { if ((null ^ null) !== 0) { $ERROR('#4: (null ^ null) === 0. Actual: ' + ((null ^ null))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.5.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.5.js index b415d1c75e..d6dcf9d4f4 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.5.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T1.5.js - * @description Type(x) and Type(y) are Object object and Function object - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T1.5 +description: Type(x) and Type(y) are Object object and Function object +---*/ //CHECK#1 if (({} ^ function(){return 1}) !== 0) { @@ -27,5 +26,3 @@ if ((function(){return 1} ^ function(){return 1}) !== 0) { if (({} ^ {}) !== 0) { $ERROR('#4: ({} ^ {}) === 0. Actual: ' + (({} ^ {}))); } - - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.1.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.1.js index c32718b6e1..9a4070827b 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.1.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if ((true ^ 1) !== 0) { @@ -47,4 +48,3 @@ if ((new Boolean(true) ^ new Number(1)) !== 0) { if ((new Number(1) ^ new Boolean(true)) !== 0) { $ERROR('#8: (new Number(1) ^ new Boolean(true)) === 0. Actual: ' + ((new Number(1) ^ new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.2.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.2.js index 1503fbaf5a..6ce415c4d4 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.2.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if (("1" ^ 1) !== 0) { @@ -57,4 +58,3 @@ if (("x" ^ 1) !== 1) { if ((1 ^ "x") !== 1) { $ERROR('#10: (1 ^ "x") === 1. Actual: ' + ((1 ^ "x"))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.3.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.3.js index 7944312eb1..1a64c63fc3 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.3.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if ((1 ^ null) !== 1) { @@ -27,4 +28,3 @@ if ((new Number(1) ^ null) !== 1) { if ((null ^ new Number(1)) !== 1) { $ERROR('#4: (null ^ new Number(1)) === 1. Actual: ' + ((null ^ new Number(1)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.4.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.4.js index 6578ce84d2..16086cfd43 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.4.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if ((1 ^ undefined) !== 1) { @@ -27,4 +28,3 @@ if ((new Number(1) ^ undefined) !== 1) { if ((undefined ^ new Number(1)) !== 1) { $ERROR('#4: (undefined ^ new Number(1)) === 1. Actual: ' + ((undefined ^ new Number(1)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.5.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.5.js index 2e80dfef24..cf900a484e 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.5.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if ((true ^ "1") !== 0) { @@ -47,4 +48,3 @@ if ((new Boolean(true) ^ new String("1")) !== 0) { if ((new String("1") ^ new Boolean(true)) !== 0) { $ERROR('#8: (new String("1") ^ new Boolean(true)) === 0. Actual: ' + ((new String("1") ^ new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.6.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.6.js index b433b597e5..0c6dca00ce 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.6.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if (("1" ^ undefined) !== 1) { @@ -27,4 +28,3 @@ if ((new String("1") ^ undefined) !== 1) { if ((undefined ^ new String("1")) !== 1) { $ERROR('#4: (undefined ^ new String("1")) === 1. Actual: ' + ((undefined ^ new String("1")))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.7.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.7.js index 17996c7b8f..ea56137cc2 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.7.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if (("1" ^ null) !== 1) { @@ -27,4 +28,3 @@ if ((new String("1") ^ null) !== 1) { if ((null ^ new String("1")) !== 1) { $ERROR('#4: (null ^ new String("1")) === 1. Actual: ' + ((null ^ new String("1")))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.8.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.8.js index 36c1c1d233..5372ead994 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.8.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if ((true ^ undefined) !== 1) { @@ -27,4 +28,3 @@ if ((new Boolean(true) ^ undefined) !== 1) { if ((undefined ^ new Boolean(true)) !== 1) { $ERROR('#4: (undefined ^ new Boolean(true)) === 1. Actual: ' + ((undefined ^ new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.9.js b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.9.js index 6a9d6cb0db..326c3f3f67 100644 --- a/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.9.js +++ b/test/suite/ch11/11.10/11.10.2/S11.10.2_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ^ y returns ToNumber(x) ^ ToNumber(y) - * - * @path ch11/11.10/11.10.2/S11.10.2_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x ^ y returns ToNumber(x) ^ ToNumber(y) +es5id: 11.10.2_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if ((true ^ null) !== 1) { @@ -27,4 +28,3 @@ if ((new Boolean(true) ^ null) !== 1) { if ((null ^ new Boolean(true)) !== 1) { $ERROR('#4: (null ^ new Boolean(true)) === 1. Actual: ' + ((null ^ new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A1.js index 193860824c..9db717e38b 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between BitwiseORExpression and "|" or between "|" and BitwiseXORExpression are allowed - * - * @path ch11/11.10/11.10.3/S11.10.3_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between BitwiseORExpression and "|" or + between "|" and BitwiseXORExpression are allowed +es5id: 11.10.3_A1 +description: Checking by using eval +---*/ //CHECK#1 if ((eval("0\u0009|\u00091")) !== 1) { @@ -58,4 +59,3 @@ if ((eval("0\u2029|\u20291")) !== 1) { if ((eval("0\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029|\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { $ERROR('#10: (0\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T1.js index 4c39440fe0..8db8f0425e 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y uses GetValue - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x | y uses GetValue +es5id: 11.10.3_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((1 | 0) !== 1) { @@ -40,4 +39,3 @@ objecty.prop = 0; if ((objectx.prop | objecty.prop) !== 1) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 0; (objectx.prop | objecty.prop) === 1. Actual: ' + ((objectx.prop | objecty.prop))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T2.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T2.js index 38886529fa..3e42fa1a31 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T2.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y uses GetValue - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x | y uses GetValue +es5id: 11.10.3_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x | 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T3.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T3.js index 313ea95885..0574fe88d4 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T3.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y uses GetValue - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x | y uses GetValue +es5id: 11.10.3_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1 | y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.2_T1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.2_T1.js index 1c7331411f..3dd0f5e273 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.2_T1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y uses [[Default Value]] - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x | y uses [[Default Value]] +es5id: 11.10.3_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if (({valueOf: function() {return 1}} | 0) !== 1) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 0 | {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.3_T1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.3_T1.js index fe60b24d1a..88e6b2c654 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.3_T1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToInt32(first expression) is called first, and then ToInt32(second expression) - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToInt32(first expression) is called first, and then ToInt32(second + expression) +es5id: 11.10.3_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T1.js index 4c5705d003..5658515ca5 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.3_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 1; @@ -19,4 +18,3 @@ var x = 1; if ((x | (x = 0)) !== 1) { $ERROR('#2: var x = 1; (x | (x = 0)) === 1. Actual: ' + ((x | (x = 0)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T2.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T2.js index 886ae2af58..07a3a4053e 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T2.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.3_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T3.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T3.js index 975bba9115..c6000a6d15 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T3.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A2.4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.10/11.10.3/S11.10.3_A2.4_T3.js - * @description Checking with undeclarated variables - * @noStrict - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.10.3_A2.4_T3 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ //CHECK#1 try { @@ -24,4 +23,3 @@ catch (e) { if (((y = 1) | y) !== 1) { $ERROR('#2: ((y = 1) | y) === 1. Actual: ' + (((y = 1) | y))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.1.js index bdf1dddd2a..f8de8d3c51 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if ((true | true) !== 1) { @@ -27,4 +28,3 @@ if ((true | new Boolean(true)) !== 1) { if ((new Boolean(true) | new Boolean(true)) !== 1) { $ERROR('#4: (new Boolean(true) | new Boolean(true)) === 1. Actual: ' + ((new Boolean(true) | new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.2.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.2.js index 057a8fd550..ff88314389 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.2.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if ((1 | 1) !== 1) { @@ -27,5 +26,3 @@ if ((1 | new Number(1)) !== 1) { if ((new Number(1) | new Number(1)) !== 1) { $ERROR('#4: (new Number(1) | new Number(1)) === 1. Actual: ' + ((new Number(1) | new Number(1)))); } - - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.3.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.3.js index f627989513..ac8955db8f 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.3.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if (("1" | "1") !== 1) { @@ -37,4 +36,3 @@ if (("x" | "1") !== 1) { if (("1" | "x") !== 1) { $ERROR('#6: ("1" | "x") === 1. Actual: ' + (("1" | "x"))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.4.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.4.js index 1fcf3aea4e..cf3f18c581 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.4.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if ((null | undefined) !== 0) { @@ -27,4 +26,3 @@ if ((undefined | undefined) !== 0) { if ((null | null) !== 0) { $ERROR('#4: (null | null) === 0. Actual: ' + ((null | null))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.5.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.5.js index c3df41a2c0..d459eee051 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.5.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (({} | function(){return 1}) !== 0) { @@ -27,5 +26,3 @@ if ((function(){return 1} | function(){return 1}) !== 0) { if (({} | {}) !== 0) { $ERROR('#4: ({} | {}) === 0. Actual: ' + (({} | {}))); } - - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.1.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.1.js index a54f2dbdf9..3f27b6314a 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.1.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if ((true | 1) !== 1) { @@ -47,4 +48,3 @@ if ((new Boolean(true) | new Number(1)) !== 1) { if ((new Number(1) | new Boolean(true)) !== 1) { $ERROR('#8: (new Number(1) | new Boolean(true)) === 1. Actual: ' + ((new Number(1) | new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.2.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.2.js index 78795a5431..8570522a68 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.2.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if (("1" | 1) !== 1) { @@ -57,4 +58,3 @@ if (("x" | 1) !== 1) { if ((1 | "x") !== 1) { $ERROR('#10: (1 | "x") === 1. Actual: ' + ((1 | "x"))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.3.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.3.js index c01d6e7266..849cf5701e 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.3.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if ((1 | null) !== 1) { @@ -27,4 +28,3 @@ if ((new Number(1) | null) !== 1) { if ((null | new Number(1)) !== 1) { $ERROR('#4: (null | new Number(1)) === 1. Actual: ' + ((null | new Number(1)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.4.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.4.js index eb7d1432ac..f6984b117c 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.4.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if ((1 | undefined) !== 1) { @@ -27,4 +28,3 @@ if ((new Number(1) | undefined) !== 1) { if ((undefined | new Number(1)) !== 1) { $ERROR('#4: (undefined | new Number(1)) === 1. Actual: ' + ((undefined | new Number(1)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.5.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.5.js index 3195c149d3..50b61a6040 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.5.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if ((true | "1") !== 1) { @@ -47,4 +48,3 @@ if ((new Boolean(true) | new String("1")) !== 1) { if ((new String("1") | new Boolean(true)) !== 1) { $ERROR('#8: (new String("1") | new Boolean(true)) === 1. Actual: ' + ((new String("1") | new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.6.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.6.js index c6aeffafd8..6242af256b 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.6.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if (("1" | undefined) !== 1) { @@ -27,4 +28,3 @@ if ((new String("1") | undefined) !== 1) { if ((undefined | new String("1")) !== 1) { $ERROR('#4: (undefined | new String("1")) === 1. Actual: ' + ((undefined | new String("1")))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.7.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.7.js index fc0e39bb90..d4a1928e2c 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.7.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if (("1" | null) !== 1) { @@ -27,4 +28,3 @@ if ((new String("1") | null) !== 1) { if ((null | new String("1")) !== 1) { $ERROR('#4: (null | new String("1")) === 1. Actual: ' + ((null | new String("1")))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.8.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.8.js index 4208476dd4..7e62d7cdec 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.8.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if ((true | undefined) !== 1) { @@ -27,4 +28,3 @@ if ((new Boolean(true) | undefined) !== 1) { if ((undefined | new Boolean(true)) !== 1) { $ERROR('#4: (undefined | new Boolean(true)) === 1. Actual: ' + ((undefined | new Boolean(true)))); } - diff --git a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.9.js b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.9.js index 2c892773b9..2c050fb8ef 100644 --- a/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.9.js +++ b/test/suite/ch11/11.10/11.10.3/S11.10.3_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x | y returns ToNumber(x) | ToNumber(y) - * - * @path ch11/11.10/11.10.3/S11.10.3_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x | y returns ToNumber(x) | ToNumber(y) +es5id: 11.10.3_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if ((true | null) !== 1) { @@ -27,4 +28,3 @@ if ((new Boolean(true) | null) !== 1) { if ((null | new Boolean(true)) !== 1) { $ERROR('#4: (null | new Boolean(true)) === 1. Actual: ' + ((null | new Boolean(true)))); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A1.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A1.js index 71ff7400e6..ea2306d7b3 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A1.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LogicalANDExpression and "&&" or between "&&" and BitwiseORExpression are allowed - * - * @path ch11/11.11/11.11.1/S11.11.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between LogicalANDExpression and "&&" or + between "&&" and BitwiseORExpression are allowed +es5id: 11.11.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if ((eval("true\u0009&&\u0009true")) !== true) { @@ -58,4 +59,3 @@ if ((eval("true\u2029&&\u2029true")) !== true) { if ((eval("true\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029&&\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) { $ERROR('#10: (true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&&\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js index f637f4d735..5d6b1315bc 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x && y uses GetValue - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x && y uses GetValue +es5id: 11.11.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((false && true) !== false) { @@ -61,4 +60,3 @@ objecty.prop = true; if ((objectx.prop && objecty.prop) !== objectx.prop) { $ERROR('#8: var objectx = new Object(); var objecty = new Object(); objectx.prop = 0; objecty.prop = true; (objectx.prop && objecty.prop) === objectx.prop'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T2.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T2.js index 3c3585d1ed..fd3705d0e5 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T2.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x && y uses GetValue - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x && y uses GetValue +es5id: 11.11.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x && true throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T3.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T3.js index 65eb292aa6..fb8d715b54 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T3.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x && y uses GetValue - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.1_T3.js - * @description If ToBoolean(x) is true and GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x && y uses GetValue +es5id: 11.11.1_A2.1_T3 +description: > + If ToBoolean(x) is true and GetBase(y) is null, throw + ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: true && y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T4.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T4.js index e58d74ed29..1c5d949618 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T4.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.1_T4.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x && y uses GetValue - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.1_T4.js - * @description If ToBoolean(x) is false and GetBase(y) is null, return false - */ +/*--- +info: Operator x && y uses GetValue +es5id: 11.11.1_A2.1_T4 +description: If ToBoolean(x) is false and GetBase(y) is null, return false +---*/ //CHECK#1 if ((false && x) !== false) { $ERROR('#1: (false && x) === false'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T1.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T1.js index 44fad0ce81..799f269fef 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T1.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.11.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = false; @@ -19,5 +18,3 @@ var x = false; if ((x && (x = true)) !== false) { $ERROR('#2: var x = false; (x && (x = true)) === false'); } - - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T2.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T2.js index b5efeee142..2d3ede99bf 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T2.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.11.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T3.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T3.js index cf973f0ff6..3a9a805959 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T3.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A2.4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.11/11.11.1/S11.11.1_A2.4_T3.js - * @description Checking with undeclarated variables - * @noStrict - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.11.1_A2.4_T3 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ //CHECK#1 try { @@ -24,5 +23,3 @@ catch (e) { if (((y = true) && y) !== true) { $ERROR('#2: ((y = true) && y) === true'); } - - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T1.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T1.js index 8274f3c614..98e4b0ea3e 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T1.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return x - * - * @path ch11/11.11/11.11.1/S11.11.1_A3_T1.js - * @description Type(x) is primitive boolean and Type(y) is changed between primitive boolean and Boolean object - */ +/*--- +info: If ToBoolean(x) is false, return x +es5id: 11.11.1_A3_T1 +description: > + Type(x) is primitive boolean and Type(y) is changed between + primitive boolean and Boolean object +---*/ //CHECK#1 if ((false && true) !== false) { @@ -27,4 +28,3 @@ if ((false && new Boolean(true)) !== false) { if ((false && new Boolean(false)) !== false) { $ERROR('#4: (false && new Boolean(false)) === false'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T2.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T2.js index 01d206b5e4..7237a04ff9 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T2.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return x - * - * @path ch11/11.11/11.11.1/S11.11.1_A3_T2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: If ToBoolean(x) is false, return x +es5id: 11.11.1_A3_T2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if ((-0 && -1) !== 0) { @@ -30,4 +29,3 @@ if ((0 && new Number(-1)) !== 0) { if ((isNaN(NaN && 1)) !== true) { $ERROR('#3: (NaN && 1) === Not-a-Number'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T3.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T3.js index 034f9e2d82..156800d276 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T3.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return x - * - * @path ch11/11.11/11.11.1/S11.11.1_A3_T3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: If ToBoolean(x) is false, return x +es5id: 11.11.1_A3_T3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if (("" && "1") !== "") { @@ -17,4 +16,3 @@ if (("" && "1") !== "") { if (("" && new String("1")) !== "") { $ERROR('#2: ("" && new String("1")) === ""'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T4.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T4.js index 1a10a4ce4f..747bb7f184 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T4.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return x - * - * @path ch11/11.11/11.11.1/S11.11.1_A3_T4.js - * @description Type(x) or Type(y) is changed between null and undefined - */ +/*--- +info: If ToBoolean(x) is false, return x +es5id: 11.11.1_A3_T4 +description: Type(x) or Type(y) is changed between null and undefined +---*/ //CHECK#1 if ((undefined && true) !== undefined) { @@ -17,4 +16,3 @@ if ((undefined && true) !== undefined) { if ((null && false) !== null) { $ERROR('#2: (null && false) === null'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T1.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T1.js index 82f45be1fa..cd6f7e5480 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T1.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.11/11.11.1/S11.11.1_A4_T1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.11.1_A4_T1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if ((true && true) !== true) { @@ -41,4 +42,3 @@ var y = new Boolean(false); if ((new Boolean(false) && y) !== y) { $ERROR('#6: (var y = new Boolean(false); (new Boolean(false) && y) === y'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T2.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T2.js index 5aaea6dcea..396040d490 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T2.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.11/11.11.1/S11.11.1_A4_T2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.11.1_A4_T2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if ((-1 && -0) !== 0) { @@ -48,4 +47,3 @@ var y = new Number(-1); if ((new Number(NaN) && y) !== y) { $ERROR('#6: (var y = new Number(-1); (new Number(NaN) && y) === y'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T3.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T3.js index 1ae1808d15..8656193e01 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T3.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.11/11.11.1/S11.11.1_A4_T3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.11.1_A4_T3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if (("0" && "-1") !== "-1") { @@ -41,4 +40,3 @@ var y = new String(-1); if ((new String(NaN) && y) !== y) { $ERROR('#6: (var y = new String(-1); (new String(NaN) && y) === y'); } - diff --git a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T4.js b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T4.js index 1097443864..206618416b 100644 --- a/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T4.js +++ b/test/suite/ch11/11.11/11.11.1/S11.11.1_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.11/11.11.1/S11.11.1_A4_T4.js - * @description Type(x) or Type(y) is changed between null and undefined - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.11.1_A4_T4 +description: Type(x) or Type(y) is changed between null and undefined +---*/ //CHECK#1 if ((true && undefined) !== undefined) { @@ -17,4 +16,3 @@ if ((true && undefined) !== undefined) { if ((true && null) !== null) { $ERROR('#2: (true && null) === null'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A1.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A1.js index 904d903e8c..ac0b07b2ee 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A1.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LogicalORExpression and "||" or between "||" and LogicalANDExpression are allowed - * - * @path ch11/11.11/11.11.2/S11.11.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between LogicalORExpression and "||" or + between "||" and LogicalANDExpression are allowed +es5id: 11.11.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if ((eval("false\u0009||\u0009true")) !== true) { @@ -58,4 +59,3 @@ if ((eval("false\u2029||\u2029true")) !== true) { if ((eval("false\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029||\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) { $ERROR('#10: (false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029||\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T1.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T1.js index 2c79c2a5c9..6e91ba5cad 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T1.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x || y uses GetValue - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x || y uses GetValue +es5id: 11.11.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((true || false) !== true) { @@ -61,4 +60,3 @@ objecty.prop = false; if ((objectx.prop || objecty.prop) !== objectx.prop) { $ERROR('#8: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1.1; objecty.prop = false; (objectx.prop || objecty.prop) === objectx.prop'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T2.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T2.js index 7c3e743644..84625e4bee 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T2.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x || y uses GetValue - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x || y uses GetValue +es5id: 11.11.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x || true throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T3.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T3.js index 1535d1ca6c..07aa472886 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T3.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x || y uses GetValue - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.1_T3.js - * @description If ToBoolean(x) is false and GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x || y uses GetValue +es5id: 11.11.2_A2.1_T3 +description: > + If ToBoolean(x) is false and GetBase(y) is null, throw + ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: false || y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T4.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T4.js index 47101ac903..bd382ee83a 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T4.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.1_T4.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x || y uses GetValue - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.1_T4.js - * @description If ToBoolean(x) is true and GetBase(y) is null, return true - */ +/*--- +info: Operator x || y uses GetValue +es5id: 11.11.2_A2.1_T4 +description: If ToBoolean(x) is true and GetBase(y) is null, return true +---*/ //CHECK#1 if ((true || x) !== true) { $ERROR('#1: (true || x) === true'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T1.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T1.js index fd60270da1..9248fdf8bf 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T1.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.11.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = true; @@ -19,4 +18,3 @@ var x = true; if ((x || (x = false)) !== true) { $ERROR('#2: var x = true; (x || (x = false)) === true'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T2.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T2.js index 5d2ca65682..54cbcffec4 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T2.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.11.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T3.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T3.js index c818312c84..22ca492b64 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T3.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A2.4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.11/11.11.2/S11.11.2_A2.4_T3.js - * @description Checking with undeclarated variables - * @noStrict - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.11.2_A2.4_T3 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ //CHECK#1 try { @@ -24,5 +23,3 @@ catch (e) { if (((y = true) || y) !== true) { $ERROR('#2: ((y = true) || y) === true'); } - - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T1.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T1.js index d039585657..6e74ba8bf3 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T1.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return y - * - * @path ch11/11.11/11.11.2/S11.11.2_A3_T1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: If ToBoolean(x) is false, return y +es5id: 11.11.2_A3_T1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if ((false || true) !== true) { @@ -29,4 +30,3 @@ var y = new Boolean(false); if ((false || y) !== y) { $ERROR('#4: (var y = new Boolean(false); false || y) === y'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T2.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T2.js index dccc098d2f..1f9639e456 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T2.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return y - * - * @path ch11/11.11/11.11.2/S11.11.2_A3_T2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: If ToBoolean(x) is false, return y +es5id: 11.11.2_A3_T2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if ((0 || -0) !== 0) { @@ -37,4 +36,3 @@ var y = new Number(0); if ((NaN || y) !== y) { $ERROR('#4: (var y = new Number(0); NaN || y) === y'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T3.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T3.js index 6e500ede8c..bec673f311 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T3.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return y - * - * @path ch11/11.11/11.11.2/S11.11.2_A3_T3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: If ToBoolean(x) is false, return y +es5id: 11.11.2_A3_T3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if (("" || "1") !== "1") { @@ -18,4 +17,3 @@ var y = new String("1"); if (("" || y) !== y) { $ERROR('#2: (var y = new String("1"); "" || y) === y'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T4.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T4.js index 15b5579afb..6ba0a73e91 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T4.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return y - * - * @path ch11/11.11/11.11.2/S11.11.2_A3_T4.js - * @description Type(x) or Type(y) is changed between null and undefined - */ +/*--- +info: If ToBoolean(x) is false, return y +es5id: 11.11.2_A3_T4 +description: Type(x) or Type(y) is changed between null and undefined +---*/ //CHECK#1 if ((false || undefined) !== undefined) { @@ -17,4 +16,3 @@ if ((false || undefined) !== undefined) { if ((false || null) !== null) { $ERROR('#2: (false || null) === null'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T1.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T1.js index 567fbf522e..70ad337660 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T1.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return x - * - * @path ch11/11.11/11.11.2/S11.11.2_A4_T1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: If ToBoolean(x) is true, return x +es5id: 11.11.2_A4_T1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (((true || true)) !== true) { @@ -41,4 +42,3 @@ var x = new Boolean(false); if ((x || new Boolean(false)) !== x) { $ERROR('#6: (var x = new Boolean(false); (x || new Boolean(false)) === x'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T2.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T2.js index ff3c67a646..cb0f049046 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T2.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return x - * - * @path ch11/11.11/11.11.2/S11.11.2_A4_T2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: If ToBoolean(x) is true, return x +es5id: 11.11.2_A4_T2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if ((-1 || 1) !== -1) { @@ -40,4 +39,3 @@ var x = new Number(0); if ((x || new Number(NaN)) !== x) { $ERROR('#6: (var x = new Number(0); (x || new Number(NaN)) === x'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T3.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T3.js index ad71dfed7e..e3de4c2e46 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T3.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return x - * - * @path ch11/11.11/11.11.2/S11.11.2_A4_T3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: If ToBoolean(x) is true, return x +es5id: 11.11.2_A4_T3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if (("-1" || "1") !== "-1") { @@ -41,4 +40,3 @@ var x = new String(0); if ((x || new String(NaN)) !== x) { $ERROR('#6: (var x = new String(0); (x || new String(NaN)) === x'); } - diff --git a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T4.js b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T4.js index d37b2ea598..f8d48abdd8 100644 --- a/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T4.js +++ b/test/suite/ch11/11.11/11.11.2/S11.11.2_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return x - * - * @path ch11/11.11/11.11.2/S11.11.2_A4_T4.js - * @description Type(x) or Type(y) vary between Null and Undefined - */ +/*--- +info: If ToBoolean(x) is true, return x +es5id: 11.11.2_A4_T4 +description: Type(x) or Type(y) vary between Null and Undefined +---*/ //CHECK#1 if ((true || undefined) !== true) { @@ -17,4 +16,3 @@ if ((true || undefined) !== true) { if ((true || null) !== true) { $ERROR('#2: (true || null) === true'); } - diff --git a/test/suite/ch11/11.12/S11.12_A1.js b/test/suite/ch11/11.12/S11.12_A1.js index b813aeb7f1..d6e15cb85f 100644 --- a/test/suite/ch11/11.12/S11.12_A1.js +++ b/test/suite/ch11/11.12/S11.12_A1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LogicalORExpression and "?" or between "?" and AssignmentExpression or between AssignmentExpression and ":" or between ":" and AssignmentExpression are allowed - * - * @path ch11/11.12/S11.12_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between LogicalORExpression and "?" or + between "?" and AssignmentExpression or between AssignmentExpression and + ":" or between ":" and AssignmentExpression are allowed +es5id: 11.12_A1 +description: Checking by using eval +---*/ //CHECK#1 if ((eval("false\u0009?\u0009true\u0009:\u0009true")) !== true) { @@ -57,4 +59,3 @@ if ((eval("false\u2029?\u2029true\u2029:\u2029true")) !== true) { if ((eval("false\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029?\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029:\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) { $ERROR('#10: (false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029?\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029:\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true'); } - diff --git a/test/suite/ch11/11.12/S11.12_A2.1_T1.js b/test/suite/ch11/11.12/S11.12_A2.1_T1.js index 2a9e568a9b..2025bd04ed 100644 --- a/test/suite/ch11/11.12/S11.12_A2.1_T1.js +++ b/test/suite/ch11/11.12/S11.12_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ? y : z uses GetValue - * - * @path ch11/11.12/S11.12_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: "Operator x ? y : z uses GetValue" +es5id: 11.12_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((true ? false : true) !== false) { @@ -46,4 +45,3 @@ var z = new Boolean(true); if ((x ? y : z) !== z) { $ERROR('#6: var x = false; var y = new Boolean(false); var z = new Boolean(true); (x ? y : z) === z'); } - diff --git a/test/suite/ch11/11.12/S11.12_A2.1_T2.js b/test/suite/ch11/11.12/S11.12_A2.1_T2.js index 465976c49f..5b1206ead2 100644 --- a/test/suite/ch11/11.12/S11.12_A2.1_T2.js +++ b/test/suite/ch11/11.12/S11.12_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ? y : z uses GetValue - * - * @path ch11/11.12/S11.12_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: "Operator x ? y : z uses GetValue" +es5id: 11.12_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x ? true : false throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.12/S11.12_A2.1_T3.js b/test/suite/ch11/11.12/S11.12_A2.1_T3.js index 1e59cd63a2..725358405e 100644 --- a/test/suite/ch11/11.12/S11.12_A2.1_T3.js +++ b/test/suite/ch11/11.12/S11.12_A2.1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ? y : z uses GetValue - * - * @path ch11/11.12/S11.12_A2.1_T3.js - * @description If ToBoolean(x) is true and GetBase(y) is null, throw ReferenceError - */ +/*--- +info: "Operator x ? y : z uses GetValue" +es5id: 11.12_A2.1_T3 +description: > + If ToBoolean(x) is true and GetBase(y) is null, throw + ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: true ? y : false throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.12/S11.12_A2.1_T4.js b/test/suite/ch11/11.12/S11.12_A2.1_T4.js index 0d3c01b298..a36b93792f 100644 --- a/test/suite/ch11/11.12/S11.12_A2.1_T4.js +++ b/test/suite/ch11/11.12/S11.12_A2.1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ? y : z uses GetValue - * - * @path ch11/11.12/S11.12_A2.1_T4.js - * @description If ToBoolean(x) is false and GetBase(z) is null, throw ReferenceError - */ +/*--- +info: "Operator x ? y : z uses GetValue" +es5id: 11.12_A2.1_T4 +description: > + If ToBoolean(x) is false and GetBase(z) is null, throw + ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: false ? true : z throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.12/S11.12_A2.1_T5.js b/test/suite/ch11/11.12/S11.12_A2.1_T5.js index 05df26fa50..e2fcc0ed74 100644 --- a/test/suite/ch11/11.12/S11.12_A2.1_T5.js +++ b/test/suite/ch11/11.12/S11.12_A2.1_T5.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ? y : z uses GetValue - * - * @path ch11/11.12/S11.12_A2.1_T5.js - * @description If ToBoolean(x) is true and GetBase(z) is null, return y - */ +/*--- +info: "Operator x ? y : z uses GetValue" +es5id: 11.12_A2.1_T5 +description: If ToBoolean(x) is true and GetBase(z) is null, return y +---*/ //CHECK#1 var y = new Object(); if ((true ? y : z) !== y) { $ERROR('#1: var y = new Object(); (true ? y : z) === y'); } - diff --git a/test/suite/ch11/11.12/S11.12_A2.1_T6.js b/test/suite/ch11/11.12/S11.12_A2.1_T6.js index f25c22a52e..878aa37e26 100644 --- a/test/suite/ch11/11.12/S11.12_A2.1_T6.js +++ b/test/suite/ch11/11.12/S11.12_A2.1_T6.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x ? y : z uses GetValue - * - * @path ch11/11.12/S11.12_A2.1_T6.js - * @description If ToBoolean(x) is false and GetBase(y) is null, return z - */ +/*--- +info: "Operator x ? y : z uses GetValue" +es5id: 11.12_A2.1_T6 +description: If ToBoolean(x) is false and GetBase(y) is null, return z +---*/ //CHECK#1 var z = new Object(); if ((false ? y : z) !== z) { $ERROR('#1: var z = new Object(); (false ? y : z) === z'); } - diff --git a/test/suite/ch11/11.12/S11.12_A3_T1.js b/test/suite/ch11/11.12/S11.12_A3_T1.js index 6614bb7f21..3ceafbc51e 100644 --- a/test/suite/ch11/11.12/S11.12_A3_T1.js +++ b/test/suite/ch11/11.12/S11.12_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return z - * - * @path ch11/11.12/S11.12_A3_T1.js - * @description Type(y) and Type(z) are boolean primitives - */ +/*--- +info: If ToBoolean(x) is false, return z +es5id: 11.12_A3_T1 +description: Type(y) and Type(z) are boolean primitives +---*/ //CHECK#1 if ((false ? false : true) !== true) { @@ -18,4 +17,3 @@ var z = new Boolean(true); if ((false ? true : z) !== z) { $ERROR('#2: (var y = new Boolean(true); (false ? true : z) === z'); } - diff --git a/test/suite/ch11/11.12/S11.12_A3_T2.js b/test/suite/ch11/11.12/S11.12_A3_T2.js index 311cce7d16..7a7463efe9 100644 --- a/test/suite/ch11/11.12/S11.12_A3_T2.js +++ b/test/suite/ch11/11.12/S11.12_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return z - * - * @path ch11/11.12/S11.12_A3_T2.js - * @description Type(y) and Type(z) are number primitives - */ +/*--- +info: If ToBoolean(x) is false, return z +es5id: 11.12_A3_T2 +description: Type(y) and Type(z) are number primitives +---*/ //CHECK#1 if ((0 ? 0 : 1) !== 1) { @@ -18,4 +17,3 @@ var z = new Number(1); if ((0 ? 1 : z) !== z) { $ERROR('#2: (var y = new Number(1); (0 ? 1 : z) === z'); } - diff --git a/test/suite/ch11/11.12/S11.12_A3_T3.js b/test/suite/ch11/11.12/S11.12_A3_T3.js index 644a58fd04..fdc1bbba4b 100644 --- a/test/suite/ch11/11.12/S11.12_A3_T3.js +++ b/test/suite/ch11/11.12/S11.12_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return z - * - * @path ch11/11.12/S11.12_A3_T3.js - * @description Type(y) and Type(z) are string primitives - */ +/*--- +info: If ToBoolean(x) is false, return z +es5id: 11.12_A3_T3 +description: Type(y) and Type(z) are string primitives +---*/ //CHECK#1 if (("" ? "" : "1") !== "1") { @@ -18,4 +17,3 @@ var z = new String("1"); if (("" ? "1" : z) !== z) { $ERROR('#2: (var y = new String("1"); ("" ? "1" : z) === z'); } - diff --git a/test/suite/ch11/11.12/S11.12_A3_T4.js b/test/suite/ch11/11.12/S11.12_A3_T4.js index 296ae94eb7..f76a8ace57 100644 --- a/test/suite/ch11/11.12/S11.12_A3_T4.js +++ b/test/suite/ch11/11.12/S11.12_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is false, return z - * - * @path ch11/11.12/S11.12_A3_T4.js - * @description Type(x) or Type(y) is changed between null and undefined - */ +/*--- +info: If ToBoolean(x) is false, return z +es5id: 11.12_A3_T4 +description: Type(x) or Type(y) is changed between null and undefined +---*/ //CHECK#1 if ((false ? true : undefined) !== undefined) { @@ -17,4 +16,3 @@ if ((false ? true : undefined) !== undefined) { if ((false ? true : null) !== null) { $ERROR('#2: (false ? true : null) === null'); } - diff --git a/test/suite/ch11/11.12/S11.12_A4_T1.js b/test/suite/ch11/11.12/S11.12_A4_T1.js index 588d901412..d4d99f21cb 100644 --- a/test/suite/ch11/11.12/S11.12_A4_T1.js +++ b/test/suite/ch11/11.12/S11.12_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.12/S11.12_A4_T1.js - * @description Type(y) and Type(z) are boolean primitives - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.12_A4_T1 +description: Type(y) and Type(z) are boolean primitives +---*/ //CHECK#1 if ((true ? false : true) !== false) { @@ -24,4 +23,3 @@ var y = new Boolean(false); if ((y ? y : true) !== y) { $ERROR('#3: (var y = new Boolean(false); (y ? y : true) === y'); } - diff --git a/test/suite/ch11/11.12/S11.12_A4_T2.js b/test/suite/ch11/11.12/S11.12_A4_T2.js index eda208159f..3d4757ec88 100644 --- a/test/suite/ch11/11.12/S11.12_A4_T2.js +++ b/test/suite/ch11/11.12/S11.12_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.12/S11.12_A4_T2.js - * @description Type(y) and Type(z) are number primitives - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.12_A4_T2 +description: Type(y) and Type(z) are number primitives +---*/ //CHECK#1 if ((1 ? 0 : 1) !== 0) { @@ -24,4 +23,3 @@ var y = new Number(NaN); if ((y ? y : 1) !== y) { $ERROR('#3: (var y = new Number(NaN); (y ? y : 1) === y'); } - diff --git a/test/suite/ch11/11.12/S11.12_A4_T3.js b/test/suite/ch11/11.12/S11.12_A4_T3.js index 168902e136..a46a9af4b3 100644 --- a/test/suite/ch11/11.12/S11.12_A4_T3.js +++ b/test/suite/ch11/11.12/S11.12_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.12/S11.12_A4_T3.js - * @description Type(y) and Type(z) are string primitives - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.12_A4_T3 +description: Type(y) and Type(z) are string primitives +---*/ //CHECK#1 if (("1" ? "" : "1") !== "") { @@ -24,4 +23,3 @@ var y = new String("y"); if ((y ? y : "1") !== y) { $ERROR('#3: (var y = new String("y"); (y ? y : "1") === y'); } - diff --git a/test/suite/ch11/11.12/S11.12_A4_T4.js b/test/suite/ch11/11.12/S11.12_A4_T4.js index c3b5f47714..5323d2ee51 100644 --- a/test/suite/ch11/11.12/S11.12_A4_T4.js +++ b/test/suite/ch11/11.12/S11.12_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToBoolean(x) is true, return y - * - * @path ch11/11.12/S11.12_A4_T4.js - * @description Type(x) or Type(y) is changed between null and undefined - */ +/*--- +info: If ToBoolean(x) is true, return y +es5id: 11.12_A4_T4 +description: Type(x) or Type(y) is changed between null and undefined +---*/ //CHECK#1 if ((true ? undefined : true) !== undefined) { @@ -17,4 +16,3 @@ if ((true ? undefined : true) !== undefined) { if ((true ? null : true) !== null) { $ERROR('#2: (true ? null : true) === null'); } - diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-1-1.js b/test/suite/ch11/11.13/11.13.1/11.13.1-1-1.js index 551c80478b..c71ce74e02 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-1-1.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-1-1.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * PutValue operates only on references (see step 1) - * - * @path ch11/11.13/11.13.1/11.13.1-1-1.js - * @description simple assignment throws ReferenceError if LeftHandSide is not a reference (number) - */ - - -function testcase() { - try { - eval("42 = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: PutValue operates only on references (see step 1) +es5id: 11.13.1-1-1 +description: > + simple assignment throws ReferenceError if LeftHandSide is not a + reference (number) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("42 = 42"); + } + catch (e) { + if (e instanceof ReferenceError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-1-2.js b/test/suite/ch11/11.13/11.13.1/11.13.1-1-2.js index 5abde0d6dc..cc0c0a5b7f 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-1-2.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-1-2.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * PutValue operates only on references (see step 1). - * - * @path ch11/11.13/11.13.1/11.13.1-1-2.js - * @description simple assignment throws ReferenceError if LeftHandSide is not a reference (string) - */ - - -function testcase() { - try { - eval("'x' = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: PutValue operates only on references (see step 1). +es5id: 11.13.1-1-2 +description: > + simple assignment throws ReferenceError if LeftHandSide is not a + reference (string) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("'x' = 42"); + } + catch (e) { + if (e instanceof ReferenceError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-1-3.js b/test/suite/ch11/11.13/11.13.1/11.13.1-1-3.js index 1dbeb18c3e..4e8fd80402 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-1-3.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-1-3.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * PutValue operates only on references (see step 1). - * - * @path ch11/11.13/11.13.1/11.13.1-1-3.js - * @description simple assignment throws ReferenceError if LeftHandSide is not a reference (boolean) - */ - - -function testcase() { - try { - eval("true = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: PutValue operates only on references (see step 1). +es5id: 11.13.1-1-3 +description: > + simple assignment throws ReferenceError if LeftHandSide is not a + reference (boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("true = 42"); + } + catch (e) { + if (e instanceof ReferenceError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-1-4.js b/test/suite/ch11/11.13/11.13.1/11.13.1-1-4.js index dbbfb619b7..a17be88751 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-1-4.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-1-4.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * PutValue operates only on references (see step 1). - * - * @path ch11/11.13/11.13.1/11.13.1-1-4.js - * @description simple assignment throws ReferenceError if LeftHandSide is not a reference (null) - */ - - -function testcase() { - try { - eval("null = 42"); - } - catch (e) { - if (e instanceof ReferenceError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: PutValue operates only on references (see step 1). +es5id: 11.13.1-1-4 +description: > + simple assignment throws ReferenceError if LeftHandSide is not a + reference (null) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("null = 42"); + } + catch (e) { + if (e instanceof ReferenceError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-1-6-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-1-6-s.js index 915caf5903..5d524eb629 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-1-6-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-1-6-s.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * PutValue operates only on references (see step 3.a). - * - * @path ch11/11.13/11.13.1/11.13.1-1-6-s.js - * @description simple assignment throws ReferenceError if LeftHandSide is an unresolvable reference in strict mode (base obj undefined) - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - __ES3_1_test_suite_test_11_13_1_unique_id_0__.x = 42; - return false; - } - catch (e) { - return (e instanceof ReferenceError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: PutValue operates only on references (see step 3.a). +es5id: 11.13.1-1-6-s +description: > + simple assignment throws ReferenceError if LeftHandSide is an + unresolvable reference in strict mode (base obj undefined) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + __ES3_1_test_suite_test_11_13_1_unique_id_0__.x = 42; + return false; + } + catch (e) { + return (e instanceof ReferenceError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-1-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-1-s.js index 5330f5411b..d41b7c67a2 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-1-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-1-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-1-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide is a reference to a data property with the attribute value {[[Writable]]:false} under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop = 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-1-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide is a + reference to a data property with the attribute value + {[[Writable]]:false} under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop = 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-2-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-2-s.js index f16e19d189..a843b8216b 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-2-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-2-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-2-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide is a reference to an accessor property with the attribute value {[[Set]]:undefined} under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop = 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-2-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide is a + reference to an accessor property with the attribute value + {[[Set]]:undefined} under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop = 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-3-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-3-s.js index 79d23670e8..78607b9b20 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-3-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-3-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-3-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide is a reference to a non-existent property of an object whose [[Extensible]] internal property has the value false under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len = 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-3-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide is a + reference to a non-existent property of an object whose + [[Extensible]] internal property has the value false under strict + mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len = 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-1.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-1.js index 04e93c38d3..6880dcf547 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-1.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * PutValue operates only on references (see step 3.b). - * - * @path ch11/11.13/11.13.1/11.13.1-4-1.js - * @description simple assignment creates property on the global object if LeftHandSide is an unresolvable reference - */ - - -function testcase() { - function foo() { - __ES3_1_test_suite_test_11_13_1_unique_id_3__ = 42; - } - foo(); - - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), '__ES3_1_test_suite_test_11_13_1_unique_id_3__'); - if (desc.value === 42 && - desc.writable === true && - desc.enumerable === true && - desc.configurable === true) { - delete __ES3_1_test_suite_test_11_13_1_unique_id_3__; - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: PutValue operates only on references (see step 3.b). +es5id: 11.13.1-4-1 +description: > + simple assignment creates property on the global object if + LeftHandSide is an unresolvable reference +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + function foo() { + __ES3_1_test_suite_test_11_13_1_unique_id_3__ = 42; + } + foo(); + + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), '__ES3_1_test_suite_test_11_13_1_unique_id_3__'); + if (desc.value === 42 && + desc.writable === true && + desc.enumerable === true && + desc.configurable === true) { + delete __ES3_1_test_suite_test_11_13_1_unique_id_3__; + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-14-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-14-s.js index e82720d70d..05c58579ba 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-14-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-14-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-14-s.js - * @description simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Number.MAX_VALUE) - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - Number.MAX_VALUE = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-14-s +description: > + simple assignment throws TypeError if LeftHandSide is a readonly + property in strict mode (Number.MAX_VALUE) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + Number.MAX_VALUE = 42; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-27-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-27-s.js index 00da46edae..5ce719261d 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-27-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-27-s.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-27-s.js - * @description simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.undefined) - */ - - -function testcase() { - 'use strict'; - - try { - fnGlobalObject().undefined = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-27-s +description: > + simple assignment throws TypeError if LeftHandSide is a readonly + property in strict mode (Global.undefined) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + 'use strict'; + + try { + fnGlobalObject().undefined = 42; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-28-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-28-s.js index 039991a371..33ccd378a7 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-28-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-28-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-28-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears as the LeftHandSideExpression of simple assignment(=) under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("var eval = 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-28-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appears as the LeftHandSideExpression of simple assignment(=) + under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("var eval = 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-28gs.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-28gs.js index 86867f1ba1..fa6945babb 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-28gs.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-28gs.js @@ -1,14 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-28gs.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'Math.PI' appears as the LeftHandSideExpression of simple assignment(=) - * @onlyStrict - * @negative NotEarlyError - */ -"use strict"; -throw NotEarlyError; -Math.PI = 20; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-28gs +description: > + Strict Mode - SyntaxError is thrown if the identifier 'Math.PI' + appears as the LeftHandSideExpression of simple assignment(=) +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +"use strict"; +throw new Test262Error(); +Math.PI = 20; diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-29-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-29-s.js index c9a5a404c9..0d2b938ef8 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-29-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-29-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-29-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears as the LeftHandSideExpression of simple assignment(=) under strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("var arguments = 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-29-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appears as the LeftHandSideExpression of simple assignment(=) + under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("var arguments = 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-29gs.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-29gs.js index 86e4f59ceb..0a9cd8eeac 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-29gs.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-29gs.js @@ -1,13 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-29gs.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'Math.PI' appears as the LeftHandSideExpression of simple assignment(=) - * @onlyStrict - * @negative . - */ -"use strict"; -Math.PI = 20; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-29gs +description: > + Strict Mode - SyntaxError is thrown if the identifier 'Math.PI' + appears as the LeftHandSideExpression of simple assignment(=) +negative: . +flags: [onlyStrict] +---*/ + +"use strict"; +Math.PI = 20; diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-3-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-3-s.js index ff4d1710d8..71e538f106 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-3-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-3-s.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-3-s.js - * @description simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.Infinity) - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - fnGlobalObject().Infinity = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-3-s +description: > + simple assignment throws TypeError if LeftHandSide is a readonly + property in strict mode (Global.Infinity) +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + 'use strict'; + + try { + fnGlobalObject().Infinity = 42; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-30-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-30-s.js index e494fab1bf..dd548c2362 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-30-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-30-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-30-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears as the LeftHandSideExpression (PrimaryExpression) of simple assignment(=) under strict mode - * @onlyStrict - */ - - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("(eval) = 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-30-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appears as the LeftHandSideExpression (PrimaryExpression) of + simple assignment(=) under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("(eval) = 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-31-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-31-s.js index 1d70a7723f..c4aa4b5c25 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-31-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-31-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-31-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears as the LeftHandSideExpression (PrimaryExpression) of simple assignment(=) under strict mode - * @onlyStrict - */ - - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("(arguments) = 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-31-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appears as the LeftHandSideExpression (PrimaryExpression) of + simple assignment(=) under strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("(arguments) = 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/11.13.1-4-6-s.js b/test/suite/ch11/11.13/11.13.1/11.13.1-4-6-s.js index 158152924a..bc540dafc7 100644 --- a/test/suite/ch11/11.13/11.13.1/11.13.1-4-6-s.js +++ b/test/suite/ch11/11.13/11.13.1/11.13.1-4-6-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.1/11.13.1-4-6-s.js - * @description simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Function.length) - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - Function.length = 42; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.1-4-6-s +description: > + simple assignment throws TypeError if LeftHandSide is a readonly + property in strict mode (Function.length) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + Function.length = 42; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A1.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A1.js index 533091b570..621a501505 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A1.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "=" or between "=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.1/S11.13.1_A1.js - * @description Checking by using eval - * @noStrict - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "=" or + between "=" and AssignmentExpression are allowed +es5id: 11.13.1_A1 +description: Checking by using eval +flags: [noStrict] +---*/ //CHECK#1 if ((eval("x\u0009=\u0009true")) !== true) { @@ -59,4 +60,3 @@ if ((eval("x\u2029=\u2029true")) !== true) { if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) { $ERROR('#10: (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true'); } - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T1.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T1.js index 3c3a793ed6..f931078c2e 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T1.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x = y uses GetValue and PutValue - * - * @path ch11/11.13/11.13.1/S11.13.1_A2.1_T1.js - * @description Either AssigmentExpression is not Reference or GetBase is not null - */ +/*--- +info: Operator x = y uses GetValue and PutValue +es5id: 11.13.1_A2.1_T1 +description: Either AssigmentExpression is not Reference or GetBase is not null +---*/ //CHECK#1 x = 1; @@ -46,5 +45,3 @@ if (objectx.prop !== objecty.prop) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx !== objecty'); } } - - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T2.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T2.js index 7f48afc64b..e1ae05cbd0 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T2.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x = y uses GetValue and PutValue - * - * @path ch11/11.13/11.13.1/S11.13.1_A2.1_T2.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError - */ +/*--- +info: Operator x = y uses GetValue and PutValue +es5id: 11.13.1_A2.1_T2 +description: If GetBase(AssigmentExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x = y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T3.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T3.js index 3e153946fb..d0eab54201 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T3.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A2.1_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x = y uses GetValue and PutValue - * - * @path ch11/11.13/11.13.1/S11.13.1_A2.1_T3.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError) - * @negative - */ +/*--- +info: Operator x = y uses GetValue and PutValue +es5id: 11.13.1_A2.1_T3 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError) +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { 1 = 1; } } - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.1.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.1.js index d02876814c..99f36c01f5 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.1.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x = y PutValue(x, y) - * - * @path ch11/11.13/11.13.1/S11.13.1_A3.1.js - * @description Checking Expression and Variable statements - */ +/*--- +info: Operator x = y PutValue(x, y) +es5id: 11.13.1_A3.1 +description: Checking Expression and Variable statements +---*/ //CHECK#1 var x = 1; @@ -19,4 +18,3 @@ y = 1; if (y !== 1) { $ERROR('#2: y = 1; y === 1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.2.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.2.js index f369e21c33..303be73c6d 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.2.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A3.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x = y returns GetValue(y) - * - * @path ch11/11.13/11.13.1/S11.13.1_A3.2.js - * @description Checking Expression and Variable statements - */ +/*--- +info: Operator x = y returns GetValue(y) +es5id: 11.13.1_A3.2 +description: Checking Expression and Variable statements +---*/ //CHECK#1 var x = 0; @@ -19,4 +18,3 @@ x = 0; if ((x = 1) !== 1) { $ERROR('#2: x = 0; (x = 1) === 1. Actual: ' + ((x = 1))); } - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T1.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T1.js index 5781fbdfcd..6bb3846c1c 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T1.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T1.js @@ -1,18 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * AssignmentExpression : LeftHandSideExpression = AssignmentExpression - * - * @path ch11/11.13/11.13.1/S11.13.1_A4_T1.js - * @description Syntax check - */ +/*--- +info: "AssignmentExpression : LeftHandSideExpression = AssignmentExpression" +es5id: 11.13.1_A4_T1 +description: Syntax check +---*/ //CHECK#1 x = x = 1; if (x !== 1) { $ERROR('#1: The expression x = x = 1 is the same x = (x = 1), not (x = x) = 1. Actual: ' + (x)); } - - - diff --git a/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T2.js b/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T2.js index d1d4ea456a..55f3f8792f 100644 --- a/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T2.js +++ b/test/suite/ch11/11.13/11.13.1/S11.13.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * AssignmentExpression : LeftHandSideExpression = AssignmentExpression - * - * @path ch11/11.13/11.13.1/S11.13.1_A4_T2.js - * @description Syntax check if "x = x" throws ReferenceError - */ +/*--- +info: "AssignmentExpression : LeftHandSideExpression = AssignmentExpression" +es5id: 11.13.1_A4_T2 +description: Syntax check if "x = x" throws ReferenceError +---*/ //CHECK#1 try { @@ -17,6 +16,3 @@ try { $ERROR('#1.2: x = x throw ReferenceError. Actual: ' + (e)); } } - - - diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-1-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-1-s.js index 3a8522a322..960dfff09c 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-1-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-1-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-1-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_1 *= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-1-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(*=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_1 *= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-10-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-10-s.js index e0c7dddb4a..8be037e6e9 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-10-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-10-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-10-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_10 ^= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-10-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(^=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_10 ^= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-11-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-11-s.js index 60d2e8a63e..e31b1828ae 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-11-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-11-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-11-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_11 |= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-11-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(|=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_11 |= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-12-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-12-s.js index ae0eff54b9..e031b755e0 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-12-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-12-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-12-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_12 = 5 - _11_13_2_12 *= 2; - return _11_13_2_12 === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-12-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(*=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_12 = 5 + _11_13_2_12 *= 2; + return _11_13_2_12 === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-13-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-13-s.js index 3dc5a0f34f..54ff550a9c 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-13-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-13-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-13-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_13 = 6 - _11_13_2_13 /= 2; - return _11_13_2_13 === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-13-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(/=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_13 = 6 + _11_13_2_13 /= 2; + return _11_13_2_13 === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-14-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-14-s.js index 578fae60e1..6d7253b814 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-14-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-14-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-14-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_14 = 5 - _11_13_2_14 %= 2; - return _11_13_2_14 === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-14-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(%=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_14 = 5 + _11_13_2_14 %= 2; + return _11_13_2_14 === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-15-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-15-s.js index 832e1f98de..e50699d083 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-15-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-15-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-15-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_15 = 8 - _11_13_2_15 >>>= 2; - return _11_13_2_15 === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-15-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(>>>=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_15 = 8 + _11_13_2_15 >>>= 2; + return _11_13_2_15 === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-16-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-16-s.js index ae83bb0327..605b05d6db 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-16-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-16-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-16-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_16 = 5 - _11_13_2_16 -= 2; - return _11_13_2_16 === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-16-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(-=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_16 = 5 + _11_13_2_16 -= 2; + return _11_13_2_16 === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-17-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-17-s.js index f78dd1b8b1..e2fdde3e93 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-17-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-17-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-17-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_17 = 1; - _11_13_2_17 <<= 2; - return _11_13_2_17 === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-17-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(<<=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_17 = 1; + _11_13_2_17 <<= 2; + return _11_13_2_17 === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-18-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-18-s.js index cb2af550d6..2bad66a815 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-18-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-18-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-18-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_18 = 4 - _11_13_2_18 >>= 2; - return _11_13_2_18 === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-18-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(>>=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_18 = 4 + _11_13_2_18 >>= 2; + return _11_13_2_18 === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-19-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-19-s.js index 187d7c78af..53298a61ea 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-19-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-19-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-19-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_19 = -1 - _11_13_2_19 += 10; - return _11_13_2_19 === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-19-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(+=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_19 = -1 + _11_13_2_19 += 10; + return _11_13_2_19 === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-2-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-2-s.js index 395bed37d8..e6bd72e9dd 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-2-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-2-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-2-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_2 /= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-2-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(/=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_2 /= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-20-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-20-s.js index 8f1547ca73..1a3eb985bc 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-20-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-20-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-20-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_20 = 5 - _11_13_2_20 &= 3; - return _11_13_2_20 === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-20-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(&=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_20 = 5 + _11_13_2_20 &= 3; + return _11_13_2_20 === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-21-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-21-s.js index 3cf11ab55e..6fd89da5da 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-21-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-21-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-21-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_21 = 5 - _11_13_2_21 ^= 3; - return _11_13_2_21 === 6; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-21-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(^=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_21 = 5 + _11_13_2_21 ^= 3; + return _11_13_2_21 === 6; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-22-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-22-s.js index b525c16215..963280d849 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-22-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-22-s.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-22-s.js - * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to a resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_13_2_22 = 5 - _11_13_2_22 |= 2; - return _11_13_2_22 === 7; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-22-s +description: > + Strict Mode - ReferenceError isn't thrown if the + LeftHandSideExpression of a Compound Assignment operator(|=) + evaluates to a resolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_13_2_22 = 5 + _11_13_2_22 |= 2; + return _11_13_2_22 === 7; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-23-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-23-s.js index f6b492dc3e..a7d4023301 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-23-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-23-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-23-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop *= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-23-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(*=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop *= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-24-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-24-s.js index 7c0886277f..9a9f077a69 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-24-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-24-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-24-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop /= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-24-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(/=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop /= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-25-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-25-s.js index 3f52583c3d..5a4565c244 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-25-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-25-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-25-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop %= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-25-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(%=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop %= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-26-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-26-s.js index a13b710d81..e04021b23c 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-26-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-26-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-26-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop += 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-26-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(+=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop += 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-27-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-27-s.js index c8b6492576..850529e296 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-27-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-27-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-27-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop -= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-27-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(-=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop -= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-28-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-28-s.js index 326c710e14..094b62e2b7 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-28-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-28-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-28-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop <<= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-28-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(<<=) is a reference to a data + property with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop <<= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-29-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-29-s.js index dac5aff740..d03719c5bb 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-29-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-29-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-29-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop >>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-29-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(>>=) is a reference to a data + property with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop >>= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-3-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-3-s.js index efbbe64ab0..b562a6ea4a 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-3-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-3-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-3-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_3 %= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-3-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(%=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_3 %= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-30-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-30-s.js index 77b4a3f99e..cb8d7faf7b 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-30-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-30-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-30-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop >>>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-30-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(>>>=) is a reference to a data + property with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop >>>= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-31-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-31-s.js index 1a42e5ac11..4d5dc1ac3f 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-31-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-31-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-31-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop &= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-31-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(&=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop &= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-32-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-32-s.js index 63ed6d804f..f892297b42 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-32-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-32-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-32-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop ^= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-32-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(^=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop ^= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-33-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-33-s.js index a0b27a8f32..b65dddb1d0 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-33-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-33-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-33-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference to a data property with the attribute value {[[Writable]]:false} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - try { - obj.prop |= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 10; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-33-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(|=) is a reference to a data property + with the attribute value {[[Writable]]:false} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + try { + obj.prop |= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 10; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-34-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-34-s.js index 196038b2b5..ada34ca447 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-34-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-34-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-34-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop *= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-34-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(*=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop *= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-35-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-35-s.js index 2a7dba157d..b7046e2b3b 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-35-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-35-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-35-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop /= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-35-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(/=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop /= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-36-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-36-s.js index 2e1204180d..3220b87c6f 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-36-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-36-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-36-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop %= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-36-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(%=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop %= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-37-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-37-s.js index e426178abc..43362e8bd3 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-37-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-37-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-37-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop += 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-37-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(+=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop += 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-38-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-38-s.js index a522f871e3..9337990aec 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-38-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-38-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-38-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop -= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-38-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(-=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop -= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-39-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-39-s.js index a682e14663..0694aea266 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-39-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-39-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-39-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop <<= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-39-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(<<=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop <<= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-4-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-4-s.js index e565ceccc3..7987813692 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-4-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-4-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-4-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_4 += 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-4-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(+=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_4 += 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-40-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-40-s.js index 2f31f32bbf..6aa5c36da7 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-40-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-40-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-40-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop >>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-40-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(>>=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop >>= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-41-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-41-s.js index acc1d54ff6..1bc308a8de 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-41-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-41-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-41-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop >>>= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-41-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(>>>=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop >>>= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-42-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-42-s.js index 6b2f4642a8..1456647b89 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-42-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-42-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-42-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop &= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-42-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(&=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop &= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-43-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-43-s.js index 72aafec6e1..fe23653df3 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-43-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-43-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-43-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop ^= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-43-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(^=) is a reference to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop ^= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-44-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-44-s.js index 33a47ddb96..97b2fe981b 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-44-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-44-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-44-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference of to an accessor property with the attribute value {[[Set]]:undefined} - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return 11; - }, - set: undefined, - enumerable: true, - configurable: true - }); - - try { - obj.prop |= 20; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-44-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(|=) is a reference of to an accessor + property with the attribute value {[[Set]]:undefined} +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return 11; + }, + set: undefined, + enumerable: true, + configurable: true + }); + + try { + obj.prop |= 20; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-45-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-45-s.js index 5122b4bdf3..362b297ea6 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-45-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-45-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-45-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len *= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-45-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(*=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len *= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-46-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-46-s.js index 382f41c250..5723292fc6 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-46-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-46-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-46-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len /= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-46-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(/=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len /= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-47-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-47-s.js index 4e3761c20c..ed0e21d442 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-47-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-47-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-47-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len %= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-47-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(%=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len %= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-48-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-48-s.js index fa14cbf860..360fb67b92 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-48-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-48-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-48-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len += 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-48-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(+=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len += 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-49-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-49-s.js index b9105eca8c..020a4066d4 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-49-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-49-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-49-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len -= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-49-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(-=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len -= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-5-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-5-s.js index 09fdb5fa95..41557960f1 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-5-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-5-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-5-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_5 -= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-5-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(-=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_5 -= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-50-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-50-s.js index 7ae50545b3..1ab47ea9bb 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-50-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-50-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-50-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len <<= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-50-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(<<=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len <<= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-51-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-51-s.js index 7818d3d819..1a3d46b8ae 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-51-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-51-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-51-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len >>= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-51-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(>>=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len >>= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-52-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-52-s.js index 0668c86e60..e6dda5399e 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-52-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-52-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-52-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len >>>= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-52-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(>>>=) is a reference to a + non-existent property of an object whose [[Extensible]] internal + property if false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len >>>= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-53-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-53-s.js index 64bdafb9b1..913765e6c7 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-53-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-53-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-53-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len &= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-53-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(&=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len &= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-54-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-54-s.js index f5439a483b..ef76093548 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-54-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-54-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-54-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len ^= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-54-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(^=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len ^= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-55-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-55-s.js index e44a530382..410f217e88 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-55-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-55-s.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-55-s.js - * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.preventExtensions(obj); - - try { - obj.len |= 10; - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-55-s +description: > + Strict Mode - TypeError is thrown if The LeftHandSide of a + Compound Assignment operator(|=) is a reference to a non-existent + property of an object whose [[Extensible]] internal property if + false +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.preventExtensions(obj); + + try { + obj.len |= 10; + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-1-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-1-s.js index 6bbe5ceb71..af3c959014 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-1-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-1-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-1-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(*=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval *= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-1-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(*=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval *= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-10-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-10-s.js index acf0fc5227..898efaff4d 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-10-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-10-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-10-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(^=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval ^= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-10-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(^=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval ^= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-11-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-11-s.js index 7273172df4..0d820038f7 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-11-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-11-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-11-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(|=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval |= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-11-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(|=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval |= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-12-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-12-s.js index b3eaf8e76d..ae0d6ee038 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-12-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-12-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-12-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(*=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments *= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-12-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(*=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments *= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-13-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-13-s.js index f553885bae..29f196a189 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-13-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-13-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-13-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(/=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments /= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-13-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(/=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments /= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-14-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-14-s.js index f039ab9881..172f1b6447 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-14-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-14-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-14-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(%=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments %= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-14-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(%=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments %= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-15-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-15-s.js index cd473315c7..72cfdc82eb 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-15-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-15-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-15-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(+=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments += 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-15-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(+=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments += 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-16-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-16-s.js index 4c7038b79f..3f31497a7d 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-16-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-16-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-16-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(-=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments -= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-16-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(-=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments -= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-17-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-17-s.js index 1b0efaf36e..642f665c50 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-17-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-17-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-17-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(<<=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments <<= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-17-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(<<=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments <<= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-18-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-18-s.js index 0413ebfeb1..565e8bd431 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-18-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-18-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-18-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(>>=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments >>= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-18-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(>>=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments >>= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-19-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-19-s.js index 8af9d1b374..dea576c5cc 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-19-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-19-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-19-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(>>>=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments >>>= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-19-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(>>>=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments >>>= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-1gs.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-1gs.js index a3f33416c6..92393573f1 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-1gs.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-1gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch11/11.13/11.13.2/11.13.2-6-1gs.js - * @description Strict Mode - SyntaxError is throw if the identifier eval appears as the LeftHandSideExpression of a Compound Assignment operator(*=) - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -eval *= 20; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-1gs +description: > + Strict Mode - SyntaxError is throw if the identifier eval appears + as the LeftHandSideExpression of a Compound Assignment operator(*=) +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +eval *= 20; diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-2-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-2-s.js index f342f29eff..16384ede0a 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-2-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-2-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-2-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(/=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval /= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-2-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(/=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval /= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-20-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-20-s.js index 468a01dabc..3832093231 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-20-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-20-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-20-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(&=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments &= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-20-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(&=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments &= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-21-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-21-s.js index 6ce81e359b..7ac92d21d6 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-21-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-21-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-21-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(^=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments ^= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-21-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(^=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments ^= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-22-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-22-s.js index 48a6651c23..af37d0d097 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-22-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-22-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-22-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(|=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments |= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-22-s +description: > + Strict Mode - SyntaxError is thrown if the identifier arguments + appear as the LeftHandSideExpression of a Compound Assignment + operator(|=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments |= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-3-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-3-s.js index 133e41d16b..2f9f546e38 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-3-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-3-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-3-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(%=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval %= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-3-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(%=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval %= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-4-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-4-s.js index c5314930ef..d4a00796f0 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-4-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-4-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-4-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(+=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval += 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-4-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(+=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval += 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-5-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-5-s.js index 3946320414..32a22156cd 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-5-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-5-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-5-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(-=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval -= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-5-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(-=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval -= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-6-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-6-s.js index e3e709b76e..996fa0412b 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-6-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-6-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-6-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(<<=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval <<= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-6-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment + operator(<<=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval <<= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-7-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-7-s.js index f07505be01..2264272c23 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-7-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-7-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-7-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(>>=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval >>= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-7-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment + operator(>>=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval >>= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-8-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-8-s.js index 8a2226ae17..206ec9e50f 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-8-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-8-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-8-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(>>>=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval >>>= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-8-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment + operator(>>>=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval >>>= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-9-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-9-s.js index 4f5817fdb7..974d759b87 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-9-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-9-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-9-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(&=) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval &= 20;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-9-s +description: > + Strict Mode - SyntaxError is thrown if the identifier eval appear + as the LeftHandSideExpression of a Compound Assignment operator(&=) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval &= 20;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-6-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-6-s.js index 832d3afd0b..f7b27f9fcc 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-6-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-6-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-6-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_6 <<= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-6-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(<<=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_6 <<= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-7-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-7-s.js index 8a290330aa..d13373f7f9 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-7-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-7-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-7-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_7 >>= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-7-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(>>=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_7 >>= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-8-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-8-s.js index 4f4167f879..85688f0617 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-8-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-8-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-8-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_8 >>>= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-8-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(>>>=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_8 >>>= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/11.13.2-9-s.js b/test/suite/ch11/11.13/11.13.2/11.13.2-9-s.js index 3393d5c272..84f880b736 100644 --- a/test/suite/ch11/11.13/11.13.2/11.13.2-9-s.js +++ b/test/suite/ch11/11.13/11.13.2/11.13.2-9-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.13/11.13.2/11.13.2-9-s.js - * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to an unresolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("_11_13_2_9 &= 1;"); - return false; - } catch (e) { - return e instanceof ReferenceError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.13.2-9-s +description: > + Strict Mode - ReferenceError is thrown if the + LeftHandSideExpression of a Compound Assignment operator(&=) + evaluates to an unresolvable reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("_11_13_2_9 &= 1;"); + return false; + } catch (e) { + return e instanceof ReferenceError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T1.js index db0495c5c6..aa95407f93 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T1.js - * @description Checking by using eval, check operator is x *= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T1 +description: Checking by using eval, check operator is x *= y +---*/ //CHECK#1 x = -1; @@ -68,4 +69,3 @@ x = -1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029*=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 1) { $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T10.js index 3487b3dd02..f754208082 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T10.js - * @description Checking by using eval, check operator is x ^= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T10 +description: Checking by using eval, check operator is x ^= y +---*/ //CHECK#1 x = 1; @@ -68,4 +69,3 @@ x = 1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029^=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029^=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T11.js index fc81632c0b..ae23bbee99 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T11.js - * @description Checking by using eval, check operator is x |= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T11 +description: Checking by using eval, check operator is x |= y +---*/ //CHECK#1 x = 0; @@ -68,4 +69,3 @@ x = 0; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029|=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { $ERROR('#10: x = 0; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T2.js index 1e15c0115c..b42ef75751 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T2.js - * @description Checking by using eval, check operator is x /= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T2 +description: Checking by using eval, check operator is x /= y +---*/ //CHECK#1 x = -1; @@ -68,4 +69,3 @@ x = -1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029/=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 1) { $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029/=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T3.js index 1e2a6760aa..e745e53693 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T3.js - * @description Checking by using eval, check operator is x %= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T3 +description: Checking by using eval, check operator is x %= y +---*/ //CHECK#1 x = -1; @@ -68,4 +69,3 @@ x = -1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029%=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 0) { $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029%=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 0'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T4.js index fa97eb77f8..a32afac5d4 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T4.js - * @description Checking by using eval, check operator is x += y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T4 +description: Checking by using eval, check operator is x += y +---*/ //CHECK#1 x = -1; @@ -68,4 +69,3 @@ x = -1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029+=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== -2) { $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029+=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === -2'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T5.js index d4fc5a620e..758d2b2269 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T5.js - * @description Checking by using eval, check operator is x -= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T5 +description: Checking by using eval, check operator is x -= y +---*/ //CHECK#1 x = -1; @@ -68,4 +69,3 @@ x = -1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== -2) { $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === -2'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T6.js index 65370cf1b5..2f203a84b7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T6.js - * @description Checking by using eval, check operator is x <<= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T6 +description: Checking by using eval, check operator is x <<= y +---*/ //CHECK#1 x = 1; @@ -68,4 +69,3 @@ x = 1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029<<=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 2) { $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<<=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 2'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T7.js index 5093eaecab..21f2440d55 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T7.js - * @description Checking by using eval, check operator is x >>= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T7 +description: Checking by using eval, check operator is x >>= y +---*/ //CHECK#1 x = 1; @@ -68,4 +69,3 @@ x = 1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T8.js index 8469f353de..39061c7859 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T8.js - * @description Checking by using eval, check operator is x >>>= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T8 +description: Checking by using eval, check operator is x >>>= y +---*/ //CHECK#1 x = 1; @@ -68,4 +69,3 @@ x = 1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T9.js index c73eac5e1b..a6277fe7dd 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed - * - * @path ch11/11.13/11.13.2/S11.13.2_A1_T9.js - * @description Checking by using eval, check operator is x &= y - */ +/*--- +info: > + White Space and Line Terminator between LeftHandSideExpression and "@=" + or between "@=" and AssignmentExpression are allowed +es5id: 11.13.2_A1_T9 +description: Checking by using eval, check operator is x &= y +---*/ //CHECK#1 x = 1; @@ -68,4 +69,3 @@ x = 1; if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029&=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js index e6a01dd52d..5b9dafcb05 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x *= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.1 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x *= y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x *= y); if (z !== -1) { $ERROR('#2: var x = 1; var y = -1; var z = (x *= y); z === -1. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js index a85d13eb0e..d537ec027b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x ^= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.10 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x ^= y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x ^= y); if (z !== 0) { $ERROR('#2: var x = 1; var y = 1; var z = (x ^= y); z === 0. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js index 925ed41d62..2a1176557e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x |= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.11 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x |= y" +---*/ //CHECK#1 var x = 0; @@ -22,5 +23,3 @@ var z = (x |= y); if (z !== 1) { $ERROR('#2: var x = 0; var y = 1; var z = (x |= y); z === 1. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js index d9ee6bd593..effa2b480c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x /= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.2 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x /= y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x /= y); if (z !== -1) { $ERROR('#2: var x = 1; var y = -1; var z = (x /= y); z === -1. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js index 70586cfbb3..63cb1eba4c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x %= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.3 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x %= y" +---*/ //CHECK#1 var x = -1; @@ -22,5 +23,3 @@ var z = (x %= y); if (z !== -1) { $ERROR('#2: var x = -1; var y = 2; var z = (x %= y); z === -1. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js index 7fcda2fec6..c8be772695 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x += y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.4 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x += y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x += y); if (z !== 2) { $ERROR('#2: var x = 1; var y = 1; var z = (x += y); z === 2. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js index db68d55859..7a71561562 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x -= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.5 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x -= y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x -= y); if (z !== 0) { $ERROR('#2: var x = 1; var y = 1; var z = (x -= y); z === 0. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js index f6f5ac7cab..c1532ed9fa 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x <<= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.6 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x <<= y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x <<= y); if (z !== 2) { $ERROR('#2: var x = 1; var y = 1; var z = (x <<= y); z === 2. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js index cdc37d9ba0..e9492e1089 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x >>= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.7 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x >>= y" +---*/ //CHECK#1 var x = 4; @@ -22,5 +23,3 @@ var z = (x >>= y); if (z !== 2) { $ERROR('#2: var x = 4; var y = 1; var z = (x >>= y); z === 2. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js index e53d41a516..d91f5c9a91 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x >>>= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.8 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x >>>= y" +---*/ //CHECK#1 var x = 4; @@ -22,5 +23,3 @@ var z = (x >>>= y); if (z !== 2) { $ERROR('#2: var x = 4; var y = 1; var z = (x >>>= y); z === 2. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js index a74dee97d4..8e69e63f88 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js - * @description Either Type is not Reference or GetBase is not null, check opeartor is "x &= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T1.9 +description: > + Either Type is not Reference or GetBase is not null, check + opeartor is "x &= y" +---*/ //CHECK#1 var x = 1; @@ -22,5 +23,3 @@ var z = (x &= y); if (z !== 1) { $ERROR('#2: var x = 1; var y = 1; var z = (x &= y); z === 1. Actual: ' + (z)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js index eede73f3d5..ce64aab4a0 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x *= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.1 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x *= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x *= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js index 27c243325c..6af05843cc 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x ^= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.10 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x ^= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x ^= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js index 22cd6c1b84..28f224ae0a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x |= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.11 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x |= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x |= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js index 02a39f6c45..fa1045e3e7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x /= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.2 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x /= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x /= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js index 1d11d3bcea..908c4237fc 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x %= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.3 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x %= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x %= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js index 7713027779..295be956f8 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x += y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.4 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x += y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x += y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js index 500e5e6a93..f8a4944e68 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x -= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.5 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x -= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x -= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js index 9042f94bb6..cd9c250fc7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x <<= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.6 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x <<= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x <<= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js index 8c391557eb..d286e400e9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x >>= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.7 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x >>= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x >>= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js index 8db8963a90..4250ca0f1a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x >>>= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.8 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x >>>= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js index a9155a34e9..885f805ef0 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x &= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T2.9 +description: > + If GetBase(AssigmentExpression) is null, throw ReferenceError. + Check operator is "x &= y" +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ catch (e) { $ERROR('#1.2: var x = 1; x &= y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js index 247f69ebc3..b361e0b5b3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x *= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.1 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x *= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x *= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js index 2c8495ca83..86166f7a86 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x ^= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.10 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x ^= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x ^= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js index 9901b9db11..ff5d1fdfdc 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x |= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.11 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x |= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x |= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js index 6832765ef9..174c970cb1 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x /= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.2 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x /= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x /= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js index dc0df0e522..72611e60ca 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x %= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.3 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x %= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x %= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js index a32957d99d..fe6fca5cef 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x += y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.4 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x += y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x += 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js index 7e8f4601d3..83875569f0 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x -= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.5 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x -= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x -= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js index 0c1d107bda..8b9225189d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x <<= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.6 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x <<= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x <<= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js index 0fd60d869f..2e1ea868a9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x >>= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.7 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x >>= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x >>= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js index 57259d1da1..0a4b6e86ea 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x >>>= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.8 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x >>>= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x >>>= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js index eac242da48..3955c8af1c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js - * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x &= y" - */ +/*--- +info: Operator uses GetValue +es5id: 11.13.2_A2.1_T3.9 +description: > + If GetBase(LeftHandSideExpression) is null, throw ReferenceError. + Check operator is "x &= y" +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: x &= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js index d9ce71a56c..a09ee7f06b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x *= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T1 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x *= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 *= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js index 38c494279b..04f3935fd6 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x ^= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T10 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x ^= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 ^= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js index 45c162f86a..023a1867bf 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x |= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T11 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x |= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 |= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js index 7ba092e887..3c909bd996 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x /= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T2 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x /= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 /= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js index c26da6dd40..a00a9f96ce 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x %= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T3 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x %= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 %= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js index bbfbd0f417..4cc5b03a86 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x += y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T4 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x += y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 += 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js index d9a53ecaf7..091193e0e0 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x -= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T5 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x -= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 -= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js index 34154341db..1970c9f0ae 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x <<= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T6 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x <<= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 <<= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js index 6f0e3fd4d5..c75b2655e5 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x >>= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T7 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x >>= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 >>= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js index d822353911..3ab2d96308 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x >>>= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T8 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x >>>= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 >>>= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js index f85aa27ddd..1e9a3263da 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses PutValue - * - * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js - * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x &= y" - * @negative - */ +/*--- +info: Operator uses PutValue +es5id: 11.13.2_A2.2_T9 +description: > + If Type(LeftHandSideExpression) is not Reference, throw + ReferenceError (or SyntaxError). Check operator is "x &= y" +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +22,3 @@ catch (e) { var z = (1 &= 1); } } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js index a50a1cba5c..8eabda1295 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js - * @description Checking Expression and Variable statements for x *= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T1 +description: Checking Expression and Variable statements for x *= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y *= -1; if (y !== -1) { $ERROR('#2: y = 1; y *= -1; y === -1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js index a552f7d081..c079766068 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js - * @description Checking Expression and Variable statements for x ^= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T10 +description: Checking Expression and Variable statements for x ^= y +---*/ //CHECK#1 var x = 0; @@ -21,4 +20,3 @@ y ^= 0; if (y !== 1) { $ERROR('#2: y = 1; y ^= 0; y === 1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js index 6bacd07445..f1ff9dc384 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js - * @description Checking Expression and Variable statements for x |= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T11 +description: Checking Expression and Variable statements for x |= y +---*/ //CHECK#1 var x = 0; @@ -21,4 +20,3 @@ y |= 0; if (y !== 1) { $ERROR('#2: y = 1; y |= 0; y === 1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js index 2b07ad143e..1dadbb2647 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js - * @description Checking Expression and Variable statements for x /= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T2 +description: Checking Expression and Variable statements for x /= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y /= -1; if (y !== -1) { $ERROR('#2: y = 1; y /= -1; y === -1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js index 74ca601ac3..6bd03a441d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js - * @description Checking Expression and Variable statements for x %= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T3 +description: Checking Expression and Variable statements for x %= y +---*/ //CHECK#1 var x = -1; @@ -21,4 +20,3 @@ y %= 2; if (y !== -1) { $ERROR('#2: y = -1; y %= 2; y === -1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js index b97dce0b01..e9cb914939 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js - * @description Checking Expression and Variable statements for x += y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T4 +description: Checking Expression and Variable statements for x += y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y += 1; if (y !== 2) { $ERROR('#2: y = 1; y += 1; y === 2. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js index 2669532696..43f30546ba 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js - * @description Checking Expression and Variable statements for x -= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T5 +description: Checking Expression and Variable statements for x -= y +---*/ //CHECK#1 var x = -1; @@ -21,4 +20,3 @@ y -= 1; if (y !== -2) { $ERROR('#2: y = -1; y -= 1; y === -2. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js index 08aac79810..e935cdfd78 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js - * @description Checking Expression and Variable statements for x <<= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T6 +description: Checking Expression and Variable statements for x <<= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y <<= 1; if (y !== 2) { $ERROR('#2: y = 1; y <<= 1; y === 2. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js index b2102b2b82..c29b2d04bd 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js - * @description Checking Expression and Variable statements for x >>= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T7 +description: Checking Expression and Variable statements for x >>= y +---*/ //CHECK#1 var x = 4; @@ -21,4 +20,3 @@ y >>= 1; if (y !== 2) { $ERROR('#2: y = 4; y >>= 1; y === 2. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js index 7a7dbc7f62..dd27c8fc5d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js - * @description Checking Expression and Variable statements for x >>>= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T8 +description: Checking Expression and Variable statements for x >>>= y +---*/ //CHECK#1 var x = 4; @@ -21,4 +20,3 @@ y >>>= 1; if (y !== 2) { $ERROR('#2: y = 4; y >>>= 1; y === 2. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js index 8e1408df5f..f268113c0b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y uses PutValue(x, x @ y) - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js - * @description Checking Expression and Variable statements for x &= y - */ +/*--- +info: Operator x @= y uses PutValue(x, x @ y) +es5id: 11.13.2_A3.1_T9 +description: Checking Expression and Variable statements for x &= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y &= 1; if (y !== 1) { $ERROR('#2: y = 1; y &= 1; y === 1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js index 8a092bea6f..8829ba1de1 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js - * @description Checking Expression and Variable statements for x *= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T1 +description: Checking Expression and Variable statements for x *= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y1 = (y *= -1); if (y1 !== -1) { $ERROR('#2: y = 1; y1 = (y *= -1); y1 === -1. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js index 26de3f6ed7..04c77c8099 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js - * @description Checking Expression and Variable statements for x ^= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T10 +description: Checking Expression and Variable statements for x ^= y +---*/ //CHECK#1 var x = 0; @@ -21,4 +20,3 @@ y1 = (y ^= 0); if (y1 !== 1) { $ERROR('#2: y = 1; y1 = (y ^= 0); y1 === 1. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js index e9c1ed4035..23a326b01b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js - * @description Checking Expression and Variable statements for x |= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T11 +description: Checking Expression and Variable statements for x |= y +---*/ //CHECK#1 var x = 0; @@ -21,4 +20,3 @@ y1 = (y |= 0); if (y1 !== 1) { $ERROR('#2: y = 1; y1 = (y |= 0); y1 === 1. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js index 8de215e0f5..bae64b71d3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js - * @description Checking Expression and Variable statements for x /= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T2 +description: Checking Expression and Variable statements for x /= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y1 = (y /= -1); if (y1 !== -1) { $ERROR('#2: y = 1; y1 = (y /= -1); y1 === -1. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js index 2e4853ae28..081264d7fa 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js - * @description Checking Expression and Variable statements for x %= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T3 +description: Checking Expression and Variable statements for x %= y +---*/ //CHECK#1 var x = -1; @@ -21,4 +20,3 @@ y1 = (y %= 2); if (y1 !== -1) { $ERROR('#2: y = -1; y1 = (y %= 2); y1 === -1. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js index 8aa84317f6..e1ff3715ce 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js - * @description Checking Expression and Variable statements for x += y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T4 +description: Checking Expression and Variable statements for x += y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y1 = (y += 1); if (y1 !== 2) { $ERROR('#2: y = 1; y1 = (y += 1); y1 === 2. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js index 50ca35e716..de2cce7f58 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js - * @description Checking Expression and Variable statements for x -= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T5 +description: Checking Expression and Variable statements for x -= y +---*/ //CHECK#1 var x = -1; @@ -21,4 +20,3 @@ y1 = (y -= 1); if (y1 !== -2) { $ERROR('#2: y = -1; y1 = (y -= 1); y1 === -2. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js index 250be77af3..9406b51ec4 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js - * @description Checking Expression and Variable statements for x <<= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T6 +description: Checking Expression and Variable statements for x <<= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y1 = (y <<= 1); if (y1 !== 2) { $ERROR('#2: y = 1; y1 = (y <<= 1); y1 === 2. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js index d37cce4983..85c0691db6 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js - * @description Checking Expression and Variable statements for x >>= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T7 +description: Checking Expression and Variable statements for x >>= y +---*/ //CHECK#1 var x = 4; @@ -21,4 +20,3 @@ y1 = (y >>= 1); if (y1 !== 2) { $ERROR('#2: y = 4; y1 = (y >>= 1); y1 === 2. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js index f636cbfe54..1ce1911c0e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js - * @description Checking Expression and Variable statements for x >>>= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T8 +description: Checking Expression and Variable statements for x >>>= y +---*/ //CHECK#1 var x = 4; @@ -21,4 +20,3 @@ y1 = (y >>>= 1); if (y1 !== 2) { $ERROR('#2: y = 4; y1 = (y >>>= 1); y1 === 2. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js index de09e1fd5c..db8362f239 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x @= y returns x @ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js - * @description Checking Expression and Variable statements for x &= y - */ +/*--- +info: Operator x @= y returns x @ y +es5id: 11.13.2_A3.2_T9 +description: Checking Expression and Variable statements for x &= y +---*/ //CHECK#1 var x = 1; @@ -21,4 +20,3 @@ y1 = (y &= 1); if (y1 !== 1) { $ERROR('#2: y = 1; y1 = (y &= 1); y1 === 1. Actual: ' + (y1)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js index e9b0ee0c46..eb69307f3f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x ^= new Boolean(true); if (x !== 0) { $ERROR('#4: x = new Boolean(true); x ^= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js index 28a622e5bd..013b49cdb6 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x ^= new Number(1); if (x !== 0) { $ERROR('#4: x = new Number(1); x ^= new Number(1); x === 0. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js index bfaec704b1..957caad077 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x ^= "x"; if (x !== 1) { $ERROR('#6: x = "1"; x ^= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js index 03b9f63e5a..abd68b31c3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x ^= null; if (x !== 0) { $ERROR('#4: x = null; x ^= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js index 82f1762914..f129f62ed6 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x ^= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new Number(1); x ^= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js index 5b877f27a4..52f25d1d49 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x ^= "x"; if (x !== 1) { $ERROR('#10: x = 1; x ^= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js index a41eb8d6ce..d0ce01c4a7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x ^= new Number(1); if (x !== 1) { $ERROR('#4: x = null; x ^= new Number(1); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js index 666f20604d..b5de9755da 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x ^= new Number(1); if (x !== 1) { $ERROR('#4: x = undefined; x ^= new Number(1); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js index aff6b25dae..018816c2d5 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x ^= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new String("1"); x ^= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js index 4b30cef369..eb76fa3c9c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x ^= new String("1"); if (x !== 1) { $ERROR('#4: x = undefined; x ^= new String("1"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js index 880fb66ec1..483ae73189 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x ^= new String("1"); if (x !== 1) { $ERROR('#4: x = null; x ^= new String("1"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js index 4e0e83855d..a87df513bf 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x ^= new Boolean(true); if (x !== 1) { $ERROR('#4: x = undefined; x ^= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js index 59a622d54d..bd886fb1ca 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x ^= y is the same as x = x ^ y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x ^= y is the same as x = x ^ y +es5id: 11.13.2_A4.10_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x ^= new Boolean(true); if (x !== 1) { $ERROR('#4: x = null; x ^= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js index afc6d63cf6..14d74fd89b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x |= new Boolean(true); if (x !== 1) { $ERROR('#4: x = new Boolean(true); x |= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js index 24a4a8fa50..f623092490 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x |= new Number(1); if (x !== 1) { $ERROR('#4: x = new Number(1); x |= new Number(1); x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js index 5e6ae229ae..28029eaba7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x |= "x"; if (x !== 1) { $ERROR('#6: x = "1"; x |= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js index 2c16de0589..f5071fcf11 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x |= null; if (x !== 0) { $ERROR('#4: x = null; x |= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js index f764964f08..0c8587a7b9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x |= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new Number(1); x |= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js index 46e183eb9a..76a0cbac9a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x |= "x"; if (x !== 1) { $ERROR('#10: x = 1; x |= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js index 070f1ecfe4..844af35889 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x |= new Number(1); if (x !== 1) { $ERROR('#4: x = null; x |= new Number(1); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js index e83610f365..8b43f6e5e7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x |= new Number(1); if (x !== 1) { $ERROR('#4: x = undefined; x |= new Number(1); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js index 0511f66745..5c0665e161 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x |= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new String("1"); x |= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js index b3aa7445c8..56df4d3abb 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x |= new String("1"); if (x !== 1) { $ERROR('#4: x = undefined; x |= new String("1"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js index b1539ad746..c8bd81ee34 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x |= new String("1"); if (x !== 1) { $ERROR('#4: x = null; x |= new String("1"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js index dbe3e0a1ff..1b8a1341f2 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x |= new Boolean(true); if (x !== 1) { $ERROR('#4: x = undefined; x |= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js index aaf7e4a875..830f02d38e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x |= y is the same as x = x | y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x |= y is the same as x = x | y +es5id: 11.13.2_A4.11_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x |= new Boolean(true); if (x !== 1) { $ERROR('#4: x = null; x |= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js index bfc284bbc3..65df46ff35 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x *= new Boolean(true); if (x !== 1) { $ERROR('#4: x = new Boolean(true); x *= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js index f13415b281..9fcf28382f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x *= new Number(1); if (x !== 1) { $ERROR('#4: x = new Number(1); x *= new Number(1); x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js index 67aca8fc14..144c1abc4d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x *= "x"; if (isNaN(x) !== true) { $ERROR('#6: x = "1"; x *= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js index fbb2681057..8d0f738590 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x *= null; if (x !== 0) { $ERROR('#4: x = null; x *= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js index 29db0f5cb9..ad14aeff6b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Number (primitive and object) - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Number (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x *= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new Number(1); x *= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js index 7d30461277..42038b4422 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x *= "x"; if (isNaN(x) !== true) { $ERROR('#10: x = 1; x *= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js index b796dc5cb8..e2927f309e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x *= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x *= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js index 925d736344..593d81b87c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x *= new Number(1); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x *= new Number(1); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js index 7799377cd6..043adfc76e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) amd Boolean (primitive and object) - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) amd Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x *= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new String("1"); x *= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js index 07be013510..2a2b6622f3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + primitive String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x *= new String("1"); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x *= new String("1"); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js index b0e8eddc4b..fad4346ffe 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x *= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x *= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js index dc0adc04ca..89b2293d6b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x *= new Boolean(true); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x *= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js index 0a7443afee..206ede2d5a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x *= y is the same as the production x = x * y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x *= y is the same as the production x = x * y +es5id: 11.13.2_A4.1_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x *= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x *= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js index da1ab4cdfc..836092b979 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x /= new Boolean(true); if (x !== 1) { $ERROR('#4: x = new Boolean(true); x /= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js index 3287c7c784..f749df46c9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x /= new Number(1); if (x !== 1) { $ERROR('#4: x = new Number(1); x /= new Number(1); x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js index d327257ff6..1ff7892483 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x /= "x"; if (isNaN(x) !== true) { $ERROR('#6: x = "1"; x /= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js index e97535c945..7fcbb6c9f7 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x /= null; if (isNaN(x) !== true) { $ERROR('#4: x = null; x /= null; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js index 46eae946e6..9df6867708 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x /= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new Number(1); x /= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js index 8a607b5151..21b1c5195e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x /= "x"; if (isNaN(x) !== true) { $ERROR('#10: x = 1; x /= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js index dae7a092ab..6f55f91852 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x /= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x /= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js index 28c6d611d7..5db14510bf 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x /= new Number(1); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x /= new Number(1); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js index f4ea9ad5f8..ddaa129f52 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x /= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new String("1"); x /= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js index 91ce4dd2b1..4f62d059a0 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x /= new String("1"); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x /= new String("1"); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js index 99905f4d99..4792ba2102 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x /= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x /= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js index c5c373b765..7d90f78bfb 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x /= new Boolean(true); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x /= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js index 466f9ce87a..013c9f4aff 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x /= y is the same as x = x / y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x /= y is the same as x = x / y +es5id: 11.13.2_A4.2_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x /= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x /= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js index bb8d9cccd1..eb9c04afaa 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x %= new Boolean(true); if (x !== 0) { $ERROR('#4: x = new Boolean(true); x %= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js index 97093ecdb8..7deece40e6 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x %= new Number(1); if (x !== 0) { $ERROR('#4: x = new Number(1); x %= new Number(1); x === 0. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js index e95df69bb8..20e471f146 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x %= "x"; if (isNaN(x) !== true) { $ERROR('#6: x = "1"; x %= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js index 51e763cace..f7247b7dff 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x %= null; if (isNaN(x) !== true) { $ERROR('#4: x = null; x %= null; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js index a454764331..ad0f729c6e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x %= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new Number(1); x %= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js index e2027c6b35..a3044bf1a9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x %= "x"; if (isNaN(x) !== true) { $ERROR('#10: x = 1; x %= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js index 8566f87023..3d76882c14 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x %= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x %= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js index 259c937b41..a378194d8e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x %= new Number(1); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x %= new Number(1); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js index 69bff3cb45..4e3889774e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x %= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new String("1"); x %= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js index 51f30a6d05..c2354fb282 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x %= new String("1"); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x %= new String("1"); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js index e451b5bfed..8c1cdf1e04 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x %= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x %= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js index 59a57095dc..bc432e25c6 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x %= new Boolean(true); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x %= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js index ebb9b209f0..2388b8282f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x %= y is the same as x = x % y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x %= y is the same as x = x % y +es5id: 11.13.2_A4.3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x %= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x %= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js index 11313aac68..acd55efc0c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x += new Boolean(true); if (x !== 2) { $ERROR('#4: x = new Boolean(true); x += new Boolean(true); x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js index 141d56b4d3..d4053c239b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x += new Number(1); if (x !== 2) { $ERROR('#4: x = new Number(1); x += new Number(1); x === 2. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js index da89e37893..ee2661bb04 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T1.3 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x += null; if (x !== 0) { $ERROR('#4: x = null; x += null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js index 3ae788c91b..5e1a2cc220 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T1.4 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -47,4 +46,3 @@ x += "x"; if (x !== "1x") { $ERROR('#6: x = "1"; x += "x"; x === "1x". Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js index b26a00f80a..2557171b26 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x += new Boolean(true); if (x !== 2) { $ERROR('#8: x = new Number(1); x += new Boolean(true); x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js index 73b6923bf7..3f1a602c09 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x += new Number(1); if (x !== 1) { $ERROR('#4: x = null; x += new Number(1); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js index 158d2aa246..9f085f4a3b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x += new Number(1); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x += new Number(1); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js index f54e30a454..b45842831e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x += new Boolean(true); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x += new Boolean(true); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js index b020ca5630..50aad64d71 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x += new Boolean(true); if (x !== 1) { $ERROR('#4: x = null; x += new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js index 7833c0ce94..471da1c90b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -75,4 +76,3 @@ x += "x"; if (x !== "1x") { $ERROR('#10: x = 1; x += "x"; x === "1x". Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js index 2d80cf7509..63b47f4bb9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x += new Boolean(true); if (x !== "1true") { $ERROR('#8: x = new String("1"); x += new Boolean(true); x === "1true". Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js index c5f364c15e..f4a6f22885 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x += new String("1"); if (x !== "undefined1") { $ERROR('#4: x = undefined; x += new String("1"); x === "undefined1". Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js index f2a986ab87..257ce01193 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x += y is the same as x = x + y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x += y is the same as x = x + y +es5id: 11.13.2_A4.4_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x += new String("1"); if (x !== "null1") { $ERROR('#4: x = null; x += new String("1"); x === "null1". Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js index 1a155d3da1..7e2dd3cc7e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x -= new Boolean(true); if (x !== 0) { $ERROR('#4: x = new Boolean(true); x -= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js index 42d5abdb76..a86ee53016 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x -= new Number(1); if (x !== 0) { $ERROR('#4: x = new Number(1); x -= new Number(1); x === 0. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js index 298948f618..beab296c1d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x -= "x"; if (isNaN(x) !== true) { $ERROR('#6: x = "1"; x -= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js index 28a9d2d767..c4749bafd3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x -= null; if (x !== 0) { $ERROR('#4: x = null; x -= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js index 94b810cbcd..86c63b9272 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x -= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new Number(1); x -= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js index e71788b751..52d9786cd9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x -= "x"; if (isNaN(x) !== true) { $ERROR('#10: x = 1; x -= "x"; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js index f7385f53ff..b163031160 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x -= new Number(1); if (x !== -1) { $ERROR('#4: x = null; x -= new Number(1); x === -1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js index 0c1c5375fc..7425eb90e3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x -= new Number(1); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x -= new Number(1); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js index c6c26409c4..5e435705a9 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x -= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new String("1"); x -= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js index 39b17aeeb7..bd6d4091e2 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x -= new String("1"); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x -= new String("1"); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js index b6d0cc0a8d..d370d02126 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x -= new String("1"); if (x !== -1) { $ERROR('#4: x = null; x -= new String("1"); x === -1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js index 61c68cfa3c..af874c53c3 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x -= new Boolean(true); if (isNaN(x) !== true) { $ERROR('#4: x = undefined; x -= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js index 4881e2d8bf..7fd59e564a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x -= y is the same as x = x - y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x -= y is the same as x = x - y +es5id: 11.13.2_A4.5_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x -= new Boolean(true); if (x !== -1) { $ERROR('#4: x = null; x -= new Boolean(true); x === -1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js index d4b6680cff..3541fbab48 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x <<= new Boolean(true); if (x !== 2) { $ERROR('#4: x = new Boolean(true); x <<= new Boolean(true); x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js index 63493abb63..2b5d384a06 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x <<= new Number(1); if (x !== 2) { $ERROR('#4: x = new Number(1); x <<= new Number(1); x === 2. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js index 8a31b37ed0..375c33a63b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x <<= "x"; if (x !== 1) { $ERROR('#6: x = "1"; x <<= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js index 1c1a817811..dbe92282b1 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x <<= null; if (x !== 0) { $ERROR('#4: x = null; x <<= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js index 9348c745e2..25e5981df2 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x <<= new Boolean(true); if (x !== 2) { $ERROR('#8: x = new Number(1); x <<= new Boolean(true); x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js index 2cd913d8ef..5e4e9cb34d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x <<= "x"; if (x !== 1) { $ERROR('#10: x = 1; x <<= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js index 6040e1de88..cd852cfedd 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x <<= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x <<= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js index 1eee513205..2c21bdba0f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x <<= new Number(1); if (x !== 0) { $ERROR('#4: x = undefined; x <<= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js index 7616e4e7c9..f6b8fab041 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x <<= new Boolean(true); if (x !== 2) { $ERROR('#8: x = new String("1"); x <<= new Boolean(true); x === 2. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js index 6fbf4f4f2c..d5694e3a0f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x <<= new String("1"); if (x !== 0) { $ERROR('#4: x = undefined; x <<= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js index ce324f83a5..78d87e7523 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x <<= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x <<= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js index 606ae17bcb..e147e7827a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x <<= new Boolean(true); if (x !== 0) { $ERROR('#4: x = undefined; x <<= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js index 2b0820a85d..1dea4d2269 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x <<= y is the same as x = x << y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x <<= y is the same as x = x << y +es5id: 11.13.2_A4.6_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x <<= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x <<= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js index aeb328d7ce..a62b408ced 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x >>= new Boolean(true); if (x !== 0) { $ERROR('#4: x = new Boolean(true); x >>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js index dc83e1ad0b..09cd213644 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x >>= new Number(1); if (x !== 0) { $ERROR('#4: x = new Number(1); x >>= new Number(1); x === 0. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js index 9513cf37da..3fefee446e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x >>= "x"; if (x !== 1) { $ERROR('#6: x = "1"; x >>= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js index 7195a5e44d..0531339dec 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x >>= null; if (x !== 0) { $ERROR('#4: x = null; x >>= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js index 8fa6a383c0..9e1a6f7514 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x >>= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new Number(1); x >>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js index 87e69c0aa2..e75670780e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x >>= "x"; if (x !== 1) { $ERROR('#10: x = 1; x >>= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js index 0cf56fb531..167d99e69a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x >>= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x >>= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js index f9ad58a309..817c66438d 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x >>= new Number(1); if (x !== 0) { $ERROR('#4: x = undefined; x >>= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js index bdc8b729fc..02e33a4583 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x >>= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new String("1"); x >>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js index 970a3540b4..a5f7fc4293 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x >>= new String("1"); if (x !== 0) { $ERROR('#4: x = undefined; x >>= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js index 7720b55124..85ba94d98e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x >>= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x >>= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js index 05a4415a15..41c03877a1 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x >>= new Boolean(true); if (x !== 0) { $ERROR('#4: x = undefined; x >>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js index ddfdbfc644..88867eeb11 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>= y is the same as x = x >> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x >>= y is the same as x = x >> y +es5id: 11.13.2_A4.7_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x >>= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x >>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js index 0b2e033dc4..1822d2b75f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x >>>= new Boolean(true); if (x !== 0) { $ERROR('#4: x = new Boolean(true); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js index 64cb86684b..b1caaf6b36 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x >>>= new Number(1); if (x !== 0) { $ERROR('#4: x = new Number(1); x >>>= new Number(1); x === 0. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js index 47f1978869..0a9ff8100e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x >>>= "x"; if (x !== 1) { $ERROR('#6: x = "1"; x >>>= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js index 6464ffa82d..f51c06899f 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x >>>= null; if (x !== 0) { $ERROR('#4: x = null; x >>>= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js index f610d8278a..83b22785ff 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x >>>= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new Number(1); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js index 9a1d719fe3..401157aa02 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x >>>= "x"; if (x !== 1) { $ERROR('#10: x = 1; x >>>= "x"; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js index bf809a2729..4c5cd9e5df 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x >>>= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x >>>= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js index 4e034735f0..eb25a79512 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x >>>= new Number(1); if (x !== 0) { $ERROR('#4: x = undefined; x >>>= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js index cf319f71d6..6cd4bf9f07 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x >>>= new Boolean(true); if (x !== 0) { $ERROR('#8: x = new String("1"); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js index d73b02dd2d..3ac8b81eac 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x >>>= new String("1"); if (x !== 0) { $ERROR('#4: x = undefined; x >>>= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js index b62931e6b2..fc10e12147 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x >>>= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x >>>= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js index a463cca105..1436f02b98 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x >>>= new Boolean(true); if (x !== 0) { $ERROR('#4: x = undefined; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js index e055c7d2dd..db31ee1900 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x >>>= y is the same as x = x >>> y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x >>>= y is the same as x = x >>> y +es5id: 11.13.2_A4.8_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x >>>= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js index 13be4e0025..0b72c03bdd 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x &= new Boolean(true); if (x !== 1) { $ERROR('#4: x = new Boolean(true); x &= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js index cc1eb514bc..fa2410dae5 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 x = 1; @@ -35,5 +34,3 @@ x &= new Number(1); if (x !== 1) { $ERROR('#4: x = new Number(1); x &= new Number(1); x === 1. Actual: ' + (x)); } - - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js index e845b3c9d9..6f0ea8e1be 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 x = "1"; @@ -49,4 +48,3 @@ x &= "x"; if (x !== 0) { $ERROR('#6: x = "1"; x &= "x"; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js index dd93cbb914..7c42e185ac 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 x = null; @@ -35,4 +34,3 @@ x &= null; if (x !== 0) { $ERROR('#4: x = null; x &= null; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js index 05cd8f8372..cbf0bfff24 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x &= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new Number(1); x &= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js index b394dd6e7f..e4e602dfda 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 x = "1"; @@ -77,4 +78,3 @@ x &= "x"; if (x !== 0) { $ERROR('#10: x = 1; x &= "x"; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js index b4150a583d..77639c5a0b 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x &= new Number(1); if (x !== 0) { $ERROR('#4: x = null; x &= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js index f7bb4d4d8a..47c0a6205c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 x = 1; @@ -35,4 +36,3 @@ x &= new Number(1); if (x !== 0) { $ERROR('#4: x = undefined; x &= new Number(1); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js index a9ce33f785..f86bd8c46c 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 x = true; @@ -63,4 +64,3 @@ x &= new Boolean(true); if (x !== 1) { $ERROR('#8: x = new String("1"); x &= new Boolean(true); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js index 2a62b9723f..e2e05070c5 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x &= new String("1"); if (x !== 0) { $ERROR('#4: x = undefined; x &= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js index b9303bf5f9..fb236d986e 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 x = "1"; @@ -35,4 +36,3 @@ x &= new String("1"); if (x !== 0) { $ERROR('#4: x = null; x &= new String("1"); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js index 0e4db1ffeb..c365a8b065 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x &= new Boolean(true); if (x !== 0) { $ERROR('#4: x = undefined; x &= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js index 3e5a053044..2cfaf5953a 100644 --- a/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js +++ b/test/suite/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production x &= y is the same as x = x & y - * - * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: The production x &= y is the same as x = x & y +es5id: 11.13.2_A4.9_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 x = true; @@ -35,4 +36,3 @@ x &= new Boolean(true); if (x !== 0) { $ERROR('#4: x = null; x &= new Boolean(true); x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.14/S11.14_A1.js b/test/suite/ch11/11.14/S11.14_A1.js index 2e3528db4d..3fd384d7c7 100644 --- a/test/suite/ch11/11.14/S11.14_A1.js +++ b/test/suite/ch11/11.14/S11.14_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between Expression and , or between , and AssignmentExpression are allowed - * - * @path ch11/11.14/S11.14_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between Expression and , or between , and + AssignmentExpression are allowed +es5id: 11.14_A1 +description: Checking by using eval +---*/ //CHECK#1 if ((eval("false\u0009,\u0009true")) !== true) { @@ -58,4 +59,3 @@ if ((eval("false\u2029,\u2029true")) !== true) { if ((eval("false\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029,\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) { $ERROR('#10: (false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029,\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true'); } - diff --git a/test/suite/ch11/11.14/S11.14_A2.1_T1.js b/test/suite/ch11/11.14/S11.14_A2.1_T1.js index e533368865..0b81bf81dc 100644 --- a/test/suite/ch11/11.14/S11.14_A2.1_T1.js +++ b/test/suite/ch11/11.14/S11.14_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.14/S11.14_A2.1_T1.js - * @description Either Expression is not Reference or GetBase is not null - */ +/*--- +info: Operator uses GetValue +es5id: 11.14_A2.1_T1 +description: Either Expression is not Reference or GetBase is not null +---*/ //CHECK#1 if ((1,2) !== 2) { @@ -50,5 +49,3 @@ if ((objectx.prop = false, objecty.prop) !== objecty.prop) { $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; objectx.prop = false, objecty.prop; objectx.prop === false'); } } - - diff --git a/test/suite/ch11/11.14/S11.14_A2.1_T2.js b/test/suite/ch11/11.14/S11.14_A2.1_T2.js index 3a6106eddf..6a67f3975c 100644 --- a/test/suite/ch11/11.14/S11.14_A2.1_T2.js +++ b/test/suite/ch11/11.14/S11.14_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.14/S11.14_A2.1_T2.js - * @description If GetBase(Expression) is null, throw ReferenceError - */ +/*--- +info: Operator uses GetValue +es5id: 11.14_A2.1_T2 +description: If GetBase(Expression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x, 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.14/S11.14_A2.1_T3.js b/test/suite/ch11/11.14/S11.14_A2.1_T3.js index ad654eeb0e..8a3b35fb6a 100644 --- a/test/suite/ch11/11.14/S11.14_A2.1_T3.js +++ b/test/suite/ch11/11.14/S11.14_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator uses GetValue - * - * @path ch11/11.14/S11.14_A2.1_T3.js - * @description If GetBase(AssigmentExpression) is null, throw ReferenceError - */ +/*--- +info: Operator uses GetValue +es5id: 11.14_A2.1_T3 +description: If GetBase(AssigmentExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1, y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.14/S11.14_A3.js b/test/suite/ch11/11.14/S11.14_A3.js index d8858aa3d2..7ab47dfe21 100644 --- a/test/suite/ch11/11.14/S11.14_A3.js +++ b/test/suite/ch11/11.14/S11.14_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Comma Operator evaluates all Expressions and returns the last of them - * - * @path ch11/11.14/S11.14_A3.js - * @description Checking with "=" - */ +/*--- +info: Comma Operator evaluates all Expressions and returns the last of them +es5id: 11.14_A3 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -35,4 +34,3 @@ if (y !== 2) { if (z !== 3) { $ERROR('#4: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; z === 3. Actual: ' + (z)); } - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.1.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.1.js index d8b3561b8a..b424b9ea7c 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.1.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between MemberExpression or CallExpression and "." and between "." and Identifier are allowed - * - * @path ch11/11.2/11.2.1/S11.2.1_A1.1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between MemberExpression or + CallExpression and "." and between "." and Identifier are allowed +es5id: 11.2.1_A1.1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("Number\u0009.\u0009POSITIVE_INFINITY") !== Number.POSITIVE_INFINITY) { @@ -57,4 +58,3 @@ if (eval("Number\u2029.\u2029POSITIVE_INFINITY") !== Number.POSITIVE_INFINITY) { if (eval("Number\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029.\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029POSITIVE_INFINITY") !== Number.POSITIVE_INFINITY) { $ERROR('#10: Number\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029.\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029POSITIVE_INFINITY === Number.POSITIVE_INFINITY'); } - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.2.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.2.js index a820dbd5d0..b5779e90f0 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.2.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "[" and MemberExpression or CallExpression and between Identifier and "]" are allowed - * - * @path ch11/11.2/11.2.1/S11.2.1_A1.2.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "[" and MemberExpression or + CallExpression and between Identifier and "]" are allowed +es5id: 11.2.1_A1.2 +description: Checking by using eval +---*/ //CHECK#1 if (eval('Number[\u0009"POSITIVE_INFINITY"\u0009]') !== Number.POSITIVE_INFINITY) { @@ -57,4 +58,3 @@ if (eval('Number[\u2029"POSITIVE_INFINITY"\u2029]') !== Number.POSITIVE_INFINITY if (eval('Number[\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029"POSITIVE_INFINITY"\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029]') !== Number.POSITIVE_INFINITY) { $ERROR('#10: Number[\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029"POSITIVE_INFINITY"\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029] === Number.POSITIVE_INFINITY'); } - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A2.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A2.js index 1237eae5ed..98f36ecab2 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A2.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * MemberExpression and CallExpression uses GetValue - * - * @path ch11/11.2/11.2.1/S11.2.1_A2.js - * @description If GetBase(MemberExpression or CallExpression) is null, throw ReferenceError - */ +/*--- +info: MemberExpression and CallExpression uses GetValue +es5id: 11.2.1_A2 +description: > + If GetBase(MemberExpression or CallExpression) is null, throw + ReferenceError +---*/ //CHECK#1 try { @@ -29,4 +30,3 @@ catch (e) { $ERROR('#2.2: object.prop throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T1.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T1.js index a13f25e7b8..ce8b35a6ea 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T1.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * MemberExpression calls ToObject(MemberExpression) and ToString(Expression). CallExpression calls ToObject(CallExpression) and ToString(Expression) - * - * @path ch11/11.2/11.2.1/S11.2.1_A3_T1.js - * @description Checking Boolean case - */ +/*--- +info: > + MemberExpression calls ToObject(MemberExpression) and + ToString(Expression). CallExpression calls ToObject(CallExpression) and + ToString(Expression) +es5id: 11.2.1_A3_T1 +description: Checking Boolean case +---*/ //CHECK#1 if (true.toString() !== "true") { @@ -26,5 +28,4 @@ if (new Boolean(true).toString() !== "true") { //CHECK#4 if (new Boolean(false)["toString"]() !== "false") { $ERROR('#4: new Boolean(false)["toString"]() === "false". Actual: ' + (new Boolean(false)["toString"]())); -} - +} diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T2.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T2.js index defe6a8c89..28c7d98126 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T2.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * MemberExpression calls ToObject(MemberExpression) and ToString(Expression). CallExpression calls ToObject(CallExpression) and ToString(Expression) - * - * @path ch11/11.2/11.2.1/S11.2.1_A3_T2.js - * @description Checking Number case - */ +/*--- +info: > + MemberExpression calls ToObject(MemberExpression) and + ToString(Expression). CallExpression calls ToObject(CallExpression) and + ToString(Expression) +es5id: 11.2.1_A3_T2 +description: Checking Number case +---*/ //CHECK#1 if (1..toString() !== "1") { @@ -36,5 +38,4 @@ if (new Number(1).toString() !== "1") { //CHECK#6 if (new Number(1)["toFixed"](5) !== "1.00000") { $ERROR('#6: new Number(1)["toFixed"](5) === "1.00000". Actual: ' + (new Number(1)["toFixed"](5))); -} - +} diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T3.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T3.js index 14a0e85e35..ff67521c9e 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T3.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * MemberExpression calls ToObject(MemberExpression) and ToString(Expression). CallExpression calls ToObject(CallExpression) and ToString(Expression) - * - * @path ch11/11.2/11.2.1/S11.2.1_A3_T3.js - * @description Checking String case; - */ +/*--- +info: > + MemberExpression calls ToObject(MemberExpression) and + ToString(Expression). CallExpression calls ToObject(CallExpression) and + ToString(Expression) +es5id: 11.2.1_A3_T3 +description: Checking String case; +---*/ //CHECK#1 if ("abc123".charAt(5) !== "3") { @@ -36,5 +38,4 @@ if (new String("abc123").length !== 6) { //CHECK#6 if (new String("abc123")["charAt"](2) !== "c") { $ERROR('#6: new String("abc123")["charAt"](2) === "c". Actual: ' + (new String("abc123")["charAt"](2))); -} - +} diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T4.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T4.js index 2c360c65db..033fcc502d 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T4.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * MemberExpression calls ToObject(MemberExpression) and ToString(Expression). CallExpression calls ToObject(CallExpression) and ToString(Expression) - * - * @path ch11/11.2/11.2.1/S11.2.1_A3_T4.js - * @description Checking "undefined" case - */ +/*--- +info: > + MemberExpression calls ToObject(MemberExpression) and + ToString(Expression). CallExpression calls ToObject(CallExpression) and + ToString(Expression) +es5id: 11.2.1_A3_T4 +description: Checking "undefined" case +---*/ //CHECK#1 try { @@ -29,4 +31,3 @@ catch (e) { $ERROR('#2.2: undefined["toString"]() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T5.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T5.js index 405415f722..c2b457c946 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T5.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A3_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * MemberExpression calls ToObject(MemberExpression) and ToString(Expression). CallExpression calls ToObject(CallExpression) and ToString(Expression) - * - * @path ch11/11.2/11.2.1/S11.2.1_A3_T5.js - * @description Checking "null" case - */ +/*--- +info: > + MemberExpression calls ToObject(MemberExpression) and + ToString(Expression). CallExpression calls ToObject(CallExpression) and + ToString(Expression) +es5id: 11.2.1_A3_T5 +description: Checking "null" case +---*/ //CHECK#1 try { @@ -29,4 +31,3 @@ catch (e) { $ERROR('#2.2: null["toString"]() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T1.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T1.js index 8f9212243b..4293fecf2a 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T1.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T1.js - * @description Checking properties of this object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T1 +description: Checking properties of this object +---*/ //CHECK#1-32 if (typeof (this.NaN) === "undefined") $ERROR('#1: typeof (this.NaN) !== "undefined"'); @@ -37,4 +36,3 @@ if (typeof this.Date === "undefined") $ERROR('#29: typeof this.Date !== "undefi if (typeof this['Date'] === "undefined") $ERROR('#30: typeof this["Date"] !== "undefined"'); if (typeof this.Math === "undefined") $ERROR('#31: typeof this.Math !== "undefined"'); if (typeof this['Math'] === "undefined") $ERROR('#32: typeof this["Math"] !== "undefined"'); - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T2.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T2.js index ed27f85344..7b17f857db 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T2.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T2.js - * @description Checking properties and methods of Object objects - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T2 +description: Checking properties and methods of Object objects +---*/ //CHECK#1-8 if (typeof Object.prototype !== "object") $ERROR('#1: typeof Object.prototype === "object". Actual: ' + (typeof Object.prototype )); @@ -17,4 +16,3 @@ if (typeof Object.valueOf !== "function") $ERROR('#5: typeof Object.valueOf === if (typeof Object['valueOf'] !== "function") $ERROR('#6: typeof Object["valueOf"] === "function". Actual: ' + (typeof Object["valueOf"] )); if (typeof Object.constructor !== "function") $ERROR('#7: typeof Object.constructor === "function". Actual: ' + (typeof Object.constructor )); if (typeof Object['constructor'] !== "function") $ERROR('#8: typeof Object["constructor"] === "function". Actual: ' + (typeof Object["constructor"] )); - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T3.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T3.js index dfa72b139e..9fb4379212 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T3.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T3.js - * @description Checking properties of the Function object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T3 +description: Checking properties of the Function object +---*/ //CHECK#1-8 if (typeof Function.prototype !== "function") $ERROR('#1: typeof Function.prototype === "function". Actual: ' + (typeof Function.prototype )); @@ -17,4 +16,3 @@ if (typeof Function.prototype.length !== "number") $ERROR('#5: typeof Function. if (typeof Function.prototype['length'] !== "number") $ERROR('#6: typeof Function.prototype["length"] === "number". Actual: ' + (typeof Function.prototype["length"] )); if (typeof Function.prototype.valueOf !== "function") $ERROR('#7: typeof Function.prototype.valueOf === "function". Actual: ' + (typeof Function.prototype.valueOf )); if (typeof Function.prototype['valueOf'] !== "function") $ERROR('#8: typeof Function.prototype["valueOf"] === "function". Actual: ' + (typeof Function.prototype["valueOf"] )); - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T4.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T4.js index da4633fe2e..7ae9ecaf36 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T4.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T4.js - * @description Checking properties of the Array object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T4 +description: Checking properties of the Array object +---*/ //CHECK#1-8 if (typeof Array.prototype !== "object") $ERROR('#1: typeof Array.prototype === "object". Actual: ' + (typeof Array.prototype )); @@ -23,5 +22,3 @@ if (typeof Array.prototype.reverse !== "function") $ERROR('#11: typeof Array.p if (typeof Array.prototype['reverse'] !== "function") $ERROR('#12: typeof Array.prototype["reverse"] === "function". Actual: ' + (typeof Array.prototype["reverse"] )); if (typeof Array.prototype.sort !== "function") $ERROR('#13: typeof Array.prototype.sort === "function". Actual: ' + (typeof Array.prototype.sort )); if (typeof Array.prototype['sort'] !== "function") $ERROR('#14: typeof Array.prototype["sort"] === "function". Actual: ' + (typeof Array.prototype["sort"] )); - - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T5.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T5.js index 02904c0b40..3038847735 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T5.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T5.js - * @description Checking properties of the String object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T5 +description: Checking properties of the String object +---*/ //CHECK#1-28 if (typeof String.prototype !== "object") $ERROR('#1: typeof String.prototype === "object". Actual: ' + (typeof String.prototype )); @@ -37,5 +36,3 @@ if (typeof String.prototype.toUpperCase !== "function") $ERROR('#25: typeof Str if (typeof String.prototype['toUpperCase'] !== "function") $ERROR('#26: typeof Array.prototype === "object". Actual: ' + (typeof Array.prototype )); if (typeof String.prototype.length !== "number") $ERROR('#27: typeof String.prototype.length === "number". Actual: ' + (typeof String.prototype.length )); if (typeof String.prototype['length'] !== "number") $ERROR('#28: typeof String.prototype["length"] === "number". Actual: ' + (typeof String.prototype["length"] )); - - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T6.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T6.js index 0d86688463..0c8db3f629 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T6.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T6.js - * @description Checking properties of the Boolean object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T6 +description: Checking properties of the Boolean object +---*/ //CHECK#1-8 if (typeof Boolean.prototype !== "object") $ERROR('#1: typeof Boolean.prototype === "object". Actual: ' + (typeof Boolean.prototype )); @@ -17,5 +16,3 @@ if (typeof Boolean.prototype.valueOf !== "function") $ERROR('#5: typeof Boolea if (typeof Boolean.prototype['valueOf'] !== "function") $ERROR('#6: typeof Boolean.prototype["valueOf"] === "function". Actual: ' + (typeof Boolean.prototype["valueOf"] )); if (typeof Boolean.prototype.toString !== "function") $ERROR('#7: typeof Boolean.prototype.toString === "function". Actual: ' + (typeof Boolean.prototype.toString )); if (typeof Boolean.prototype['toString'] !== "function") $ERROR('#8: typeof Boolean.prototype["toString"] === "function". Actual: ' + (typeof Boolean.prototype["toString"] )); - - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T7.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T7.js index 7d8826d802..6c29330ac2 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T7.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T7.js - * @description Checking properties of the Number object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T7 +description: Checking properties of the Number object +---*/ //CHECK#1-16 if (typeof Number.MAX_VALUE !== "number") $ERROR('#1: typeof Number.MAX_VALUE === "number". Actual: ' + (typeof Number.MAX_VALUE )); @@ -25,6 +24,3 @@ if (typeof Number.prototype.constructor !== "function") $ERROR('#13: typeof Num if (typeof Number.prototype['constructor'] !== "function") $ERROR('#14: typeof Number.prototype["constructor"] === "function". Actual: ' + (typeof Number.prototype["constructor"] )); if (typeof Number.prototype.valueOf !== "function") $ERROR('#15: typeof Number.prototype.valueOf === "function". Actual: ' + (typeof Number.prototype.valueOf )); if (typeof Number.prototype['valueOf'] !== "function") $ERROR('#16: typeof Number.prototype["valueOf"] === "function". Actual: ' + (typeof Number.prototype["valueOf"] )); - - - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T8.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T8.js index fd3846e9ca..4a1defa7bb 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T8.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T8.js - * @description Checking properties of the Math Object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T8 +description: Checking properties of the Math Object +---*/ //CHECK#1-52 if (typeof Math.E !== "number") $ERROR('#1: typeof Math.E === "number". Actual: ' + (typeof Math.E )); @@ -61,5 +60,3 @@ if (typeof Math.sqrt !== "function") $ERROR('#49: typeof Math.sqrt === "functio if (typeof Math['sqrt'] !== "function") $ERROR('#50: typeof Math["sqrt"] === "function". Actual: ' + (typeof Math["sqrt"] )); if (typeof Math.tan !== "function") $ERROR('#51: typeof Math.tan === "function". Actual: ' + (typeof Math.tan )); if (typeof Math['tan'] !== "function") $ERROR('#52: typeof Math["tan"] === "function". Actual: ' + (typeof Math["tan"] )); - - diff --git a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js index 409d49e58e..84225914d0 100644 --- a/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js +++ b/test/suite/ch11/11.2/11.2.1/S11.2.1_A4_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check type of various properties - * - * @path ch11/11.2/11.2.1/S11.2.1_A4_T9.js - * @description Checking properties of the Date object - */ +/*--- +info: Check type of various properties +es5id: 11.2.1_A4_T9 +description: Checking properties of the Date object +---*/ //CHECK#1-86 if (typeof Date.parse !== "function") $ERROR('#1: typeof Date.parse === "function". Actual: ' + (typeof Date.parse )); @@ -89,6 +88,3 @@ if (typeof Date.prototype.toLocaleString !== "function") $ERROR('#81: typeof Da if (typeof Date.prototype['toLocaleString'] !== "function") $ERROR('#82: typeof Date.prototype["toLocaleString"] === "function". Actual: ' + (typeof Date.prototype["toLocaleString"] )); if (typeof Date.prototype.toUTCString !== "function") $ERROR('#83: typeof Date.prototype.toUTCString === "function". Actual: ' + (typeof Date.prototype.toUTCString )); if (typeof Date.prototype['toUTCString'] !== "function") $ERROR('#84: typeof Date.prototype["toUTCString"] === "function". Actual: ' + (typeof Date.prototype["toUTCString"] )); - - - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.1.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.1.js index 10811b4b06..3a253097ab 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.1.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "new" and NewExpression are allowed - * - * @path ch11/11.2/11.2.2/S11.2.2_A1.1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "new" and NewExpression are + allowed +es5id: 11.2.2_A1.1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("new\u0009Number") != 0) { @@ -57,4 +58,3 @@ if (eval("new\u2029Number") != 0) { if (eval("new\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Number") != 0) { $ERROR('#10: new\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number == 0'); } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.2.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.2.js index d47eb10bf1..c6c491654f 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.2.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "new" and MemberExpression are allowed - * - * @path ch11/11.2/11.2.2/S11.2.2_A1.2.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "new" and MemberExpression are + allowed +es5id: 11.2.2_A1.2 +description: Checking by using eval +---*/ //CHECK#1 if (eval("new\u0009Number()") != 0) { @@ -57,4 +58,3 @@ if (eval("new\u2029Number()") != 0) { if (eval("new\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Number()") != 0) { $ERROR('#10: new\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number == 0'); } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A2.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A2.js index e879390fc6..a8fafe6d61 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A2.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "new" uses GetValue - * - * @path ch11/11.2/11.2.2/S11.2.2_A2.js - * @description If GetBase(NewExpression) or GetBase(MemberExpression) is null, throw ReferenceError - */ +/*--- +info: Operator "new" uses GetValue +es5id: 11.2.2_A2 +description: > + If GetBase(NewExpression) or GetBase(MemberExpression) is null, + throw ReferenceError +---*/ //CHECK#1 try { @@ -29,4 +30,3 @@ catch (e) { $ERROR('#2: new x() throw ReferenceError'); } } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T1.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T1.js index 3f52d95274..3bfb8767bd 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T1.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A3_T1.js - * @description Checking boolean primitive case - */ +/*--- +info: > + If Type(NewExpression) or Type(MemberExpression) is not Object, throw + TypeError +es5id: 11.2.2_A3_T1 +description: Checking boolean primitive case +---*/ //CHECK#1 try { @@ -42,5 +43,3 @@ catch (e) { $ERROR('#3: var x = true; new x() throw TypeError'); } } - - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T2.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T2.js index 1ad67c5489..15e8071f02 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T2.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A3_T2.js - * @description Checking "number primitive" case - */ +/*--- +info: > + If Type(NewExpression) or Type(MemberExpression) is not Object, throw + TypeError +es5id: 11.2.2_A3_T2 +description: Checking "number primitive" case +---*/ //CHECK#1 try { @@ -42,4 +43,3 @@ catch (e) { $ERROR('#3: var x = 1; new x() throw TypeError'); } } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T3.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T3.js index c934060123..4eddea31c3 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T3.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A3_T3.js - * @description Checking "string primitive" case - */ +/*--- +info: > + If Type(NewExpression) or Type(MemberExpression) is not Object, throw + TypeError +es5id: 11.2.2_A3_T3 +description: Checking "string primitive" case +---*/ //CHECK#1 try { @@ -42,4 +43,3 @@ catch (e) { $ERROR('#3: var x = "1"; new x() throw TypeError'); } } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T4.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T4.js index adbd1356c0..7f15537fc4 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T4.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A3_T4.js - * @description Checking "undefined" case - */ +/*--- +info: > + If Type(NewExpression) or Type(MemberExpression) is not Object, throw + TypeError +es5id: 11.2.2_A3_T4 +description: Checking "undefined" case +---*/ //CHECK#1 try { @@ -42,4 +43,3 @@ catch (e) { $ERROR('#3: var x = undefined; new x() throw TypeError'); } } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T5.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T5.js index abf71da191..de1ab5e977 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T5.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A3_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(NewExpression) or Type(MemberExpression) is not Object, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A3_T5.js - * @description Checking "null primitive" case - */ +/*--- +info: > + If Type(NewExpression) or Type(MemberExpression) is not Object, throw + TypeError +es5id: 11.2.2_A3_T5 +description: Checking "null primitive" case +---*/ //CHECK#1 try { @@ -42,4 +43,3 @@ catch (e) { $ERROR('#3: var x = null; new x() throw TypeError'); } } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T1.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T1.js index cd6517cbfc..d38c127198 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T1.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A4_T1.js - * @description Checking Boolean object case - */ +/*--- +info: > + If NewExpression or MemberExpression does not implement internal + [[Construct]] method, throw TypeError +es5id: 11.2.2_A4_T1 +description: Checking Boolean object case +---*/ //CHECK#1 try { @@ -42,5 +43,3 @@ catch (e) { $ERROR('#3: var x = new Boolean(true); new x() throw TypeError'); } } - - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T2.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T2.js index bc776ec65b..a6101c898c 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T2.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A4_T2.js - * @description Checking Number object case - */ +/*--- +info: > + If NewExpression or MemberExpression does not implement internal + [[Construct]] method, throw TypeError +es5id: 11.2.2_A4_T2 +description: Checking Number object case +---*/ //CHECK#1 try { @@ -42,5 +43,3 @@ catch (e) { $ERROR('#3: var x = new Number(1); new x() throw TypeError'); } } - - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T3.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T3.js index 9027cf051c..82e715c13f 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T3.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A4_T3.js - * @description Checking String object case - */ +/*--- +info: > + If NewExpression or MemberExpression does not implement internal + [[Construct]] method, throw TypeError +es5id: 11.2.2_A4_T3 +description: Checking String object case +---*/ //CHECK#1 try { @@ -42,5 +43,3 @@ catch (e) { $ERROR('#3: var x = new String("1"); new x() throw TypeError'); } } - - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T4.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T4.js index e240ba827c..72916da43c 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T4.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A4_T4.js - * @description Checking Global object case - */ +/*--- +info: > + If NewExpression or MemberExpression does not implement internal + [[Construct]] method, throw TypeError +es5id: 11.2.2_A4_T4 +description: Checking Global object case +---*/ //CHECK#1 try { @@ -29,4 +30,3 @@ catch (e) { $ERROR('#2: new this() throw TypeError'); } } - diff --git a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T5.js b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T5.js index 72fdae8766..4b9c5537cf 100644 --- a/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T5.js +++ b/test/suite/ch11/11.2/11.2.2/S11.2.2_A4_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If NewExpression or MemberExpression does not implement internal [[Construct]] method, throw TypeError - * - * @path ch11/11.2/11.2.2/S11.2.2_A4_T5.js - * @description Checking Math object case - */ +/*--- +info: > + If NewExpression or MemberExpression does not implement internal + [[Construct]] method, throw TypeError +es5id: 11.2.2_A4_T5 +description: Checking Math object case +---*/ //CHECK#1 try { @@ -41,5 +42,3 @@ catch (e) { $ERROR('#3: var x = new Math(); new x() throw TypeError'); } } - - diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_1.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_1.js index 8ae5b5e84d..25b66f4580 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_1.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_1.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (FunctionDeclaration) - */ - - -function testcase() { - var fooCalled = false; - function foo(){ fooCalled = true; } - - var o = { }; - try { - o.bar( foo() ); - throw new Exception("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_1 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (FunctionDeclaration) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fooCalled = false; + function foo(){ fooCalled = true; } + + var o = { }; + try { + o.bar( foo() ); + throw new Exception("o.bar does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (fooCalled===true); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_2.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_2.js index 5e7496d51e..43e58d5d2d 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_2.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_2.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (FunctionExpression) - */ - - -function testcase() { - var fooCalled = false; - var foo = function (){ fooCalled = true; } - - var o = { }; - try { - o.bar( foo() ); - throw new Exception("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_2 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (FunctionExpression) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fooCalled = false; + var foo = function (){ fooCalled = true; } + + var o = { }; + try { + o.bar( foo() ); + throw new Exception("o.bar does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (fooCalled===true); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_3.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_3.js index 04616e5a0b..2f3445f773 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_3.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_3.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_3.js - * @description Call arguments are not evaluated before the check is made to see if the object is actually callable (undefined member) - */ - - -function testcase() { - var fooCalled = false; - function foo(){ fooCalled = true; } - - var o = { }; - try { - o.bar.gar( foo() ); - throw new Exception("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===false); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_3 +description: > + Call arguments are not evaluated before the check is made to see + if the object is actually callable (undefined member) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fooCalled = false; + function foo(){ fooCalled = true; } + + var o = { }; + try { + o.bar.gar( foo() ); + throw new Exception("o.bar does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (fooCalled===false); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_4.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_4.js index f6970fa792..4b725d1855 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_4.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_4.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (property) - */ - - -function testcase() { - var fooCalled = false; - function foo(){ fooCalled = true; } - - var o = { }; - Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, - set: function(x) {this.barSetter = true; }}); - try { - o.bar( foo() ); - throw new Exception("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true) && (o.barGetter===true) && (o.barSetter===undefined); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_4 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (property) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fooCalled = false; + function foo(){ fooCalled = true; } + + var o = { }; + Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, + set: function(x) {this.barSetter = true; }}); + try { + o.bar( foo() ); + throw new Exception("o.bar does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (fooCalled===true) && (o.barGetter===true) && (o.barSetter===undefined); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_5.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_5.js index 3e2315f033..6bc71138bf 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_5.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_5.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_5.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (eval'ed) - */ - - -function testcase() { - var fooCalled = false; - function foo(){ fooCalled = true; } - - var o = { }; - try { - eval("o.bar( foo() );"); - throw new Exception("o.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_5 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (eval'ed) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fooCalled = false; + function foo(){ fooCalled = true; } + + var o = { }; + try { + eval("o.bar( foo() );"); + throw new Exception("o.bar does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (fooCalled===true); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_6.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_6.js index c2bfcc45ab..e484b615e7 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_6.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_6.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (getter called) - */ - - -function testcase() { - var o = { }; - Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, - set: function(x) {this.barSetter = true; }}); - try { - o.foo( o.bar ); - throw new Exception("o.foo does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_6 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (getter called) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { }; + Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, + set: function(x) {this.barSetter = true; }}); + try { + o.foo( o.bar ); + throw new Exception("o.foo does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_7.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_7.js index 2c320e7786..8d5bc30abd 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_7.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_7.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (getter called as indexed property) - */ - - -function testcase() { - var o = { }; - Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, - set: function(x) {this.barSetter = true; }}); - try { - o.foo( o["bar"] ); - throw new Exception("o.foo does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_7 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (getter called as indexed property) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { }; + Object.defineProperty(o, "bar", {get: function() {this.barGetter = true; return 42;}, + set: function(x) {this.barSetter = true; }}); + try { + o.foo( o["bar"] ); + throw new Exception("o.foo does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/11.2.3-3_8.js b/test/suite/ch11/11.2/11.2.3/11.2.3-3_8.js index 67e5b9b80c..fd264aa859 100644 --- a/test/suite/ch11/11.2/11.2.3/11.2.3-3_8.js +++ b/test/suite/ch11/11.2/11.2.3/11.2.3-3_8.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.2/11.2.3/11.2.3-3_8.js - * @description Call arguments are evaluated before the check is made to see if the object is actually callable (global object) - */ - - -function testcase() { - if (this!==fnGlobalObject()) { - return; - } - - var fooCalled = false; - function foo(){ fooCalled = true; } - - try { - this.bar( foo() ); - throw new Exception("this.bar does not exist!"); - } catch(e) { - return (e instanceof TypeError) && (fooCalled===true); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.2.3-3_8 +description: > + Call arguments are evaluated before the check is made to see if + the object is actually callable (global object) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + if (this!==fnGlobalObject()) { + return; + } + + var fooCalled = false; + function foo(){ fooCalled = true; } + + try { + this.bar( foo() ); + throw new Exception("this.bar does not exist!"); + } catch(e) { + return (e instanceof TypeError) && (fooCalled===true); + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A1.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A1.js index 19dfdce735..3e87f7114c 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A1.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between MemberExpression and Arguments are allowed - * - * @path ch11/11.2/11.2.3/S11.2.3_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between MemberExpression and Arguments + are allowed +es5id: 11.2.3_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("Number\u0009()") !== 0) { @@ -57,4 +58,3 @@ if (eval("Number\u2029()") !== 0) { if (eval("Number\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029()") !== 0) { $ERROR('#10: Number\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029() === 0'); } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A2.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A2.js index 29ae4a55a6..5f13c4144d 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A2.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CallExpression : MemberExpression Arguments uses GetValue - * - * @path ch11/11.2/11.2.3/S11.2.3_A2.js - * @description If GetBase(MemberExpression) is null, throw ReferenceError - */ +/*--- +info: "CallExpression : MemberExpression Arguments uses GetValue" +es5id: 11.2.3_A2 +description: If GetBase(MemberExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -29,4 +28,3 @@ catch (e) { $ERROR('#2.2: x(1,2,3) throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T1.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T1.js index 5fbf7b68db..ffa0b03d06 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T1.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression is not Object, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A3_T1.js - * @description Checking "boolean primitive" case - */ +/*--- +info: If MemberExpression is not Object, throw TypeError +es5id: 11.2.3_A3_T1 +description: Checking "boolean primitive" case +---*/ //CHECK#1 try { @@ -30,4 +29,3 @@ catch (e) { $ERROR('#2.2: var x = true; x() throw TypeError. Actual: ' + (e)) } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T2.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T2.js index 253f1b0e6e..03f176b458 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T2.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression is not Object, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A3_T2.js - * @description Checking "number primitive" case - */ +/*--- +info: If MemberExpression is not Object, throw TypeError +es5id: 11.2.3_A3_T2 +description: Checking "number primitive" case +---*/ //CHECK#1 try { @@ -30,4 +29,3 @@ catch (e) { $ERROR('#2.2: var x = 1; x() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T3.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T3.js index 388510f21c..3093544125 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T3.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression is not Object, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A3_T3.js - * @description Checking "string primitive" case - */ +/*--- +info: If MemberExpression is not Object, throw TypeError +es5id: 11.2.3_A3_T3 +description: Checking "string primitive" case +---*/ //CHECK#1 try { @@ -30,4 +29,3 @@ catch (e) { $ERROR('#2.2: var x = "1"; x() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T4.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T4.js index a167260ed8..3454847d6b 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T4.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression is not Object, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A3_T4.js - * @description Checking "undefined" case - */ +/*--- +info: If MemberExpression is not Object, throw TypeError +es5id: 11.2.3_A3_T4 +description: Checking "undefined" case +---*/ //CHECK#1 try { @@ -30,4 +29,3 @@ catch (e) { $ERROR('#2.2: var x = undefined; x() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T5.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T5.js index 77cd76fa4f..9cf0f6f82e 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T5.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression is not Object, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A3_T5.js - * @description Checking "null" case - */ +/*--- +info: If MemberExpression is not Object, throw TypeError +es5id: 11.2.3_A3_T5 +description: Checking "null" case +---*/ //CHECK#1 try { @@ -30,4 +29,3 @@ catch (e) { $ERROR('#2.2: var x = null; x() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T1.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T1.js index ca028fa5ac..15a57e5165 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T1.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression does not implement the internal [[Call]] method, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A4_T1.js - * @description Checking Boolean object case - */ +/*--- +info: > + If MemberExpression does not implement the internal [[Call]] method, + throw TypeError +es5id: 11.2.3_A4_T1 +description: Checking Boolean object case +---*/ //CHECK#1 try { @@ -30,5 +31,3 @@ catch (e) { $ERROR('#2.2: var x = new Boolean(true); x() throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T2.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T2.js index 41f8983052..2092ecf883 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T2.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression does not implement the internal [[Call]] method, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A4_T2.js - * @description Checking Number object case - */ +/*--- +info: > + If MemberExpression does not implement the internal [[Call]] method, + throw TypeError +es5id: 11.2.3_A4_T2 +description: Checking Number object case +---*/ //CHECK#1 try { @@ -30,5 +31,3 @@ catch (e) { $ERROR('#2.2: var x = new Number(1); x() throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T3.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T3.js index 108085425c..ddf8c07ee5 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T3.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression does not implement the internal [[Call]] method, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A4_T3.js - * @description Checking String object case - */ +/*--- +info: > + If MemberExpression does not implement the internal [[Call]] method, + throw TypeError +es5id: 11.2.3_A4_T3 +description: Checking String object case +---*/ //CHECK#1 try { @@ -30,4 +31,3 @@ catch (e) { $ERROR('#2.2: var x = new String("1"); x() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T4.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T4.js index a19cc05e6b..0f85cc0ae2 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T4.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression does not implement the internal [[Call]] method, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A4_T4.js - * @description Checking Global object case - */ +/*--- +info: > + If MemberExpression does not implement the internal [[Call]] method, + throw TypeError +es5id: 11.2.3_A4_T4 +description: Checking Global object case +---*/ //CHECK#1 try { @@ -18,4 +19,3 @@ catch (e) { $ERROR('#1.2: this() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T5.js b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T5.js index ddaf40c8d7..4f022dc007 100644 --- a/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T5.js +++ b/test/suite/ch11/11.2/11.2.3/S11.2.3_A4_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If MemberExpression does not implement the internal [[Call]] method, throw TypeError - * - * @path ch11/11.2/11.2.3/S11.2.3_A4_T5.js - * @description Checking Math object case - */ +/*--- +info: > + If MemberExpression does not implement the internal [[Call]] method, + throw TypeError +es5id: 11.2.3_A4_T5 +description: Checking Math object case +---*/ //CHECK#1 try { @@ -18,5 +19,3 @@ catch (e) { $ERROR('#1.2: Math() throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T1.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T1.js index 0d31a6c229..f835b1be62 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T1.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : () - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.1_T1.js - * @description Function is declared with no FormalParameterList - */ +/*--- +info: "Arguments : ()" +es5id: 11.2.4_A1.1_T1 +description: Function is declared with no FormalParameterList +---*/ function f_arg() { return arguments; @@ -21,4 +20,3 @@ if (f_arg().length !== 0) { if (f_arg()[0] !== undefined) { $ERROR('#2: function f_arg() {return arguments;} f_arg()[0] === undefined. Actual: ' + (f_arg()[0])); } - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js index 6be2a99377..ddfbfae02a 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : () - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.1_T2.js - * @description Function is declared with FormalParameterList - */ +/*--- +info: "Arguments : ()" +es5id: 11.2.4_A1.1_T2 +description: Function is declared with FormalParameterList +---*/ function f_arg(x,y) { return arguments; @@ -26,4 +25,3 @@ if (f_arg()[0] !== undefined) { if (f_arg.length !== 2) { $ERROR('#3: function f_arg(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length)); } - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T1.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T1.js index aa419e295a..aba4737480 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T1.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList) - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.2_T1.js - * @description Function is declared with no FormalParameterList - */ +/*--- +info: "Arguments : (ArgumentList)" +es5id: 11.2.4_A1.2_T1 +description: Function is declared with no FormalParameterList +---*/ f_arg = function() { return arguments; @@ -36,4 +35,3 @@ if (f_arg(1,2,3)[2] !== 3) { if (f_arg(1,2,3)[3] !== undefined) { $ERROR('#5: f_arg = function()() {return arguments;} f_arg(1,2,3)[3] === undefined. Actual: ' + (f_arg(1,2,3)[3])); } - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js index 2541df3d19..d94b4ccd48 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList) - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.2_T2.js - * @description Function is declared with FormalParameterList - */ +/*--- +info: "Arguments : (ArgumentList)" +es5id: 11.2.4_A1.2_T2 +description: Function is declared with FormalParameterList +---*/ f_arg = function(x,y) { return arguments; @@ -41,4 +40,3 @@ if (f_arg(1,2,3)[3] !== undefined) { if (f_arg.length !== 2) { $ERROR('#6: f_arg = function(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length)); } - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.3_T1.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.3_T1.js index e54238ea12..29d1111b05 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.3_T1.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.3_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList : ArgumentList,, AssignmentExpression) is a bad syntax - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.3_T1.js - * @description incorrect syntax - * @negative - */ +/*--- +info: > + Arguments : (ArgumentList : ArgumentList,, AssignmentExpression) is a bad + syntax +es5id: 11.2.4_A1.3_T1 +description: incorrect syntax +flags: [negative] +---*/ function f_arg() { } f_arg(1,,2); - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T1.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T1.js index a2eb7989be..a4eb249e2c 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T1.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T1.js @@ -1,19 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList : ArgumentList, AssignmentExpression) - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.4_T1.js - * @description Return an internal list whose length is one greater than the - * length of ArgumentList and whose items are the items of ArgumentList, in order, - * followed at the end by GetValue(AssignmentExpression), which is the last item of - * the new list - */ +/*--- +info: "Arguments : (ArgumentList : ArgumentList, AssignmentExpression)" +es5id: 11.2.4_A1.4_T1 +description: > + Return an internal list whose length is one greater than the + length of ArgumentList and whose items are the items of + ArgumentList, in order, followed at the end by + GetValue(AssignmentExpression), which is the last item of the new + list +---*/ function f_arg() { } //CHECK#1 f_arg(x=1,x); - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T2.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T2.js index 0db853abdd..a6d8492813 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T2.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList : ArgumentList, AssignmentExpression) - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.4_T2.js - * @description Return an internal list whose length is one greater than the - * length of ArgumentList and whose items are the items of ArgumentList, in order, - * followed at the end by GetValue(AssignmentExpression), which is the last item of - * the new list - */ +/*--- +info: "Arguments : (ArgumentList : ArgumentList, AssignmentExpression)" +es5id: 11.2.4_A1.4_T2 +description: > + Return an internal list whose length is one greater than the + length of ArgumentList and whose items are the items of + ArgumentList, in order, followed at the end by + GetValue(AssignmentExpression), which is the last item of the new + list +---*/ function f_arg() { } @@ -24,4 +25,3 @@ catch (e) { $ERROR('#1.2: function f_arg() {} f_arg(x,x=1) throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T3.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T3.js index 7d8bd02c93..72bf97a640 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T3.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T3.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList : ArgumentList, AssignmentExpression) - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.4_T3.js - * @description Return an internal list whose length is one greater than the - * length of ArgumentList and whose items are the items of ArgumentList, in order, - * followed at the end by GetValue(AssignmentExpression), which is the last item of - * the new list - */ +/*--- +info: "Arguments : (ArgumentList : ArgumentList, AssignmentExpression)" +es5id: 11.2.4_A1.4_T3 +description: > + Return an internal list whose length is one greater than the + length of ArgumentList and whose items are the items of + ArgumentList, in order, followed at the end by + GetValue(AssignmentExpression), which is the last item of the new + list +---*/ function f_arg(x,y,z) { return z; @@ -19,4 +20,3 @@ function f_arg(x,y,z) { if (f_arg(x=1,y=x,x+y) !== 2) { $ERROR('#1: function f_arg(x,y,z) {return z;} f_arg(x=1,y=x,x+y) === 2. Actual: ' + (f_arg(x=1,y=x,x+y))); } - diff --git a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T4.js b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T4.js index 83b228a880..1640a874fa 100644 --- a/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T4.js +++ b/test/suite/ch11/11.2/11.2.4/S11.2.4_A1.4_T4.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments : (ArgumentList : ArgumentList, AssignmentExpression) - * - * @path ch11/11.2/11.2.4/S11.2.4_A1.4_T4.js - * @description Return an internal list whose length is one greater than the - * length of ArgumentList and whose items are the items of ArgumentList, in order, - * followed at the end by GetValue(AssignmentExpression), which is the last item of - * the new list - */ +/*--- +info: "Arguments : (ArgumentList : ArgumentList, AssignmentExpression)" +es5id: 11.2.4_A1.4_T4 +description: > + Return an internal list whose length is one greater than the + length of ArgumentList and whose items are the items of + ArgumentList, in order, followed at the end by + GetValue(AssignmentExpression), which is the last item of the new + list +---*/ var x = function () { throw "x"; }; var y = function () { throw "y"; }; @@ -31,4 +32,3 @@ catch (e) { } } } - diff --git a/test/suite/ch11/11.3/11.3.1/11.3.1-2-1-s.js b/test/suite/ch11/11.3/11.3.1/11.3.1-2-1-s.js index 28b2991082..7752c8e005 100644 --- a/test/suite/ch11/11.3/11.3.1/11.3.1-2-1-s.js +++ b/test/suite/ch11/11.3/11.3.1/11.3.1-2-1-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.3/11.3.1/11.3.1-2-1-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appear as a PostfixExpression(arguments++) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments++;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.1-2-1-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appear as a PostfixExpression(arguments++) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments++;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.3/11.3.1/11.3.1-2-1gs.js b/test/suite/ch11/11.3/11.3.1/11.3.1-2-1gs.js index 15456cd5cc..7aa7f51de6 100644 --- a/test/suite/ch11/11.3/11.3.1/11.3.1-2-1gs.js +++ b/test/suite/ch11/11.3/11.3.1/11.3.1-2-1gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch11/11.3/11.3.1/11.3.1-2-1gs.js - * @description Strict Mode - SyntaxError is throw if the identifier arguments appear as a PostfixExpression(arguments++) - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -arguments++; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.1-2-1gs +description: > + Strict Mode - SyntaxError is throw if the identifier arguments + appear as a PostfixExpression(arguments++) +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +arguments++; diff --git a/test/suite/ch11/11.3/11.3.1/11.3.1-2-2-s.js b/test/suite/ch11/11.3/11.3.1/11.3.1-2-2-s.js index f71ea4568d..1684c05dec 100644 --- a/test/suite/ch11/11.3/11.3.1/11.3.1-2-2-s.js +++ b/test/suite/ch11/11.3/11.3.1/11.3.1-2-2-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.3/11.3.1/11.3.1-2-2-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appear as a PostfixExpression(eval++) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval++;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.1-2-2-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appear as a PostfixExpression(eval++) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval++;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.3/11.3.1/11.3.1-2-3-s.js b/test/suite/ch11/11.3/11.3.1/11.3.1-2-3-s.js index e46a706069..69560ad972 100644 --- a/test/suite/ch11/11.3/11.3.1/11.3.1-2-3-s.js +++ b/test/suite/ch11/11.3/11.3.1/11.3.1-2-3-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.3/11.3.1/11.3.1-2-3-s.js - * @description Strict Mode - SyntaxError is not thrown if the identifier 'arguments[...]' appears as a PostfixExpression(arguments++) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - arguments[1] = 7; - arguments[1]++; - return arguments[1]===8; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.1-2-3-s +description: > + Strict Mode - SyntaxError is not thrown if the identifier + 'arguments[...]' appears as a PostfixExpression(arguments++) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + arguments[1] = 7; + arguments[1]++; + return arguments[1]===8; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T1.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T1.js index 9f8bc65a17..0ec0dd42cd 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T1.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "++" is not allowed - * - * @path ch11/11.3/11.3.1/S11.3.1_A1.1_T1.js - * @description Checking Line Feed - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "++" is not allowed +es5id: 11.3.1_A1.1_T1 +description: Checking Line Feed +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u000A++"); - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T2.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T2.js index 4c97a56d13..7348232aef 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T2.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "++" is not allowed - * - * @path ch11/11.3/11.3.1/S11.3.1_A1.1_T2.js - * @description Carriage Return - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "++" is not allowed +es5id: 11.3.1_A1.1_T2 +description: Carriage Return +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u000D++"); - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T3.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T3.js index 16eb546f4b..fbdcf07369 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T3.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T3.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "++" is not allowed - * - * @path ch11/11.3/11.3.1/S11.3.1_A1.1_T3.js - * @description Checking Line Seprator - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "++" is not allowed +es5id: 11.3.1_A1.1_T3 +description: Checking Line Seprator +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u2028++"); - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T4.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T4.js index 8f9d56e715..c00676e1c8 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T4.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.1_T4.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "++" is not allowed - * - * @path ch11/11.3/11.3.1/S11.3.1_A1.1_T4.js - * @description Checking Paragraph separator - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "++" is not allowed +es5id: 11.3.1_A1.1_T4 +description: Checking Paragraph separator +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u2029++"); - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.2_T1.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.2_T1.js index b8df6ebd73..7f5470ce83 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.2_T1.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space between LeftHandSideExpression and "++" are allowed - * - * @path ch11/11.3/11.3.1/S11.3.1_A1.2_T1.js - * @description Checking by using eval - */ +/*--- +info: White Space between LeftHandSideExpression and "++" are allowed +es5id: 11.3.1_A1.2_T1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("var x = 0; x\u0009++; x") !== 1) { @@ -37,4 +36,3 @@ if (eval("var x = 0; x\u00A0++; x") !== 1) { if (eval("var x = 0; x\u0009\u000B\u000C\u0020\u00A0++; x") !== 1) { $ERROR('#6: var x = 0; x\\u0009\\u000B\\u000C\\u0020\\u00A0++; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T1.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T1.js index 3f32ea5b70..459860f3c6 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T1.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ uses GetValue and PutValue - * - * @path ch11/11.3/11.3.1/S11.3.1_A2.1_T1.js - * @description Type(x) is Reference and GetBase(x) is not null - */ +/*--- +info: Operator x++ uses GetValue and PutValue +es5id: 11.3.1_A2.1_T1 +description: Type(x) is Reference and GetBase(x) is not null +---*/ //CHECK#1 var x = 1; @@ -41,6 +40,3 @@ if (y !== 1) { $ERROR('#3: var object = new Object(); object.prop = 1; var y = object.prop++; object.prop === 1 + 1. Actual: ' + (object.prop)); } } - - - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T2.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T2.js index 5bc1abbad0..8ad290056a 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T2.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ uses GetValue and PutValue - * - * @path ch11/11.3/11.3.1/S11.3.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x++ uses GetValue and PutValue +es5id: 11.3.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x++ throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T3.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T3.js index fec236e6db..0d2ad4de8e 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T3.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.1_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ uses GetValue and PutValue - * - * @path ch11/11.3/11.3.1/S11.3.1_A2.1_T3.js - * @description If Type(x) is not Reference, throw ReferenceError (or SyntaxError) - * @negative - */ +/*--- +info: Operator x++ uses GetValue and PutValue +es5id: 11.3.1_A2.1_T3 +description: If Type(x) is not Reference, throw ReferenceError (or SyntaxError) +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +20,3 @@ catch (e) { 1++; } } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.2_T1.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.2_T1.js index dc82a92da9..de58a5f9eb 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.2_T1.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ uses [[Default Value]] - * - * @path ch11/11.3/11.3.1/S11.3.1_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x++ uses [[Default Value]] +es5id: 11.3.1_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -107,4 +106,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object++ throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T1.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T1.js index e3003d2d4d..b70e93fe06 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T1.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns x = ToNumber(x) + 1 - * - * @path ch11/11.3/11.3.1/S11.3.1_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator x++ returns x = ToNumber(x) + 1 +es5id: 11.3.1_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = false; @@ -21,4 +20,3 @@ x++; if (x !== 1 + 1) { $ERROR('#2: var x = new Boolean(true); x++; x === 1 + 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T2.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T2.js index 6b5560d1a6..7cfe79561a 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T2.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns x = ToNumber(x) + 1 - * - * @path ch11/11.3/11.3.1/S11.3.1_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator x++ returns x = ToNumber(x) + 1 +es5id: 11.3.1_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 0.1; @@ -21,4 +20,3 @@ x++; if (x !== -1.1 + 1) { $ERROR('#2: var x = new Number(-1.1); x++; x === -1.1 + 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T3.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T3.js index b43aa2c422..f200a1a21b 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T3.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns x = ToNumber(x) + 1 - * - * @path ch11/11.3/11.3.1/S11.3.1_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator x++ returns x = ToNumber(x) + 1 +es5id: 11.3.1_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -28,4 +27,3 @@ x++; if (x !== -1 + 1) { $ERROR('#3: var x = new String("-1"); x++; x === -1 + 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T4.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T4.js index 1a6fd79ec5..facd558390 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T4.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns x = ToNumber(x) + 1 - * - * @path ch11/11.3/11.3.1/S11.3.1_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator x++ returns x = ToNumber(x) + 1 +es5id: 11.3.1_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -21,4 +20,3 @@ x++; if (x !== 1) { $ERROR('#2: var x = null; x++; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T5.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T5.js index c18fc2085f..6006cb36fc 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T5.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns x = ToNumber(x) + 1 - * - * @path ch11/11.3/11.3.1/S11.3.1_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator x++ returns x = ToNumber(x) + 1 +es5id: 11.3.1_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -21,4 +20,3 @@ x++; if (isNaN(x) !== true) { $ERROR('#2: var x = function(){return 1}; x++; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T1.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T1.js index 174800a776..88963fd86f 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T1.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns ToNumber(x) - * - * @path ch11/11.3/11.3.1/S11.3.1_A4_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator x++ returns ToNumber(x) +es5id: 11.3.1_A4_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = false; @@ -21,4 +20,3 @@ var y = x++; if (y !== 1) { $ERROR('#2: var x = new Boolean(true); var y = x++; y === 1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T2.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T2.js index 36fe9aec56..7bcd42af3a 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T2.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns ToNumber(x) - * - * @path ch11/11.3/11.3.1/S11.3.1_A4_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator x++ returns ToNumber(x) +es5id: 11.3.1_A4_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = -0.1; @@ -21,4 +20,3 @@ var y = x++; if (y !== 1.1) { $ERROR('#2: var x = new Number(1.1); var y = x++; y === 1.1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T3.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T3.js index 540ee90240..ebab847da4 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T3.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns ToNumber(x) - * - * @path ch11/11.3/11.3.1/S11.3.1_A4_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator x++ returns ToNumber(x) +es5id: 11.3.1_A4_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -28,4 +27,3 @@ var y = x++; if (y !== -1) { $ERROR('#3: var x = new String("-1"); var y = x++; y === -1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T4.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T4.js index cf703689d6..c23fc07fef 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T4.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns ToNumber(x) - * - * @path ch11/11.3/11.3.1/S11.3.1_A4_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator x++ returns ToNumber(x) +es5id: 11.3.1_A4_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -21,4 +20,3 @@ var y = x++; if (y !== 0) { $ERROR('#2: var x = null; var y = x++; y === 0. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T5.js b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T5.js index 09a248cf38..eea4a2a0a5 100644 --- a/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T5.js +++ b/test/suite/ch11/11.3/11.3.1/S11.3.1_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x++ returns ToNumber(x) - * - * @path ch11/11.3/11.3.1/S11.3.1_A4_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator x++ returns ToNumber(x) +es5id: 11.3.1_A4_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -21,4 +20,3 @@ var y = x++; if (isNaN(y) !== true) { $ERROR('#2: var x = function(){return 1}; var y = x++; y === Not-a-Number. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.2/11.3.2-2-1-s.js b/test/suite/ch11/11.3/11.3.2/11.3.2-2-1-s.js index f40c73ac1a..0e5d6a705d 100644 --- a/test/suite/ch11/11.3/11.3.2/11.3.2-2-1-s.js +++ b/test/suite/ch11/11.3/11.3.2/11.3.2-2-1-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.3/11.3.2/11.3.2-2-1-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appear as a PostfixExpression(arguments--) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("arguments--;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.2-2-1-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appear as a PostfixExpression(arguments--) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("arguments--;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.3/11.3.2/11.3.2-2-2-s.js b/test/suite/ch11/11.3/11.3.2/11.3.2-2-2-s.js index 09c186fd3b..27761e51b1 100644 --- a/test/suite/ch11/11.3/11.3.2/11.3.2-2-2-s.js +++ b/test/suite/ch11/11.3/11.3.2/11.3.2-2-2-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.3/11.3.2/11.3.2-2-2-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appear as a PostfixExpression(eval--) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("eval--;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.2-2-2-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appear as a PostfixExpression(eval--) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("eval--;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.3/11.3.2/11.3.2-2-3-s.js b/test/suite/ch11/11.3/11.3.2/11.3.2-2-3-s.js index 6eb43dbbd5..c36d2ce9d2 100644 --- a/test/suite/ch11/11.3/11.3.2/11.3.2-2-3-s.js +++ b/test/suite/ch11/11.3/11.3.2/11.3.2-2-3-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.3/11.3.2/11.3.2-2-3-s.js - * @description Strict Mode - SyntaxError is not thrown if the identifier 'arguments[...]' appears as a PostfixExpression(arguments--) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - arguments[1] = 7; - arguments[1]--; - return arguments[1]===6; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.3.2-2-3-s +description: > + Strict Mode - SyntaxError is not thrown if the identifier + 'arguments[...]' appears as a PostfixExpression(arguments--) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + arguments[1] = 7; + arguments[1]--; + return arguments[1]===6; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T1.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T1.js index 2fe2120bf3..a6df2dbf95 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T1.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "--" is not allowed - * - * @path ch11/11.3/11.3.2/S11.3.2_A1.1_T1.js - * @description Checking Line Feed - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "--" is not allowed +es5id: 11.3.2_A1.1_T1 +description: Checking Line Feed +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u000A--"); - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T2.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T2.js index 49654288ae..08a84af4ba 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T2.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "--" is not allowed - * - * @path ch11/11.3/11.3.2/S11.3.2_A1.1_T2.js - * @description Checking Carriage Return - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "--" is not allowed +es5id: 11.3.2_A1.1_T2 +description: Checking Carriage Return +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u000D--"); - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T3.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T3.js index 5e0af0e99a..0dcbd04766 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T3.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T3.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "--" is not allowed - * - * @path ch11/11.3/11.3.2/S11.3.2_A1.1_T3.js - * @description Checking Page separator - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "--" is not allowed +es5id: 11.3.2_A1.1_T3 +description: Checking Page separator +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u2028--"); - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T4.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T4.js index e7d54a741e..fe1ea374fa 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T4.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.1_T4.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Line Terminator between LeftHandSideExpression and "--" is not allowed - * - * @path ch11/11.3/11.3.2/S11.3.2_A1.1_T4.js - * @description Checking Line separator - * @negative - */ +/*--- +info: Line Terminator between LeftHandSideExpression and "--" is not allowed +es5id: 11.3.2_A1.1_T4 +description: Checking Line separator +flags: [negative] +---*/ //CHECK#1 eval("var x = 1; x\u2029--"); - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.2_T1.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.2_T1.js index 8140d2b8e9..8bedcdfb92 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.2_T1.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space between LeftHandSideExpression and "--" are allowed - * - * @path ch11/11.3/11.3.2/S11.3.2_A1.2_T1.js - * @description Checking by using eval - */ +/*--- +info: White Space between LeftHandSideExpression and "--" are allowed +es5id: 11.3.2_A1.2_T1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("var x = 0; x\u0009--; x") !== -1) { @@ -37,4 +36,3 @@ if (eval("var x = 0; x\u00A0--; x") !== -1) { if (eval("var x = 0; x\u0009\u000B\u000C\u0020\u00A0--; x") !== -1) { $ERROR('#6: var x = 0; x\\u0009\\u000B\\u000C\\u0020\\u00A0--; x === -1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T1.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T1.js index b665af599e..732343ee0a 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T1.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- uses GetValue and PutValue - * - * @path ch11/11.3/11.3.2/S11.3.2_A2.1_T1.js - * @description Type(x) is Reference and GetBase(x) is not null - */ +/*--- +info: Operator x-- uses GetValue and PutValue +es5id: 11.3.2_A2.1_T1 +description: Type(x) is Reference and GetBase(x) is not null +---*/ //CHECK#1 var x = 1; @@ -38,4 +37,3 @@ if (object.prop-- !== 1) { $ERROR('#3: var object = new Object(); object.prop = 1; object.prop--; object.prop === 1 - 1. Actual: ' + (object.prop)); } } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T2.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T2.js index cae6d80b58..b625674ea4 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T2.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- uses GetValue and PutValue - * - * @path ch11/11.3/11.3.2/S11.3.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x-- uses GetValue and PutValue +es5id: 11.3.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x-- throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T3.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T3.js index adcf758c36..3897f319aa 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T3.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.1_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- uses GetValue and PutValue - * - * @path ch11/11.3/11.3.2/S11.3.2_A2.1_T3.js - * @description If Type(x) is not Reference, throw ReferenceError (or SyntaxError) - * @negative - */ +/*--- +info: Operator x-- uses GetValue and PutValue +es5id: 11.3.2_A2.1_T3 +description: If Type(x) is not Reference, throw ReferenceError (or SyntaxError) +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +20,3 @@ catch (e) { 1--; } } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.2_T1.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.2_T1.js index 22f31a1faa..fe5213c5dd 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.2_T1.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- uses [[Default Value]] - * - * @path ch11/11.3/11.3.2/S11.3.2_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x-- uses [[Default Value]] +es5id: 11.3.2_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -107,4 +106,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object-- throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T1.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T1.js index d35aeffc5b..1cabd4431f 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T1.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns x = ToNumber(x) - 1 - * - * @path ch11/11.3/11.3.2/S11.3.2_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator x-- returns x = ToNumber(x) - 1 +es5id: 11.3.2_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = true; @@ -21,4 +20,3 @@ x--; if (x !== 0 - 1) { $ERROR('#2: var x = new Boolean(false); x--; x === 0 - 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T2.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T2.js index cf1435a4c3..da89df5a72 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T2.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns x = ToNumber(x) - 1 - * - * @path ch11/11.3/11.3.2/S11.3.2_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator x-- returns x = ToNumber(x) - 1 +es5id: 11.3.2_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 1.1; @@ -21,4 +20,3 @@ x--; if (x !== -0.1 - 1) { $ERROR('#2: var x = new Number(-0.1); x--; x === -0.1 - 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T3.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T3.js index 63108752b6..9799ba1981 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T3.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns x = ToNumber(x) - 1 - * - * @path ch11/11.3/11.3.2/S11.3.2_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator x-- returns x = ToNumber(x) - 1 +es5id: 11.3.2_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -28,4 +27,3 @@ x--; if (x !== -1 - 1) { $ERROR('#3: var x = new String("-1"); x--; x === -1 - 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T4.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T4.js index ea248bfb04..7489a7f90e 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T4.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns x = ToNumber(x) - 1 - * - * @path ch11/11.3/11.3.2/S11.3.2_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator x-- returns x = ToNumber(x) - 1 +es5id: 11.3.2_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -21,4 +20,3 @@ x--; if (x !== -1) { $ERROR('#2: var x = null; x--; x === -1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T5.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T5.js index b571f0654d..a806a5051e 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T5.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns x = ToNumber(x) - 1 - * - * @path ch11/11.3/11.3.2/S11.3.2_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator x-- returns x = ToNumber(x) - 1 +es5id: 11.3.2_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -21,4 +20,3 @@ x--; if (isNaN(x) !== true) { $ERROR('#2: var x = function(){return 1}; x--; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T1.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T1.js index 4d07e77e4f..773a645ace 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T1.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns ToNumber(x) - * - * @path ch11/11.3/11.3.2/S11.3.2_A4_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator x-- returns ToNumber(x) +es5id: 11.3.2_A4_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = true; @@ -21,4 +20,3 @@ var y = x--; if (y !== 0) { $ERROR('#2: var x = new Boolean(false); var y = x--; y === 0. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T2.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T2.js index eb5c3bcdee..cd836d3f98 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T2.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns ToNumber(x) - * - * @path ch11/11.3/11.3.2/S11.3.2_A4_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator x-- returns ToNumber(x) +es5id: 11.3.2_A4_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 1.1; @@ -21,4 +20,3 @@ var y = x--; if (y !== -0.1) { $ERROR('#2: var x = new Number(-0.1); var y = x--; y === -0.1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T3.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T3.js index 8a4edfca82..be91a65d95 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T3.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns ToNumber(x) - * - * @path ch11/11.3/11.3.2/S11.3.2_A4_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator x-- returns ToNumber(x) +es5id: 11.3.2_A4_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -28,4 +27,3 @@ var y = x--; if (y !== -1) { $ERROR('#3: var x = new String("-1"); var y = x--; y === -1. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T4.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T4.js index add21d32a4..03a14b6891 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T4.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns ToNumber(x) - * - * @path ch11/11.3/11.3.2/S11.3.2_A4_T4.js - * @description If Type(x) is undefined or null - */ +/*--- +info: Operator x-- returns ToNumber(x) +es5id: 11.3.2_A4_T4 +description: If Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -21,4 +20,3 @@ var y = x--; if (y !== 0) { $ERROR('#2: var x = null; var y = x--; y === 0. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T5.js b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T5.js index aa68565684..1d3fee150c 100644 --- a/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T5.js +++ b/test/suite/ch11/11.3/11.3.2/S11.3.2_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x-- returns ToNumber(x) - * - * @path ch11/11.3/11.3.2/S11.3.2_A4_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator x-- returns ToNumber(x) +es5id: 11.3.2_A4_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -21,4 +20,3 @@ var y = x--; if (isNaN(y) !== true) { $ERROR('#2: var x = function(){return 1}; var y = x--; y === Not-a-Number. Actual: ' + (y)); } - diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-0-1.js b/test/suite/ch11/11.4/11.4.1/11.4.1-0-1.js index 2a3407dd54..b1e924387c 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-0-1.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-0-1.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-0-1.js - * @description delete operator as UnaryExpression - */ - - -function testcase() { - var x = 1; - var y = 2; - var z = 3; - - if( (!delete x || delete y) && - delete delete z) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-0-1 +description: delete operator as UnaryExpression +includes: [runTestCase.js] +---*/ + +function testcase() { + var x = 1; + var y = 2; + var z = 3; + + if( (!delete x || delete y) && + delete delete z) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-2-1.js b/test/suite/ch11/11.4/11.4.1/11.4.1-2-1.js index 223de50d55..742fc5e9ae 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-2-1.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-2-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-2-1.js - * @description delete operator returns true when deleting a non-reference (number) - */ - - -function testcase() { - var d = delete 42; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-2-1 +description: delete operator returns true when deleting a non-reference (number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = delete 42; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-2-2.js b/test/suite/ch11/11.4/11.4.1/11.4.1-2-2.js index eed36f4c53..f5efd06962 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-2-2.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-2-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-2-2.js - * @description delete operator returns true when deleting returned value from a function - */ - - -function testcase() { - var bIsFooCalled = false; - var foo = function(){bIsFooCalled = true;}; - - var d = delete foo(); - if(d === true && bIsFooCalled === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-2-2 +description: > + delete operator returns true when deleting returned value from a + function +includes: [runTestCase.js] +---*/ + +function testcase() { + var bIsFooCalled = false; + var foo = function(){bIsFooCalled = true;}; + + var d = delete foo(); + if(d === true && bIsFooCalled === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-2-3.js b/test/suite/ch11/11.4/11.4.1/11.4.1-2-3.js index 5d8fc9bce4..6821dfa5ee 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-2-3.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-2-3.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-2-3.js - * @description delete operator returns true when deleting a non-reference (boolean) - */ - - -function testcase() { - var d = delete true; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-2-3 +description: > + delete operator returns true when deleting a non-reference + (boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = delete true; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-2-4.js b/test/suite/ch11/11.4/11.4.1/11.4.1-2-4.js index 3da8745994..83cc963a9c 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-2-4.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-2-4.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-2-4.js - * @description delete operator returns true when deleting a non-reference (string) - */ - - -function testcase() { - var d = delete "abc"; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-2-4 +description: delete operator returns true when deleting a non-reference (string) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = delete "abc"; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-2-5.js b/test/suite/ch11/11.4/11.4.1/11.4.1-2-5.js index ae32bebce2..f3c24f2dc2 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-2-5.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-2-5.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-2-5.js - * @description delete operator returns true when deleting a non-reference (obj) - */ - - -function testcase() { - var d = delete {a:0} ; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-2-5 +description: delete operator returns true when deleting a non-reference (obj) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = delete {a:0} ; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-2-6.js b/test/suite/ch11/11.4/11.4.1/11.4.1-2-6.js index bcee797c28..8730a0bd1b 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-2-6.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-2-6.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-2-6.js - * @description delete operator returns true when deleting a non-reference (null) - */ - - -function testcase() { - var d = delete null; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-2-6 +description: delete operator returns true when deleting a non-reference (null) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = delete null; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-3-1.js b/test/suite/ch11/11.4/11.4.1/11.4.1-3-1.js index 9ae2580642..1da46b3767 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-3-1.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-3-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-3-1.js - * @description delete operator returns true when deleting an unresolvable reference - */ - - -function testcase() { - // just cooking up a long/veryLikely unique name - var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_0__; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-3-1 +description: > + delete operator returns true when deleting an unresolvable + reference +includes: [runTestCase.js] +---*/ + +function testcase() { + // just cooking up a long/veryLikely unique name + var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_0__; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-3-2.js b/test/suite/ch11/11.4/11.4.1/11.4.1-3-2.js index fefff30718..f87c71d878 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-3-2.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-3-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-3-2.js - * @description delete operator throws ReferenceError when deleting an explicitly qualified yet unresolvable reference (base obj undefined) - */ - - -function testcase() { - // just cooking up a long/veryLikely unique name - try - { - var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_2__.x; - } - catch(e) - { - if (e instanceof ReferenceError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-3-2 +description: > + delete operator throws ReferenceError when deleting an explicitly + qualified yet unresolvable reference (base obj undefined) +includes: [runTestCase.js] +---*/ + +function testcase() { + // just cooking up a long/veryLikely unique name + try + { + var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_2__.x; + } + catch(e) + { + if (e instanceof ReferenceError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-3-3.js b/test/suite/ch11/11.4/11.4.1/11.4.1-3-3.js index 1f70cca924..9ed39061ba 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-3-3.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-3-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-3-3.js - * @description delete operator returns true when deleting an explicitly qualified yet unresolvable reference (property undefined for base obj) - */ - - -function testcase() { - var __ES3_1_test_suite_test_11_4_1_3_unique_id_3__ = {}; - var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_3__.x; - if (d === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-3-3 +description: > + delete operator returns true when deleting an explicitly qualified + yet unresolvable reference (property undefined for base obj) +includes: [runTestCase.js] +---*/ + +function testcase() { + var __ES3_1_test_suite_test_11_4_1_3_unique_id_3__ = {}; + var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_3__.x; + if (d === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-3-a-1-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-3-a-1-s.js index 7172421d00..aed870888c 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-3-a-1-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-3-a-1-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-3-a-1-s.js - * @description Strict Mode - SyntaxError is thrown when deleting an un-resolvable reference - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete obj"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-3-a-1-s +description: > + Strict Mode - SyntaxError is thrown when deleting an un-resolvable + reference +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete obj"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-1-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-1-s.js index 82c586a1f8..c81303756e 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-1-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-1-s.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-4-a-1-s.js - * @description Strict Mode - TypeError is thrown when deleting non-configurable data property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: "abc", - configurable: false - }); - - try { - delete obj.prop; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === "abc"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-4-a-1-s +description: > + Strict Mode - TypeError is thrown when deleting non-configurable + data property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: "abc", + configurable: false + }); + + try { + delete obj.prop; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === "abc"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-2-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-2-s.js index 135f012954..a5bfbe929b 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-2-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-2-s.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-4-a-2-s.js - * @description Strict Mode - TypeError is thrown when deleting non-configurable accessor property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return "abc"; - }, - configurable: false - }); - - try { - delete obj.prop; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === "abc"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-4-a-2-s +description: > + Strict Mode - TypeError is thrown when deleting non-configurable + accessor property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return "abc"; + }, + configurable: false + }); + + try { + delete obj.prop; + return false; + } catch (e) { + return e instanceof TypeError && obj.prop === "abc"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-3-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-3-s.js index 85bc8b2d70..27b1730051 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-3-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-3-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-4-a-3-s.js - * @description Strict Mode - TypeError isn't thrown when deleting configurable data property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - value: "abc", - configurable: true - }); - - delete obj.prop; - return !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-4-a-3-s +description: > + Strict Mode - TypeError isn't thrown when deleting configurable + data property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + value: "abc", + configurable: true + }); + + delete obj.prop; + return !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-4-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-4-s.js index 6ce81cfbca..61a189320e 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-4-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4-a-4-s.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-4-a-4-s.js - * @description Strict Mode - TypeError isn't thrown when deleting configurable accessor property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = {}; - Object.defineProperty(obj, "prop", { - get: function () { - return "abc"; - }, - configurable: true - }); - - delete obj.prop; - return !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-4-a-4-s +description: > + Strict Mode - TypeError isn't thrown when deleting configurable + accessor property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = {}; + Object.defineProperty(obj, "prop", { + get: function () { + return "abc"; + }, + configurable: true + }); + + delete obj.prop; + return !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-1.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-1.js index 0ed36af96b..10e5a0d9d8 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-1.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-1.js - * @description delete operator returns true when deleting a configurable data property - */ - - -function testcase() { - var o = {}; - - var desc = { value: 1, configurable: true }; - Object.defineProperty(o, "foo", desc); - - var d = delete o.foo; - if (d === true && o.hasOwnProperty("foo") === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-1 +description: > + delete operator returns true when deleting a configurable data + property +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + var desc = { value: 1, configurable: true }; + Object.defineProperty(o, "foo", desc); + + var d = delete o.foo; + if (d === true && o.hasOwnProperty("foo") === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-10.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-10.js index 7a515d725d..19c73ec367 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-10.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-10.js - * @description delete operator returns true for property (stringify) defined on built-in object (JSON) - */ - - -function testcase() { - try { - var o = JSON.stringify; - var desc; - try { - desc = Object.getOwnPropertyDescriptor(JSON, 'stringify') - } - catch (e) { - }; - var d = delete JSON.stringify; - if (d === true && JSON.stringify === undefined) { - return true; - } - } finally { - if (desc) Object.defineProperty(JSON, 'stringify', desc) - else JSON.stringify = o /* this branch messes up the attributes */; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-10 +description: > + delete operator returns true for property (stringify) defined on + built-in object (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var o = JSON.stringify; + var desc; + try { + desc = Object.getOwnPropertyDescriptor(JSON, 'stringify') + } + catch (e) { + }; + var d = delete JSON.stringify; + if (d === true && JSON.stringify === undefined) { + return true; + } + } finally { + if (desc) Object.defineProperty(JSON, 'stringify', desc) + else JSON.stringify = o /* this branch messes up the attributes */; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-11.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-11.js index b46af9f740..0cc425d629 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-11.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-11.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-11.js - * @description delete operator returns true on deleting arguments propterties(arguments.callee) - */ - - -function testcase() { - function foo(a,b) - { - return (delete arguments.callee); - } - var d = delete arguments.callee; - if(d === true && arguments.callee === undefined) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-11 +description: > + delete operator returns true on deleting arguments + propterties(arguments.callee) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(a,b) + { + return (delete arguments.callee); + } + var d = delete arguments.callee; + if(d === true && arguments.callee === undefined) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-12.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-12.js index 5cc30983c5..b1b1e2ac43 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-12.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-12.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-12.js - * @description delete operator returns false when deleting a property(length) - */ - - -function testcase() { - - var a = [1,2,3] - a.x = 10; - var d = delete a.length - if(d === false && a.length === 3) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-12 +description: delete operator returns false when deleting a property(length) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var a = [1,2,3] + a.x = 10; + var d = delete a.length + if(d === false && a.length === 3) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-13.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-13.js index 5156957ed1..680341179f 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-13.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-13.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-13.js - * @description delete operator returns false when deleting Array object - */ - - -function testcase() { - - var a = [1,2,3] - a.x = 10; - - var d = delete a - - if(d === false && Array.isArray(a) === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-13 +description: delete operator returns false when deleting Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var a = [1,2,3] + a.x = 10; + + var d = delete a + + if(d === false && Array.isArray(a) === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-14.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-14.js index 288d25ec06..5a11863e63 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-14.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-14.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-14.js - * @description delete operator returns true when deleting Array elements - */ - - -function testcase() { - - var a = [1,2,3] - a.x = 10; - var d = delete a[1] - if(d === true && a[1] === undefined) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-14 +description: delete operator returns true when deleting Array elements +includes: [runTestCase.js] +---*/ + +function testcase() { + + var a = [1,2,3] + a.x = 10; + var d = delete a[1] + if(d === true && a[1] === undefined) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-15.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-15.js index 98a6d6c083..3aacb9f09d 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-15.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-15.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-15.js - * @description delete operator returns true when deleting Array expandos - */ - - -function testcase() { - - var a = [1,2,3] - a.x = 10; - var d = delete a.x; - if( d === true && a.x === undefined) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-15 +description: delete operator returns true when deleting Array expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var a = [1,2,3] + a.x = 10; + var d = delete a.x; + if( d === true && a.x === undefined) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-16.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-16.js index 01873811ff..0b716d7cad 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-16.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-16.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-16.js - * @description delete operator returns false on deleting arguments object - */ - - -function testcase() { - - if(delete arguments === false && arguments !== undefined) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-16 +description: delete operator returns false on deleting arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + if(delete arguments === false && arguments !== undefined) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-17.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-17.js index 97f0e0ab92..03dbd22146 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-17.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-17.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-17.js - * @description delete operator returns true on deleting a arguments element - */ - - -function testcase() { - function foo(a,b) - { - var d = delete arguments[0]; - return (d === true && arguments[0] === undefined); - } - - if(foo(1,2) === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-17 +description: delete operator returns true on deleting a arguments element +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(a,b) + { + var d = delete arguments[0]; + return (d === true && arguments[0] === undefined); + } + + if(foo(1,2) === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-2.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-2.js index be165f1f10..a7c999a201 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-2.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-2.js - * @description delete operator returns true when deleting a configurable accessor property - */ - - -function testcase() { - var o = {}; - - // define an accessor - // dummy getter - var getter = function () { return 1; } - var desc = { get: getter, configurable: true }; - Object.defineProperty(o, "foo", desc); - - var d = delete o.foo; - if (d === true && o.hasOwnProperty("foo") === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-2 +description: > + delete operator returns true when deleting a configurable accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // define an accessor + // dummy getter + var getter = function () { return 1; } + var desc = { get: getter, configurable: true }; + Object.defineProperty(o, "foo", desc); + + var d = delete o.foo; + if (d === true && o.hasOwnProperty("foo") === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3-s.js index 85e5c23db4..9d33ad326d 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3-s.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-3-s.js - * @description delete operator throws TypeError when deleting a non-configurable data property in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - var o = {}; - var desc = { value : 1 }; // all other attributes default to false - Object.defineProperty(o, "foo", desc); - - // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false. - try { - delete o.foo; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-3-s +description: > + delete operator throws TypeError when deleting a non-configurable + data property in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + var o = {}; + var desc = { value : 1 }; // all other attributes default to false + Object.defineProperty(o, "foo", desc); + + // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false. + try { + delete o.foo; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3.js index 25f9bc7d05..eea4bd84ec 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-3.js - * @description delete operator returns false when deleting a non-configurable data property - */ - - -function testcase() { - var o = {}; - var desc = { value : 1, configurable: false }; // all other attributes default to false - Object.defineProperty(o, "foo", desc); - - // Now, deleting o.foo should fail because [[Configurable]] on foo is false. - var d = delete o.foo; - if (d === false && o.hasOwnProperty("foo") === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-3 +description: > + delete operator returns false when deleting a non-configurable + data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + var desc = { value : 1, configurable: false }; // all other attributes default to false + Object.defineProperty(o, "foo", desc); + + // Now, deleting o.foo should fail because [[Configurable]] on foo is false. + var d = delete o.foo; + if (d === false && o.hasOwnProperty("foo") === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-4.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-4.js index 98f2496f9f..736e70f441 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-4.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-4.js - * @description delete operator returns false when deleting a non-configurable data property (NaN) - */ - - -function testcase() { - // NaN (15.1.1.1) has [[Configurable]] set to false. - var d = delete NaN; - if (d === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-4 +description: > + delete operator returns false when deleting a non-configurable + data property (NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + // NaN (15.1.1.1) has [[Configurable]] set to false. + var d = delete NaN; + if (d === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-5.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-5.js index 0585bb3c49..723f10dce0 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-5.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-5.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-5.js - * @description delete operator returns false when deleting the environment object inside 'with' - */ - - -function testcase() { - var o = new Object(); - o.x = 1; - var d; - with(o) - { - d = delete o; - } - if (d === false && typeof(o) === 'object' && o.x === 1) { - return true; - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-5 +description: > + delete operator returns false when deleting the environment object + inside 'with' +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = new Object(); + o.x = 1; + var d; + with(o) + { + d = delete o; + } + if (d === false && typeof(o) === 'object' && o.x === 1) { + return true; + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-6.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-6.js index a5194837fe..c940630fdd 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-6.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-6.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-6.js - * @description delete operator returns true when deleting a property inside 'with' - */ - - -function testcase() { - var o = new Object(); - o.x = 1; - var d; - with(o) - { - d = delete x; - } - if (d === true && o.x === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-6 +description: delete operator returns true when deleting a property inside 'with' +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = new Object(); + o.x = 1; + var d; + with(o) + { + d = delete x; + } + if (d === true && o.x === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-7.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-7.js index 85bbe995db..3379e544e3 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-7.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-7.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-7.js - * @description delete operator inside 'eval' - */ - - -function testcase() { - var x = 1; - var d = eval("delete x"); - if (d === false && x === 1) { - return true; - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-7 +description: delete operator inside 'eval' +includes: [runTestCase.js] +---*/ + +function testcase() { + var x = 1; + var d = eval("delete x"); + if (d === false && x === 1) { + return true; + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8-s.js index c73f8d8331..85df8b19ac 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8-s.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-8-s.js - * @description delete operator throws TypeError when deleting a non-configurable data property in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - // NaN (15.1.1.1) has [[Configurable]] set to false. - try { - delete fnGlobalObject().NaN; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-8-s +description: > + delete operator throws TypeError when deleting a non-configurable + data property in strict mode +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + 'use strict'; + + // NaN (15.1.1.1) has [[Configurable]] set to false. + try { + delete fnGlobalObject().NaN; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8.js index 0d6da1a800..4b28f9c84d 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-8.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-8.js - * @description delete operator returns true for built-in objects (JSON) - */ - - -function testcase() { - try { - var o = JSON; - var d = delete JSON; - if (d === true) { - return true; - } - } finally { - JSON = o; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-8 +description: delete operator returns true for built-in objects (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var o = JSON; + var d = delete JSON; + if (d === true) { + return true; + } + } finally { + JSON = o; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9-s.js index da7a464bac..5fa558657e 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9-s.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-9-s.js - * @description delete operator throws TypeError when deleting a non-configurable data property (Math.LN2) in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - delete Math.LN2; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-9-s +description: > + delete operator throws TypeError when deleting a non-configurable + data property (Math.LN2) in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + delete Math.LN2; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9.js b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9.js index 472fdc0c81..e690954c74 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-4.a-9.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.1-4.a-9.js - * @description delete operator returns false when deleting a non-configurable data property (Math.LN2) - */ - - -function testcase() { - var d = delete Math.LN2; - if (d === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.1-4.a-9 +description: > + delete operator returns false when deleting a non-configurable + data property (Math.LN2) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = delete Math.LN2; + if (d === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-1.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-1.js index c4de1ba6f9..cde7ae1ced 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-1.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-1.js - * @description delete operator returns false when deleting a direct reference to a var - */ - - -function testcase() { - var x = 1; - - // Now, deleting 'x' directly should fail; - var d = delete x; - if(d === false && x === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-1 +description: > + delete operator returns false when deleting a direct reference to + a var +includes: [runTestCase.js] +---*/ + +function testcase() { + var x = 1; + + // Now, deleting 'x' directly should fail; + var d = delete x; + if(d === false && x === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-2.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-2.js index 838b653b1c..bdfc64b396 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-2.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-2.js - * @description delete operator returns false when deleting a direct reference to a function argument - */ - - -function testcase() { - - function foo(a,b) { - - // Now, deleting 'a' directly should fail - // because 'a' is direct reference to a function argument; - var d = delete a; - return (d === false && a === 1); - } - return foo(1,2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-2 +description: > + delete operator returns false when deleting a direct reference to + a function argument +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo(a,b) { + + // Now, deleting 'a' directly should fail + // because 'a' is direct reference to a function argument; + var d = delete a; + return (d === false && a === 1); + } + return foo(1,2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-3.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-3.js index 33efcdb3ef..bff19aad08 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-3.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-3.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-3.js - * @description delete operator returns false when deleting a direct reference to a function name - */ - - -function testcase() { - var foo = function(){}; - - // Now, deleting 'foo' directly should fail; - var d = delete foo; - if(d === false && fnExists(foo)) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-3 +description: > + delete operator returns false when deleting a direct reference to + a function name +includes: + - runTestCase.js + - fnExists.js +---*/ + +function testcase() { + var foo = function(){}; + + // Now, deleting 'foo' directly should fail; + var d = delete foo; + if(d === false && fnExists(foo)) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-1-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-1-s.js index 3235f6affe..8995f4c6dc 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-1-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-1-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-1-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive value type (number) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_4_1_5 = 5; - - try { - eval("delete _11_4_1_5;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-1-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable which + is a primitive value type (number) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_4_1_5 = 5; + + try { + eval("delete _11_4_1_5;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-10-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-10-s.js index 6d614fb990..a21488c719 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-10-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-10-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-10-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Array - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var arrObj = [1,2,3]; - - try { - eval("delete arrObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-10-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Array +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var arrObj = [1,2,3]; + + try { + eval("delete arrObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-11-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-11-s.js index 328b4926fd..0ba3d1ce36 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-11-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-11-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-11-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type String - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var strObj = new String("abc"); - - try { - eval("delete strObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-11-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type String +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var strObj = new String("abc"); + + try { + eval("delete strObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-12-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-12-s.js index e09226b1d4..a57ae7d355 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-12-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-12-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-12-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Boolean - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var boolObj = new Boolean(false); - - try { - eval("delete boolObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-12-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Boolean +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var boolObj = new Boolean(false); + + try { + eval("delete boolObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-13-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-13-s.js index 008466068e..a31c1d4cf2 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-13-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-13-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-13-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Number - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var numObj = new Number(0); - - try { - eval("delete numObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-13-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Number +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var numObj = new Number(0); + + try { + eval("delete numObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-14-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-14-s.js index 8d6770b27f..8ab4e72f3d 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-14-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-14-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-14-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Date - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var dateObj = new Date(); - - try { - eval("delete dateObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-14-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Date +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var dateObj = new Date(); + + try { + eval("delete dateObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-15-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-15-s.js index 3ce568c6a6..4cf6425d35 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-15-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-15-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-15-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type RegExp - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var regObj = new RegExp(); - - try { - eval("delete regObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-15-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type RegExp +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var regObj = new RegExp(); + + try { + eval("delete regObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-16-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-16-s.js index 0edd4401fa..8d46e415e0 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-16-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-16-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-16-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Error - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var errObj = new Error(); - - try { - eval("delete errObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-16-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Error +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var errObj = new Error(); + + try { + eval("delete errObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-17-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-17-s.js index 2cb8fedefb..606480f934 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-17-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-17-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-17-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("var argObj = (function (a, b) { delete arguments; }(1, 2));"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-17-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("var argObj = (function (a, b) { delete arguments; }(1, 2));"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-18-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-18-s.js index d26819ff74..d5f771ac46 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-18-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-18-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-18-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Object) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete Object;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-18-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (Object) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete Object;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-19-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-19-s.js index c45a701b05..d3be0f1f75 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-19-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-19-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-19-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Function) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete Function;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-19-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (Function) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete Function;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-2-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-2-s.js index aa5290faa5..0fdae27045 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-2-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-2-s.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-2-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a function parameter - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function funObj(x) { - eval("delete x;"); - } - - try { - funObj(1); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-2-s +description: > + Strict Mode - SyntaxError is thrown when deleting a function + parameter +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function funObj(x) { + eval("delete x;"); + } + + try { + funObj(1); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-20-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-20-s.js index cf683589c0..6268b9d787 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-20-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-20-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-20-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Array) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete Array;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-20-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (Array) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete Array;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-21-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-21-s.js index 994e6ff961..866610eda9 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-21-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-21-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-21-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (String) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete String;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-21-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (String) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete String;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-22-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-22-s.js index 341062b037..fed93f2e61 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-22-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-22-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-22-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Boolean) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete Boolean;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-22-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (Boolean) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete Boolean;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-23-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-23-s.js index b0302df8b3..11a50206e8 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-23-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-23-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-23-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Number) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete Number;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-23-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (Number) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete Number;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-24-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-24-s.js index 0f03df1a70..815d39fbc5 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-24-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-24-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-24-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Date) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete Date;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-24-s +description: Strict Mode - SyntaxError is thrown when deleting a built-in (Date) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete Date;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-25-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-25-s.js index 0f418645a5..ba9a1b3ad7 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-25-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-25-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-25-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (RegExp) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("delete RegExp;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-25-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (RegExp) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("delete RegExp;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-26-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-26-s.js index 62ed21fc39..42e0896bc6 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-26-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-26-s.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-26-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a built-in (Error) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var errorBackup = Error; - try { - eval("delete Error;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } finally { - Error = errorBackup; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-26-s +description: > + Strict Mode - SyntaxError is thrown when deleting a built-in + (Error) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var errorBackup = Error; + try { + eval("delete Error;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } finally { + Error = errorBackup; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-27-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-27-s.js index 4dacb29bd9..50c12a58cd 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-27-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-27-s.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-27-s.js - * @description Strict Mode - TypeError is thrown after deleting a property, calling preventExtensions, and attempting to reassign the property - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var a = {x:0, get y() { return 0;}}; - delete a.x; - Object.preventExtensions(a); - try { - a.x = 1; - return false; - } catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-27-s +description: > + Strict Mode - TypeError is thrown after deleting a property, + calling preventExtensions, and attempting to reassign the property +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var a = {x:0, get y() { return 0;}}; + delete a.x; + Object.preventExtensions(a); + try { + a.x = 1; + return false; + } catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-28-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-28-s.js index 4a5e015c33..845599fa7b 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-28-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-28-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-28-s.js - * @description Strict Mode - TypeError is thrown when deleting RegExp.length - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var a = new RegExp(); - try { - var b = delete RegExp.length; - return false; - } catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-28-s +description: Strict Mode - TypeError is thrown when deleting RegExp.length +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var a = new RegExp(); + try { + var b = delete RegExp.length; + return false; + } catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-3-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-3-s.js index 3c1e183901..1ce91e5d1f 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-3-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-3-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-3-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a function name - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function funObj () { } - - try { - eval("delete funObj"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-3-s +description: Strict Mode - SyntaxError is thrown when deleting a function name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function funObj () { } + + try { + eval("delete funObj"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-4-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-4-s.js index 55bca492bf..f27a4e4f92 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-4-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-4-s.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-4-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a function parameter - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function funObj(x, y, z) { - eval("delete y;"); - } - - try { - funObj(1); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-4-s +description: > + Strict Mode - SyntaxError is thrown when deleting a function + parameter +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function funObj(x, y, z) { + eval("delete y;"); + } + + try { + funObj(1); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5-s.js index 4e72bc9178..3ead231648 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-5-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive type (boolean) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_4_1_5 = true; - - try { - eval("delete _11_4_1_5;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-5-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable which + is a primitive type (boolean) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_4_1_5 = true; + + try { + eval("delete _11_4_1_5;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5gs.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5gs.js index ed126f6686..1498dc497f 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5gs.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-5gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-5gs.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable which is primitive type(boolean) - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -var _11_4_1_5 = 7; -throw NotEarlyError; -delete _11_4_1_5; \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-5gs +description: > + Strict Mode - SyntaxError is thrown when deleting a variable which + is primitive type(boolean) +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +var _11_4_1_5 = 7; +throw NotEarlyError; +delete _11_4_1_5; diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-6-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-6-s.js index f428dfeb68..80770eb502 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-6-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-6-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-6-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive type (string) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _11_4_1_5 = "abc"; - - try { - eval("delete _11_4_1_5;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-6-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable which + is a primitive type (string) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _11_4_1_5 = "abc"; + + try { + eval("delete _11_4_1_5;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-7-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-7-s.js index 090276fd70..3754c694c9 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-7-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-7-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-7-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type Object - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var obj = new Object(); - - try { - eval("delete obj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-7-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type Object +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var obj = new Object(); + + try { + eval("delete obj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-8-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-8-s.js index 3116d6bc79..ef1b5aebe4 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-8-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-8-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-8-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a function object - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var funObj = function () { }; - - try { - eval("delete funObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-8-s +description: Strict Mode - SyntaxError is thrown when deleting a function object +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var funObj = function () { }; + + try { + eval("delete funObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-9-s.js b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-9-s.js index 45b626551e..92067ac024 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-9-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-9-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.1/11.4.1-5-a-9-s.js - * @description Strict Mode - SyntaxError is thrown when deleting a variable of type function (declaration) - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function funObj () { }; - - try { - eval("delete funObj;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.1-5-a-9-s +description: > + Strict Mode - SyntaxError is thrown when deleting a variable of + type function (declaration) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function funObj () { }; + + try { + eval("delete funObj;"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/11.4.4-4.a-3-s.js b/test/suite/ch11/11.4/11.4.1/11.4.4-4.a-3-s.js index 109216dea8..ec7b9c343e 100644 --- a/test/suite/ch11/11.4/11.4.1/11.4.4-4.a-3-s.js +++ b/test/suite/ch11/11.4/11.4.1/11.4.4-4.a-3-s.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test is actually testing the [[Delete]] internal method (8.12.8). Since the - * language provides no way to directly exercise [[Delete]], the tests are placed here. - * - * @path ch11/11.4/11.4.1/11.4.4-4.a-3-s.js - * @description delete operator throws TypeError when deleting a non-configurable data property in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - var o = {}; - var desc = { value : 1 }; // all other attributes default to false - Object.defineProperty(o, "foo", desc); - - // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false. - try { - delete o.foo; - return false; - } - catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test is actually testing the [[Delete]] internal method (8.12.8). Since the + language provides no way to directly exercise [[Delete]], the tests are placed here. +es5id: 11.4.4-4.a-3-s +description: > + delete operator throws TypeError when deleting a non-configurable + data property in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + var o = {}; + var desc = { value : 1 }; // all other attributes default to false + Object.defineProperty(o, "foo", desc); + + // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false. + try { + delete o.foo; + return false; + } + catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A1.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A1.js index 35764288fb..91c69d4b34 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A1.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "delete" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.1/S11.4.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "delete" and UnaryExpression are + allowed +es5id: 11.4.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("delete\u00090") !== true) { @@ -57,4 +58,3 @@ if (eval("delete\u20290") !== true) { if (eval("delete\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20290") !== true) { $ERROR('#10: delete\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290 === true'); } - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.1.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.1.js index b993e4a9dc..e1b2a255b8 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.1.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is not Reference, return true - * - * @path ch11/11.4/11.4.1/S11.4.1_A2.1.js - * @description Checking primitive value and Object value cases - */ +/*--- +info: If Type(x) is not Reference, return true +es5id: 11.4.1_A2.1 +description: Checking primitive value and Object value cases +---*/ //CHECK#1 if (delete 1 !== true) { @@ -17,5 +16,3 @@ if (delete 1 !== true) { if (delete new Object() !== true) { $ERROR('#2: delete new Object() === true'); } - - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T1.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T1.js index 97fd109398..333d1e0502 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If GetBase(x) doesn't have a property GetPropertyName(x), return true - * - * @path ch11/11.4/11.4.1/S11.4.1_A2.2_T1.js - * @description Checking undeclared variable case - */ +/*--- +info: If GetBase(x) doesn't have a property GetPropertyName(x), return true +es5id: 11.4.1_A2.2_T1 +description: Checking undeclared variable case +---*/ //CHECK#1 if (delete x !== true) { @@ -17,4 +16,3 @@ if (delete x !== true) { if (delete this.x !== true) { $ERROR('#2: delete this.x === true'); } - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T2.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T2.js index e5c0cbe54c..b90b056bc5 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T2.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If GetBase(x) doesn't have a property GetPropertyName(x), return true - * - * @path ch11/11.4/11.4.1/S11.4.1_A2.2_T2.js - * @description Checking Object object and Function object cases - */ +/*--- +info: If GetBase(x) doesn't have a property GetPropertyName(x), return true +es5id: 11.4.1_A2.2_T2 +description: Checking Object object and Function object cases +---*/ //CHECK#1 function MyFunction(){} @@ -20,4 +19,3 @@ var MyObject = new Object(); if (delete MyObject.prop !== true) { $ERROR('#2: var MyObject = new Object(); delete MyObject.prop === true'); } - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.1.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.1.js index b1edccca90..d60cb66e21 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.1.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the property has the DontDelete attribute, return false - * - * @path ch11/11.4/11.4.1/S11.4.1_A3.1.js - * @description Checking declared variable - */ +/*--- +info: If the property has the DontDelete attribute, return false +es5id: 11.4.1_A3.1 +description: Checking declared variable +---*/ //CHECK#1 var x = 1; @@ -37,4 +36,3 @@ if (delete MyObject !== false) { if (delete MyObject !== false) { $ERROR('#5: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false'); } - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.2.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.2.js index bee0911838..d912b3d1a3 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.2.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the property doesn't have the DontDelete attribute, return true - * - * @path ch11/11.4/11.4.1/S11.4.1_A3.2.js - * @description Checking declared variable - */ +/*--- +info: If the property doesn't have the DontDelete attribute, return true +es5id: 11.4.1_A3.2 +description: Checking declared variable +---*/ //CHECK#1 x = 1; @@ -28,4 +27,3 @@ MyObject.prop = 1; if (delete MyObject.prop !== true) { $ERROR('#3: function MyFunction(){}; var MyObject = new MyFunction(); MyFunction.prop = 1; delete MyObject.prop === true'); } - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.3.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.3.js index e396ee626c..913e346834 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.3.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A3.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the property doesn't have the DontDelete attribute, remove the property - * - * @path ch11/11.4/11.4.1/S11.4.1_A3.3.js - * @description Checking declared variable - */ +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3 +description: Checking declared variable +---*/ //CHECK#1 try { @@ -57,5 +56,3 @@ if (MyObjectNotVar.prop !== undefined) { if (delete MyObjectNotVar !== true) { $ERROR('#6: function MyFunction(){}; var MyObjectNotVar = new MyFunction(); delete MyObjectNotVar === true'); } - - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A4.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A4.js index a534ce9592..cb2ee1a7a8 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A4.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "Delete" operator removes property, which is reference to the object, not the object - * - * @path ch11/11.4/11.4.1/S11.4.1_A4.js - * @description Checking two reference by one object - */ +/*--- +info: > + "Delete" operator removes property, which is reference to the object, not + the object +es5id: 11.4.1_A4 +description: Checking two reference by one object +---*/ //CHECK#1 var obj = new Object(); @@ -15,5 +16,3 @@ delete ref; if (typeof obj !== "object") { $ERROR('#1: obj = new Object(); ref = obj; delete ref; typeof obj === "object". Actual: ' + (typeof obj)); } - - diff --git a/test/suite/ch11/11.4/11.4.1/S11.4.1_A5.js b/test/suite/ch11/11.4/11.4.1/S11.4.1_A5.js index 2fd5f5243b..5f6a26b6bb 100644 --- a/test/suite/ch11/11.4/11.4.1/S11.4.1_A5.js +++ b/test/suite/ch11/11.4/11.4.1/S11.4.1_A5.js @@ -1,16 +1,17 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A strict delete should either succeed, returning true, or it - * should fail by throwing a TypeError. Under no circumstances - * should a strict delete return false. - * - * @path ch11/11.4/11.4.1/S11.4.1_A5.js - * @description See if a strict delete returns false when deleting a - * non-standard property. - * @onlyStrict - */ +/*--- +info: > + A strict delete should either succeed, returning true, or it + should fail by throwing a TypeError. Under no circumstances + should a strict delete return false. +es5id: 11.4.1_A5 +description: > + See if a strict delete returns false when deleting a non-standard + property. +flags: [onlyStrict] +---*/ "use strict"; @@ -32,4 +33,3 @@ for (var i = 0, len = reNames.length; i < len; i++) { } } } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A1.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A1.js index 6211fc2427..dd3040bd3c 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A1.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "void" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.2/S11.4.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "void" and UnaryExpression are + allowed +es5id: 11.4.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("void\u00090") !== undefined) { @@ -57,4 +58,3 @@ if (eval("void\u20290") !== undefined) { if (eval("void\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20290") !== undefined) { $ERROR('#10: void\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290 === undefined'); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T1.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T1.js index bb2ba2a9db..8ffac8f717 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T1.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" uses GetValue - * - * @path ch11/11.4/11.4.2/S11.4.2_A2_T1.js - * @description Either Type(x) is not Reference or GetBase(x) is not null - */ +/*--- +info: Operator "void" uses GetValue +es5id: 11.4.2_A2_T1 +description: Either Type(x) is not Reference or GetBase(x) is not null +---*/ //CHECK#1 if (void 0 !== undefined) { @@ -24,4 +23,3 @@ var x = new Object(); if (void x !== undefined) { $ERROR('#3: var x = new Object(); void x === undefined. Actual: ' + (void x)); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T2.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T2.js index a6074837ae..dc65118cbe 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T2.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A2_T2.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" uses GetValue - * - * @path ch11/11.4/11.4.2/S11.4.2_A2_T2.js - * @description If GetBase(x) is null, throw ReferenceError - * @negative - */ +/*--- +info: Operator "void" uses GetValue +es5id: 11.4.2_A2_T2 +description: If GetBase(x) is null, throw ReferenceError +flags: [negative] +---*/ //CHECK#1 void x; - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T1.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T1.js index 169eeb6c80..a95e606f24 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T1.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" evaluates UnaryExpression and returns undefined - * - * @path ch11/11.4/11.4.2/S11.4.2_A4_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator "void" evaluates UnaryExpression and returns undefined +es5id: 11.4.2_A4_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = false; @@ -19,4 +18,3 @@ var x = new Boolean(true); if (void x !== undefined) { $ERROR('#2: var x = new Boolean(true); void x === undefined. Actual: ' + (void x)); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T2.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T2.js index 0175474af5..f5dee25cd0 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T2.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" evaluates UnaryExpression and returns undefined - * - * @path ch11/11.4/11.4.2/S11.4.2_A4_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator "void" evaluates UnaryExpression and returns undefined +es5id: 11.4.2_A4_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 0.1; @@ -19,4 +18,3 @@ var x = new Number(-1.1); if (void x !== undefined) { $ERROR('#2: var x = new Number(-1.1); void x === undefined. Actual: ' + (void x)); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T3.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T3.js index 884b84af49..b08f8e433c 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T3.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" evaluates UnaryExpression and returns undefined - * - * @path ch11/11.4/11.4.2/S11.4.2_A4_T3.js - * @description Type(x) is string primitive of String object - */ +/*--- +info: Operator "void" evaluates UnaryExpression and returns undefined +es5id: 11.4.2_A4_T3 +description: Type(x) is string primitive of String object +---*/ //CHECK#1 var x = "1"; @@ -25,4 +24,3 @@ var x = new String("-1"); if (void x !== undefined) { $ERROR('#3: var x = new String("-1"); void x === undefined. Actual: ' + (void x)); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T4.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T4.js index d6da818548..80a51fe0f6 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T4.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" evaluates UnaryExpression and returns undefined - * - * @path ch11/11.4/11.4.2/S11.4.2_A4_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator "void" evaluates UnaryExpression and returns undefined +es5id: 11.4.2_A4_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -19,4 +18,3 @@ var x = null; if (void x !== undefined) { $ERROR('#2: var x = null; void x === undefined. Actual: ' + (void x)); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T5.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T5.js index 2be1def156..83aca909e9 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T5.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" evaluates UnaryExpression and returns undefined - * - * @path ch11/11.4/11.4.2/S11.4.2_A4_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator "void" evaluates UnaryExpression and returns undefined +es5id: 11.4.2_A4_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -19,4 +18,3 @@ var x = function(){return 1}; if (isNaN(void x) !== true) { $ERROR('#2: var x = function(){return 1}; void x === undefined. Actual: ' + (void x)); } - diff --git a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T6.js b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T6.js index 40c184cbe8..8debe49536 100644 --- a/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T6.js +++ b/test/suite/ch11/11.4/11.4.2/S11.4.2_A4_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "void" evaluates UnaryExpression and returns undefined - * - * @path ch11/11.4/11.4.2/S11.4.2_A4_T6.js - * @description Checking Simple Assignment operator - */ +/*--- +info: Operator "void" evaluates UnaryExpression and returns undefined +es5id: 11.4.2_A4_T6 +description: Checking Simple Assignment operator +---*/ //CHECK#1 var x = 0; @@ -17,4 +16,3 @@ if (void (x = 1) !== undefined) { $ERROR('#1: var x = 0; void (x = 1); x === 1. Actual: ' + (x)); } } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A1.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A1.js index 5021bab91b..526d97b129 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A1.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "typeof" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.3/S11.4.3_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "typeof" and UnaryExpression are + allowed +es5id: 11.4.3_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("var x = 0; typeof\u0009x") !== "number") { @@ -57,4 +58,3 @@ if (eval("var x = 0; typeof\u2029x") !== "number") { if (eval("var x = 0; typeof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x") !== "number") { $ERROR('#10: var x = 0; typeof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === "number". Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T1.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T1.js index 02217c3330..df5ed3bf32 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T1.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "typeof" uses GetValue - * - * @path ch11/11.4/11.4.3/S11.4.3_A2_T1.js - * @description Either Type(x) is not Reference or GetBase(x) is not null - */ +/*--- +info: Operator "typeof" uses GetValue +es5id: 11.4.3_A2_T1 +description: Either Type(x) is not Reference or GetBase(x) is not null +---*/ //CHECK#1 if (typeof 0 !== "number") { @@ -24,4 +23,3 @@ var x = new Object(); if (typeof x !== "object") { $ERROR('#3: var x = new Object(); typeof x === "object". Actual: ' + (typeof x)); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T2.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T2.js index 4030c1257d..8538132646 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T2.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A2_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "typeof" uses GetValue - * - * @path ch11/11.4/11.4.3/S11.4.3_A2_T2.js - * @description If GetBase(x) is null, return "undefined" - */ +/*--- +info: Operator "typeof" uses GetValue +es5id: 11.4.3_A2_T2 +description: If GetBase(x) is null, return "undefined" +---*/ //CHECK#1 if (typeof x !== "undefined") { $ERROR('#1: typeof x === "undefined". Actual: ' + (typeof x)); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.1.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.1.js index 1609ad326d..92e556f076 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.1.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of applying "typeof" operator to undefined is "undefined" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.1.js - * @description typeof undefined === "undefined" - */ +/*--- +info: Result of applying "typeof" operator to undefined is "undefined" +es5id: 11.4.3_A3.1 +description: typeof undefined === "undefined" +---*/ //CHECK#1 if (typeof undefined !== "undefined") { @@ -17,4 +16,3 @@ if (typeof undefined !== "undefined") { if (typeof void 0 !== "undefined") { $ERROR('#2: typeof void 0 === "undefined". Actual: ' + (typeof void 0)); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.2.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.2.js index 94353f5573..d38d1dfbea 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.2.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of applying "typeof" operator to null is "object" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.2.js - * @description typeof null === "object" - */ +/*--- +info: Result of applying "typeof" operator to null is "object" +es5id: 11.4.3_A3.2 +description: typeof null === "object" +---*/ //CHECK#1 if (typeof null !== "object") { @@ -17,4 +16,3 @@ if (typeof null !== "object") { if (typeof RegExp("0").exec("1") !== "object") { $ERROR('#2: typeof RegExp("0").exec("1") === "object". Actual: ' + (typeof RegExp("0").exec("1"))); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.3.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.3.js index 70dcf3ec65..fa6970ae71 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.3.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of applying "typeof" operator to boolean is "boolean" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.3.js - * @description typeof (boolean value) === "boolean" - */ +/*--- +info: Result of applying "typeof" operator to boolean is "boolean" +es5id: 11.4.3_A3.3 +description: typeof (boolean value) === "boolean" +---*/ //CHECK#1 if (typeof true !== "boolean") { @@ -22,4 +21,3 @@ if (typeof false !== "boolean") { if (typeof !-1 !== "boolean") { $ERROR('#3: typeof !-1 === "boolean". Actual: ' + (typeof !-1)); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.4.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.4.js index e1444e9f5a..d039646a70 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.4.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of appying "typeof" operator to number is "number" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.4.js - * @description typeof (number value) === "number" - */ +/*--- +info: Result of appying "typeof" operator to number is "number" +es5id: 11.4.3_A3.4 +description: typeof (number value) === "number" +---*/ //CHECK#1 if (typeof 1 !== "number") { @@ -32,4 +31,3 @@ if (typeof Number.NEGATIVE_INFINITY !== "number") { if (typeof Math.PI !== "number") { $ERROR('#5: typeof Math.PI === "number". Actual: ' + (typeof Math.PI)); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.5.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.5.js index f1c07acd1e..ac9b23bebb 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.5.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of appying "typeof" operator to string is "string" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.5.js - * @description typeof (string value) === "string" - */ +/*--- +info: Result of appying "typeof" operator to string is "string" +es5id: 11.4.3_A3.5 +description: typeof (string value) === "string" +---*/ //CHECK#1 if (typeof "1" !== "string") { @@ -37,4 +36,3 @@ if (typeof "true" !== "string") { if (typeof Date() !== "string") { $ERROR('#6: typeof Date() === "string". Actual: ' + (typeof Date())); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.6.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.6.js index feab82ac69..5d209b9391 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.6.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of applying "typeof" operator to the object that is native and doesn't implement [[Call]] is "object" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.6.js - * @description typeof (object without [[Call]]) === "object" - */ +/*--- +info: > + Result of applying "typeof" operator to the object that is native and + doesn't implement [[Call]] is "object" +es5id: 11.4.3_A3.6 +description: typeof (object without [[Call]]) === "object" +---*/ //CHECK#1 if (typeof this !== "object") { @@ -70,4 +71,3 @@ if (typeof new RegExp() !== "object") { if (typeof RegExp() !== "object") { $ERROR('#12: typeof RegExp() === "object". Actual: ' + (typeof RegExp())); } - diff --git a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.7.js b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.7.js index 66282799a1..de81dc941a 100644 --- a/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.7.js +++ b/test/suite/ch11/11.4/11.4.3/S11.4.3_A3.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Result of applying "typeof" operator to the object that is native and implements [[Call]] is "function" - * - * @path ch11/11.4/11.4.3/S11.4.3_A3.7.js - * @description typeof (object with [[Call]]) === "function" - */ +/*--- +info: > + Result of applying "typeof" operator to the object that is native and + implements [[Call]] is "function" +es5id: 11.4.3_A3.7 +description: typeof (object with [[Call]]) === "function" +---*/ //CHECK#1 if (typeof new Function() !== "function") { @@ -52,4 +53,3 @@ if (typeof Error !== "function") { if (typeof RegExp !== "function") { $ERROR('#9: typeof RegExp === "function". Actual: ' + (typeof RegExp)); } - diff --git a/test/suite/ch11/11.4/11.4.4/11.4.4-2-1-s.js b/test/suite/ch11/11.4/11.4.4/11.4.4-2-1-s.js index f7e9b82de3..25eff96980 100644 --- a/test/suite/ch11/11.4/11.4.4/11.4.4-2-1-s.js +++ b/test/suite/ch11/11.4/11.4.4/11.4.4-2-1-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.4/11.4.4-2-1-s.js - * @description Strict Mode - SyntaxError is thrown for ++eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("++eval;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.4-2-1-s +description: Strict Mode - SyntaxError is thrown for ++eval +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("++eval;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.4/11.4.4-2-2-s.js b/test/suite/ch11/11.4/11.4.4/11.4.4-2-2-s.js index 142adabef5..3864594aca 100644 --- a/test/suite/ch11/11.4/11.4.4/11.4.4-2-2-s.js +++ b/test/suite/ch11/11.4/11.4.4/11.4.4-2-2-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.4/11.4.4-2-2-s.js - * @description Strict Mode - SyntaxError is thrown for ++arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("++arguments;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.4-2-2-s +description: Strict Mode - SyntaxError is thrown for ++arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("++arguments;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.4/11.4.4-2-3-s.js b/test/suite/ch11/11.4/11.4.4/11.4.4-2-3-s.js index 00d6448e32..1030ae553d 100644 --- a/test/suite/ch11/11.4/11.4.4/11.4.4-2-3-s.js +++ b/test/suite/ch11/11.4/11.4.4/11.4.4-2-3-s.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.4/11.4.4-2-3-s.js - * @description Strict Mode - SyntaxError is not thrown for ++arguments[...] - * @onlyStrict - */ - - -function testcase() { - "use strict"; - arguments[1] = 7; - ++arguments[1]; - return arguments[1]===8; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.4-2-3-s +description: Strict Mode - SyntaxError is not thrown for ++arguments[...] +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + arguments[1] = 7; + ++arguments[1]; + return arguments[1]===8; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A1.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A1.js index 1a6f53940a..09920a88f2 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A1.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "++" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.4/S11.4.4_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "++" and UnaryExpression are + allowed +es5id: 11.4.4_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("var x = 0; ++\u0009x") !== 1) { @@ -57,4 +58,3 @@ if (eval("var x = 0; ++\u2029x") !== 1) { if (eval("var x = 0; ++\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x") !== 1) { $ERROR('#10: var x = 0; ++\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T1.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T1.js index 253e2a9702..50bb87835f 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T1.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x uses GetValue and PutValue - * - * @path ch11/11.4/11.4.4/S11.4.4_A2.1_T1.js - * @description Type(x) is Reference and GetBase(x) is not null - */ +/*--- +info: Operator ++x uses GetValue and PutValue +es5id: 11.4.4_A2.1_T1 +description: Type(x) is Reference and GetBase(x) is not null +---*/ //CHECK#1 var x = 1; @@ -38,4 +37,3 @@ if (++object.prop !== 1 + 1) { $ERROR('#3: var object = new Object(); object.prop = 1; ++object.prop; object.prop === 1 + 1. Actual: ' + (object.prop)); } } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T2.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T2.js index a67137e4b2..942dc56fde 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T2.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x uses GetValue and PutValue - * - * @path ch11/11.4/11.4.4/S11.4.4_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator ++x uses GetValue and PutValue +es5id: 11.4.4_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: ++x throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T3.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T3.js index 7faa4d81f2..72ed452f47 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T3.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.1_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x uses GetValue and PutValue - * - * @path ch11/11.4/11.4.4/S11.4.4_A2.1_T3.js - * @description If Type(x) is not Reference, throw ReferenceError (or SyntaxError) - * @negative - */ +/*--- +info: Operator ++x uses GetValue and PutValue +es5id: 11.4.4_A2.1_T3 +description: If Type(x) is not Reference, throw ReferenceError (or SyntaxError) +flags: [negative] +---*/ //CHECK#1 try { @@ -21,5 +20,3 @@ catch (e) { ++1; } } - - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.2_T1.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.2_T1.js index bdc909df11..a6e633b271 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x uses [[Default Value]] - * - * @path ch11/11.4/11.4.4/S11.4.4_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator ++x uses [[Default Value]] +es5id: 11.4.4_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -101,4 +100,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ++object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T1.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T1.js index 9c41505c96..0cf5987827 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T1.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns x = ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator ++x returns x = ToNumber(x) + 1 +es5id: 11.4.4_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = false; @@ -21,4 +20,3 @@ var x = new Boolean(true); if (x !== 1 + 1) { $ERROR('#2: var x = new Boolean(true); ++x; x === 1 + 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T2.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T2.js index 52296a9488..e08f04ef1f 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T2.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns x = ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator ++x returns x = ToNumber(x) + 1 +es5id: 11.4.4_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 0.1; @@ -21,4 +20,3 @@ var x = new Number(-1.1); if (x !== -1.1 + 1) { $ERROR('#2: var x = new Number(-1.1); ++x; x === -1.1 + 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T3.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T3.js index aee3607dd5..10a012a865 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T3.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns x = ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator ++x returns x = ToNumber(x) + 1 +es5id: 11.4.4_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -28,4 +27,3 @@ var x = new Number("-1"); if (x !== -1 + 1) { $ERROR('#3: var x = new String("-1"); ++x; x === -1 + 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T4.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T4.js index 89619003e2..e2813937c4 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T4.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns x = ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator ++x returns x = ToNumber(x) + 1 +es5id: 11.4.4_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -21,4 +20,3 @@ var x = null; if (x !== 1) { $ERROR('#2: var x = null; ++x; x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T5.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T5.js index d08522f726..6ae090402b 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T5.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns x = ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator ++x returns x = ToNumber(x) + 1 +es5id: 11.4.4_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -21,4 +20,3 @@ var x = function(){return 1}; if (isNaN(x) !== true) { $ERROR('#2: var x = function(){return 1}; ++x; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T1.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T1.js index 585e75091b..d80c01f9d4 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T1.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A4_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator ++x returns ToNumber(x) + 1 +es5id: 11.4.4_A4_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = false; @@ -19,4 +18,3 @@ var x = new Boolean(true); if (++x !== 1 + 1) { $ERROR('#2: var x = new Boolean(true); ++x === 1 + 1. Actual: ' + (++x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T2.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T2.js index 3aacac1b8f..ab88b03826 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T2.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A4_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator ++x returns ToNumber(x) + 1 +es5id: 11.4.4_A4_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 0.1; @@ -19,4 +18,3 @@ var x = new Number(-1.1); if (++x !== -1.1 + 1) { $ERROR('#2: var x = new Number(-1.1); ++x === -1.1 + 1. Actual: ' + (++x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T3.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T3.js index 4e2d5f22ad..bbf8136af5 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T3.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A4_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator ++x returns ToNumber(x) + 1 +es5id: 11.4.4_A4_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -25,4 +24,3 @@ var x = new String("-1"); if (++x !== -1 + 1) { $ERROR('#3: var x = new String("-1"); ++x === -1 + 1. Actual: ' + (++x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T4.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T4.js index f0edb536eb..857db225e5 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T4.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A4_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator ++x returns ToNumber(x) + 1 +es5id: 11.4.4_A4_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -19,4 +18,3 @@ var x = null; if (++x !== 1) { $ERROR('#2: var x = null; ++x === 1. Actual: ' + (++x)); } - diff --git a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T5.js b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T5.js index c6c9d526ac..388dcb4a0e 100644 --- a/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T5.js +++ b/test/suite/ch11/11.4/11.4.4/S11.4.4_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ++x returns ToNumber(x) + 1 - * - * @path ch11/11.4/11.4.4/S11.4.4_A4_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator ++x returns ToNumber(x) + 1 +es5id: 11.4.4_A4_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -19,4 +18,3 @@ var x = function(){return 1}; if (isNaN(++x) !== true) { $ERROR('#2: var x = function(){return 1}; ++x === Not-a-Number. Actual: ' + (++x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/11.4.5-2-1-s.js b/test/suite/ch11/11.4/11.4.5/11.4.5-2-1-s.js index 2c0d4c1a17..e0aba2fb48 100644 --- a/test/suite/ch11/11.4/11.4.5/11.4.5-2-1-s.js +++ b/test/suite/ch11/11.4/11.4.5/11.4.5-2-1-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.5/11.4.5-2-1-s.js - * @description Strict Mode - SyntaxError is thrown for --eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = eval; - try { - eval("--eval;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === eval; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.5-2-1-s +description: Strict Mode - SyntaxError is thrown for --eval +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = eval; + try { + eval("--eval;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === eval; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.5/11.4.5-2-2-s.js b/test/suite/ch11/11.4/11.4.5/11.4.5-2-2-s.js index 373dabe9e2..3f68d5b308 100644 --- a/test/suite/ch11/11.4/11.4.5/11.4.5-2-2-s.js +++ b/test/suite/ch11/11.4/11.4.5/11.4.5-2-2-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.5/11.4.5-2-2-s.js - * @description Strict Mode - SyntaxError is thrown for --arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var blah = arguments; - try { - eval("--arguments;"); - return false; - } catch (e) { - return e instanceof SyntaxError && blah === arguments; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.5-2-2-s +description: Strict Mode - SyntaxError is thrown for --arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var blah = arguments; + try { + eval("--arguments;"); + return false; + } catch (e) { + return e instanceof SyntaxError && blah === arguments; + } + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.5/11.4.5-2-2gs.js b/test/suite/ch11/11.4/11.4.5/11.4.5-2-2gs.js index 3040d80299..2779698e9e 100644 --- a/test/suite/ch11/11.4/11.4.5/11.4.5-2-2gs.js +++ b/test/suite/ch11/11.4/11.4.5/11.4.5-2-2gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch11/11.4/11.4.5/11.4.5-2-2gs.js - * @description Strict Mode - SyntaxError is throw if the UnaryExpression operated upon by a Prefix Increment operator(--arguments) - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; ---arguments; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.5-2-2gs +description: > + Strict Mode - SyntaxError is throw if the UnaryExpression operated + upon by a Prefix Increment operator(--arguments) +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +--arguments; diff --git a/test/suite/ch11/11.4/11.4.5/11.4.5-2-3-s.js b/test/suite/ch11/11.4/11.4.5/11.4.5-2-3-s.js index 9af3f7bcb0..e37fd53acf 100644 --- a/test/suite/ch11/11.4/11.4.5/11.4.5-2-3-s.js +++ b/test/suite/ch11/11.4/11.4.5/11.4.5-2-3-s.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.5/11.4.5-2-3-s.js - * @description Strict Mode - SyntaxError is not thrown for --arguments[...] - * @onlyStrict - */ - - -function testcase() { - "use strict"; - arguments[1] = 7; - --arguments[1]; - return arguments[1]===6; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.5-2-3-s +description: Strict Mode - SyntaxError is not thrown for --arguments[...] +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + arguments[1] = 7; + --arguments[1]; + return arguments[1]===6; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A1.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A1.js index 5be2493ee1..f2f8eda61c 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A1.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "--" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.5/S11.4.5_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "--" and UnaryExpression are + allowed +es5id: 11.4.5_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("var x = 1; --\u0009x") !== 0) { @@ -57,4 +58,3 @@ if (eval("var x = 1; --\u2029x") !== 0) { if (eval("var x = 1; --\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x") !== 0) { $ERROR('#10: var x = 1; --\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === 0. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T1.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T1.js index 136b72c51c..e354362a8b 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T1.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x uses GetValue and PutValue - * - * @path ch11/11.4/11.4.5/S11.4.5_A2.1_T1.js - * @description Type(x) is Reference and GetBase(x) is not null - */ +/*--- +info: Operator --x uses GetValue and PutValue +es5id: 11.4.5_A2.1_T1 +description: Type(x) is Reference and GetBase(x) is not null +---*/ //CHECK#1 var x = 1; @@ -38,4 +37,3 @@ if (--object.prop !== 1 - 1) { $ERROR('#3: var object = new Object(); object.prop = 1; --object.prop; object.prop === 1 - 1. Actual: ' + (object.prop)); } } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T2.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T2.js index 2dabef9758..aa84dd6cd6 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T2.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x uses GetValue and PutValue - * - * @path ch11/11.4/11.4.5/S11.4.5_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator --x uses GetValue and PutValue +es5id: 11.4.5_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: --x throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T3.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T3.js index 5700185b92..e0f0449ff0 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T3.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.1_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x uses GetValue and PutValue - * - * @path ch11/11.4/11.4.5/S11.4.5_A2.1_T3.js - * @description If Type(x) is not Reference, throw ReferenceError (or SyntaxError) - * @negative - */ +/*--- +info: Operator --x uses GetValue and PutValue +es5id: 11.4.5_A2.1_T3 +description: If Type(x) is not Reference, throw ReferenceError (or SyntaxError) +flags: [negative] +---*/ //CHECK#1 try { @@ -21,4 +20,3 @@ catch (e) { --1; } } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js index 6f19db9db2..00d5e7b9bd 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x uses [[Default Value]] - * - * @path ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator --x uses [[Default Value]] +es5id: 11.4.5_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -101,4 +100,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; --object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T1.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T1.js index f7fd9fc7b5..4ebc8047fa 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T1.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns x = ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator --x returns x = ToNumber(x) - 1 +es5id: 11.4.5_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = true; @@ -21,4 +20,3 @@ var x = new Boolean(false); if (x !== 0 - 1) { $ERROR('#2: var x = new Boolean(false); --x; x === 0 - 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T2.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T2.js index a946e86483..fec0baa0fc 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T2.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns x = ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator --x returns x = ToNumber(x) - 1 +es5id: 11.4.5_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 0.1; @@ -21,4 +20,3 @@ var x = new Number(-1.1); if (x !== -1.1 - 1) { $ERROR('#2: var x = new Number(-1.1); --x; x === -1.1 - 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T3.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T3.js index 6ed487073d..aff50fba4f 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T3.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns x = ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A3_T3.js - * @description Type(x) is primitive string or String object - */ +/*--- +info: Operator --x returns x = ToNumber(x) - 1 +es5id: 11.4.5_A3_T3 +description: Type(x) is primitive string or String object +---*/ //CHECK#1 var x = "1"; @@ -28,4 +27,3 @@ var x = new Number("-1"); if (x !== -1 - 1) { $ERROR('#3: var x = new String("-1"); --x; x === -1 - 1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T4.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T4.js index ed0d7798b9..cae5c32b0a 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T4.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns x = ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator --x returns x = ToNumber(x) - 1 +es5id: 11.4.5_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -21,4 +20,3 @@ var x = null; if (x !== -1) { $ERROR('#2: var x = null; --x; x === -1. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T5.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T5.js index 0fd3f76acd..0d3af4bbd3 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T5.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns x = ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator --x returns x = ToNumber(x) - 1 +es5id: 11.4.5_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -21,4 +20,3 @@ var x = function(){return 1}; if (isNaN(x) !== true) { $ERROR('#2: var x = function(){return 1}; --x; x === Not-a-Number. Actual: ' + (x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T1.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T1.js index 7f424a2393..2cb606edd2 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T1.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A4_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator --x returns ToNumber(x) - 1 +es5id: 11.4.5_A4_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 var x = true; @@ -19,4 +18,3 @@ var x = new Boolean(false); if (--x !== 0 - 1) { $ERROR('#2: var x = new Boolean(false); --x === 0 - 1. Actual: ' + (--x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T2.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T2.js index c5c77de06d..b52ddb2aaa 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T2.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A4_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator --x returns ToNumber(x) - 1 +es5id: 11.4.5_A4_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 var x = 0.1; @@ -19,4 +18,3 @@ var x = new Number(-1.1); if (--x !== -1.1 - 1) { $ERROR('#2: var x = new Number(-1.1); --x === -1.1- 1. Actual: ' + (--x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T3.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T3.js index 29d4d123f3..3f9df41503 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T3.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A4_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator --x returns ToNumber(x) - 1 +es5id: 11.4.5_A4_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 var x = "1"; @@ -25,4 +24,3 @@ var x = new String("-1"); if (--x !== -1 - 1) { $ERROR('#3: var x = new String("-1"); --x === -1 - 1. Actual: ' + (--x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T4.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T4.js index a1f600ace3..2324f81ca3 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T4.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A4_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator --x returns ToNumber(x) - 1 +es5id: 11.4.5_A4_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 var x; @@ -19,4 +18,3 @@ var x = null; if (--x !== -1) { $ERROR('#2: var x = null; --x === -1. Actual: ' + (--x)); } - diff --git a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T5.js b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T5.js index fe40976df9..a7b9052014 100644 --- a/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T5.js +++ b/test/suite/ch11/11.4/11.4.5/S11.4.5_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator --x returns ToNumber(x) - 1 - * - * @path ch11/11.4/11.4.5/S11.4.5_A4_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator --x returns ToNumber(x) - 1 +es5id: 11.4.5_A4_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 var x = {}; @@ -19,4 +18,3 @@ var x = function(){return 1}; if (isNaN(--x) !== true) { $ERROR('#2: var x = function(){return 1}; --x === Not-a-Number. Actual: ' + (--x)); } - diff --git a/test/suite/ch11/11.4/11.4.6/11.4.6-2-1.js b/test/suite/ch11/11.4/11.4.6/11.4.6-2-1.js index b4d785c183..814f10198c 100644 --- a/test/suite/ch11/11.4/11.4.6/11.4.6-2-1.js +++ b/test/suite/ch11/11.4/11.4.6/11.4.6-2-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.6/11.4.6-2-1.js - * @description +"" should be zero - */ - - -function testcase() { - return +"" === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.6-2-1 +description: +"" should be zero +includes: [runTestCase.js] +---*/ + +function testcase() { + return +"" === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A1.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A1.js index ac0f45a12b..5e6f8ac4bb 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A1.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "+" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.6/S11.4.6_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "+" and UnaryExpression are + allowed +es5id: 11.4.6_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("+\u00091") !== 1) { @@ -57,4 +58,3 @@ if (eval("+\u20291") !== 1) { if (eval("+\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 1) { $ERROR('#10: +\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 1'); } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T1.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T1.js index a3074769af..d2c57627c5 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T1.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x uses GetValue - * - * @path ch11/11.4/11.4.6/S11.4.6_A2.1_T1.js - * @description Either Type(x) is not Reference or GetBase(x) is not null - */ +/*--- +info: Operator +x uses GetValue +es5id: 11.4.6_A2.1_T1 +description: Either Type(x) is not Reference or GetBase(x) is not null +---*/ //CHECK#1 if (+1 !== 1) { @@ -36,4 +35,3 @@ object.prop = 1; if (+object.prop !== 1) { $ERROR('#5: var object = new Object(); object.prop = 1; +object.prop === 1. Actual: ' + (+object.prop)); } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T2.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T2.js index ab6aa9fe4d..e1bb0731e7 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T2.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x uses GetValue - * - * @path ch11/11.4/11.4.6/S11.4.6_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator +x uses GetValue +es5id: 11.4.6_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: +x throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.2_T1.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.2_T1.js index 78eb580bb0..69754427d4 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x uses [[Default Value]] - * - * @path ch11/11.4/11.4.6/S11.4.6_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator +x uses [[Default Value]] +es5id: 11.4.6_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; +object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T1.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T1.js index 7338942de7..93bc9e5732 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T1.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x returns ToNumber(x) - * - * @path ch11/11.4/11.4.6/S11.4.6_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator +x returns ToNumber(x) +es5id: 11.4.6_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 if (+false !== 0) { @@ -17,4 +16,3 @@ if (+false !== 0) { if (+new Boolean(true) !== 1) { $ERROR('#2: +new Boolean(true) === 1. Actual: ' + (+new Boolean(true))); } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T2.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T2.js index 86f537c642..a5dd098d0b 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T2.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x returns ToNumber(x) - * - * @path ch11/11.4/11.4.6/S11.4.6_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator +x returns ToNumber(x) +es5id: 11.4.6_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 if (+0.1 !== 0.1) { @@ -17,4 +16,3 @@ if (+0.1 !== 0.1) { if (+new Number(-1.1) !== -1.1) { $ERROR('#2: +new Number(-1.1) === -1.1. Actual: ' + (+new Number(-1.1))); } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T3.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T3.js index 36628861a0..da9b07e7c7 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T3.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x returns ToNumber(x) - * - * @path ch11/11.4/11.4.6/S11.4.6_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator +x returns ToNumber(x) +es5id: 11.4.6_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 if (+"1" !== 1) { @@ -22,4 +21,3 @@ if (isNaN(+"x") !== true) { if (+new Number("-1") !== -1) { $ERROR('#3: +new String("-1") === -1. Actual: ' + (+new String("-1"))); } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T4.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T4.js index 61b8533757..e7ef6b1c5a 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T4.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x returns ToNumber(x) - * - * @path ch11/11.4/11.4.6/S11.4.6_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator +x returns ToNumber(x) +es5id: 11.4.6_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 if (isNaN(+void 0) !== true) { @@ -17,4 +16,3 @@ if (isNaN(+void 0) !== true) { if (+null !== 0) { $ERROR('#2: +null === 0. Actual: ' + (+null)); } - diff --git a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T5.js b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T5.js index 9b56ff09f0..b6d971e43c 100644 --- a/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T5.js +++ b/test/suite/ch11/11.4/11.4.6/S11.4.6_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator +x returns ToNumber(x) - * - * @path ch11/11.4/11.4.6/S11.4.6_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator +x returns ToNumber(x) +es5id: 11.4.6_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 if (isNaN(+{}) !== true) { @@ -17,4 +16,3 @@ if (isNaN(+{}) !== true) { if (isNaN(+function(){return 1}) !== true) { $ERROR('#2: +function(){return 1} === Not-a-Number. Actual: ' + (+function(){return 1})); } - diff --git a/test/suite/ch11/11.4/11.4.7/11.4.7-4-1.js b/test/suite/ch11/11.4/11.4.7/11.4.7-4-1.js index 12d050866d..eb8f7fddf5 100644 --- a/test/suite/ch11/11.4/11.4.7/11.4.7-4-1.js +++ b/test/suite/ch11/11.4/11.4.7/11.4.7-4-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.4/11.4.7/11.4.7-4-1.js - * @description -"" should be zero - */ - - -function testcase() { - return -"" === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.4.7-4-1 +description: -"" should be zero +includes: [runTestCase.js] +---*/ + +function testcase() { + return -"" === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A1.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A1.js index 13234518b6..5e508ca74b 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A1.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "-" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.7/S11.4.7_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "-" and UnaryExpression are + allowed +es5id: 11.4.7_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("-\u00091") !== -1) { @@ -57,4 +58,3 @@ if (eval("-\u20291") !== -1) { if (eval("-\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== -1) { $ERROR('#10: -\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === -1'); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T1.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T1.js index 8b3c47a903..9e302237a7 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T1.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x uses GetValue - * - * @path ch11/11.4/11.4.7/S11.4.7_A2.1_T1.js - * @description Either Type(x) is not Reference or GetBase(x) is not null - */ +/*--- +info: Operator -x uses GetValue +es5id: 11.4.7_A2.1_T1 +description: Either Type(x) is not Reference or GetBase(x) is not null +---*/ //CHECK#1 if (-1 !== -1) { @@ -36,4 +35,3 @@ object.prop = 1; if (-object.prop !== -1) { $ERROR('#5: var object = new Object(); object.prop = -1; -object.prop === -1. Actual: ' + (-object.prop)); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T2.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T2.js index e7de28aa53..7c976a2b88 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T2.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x uses GetValue - * - * @path ch11/11.4/11.4.7/S11.4.7_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator -x uses GetValue +es5id: 11.4.7_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: -x throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.2_T1.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.2_T1.js index a9ad69e5c6..a9fb77c175 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x uses [[Default Value]] - * - * @path ch11/11.4/11.4.7/S11.4.7_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator -x uses [[Default Value]] +es5id: 11.4.7_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return -1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; -object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T1.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T1.js index f421d91333..4a4e7a95e6 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T1.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x returns -ToNumber(x) - * - * @path ch11/11.4/11.4.7/S11.4.7_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator -x returns -ToNumber(x) +es5id: 11.4.7_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 if (-false !== 0) { @@ -17,4 +16,3 @@ if (-false !== 0) { if (-new Boolean(true) !== -1) { $ERROR('#2: -new Boolean(true) === -1. Actual: ' + (-new Boolean(true))); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T2.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T2.js index 611683c12d..43893824a8 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T2.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x returns -ToNumber(x) - * - * @path ch11/11.4/11.4.7/S11.4.7_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator -x returns -ToNumber(x) +es5id: 11.4.7_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 if (-(1) !== -1) { @@ -17,4 +16,3 @@ if (-(1) !== -1) { if (-new Number(-1) !== 1) { $ERROR('#2: -new Number(-1) === 1. Actual: ' + (-new Number(-1))); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T3.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T3.js index 9a439804e4..6ffc5b2bbb 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T3.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x returns -ToNumber(x) - * - * @path ch11/11.4/11.4.7/S11.4.7_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator -x returns -ToNumber(x) +es5id: 11.4.7_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 if (-"1" !== -1) { @@ -22,4 +21,3 @@ if (isNaN(-"x") !== true) { if (-new String("-1") !== 1) { $ERROR('#3: -new String("-1") === 1. Actual: ' + (-new String("-1"))); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T4.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T4.js index 7fda40e953..86bc6eeff1 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T4.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x returns -ToNumber(x) - * - * @path ch11/11.4/11.4.7/S11.4.7_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator -x returns -ToNumber(x) +es5id: 11.4.7_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 if (isNaN(-void 0) !== true) { @@ -17,4 +16,3 @@ if (isNaN(-void 0) !== true) { if (-null !== 0) { $ERROR('#2: +null === 0. Actual: ' + (+null)); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T5.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T5.js index 426a4fd8b9..82d14abfa2 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T5.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator -x returns -ToNumber(x) - * - * @path ch11/11.4/11.4.7/S11.4.7_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator -x returns -ToNumber(x) +es5id: 11.4.7_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 if (isNaN(-{}) !== true) { @@ -17,4 +16,3 @@ if (isNaN(-{}) !== true) { if (isNaN(-function(){return 1}) !== true) { $ERROR('#2: -function(){return 1} === Not-a-Number. Actual: ' + (-function(){return 1})); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.1.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.1.js index e8d1dfe86f..49de7e8215 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.1.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, operator -x returns NaN - * - * @path ch11/11.4/11.4.7/S11.4.7_A4.1.js - * @description Checking NaN - */ +/*--- +info: If x is NaN, operator -x returns NaN +es5id: 11.4.7_A4.1 +description: Checking NaN +---*/ //CHECK#1 if (isNaN(-NaN) !== true) { @@ -18,4 +17,3 @@ var x = NaN; if (isNaN(-x) != true) { $ERROR('#2: var x = NaN; -x === Not-a-Number. Actual: ' + (-x)); } - diff --git a/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.2.js b/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.2.js index 8b39bd2491..70196289bd 100644 --- a/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.2.js +++ b/test/suite/ch11/11.4/11.4.7/S11.4.7_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Negating +0 produces -0, negating -0 produces +0 - * - * @path ch11/11.4/11.4.7/S11.4.7_A4.2.js - * @description Checking Infinity - */ +/*--- +info: Negating +0 produces -0, negating -0 produces +0 +es5id: 11.4.7_A4.2 +description: Checking Infinity +---*/ //CHECK#1 var x = 0; @@ -29,5 +28,3 @@ if (x !== 0) { $ERROR('#2.2: var x = -0; x = -x; x === + 0. Actual: -0'); } } - - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A1.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A1.js index 7a646edfd3..707ba07e7b 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A1.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "~" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.8/S11.4.8_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "~" and UnaryExpression are + allowed +es5id: 11.4.8_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("~\u00090") !== -1) { @@ -57,4 +58,3 @@ if (eval("~\u20290") !== -1) { if (eval("~\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20290") !== -1) { $ERROR('#10: ~\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290 === -1'); } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T1.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T1.js index 6dc44f7aec..aa1aacee2f 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T1.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x uses GetValue - * - * @path ch11/11.4/11.4.8/S11.4.8_A2.1_T1.js - * @description Either Type(x) is not Reference or GetBase(x) is not null - */ +/*--- +info: Operator ~x uses GetValue +es5id: 11.4.8_A2.1_T1 +description: Either Type(x) is not Reference or GetBase(x) is not null +---*/ //CHECK#1 if (~0 !== -1) { @@ -36,4 +35,3 @@ object.prop = 0; if (~object.prop !== -1) { $ERROR('#5: var object = new Object(); object.prop = 0; ~object.prop === -1. Actual: ' + (~object.prop)); } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T2.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T2.js index 3f53f46733..9ffd4c1a9b 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T2.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x uses GetValue - * - * @path ch11/11.4/11.4.8/S11.4.8_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator ~x uses GetValue +es5id: 11.4.8_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: ~x throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.2_T1.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.2_T1.js index 44b5e6127f..264001c912 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x uses [[Default Value]] - * - * @path ch11/11.4/11.4.8/S11.4.8_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator ~x uses [[Default Value]] +es5id: 11.4.8_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T1.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T1.js index 0958a05704..b1309100b6 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T1.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x returns ~ToInt32(x) - * - * @path ch11/11.4/11.4.8/S11.4.8_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator ~x returns ~ToInt32(x) +es5id: 11.4.8_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 if (~false !== -1) { @@ -22,4 +21,3 @@ if (~new Boolean(true) !== -2) { if (~new Boolean(false) !== -1) { $ERROR('#3: ~new Boolean(false) === -1. Actual: ' + (~new Boolean(false))); } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T2.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T2.js index a7b6d4bbc6..e4563cc802 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T2.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x returns ~ToInt32(x) - * - * @path ch11/11.4/11.4.8/S11.4.8_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator ~x returns ~ToInt32(x) +es5id: 11.4.8_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 if (~0.1 !== -1) { @@ -42,4 +41,3 @@ if (~new Number(-2) !== 1) { if (~Infinity !== -1) { $ERROR('#7: ~Infinity === -1. Actual: ' + (~Infinity)); } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T3.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T3.js index ec54ebd484..09034afcdf 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T3.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x returns ~ToInt32(x) - * - * @path ch11/11.4/11.4.8/S11.4.8_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator ~x returns ~ToInt32(x) +es5id: 11.4.8_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 if (~"1" !== -2) { @@ -32,4 +31,3 @@ if (~"" !== -1) { if (~new String("-2") !== 1) { $ERROR('#5: ~new String("-2") === 1. Actual: ' + (~new String("-2"))); } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T4.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T4.js index d8be652d4b..a54d3f2761 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T4.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x returns ~ToInt32(x) - * - * @path ch11/11.4/11.4.8/S11.4.8_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator ~x returns ~ToInt32(x) +es5id: 11.4.8_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 if (~void 0 !== -1) { @@ -17,4 +16,3 @@ if (~void 0 !== -1) { if (~null !== -1) { $ERROR('#2: ~null === -1. Actual: ' + (~null)); } - diff --git a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T5.js b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T5.js index 8fcfc740b7..83c27988ef 100644 --- a/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T5.js +++ b/test/suite/ch11/11.4/11.4.8/S11.4.8_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator ~x returns ~ToInt32(x) - * - * @path ch11/11.4/11.4.8/S11.4.8_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator ~x returns ~ToInt32(x) +es5id: 11.4.8_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 if (~({}) !== -1) { @@ -17,4 +16,3 @@ if (~({}) !== -1) { if (~(function(){return 1}) !== -1) { $ERROR('#2: ~(function(){return 1}) === -1. Actual: ' + (~(function(){return 1}))); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A1.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A1.js index e4c26d0a10..7d0e0bdd61 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A1.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between "!" and UnaryExpression are allowed - * - * @path ch11/11.4/11.4.9/S11.4.9_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between "!" and UnaryExpression are + allowed +es5id: 11.4.9_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("!\u0009true") !== false) { @@ -57,4 +58,3 @@ if (eval("!\u2029true") !== false) { if (eval("!\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true") !== false) { $ERROR('#10: !\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true === false'); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T1.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T1.js index d08fdd181f..b40467bba3 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T1.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x uses GetValue - * - * @path ch11/11.4/11.4.9/S11.4.9_A2.1_T1.js - * @description Either Type(x) is not Reference or GetBase(x) is not null - */ +/*--- +info: Operator !x uses GetValue +es5id: 11.4.9_A2.1_T1 +description: Either Type(x) is not Reference or GetBase(x) is not null +---*/ //CHECK#1 if (!true !== false) { @@ -36,4 +35,3 @@ object.prop = true; if (!object.prop !== false) { $ERROR('#5: var object = new Object(); object.prop = true; !object.prop === false'); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T2.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T2.js index b6592471d9..353642ced2 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T2.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x uses GetValue - * - * @path ch11/11.4/11.4.9/S11.4.9_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator !x uses GetValue +es5id: 11.4.9_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: !x throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.2_T1.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.2_T1.js index 3f156e9d42..20af1d0c3d 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.2_T1.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x uses [[Default Value]] - * - * @path ch11/11.4/11.4.9/S11.4.9_A2.2_T1.js - * @description If Type(value) is Object, return false - */ +/*--- +info: Operator !x uses [[Default Value]] +es5id: 11.4.9_A2.2_T1 +description: If Type(value) is Object, return false +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -54,5 +53,4 @@ if (!object !== false) { var object = {valueOf: function() {return {}}, toString: function() {return {}}}; if (!object !== false) { $ERROR('#8: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; !object === false. Actual: ' + (!object)); -} - +} diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T1.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T1.js index 05a4ebcc70..a2d3a8cd2e 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T1.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x returns !ToBoolean(x) - * - * @path ch11/11.4/11.4.9/S11.4.9_A3_T1.js - * @description Type(x) is boolean primitive or Boolean object - */ +/*--- +info: Operator !x returns !ToBoolean(x) +es5id: 11.4.9_A3_T1 +description: Type(x) is boolean primitive or Boolean object +---*/ //CHECK#1 if (!false !== true) { @@ -22,4 +21,3 @@ if (!new Boolean(true) !== false) { if (!new Boolean(false) !== false) { $ERROR('#3: !new Boolean(false) === false'); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T2.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T2.js index a2e13b0c0f..26c38b4b94 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T2.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x returns !ToBoolean(x) - * - * @path ch11/11.4/11.4.9/S11.4.9_A3_T2.js - * @description Type(x) is number primitive or Number object - */ +/*--- +info: Operator !x returns !ToBoolean(x) +es5id: 11.4.9_A3_T2 +description: Type(x) is number primitive or Number object +---*/ //CHECK#1 if (!0.1 !== false) { @@ -42,4 +41,3 @@ if (!new Number(0) !== false) { if (!Infinity !== false) { $ERROR('#7: !Infinity === false'); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T3.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T3.js index a15994ddc1..3fbc09ad67 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T3.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x returns !ToBoolean(x) - * - * @path ch11/11.4/11.4.9/S11.4.9_A3_T3.js - * @description Type(x) is string primitive or String object - */ +/*--- +info: Operator !x returns !ToBoolean(x) +es5id: 11.4.9_A3_T3 +description: Type(x) is string primitive or String object +---*/ //CHECK#1 if (!"1" !== false) { @@ -32,4 +31,3 @@ if (!"" !== true) { if (!new String("") !== false) { $ERROR('#5: !new String("") === false'); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T4.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T4.js index 0ac35bb98d..1ccb6bc718 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T4.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x returns !ToBoolean(x) - * - * @path ch11/11.4/11.4.9/S11.4.9_A3_T4.js - * @description Type(x) is undefined or null - */ +/*--- +info: Operator !x returns !ToBoolean(x) +es5id: 11.4.9_A3_T4 +description: Type(x) is undefined or null +---*/ //CHECK#1 if (!void 0 !== true) { @@ -17,4 +16,3 @@ if (!void 0 !== true) { if (!null !== true) { $ERROR('#2: !null === true'); } - diff --git a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T5.js b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T5.js index 88f6dcaecd..d68c69b711 100644 --- a/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T5.js +++ b/test/suite/ch11/11.4/11.4.9/S11.4.9_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator !x returns !ToBoolean(x) - * - * @path ch11/11.4/11.4.9/S11.4.9_A3_T5.js - * @description Type(x) is Object object or Function object - */ +/*--- +info: Operator !x returns !ToBoolean(x) +es5id: 11.4.9_A3_T5 +description: Type(x) is Object object or Function object +---*/ //CHECK#1 if ((!{}) !== false) { @@ -17,4 +16,3 @@ if ((!{}) !== false) { if (!(function(){return 1}) !== false) { $ERROR('#2: !(function(){return 1}) === false'); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A1.js index 1a9876c012..56a77e9100 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between MultiplicativeExpression and "*" or between "*" and UnaryExpression are allowed - * - * @path ch11/11.5/11.5.1/S11.5.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between MultiplicativeExpression and "*" + or between "*" and UnaryExpression are allowed +es5id: 11.5.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009*\u00091") !== 1) { @@ -57,4 +58,3 @@ if (eval("1\u2029*\u20291") !== 1) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029*\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 1) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 1'); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T1.js index ed649ace57..e451c12bbe 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y uses GetValue - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x * y uses GetValue +es5id: 11.5.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 * 1 !== 1) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop * objecty.prop !== 1) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop * objecty.prop === 1. Actual: ' + (objectx.prop * objecty.prop)); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T2.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T2.js index e1f16da9d1..d2a958b834 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T2.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y uses GetValue - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x * y uses GetValue +es5id: 11.5.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x * 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T3.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T3.js index 22af7df200..118689b784 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T3.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y uses GetValue - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x * y uses GetValue +es5id: 11.5.1_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 * y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.2_T1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.2_T1.js index 932acabb24..0d319fdfb3 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.2_T1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y uses [[Default Value]] - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x * y uses [[Default Value]] +es5id: 11.5.1_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 1}} * 1 !== 1) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 * {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.3_T1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.3_T1.js index ba58724a91..57b6416adc 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.3_T1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.5.1_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T1.js index 504923aee2..d2fa21e15c 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (x * (x = 1) !== 0) { $ERROR('#2: var x = 0; x * (x = 1) === 0. Actual: ' + (x * (x = 1))); } - - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T2.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T2.js index 262f2e7fca..eb623f40ad 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T2.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T3.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T3.js index edcb5e0063..9c971e050c 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T3.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.1/S11.5.1_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.1_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) * y !== 1) { $ERROR('#2: (y = 1) * y === 1. Actual: ' + ((y = 1) * y)); } - - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.1.js index de1e6dfdb3..ac8c8e2651 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true * true !== 1) { @@ -27,4 +28,3 @@ if (true * new Boolean(true) !== 1) { if (new Boolean(true) * new Boolean(true) !== 1) { $ERROR('#4: new Boolean(true) * new Boolean(true) === 1. Actual: ' + (new Boolean(true) * new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.2.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.2.js index 1e0a49387a..083349454d 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.2.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 * 1 !== 1) { @@ -27,5 +26,3 @@ if (1 * new Number(1) !== 1) { if (new Number(1) * new Number(1) !== 1) { $ERROR('#4: new Number(1) * new Number(1) === 1. Actual: ' + (new Number(1) * new Number(1))); } - - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.3.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.3.js index e04ab70ea7..cdb6f36f28 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.3.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" * "1" !== 1) { @@ -37,4 +36,3 @@ if (isNaN("x" * "1") !== true) { if (isNaN("1" * "x") !== true) { $ERROR('#6: "1" * "x" === Not-a-Number. Actual: ' + ("1" * "x")); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.4.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.4.js index 2dbe84f975..9987fd3a45 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.4.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (isNaN(null * undefined) !== true) { @@ -27,4 +26,3 @@ if (isNaN(undefined * undefined) !== true) { if (null * null !== 0) { $ERROR('#4: null * null === 0. Actual: ' + (null * null)); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.5.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.5.js index 061e0ff278..d73c2e4168 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.5.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (isNaN({} * function(){return 1}) !== true) { @@ -27,4 +26,3 @@ if (isNaN(function(){return 1} * function(){return 1}) !== true) { if (isNaN({} * {}) !== true) { $ERROR('#4: {} * {} === Not-a-Number. Actual: ' + ({} * {})); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.1.js index 08a913b955..726ef8c152 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Number (primitive and object) - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Number (primitive and object) +---*/ //CHECK#1 if (true * 1 !== 1) { @@ -47,4 +48,3 @@ if (new Boolean(true) * new Number(1) !== 1) { if (new Number(1) * new Boolean(true) !== 1) { $ERROR('#8: new Number(1) * new Boolean(true) === 1. Actual: ' + (new Number(1) * new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.2.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.2.js index 063c4da9e0..0fc984b714 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.2.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" * 1 !== 1) { @@ -57,4 +58,3 @@ if (isNaN("x" * 1) !== true) { if (isNaN(1 * "x") !== true) { $ERROR('#10: 1 * "x" === Not-a-Number. Actual: ' + (1 * "x")); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.3.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.3.js index cfab7ba6b3..484df97bcc 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.3.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (1 * null !== 0) { @@ -27,4 +28,3 @@ if (new Number(1) * null !== 0) { if (null * new Number(1) !== 0) { $ERROR('#4: null * new Number(1) === 0. Actual: ' + (null * new Number(1))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.4.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.4.js index 0216310cfe..7504051c13 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.4.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(1 * undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Number(1) * undefined) !== true) { if (isNaN(undefined * new Number(1)) !== true) { $ERROR('#4: undefined * new Number(1) === Not-a-Number. Actual: ' + (undefined * new Number(1))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.5.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.5.js index 5d92d98276..ab328b9d80 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.5.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true * "1" !== 1) { @@ -47,4 +48,3 @@ if (new Boolean(true) * new String("1") !== 1) { if (new String("1") * new Boolean(true) !== 1) { $ERROR('#8: new String("1") * new Boolean(true) === 1. Actual: ' + (new String("1") * new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.6.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.6.js index 429683ff28..45aa31f366 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.6.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + primitive String (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN("1" * undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new String("1") * undefined) !== true) { if (isNaN(undefined * new String("1")) !== true) { $ERROR('#4: undefined * new String("1") === Not-a-Number. Actual: ' + (undefined * new String("1"))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.7.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.7.js index 786f230571..03defe8013 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.7.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if ("1" * null !== 0) { @@ -27,4 +28,3 @@ if (new String("1") * null !== 0) { if (null * new String("1") !== 0) { $ERROR('#4: null * new String("1") === 0. Actual: ' + (null * new String("1"))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.8.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.8.js index ef7ae05032..537e4b41f6 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.8.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(true * undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Boolean(true) * undefined) !== true) { if (isNaN(undefined * new Boolean(true)) !== true) { $ERROR('#4: undefined * new Boolean(true) === Not-a-Number. Actual: ' + (undefined * new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.9.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.9.js index 377cb00f02..a3c4534df0 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.9.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x * y returns ToNumber(x) * ToNumber(y) - * - * @path ch11/11.5/11.5.1/S11.5.1_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x * y returns ToNumber(x) * ToNumber(y) +es5id: 11.5.1_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true * null !== 0) { @@ -27,4 +28,3 @@ if (new Boolean(true) * null !== 0) { if (null * new Boolean(true) !== 0) { $ERROR('#4: null * new Boolean(true) === 0. Actual: ' + (null * new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.1.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.1.js index d3b5006ce5..1d2e6a5592 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.1.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T1.1.js - * @description If left operand is NaN, the result is NaN - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T1.1 +description: If left operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN * Number.NaN) !== true) { @@ -46,5 +47,4 @@ if (isNaN(Number.NaN * Number.MIN_VALUE) !== true) { //CHECK#8 if (isNaN(Number.NaN * 1) !== true) { $ERROR('#8: NaN * 1 === Not-a-Number. Actual: ' + (NaN * 1)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.2.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.2.js index 2f1d7c1c00..8abbbba225 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.2.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T1.2.js - * @description If right operand is NaN, the result is NaN - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T1.2 +description: If right operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN * Number.NaN) !== true) { @@ -47,4 +48,3 @@ if (isNaN(Number.MIN_VALUE * Number.NaN) !== true) { if (isNaN(1 * Number.NaN) !== true) { $ERROR('#8: 1 * NaN === Not-a-Number. Actual: ' + (1 * NaN)); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T2.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T2.js index f6bc87a6fc..891cbab823 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T2.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T2.js - * @description The sign of the result is positive if both operands have the same sign, negative if the operands have different signs - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T2 +description: > + The sign of the result is positive if both operands have the same + sign, negative if the operands have different signs +---*/ //CHECK#1 if (1 * 1 !== 1) { @@ -63,4 +66,3 @@ if (-0 * -0 !== 0) { $ERROR('#8.2: 0 * -0 === - 0. Actual: +0'); } } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T3.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T3.js index 6bc264f90d..3b758fea55 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T3.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T3.js - * @description Multiplication of an infinity by a zero results in NaN - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T3 +description: Multiplication of an infinity by a zero results in NaN +---*/ //CHECK#1 if (isNaN(Number.NEGATIVE_INFINITY * 0) !== true) { @@ -47,4 +48,3 @@ if (isNaN(Number.POSITIVE_INFINITY * 0) !== true) { if (isNaN(-0 * Number.POSITIVE_INFINITY) !== true) { $ERROR('#8: -0 * Infinity === Not-a-Number. Actual: ' + (-0 * Infinity)); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T4.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T4.js index 5603e976e3..95d39a7b9d 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T4.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T4.js - * @description Multiplication of an infinity by an infinity results in an infinity of appropriate sign - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T4 +description: > + Multiplication of an infinity by an infinity results in an + infinity of appropriate sign +---*/ //CHECK#1 if (Number.NEGATIVE_INFINITY * Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY) { @@ -27,4 +30,3 @@ if (Number.NEGATIVE_INFINITY * Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFI if (Number.POSITIVE_INFINITY * Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY) { $ERROR('#4: Infinity * -Infinity === -Infinity. Actual: ' + (Infinity * -Infinity)); } - diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T5.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T5.js index e52526d3a2..55e3db9619 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T5.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T5.js - * @description Multiplication of an infinity by a finite non-zero value results in a signed infinity - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T5 +description: > + Multiplication of an infinity by a finite non-zero value results + in a signed infinity +---*/ //CHECK#1 if (Number.NEGATIVE_INFINITY * -1 !== Number.POSITIVE_INFINITY) { @@ -46,5 +49,4 @@ if (Number.NEGATIVE_INFINITY * Number.MIN_VALUE !== Number.NEGATIVE_INFINITY) { //CHECK#8 if (Number.NEGATIVE_INFINITY * Number.MIN_VALUE !== Number.MIN_VALUE * Number.NEGATIVE_INFINITY) { $ERROR('#8: -Infinity * Number.MIN_VALUE === Number.MIN_VALUE * -Infinity. Actual: ' + (-Infinity * Number.MIN_VALUE)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T6.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T6.js index 7432a31461..efa8d97245 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T6.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T6.js - * @description If the magnitude is too large to represent, the result is then an infinity of appropriate sign - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T6 +description: > + If the magnitude is too large to represent, the result is then an + infinity of appropriate sign +---*/ //CHECK#1 if (Number.MAX_VALUE * 1.1 !== Number.POSITIVE_INFINITY) { @@ -26,5 +29,4 @@ if (Number.MAX_VALUE * 1 !== Number.MAX_VALUE) { //CHECK#4 if (-1 * Number.MAX_VALUE !== -Number.MAX_VALUE) { $ERROR('#4: -1 * Number.MAX_VALUE === -Number.MAX_VALUE. Actual: ' + (-1 * Number.MAX_VALUE)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T7.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T7.js index 5a8d203e53..6f1231cf8a 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T7.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T7.js - * @description If the magnitude is too small to represent, the result is then a zero of appropriate sign - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T7 +description: > + If the magnitude is too small to represent, the result is then a + zero of appropriate sign +---*/ //CHECK#1 if (Number.MIN_VALUE * 0.1 !== 0) { @@ -54,5 +57,4 @@ if (Number.MIN_VALUE * 0.9 !== Number.MIN_VALUE) { //CHECK#8 if (-0.9 * Number.MIN_VALUE !== -Number.MIN_VALUE) { $ERROR('#8: -0.9 * Number.MIN_VALUE === -Number.MIN_VALUE. Actual: ' + (-0.9 * Number.MIN_VALUE)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T8.js b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T8.js index 0d777e06ff..16b85cffd3 100644 --- a/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T8.js +++ b/test/suite/ch11/11.5/11.5.1/S11.5.1_A4_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a floating-point multiplication is governed by the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.5/11.5.1/S11.5.1_A4_T8.js - * @description Multiplication is not always associative (x * y * z is the same as (x * y) * z, not x * (y * z)) - */ +/*--- +info: > + The result of a floating-point multiplication is governed by the rules of + IEEE 754 double-precision arithmetics +es5id: 11.5.1_A4_T8 +description: > + Multiplication is not always associative (x * y * z is the same as + (x * y) * z, not x * (y * z)) +---*/ //CHECK#1 if (Number.MAX_VALUE * 1.1 * 0.9 !== (Number.MAX_VALUE * 1.1) * 0.9) { @@ -17,4 +20,3 @@ if (Number.MAX_VALUE * 1.1 * 0.9 !== (Number.MAX_VALUE * 1.1) * 0.9) { if ((Number.MAX_VALUE * 1.1) * 0.9 === Number.MAX_VALUE * (1.1 * 0.9)) { $ERROR('#2: (Number.MAX_VALUE * 1.1) * 0.9 !== Number.MAX_VALUE * (1.1 * 0.9)'); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A1.js index 0b92880bdd..58a80d5384 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between MultiplicativeExpression and "/" or between "/" and UnaryExpression are allowed - * - * @path ch11/11.5/11.5.2/S11.5.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between MultiplicativeExpression and "/" + or between "/" and UnaryExpression are allowed +es5id: 11.5.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009/\u00091") !== 1) { @@ -57,4 +58,3 @@ if (eval("1\u2029/\u20291") !== 1) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029/\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 1) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029/\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 1'); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T1.js index c06d2991c6..0277324c46 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y uses GetValue - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x / y uses GetValue +es5id: 11.5.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 / 1 !== 1) { @@ -40,5 +39,3 @@ objecty.prop = 1; if (objectx.prop / objecty.prop !== 1) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop / objecty.prop === 1. Actual: ' + (objectx.prop / objecty.prop)); } - - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T2.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T2.js index 68396ed543..425e7eed5b 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T2.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y uses GetValue - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x / y uses GetValue +es5id: 11.5.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x / 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T3.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T3.js index d0da4868d0..774f5535b8 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T3.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y uses GetValue - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x / y uses GetValue +es5id: 11.5.2_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1 / y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.2_T1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.2_T1.js index e0d8bc345d..a29052497b 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.2_T1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y uses [[Default Value]] - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x / y uses [[Default Value]] +es5id: 11.5.2_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 1}} / 1 !== 1) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 / {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.3_T1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.3_T1.js index 8c0b9888e2..8ab1fd5078 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.3_T1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.5.2_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T1.js index 2d2d55efeb..327cbec024 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (x / (x = 1) !== 0) { $ERROR('#2: var x = 0; x / (x = 1) === 0. Actual: ' + (x / (x = 1))); } - - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T2.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T2.js index 44f0f23279..bffcec4d4e 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T2.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T3.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T3.js index 13ffe9ff3c..65f9e436f9 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T3.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.2/S11.5.2_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.2_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) / y !== 1) { $ERROR('#2: (y = 1) / y === 1. Actual: ' + ((y = 1) / y)); } - - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.1.js index 5e53abaf2b..8a92fa845f 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true / true !== 1) { @@ -27,4 +28,3 @@ if (true / new Boolean(true) !== 1) { if (new Boolean(true) / new Boolean(true) !== 1) { $ERROR('#4: new Boolean(true) / new Boolean(true) === 1. Actual: ' + (new Boolean(true) / new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.2.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.2.js index 97bb6036db..5784129d72 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.2.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 / 1 !== 1) { @@ -27,5 +26,3 @@ if (1 / new Number(1) !== 1) { if (new Number(1) / new Number(1) !== 1) { $ERROR('#4: new Number(1) / new Number(1) === 1. Actual: ' + (new Number(1) / new Number(1))); } - - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.3.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.3.js index 56d1b142c0..3e7efabf4f 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.3.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" / "1" !== 1) { @@ -37,4 +36,3 @@ if (isNaN("x" / "1") !== true) { if (isNaN("1" / "x") !== true) { $ERROR('#6: "1" / "x" === Not-a-Number. Actual: ' + ("1" / "x")); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.4.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.4.js index e9269fb453..111538ea94 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.4.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (isNaN(null / undefined) !== true) { @@ -27,4 +26,3 @@ if (isNaN(undefined / undefined) !== true) { if (isNaN(null / null) !== true) { $ERROR('#4: null / null === Not-a-Number. Actual: ' + (null / null)); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.5.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.5.js index ec57702bea..3935fd8225 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.5.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (isNaN({} / function(){return 1}) !== true) { @@ -27,4 +26,3 @@ if (isNaN(function(){return 1} / function(){return 1}) !== true) { if (isNaN({} / {}) !== true) { $ERROR('#4: {} / {} === Not-a-Number. Actual: ' + ({} / {})); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.1.js index 7cd3f7cf6d..212ddbeba2 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true / 1 !== 1) { @@ -47,4 +48,3 @@ if (new Boolean(true) / new Number(1) !== 1) { if (new Number(1) / new Boolean(true) !== 1) { $ERROR('#8: new Number(1) / new Boolean(true) === 1. Actual: ' + (new Number(1) / new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.2.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.2.js index 8678544adc..7a7f4649e9 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.2.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" / 1 !== 1) { @@ -57,4 +58,3 @@ if (isNaN("x" / 1) !== true) { if (isNaN(1 / "x") !== true) { $ERROR('#10: 1 / "x" === Not-a-Number. Actual: ' + (1 / "x")); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.3.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.3.js index bd37aaefaf..b19d9baa45 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.3.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (1 / null !== Number.POSITIVE_INFINITY) { @@ -27,4 +28,3 @@ if (new Number(1) / null !== Number.POSITIVE_INFINITY) { if (null / new Number(1) !== 0) { $ERROR('#4: null / new Number(1) === 0. Actual: ' + (null / new Number(1))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.4.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.4.js index a67647f6b6..47908a9464 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.4.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(1 / undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Number(1) / undefined) !== true) { if (isNaN(undefined / new Number(1)) !== true) { $ERROR('#4: undefined / new Number(1) === Not-a-Number. Actual: ' + (undefined / new Number(1))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.5.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.5.js index ae723bdae8..52b4c066be 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.5.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true / "1" !== 1) { @@ -47,4 +48,3 @@ if (new Boolean(true) / new String("1") !== 1) { if (new String("1") / new Boolean(true) !== 1) { $ERROR('#8: new String("1") / new Boolean(true) === 1. Actual: ' + (new String("1") / new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.6.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.6.js index 728613ebd6..981adf396c 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.6.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN("1" / undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new String("1") / undefined) !== true) { if (isNaN(undefined / new String("1")) !== true) { $ERROR('#4: undefined / new String("1") === Not-a-Number. Actual: ' + (undefined / new String("1"))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.7.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.7.js index 9a307dc32b..c371968a79 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.7.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if ("1" / null !== Number.POSITIVE_INFINITY) { @@ -27,4 +28,3 @@ if (new String("1") / null !== Number.POSITIVE_INFINITY) { if (null / new String("1") !== 0) { $ERROR('#4: null / new String("1") === 0. Actual: ' + (null / new String("1"))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.8.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.8.js index a3fb0e50ed..1f70fe3ce3 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.8.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(true / undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Boolean(true) / undefined) !== true) { if (isNaN(undefined / new Boolean(true)) !== true) { $ERROR('#4: undefined / new Boolean(true) === Not-a-Number. Actual: ' + (undefined / new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.9.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.9.js index 5459c4d048..568801c696 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.9.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x / y returns ToNumber(x) / ToNumber(y) - * - * @path ch11/11.5/11.5.2/S11.5.2_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x / y returns ToNumber(x) / ToNumber(y) +es5id: 11.5.2_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true / null !== Number.POSITIVE_INFINITY) { @@ -27,4 +28,3 @@ if (new Boolean(true) / null !== Number.POSITIVE_INFINITY) { if (null / new Boolean(true) !== 0) { $ERROR('#4: null / new Boolean(true) === 0. Actual: ' + (null / new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.1.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.1.js index f98c2b58e1..32b507cb40 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.1.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T1.1.js - * @description If left operand is NaN, the result is NaN - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T1.1 +description: If left operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN / Number.NaN) !== true) { @@ -46,5 +47,4 @@ if (isNaN(Number.NaN / Number.MIN_VALUE) !== true) { //CHECK#8 if (isNaN(Number.NaN / 1) !== true) { $ERROR('#8: NaN / 1 === Not-a-Number. Actual: ' + (NaN / 1)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.2.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.2.js index 57415ff2a4..bc4c3a27e6 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.2.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T1.2.js - * @description If right operand is NaN, the result is NaN - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T1.2 +description: If right operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN / Number.NaN) !== true) { @@ -47,4 +48,3 @@ if (isNaN(Number.MIN_VALUE / Number.NaN) !== true) { if (isNaN(1 / Number.NaN) !== true) { $ERROR('#8: 1 / NaN === Not-a-Number. Actual: ' + (1 / NaN)); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T10.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T10.js index a8a0f25ab4..81d7ad9b28 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T10.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T10.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T10.js - * @description If both operands are finite and nonzero, the quotient is computed and rounded using IEEE 754 round-to-nearest mode. - * If the magnitude is too small to represent, the result is then a zero of appropriate sign - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T10 +description: > + If both operands are finite and nonzero, the quotient is computed + and rounded using IEEE 754 round-to-nearest mode. If the + magnitude is too small to represent, the result is then a zero of + appropriate sign +---*/ //CHECK#1 if (Number.MIN_VALUE / 2.1 !== 0) { @@ -55,5 +59,4 @@ if (Number.MIN_VALUE / 1.1 !== Number.MIN_VALUE) { //CHECK#8 if (Number.MIN_VALUE / -1.1 !== -Number.MIN_VALUE) { $ERROR('#8: Number.MIN_VALUE / -1.1 === -Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE / -1.1)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T2.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T2.js index 4e01438794..b2dbd10a7d 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T2.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T2.js - * @description The sign of the result is positive if both operands have the same sign, negative if the operands have different signs - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T2 +description: > + The sign of the result is positive if both operands have the same + sign, negative if the operands have different signs +---*/ //CHECK#1 if (1 / 1 !== 1) { @@ -27,4 +30,3 @@ if (-1 / 1 !== -1) { if (-1 / -1 !== 1) { $ERROR('#4: -1 / -1 === 1. Actual: ' + (-1 / -1)); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T3.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T3.js index dd67b91f86..b9595040af 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T3.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T3.js - * @description Division of an infinity by a zero results in an infinity of appropriate sign - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T3 +description: > + Division of an infinity by a zero results in an infinity of + appropriate sign +---*/ //CHECK#1 if (Number.NEGATIVE_INFINITY / 0 !== Number.NEGATIVE_INFINITY) { @@ -27,4 +30,3 @@ if (Number.POSITIVE_INFINITY / 0 !== Number.POSITIVE_INFINITY) { if (Number.POSITIVE_INFINITY / -0 !== Number.NEGATIVE_INFINITY) { $ERROR('#4: Infinity / -0 === -Infinity. Actual: ' + (Infinity / -0)); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T4.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T4.js index 14804ad6f3..6ac6581641 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T4.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T4.js - * @description Division of an infinity by an infinity results in NaN - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T4 +description: Division of an infinity by an infinity results in NaN +---*/ //CHECK#1 if (isNaN(Number.NEGATIVE_INFINITY / Number.NEGATIVE_INFINITY) !== true) { @@ -27,4 +28,3 @@ if (isNaN(Number.NEGATIVE_INFINITY / Number.POSITIVE_INFINITY) !== true) { if (isNaN(Number.POSITIVE_INFINITY / Number.NEGATIVE_INFINITY) !== true) { $ERROR('#4: Infinity / -Infinity === Not-a-Number. Actual: ' + (Infinity / -Infinity)); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T5.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T5.js index 3f84058ca3..eed3ff7ec9 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T5.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T5.js - * @description Division of an infinity by a finite non-zero value results in a signed infinity - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T5 +description: > + Division of an infinity by a finite non-zero value results in a + signed infinity +---*/ //CHECK#1 if (Number.NEGATIVE_INFINITY / 1 !== Number.NEGATIVE_INFINITY) { @@ -37,4 +40,3 @@ if (Number.POSITIVE_INFINITY / -Number.MAX_VALUE !== Number.NEGATIVE_INFINITY) { if (Number.NEGATIVE_INFINITY / Number.MIN_VALUE !== Number.NEGATIVE_INFINITY) { $ERROR('#6: -Infinity / Number.MIN_VALUE === -Infinity. Actual: ' + (-Infinity / Number.MIN_VALUE)); } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T6.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T6.js index 7c013ee310..9e19183d40 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T6.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T6.js - * @description Division of a finite value by an infinity results in zero of appropriate sign - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T6 +description: > + Division of a finite value by an infinity results in zero of + appropriate sign +---*/ //CHECK#1 if (1 / Number.NEGATIVE_INFINITY !== -0) { @@ -43,4 +46,3 @@ if (-1 / Number.POSITIVE_INFINITY !== -0) { $ERROR('#4.2: -1 / Infinity === - 0. Actual: +0'); } } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T7.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T7.js index df2b599704..1fb701152b 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T7.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T7.js - * @description Division of a zero by a zero results in NaN - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T7 +description: Division of a zero by a zero results in NaN +---*/ //CHECK#1 if (isNaN(+0 / +0) !== true) { @@ -26,5 +27,4 @@ if (isNaN(+0 / -0) !== true) { //CHECK#4 if (isNaN(-0 / -0) !== true) { $ERROR('#4: -0 / -0 === Not-a-Number. Actual: ' + (-0 / -0)); -} - +} diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T8.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T8.js index 1984de1f23..d272e751ff 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T8.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T8.js - * @description Division of a zero by any non-zero finite value -0 results in zero of appropriate sign - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T8 +description: > + Division of a zero by any non-zero finite value -0 results in zero + of appropriate sign +---*/ //CHECK#1 if (-0 / 1 !== -0) { @@ -61,4 +64,3 @@ if (-0 / Number.MIN_VALUE !== -0) { $ERROR('#6.2: -0 / Number.MIN_VALUE === - 0. Actual: +0'); } } - diff --git a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T9.js b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T9.js index 9539057d75..d8a5c0e376 100644 --- a/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T9.js +++ b/test/suite/ch11/11.5/11.5.2/S11.5.2_A4_T9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of division is determined by the specification of IEEE 754 arithmetics - * - * @path ch11/11.5/11.5.2/S11.5.2_A4_T9.js - * @description If the magnitude is too large to represent, the result is then an infinity of appropriate sign - */ +/*--- +info: > + The result of division is determined by the specification of IEEE 754 + arithmetics +es5id: 11.5.2_A4_T9 +description: > + If the magnitude is too large to represent, the result is then an + infinity of appropriate sign +---*/ //CHECK#1 if (Number.MAX_VALUE / 0.9 !== Number.POSITIVE_INFINITY) { @@ -32,4 +35,3 @@ if (Number.MAX_VALUE / -1 !== -Number.MAX_VALUE) { if (Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) === (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9) { $ERROR('#5: Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) !== (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9'); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A1.js index c372cc5453..c8703e4044 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between MultiplicativeExpression and "%" or between "%" and UnaryExpression are allowed - * - * @path ch11/11.5/11.5.3/S11.5.3_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between MultiplicativeExpression and "%" + or between "%" and UnaryExpression are allowed +es5id: 11.5.3_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009%\u00091") !== 0) { @@ -57,4 +58,3 @@ if (eval("1\u2029%\u20291") !== 0) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029%\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 0) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029%\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 0'); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T1.js index b2a973d378..8ee93b7c57 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y uses GetValue - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x % y uses GetValue +es5id: 11.5.3_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 % 2 !== 1) { @@ -40,4 +39,3 @@ objecty.prop = 2; if (objectx.prop % objecty.prop !== 1) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 2; objectx.prop % objecty.prop === 1. Actual: ' + (objectx.prop % objecty.prop)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T2.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T2.js index 5da5f3cffe..d7fcbb3ed8 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T2.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y uses GetValue - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x % y uses GetValue +es5id: 11.5.3_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x % 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T3.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T3.js index 20b64080eb..f066e6c4f5 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T3.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y uses GetValue - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x % y uses GetValue +es5id: 11.5.3_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1 % y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.2_T1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.2_T1.js index ab488af509..ed946c282d 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.2_T1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y uses [[Default Value]] - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x % y uses [[Default Value]] +es5id: 11.5.3_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 1}} % 2 !== 1) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 % {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.3_T1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.3_T1.js index 836a13ff6f..c34179cd6f 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.3_T1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.5.3_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T1.js index 7b87a3bf0f..a046ca04d3 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.3_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 1; if (x % (x = 2) !== 1) { $ERROR('#2: var x = 1; x % (x = 2) === 1. Actual: ' + (x % (x = 2))); } - - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T2.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T2.js index f3c306ca1b..430f27e54e 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T2.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.3_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T3.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T3.js index a597a95d27..3675bf82c7 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T3.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.5/11.5.3/S11.5.3_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.3_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) % y !== 0) { $ERROR('#2: (y = 1) % y === 0. Actual: ' + ((y = 1) % y)); } - - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.1.js index 816d0efe9b..2e6be5c594 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true % true !== 0) { @@ -27,4 +28,3 @@ if (true % new Boolean(true) !== 0) { if (new Boolean(true) % new Boolean(true) !== 0) { $ERROR('#4: new Boolean(true) % new Boolean(true) === 0. Actual: ' + (new Boolean(true) % new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.2.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.2.js index db3ba1d649..720ddddc25 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.2.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 % 1 !== 0) { @@ -27,5 +26,3 @@ if (1 % new Number(1) !== 0) { if (new Number(1) % new Number(1) !== 0) { $ERROR('#4: new Number(1) % new Number(1) === 0. Actual: ' + (new Number(1) % new Number(1))); } - - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.3.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.3.js index 3520ef2362..4a80bda41c 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.3.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" % "1" !== 0) { @@ -37,4 +36,3 @@ if (isNaN("x" % "1") !== true) { if (isNaN("1" % "x") !== true) { $ERROR('#6: "1" % "x" === Not-a-Number. Actual: ' + ("1" % "x")); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.4.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.4.js index 0af53ef4ef..bd31ae9c33 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.4.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (isNaN(null % undefined) !== true) { @@ -27,4 +26,3 @@ if (isNaN(undefined % undefined) !== true) { if (isNaN(null % null) !== true) { $ERROR('#4: null % null === Not-a-Number. Actual: ' + (null % null)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.5.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.5.js index 85cbbecf2b..2cbc16155d 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.5.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (isNaN({} % function(){return 1}) !== true) { @@ -27,4 +26,3 @@ if (isNaN(function(){return 1} % function(){return 1}) !== true) { if (isNaN({} % {}) !== true) { $ERROR('#4: {} % {} === Not-a-Number. Actual: ' + ({} % {})); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.1.js index 4cde926347..4e22a491f1 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true % 1 !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) % new Number(1) !== 0) { if (new Number(1) % new Boolean(true) !== 0) { $ERROR('#8: new Number(1) % new Boolean(true) === 0. Actual: ' + (new Number(1) % new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.2.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.2.js index 6196513ce7..35a3c6e76e 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.2.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" % 1 !== 0) { @@ -57,4 +58,3 @@ if (isNaN("x" % 1) !== true) { if (isNaN(1 % "x") !== true) { $ERROR('#10: 1 % "x" === Not-a-Number. Actual: ' + (1 % "x")); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.3.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.3.js index c6f32f2b45..1a8d94e6b2 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.3.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (isNaN(1 % null) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Number(1) % null) !== true) { if (null % new Number(1) !== 0) { $ERROR('#4: null % new Number(1) === 0. Actual: ' + (null % new Number(1))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.4.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.4.js index 4abfc2c0fc..e3618ae13b 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.4.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(1 % undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Number(1) % undefined) !== true) { if (isNaN(undefined % new Number(1)) !== true) { $ERROR('#4: undefined % new Number(1) === Not-a-Number. Actual: ' + (undefined % new Number(1))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.5.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.5.js index 951f4c68c0..118c3d0a0b 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.5.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true % "1" !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) % new String("1") !== 0) { if (new String("1") % new Boolean(true) !== 0) { $ERROR('#8: new String("1") % new Boolean(true) === 0. Actual: ' + (new String("1") % new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.6.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.6.js index 973fe52639..d5cda7d704 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.6.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN("1" % undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new String("1") % undefined) !== true) { if (isNaN(undefined % new String("1")) !== true) { $ERROR('#4: undefined % new String("1") === Not-a-Number. Actual: ' + (undefined % new String("1"))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.7.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.7.js index baa8a90e4f..3a5fe3864f 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.7.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if (isNaN("1" % null) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new String("1") % null) !== true) { if (null % new String("1") !== 0) { $ERROR('#4: null % new String("1") === 0. Actual: ' + (null % new String("1"))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.8.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.8.js index 54e229b097..e7357c3053 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.8.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(true % undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Boolean(true) % undefined) !== true) { if (isNaN(undefined % new Boolean(true)) !== true) { $ERROR('#4: undefined % new Boolean(true) === Not-a-Number. Actual: ' + (undefined % new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.9.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.9.js index 3ff69f2857..473a5d8d02 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.9.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x % y returns ToNumber(x) % ToNumber(y) - * - * @path ch11/11.5/11.5.3/S11.5.3_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x % y returns ToNumber(x) % ToNumber(y) +es5id: 11.5.3_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (isNaN(true % null) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Boolean(true) % null) !== true) { if (null % new Boolean(true) !== 0) { $ERROR('#4: null % new Boolean(true) === 0. Actual: ' + (null % new Boolean(true))); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.1.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.1.js index b2ad39088d..76fddb2c7b 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.1.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T1.1.js - * @description If either operand is NaN, the result is NaN - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T1.1 +description: If either operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN % Number.NaN) !== true) { @@ -47,4 +48,3 @@ if (isNaN(Number.NaN % Number.MIN_VALUE) !== true) { if (isNaN(Number.NaN % 1) !== true) { $ERROR('#8: NaN % 1 === Not-a-Number. Actual: ' + (NaN % 1)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.2.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.2.js index 2b7da808e9..a527ced864 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.2.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T1.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T1.2.js - * @description If either operand is NaN, the result is NaN - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T1.2 +description: If either operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN % Number.NaN) !== true) { @@ -47,4 +48,3 @@ if (isNaN(Number.MIN_VALUE % Number.NaN) !== true) { if (isNaN(1 % Number.NaN) !== true) { $ERROR('#8: 1 % NaN === Not-a-Number. Actual: ' + (1 % NaN)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T2.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T2.js index ce20516886..76881c6312 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T2.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T2.js - * @description The sign of the finite non-zero value result equals the sign of the divided - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T2 +description: > + The sign of the finite non-zero value result equals the sign of + the divided +---*/ //CHECK#1 if (1 % 1 !== 0) { @@ -63,4 +66,3 @@ if (-101 % 51 !== -50) { if (-101 % -51 !== -50) { $ERROR('#8: -101 % -51 === -50. Actual: ' + (-101 % -51)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T3.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T3.js index 5861cf727d..7506553919 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T3.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T3.js - * @description If the dividend is an infinity results is NaN - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T3 +description: If the dividend is an infinity results is NaN +---*/ //CHECK#1 if (isNaN(Number.NEGATIVE_INFINITY % Number.POSITIVE_INFINITY) !== true) { @@ -67,4 +68,3 @@ if (isNaN(Number.POSITIVE_INFINITY % Number.MAX_VALUE) !== true) { if (isNaN(Number.POSITIVE_INFINITY % -Number.MAX_VALUE) !== true) { $ERROR('#12: Infinity % -Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % -Number.MAX_VALUE)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T4.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T4.js index cdf3ebd38e..840f217a78 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T4.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T4.js - * @description If the divisor is zero results is NaN - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T4 +description: If the divisor is zero results is NaN +---*/ //CHECK#1 if (isNaN(-0 % 0) !== true) { @@ -87,4 +88,3 @@ if (isNaN(Number.MAX_VALUE % 0) !== true) { if (isNaN(Number.MAX_VALUE % -0) !== true) { $ERROR('#16: Number.MAX_VALUE % -0 === Not-a-Number. Actual: ' + (Number.MAX_VALUE % -0)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T5.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T5.js index 46f9e75da2..64e0ec22a0 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T5.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T5.js - * @description If dividend is finite and the divisor is an infinity, the result equals the dividend - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T5 +description: > + If dividend is finite and the divisor is an infinity, the result + equals the dividend +---*/ //CHECK#1 if (1 % Number.NEGATIVE_INFINITY !== 1) { @@ -101,4 +104,3 @@ if (-Number.MIN_VALUE % Number.POSITIVE_INFINITY !== -Number.MIN_VALUE) { if (-Number.MIN_VALUE % Number.NEGATIVE_INFINITY !== -Number.MIN_VALUE) { $ERROR('#16: -Number.MIN_VALUE % -Infinity === -Number.MIN_VALUE. Actual: ' + (-Number.MIN_VALUE % -Infinity)); } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T6.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T6.js index 02373aec7d..76d6113777 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T6.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T6.js - * @description If dividend is a zero and the divisor is nonzero finite, the result equals the dividend - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T6 +description: > + If dividend is a zero and the divisor is nonzero finite, the + result equals the dividend +---*/ //CHECK#1 if (0 % 1 !== 0) { @@ -79,4 +82,3 @@ if (-0 % Number.MIN_VALUE !== -0) { $ERROR('#8.2: 0 % Number.MIN_VALUE === - 0. Actual: +0'); } } - diff --git a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T7.js b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T7.js index 54356536e6..7e24abca59 100644 --- a/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T7.js +++ b/test/suite/ch11/11.5/11.5.3/S11.5.3_A4_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics - * - * @path ch11/11.5/11.5.3/S11.5.3_A4_T7.js - * @description If operands neither an infinity, nor a zero, nor NaN, return x - truncate(x / y) * y - */ +/*--- +info: > + The result of a ECMAScript floating-point remainder operation is + determined by the rules of IEEE arithmetics +es5id: 11.5.3_A4_T7 +description: > + If operands neither an infinity, nor a zero, nor NaN, return x - + truncate(x / y) * y +---*/ function truncate(x) { if (x > 0) { @@ -71,4 +74,3 @@ y = -1.1; if (x % y !== x - truncate(x / y) * y) { $ERROR('#8: x = -1.3; y = -1.1; x % y === x - truncate(x / y) * y. Actual: ' + (x % y)); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A1.js index 6e47930956..737c54b1e4 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between AdditiveExpression and "+" or between "+" and MultiplicativeExpression are allowed - * - * @path ch11/11.6/11.6.1/S11.6.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between AdditiveExpression and "+" or + between "+" and MultiplicativeExpression are allowed +es5id: 11.6.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009+\u00091") !== 2) { @@ -57,4 +58,3 @@ if (eval("1\u2029+\u20291") !== 2) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029+\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 2) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029+\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 2'); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T1.js index 748f791faa..2473d44453 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x + y uses GetValue - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x + y uses GetValue +es5id: 11.6.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 + 1 !== 2) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop + objecty.prop !== 2) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop + objecty.prop === 2. Actual: ' + (objectx.prop + objecty.prop)); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T2.js index 8a790be9f8..20811b1cf3 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x + y uses GetValue - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x + y uses GetValue +es5id: 11.6.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x + 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T3.js index 6609a55937..8d9d492233 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x + y uses GetValue - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x + y uses GetValue +es5id: 11.6.1_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 + y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T1.js index debdcd8838..2f10638e56 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x + y uses [[Default Value]] - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x + y uses [[Default Value]] +es5id: 11.6.1_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 1}} + 1 !== 2) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 + {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T2.js index 732c32cc84..43149e7dde 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x + y uses [[Default Value]] - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.2_T2.js - * @description If Type(value) is Date object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator x + y uses [[Default Value]] +es5id: 11.6.1_A2.2_T2 +description: If Type(value) is Date object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var date = new Date(); @@ -31,5 +30,3 @@ var date = new Date(); if (date + new Object() !== date.toString() + "[object Object]") { $ERROR('#4: var date = new Date(); date + new Object() === date.toString() + "[object Object]". Actual: ' + (date + new Object())); } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T3.js index 965c53d4d4..d90437d5d5 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x + y uses [[Default Value]] - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.2_T3.js - * @description If Type(value) is Function, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x + y uses [[Default Value]] +es5id: 11.6.1_A2.2_T3 +description: If Type(value) is Function, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 function f1(){ @@ -43,4 +42,3 @@ f4.toString = function() {return 1;}; if (f4 + 1 !== 1 - 1) { $ERROR('#4: f1unction f4() {return 0;}; f2.valueOf = function() {return -1;}; f4.toString() = function() {return 1;}; f4 + 1 === 1 - 1. Actual: ' + (f4 + 1)); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.3_T1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.3_T1.js index 07f11d4a12..de31cc67a8 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.3_T1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.6.1_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T1.js index ad6f74b40d..3e68daba1a 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (x + (x = 1) !== 1) { $ERROR('#2: var x = 0; x + (x = 1) === 1. Actual: ' + (x + (x = 1))); } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T2.js index 349041ed49..580728f014 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T3.js index 60d89e5061..186edf81c9 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.6/11.6.1/S11.6.1_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.1_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) + y !== 2) { $ERROR('#2: (y = 1) + y === 2. Actual: ' + ((y = 1) + y)); } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.1.js index e0f9656dd7..575db465c1 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + boolean and Boolean object +---*/ //CHECK#1 if (true + true !== 2) { @@ -27,4 +30,3 @@ if (true + new Boolean(true) !== 2) { if (new Boolean(true) + new Boolean(true) !== 2) { $ERROR('#4: new Boolean(true) + new Boolean(true) === 2. Actual: ' + (new Boolean(true) + new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.2.js index f5fccb1051..cbd12b74f8 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + number and Number object +---*/ //CHECK#1 if (1 + 1 !== 2) { @@ -27,5 +30,3 @@ if (1 + new Number(1) !== 2) { if (new Number(1) + new Number(1) !== 2) { $ERROR('#4: new Number(1) + new Number(1) === 2. Actual: ' + (new Number(1) + new Number(1))); } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.3.js index c9d52e5938..9f64285781 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T1.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T1.3.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T1.3 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Null and + Undefined +---*/ //CHECK#1 if (isNaN(null + undefined) !== true) { @@ -27,4 +30,3 @@ if (isNaN(undefined + undefined) !== true) { if (null + null !== 0) { $ERROR('#4: null + null === 0. Actual: ' + (null + null)); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.1.js index e5e3ee261e..cf4820acd0 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T2.1.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) or Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T2.1 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) or Boolean + (primitive and object) +---*/ //CHECK#1 if (true + 1 !== 2) { @@ -47,4 +51,3 @@ if (new Boolean(true) + new Number(1) !== 2) { if (new Number(1) + new Boolean(true) !== 2) { $ERROR('#8: new Number(1) + new Boolean(true) === 2. Actual: ' + (new Number(1) + new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.2.js index ec9dff9264..79b2eea7be 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T2.2.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T2.2 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Null +---*/ //CHECK#1 if (1 + null !== 1) { @@ -27,4 +30,3 @@ if (new Number(1) + null !== 1) { if (null + new Number(1) !== 1) { $ERROR('#4: null + new Number(1) === 1. Actual: ' + (null + new Number(1))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.3.js index dac10c083f..541606968b 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T2.3.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T2.3 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(1 + undefined) !== true) { @@ -27,4 +30,3 @@ if (isNaN(new Number(1) + undefined) !== true) { if (isNaN(undefined + new Number(1)) !== true) { $ERROR('#4: undefined + new Number(1) === Not-a-Number. Actual: ' + (undefined + new Number(1))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.4.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.4.js index a2d56e2f77..c91e86622d 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.4.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T2.4.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T2.4 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(true + undefined) !== true) { @@ -27,4 +30,3 @@ if (isNaN(new Boolean(true) + undefined) !== true) { if (isNaN(undefined + new Boolean(true)) !== true) { $ERROR('#4: undefined + new Boolean(true) === Not-a-Number. Actual: ' + (undefined + new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.5.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.5.js index a3cfe05235..de57dd3e40 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.5.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.1_T2.5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, then operator x + y returns ToNumber(x) + ToNumber(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.1_T2.5.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String and Type(Primitive(y)) is not String, + then operator x + y returns ToNumber(x) + ToNumber(y) +es5id: 11.6.1_A3.1_T2.5 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true + null !== 1) { @@ -27,4 +30,3 @@ if (new Boolean(true) + null !== 1) { if (null + new Boolean(true) !== 1) { $ERROR('#4: null + new Boolean(true) === 1. Actual: ' + (null + new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.1.js index f2f1f87242..9a9af192a8 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then operator x + y returns the result of concatenating ToString(x) followed by ToString(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.2_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object - */ +/*--- +info: > + If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then + operator x + y returns the result of concatenating ToString(x) followed + by ToString(y) +es5id: 11.6.1_A3.2_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + string and String object +---*/ //CHECK#1 if ("1" + "1" !== "11") { @@ -37,4 +41,3 @@ if ("x" + "1" !=="x1") { if ("1" + "x" !== "1x") { $ERROR('#6: "1" + "x" === "1x". Actual: ' + ("1" + "x")); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.2.js index 422ed6b539..b7583555d4 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T1.2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then operator x + y returns the result of concatenating ToString(x) followed by ToString(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.2_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object - */ +/*--- +info: > + If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then + operator x + y returns the result of concatenating ToString(x) followed + by ToString(y) +es5id: 11.6.1_A3.2_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Object + object and Function object +---*/ //CHECK#1 if (({} + function(){return 1}) !== ({}.toString() + function(){return 1}.toString())) { @@ -27,6 +31,3 @@ if ((function(){return 1} + function(){return 1}) !== (function(){return 1}.toSt if (({} + {}) !== ({}.toString() + {}.toString())) { $ERROR('#4: ({} + {}) === ({}.toString() + {}.toString()). Actual: ' + (({} + {}))); } - - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.1.js index 461a14c1a5..d6cf60027c 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.1.js @@ -1,12 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then operator x + y returns the result of concatenating ToString(x) followed by ToString(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.2_T2.1.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then + operator x + y returns the result of concatenating ToString(x) followed + by ToString(y) +es5id: 11.6.1_A3.2_T2.1 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and String + (primitive and object) +---*/ //CHECK#1 if ("1" + 1 !== "11") { @@ -57,4 +62,3 @@ if ("x" + 1 !=="x1") { if (1 + "x" !== "1x") { $ERROR('#10: 1 + "x" === "1x". Actual: ' + (1 + "x")); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.2.js index 5f4a4075aa..a4b6f8d3e4 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.2.js @@ -1,12 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then operator x + y returns the result of concatenating ToString(x) followed by ToString(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.2_T2.2.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then + operator x + y returns the result of concatenating ToString(x) followed + by ToString(y) +es5id: 11.6.1_A3.2_T2.2 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true + "1" !== "true1") { @@ -47,4 +52,3 @@ if (new Boolean(true) + new String("1") !== "true1") { if (new String("1") + new Boolean(true) !== "1true") { $ERROR('#8: new String("1") + new Boolean(true) === "1true". Actual: ' + (new String("1") + new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.3.js index a097ed83bc..a77b94ddad 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.3.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then operator x + y returns the result of concatenating ToString(x) followed by ToString(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.2_T2.3.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then + operator x + y returns the result of concatenating ToString(x) followed + by ToString(y) +es5id: 11.6.1_A3.2_T2.3 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" + undefined !== "1undefined") { @@ -27,4 +31,3 @@ if (new String("1") + undefined !== "1undefined") { if (undefined + new String("1") !== "undefined1") { $ERROR('#4: undefined + new String("1") === "undefined1". Actual: ' + (undefined + new String("1"))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.4.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.4.js index a957677b7a..d8e932a36e 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.4.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A3.2_T2.4.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then operator x + y returns the result of concatenating ToString(x) followed by ToString(y) - * - * @path ch11/11.6/11.6.1/S11.6.1_A3.2_T2.4.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is String or Type(Primitive(y)) is String, then + operator x + y returns the result of concatenating ToString(x) followed + by ToString(y) +es5id: 11.6.1_A3.2_T2.4 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Null +---*/ //CHECK#1 if ("1" + null !== "1null") { @@ -27,4 +31,3 @@ if (new String("1") + null !== "1null") { if (null + new String("1") !== "null1") { $ERROR('#4: null + new String("1") === "null1". Actual: ' + (null + new String("1"))); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T1.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T1.js index 8a8ac37da2..afaebcd53a 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T1.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T1.js - * @description If either operand is NaN, the result is NaN - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T1 +description: If either operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN + 1) !== true ) { @@ -37,5 +38,3 @@ if (isNaN(Number.NaN + Number.NEGATIVE_INFINITY) !== true ) { if (isNaN(Number.NEGATIVE_INFINITY + Number.NaN) !== true ) { $ERROR('#6: Infinity + NaN === Not-a-Number. Actual: ' + (Infinity + NaN)); } - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T2.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T2.js index 6e6452567b..c72250637f 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T2.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T2.js - * @description The sum of two infinities of opposite sign is NaN - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T2 +description: The sum of two infinities of opposite sign is NaN +---*/ //CHECK#1 if (isNaN(Number.POSITIVE_INFINITY + Number.NEGATIVE_INFINITY) !== true ) { @@ -17,7 +18,3 @@ if (isNaN(Number.POSITIVE_INFINITY + Number.NEGATIVE_INFINITY) !== true ) { if (isNaN(Number.NEGATIVE_INFINITY + Number.POSITIVE_INFINITY) !== true ) { $ERROR('#2: -Infinity + Infinity === Not-a-Number. Actual: ' + (-Infinity + Infinity)); } - - - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T3.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T3.js index d434e6c233..139836a5b1 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T3.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T3.js - * @description The sum of two infinities of the same sign is the infinity of that sign - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T3 +description: > + The sum of two infinities of the same sign is the infinity of that + sign +---*/ //CHECK#1 if (Number.POSITIVE_INFINITY + Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY ) { @@ -17,7 +20,3 @@ if (Number.POSITIVE_INFINITY + Number.POSITIVE_INFINITY !== Number.POSITIVE_INFI if (Number.NEGATIVE_INFINITY + Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY ) { $ERROR('#2: -Infinity + -Infinity === -Infinity. Actual: ' + (-Infinity + -Infinity)); } - - - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T4.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T4.js index 4fd4a6f568..bc40ed6a7e 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T4.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T4.js - * @description The sum of an infinity and a finite value is equal to the infinite operand - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T4 +description: > + The sum of an infinity and a finite value is equal to the infinite + operand +---*/ //CHECK#1 if (Number.POSITIVE_INFINITY + 1 !== Number.POSITIVE_INFINITY ) { @@ -47,7 +50,3 @@ if (Number.NEGATIVE_INFINITY + Number.MAX_VALUE !== Number.NEGATIVE_INFINITY ) { if (-Number.MAX_VALUE + Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY ) { $ERROR('#8: -Number.MAX_VALUE + -Infinity === -Infinity. Actual: ' + (-Number.MAX_VALUE + -Infinity)); } - - - - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T5.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T5.js index 3ae18550ad..4ba502ffa5 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T5.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T5.js - * @description The sum of two negative zeros is -0. The sum of two positive zeros, or of two zeros of opposite sign is +0 - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T5 +description: > + The sum of two negative zeros is -0. The sum of two positive + zeros, or of two zeros of opposite sign is +0 +---*/ //CHECK#1 if (-0 + -0 !== -0 ) { @@ -43,4 +46,3 @@ if (0 + 0 !== 0 ) { $ERROR('#4.2: 0 + 0 === + 0. Actual: -0'); } } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T6.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T6.js index b25a8fbae7..54599ddae2 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T6.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T6.js - * @description The sum of a zero and a nonzero finite value is equal to the nonzero operand - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T6 +description: > + The sum of a zero and a nonzero finite value is equal to the + nonzero operand +---*/ //CHECK#1 if (1 + -0 !== 1 ) { @@ -46,5 +49,4 @@ if (-0 + Number.MIN_VALUE !== Number.MIN_VALUE ) { //CHECK#8 if (0 + Number.MIN_VALUE !== Number.MIN_VALUE ) { $ERROR('#8: 0 + Number.MIN_VALUE === Number.MIN_VALUE. Actual: ' + (0 + Number.MIN_VALUE)); -} - +} diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T7.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T7.js index c8af57916e..05a7f3baa5 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T7.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T7.js - * @description The sum of two nonzero finite values of the same magnitude and opposite sign is +0 - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T7 +description: > + The sum of two nonzero finite values of the same magnitude and + opposite sign is +0 +---*/ //CHECK#1 if (-Number.MIN_VALUE + Number.MIN_VALUE !== +0) { @@ -34,4 +37,3 @@ if (-1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE !== +0) { $ERROR('#3.2: -1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE === + 0. Actual: -0'); } } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T8.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T8.js index ec90d44e54..88e19cc93a 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T8.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T8.js - * @description If the magnitude is too large to represent, the operation overflows and the result is then an infinity of appropriate sign - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T8 +description: > + If the magnitude is too large to represent, the operation + overflows and the result is then an infinity of appropriate sign +---*/ //CHECK#1 if (Number.MAX_VALUE + Number.MAX_VALUE !== Number.POSITIVE_INFINITY) { @@ -27,4 +30,3 @@ if (1e+308 + 1e+308 !== Number.POSITIVE_INFINITY) { if (-8.99e+307 - 8.99e+307 !== Number.NEGATIVE_INFINITY) { $ERROR('#4: -8.99e+307 - 8.99e+307 === Number.NEGATIVE_INFINITY. Actual: ' + (-8.99e+307 - 8.99e+307)); } - diff --git a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T9.js b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T9.js index bc082438aa..86b9af60ff 100644 --- a/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T9.js +++ b/test/suite/ch11/11.6/11.6.1/S11.6.1_A4_T9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of an addition is determined using the rules of IEEE 754 double-precision arithmetics - * - * @path ch11/11.6/11.6.1/S11.6.1_A4_T9.js - * @description The addition operator is not always associative ( x + y + z is the same (x + y) + z, not x + (y + z)) - */ +/*--- +info: > + The result of an addition is determined using the rules of IEEE 754 + double-precision arithmetics +es5id: 11.6.1_A4_T9 +description: > + The addition operator is not always associative ( x + y + z is the + same (x + y) + z, not x + (y + z)) +---*/ //CHECK#1 if (-Number.MAX_VALUE + Number.MAX_VALUE + Number.MAX_VALUE !== (-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE) { @@ -27,4 +30,3 @@ if ("1" + 1 + 1 !== ("1" + 1) + 1) { if (("1" + 1) + 1 === "1" + (1 + 1)) { $ERROR('#4: ("1" + 1) + 1 !== "1" + (1 + 1)'); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A1.js index c3c08a2213..dfac69f420 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between AdditiveExpression and "-" or between "-" and MultiplicativeExpression are allowed - * - * @path ch11/11.6/11.6.2/S11.6.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between AdditiveExpression and "-" or + between "-" and MultiplicativeExpression are allowed +es5id: 11.6.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009-\u00091") !== 0) { @@ -57,4 +58,3 @@ if (eval("1\u2029-\u20291") !== 0) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 0) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 0'); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T1.js index 8d85c82330..55fc886826 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y uses GetValue - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x - y uses GetValue +es5id: 11.6.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 - 1 !== 0) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop - objecty.prop !== 0) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop - objecty.prop === 0. Actual: ' + (objectx.prop - objecty.prop)); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T2.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T2.js index 34bcafc2b3..d9aa1d5acb 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T2.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y uses GetValue - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x - y uses GetValue +es5id: 11.6.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x - 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T3.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T3.js index e5ef600f8d..ace2ac5e84 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T3.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y uses GetValue - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x - y uses GetValue +es5id: 11.6.2_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1 - y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.2_T1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.2_T1.js index 3f24d4c13e..ad92291713 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.2_T1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y uses [[Default Value]] - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x - y uses [[Default Value]] +es5id: 11.6.2_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 1}} - 1 !== 0) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 - {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.3_T1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.3_T1.js index b54588088f..6fe5c1e485 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.3_T1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.6.2_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T1.js index 09b0a71844..ea6b22dffe 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (x - (x = 1) !== -1) { $ERROR('#2: var x = 0; x - (x = 1) === -1. Actual: ' + (x - (x = 1))); } - - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T2.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T2.js index ef853e38f9..0655afc8d6 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T2.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T3.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T3.js index ace9f2e953..d6aa5fb0e6 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T3.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.6/11.6.2/S11.6.2_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.2_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) - y !== 0) { $ERROR('#2: (y = 1) - y === 0. Actual: ' + ((y = 1) - y)); } - - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.1.js index 732297bf45..60e8cdd490 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true - true !== 0) { @@ -27,4 +28,3 @@ if (true - new Boolean(true) !== 0) { if (new Boolean(true) - new Boolean(true) !== 0) { $ERROR('#4: new Boolean(true) - new Boolean(true) === 0. Actual: ' + (new Boolean(true) - new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.2.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.2.js index 4a19423a05..bce07a7da8 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.2.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 - 1 !== 0) { @@ -27,5 +26,3 @@ if (1 - new Number(1) !== 0) { if (new Number(1) - new Number(1) !== 0) { $ERROR('#4: new Number(1) - new Number(1) === 0. Actual: ' + (new Number(1) - new Number(1))); } - - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.3.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.3.js index 5e2f31a808..42d96d4f4f 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.3.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" - "1" !== 0) { @@ -37,4 +36,3 @@ if (isNaN("x" - "1") !== true) { if (isNaN("1" - "x") !== true) { $ERROR('#6: "1" - "x" === Not-a-Number. Actual: ' + ("1" - "x")); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.4.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.4.js index a76eb66280..7f71ab6a5b 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.4.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (isNaN(null - undefined) !== true) { @@ -27,4 +26,3 @@ if (isNaN(undefined - undefined) !== true) { if (null - null !== 0) { $ERROR('#4: null - null === 0. Actual: ' + (null - null)); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.5.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.5.js index 21bc87c781..bc5d9c2d75 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.5.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (isNaN({} - function(){return 1}) !== true) { @@ -27,4 +26,3 @@ if (isNaN(function(){return 1} - function(){return 1}) !== true) { if (isNaN({} - {}) !== true) { $ERROR('#4: {} - {} === Not-a-Number. Actual: ' + ({} - {})); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.1.js index 8682a71544..96986dc24b 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true - 1 !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) - new Number(1) !== 0) { if (new Number(1) - new Boolean(true) !== 0) { $ERROR('#8: new Number(1) - new Boolean(true) === 0. Actual: ' + (new Number(1) - new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.2.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.2.js index 2c98620cc6..bef1291894 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.2.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" - 1 !== 0) { @@ -57,4 +58,3 @@ if (isNaN("x" - 1) !== true) { if (isNaN(1 - "x") !== true) { $ERROR('#10: 1 - "x" === Not-a-Number. Actual: ' + (1 - "x")); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.3.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.3.js index 9edba35bad..72cf3a6a16 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.3.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (1 - null !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) - null !== 1) { if (null - new Number(1) !== -1) { $ERROR('#4: null - new Number(1) === -1. Actual: ' + (null - new Number(1))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.4.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.4.js index 9169bacdd0..a8c9880cb9 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.4.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(1 - undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Number(1) - undefined) !== true) { if (isNaN(undefined - new Number(1)) !== true) { $ERROR('#4: undefined - new Number(1) === Not-a-Number. Actual: ' + (undefined - new Number(1))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.5.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.5.js index 953fb40880..148687feac 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.5.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true - "1" !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) - new String("1") !== 0) { if (new String("1") - new Boolean(true) !== 0) { $ERROR('#8: new String("1") - new Boolean(true) === 0. Actual: ' + (new String("1") - new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.6.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.6.js index 34fdcb3856..ea5d20be20 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.6.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN("1" - undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new String("1") - undefined) !== true) { if (isNaN(undefined - new String("1")) !== true) { $ERROR('#4: undefined - new String("1") === Not-a-Number. Actual: ' + (undefined - new String("1"))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.7.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.7.js index 3e467ed635..4fde8af02e 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.7.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if ("1" - null !== 1) { @@ -27,4 +28,3 @@ if (new String("1") - null !== 1) { if (null - new String("1") !== -1) { $ERROR('#4: null - new String("1") === -1. Actual: ' + (null - new String("1"))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.8.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.8.js index 92704df1de..862dc78270 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.8.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (isNaN(true - undefined) !== true) { @@ -27,4 +28,3 @@ if (isNaN(new Boolean(true) - undefined) !== true) { if (isNaN(undefined - new Boolean(true)) !== true) { $ERROR('#4: undefined - new Boolean(true) === Not-a-Number. Actual: ' + (undefined - new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.9.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.9.js index 22bbe59e5e..0e9e509e2d 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.9.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y returns ToNumber(x) - ToNumber(y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x - y returns ToNumber(x) - ToNumber(y) +es5id: 11.6.2_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true - null !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) - null !== 1) { if (null - new Boolean(true) !== -1) { $ERROR('#4: null - new Boolean(true) === -1. Actual: ' + (null - new Boolean(true))); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T1.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T1.js index 2ea5c563ce..192094f653 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T1.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T1.js - * @description If either operand is NaN, the result is NaN - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T1 +description: If either operand is NaN, the result is NaN +---*/ //CHECK#1 if (isNaN(Number.NaN - 1) !== true ) { @@ -37,4 +36,3 @@ if (isNaN(Number.NaN - Number.NEGATIVE_INFINITY) !== true ) { if (isNaN(Number.NEGATIVE_INFINITY - Number.NaN) !== true ) { $ERROR('#6: Infinity - NaN === Not-a-Number. Actual: ' + (Infinity - NaN)); } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T2.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T2.js index 3853092cab..9a4ef9f133 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T2.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T2.js - * @description The difference of two infinities of opposite sign is the infinity of minuend sign - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T2 +description: > + The difference of two infinities of opposite sign is the infinity + of minuend sign +---*/ //CHECK#1 if (Number.POSITIVE_INFINITY - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY ) { @@ -17,7 +18,3 @@ if (Number.POSITIVE_INFINITY - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFI if (Number.NEGATIVE_INFINITY - Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY ) { $ERROR('#2: -Infinity - Infinity === -Infinity. Actual: ' + (-Infinity - Infinity)); } - - - - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T3.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T3.js index e1c18e1cbd..a4bfe624cd 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T3.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T3.js - * @description The difference of two infinities of the same sign is NaN - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T3 +description: The difference of two infinities of the same sign is NaN +---*/ //CHECK#1 if (isNaN(Number.POSITIVE_INFINITY - Number.POSITIVE_INFINITY) !== true ) { @@ -17,7 +16,3 @@ if (isNaN(Number.POSITIVE_INFINITY - Number.POSITIVE_INFINITY) !== true ) { if (isNaN(Number.NEGATIVE_INFINITY - Number.NEGATIVE_INFINITY) !== true ) { $ERROR('#2: -Infinity - -Infinity === Not-a-Number. Actual: ' + (-Infinity - -Infinity)); } - - - - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T4.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T4.js index 2a0ddf37b0..84d4b4fe47 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T4.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T4.js - * @description The difference of an infinity and a finite value is equal to infinity of appropriate sign - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T4 +description: > + The difference of an infinity and a finite value is equal to + infinity of appropriate sign +---*/ //CHECK#1 if (Number.POSITIVE_INFINITY - 1 !== Number.POSITIVE_INFINITY ) { @@ -47,7 +48,3 @@ if (Number.NEGATIVE_INFINITY - Number.MAX_VALUE !== Number.NEGATIVE_INFINITY ) { if (-Number.MAX_VALUE - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY ) { $ERROR('#8: -Number.MAX_VALUE - -Infinity === Infinity. Actual: ' + (-Number.MAX_VALUE - -Infinity)); } - - - - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T5.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T5.js index bcc6ac2585..c52a2b58f0 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T5.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T5.js - * @description Using the rule of sum of two zeroes and the fact that a - b = a + (-b) - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T5 +description: > + Using the rule of sum of two zeroes and the fact that a - b = a + + (-b) +---*/ //CHECK#1 if (-0 - -0 !== 0 ) { @@ -43,4 +44,3 @@ if (0 - 0 !== 0 ) { $ERROR('#4.2: 0 - 0 === + 0. Actual: -0'); } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T6.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T6.js index a71e3068f7..b432867555 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T6.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T6.js - * @description Using the rule of sum of a zero and a nonzero finite value and the fact that a - b = a + (-b) - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T6 +description: > + Using the rule of sum of a zero and a nonzero finite value and the + fact that a - b = a + (-b) +---*/ //CHECK#1 if (1 - -0 !== 1 ) { @@ -46,5 +47,4 @@ if (-0 - Number.MIN_VALUE !== -Number.MIN_VALUE ) { //CHECK#8 if (0 - Number.MIN_VALUE !== -Number.MIN_VALUE ) { $ERROR('#8: 0 - Number.MIN_VALUE === -Number.MIN_VALUE. Actual: ' + (0 - Number.MIN_VALUE)); -} - +} diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T7.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T7.js index 8f810cb460..903514ca72 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T7.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T7.js - * @description The mathematical difference of two nonzero finite values of the same magnitude and same sign is +0 - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T7 +description: > + The mathematical difference of two nonzero finite values of the + same magnitude and same sign is +0 +---*/ //CHECK#1 if (Number.MIN_VALUE - Number.MIN_VALUE !== +0) { @@ -34,4 +35,3 @@ if (1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE !== +0) { $ERROR('#3.2: 1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE === + 0. Actual: -0'); } } - diff --git a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T8.js b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T8.js index b8a5cd4e84..97a3939cf2 100644 --- a/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T8.js +++ b/test/suite/ch11/11.6/11.6.2/S11.6.2_A4_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x - y produces the same result as x + (-y) - * - * @path ch11/11.6/11.6.2/S11.6.2_A4_T8.js - * @description If the magnitude is too large to represent, the operation overflows and the result is then an infinity of appropriate sign - */ +/*--- +info: Operator x - y produces the same result as x + (-y) +es5id: 11.6.2_A4_T8 +description: > + If the magnitude is too large to represent, the operation + overflows and the result is then an infinity of appropriate sign +---*/ //CHECK#1 if (Number.MAX_VALUE - -Number.MAX_VALUE !== Number.POSITIVE_INFINITY) { @@ -27,4 +28,3 @@ if (1e+308 - -1e+308 !== Number.POSITIVE_INFINITY) { if (-8.99e+307 - 8.99e+307 !== Number.NEGATIVE_INFINITY) { $ERROR('#4: -8.99e+307 - 8.99e+307 === Number.NEGATIVE_INFINITY. Actual: ' + (-8.99e+307 - 8.99e+307)); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A1.js index 4b4e16d24f..09363707e6 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between ShiftExpression and "<<" or between "<<" and AdditiveExpression are allowed - * - * @path ch11/11.7/11.7.1/S11.7.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between ShiftExpression and "<<" or + between "<<" and AdditiveExpression are allowed +es5id: 11.7.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009<<\u00091") !== 2) { @@ -57,4 +58,3 @@ if (eval("1\u2029<<\u20291") !== 2) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029<<\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 2) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<<\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 2'); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T1.js index e1066f118a..5a0cbd73cf 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y uses GetValue - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x << y uses GetValue +es5id: 11.7.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (2 << 1 !== 4) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop << objecty.prop !== 4) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 2; objecty.prop = 1; objectx.prop << objecty.prop === 4. Actual: ' + (objectx.prop << objecty.prop)); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T2.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T2.js index 1d6dcee60f..1442727935 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T2.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y uses GetValue - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x << y uses GetValue +es5id: 11.7.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x << 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T3.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T3.js index b33c6c680a..f20abc03c5 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T3.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y uses GetValue - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x << y uses GetValue +es5id: 11.7.1_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: 1 << y throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.2_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.2_T1.js index b0403a9fbb..8cb17527bf 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.2_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y uses [[Default Value]] - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x << y uses [[Default Value]] +es5id: 11.7.1_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 1}} << 1 !== 2) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 << {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.3_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.3_T1.js index e068524898..83a020f90f 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.3_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.7.1_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T1.js index 1beb867942..9f6d969558 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (x << (x = 1) !== 0) { $ERROR('#2: var x = 0; x << (x = 1) === 0. Actual: ' + (x << (x = 1))); } - - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T2.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T2.js index e44dd956a8..43ace296a2 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T2.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T3.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T3.js index ed53451ace..c5b1a19733 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T3.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.1/S11.7.1_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.1_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) << y !== 2) { $ERROR('#2: (y = 1) << y === 2. Actual: ' + ((y = 1) << y)); } - - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.1.js index 5e1e846963..4464f5d15b 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true << true !== 2) { @@ -27,4 +28,3 @@ if (true << new Boolean(true) !== 2) { if (new Boolean(true) << new Boolean(true) !== 2) { $ERROR('#4: new Boolean(true) << new Boolean(true) === 2. Actual: ' + (new Boolean(true) << new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.2.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.2.js index 06d8dca641..d108904c63 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.2.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 << 1 !== 2) { @@ -27,5 +26,3 @@ if (1 << new Number(1) !== 2) { if (new Number(1) << new Number(1) !== 2) { $ERROR('#4: new Number(1) << new Number(1) === 2. Actual: ' + (new Number(1) << new Number(1))); } - - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.3.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.3.js index 400362c34e..356ff0c30e 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.3.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" << "1" !== 2) { @@ -37,4 +36,3 @@ if ("x" << "1" !== 0) { if ("1" << "x" !== 1) { $ERROR('#6: "1" << "x" === 1. Actual: ' + ("1" << "x")); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.4.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.4.js index f96d4eee5e..02d980ed56 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.4.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (null << undefined !== 0) { @@ -27,4 +26,3 @@ if (undefined << undefined !== 0) { if (null << null !== 0) { $ERROR('#4: null << null === 0. Actual: ' + (null << null)); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.5.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.5.js index a548852a96..5a71cb848e 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.5.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (({} << function(){return 1}) !== 0) { @@ -27,5 +26,3 @@ if ((function(){return 1} << function(){return 1}) !== 0) { if (({} << {}) !== 0) { $ERROR('#4: ({} << {}) === 0. Actual: ' + (({} << {}))); } - - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.1.js index 3865695e18..650aa881b4 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true << 1 !== 2) { @@ -47,4 +48,3 @@ if (new Boolean(true) << new Number(1) !== 2) { if (new Number(1) << new Boolean(true) !== 2) { $ERROR('#8: new Number(1) << new Boolean(true) === 2. Actual: ' + (new Number(1) << new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.2.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.2.js index 363ee72343..92e39decfa 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.2.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" << 1 !== 2) { @@ -57,4 +58,3 @@ if ("x" << 1 !== 0) { if (1 << "x" !== 1) { $ERROR('#10: 1 << "x" === 1. Actual: ' + (1 << "x")); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.3.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.3.js index 182b1fbd2c..e5b06bb4ec 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.3.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (1 << null !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) << null !== 1) { if (null << new Number(1) !== 0) { $ERROR('#4: null << new Number(1) === 0. Actual: ' + (null << new Number(1))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.4.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.4.js index 2a4836aa54..0a21f4440b 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.4.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 << undefined !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) << undefined !== 1) { if (undefined << new Number(1) !== 0) { $ERROR('#4: undefined << new Number(1) === 0. Actual: ' + (undefined << new Number(1))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.5.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.5.js index fa8652c5bf..400d69363a 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.5.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) or Boolean (primitive and object) - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) or Boolean (primitive and object) +---*/ //CHECK#1 if (true << "1" !== 2) { @@ -47,4 +48,3 @@ if (new Boolean(true) << new String("1") !== 2) { if (new String("1") << new Boolean(true) !== 2) { $ERROR('#8: new String("1") << new Boolean(true) === 2. Actual: ' + (new String("1") << new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.6.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.6.js index 4f5d8c668f..ba8d23d7ab 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.6.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" << undefined !== 1) { @@ -27,4 +28,3 @@ if (new String("1") << undefined !== 1) { if (undefined << new String("1") !== 0) { $ERROR('#4: undefined << new String("1") === 0. Actual: ' + (undefined << new String("1"))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.7.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.7.js index da246f173b..c4e75597ab 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.7.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if ("1" << null !== 1) { @@ -27,4 +28,3 @@ if (new String("1") << null !== 1) { if (null << new String("1") !== 0) { $ERROR('#4: null << new String("1") === 0. Actual: ' + (null << new String("1"))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.8.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.8.js index 6c0d3858d7..83e6a38ea0 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.8.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true << undefined !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) << undefined !== 1) { if (undefined << new Boolean(true) !== 0) { $ERROR('#4: undefined << new Boolean(true) === 0. Actual: ' + (undefined << new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.9.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.9.js index 25935fea7a..ce44417cd5 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.9.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y returns ToNumber(x) << ToNumber(y) - * - * @path ch11/11.7/11.7.1/S11.7.1_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x << y returns ToNumber(x) << ToNumber(y) +es5id: 11.7.1_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true << null !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) << null !== 1) { if (null << new Boolean(true) !== 0) { $ERROR('#4: null << new Boolean(true) === 0. Actual: ' + (null << new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T1.js index 6c2416dd9c..22395e74dd 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x << y in distinct points - * - * @path ch11/11.7/11.7.1/S11.7.1_A4_T1.js - * @description ShiftExpression = -2^n, n = 0...15 - */ +/*--- +info: Check operator x << y in distinct points +es5id: 11.7.1_A4_T1 +description: ShiftExpression = -2^n, n = 0...15 +---*/ //CHECK @@ -2567,5 +2566,4 @@ if (-1073741824 << 15 !== 0) { if (-2147483648 << 15 !== 0) { $ERROR('#512: -2147483648 << 15 === 0. Actual: ' + (-2147483648 << 15)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T2.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T2.js index 0cdfbda0e2..d40752d3f9 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T2.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x << y in distinct points - * - * @path ch11/11.7/11.7.1/S11.7.1_A4_T2.js - * @description ShiftExpression = 2^n - 1, n = 16...31 - */ +/*--- +info: Check operator x << y in distinct points +es5id: 11.7.1_A4_T2 +description: ShiftExpression = 2^n - 1, n = 16...31 +---*/ //CHECK @@ -2567,6 +2566,4 @@ if (-1073741824 << 31 !== 0) { if (-2147483648 << 31 !== 0) { $ERROR('#1024: -2147483648 << 31 === 0. Actual: ' + (-2147483648 << 31)); -} - - +} diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T3.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T3.js index 5357d1857d..83693d7906 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T3.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x << y in distinct points - * - * @path ch11/11.7/11.7.1/S11.7.1_A4_T3.js - * @description ShiftExpression = 2^n - 1, n = 0...15 - */ +/*--- +info: Check operator x << y in distinct points +es5id: 11.7.1_A4_T3 +description: ShiftExpression = 2^n - 1, n = 0...15 +---*/ //CHECK @@ -2567,5 +2566,4 @@ if (1073741823 << 15 !== -32768) { if (2147483647 << 15 !== -32768) { $ERROR('#512: 2147483647 << 15 === -32768. Actual: ' + (2147483647 << 15)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T4.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T4.js index 15082a7ccd..3658ec0519 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T4.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x << y in distinct points - * - * @path ch11/11.7/11.7.1/S11.7.1_A4_T4.js - * @description ShiftExpression = 2^n - 1, n = 16...31 - */ +/*--- +info: Check operator x << y in distinct points +es5id: 11.7.1_A4_T4 +description: ShiftExpression = 2^n - 1, n = 16...31 +---*/ //CHECK @@ -2567,5 +2566,4 @@ if (1073741823 << 31 !== -2147483648) { if (2147483647 << 31 !== -2147483648) { $ERROR('#1024: 2147483647 << 31 === -2147483648. Actual: ' + (2147483647 << 31)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.1_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.1_T1.js index 49bdc5e7ec..9c91b7b223 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.1_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y uses ToInt32(ShiftExpression) - * - * @path ch11/11.7/11.7.1/S11.7.1_A5.1_T1.js - * @description Checking boundary points - */ +/*--- +info: Operator x << y uses ToInt32(ShiftExpression) +es5id: 11.7.1_A5.1_T1 +description: Checking boundary points +---*/ //CHECK#1 if (2147483648.1 << 0 !== -2147483648) { @@ -56,5 +55,4 @@ if (-4294967296.1 << 0 !== 0) { //CHECK#10 if (-6442450944.1 << 0 !== -2147483648) { $ERROR('#10: -6442450944.1 << 0 === -2147483648. Actual: ' + (-6442450944.1 << 0)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.2_T1.js b/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.2_T1.js index 689fe12034..eba9211259 100644 --- a/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.2_T1.js +++ b/test/suite/ch11/11.7/11.7.1/S11.7.1_A5.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x << y uses ToUint32(AdditiveExpression) & 31 - * - * @path ch11/11.7/11.7.1/S11.7.1_A5.2_T1.js - * @description Checking distinct points - */ +/*--- +info: Operator x << y uses ToUint32(AdditiveExpression) & 31 +es5id: 11.7.1_A5.2_T1 +description: Checking distinct points +---*/ //CHECK#1 if (1 << -32.1 !== 1) { @@ -326,5 +325,4 @@ if (1 << 62.1 !== 1073741824) { //CHECK#64 if (1 << 63.1 !== -2147483648) { $ERROR('#64: 1 << 63.1 === -2147483648. Actual: ' + (1 << 63.1)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A1.js index 086e038493..87ff5f1577 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between ShiftExpression and ">>" or between ">>" and AdditiveExpression are allowed - * - * @path ch11/11.7/11.7.2/S11.7.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between ShiftExpression and ">>" or + between ">>" and AdditiveExpression are allowed +es5id: 11.7.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("-4\u0009>>\u00091") !== -2) { @@ -57,4 +58,3 @@ if (eval("-4\u2029>>\u20291") !== -2) { if (eval("-4\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== -2) { $ERROR('#10: -4\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === -2'); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T1.js index b036436d8c..84c16b9fa8 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y uses GetValue - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x >> y uses GetValue +es5id: 11.7.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (-4 >> 1 !== -2) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop >> objecty.prop !== -2) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = -4; objecty.prop = 1; objectx.prop >> objecty.prop === -2. Actual: ' + (objectx.prop >> objecty.prop)); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T2.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T2.js index 107ac4ade3..c3227ff12d 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T2.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y uses GetValue - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x >> y uses GetValue +es5id: 11.7.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x >> 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T3.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T3.js index 1ce6c6dd2a..e21647864e 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T3.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y uses GetValue - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x >> y uses GetValue +es5id: 11.7.2_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 >> y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.2_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.2_T1.js index 3debe0ae1a..94f937f1d3 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.2_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y uses [[Default Value]] - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x >> y uses [[Default Value]] +es5id: 11.7.2_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return -4}} >> 1 !== -2) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: -4 >> {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.3_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.3_T1.js index 1d3d1c5444..635d1dd64c 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.3_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.7.2_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T1.js index 310bee61f2..9fc90e3745 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = -4; if (x >> (x = 1) !== -2) { $ERROR('#2: var x = -4; x >> (x = 1) === -2. Actual: ' + (x >> (x = 1))); } - - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T2.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T2.js index 4f1eb349af..ab1405f75c 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T2.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T3.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T3.js index 45f52d79d6..f1489904ad 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T3.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.2/S11.7.2_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.2_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) >> y !== 0) { $ERROR('#2: (y = 1) >> y === 0. Actual: ' + ((y = 1) >> y)); } - - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.1.js index 0f872cd256..c5a4ad5424 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true >> true !== 0) { @@ -27,4 +28,3 @@ if (true >> new Boolean(true) !== 0) { if (new Boolean(true) >> new Boolean(true) !== 0) { $ERROR('#4: new Boolean(true) >> new Boolean(true) === 0. Actual: ' + (new Boolean(true) >> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.2.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.2.js index 0398c019a9..03222244a7 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.2.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 >> 1 !== 0) { @@ -27,5 +26,3 @@ if (1 >> new Number(1) !== 0) { if (new Number(1) >> new Number(1) !== 0) { $ERROR('#4: new Number(1) >> new Number(1) === 0. Actual: ' + (new Number(1) >> new Number(1))); } - - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.3.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.3.js index 7172e563c8..40f91fca39 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.3.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" >> "1" !== 0) { @@ -37,4 +36,3 @@ if ("x" >> "1" !== 0) { if ("1" >> "x" !== 1) { $ERROR('#6: "1" >> "x" === 1. Actual: ' + ("1" >> "x")); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.4.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.4.js index b792d7c82e..1afcee06fa 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.4.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (null >> undefined !== 0) { @@ -27,4 +26,3 @@ if (undefined >> undefined !== 0) { if (null >> null !== 0) { $ERROR('#4: null >> null === 0. Actual: ' + (null >> null)); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.5.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.5.js index 3f208836ff..a3c14c5f24 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.5.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (({} >> function(){return 1}) !== 0) { @@ -27,5 +26,3 @@ if ((function(){return 1} >> function(){return 1}) !== 0) { if (({} >> {}) !== 0) { $ERROR('#4: ({} >> {}) === 0. Actual: ' + (({} >> {}))); } - - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.1.js index 808fb0e3ac..cf07fe63c7 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true >> 1 !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) >> new Number(1) !== 0) { if (new Number(1) >> new Boolean(true) !== 0) { $ERROR('#8: new Number(1) >> new Boolean(true) === 0. Actual: ' + (new Number(1) >> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.2.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.2.js index 57c037ae09..a450360adc 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.2.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" >> 1 !== 0) { @@ -57,4 +58,3 @@ if ("x" >> 1 !== 0) { if (1 >> "x" !== 1) { $ERROR('#10: 1 >> "x" === 1. Actual: ' + (1 >> "x")); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.3.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.3.js index fe7a31aaaa..342554c753 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.3.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (1 >> null !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) >> null !== 1) { if (null >> new Number(1) !== 0) { $ERROR('#4: null >> new Number(1) === 0. Actual: ' + (null >> new Number(1))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.4.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.4.js index 138b776813..34b3fb1544 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.4.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 >> undefined !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) >> undefined !== 1) { if (undefined >> new Number(1) !== 0) { $ERROR('#4: undefined >> new Number(1) === 0. Actual: ' + (undefined >> new Number(1))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.5.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.5.js index ca296c62e1..2a38bdb2df 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.5.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true >> "1" !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) >> new String("1") !== 0) { if (new String("1") >> new Boolean(true) !== 0) { $ERROR('#8: new String("1") >> new Boolean(true) === 0. Actual: ' + (new String("1") >> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.6.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.6.js index ea18c20a60..0118cb7a20 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.6.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" >> undefined !== 1) { @@ -27,4 +28,3 @@ if (new String("1") >> undefined !== 1) { if (undefined >> new String("1") !== 0) { $ERROR('#4: undefined >> new String("1") === 0. Actual: ' + (undefined >> new String("1"))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.7.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.7.js index 3061313c24..ce064f9a0f 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.7.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if ("1" >> null !== 1) { @@ -27,4 +28,3 @@ if (new String("1") >> null !== 1) { if (null >> new String("1") !== 0) { $ERROR('#4: null >> new String("1") === 0. Actual: ' + (null >> new String("1"))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.8.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.8.js index a918a6791e..2508e47b2d 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.8.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true >> undefined !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) >> undefined !== 1) { if (undefined >> new Boolean(true) !== 0) { $ERROR('#4: undefined >> new Boolean(true) === 0. Actual: ' + (undefined >> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.9.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.9.js index f5cbaf9447..60bbe365e9 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.9.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y returns ToNumber(x) >> ToNumber(y) - * - * @path ch11/11.7/11.7.2/S11.7.2_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x >> y returns ToNumber(x) >> ToNumber(y) +es5id: 11.7.2_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true >> null !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) >> null !== 1) { if (null >> new Boolean(true) !== 0) { $ERROR('#4: null >> new Boolean(true) === 0. Actual: ' + (null >> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T1.js index 851139bb1a..5be9fb1232 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check x >> y operator in distinct points - * - * @path ch11/11.7/11.7.2/S11.7.2_A4_T1.js - * @description ShiftExpression = -2^n, n = 0...15 - */ +/*--- +info: Check x >> y operator in distinct points +es5id: 11.7.2_A4_T1 +description: ShiftExpression = -2^n, n = 0...15 +---*/ //CHECK @@ -2567,5 +2566,4 @@ if (-1073741824 >> 15 !== -32768) { if (-2147483648 >> 15 !== -65536) { $ERROR('#512: -2147483648 >> 15 === -65536. Actual: ' + (-2147483648 >> 15)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T2.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T2.js index 7077af8530..bdfd02feac 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T2.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check x >> y operator in distinct points - * - * @path ch11/11.7/11.7.2/S11.7.2_A4_T2.js - * @description ShiftExpression = 2^n - 1, n = 16...31 - */ +/*--- +info: Check x >> y operator in distinct points +es5id: 11.7.2_A4_T2 +description: ShiftExpression = 2^n - 1, n = 16...31 +---*/ //CHECK @@ -2568,4 +2567,3 @@ if (-1073741824 >> 31 !== -1) { if (-2147483648 >> 31 !== -1) { $ERROR('#1024: -2147483648 >> 31 === -1. Actual: ' + (-2147483648 >> 31)); } - diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T3.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T3.js index 40f8d686df..dfa16c66a0 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T3.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check x >> y operator in distinct points - * - * @path ch11/11.7/11.7.2/S11.7.2_A4_T3.js - * @description ShiftExpression = 2^n - 1, n = 0...15 - */ +/*--- +info: Check x >> y operator in distinct points +es5id: 11.7.2_A4_T3 +description: ShiftExpression = 2^n - 1, n = 0...15 +---*/ //CHECK @@ -2567,5 +2566,4 @@ if (1073741823 >> 15 !== 32767) { if (2147483647 >> 15 !== 65535) { $ERROR('#512: 2147483647 >> 15 === 65535. Actual: ' + (2147483647 >> 15)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T4.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T4.js index aa1e0065ac..9dd6c934c4 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T4.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check x >> y operator in distinct points - * - * @path ch11/11.7/11.7.2/S11.7.2_A4_T4.js - * @description ShiftExpression = 2^n - 1, n = 16...31 - */ +/*--- +info: Check x >> y operator in distinct points +es5id: 11.7.2_A4_T4 +description: ShiftExpression = 2^n - 1, n = 16...31 +---*/ //CHECK @@ -2562,5 +2561,4 @@ if (536870911 >> 31 !== 0) { if (1073741823 >> 31 !== 0) { $ERROR('#1023: 1073741823 >> 31 === 0. Actual: ' + (1073741823 >> 31)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.1_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.1_T1.js index aa732c3118..ece7ace85e 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.1_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y uses ToInt32(ShiftExpression) - * - * @path ch11/11.7/11.7.2/S11.7.2_A5.1_T1.js - * @description Checking boundary points - */ +/*--- +info: Operator x >> y uses ToInt32(ShiftExpression) +es5id: 11.7.2_A5.1_T1 +description: Checking boundary points +---*/ //CHECK#1 if (2147483648.1 >> 0 !== -2147483648) { @@ -56,5 +55,4 @@ if (-4294967296.1 >> 0 !== 0) { //CHECK#10 if (-6442450944.1 >> 0 !== -2147483648) { $ERROR('#10: -6442450944.1 >> 0 === -2147483648. Actual: ' + (-6442450944.1 >> 0)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.2_T1.js b/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.2_T1.js index 64eca8df30..6126cf4ef5 100644 --- a/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.2_T1.js +++ b/test/suite/ch11/11.7/11.7.2/S11.7.2_A5.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >> y uses ToUint32(AdditiveExpression) & 31 - * - * @path ch11/11.7/11.7.2/S11.7.2_A5.2_T1.js - * @description Checking distinct points - */ +/*--- +info: Operator x >> y uses ToUint32(AdditiveExpression) & 31 +es5id: 11.7.2_A5.2_T1 +description: Checking distinct points +---*/ //CHECK#1 if (2147483647 >> -32.1 !== 2147483647) { @@ -326,5 +325,4 @@ if (2147483647 >> 62.1 !== 1) { //CHECK#64 if (2147483647 >> 63.1 !== 0) { $ERROR('#64: 2147483647 >> 63.1 === 0. Actual: ' + (2147483647 >> 63.1)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A1.js index 58906e8fb1..1ff3b4e366 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between ShiftExpression and ">>>" or between ">>>" and AdditiveExpression are allowed - * - * @path ch11/11.7/11.7.3/S11.7.3_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between ShiftExpression and ">>>" or + between ">>>" and AdditiveExpression are allowed +es5id: 11.7.3_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("-4\u0009>>>\u00091") !== 2147483646) { @@ -57,4 +58,3 @@ if (eval("-4\u2029>>>\u20291") !== 2147483646) { if (eval("-4\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>>\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== 2147483646) { $ERROR('#10: -4\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>>\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291 === 2147483646'); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T1.js index e153a762e8..841feae2ef 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y uses GetValue - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x >>> y uses GetValue +es5id: 11.7.3_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (-4 >>> 1 !== 2147483646) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop >>> objecty.prop !== 2147483646) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = -4; objecty.prop = 1; objectx.prop >>> objecty.prop === 2147483646. Actual: ' + (objectx.prop >>> objecty.prop)); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T2.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T2.js index cae3ab7736..6c3cb60a47 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T2.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y uses GetValue - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x >>> y uses GetValue +es5id: 11.7.3_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x >>> 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T3.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T3.js index e682a064aa..02c4402d9b 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T3.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y uses GetValue - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x >>> y uses GetValue +es5id: 11.7.3_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 >>> y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.2_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.2_T1.js index f678b914dc..f326a91578 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.2_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y uses [[Default Value]] - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x >>> y uses [[Default Value]] +es5id: 11.7.3_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return -4}} >>> 1 !== 2147483646) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: -4 >>> {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.3_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.3_T1.js index 717afe75d0..b872972cdb 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.3_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.7.3_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T1.js index 7291d20fd6..164744a6d8 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.3_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = -4; if (x >>> (x = 1) !== 2147483646) { $ERROR('#2: var x = -4; x >>> (x = 1) === 2147483646. Actual: ' + (x >>> (x = 1))); } - - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T2.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T2.js index 84069b1f11..2e96efc224 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T2.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.3_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T3.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T3.js index 72f08b3eec..d44c785df5 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T3.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.7/11.7.3/S11.7.3_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.3_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) >>> y !== 0) { $ERROR('#2: (y = 1) >>> y === 0. Actual: ' + ((y = 1) >>> y)); } - - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.1.js index 0d90bbd6f7..171f846821 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T1.1.js - * @description Type(x) and Type(y) vary between primitive boolean and Boolean object - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T1.1 +description: > + Type(x) and Type(y) vary between primitive boolean and Boolean + object +---*/ //CHECK#1 if (true >>> true !== 0) { @@ -27,4 +28,3 @@ if (true >>> new Boolean(true) !== 0) { if (new Boolean(true) >>> new Boolean(true) !== 0) { $ERROR('#4: new Boolean(true) >>> new Boolean(true) === 0. Actual: ' + (new Boolean(true) >>> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.2.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.2.js index 48d41b63a3..f114a899dc 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.2.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T1.2.js - * @description Type(x) and Type(y) vary between primitive number and Number object - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T1.2 +description: Type(x) and Type(y) vary between primitive number and Number object +---*/ //CHECK#1 if (1 >>> 1 !== 0) { @@ -27,5 +26,3 @@ if (1 >>> new Number(1) !== 0) { if (new Number(1) >>> new Number(1) !== 0) { $ERROR('#4: new Number(1) >>> new Number(1) === 0. Actual: ' + (new Number(1) >>> new Number(1))); } - - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.3.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.3.js index 60bf9d3109..90e1ef5d56 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.3.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T1.3.js - * @description Type(x) and Type(y) vary between primitive string and String object - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T1.3 +description: Type(x) and Type(y) vary between primitive string and String object +---*/ //CHECK#1 if ("1" >>> "1" !== 0) { @@ -37,4 +36,3 @@ if ("x" >>> "1" !== 0) { if ("1" >>> "x" !== 1) { $ERROR('#6: "1" >>> "x" === 1. Actual: ' + ("1" >>> "x")); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.4.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.4.js index 8da5b55c1a..04c5a34f2f 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.4.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T1.4.js - * @description Type(x) and Type(y) vary between Null and Undefined - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T1.4 +description: Type(x) and Type(y) vary between Null and Undefined +---*/ //CHECK#1 if (null >>> undefined !== 0) { @@ -27,4 +26,3 @@ if (undefined >>> undefined !== 0) { if (null >>> null !== 0) { $ERROR('#4: null >>> null === 0. Actual: ' + (null >>> null)); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.5.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.5.js index aa023e2861..e135d9c91d 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.5.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T1.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T1.5.js - * @description Type(x) and Type(y) vary between Object object and Function object - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T1.5 +description: Type(x) and Type(y) vary between Object object and Function object +---*/ //CHECK#1 if (({} >>> function(){return 1}) !== 0) { @@ -27,4 +26,3 @@ if ((function(){return 1} >>> function(){return 1}) !== 0) { if (({} >>> {}) !== 0) { $ERROR('#4: ({} >>> {}) === 0. Actual: ' + (({} >>> {}))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.1.js index ef7427e70a..376238d498 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.1.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.1 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true >>> 1 !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) >>> new Number(1) !== 0) { if (new Number(1) >>> new Boolean(true) !== 0) { $ERROR('#8: new Number(1) >>> new Boolean(true) === 0. Actual: ' + (new Number(1) >>> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.2.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.2.js index 04cf0bd1b6..4d6acf360b 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.2.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.2.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.2 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and String (primitive and object) +---*/ //CHECK#1 if ("1" >>> 1 !== 0) { @@ -57,4 +58,3 @@ if ("x" >>> 1 !== 0) { if (1 >>> "x" !== 1) { $ERROR('#10: 1 >>> "x" === 1. Actual: ' + (1 >>> "x")); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.3.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.3.js index 658d6029c0..61cddc7b6f 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.3.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.3.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.3 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Null +---*/ //CHECK#1 if (1 >>> null !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) >>> null !== 1) { if (null >>> new Number(1) !== 0) { $ERROR('#4: null >>> new Number(1) === 0. Actual: ' + (null >>> new Number(1))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.4.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.4.js index a398f8a094..f9a6f4ce0a 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.4.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.4.js - * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.4 +description: > + Type(x) is different from Type(y) and both types vary between + Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 >>> undefined !== 1) { @@ -27,4 +28,3 @@ if (new Number(1) >>> undefined !== 1) { if (undefined >>> new Number(1) !== 0) { $ERROR('#4: undefined >>> new Number(1) === 0. Actual: ' + (undefined >>> new Number(1))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.5.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.5.js index 83fc64bb21..4679e63811 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.5.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.5.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.5 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Boolean (primitive and object) +---*/ //CHECK#1 if (true >>> "1" !== 0) { @@ -47,4 +48,3 @@ if (new Boolean(true) >>> new String("1") !== 0) { if (new String("1") >>> new Boolean(true) !== 0) { $ERROR('#8: new String("1") >>> new Boolean(true) === 0. Actual: ' + (new String("1") >>> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.6.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.6.js index 63d3e42636..5aa0dfb992 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.6.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.6.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.6 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" >>> undefined !== 1) { @@ -27,4 +28,3 @@ if (new String("1") >>> undefined !== 1) { if (undefined >>> new String("1") !== 0) { $ERROR('#4: undefined >>> new String("1") === 0. Actual: ' + (undefined >>> new String("1"))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.7.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.7.js index c19be4a7dd..9f1721fe32 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.7.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.7.js - * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.7 +description: > + Type(x) is different from Type(y) and both types vary between + String (primitive or object) and Null +---*/ //CHECK#1 if ("1" >>> null !== 1) { @@ -27,4 +28,3 @@ if (new String("1") >>> null !== 1) { if (null >>> new String("1") !== 0) { $ERROR('#4: null >>> new String("1") === 0. Actual: ' + (null >>> new String("1"))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.8.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.8.js index 98636ab0f8..d9f84acd3f 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.8.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.8.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.8 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true >>> undefined !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) >>> undefined !== 1) { if (undefined >>> new Boolean(true) !== 0) { $ERROR('#4: undefined >>> new Boolean(true) === 0. Actual: ' + (undefined >>> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.9.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.9.js index aacc034f5d..e2cbbff695 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.9.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A3_T2.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y returns ToNumber(x) >>> ToNumber(y) - * - * @path ch11/11.7/11.7.3/S11.7.3_A3_T2.9.js - * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: Operator x >>> y returns ToNumber(x) >>> ToNumber(y) +es5id: 11.7.3_A3_T2.9 +description: > + Type(x) is different from Type(y) and both types vary between + Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true >>> null !== 1) { @@ -27,4 +28,3 @@ if (new Boolean(true) >>> null !== 1) { if (null >>> new Boolean(true) !== 0) { $ERROR('#4: null >>> new Boolean(true) === 0. Actual: ' + (null >>> new Boolean(true))); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T1.js index c05ddc4e5d..6dd4719cb3 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x >>> y in distinct points - * - * @path ch11/11.7/11.7.3/S11.7.3_A4_T1.js - * @description ShiftExpression = 2^n, n = 0...15 - */ +/*--- +info: Check operator x >>> y in distinct points +es5id: 11.7.3_A4_T1 +description: ShiftExpression = 2^n, n = 0...15 +---*/ //CHECK @@ -2567,5 +2566,4 @@ if (1073741824 >>> 15 !== 32768) { if (2147483648 >>> 15 !== 65536) { $ERROR('#512: 2147483648 >>> 15 === 65536. Actual: ' + (2147483648 >>> 15)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T2.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T2.js index 6413607764..88d88c4e31 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T2.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x >>> y in distinct points - * - * @path ch11/11.7/11.7.3/S11.7.3_A4_T2.js - * @description ShiftExpression = 2^n - 1, n = 16...31 - */ +/*--- +info: Check operator x >>> y in distinct points +es5id: 11.7.3_A4_T2 +description: ShiftExpression = 2^n - 1, n = 16...31 +---*/ //CHECK @@ -2568,4 +2567,3 @@ if (1073741824 >>> 31 !== 0) { if (2147483648 >>> 31 !== 1) { $ERROR('#1024: 2147483648 >>> 31 === 1. Actual: ' + (2147483648 >>> 31)); } - diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T3.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T3.js index 05cf9e7a23..d664c327a4 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T3.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x >>> y in distinct points - * - * @path ch11/11.7/11.7.3/S11.7.3_A4_T3.js - * @description ShiftExpression = 2^n - 1, n = 0...15 - */ +/*--- +info: Check operator x >>> y in distinct points +es5id: 11.7.3_A4_T3 +description: ShiftExpression = 2^n - 1, n = 0...15 +---*/ //CHECK @@ -2647,5 +2646,4 @@ if (2147483647 >>> 15 !== 65535) { if (4294967295 >>> 15 !== 131071) { $ERROR('#528: 4294967295 >>> 15 === 131071. Actual: ' + (4294967295 >>> 15)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T4.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T4.js index b8af33ec24..aaef533ece 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T4.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check operator x >>> y in distinct points - * - * @path ch11/11.7/11.7.3/S11.7.3_A4_T4.js - * @description ShiftExpression = 2^n - 1, n = 16...31 - */ +/*--- +info: Check operator x >>> y in distinct points +es5id: 11.7.3_A4_T4 +description: ShiftExpression = 2^n - 1, n = 16...31 +---*/ //CHECK @@ -2647,5 +2646,4 @@ if (2147483647 >>> 31 !== 0) { if (4294967295 >>> 31 !== 1) { $ERROR('#1056: 4294967295 >>> 31 === 1. Actual: ' + (4294967295 >>> 31)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.1_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.1_T1.js index a12bccd074..ed39947fec 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.1_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y uses ToUint32(ShiftExpression) - * - * @path ch11/11.7/11.7.3/S11.7.3_A5.1_T1.js - * @description Checking boundary points - */ +/*--- +info: Operator x >>> y uses ToUint32(ShiftExpression) +es5id: 11.7.3_A5.1_T1 +description: Checking boundary points +---*/ //CHECK#1 if (2147483648.1 >>> 0 !== 2147483648) { @@ -56,5 +55,4 @@ if (-4294967296.1 >>> 0 !== 0) { //CHECK#10 if (-6442450944.1 >>> 0 !== 2147483648) { $ERROR('#10: -6442450944.1 >>> 0 === 2147483648. Actual: ' + (-6442450944.1 >>> 0)); -} - +} diff --git a/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.2_T1.js b/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.2_T1.js index 84abb36164..bab5f88188 100644 --- a/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.2_T1.js +++ b/test/suite/ch11/11.7/11.7.3/S11.7.3_A5.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >>> y uses ToUint32(AdditiveExpression) & 31 - * - * @path ch11/11.7/11.7.3/S11.7.3_A5.2_T1.js - * @description Checking distinct points - */ +/*--- +info: Operator x >>> y uses ToUint32(AdditiveExpression) & 31 +es5id: 11.7.3_A5.2_T1 +description: Checking distinct points +---*/ //CHECK#1 if (4294967295 >>> -32.1 !== 4294967295) { @@ -326,6 +325,4 @@ if (4294967295 >>> 62.1 !== 3) { //CHECK#64 if (4294967295 >>> 63.1 !== 1) { $ERROR('#64: 4294967295 >>> 63.1 === 1. Actual: ' + (4294967295 >>> 63.1)); -} - - +} diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A1.js index 5203b73410..bc1f38951a 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between RelationalExpression and "<" or between "<" and ShiftExpression are allowed - * - * @path ch11/11.8/11.8.1/S11.8.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between RelationalExpression and "<" or + between "<" and ShiftExpression are allowed +es5id: 11.8.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("0\u0009<\u00091") !== true) { @@ -57,4 +58,3 @@ if (eval("0\u2029<\u20291") !== true) { if (eval("0\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029<\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== true) { $ERROR('#10: (0\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T1.js index 4bcd448cb5..ff3fadbdbc 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x < y uses GetValue - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x < y uses GetValue +es5id: 11.8.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 < 2 !== true) { @@ -40,4 +39,3 @@ objecty.prop = 2; if (objectx.prop < objecty.prop !== true) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 2; objectx.prop < objecty.prop === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T2.js index 591c7a7a50..54a780c208 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x < y uses GetValue - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x < y uses GetValue +es5id: 11.8.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x < 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T3.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T3.js index b71cac5280..e5a15384cc 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T3.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x < y uses GetValue - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x < y uses GetValue +es5id: 11.8.1_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 < y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.2_T1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.2_T1.js index 8641cf4f21..083d0fa8b3 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.2_T1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x < y uses [[Default Value]] - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x < y uses [[Default Value]] +es5id: 11.8.1_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 0}} < 1 !== true) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 < {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.3_T1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.3_T1.js index 9f7c478caa..f2a9ae5965 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.3_T1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.8.1_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T1.js index 7396404884..bfe33c47cf 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 1; @@ -19,5 +18,3 @@ var x = 0; if (x < (x = 1) !== true) { $ERROR('#2: var x = 0; x < (x = 1) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T2.js index acd8c1274c..43e1dbe47b 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T3.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T3.js index 657ef95f22..1aafa984f7 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T3.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.1/S11.8.1_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.1_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) < y !== false) { $ERROR('#2: (y = 1) < y === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.1.js index 0d01c8f9f9..e98c1e97e9 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + boolean and Boolean object +---*/ //CHECK#1 if (true < true !== false) { @@ -27,4 +30,3 @@ if (true < new Boolean(true) !== false) { if (new Boolean(true) < new Boolean(true) !== false) { $ERROR('#4: new Boolean(true) < new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.2.js index afec980fda..e538d980e5 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + number and Number object +---*/ //CHECK#1 if (1 < 1 !== false) { @@ -27,5 +30,3 @@ if (1 < new Number(1) !== false) { if (new Number(1) < new Number(1) !== false) { $ERROR('#4: new Number(1) < new Number(1) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.3.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.3.js index 7964cd27d3..9c82a337f3 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.3.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T1.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T1.3.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T1.3 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Null and + Undefined +---*/ //CHECK#1 if (null < undefined !== false) { @@ -27,4 +30,3 @@ if (undefined < undefined !== false) { if (null < null !== false) { $ERROR('#4: null < null === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.1.js index acbeb65db4..14d14a3fde 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.1.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types are Number (primitive or object) or Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.1 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types are Number (primitive or object) or Boolean (primitive and + object) +---*/ //CHECK#1 if (true < 1 !== false) { @@ -47,4 +51,3 @@ if (new Boolean(true) < new Number(1) !== false) { if (new Number(1) < new Boolean(true) !== false) { $ERROR('#8: new Number(1) < new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.2.js index e67f1c50ad..b43b28a3f7 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.2.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.2 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and String + (primitive and object) +---*/ //CHECK#1 if ("1" < 1 !== false) { @@ -57,4 +61,3 @@ if ("x" < 1 !== false) { if (1 < "x" !== false) { $ERROR('#10: 1 < "x" === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.3.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.3.js index 32d4fa5fa8..4334e57bd7 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.3.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.3.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.3 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Null +---*/ //CHECK#1 if (1 < null !== false) { @@ -27,4 +30,3 @@ if (new Number(1) < null !== false) { if (null < new Number(1) !== true) { $ERROR('#4: null < new Number(1) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.4.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.4.js index 19ce587cb2..4df3526662 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.4.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.4.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.4 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 < undefined !== false) { @@ -27,4 +30,3 @@ if (new Number(1) < undefined !== false) { if (undefined < new Number(1) !== false) { $ERROR('#4: undefined < new Number(1) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.5.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.5.js index 2ec157c858..fab535ccb9 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.5.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.5.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.5.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.5 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true < "1" !== false) { @@ -47,4 +51,3 @@ if (new Boolean(true) < new String("1") !== false) { if (new String("1") < new Boolean(true) !== false) { $ERROR('#8: new String("1") < new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.6.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.6.js index de4ef0016f..65492fed53 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.6.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.6.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.6 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" < undefined !== false) { @@ -27,4 +30,3 @@ if (new String("1") < undefined !== false) { if (undefined < new String("1") !== false) { $ERROR('#4: undefined < new String("1") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.7.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.7.js index 97e9c8fdde..c96ce9c399 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.7.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.7.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.7 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Null +---*/ //CHECK#1 if ("1" < null !== false) { @@ -27,4 +30,3 @@ if (new String("1") < null !== false) { if (null < new String("1") !== true) { $ERROR('#4: null < new String("1") === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.8.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.8.js index dcd5dfef84..d337cdd0c2 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.8.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.8.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.8 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true < undefined !== false) { @@ -27,4 +30,3 @@ if (new Boolean(true) < undefined !== false) { if (undefined < new Boolean(true) !== false) { $ERROR('#4: undefined < new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.9.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.9.js index 3e47b7d078..0dbbe2d753 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.9.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.1_T2.9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x < y returns ToNumber(x) < ToNumber(y) - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.1_T2.9.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x < y returns ToNumber(x) < ToNumber(y) +es5id: 11.8.1_A3.1_T2.9 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true < null !== false) { @@ -27,4 +30,3 @@ if (new Boolean(true) < null !== false) { if (null < new Boolean(true) !== true) { $ERROR('#4: null < new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.1.js index 9e1cb78116..8340f38bc4 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x < y returns ToString(x) < ToString(y), if Type(Primitive(x)) is String and Type(Primitive(y)) is String - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.2_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object - */ +/*--- +info: > + Operator x < y returns ToString(x) < ToString(y), if Type(Primitive(x)) + is String and Type(Primitive(y)) is String +es5id: 11.8.1_A3.2_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + string and String object +---*/ //CHECK#1 if ("1" < "1" !== false) { @@ -37,4 +40,3 @@ if ("x" < "1" !== false) { if ("1" < "x" !== true) { $ERROR('#6: "1" < "x" === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.2.js index 47068903b3..a531109b0a 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A3.2_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x < y returns ToString(x) < ToString(y), if Type(Primitive(x)) is String and Type(Primitive(y)) is String - * - * @path ch11/11.8/11.8.1/S11.8.1_A3.2_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object - */ +/*--- +info: > + Operator x < y returns ToString(x) < ToString(y), if Type(Primitive(x)) + is String and Type(Primitive(y)) is String +es5id: 11.8.1_A3.2_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Object + object and Function object +---*/ //CHECK#1 if (({} < function(){return 1}) !== ({}.toString() < function(){return 1}.toString())) { @@ -27,4 +30,3 @@ if ((function(){return 1} < function(){return 1}) !== (function(){return 1}.toSt if (({} < {}) !== ({}.toString() < {}.toString())) { $ERROR('#4: ({} < {}) === ({}.toString() < {}.toString())'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.1.js index 5dee6e657e..f635ff4350 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.1.js - * @description y is number primitive - */ +/*--- +info: If x is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.1_A4.1 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NaN < 0) !== false) { @@ -47,5 +46,3 @@ if ((Number.NaN < Number.MAX_VALUE) !== false) { if ((Number.NaN < Number.MIN_VALUE) !== false) { $ERROR('#8: (NaN < Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.10.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.10.js index 2caacdc42b..a8d5e3a1a0 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.10.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is a prefix of x, return false - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.10.js - * @description x and y are string primitives - */ +/*--- +info: If y is a prefix of x, return false +es5id: 11.8.1_A4.10 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" < "x") !== false) { @@ -38,5 +37,3 @@ var x = "x"; if ((x + "y" < x) !== false) { $ERROR('#6: var x = "x"; (x + "y" < x) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.11.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.11.js index 2c87da0300..550298f814 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.11.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is a prefix of y and x !== y, return true - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.11.js - * @description x and y are string primitives - */ +/*--- +info: If x is a prefix of y and x !== y, return true +es5id: 11.8.1_A4.11 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" < "x ") !== true) { @@ -48,6 +47,3 @@ if (("a\u0000" < "a\u0000a") !== true) { if (("x" < " x") !== false) { $ERROR('#8: ("x" < " x") === false'); } - - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T1.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T1.js index b8f0eb78d4..60fb2ffd06 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T1.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.12_T1.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.1_A4.12_T1 +description: x and y are string primitives +---*/ //CHECK#1 if (("xx" < "xy") !== true) { @@ -42,4 +44,3 @@ if (("a\u0000a" < "a\u0000b") !== true) { if (("aB" < "aa") !== true) { $ERROR('#7: ("aB" < aa") === true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T2.js index 0b0e2d5fbb..123cdf0678 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.12_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.12_T2.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.1_A4.12_T2 +description: x and y are string primitives +---*/ //CHECK#1 if (("0" < "x") !== true) { @@ -42,4 +44,3 @@ if (("+1" < "-1") !== true) { if (("1" < "1e-10") !== true) { $ERROR('#7: ("1" < "1e-10") !== true'); } - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.2.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.2.js index 2ab4adeb44..a3113daf80 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.2.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.2.js - * @description x is number primitive - */ +/*--- +info: If y is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.1_A4.2 +description: x is number primitive +---*/ //CHECK#1 if ((0 < Number.NaN) !== false) { @@ -47,5 +46,3 @@ if ((Number.MAX_VALUE < Number.NaN) !== false) { if ((Number.MIN_VALUE < Number.NaN) !== false) { $ERROR('#8: (Number.MIN_VALUE < NaN) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.3.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.3.js index 1fa8a49887..bac99037b2 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.3.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x and y are the same number value, return false - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.3.js - * @description x and y are number primitives - */ +/*--- +info: If x and y are the same number value, return false +es5id: 11.8.1_A4.3 +description: x and y are number primitives +---*/ //CHECK#1 if ((1 < 1) !== false) { @@ -42,6 +41,3 @@ if ((Number.MAX_VALUE < Number.MAX_VALUE) !== false) { if ((Number.MIN_VALUE < Number.MIN_VALUE) !== false) { $ERROR('#7: (Number.MIN_VALUE < Number.MIN_VALUE) === false'); } - - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.4.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.4.js index d04541e42f..4a4e280d6e 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.4.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x and y are +0 and -0, return false - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.4.js - * @description Checking all combinations - */ +/*--- +info: If x and y are +0 and -0, return false +es5id: 11.8.1_A4.4 +description: Checking all combinations +---*/ //CHECK#1 if ((0 < 0) !== false) { @@ -27,5 +26,3 @@ if ((+0 < -0) !== false) { if ((-0 < +0) !== false) { $ERROR('#4: (-0 < +0) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.5.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.5.js index d874e0fde7..83500f89dd 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.5.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, return false - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.5.js - * @description y is number primitive - */ +/*--- +info: If x is +Infinity, return false +es5id: 11.8.1_A4.5 +description: y is number primitive +---*/ //CHECK#1 if ((Number.POSITIVE_INFINITY < 0) !== false) { @@ -37,5 +36,3 @@ if ((Number.POSITIVE_INFINITY < Number.MAX_VALUE) !== false) { if ((Number.POSITIVE_INFINITY < Number.MIN_VALUE) !== false) { $ERROR('#6: (+Infinity < Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.6.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.6.js index 2dce0a45a2..c27e209e44 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.6.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +Infinity and x !== y, return true - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.6.js - * @description x is number primitive - */ +/*--- +info: If y is +Infinity and x !== y, return true +es5id: 11.8.1_A4.6 +description: x is number primitive +---*/ //CHECK#1 if ((0 < Number.POSITIVE_INFINITY) !== true) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE < Number.POSITIVE_INFINITY) !== true) { if ((Number.MIN_VALUE < Number.POSITIVE_INFINITY) !== true) { $ERROR('#6: (Number.MIN_VALUE < +Infinity) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.7.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.7.js index a54ec57be8..4995a03714 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.7.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity and x !== y, return true - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.7.js - * @description y is number primitive - */ +/*--- +info: If x is -Infinity and x !== y, return true +es5id: 11.8.1_A4.7 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NEGATIVE_INFINITY < 0) !== true) { @@ -37,5 +36,3 @@ if ((Number.NEGATIVE_INFINITY < Number.MAX_VALUE) !== true) { if ((Number.NEGATIVE_INFINITY < Number.MIN_VALUE) !== true) { $ERROR('#6: (-Infinity < Number.MIN_VALUE) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.8.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.8.js index ac5202d5ab..30245333e0 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.8.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -Infinity, return false - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.8.js - * @description x is number primitive - */ +/*--- +info: If y is -Infinity, return false +es5id: 11.8.1_A4.8 +description: x is number primitive +---*/ //CHECK#1 if ((0 < Number.NEGATIVE_INFINITY) !== false) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE < Number.NEGATIVE_INFINITY) !== false) { if ((Number.MIN_VALUE < Number.NEGATIVE_INFINITY) !== false) { $ERROR('#6: (Number.MIN_VALUE < -Infinity) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.9.js b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.9.js index 32839492cb..e4e33f1d98 100644 --- a/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.9.js +++ b/test/suite/ch11/11.8/11.8.1/S11.8.1_A4.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less than y and these values are both finite non-zero, return true; otherwise, return false - * - * @path ch11/11.8/11.8.1/S11.8.1_A4.9.js - * @description x and y are number primitives - */ +/*--- +info: > + If x is less than y and these values are both finite non-zero, return + true; otherwise, return false +es5id: 11.8.1_A4.9 +description: x and y are number primitives +---*/ //CHECK#1 if ((1.1 < 1) !== false) { @@ -47,6 +48,3 @@ if ((Number.MAX_VALUE/2 < Number.MAX_VALUE) !== true) { if ((Number.MIN_VALUE < Number.MIN_VALUE*2) !== true) { $ERROR('#8: (Number.MIN_VALUE < Number.MIN_VALUE*2) === true'); } - - - diff --git a/test/suite/ch11/11.8/11.8.2/11.8.2-1.js b/test/suite/ch11/11.8/11.8.2/11.8.2-1.js index 97270dca26..b4bbdc193c 100644 --- a/test/suite/ch11/11.8/11.8.2/11.8.2-1.js +++ b/test/suite/ch11/11.8/11.8.2/11.8.2-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.2/11.8.2-1.js - * @description 11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: valueOf > valueOf - */ - - -function testcase() { - var accessed = false; - var obj1 = { - valueOf: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - valueOf: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return !(obj1 > obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.2-1 +description: > + 11.8.2 Greater-than Operator - Partial left to right order + enforced when using Greater-than operator: valueOf > valueOf +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + valueOf: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + valueOf: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return !(obj1 > obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.2/11.8.2-2.js b/test/suite/ch11/11.8/11.8.2/11.8.2-2.js index 248452e992..441f703b05 100644 --- a/test/suite/ch11/11.8/11.8.2/11.8.2-2.js +++ b/test/suite/ch11/11.8/11.8.2/11.8.2-2.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.2/11.8.2-2.js - * @description 11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: valueOf > toString - */ - - -function testcase() { - var accessed = false; - var obj1 = { - valueOf: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - toString: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return !(obj1 > obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.2-2 +description: > + 11.8.2 Greater-than Operator - Partial left to right order + enforced when using Greater-than operator: valueOf > toString +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + valueOf: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + toString: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return !(obj1 > obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.2/11.8.2-3.js b/test/suite/ch11/11.8/11.8.2/11.8.2-3.js index b0db665336..7d677611c0 100644 --- a/test/suite/ch11/11.8/11.8.2/11.8.2-3.js +++ b/test/suite/ch11/11.8/11.8.2/11.8.2-3.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.2/11.8.2-3.js - * @description 11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: toString > valueOf - */ - - -function testcase() { - var accessed = false; - var obj1 = { - toString: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - valueOf: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return !(obj1 > obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.2-3 +description: > + 11.8.2 Greater-than Operator - Partial left to right order + enforced when using Greater-than operator: toString > valueOf +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + toString: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + valueOf: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return !(obj1 > obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.2/11.8.2-4.js b/test/suite/ch11/11.8/11.8.2/11.8.2-4.js index 50817010b6..25abafc3c3 100644 --- a/test/suite/ch11/11.8/11.8.2/11.8.2-4.js +++ b/test/suite/ch11/11.8/11.8.2/11.8.2-4.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.2/11.8.2-4.js - * @description 11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: toString > toString - */ - - -function testcase() { - var accessed = false; - var obj1 = { - toString: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - toString: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return !(obj1 > obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.2-4 +description: > + 11.8.2 Greater-than Operator - Partial left to right order + enforced when using Greater-than operator: toString > toString +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + toString: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + toString: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return !(obj1 > obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A1.js index e2d072282b..ef6b2b2dfd 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between RelationalExpression and ">" or ">" and ShiftExpression are allowed - * - * @path ch11/11.8/11.8.2/S11.8.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between RelationalExpression and ">" or + ">" and ShiftExpression are allowed +es5id: 11.8.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("0\u0009>\u00091") !== false) { @@ -57,4 +58,3 @@ if (eval("0\u2029>\u20291") !== false) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== true) { $ERROR('#10: (1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T1.js index 9ae91af514..8d3e8b8b8f 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x > y uses GetValue - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x > y uses GetValue +es5id: 11.8.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (2 > 1 !== true) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop > objecty.prop !== true) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 2; objecty.prop = 1; objectx.prop > objecty.prop === true'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T2.js index c6c0a2c716..f48f2f6198 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x > y uses GetValue - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x > y uses GetValue +es5id: 11.8.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x > 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T3.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T3.js index bf7dfc5e78..b8c13390c4 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T3.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x > y uses GetValue - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x > y uses GetValue +es5id: 11.8.2_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 > y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.2_T1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.2_T1.js index e8d7595ba2..d7518ae10b 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.2_T1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x > y uses [[Default Value]] - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x > y uses [[Default Value]] +es5id: 11.8.2_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 2}} > 1 !== true) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 > {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.3_T1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.3_T1.js index ab2e5a0e54..e94098a1c7 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.3_T1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In ES5, First expression should be evaluated first. - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.3_T1.js - * @description Checking that operands of a "<" evaluate left-to-right - */ +/*--- +info: In ES5, First expression should be evaluated first. +es5id: 11.8.2_A2.3_T1 +description: Checking that operands of a "<" evaluate left-to-right +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T1.js index ac5f1b5401..8709ef4fea 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 1; if (x > (x = 0) !== true) { $ERROR('#2: var x = 1; x > (x = 0) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T2.js index 274f117cba..ef92bafeee 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T3.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T3.js index d3228fdce1..76bac70103 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T3.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.2/S11.8.2_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.2_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) > y !== false) { $ERROR('#2: (y = 1) > y === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.1.js index 4f69c859ea..57a4dab6e3 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + boolean and Boolean object +---*/ //CHECK#1 if (true > true !== false) { @@ -27,4 +30,3 @@ if (true > new Boolean(true) !== false) { if (new Boolean(true) > new Boolean(true) !== false) { $ERROR('#4: new Boolean(true) > new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.2.js index 2a076c6c64..35ceb0acac 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + number and Number object +---*/ //CHECK#1 if (1 > 1 !== false) { @@ -27,5 +30,3 @@ if (1 > new Number(1) !== false) { if (new Number(1) > new Number(1) !== false) { $ERROR('#4: new Number(1) > new Number(1) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.3.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.3.js index 5972663494..68682d9fb4 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.3.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T1.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T1.3.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T1.3 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Null and + Undefined +---*/ //CHECK#1 if (null > undefined !== false) { @@ -27,4 +30,3 @@ if (undefined > undefined !== false) { if (null > null !== false) { $ERROR('#4: null > null === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.1.js index 81ba834004..88e50277d7 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.1.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.1 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true > 1 !== false) { @@ -47,4 +51,3 @@ if (new Boolean(true) > new Number(1) !== false) { if (new Number(1) > new Boolean(true) !== false) { $ERROR('#8: new Number(1) > new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.2.js index 4d6f8fc81b..f75725ba34 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.2.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.2 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and String + (primitive and object) +---*/ //CHECK#1 if ("1" > 1 !== false) { @@ -57,4 +61,3 @@ if ("x" > 1 !== false) { if (1 > "x" !== false) { $ERROR('#10: 1 > "x" === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.3.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.3.js index 63ec06aac3..c715f7b1c0 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.3.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.3.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.3 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Null +---*/ //CHECK#1 if (1 > null !== true) { @@ -27,4 +30,3 @@ if (new Number(1) > null !== true) { if (null > new Number(1) !== false) { $ERROR('#4: null > new Number(1) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.4.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.4.js index d98572cc56..b42284be4e 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.4.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.4.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.4 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 > undefined !== false) { @@ -27,4 +30,3 @@ if (new Number(1) > undefined !== false) { if (undefined > new Number(1) !== false) { $ERROR('#4: undefined > new Number(1) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.5.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.5.js index b739bd4dc3..a48edb976e 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.5.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.5.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.5.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.5 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true > "1" !== false) { @@ -47,4 +51,3 @@ if (new Boolean(true) > new String("1") !== false) { if (new String("1") > new Boolean(true) !== false) { $ERROR('#8: new String("1") > new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.6.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.6.js index 839884f834..a7b5bbc1aa 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.6.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.6.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.6 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" > undefined !== false) { @@ -27,4 +30,3 @@ if (new String("1") > undefined !== false) { if (undefined > new String("1") !== false) { $ERROR('#4: undefined > new String("1") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.7.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.7.js index 5b44d0a70d..6762d46507 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.7.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.7.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.7 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Null +---*/ //CHECK#1 if ("1" > null !== true) { @@ -27,4 +30,3 @@ if (new String("1") > null !== true) { if (null > new String("1") !== false) { $ERROR('#4: null > new String("1") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.8.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.8.js index 3a3c48e7a8..3a51ed9d58 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.8.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.8.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.8 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true > undefined !== false) { @@ -27,4 +30,3 @@ if (new Boolean(true) > undefined !== false) { if (undefined > new Boolean(true) !== false) { $ERROR('#4: undefined > new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.9.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.9.js index 32c04b23a5..e73cbfad5f 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.9.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.1_T2.9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x > y returns ToNumber(x) > ToNumber(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.1_T2.9.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x > y returns ToNumber(x) > ToNumber(y) +es5id: 11.8.2_A3.1_T2.9 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true > null !== true) { @@ -27,4 +30,3 @@ if (new Boolean(true) > null !== true) { if (null > new Boolean(true) !== false) { $ERROR('#4: null > new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.1.js index fb0bcb0168..857dea4eac 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String and Type(Primitive(y)) is String, then operator x > y returns ToString(x) > ToString(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.2_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object - */ +/*--- +info: > + If Type(Primitive(x)) is String and Type(Primitive(y)) is String, then + operator x > y returns ToString(x) > ToString(y) +es5id: 11.8.2_A3.2_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + string and String object +---*/ //CHECK#1 if ("1" > "1" !== false) { @@ -37,4 +40,3 @@ if ("x" > "1" !== true) { if ("1" > "x" !== false) { $ERROR('#6: "1" > "x" === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.2.js index cf6e2889b4..eb217beaaa 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A3.2_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is String and Type(Primitive(y)) is String, then operator x > y returns ToString(x) > ToString(y) - * - * @path ch11/11.8/11.8.2/S11.8.2_A3.2_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object - */ +/*--- +info: > + If Type(Primitive(x)) is String and Type(Primitive(y)) is String, then + operator x > y returns ToString(x) > ToString(y) +es5id: 11.8.2_A3.2_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Object + object and Function object +---*/ //CHECK#1 if (({} > function(){return 1}) !== ({}.toString() > function(){return 1}.toString())) { @@ -27,4 +30,3 @@ if ((function(){return 1} > function(){return 1}) !== (function(){return 1}.toSt if (({} > {}) !== ({}.toString() > {}.toString())) { $ERROR('#4: ({} > {}) === ({}.toString() > {}.toString())'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.1.js index a36cb0b920..7d16f88ec2 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.1.js - * @description y is number primitive - */ +/*--- +info: If x is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.2_A4.1 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NaN > 0) !== false) { @@ -47,5 +46,3 @@ if ((Number.NaN > Number.MAX_VALUE) !== false) { if ((Number.NaN > Number.MIN_VALUE) !== false) { $ERROR('#8: (NaN > Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.10.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.10.js index eef094d974..732c34bb8e 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.10.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is a prefix of y, return false - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.10.js - * @description x and y are string primitives - */ +/*--- +info: If x is a prefix of y, return false +es5id: 11.8.2_A4.10 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" > "x") !== false) { @@ -38,4 +37,3 @@ var x = "x"; if ((x > x + "y") !== false) { $ERROR('#6: var x = "x"; (x > x + "y") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.11.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.11.js index 76da4cc14b..363b3c0b5d 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.11.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is a prefix of x and x !== y, return true - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.11.js - * @description x and y are string primitives - */ +/*--- +info: If y is a prefix of x and x !== y, return true +es5id: 11.8.2_A4.11 +description: x and y are string primitives +---*/ //CHECK#1 if (("x " > "x") !== true) { @@ -48,5 +47,3 @@ if (("a\u0000a" > "a\u0000") !== true) { if ((" x" > "x") !== false) { $ERROR('#8: (" x" > "x") === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T1.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T1.js index 4bd4fb2ab4..e179916b28 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T1.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.12_T1.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.2_A4.12_T1 +description: x and y are string primitives +---*/ //CHECK#1 if (("xy" > "xx") !== true) { @@ -42,4 +44,3 @@ if (("a\u0000b" > "a\u0000a") !== true) { if (("aa" > "aB") !== true) { $ERROR('#7: ("aa" > aB") === true'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T2.js index ab16d98cb7..cf5b2dff34 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.12_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.12_T2.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.2_A4.12_T2 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" > "0") !== true) { @@ -42,4 +44,3 @@ if (("-1" > "+1") !== true) { if (("1e-10" > "1") !== true) { $ERROR('#7: ("1e-10" > "1") !== true'); } - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.2.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.2.js index 1e81c52fe4..6c567fad9a 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.2.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.2.js - * @description x is number primitive - */ +/*--- +info: If y is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.2_A4.2 +description: x is number primitive +---*/ //CHECK#1 if ((0 > Number.NaN) !== false) { @@ -47,5 +46,3 @@ if ((Number.MAX_VALUE > Number.NaN) !== false) { if ((Number.MIN_VALUE > Number.NaN) !== false) { $ERROR('#8: (Number.MIN_VALUE > NaN) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.3.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.3.js index 8890a00e1a..d56a375bf4 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.3.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x and y are the same number value, return false - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.3.js - * @description x and y are number primitives - */ +/*--- +info: If x and y are the same number value, return false +es5id: 11.8.2_A4.3 +description: x and y are number primitives +---*/ //CHECK#1 if ((1 > 1) !== false) { @@ -42,6 +41,3 @@ if ((Number.MAX_VALUE > Number.MAX_VALUE) !== false) { if ((Number.MIN_VALUE > Number.MIN_VALUE) !== false) { $ERROR('#7: (Number.MIN_VALUE > Number.MIN_VALUE) === false'); } - - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.4.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.4.js index 70a5440ca6..f7d90f5b56 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.4.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If either variable x or y is +0 and the other is -0, return false - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.4.js - * @description Checking all combinations - */ +/*--- +info: If either variable x or y is +0 and the other is -0, return false +es5id: 11.8.2_A4.4 +description: Checking all combinations +---*/ //CHECK#1 if ((0 > 0) !== false) { @@ -27,5 +26,3 @@ if ((+0 > -0) !== false) { if ((-0 > +0) !== false) { $ERROR('#4: (-0 > +0) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.5.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.5.js index 79d3bde313..d1cc633d2a 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.5.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity and x !== y, return true - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.5.js - * @description y is number primitive - */ +/*--- +info: If x is +Infinity and x !== y, return true +es5id: 11.8.2_A4.5 +description: y is number primitive +---*/ //CHECK#1 if ((Number.POSITIVE_INFINITY > 0) !== true) { @@ -37,5 +36,3 @@ if ((Number.POSITIVE_INFINITY > Number.MAX_VALUE) !== true) { if ((Number.POSITIVE_INFINITY > Number.MIN_VALUE) !== true) { $ERROR('#6: (+Infinity > Number.MIN_VALUE) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.6.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.6.js index aa96e699d4..6207ea544d 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.6.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +Infinity, return false - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.6.js - * @description x is number primitive - */ +/*--- +info: If y is +Infinity, return false +es5id: 11.8.2_A4.6 +description: x is number primitive +---*/ //CHECK#1 if ((0 > Number.POSITIVE_INFINITY) !== false) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE > Number.POSITIVE_INFINITY) !== false) { if ((Number.MIN_VALUE > Number.POSITIVE_INFINITY) !== false) { $ERROR('#6: (Number.MIN_VALUE > +Infinity) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.7.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.7.js index bc06818cc9..51b65ffa18 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.7.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, return false - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.7.js - * @description y is number primitive - */ +/*--- +info: If x is -Infinity, return false +es5id: 11.8.2_A4.7 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NEGATIVE_INFINITY > 0) !== false) { @@ -37,5 +36,3 @@ if ((Number.NEGATIVE_INFINITY > Number.MAX_VALUE) !== false) { if ((Number.NEGATIVE_INFINITY > Number.MIN_VALUE) !== false) { $ERROR('#6: (-Infinity > Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.8.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.8.js index 3a31561146..895f838a25 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.8.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -Infinity and x !== y, return true - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.8.js - * @description x is number primitive - */ +/*--- +info: If y is -Infinity and x !== y, return true +es5id: 11.8.2_A4.8 +description: x is number primitive +---*/ //CHECK#1 if ((0 > Number.NEGATIVE_INFINITY) !== true) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE > Number.NEGATIVE_INFINITY) !== true) { if ((Number.MIN_VALUE > Number.NEGATIVE_INFINITY) !== true) { $ERROR('#6: (Number.MIN_VALUE > -Infinity) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.9.js b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.9.js index a312553683..42c471032b 100644 --- a/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.9.js +++ b/test/suite/ch11/11.8/11.8.2/S11.8.2_A4.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If is x greater than y and these values are both finite non-zero, return true; otherwise, return false - * - * @path ch11/11.8/11.8.2/S11.8.2_A4.9.js - * @description x and y are number primitives - */ +/*--- +info: > + If is x greater than y and these values are both finite non-zero, return + true; otherwise, return false +es5id: 11.8.2_A4.9 +description: x and y are number primitives +---*/ //CHECK#1 if ((1 > 1.1) !== false) { @@ -47,6 +48,3 @@ if ((Number.MAX_VALUE > Number.MAX_VALUE/2) !== true) { if ((Number.MIN_VALUE*2 > Number.MIN_VALUE) !== true) { $ERROR('#8: (Number.MIN_VALUE*2 > Number.MIN_VALUE) === true'); } - - - diff --git a/test/suite/ch11/11.8/11.8.3/11.8.3-1.js b/test/suite/ch11/11.8/11.8.3/11.8.3-1.js index 4dc765ee2e..7c7b582240 100644 --- a/test/suite/ch11/11.8/11.8.3/11.8.3-1.js +++ b/test/suite/ch11/11.8/11.8.3/11.8.3-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.3/11.8.3-1.js - * @description 11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: valueOf <= valueOf - */ - - -function testcase() { - var accessed = false; - var obj1 = { - valueOf: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - valueOf: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return (obj1 <= obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.3-1 +description: > + 11.8.3 Less-than-or-equal Operator - Partial left to right order + enforced when using Less-than-or-equal operator: valueOf <= valueOf +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + valueOf: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + valueOf: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return (obj1 <= obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.3/11.8.3-2.js b/test/suite/ch11/11.8/11.8.3/11.8.3-2.js index 0ff108b513..8d74460f3a 100644 --- a/test/suite/ch11/11.8/11.8.3/11.8.3-2.js +++ b/test/suite/ch11/11.8/11.8.3/11.8.3-2.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.3/11.8.3-2.js - * @description 11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: valueOf <= toString - */ - - -function testcase() { - var accessed = false; - var obj1 = { - valueOf: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - toString: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return (obj1 <= obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.3-2 +description: > + 11.8.3 Less-than-or-equal Operator - Partial left to right order + enforced when using Less-than-or-equal operator: valueOf <= + toString +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + valueOf: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + toString: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return (obj1 <= obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.3/11.8.3-3.js b/test/suite/ch11/11.8/11.8.3/11.8.3-3.js index 2f5deae830..598aaee6d1 100644 --- a/test/suite/ch11/11.8/11.8.3/11.8.3-3.js +++ b/test/suite/ch11/11.8/11.8.3/11.8.3-3.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.3/11.8.3-3.js - * @description 11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: toString <= valueOf - */ - - -function testcase() { - var accessed = false; - var obj1 = { - toString: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - valueOf: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return (obj1 <= obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.3-3 +description: > + 11.8.3 Less-than-or-equal Operator - Partial left to right order + enforced when using Less-than-or-equal operator: toString <= + valueOf +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + toString: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + valueOf: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return (obj1 <= obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.3/11.8.3-4.js b/test/suite/ch11/11.8/11.8.3/11.8.3-4.js index 9105f9e6f3..22694efde8 100644 --- a/test/suite/ch11/11.8/11.8.3/11.8.3-4.js +++ b/test/suite/ch11/11.8/11.8.3/11.8.3-4.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.3/11.8.3-4.js - * @description 11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: toString <= toString - */ - - -function testcase() { - var accessed = false; - var obj1 = { - toString: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - toString: function () { - if (accessed === true) { - return 4; - } else { - return 2; - } - } - }; - return (obj1 <= obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.3-4 +description: > + 11.8.3 Less-than-or-equal Operator - Partial left to right order + enforced when using Less-than-or-equal operator: toString <= + toString +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + toString: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + toString: function () { + if (accessed === true) { + return 4; + } else { + return 2; + } + } + }; + return (obj1 <= obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.3/11.8.3-5.js b/test/suite/ch11/11.8/11.8.3/11.8.3-5.js index 9356ff34e9..211cd5e770 100644 --- a/test/suite/ch11/11.8/11.8.3/11.8.3-5.js +++ b/test/suite/ch11/11.8/11.8.3/11.8.3-5.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch11/11.8/11.8.3/11.8.3-5.js - * @description 11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: valueOf <= valueOf - */ - - -function testcase() { - var accessed = false; - var obj1 = { - valueOf: function () { - accessed = true; - return 3; - } - }; - var obj2 = { - valueOf: function () { - if (accessed === true) { - return 3; - } else { - return 2; - } - } - }; - return (obj1 <= obj2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 11.8.3-5 +description: > + 11.8.3 Less-than-or-equal Operator - Partial left to right order + enforced when using Less-than-or-equal operator: valueOf <= valueOf +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj1 = { + valueOf: function () { + accessed = true; + return 3; + } + }; + var obj2 = { + valueOf: function () { + if (accessed === true) { + return 3; + } else { + return 2; + } + } + }; + return (obj1 <= obj2); + } +runTestCase(testcase); diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A1.js index 9055711392..ed853e5c70 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between RelationalExpression and "<=" or between "<=" and ShiftExpression are allowed - * - * @path ch11/11.8/11.8.3/S11.8.3_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between RelationalExpression and "<=" or + between "<=" and ShiftExpression are allowed +es5id: 11.8.3_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009<=\u00091") !== true) { @@ -57,4 +58,3 @@ if (eval("1\u2029<=\u20291") !== true) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20290") !== true) { $ERROR('#10: (1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T1.js index ddf5cde6dd..6deaa9a2e3 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y uses GetValue - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x <= y uses GetValue +es5id: 11.8.3_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 <= 1 !== true) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop <= objecty.prop !== true) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop <= objecty.prop === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T2.js index b767e2d95f..d748167e2b 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y uses GetValue - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x <= y uses GetValue +es5id: 11.8.3_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: x <= 1 throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T3.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T3.js index d2a4df17ba..e9fc43e936 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T3.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y uses GetValue - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x <= y uses GetValue +es5id: 11.8.3_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 <= y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.2_T1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.2_T1.js index fbc706a2fd..17d88d49ea 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.2_T1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y uses [[Default Value]] - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x <= y uses [[Default Value]] +es5id: 11.8.3_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 0}} <= 1 !== true) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 <= {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.3_T1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.3_T1.js index 14ea37cc61..26f8d5042b 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.3_T1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In ES5, First expression should be evaluated first. - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.3_T1.js - * @description Checking that operands of a "<=" evaluate left-to-right - */ +/*--- +info: In ES5, First expression should be evaluated first. +es5id: 11.8.3_A2.3_T1 +description: Checking that operands of a "<=" evaluate left-to-right +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T1.js index 81e29c5314..38c892e1ee 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.3_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 1; if (x <= (x = 0) !== false) { $ERROR('#2: var x = 1; x <= (x = 0) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T2.js index 2cbb846ff8..8e4a9f1bb0 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.3_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T3.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T3.js index e53f081422..848a590cdf 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T3.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.3/S11.8.3_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.3_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) <= y !== true) { $ERROR('#2: (y = 1) <= y === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.1.js index a6a6f9dda9..07bc302aef 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + boolean and Boolean object +---*/ //CHECK#1 if (true <= true !== true) { @@ -27,4 +30,3 @@ if (true <= new Boolean(true) !== true) { if (new Boolean(true) <= new Boolean(true) !== true) { $ERROR('#4: new Boolean(true) <= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.2.js index e4a93112a2..61dedffd44 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + number and Number object +---*/ //CHECK#1 if (1 <= 1 !== true) { @@ -27,5 +30,3 @@ if (1 <= new Number(1) !== true) { if (new Number(1) <= new Number(1) !== true) { $ERROR('#4: new Number(1) <= new Number(1) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.3.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.3.js index c55bc154c2..585f8a3a91 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.3.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T1.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T1.3.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T1.3 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Null and + Undefined +---*/ //CHECK#1 if (null <= undefined !== false) { @@ -27,4 +30,3 @@ if (undefined <= undefined !== false) { if (null <= null !== true) { $ERROR('#4: null <= null === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.1.js index 2eb6f22829..a7e53414cb 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.1.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.1 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true <= 1 !== true) { @@ -47,4 +51,3 @@ if (new Boolean(true) <= new Number(1) !== true) { if (new Number(1) <= new Boolean(true) !== true) { $ERROR('#8: new Number(1) <= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.2.js index 7bbff24f5b..2f4407258e 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.2.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.2 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and String + (primitive and object) +---*/ //CHECK#1 if ("1" <= 1 !== true) { @@ -57,4 +61,3 @@ if ("x" <= 1 !== false) { if (1 <= "x" !== false) { $ERROR('#10: 1 <= "x" === false'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.3.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.3.js index a255c8b991..9091b71095 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.3.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.3.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.3 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Null +---*/ //CHECK#1 if (1 <= null !== false) { @@ -27,4 +30,3 @@ if (new Number(1) <= null !== false) { if (null <= new Number(1) !== true) { $ERROR('#4: null <= new Number(1) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.4.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.4.js index a124fb8d95..64be8042d3 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.4.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.4.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.4 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 <= undefined !== false) { @@ -27,4 +30,3 @@ if (new Number(1) <= undefined !== false) { if (undefined <= new Number(1) !== false) { $ERROR('#4: undefined <= new Number(1) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.5.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.5.js index 39fa250a5b..79b155e5bf 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.5.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.5.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.5.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.5 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true <= "1" !== true) { @@ -47,4 +51,3 @@ if (new Boolean(true) <= new String("1") !== true) { if (new String("1") <= new Boolean(true) !== true) { $ERROR('#8: new String("1") <= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.6.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.6.js index 321a4848e5..76c07c8007 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.6.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.6.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.6 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" <= undefined !== false) { @@ -27,4 +30,3 @@ if (new String("1") <= undefined !== false) { if (undefined <= new String("1") !== false) { $ERROR('#4: undefined <= new String("1") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.7.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.7.js index 02a69689e7..b0240d6cdc 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.7.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.7.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.7 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Null +---*/ //CHECK#1 if ("1" <= null !== false) { @@ -27,4 +30,3 @@ if (new String("1") <= null !== false) { if (null <= new String("1") !== true) { $ERROR('#4: null <= new String("1") === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.8.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.8.js index 580057063b..10e482a7c1 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.8.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.8.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.8 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true <= undefined !== false) { @@ -27,4 +30,3 @@ if (new Boolean(true) <= undefined !== false) { if (undefined <= new Boolean(true) !== false) { $ERROR('#4: undefined <= new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.9.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.9.js index ed70b36f2a..bd33dd49de 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.9.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.1_T2.9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) is not String or Type(Primitive(y)) is not String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.1_T2.9.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: > + Operator x <= y returns ToNumber(x) <= ToNumber(y), if Type(Primitive(x)) + is not String or Type(Primitive(y)) is not String +es5id: 11.8.3_A3.1_T2.9 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true <= null !== false) { @@ -27,4 +30,3 @@ if (new Boolean(true) <= null !== false) { if (null <= new Boolean(true) !== true) { $ERROR('#4: null <= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.1.js index 354384ea8f..38db26765c 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToString(x) <= ToString(y), if Type(Primitive(x)) is String and Type(Primitive(y)) is String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.2_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object - */ +/*--- +info: > + Operator x <= y returns ToString(x) <= ToString(y), if Type(Primitive(x)) + is String and Type(Primitive(y)) is String +es5id: 11.8.3_A3.2_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + string and String object +---*/ //CHECK#1 if ("1" <= "1" !== true) { @@ -37,4 +40,3 @@ if ("x" <= "1" !== false) { if ("1" <= "x" !== true) { $ERROR('#6: "1" <= "x" === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.2.js index 93ff5e2e24..85828ba5c5 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A3.2_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x <= y returns ToString(x) <= ToString(y), if Type(Primitive(x)) is String and Type(Primitive(y)) is String - * - * @path ch11/11.8/11.8.3/S11.8.3_A3.2_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object - */ +/*--- +info: > + Operator x <= y returns ToString(x) <= ToString(y), if Type(Primitive(x)) + is String and Type(Primitive(y)) is String +es5id: 11.8.3_A3.2_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Object + object and Function object +---*/ //CHECK#1 if (({} <= function(){return 1}) !== ({}.toString() <= function(){return 1}.toString())) { @@ -27,4 +30,3 @@ if ((function(){return 1} <= function(){return 1}) !== (function(){return 1}.toS if (({} <= {}) !== ({}.toString() <= {}.toString())) { $ERROR('#4: ({} <= {}) === ({}.toString() <= {}.toString())'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.1.js index c94f02041f..a8ed9df53d 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.1.js - * @description y is number primitive - */ +/*--- +info: If x is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.3_A4.1 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NaN <= 0) !== false) { @@ -47,5 +46,3 @@ if ((Number.NaN <= Number.MAX_VALUE) !== false) { if ((Number.NaN <= Number.MIN_VALUE) !== false) { $ERROR('#8: (NaN <= Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.10.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.10.js index 4e2295c6d3..001fed67d7 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.10.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is a prefix of x and x !== y, return false - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.10.js - * @description x and y are string primitives - */ +/*--- +info: If y is a prefix of x and x !== y, return false +es5id: 11.8.3_A4.10 +description: x and y are string primitives +---*/ //CHECK#1 if (("x " <= "x") !== false) { @@ -38,5 +37,3 @@ var x = "x"; if ((x + 'y' <= x) !== false) { $ERROR('#6: var x = "x"; (x + "y" <= x) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.11.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.11.js index 556a9eb89c..27b4d1d4a4 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.11.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is a prefix of y, return true - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.11.js - * @description x and y are string primitives - */ +/*--- +info: If x is a prefix of y, return true +es5id: 11.8.3_A4.11 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" <= "x") !== true) { @@ -48,6 +47,3 @@ if (("a\u0000" <= "a\u0000a") !== true) { if (("x" <= " x") !== false) { $ERROR('#8: ("x" <= " x") === false'); } - - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T1.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T1.js index cb1228e57f..950f5bf96f 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T1.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.12_T1.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.3_A4.12_T1 +description: x and y are string primitives +---*/ //CHECK#1 if (("xx" <= "xy") !== true) { @@ -42,4 +44,3 @@ if (("a\u0000a" <= "a\u0000b") !== true) { if (("aB" <= "aa") !== true) { $ERROR('#7: ("aB" <= aa") === true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T2.js index 459d73ed1b..816b602cb4 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.12_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.12_T2.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.3_A4.12_T2 +description: x and y are string primitives +---*/ //CHECK#1 if (("0" <= "x") !== true) { @@ -42,4 +44,3 @@ if (("+1" <= "-1") !== true) { if (("1" <= "1e-10") !== true) { $ERROR('#7: ("1" <= "1e-10") !== true'); } - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.2.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.2.js index dd195d8098..57da86e524 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.2.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.2.js - * @description x is number primitive - */ +/*--- +info: If y is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.3_A4.2 +description: x is number primitive +---*/ //CHECK#1 if ((0 <= Number.NaN) !== false) { @@ -47,5 +46,3 @@ if ((Number.MAX_VALUE <= Number.NaN) !== false) { if ((Number.MIN_VALUE <= Number.NaN) !== false) { $ERROR('#8: (Number.MIN_VALUE <= NaN) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.3.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.3.js index 3c462cfdd8..66c2e1a629 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.3.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x and y are the same number value, return true - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.3.js - * @description x and y are number primitives - */ +/*--- +info: If x and y are the same number value, return true +es5id: 11.8.3_A4.3 +description: x and y are number primitives +---*/ //CHECK#1 if ((1 <= 1) !== true) { @@ -42,6 +41,3 @@ if ((Number.MAX_VALUE <= Number.MAX_VALUE) !== true) { if ((Number.MIN_VALUE <= Number.MIN_VALUE) !== true) { $ERROR('#7: (Number.MIN_VALUE <= Number.MIN_VALUE) === true'); } - - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.4.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.4.js index 4669cde36c..5863689ac3 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.4.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If either x or y is +0 and the other is -0, return true - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.4.js - * @description Checking all combinations - */ +/*--- +info: If either x or y is +0 and the other is -0, return true +es5id: 11.8.3_A4.4 +description: Checking all combinations +---*/ //CHECK#1 if ((0 <= 0) !== true) { @@ -27,5 +26,3 @@ if ((+0 <= -0) !== true) { if ((-0 <= +0) !== true) { $ERROR('#4: (-0 <= +0) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.5.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.5.js index ff3ab3a850..84217f3032 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.5.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity and x !== y, return false - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.5.js - * @description y is number primitive - */ +/*--- +info: If x is +Infinity and x !== y, return false +es5id: 11.8.3_A4.5 +description: y is number primitive +---*/ //CHECK#1 if ((Number.POSITIVE_INFINITY <= 0) !== false) { @@ -37,5 +36,3 @@ if ((Number.POSITIVE_INFINITY <= Number.MAX_VALUE) !== false) { if ((Number.POSITIVE_INFINITY <= Number.MIN_VALUE) !== false) { $ERROR('#6: (+Infinity <= Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.6.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.6.js index 1aa11f9731..e1c1237dbc 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.6.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +Infinity and x !== y, return true - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.6.js - * @description x is number primitive - */ +/*--- +info: If y is +Infinity and x !== y, return true +es5id: 11.8.3_A4.6 +description: x is number primitive +---*/ //CHECK#1 if ((0 <= Number.POSITIVE_INFINITY) !== true) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE <= Number.POSITIVE_INFINITY) !== true) { if ((Number.MIN_VALUE <= Number.POSITIVE_INFINITY) !== true) { $ERROR('#6: (Number.MIN_VALUE <= +Infinity) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.7.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.7.js index 8abd94de41..60a96014e5 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.7.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, return true - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.7.js - * @description y is number primitive - */ +/*--- +info: If x is -Infinity, return true +es5id: 11.8.3_A4.7 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NEGATIVE_INFINITY <= 0) !== true) { @@ -37,5 +36,3 @@ if ((Number.NEGATIVE_INFINITY <= Number.MAX_VALUE) !== true) { if ((Number.NEGATIVE_INFINITY <= Number.MIN_VALUE) !== true) { $ERROR('#6: (-Infinity <= Number.MIN_VALUE) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.8.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.8.js index c126d07959..ad32cc42bb 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.8.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -Infinity and x !== y, return false - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.8.js - * @description x is number primitive - */ +/*--- +info: If y is -Infinity and x !== y, return false +es5id: 11.8.3_A4.8 +description: x is number primitive +---*/ //CHECK#1 if ((0 <= Number.NEGATIVE_INFINITY) !== false) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE <= Number.NEGATIVE_INFINITY) !== false) { if ((Number.MIN_VALUE <= Number.NEGATIVE_INFINITY) !== false) { $ERROR('#6: (Number.MIN_VALUE <= -Infinity) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.9.js b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.9.js index fa0d9302ca..bbab019039 100644 --- a/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.9.js +++ b/test/suite/ch11/11.8/11.8.3/S11.8.3_A4.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less or equal than y and these values are both finite non-zero, return true; otherwise, return false - * - * @path ch11/11.8/11.8.3/S11.8.3_A4.9.js - * @description x and y are number primitives - */ +/*--- +info: > + If x is less or equal than y and these values are both finite non-zero, + return true; otherwise, return false +es5id: 11.8.3_A4.9 +description: x and y are number primitives +---*/ //CHECK#1 if ((1.1 <= 1) !== false) { @@ -47,6 +48,3 @@ if ((Number.MAX_VALUE/2 <= Number.MAX_VALUE) !== true) { if ((Number.MIN_VALUE <= Number.MIN_VALUE*2) !== true) { $ERROR('#8: (Number.MIN_VALUE <= Number.MIN_VALUE*2) === true'); } - - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A1.js index 2a165a211c..aa2e9df138 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between RelationalExpression and "=>" or "=>" and ShiftExpression are allowed - * - * @path ch11/11.8/11.8.4/S11.8.4_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between RelationalExpression and "=>" or + "=>" and ShiftExpression are allowed +es5id: 11.8.4_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009>=\u00091") !== true) { @@ -57,4 +58,3 @@ if (eval("1\u2029>=\u20291") !== true) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== true) { $ERROR('#10: (1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T1.js index 8f3adb3096..a9127b1b63 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >= y uses GetValue - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x >= y uses GetValue +es5id: 11.8.4_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 >= 1 !== true) { @@ -40,4 +39,3 @@ objecty.prop = 1; if (objectx.prop >= objecty.prop !== true) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop >= objecty.prop === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T2.js index 8a57a24e35..63de923bfd 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >= y uses GetValue - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x >= y uses GetValue +es5id: 11.8.4_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x >= 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T3.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T3.js index 23c2ea604b..ddd91cfdcf 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T3.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >= y uses GetValue - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x >= y uses GetValue +es5id: 11.8.4_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 >= y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.2_T1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.2_T1.js index f129ea315e..3c8e72228c 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.2_T1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >= y uses [[Default Value]] - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.2_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator x >= y uses [[Default Value]] +es5id: 11.8.4_A2.2_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 if ({valueOf: function() {return 2}} >= 1 !== true) { @@ -68,4 +67,3 @@ catch (e) { $ERROR('#8.2: 1 >= {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.3_T1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.3_T1.js index dd286dd03f..d202fa9605 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.3_T1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ToNumber(first expression) is called first, and then ToNumber(second expression) - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.3_T1.js - * @description Checking with "throw" - */ +/*--- +info: > + ToNumber(first expression) is called first, and then ToNumber(second + expression) +es5id: 11.8.4_A2.3_T1 +description: Checking with "throw" +---*/ //CHECK#1 var x = { valueOf: function () { throw "x"; } }; @@ -23,4 +24,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T1.js index 8e3f2b0c79..8122506438 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.4_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 1; @@ -19,5 +18,3 @@ var x = 0; if (x >= (x = 1) !== false) { $ERROR('#2: var x = 0; x >= (x = 1) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T2.js index f7c0446dd5..a7ee2c6a7c 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.4_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T3.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T3.js index 54efe21ac3..c3dac2a02c 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T3.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.4/S11.8.4_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.4_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) >= y !== true) { $ERROR('#2: (y = 1) >= y === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.1.js index d924630914..4f8dad1fd9 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + boolean and Boolean object +---*/ //CHECK#1 if (true >= true !== true) { @@ -27,4 +30,3 @@ if (true >= new Boolean(true) !== true) { if (new Boolean(true) >= new Boolean(true) !== true) { $ERROR('#4: new Boolean(true) >= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.2.js index 255124d7d0..5d55175b55 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + number and Number object +---*/ //CHECK#1 if (1 >= 1 !== true) { @@ -27,5 +30,3 @@ if (1 >= new Number(1) !== true) { if (new Number(1) >= new Number(1) !== true) { $ERROR('#4: new Number(1) >= new Number(1) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.3.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.3.js index ffe39372e1..b1a0267ef4 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.3.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T1.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T1.3.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T1.3 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Null and + Undefined +---*/ //CHECK#1 if (null >= undefined !== false) { @@ -27,4 +30,3 @@ if (undefined >= undefined !== false) { if (null >= null !== true) { $ERROR('#4: null >= null === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.1.js index c1f367aaef..69275b71e3 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.1.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.1 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true >= 1 !== true) { @@ -47,4 +51,3 @@ if (new Boolean(true) >= new Number(1) !== true) { if (new Number(1) >= new Boolean(true) !== true) { $ERROR('#8: new Number(1) >= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.2.js index 3e4bca79bc..e36224b8b5 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.2.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.2 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and String + (primitive and object) +---*/ //CHECK#1 if ("1" >= 1 !== true) { @@ -57,4 +61,3 @@ if ("x" >= 1 !== false) { if (1 >= "x" !== false) { $ERROR('#10: 1 >= "x" === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.3.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.3.js index 4d0c6b6a98..ad80f802a1 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.3.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.3.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.3 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Null +---*/ //CHECK#1 if (1 >= null !== true) { @@ -27,4 +30,3 @@ if (new Number(1) >= null !== true) { if (null >= new Number(1) !== false) { $ERROR('#4: null >= new Number(1) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.4.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.4.js index f94a78e5a7..eb51bc6f57 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.4.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.4.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.4 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Number (primitive or object) and Undefined +---*/ //CHECK#1 if (1 >= undefined !== false) { @@ -27,4 +30,3 @@ if (new Number(1) >= undefined !== false) { if (undefined >= new Number(1) !== false) { $ERROR('#4: undefined >= new Number(1) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.5.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.5.js index 5f949872e7..093bcfb402 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.5.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.5.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.5.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object) - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.5 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Boolean + (primitive and object) +---*/ //CHECK#1 if (true >= "1" !== true) { @@ -47,4 +51,3 @@ if (new Boolean(true) >= new String("1") !== true) { if (new String("1") >= new Boolean(true) !== true) { $ERROR('#8: new String("1") >= new Boolean(true) === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.6.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.6.js index ff2ab1820c..25e3e944b1 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.6.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.6.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.6 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Undefined +---*/ //CHECK#1 if ("1" >= undefined !== false) { @@ -27,4 +30,3 @@ if (new String("1") >= undefined !== false) { if (undefined >= new String("1") !== false) { $ERROR('#4: undefined >= new String("1") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.7.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.7.js index 10745f98af..a1466c108f 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.7.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.7.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.7 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between String (primitive or object) and Null +---*/ //CHECK#1 if ("1" >= null !== true) { @@ -27,4 +30,3 @@ if (new String("1") >= null !== true) { if (null >= new String("1") !== false) { $ERROR('#4: null >= new String("1") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.8.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.8.js index c45874ca89..b4b67322b0 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.8.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.8.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.8 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Undefined +---*/ //CHECK#1 if (true >= undefined !== false) { @@ -27,4 +30,3 @@ if (new Boolean(true) >= undefined !== false) { if (undefined >= new Boolean(true) !== false) { $ERROR('#4: undefined >= new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.9.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.9.js index 8046d5a597..af551e22d9 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.9.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.1_T2.9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, then operator x >= y returns ToNumber(x) >= ToNumber(y) - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.1_T2.9.js - * @description Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null - */ +/*--- +info: > + If Type(Primitive(x)) is not String or Type(Primitive(y)) is not String, + then operator x >= y returns ToNumber(x) >= ToNumber(y) +es5id: 11.8.4_A3.1_T2.9 +description: > + Type(Primitive(x)) is different from Type(Primitive(y)) and both + types vary between Boolean (primitive or object) and Null +---*/ //CHECK#1 if (true >= null !== true) { @@ -27,4 +30,3 @@ if (new Boolean(true) >= null !== true) { if (null >= new Boolean(true) !== false) { $ERROR('#4: null >= new Boolean(true) === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.1.js index d166d3f9b5..6d0be7fcb9 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >= y returns ToString(x) >= ToString(y), if Type(Primitive(x)) is String and Type(Primitive(y)) is String - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.2_T1.1.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object - */ +/*--- +info: > + Operator x >= y returns ToString(x) >= ToString(y), if Type(Primitive(x)) + is String and Type(Primitive(y)) is String +es5id: 11.8.4_A3.2_T1.1 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between primitive + string and String object +---*/ //CHECK#1 if ("1" >= "1" !== true) { @@ -37,4 +40,3 @@ if ("x" >= "1" !== true) { if ("1" >= "x" !== false) { $ERROR('#6: "1" >= "x" === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.2.js index 7a981028c0..004f1349ab 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A3.2_T1.2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x >= y returns ToString(x) >= ToString(y), if Type(Primitive(x)) is String and Type(Primitive(y)) is String - * - * @path ch11/11.8/11.8.4/S11.8.4_A3.2_T1.2.js - * @description Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object - */ +/*--- +info: > + Operator x >= y returns ToString(x) >= ToString(y), if Type(Primitive(x)) + is String and Type(Primitive(y)) is String +es5id: 11.8.4_A3.2_T1.2 +description: > + Type(Primitive(x)) and Type(Primitive(y)) vary between Object + object and Function object +---*/ //CHECK#1 if (({} >= function(){return 1}) !== ({}.toString() >= function(){return 1}.toString())) { @@ -27,4 +30,3 @@ if ((function(){return 1} >= function(){return 1}) !== (function(){return 1}.toS if (({} >= {}) !== ({}.toString() >= {}.toString())) { $ERROR('#4: ({} >= {}) === ({}.toString() >= {}.toString())'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.1.js index 601f237156..e20ddb5e0e 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.1.js - * @description y is number primitive - */ +/*--- +info: If x is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.4_A4.1 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NaN >= 0) !== false) { @@ -47,5 +46,3 @@ if ((Number.NaN >= Number.MAX_VALUE) !== false) { if ((Number.NaN >= Number.MIN_VALUE) !== false) { $ERROR('#8: (NaN >= Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.10.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.10.js index caaf1fa86a..43452a0de1 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.10.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is a prefix of y and x !== y, return false - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.10.js - * @description x and y are string primitives - */ +/*--- +info: If x is a prefix of y and x !== y, return false +es5id: 11.8.4_A4.10 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" >= "x ") !== false) { @@ -38,4 +37,3 @@ var x = "x"; if ((x >= x + "y") !== false) { $ERROR('#6: var x = "x"; (x >= x + "y") === false'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.11.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.11.js index 98b792a6dc..4a1da5ebe5 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.11.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is a prefix of x, return true - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.11.js - * @description x and y are string primitives - */ +/*--- +info: If y is a prefix of x, return true +es5id: 11.8.4_A4.11 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" >= "x") !== true) { @@ -48,5 +47,3 @@ if (("a\u0000a" >= "a\u0000") !== true) { if ((" x" >= "x") !== false) { $ERROR('#8: (" x" >= "x") === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T1.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T1.js index 961dc236f2..8c539c1359 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T1.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.12_T1.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.4_A4.12_T1 +description: x and y are string primitives +---*/ //CHECK#1 if (("xy" >= "xx") !== true) { @@ -42,4 +44,3 @@ if (("a\u0000b" >= "a\u0000a") !== true) { if (("aa" >= "aB") !== true) { $ERROR('#7: ("aa" >= aB") === true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T2.js index 851e69d49d..7f39030c3b 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.12_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither x, nor y is a prefix of each other, returned result of strings comparison applies a simple lexicographic ordering to the sequences of code point value values - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.12_T2.js - * @description x and y are string primitives - */ +/*--- +info: > + If neither x, nor y is a prefix of each other, returned result of strings + comparison applies a simple lexicographic ordering to the sequences of + code point value values +es5id: 11.8.4_A4.12_T2 +description: x and y are string primitives +---*/ //CHECK#1 if (("x" >= "0") !== true) { @@ -42,4 +44,3 @@ if (("-1" >= "+1") !== true) { if (("1e-10" >= "1") !== true) { $ERROR('#7: ("1e-10" >= "1") !== true'); } - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.2.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.2.js index a10b2ab4e3..6d74082b64 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.2.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is NaN, return false (if result in 11.8.5 is undefined, return false) - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.2.js - * @description x is number primitive - */ +/*--- +info: If y is NaN, return false (if result in 11.8.5 is undefined, return false) +es5id: 11.8.4_A4.2 +description: x is number primitive +---*/ //CHECK#1 if ((0 >= Number.NaN) !== false) { @@ -47,5 +46,3 @@ if ((Number.MAX_VALUE >= Number.NaN) !== false) { if ((Number.MIN_VALUE >= Number.NaN) !== false) { $ERROR('#8: (Number.MIN_VALUE >= NaN) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.3.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.3.js index 4169a91bb1..d4c16ab809 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.3.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x and y are the same number value, return true - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.3.js - * @description x and y are number primitives - */ +/*--- +info: If x and y are the same number value, return true +es5id: 11.8.4_A4.3 +description: x and y are number primitives +---*/ //CHECK#1 if ((1 >= 1) !== true) { @@ -42,6 +41,3 @@ if ((Number.MAX_VALUE >= Number.MAX_VALUE) !== true) { if ((Number.MIN_VALUE >= Number.MIN_VALUE) !== true) { $ERROR('#7: (Number.MIN_VALUE >= Number.MIN_VALUE) === true'); } - - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.4.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.4.js index 3abe7fa770..523947a97d 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.4.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If either x or y is +0 and the other is -0, return true - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.4.js - * @description Checking all combinations - */ +/*--- +info: If either x or y is +0 and the other is -0, return true +es5id: 11.8.4_A4.4 +description: Checking all combinations +---*/ //CHECK#1 if ((0 >= 0) !== true) { @@ -27,5 +26,3 @@ if ((+0 >= -0) !== true) { if ((-0 >= +0) !== true) { $ERROR('#4: (-0 >= +0) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.5.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.5.js index e0357fee2f..8c000eaa54 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.5.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, return true - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.5.js - * @description y is number primitive - */ +/*--- +info: If x is +Infinity, return true +es5id: 11.8.4_A4.5 +description: y is number primitive +---*/ //CHECK#1 if ((Number.POSITIVE_INFINITY >= 0) !== true) { @@ -37,5 +36,3 @@ if ((Number.POSITIVE_INFINITY >= Number.MAX_VALUE) !== true) { if ((Number.POSITIVE_INFINITY >= Number.MIN_VALUE) !== true) { $ERROR('#6: (+Infinity >= Number.MIN_VALUE) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.6.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.6.js index b1f898a14c..524877cf12 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.6.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +Infinity and x !== y, return false - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.6.js - * @description x is number primitive - */ +/*--- +info: If y is +Infinity and x !== y, return false +es5id: 11.8.4_A4.6 +description: x is number primitive +---*/ //CHECK#1 if ((0 >= Number.POSITIVE_INFINITY) !== false) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE >= Number.POSITIVE_INFINITY) !== false) { if ((Number.MIN_VALUE >= Number.POSITIVE_INFINITY) !== false) { $ERROR('#6: (Number.MIN_VALUE >= +Infinity) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.7.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.7.js index 6a423b8346..678dfbb95d 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.7.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity and x !== y, return false - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.7.js - * @description y is number primitive - */ +/*--- +info: If x is -Infinity and x !== y, return false +es5id: 11.8.4_A4.7 +description: y is number primitive +---*/ //CHECK#1 if ((Number.NEGATIVE_INFINITY >= 0) !== false) { @@ -37,5 +36,3 @@ if ((Number.NEGATIVE_INFINITY >= Number.MAX_VALUE) !== false) { if ((Number.NEGATIVE_INFINITY >= Number.MIN_VALUE) !== false) { $ERROR('#6: (-Infinity >= Number.MIN_VALUE) === false'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.8.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.8.js index ce00360b39..ce8a500854 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.8.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -Infinity, return true - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.8.js - * @description x is number primitive - */ +/*--- +info: If y is -Infinity, return true +es5id: 11.8.4_A4.8 +description: x is number primitive +---*/ //CHECK#1 if ((0 >= Number.NEGATIVE_INFINITY) !== true) { @@ -37,5 +36,3 @@ if ((Number.MAX_VALUE >= Number.NEGATIVE_INFINITY) !== true) { if ((Number.MIN_VALUE >= Number.NEGATIVE_INFINITY) !== true) { $ERROR('#6: (Number.MIN_VALUE >= -Infinity) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.9.js b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.9.js index 116d934ef2..8bde29e3dd 100644 --- a/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.9.js +++ b/test/suite/ch11/11.8/11.8.4/S11.8.4_A4.9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is greater or equal than y and these values are both finite non-zero, return true; otherwise, return false - * - * @path ch11/11.8/11.8.4/S11.8.4_A4.9.js - * @description x and y are number primitives - */ +/*--- +info: > + If x is greater or equal than y and these values are both finite + non-zero, return true; otherwise, return false +es5id: 11.8.4_A4.9 +description: x and y are number primitives +---*/ //CHECK#1 if ((1 >= 1.1) !== false) { @@ -47,6 +48,3 @@ if ((Number.MAX_VALUE >= Number.MAX_VALUE/2) !== true) { if ((Number.MIN_VALUE*2 >= Number.MIN_VALUE) !== true) { $ERROR('#8: (Number.MIN_VALUE*2 >= Number.MIN_VALUE) === true'); } - - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A1.js index 282b9fda4e..289d04159c 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between RelationalExpression and "instanceof" and between "instanceof" and ShiftExpression are allowed - * - * @path ch11/11.8/11.8.6/S11.8.6_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between RelationalExpression and + "instanceof" and between "instanceof" and ShiftExpression are allowed +es5id: 11.8.6_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("({})\u0009instanceof\u0009Object") !== true) { @@ -57,4 +58,3 @@ if (eval("({})\u2029instanceof\u2029Object") !== true) { if (eval("({})\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029instanceof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Object") !== true) { $ERROR('#10: ({})\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029instanceof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Object === true'); } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T1.js index e7a31658cf..4f1e7069d2 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "instanceof" uses GetValue - * - * @path ch11/11.8/11.8.6/S11.8.6_A2.1_T1.js - * @description Either Expression is not Reference or GetBase is not null - */ +/*--- +info: Operator "instanceof" uses GetValue +es5id: 11.8.6_A2.1_T1 +description: Either Expression is not Reference or GetBase is not null +---*/ //CHECK#1 if (({}) instanceof Object !== true) { @@ -31,5 +30,3 @@ var OBJECT = Object; if (object instanceof OBJECT !== true) { $ERROR('#4: var object = {}; var OBJECT = Object; object instanceof OBJECT === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T2.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T2.js index 9477b0b5d9..c5e5dcb27c 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T2.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "instanceof" uses GetValue - * - * @path ch11/11.8/11.8.6/S11.8.6_A2.1_T2.js - * @description If GetBase(RelationalExpression) is null, throw ReferenceError - */ +/*--- +info: Operator "instanceof" uses GetValue +es5id: 11.8.6_A2.1_T2 +description: If GetBase(RelationalExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: object instanceof Object throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T3.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T3.js index bb0a094ce8..1e0ba46b27 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T3.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "instanceof" uses GetValue - * - * @path ch11/11.8/11.8.6/S11.8.6_A2.1_T3.js - * @description If GetBase(ShiftExpression) is null, throw ReferenceError - */ +/*--- +info: Operator "instanceof" uses GetValue +es5id: 11.8.6_A2.1_T3 +description: If GetBase(ShiftExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: ({}) instanceof OBJECT throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T1.js index 957c99b3ba..46063d2e33 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.6/S11.8.6_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.6_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var OBJECT = 0; @@ -19,5 +18,3 @@ var object = {}; if (object instanceof (object = 0, Object) !== true) { $ERROR('#2: var object = {}; object instanceof (object = 0, Object) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T2.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T2.js index 5f87c43427..55fa67031d 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T2.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.6/S11.8.6_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.6_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T3.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T3.js index 06ef160739..00d741a020 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T3.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.6/S11.8.6_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.6_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((OBJECT = Object, {}) instanceof OBJECT !== true) { $ERROR('#2: (OBJECT = Object, {}) instanceof OBJECT !== true'); } - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A3.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A3.js index da3d7e5dc0..bcbcee5f47 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A3.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ShiftExpression is not an object, throw TypeError - * - * @path ch11/11.8/11.8.6/S11.8.6_A3.js - * @description Checking all the types of primitives - */ +/*--- +info: If ShiftExpression is not an object, throw TypeError +es5id: 11.8.6_A3 +description: Checking all the types of primitives +---*/ //CHECK#1 try { @@ -62,4 +61,3 @@ catch (e) { $ERROR('#5: null instanceof null throw TypeError'); } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T1.js index 0f9d2319db..c20dddba6e 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only constructor call (with "new" keyword) makes instance - * - * @path ch11/11.8/11.8.6/S11.8.6_A4_T1.js - * @description Checking Boolean case - */ +/*--- +info: Only constructor call (with "new" keyword) makes instance +es5id: 11.8.6_A4_T1 +description: Checking Boolean case +---*/ //CHECK#1 if (false instanceof Boolean) { @@ -22,5 +21,3 @@ if (Boolean(false) instanceof Boolean) { if (new Boolean instanceof Boolean !== true) { $ERROR('#3: new Boolean instanceof Boolean'); } - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T2.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T2.js index a4f1f3c02d..256ee7adf1 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T2.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only constructor call (with "new" keyword) makes instance - * - * @path ch11/11.8/11.8.6/S11.8.6_A4_T2.js - * @description Checking Number case - */ +/*--- +info: Only constructor call (with "new" keyword) makes instance +es5id: 11.8.6_A4_T2 +description: Checking Number case +---*/ //CHECK#1 if (0 instanceof Number) { @@ -22,5 +21,3 @@ if (Number(0) instanceof Number) { if (new Number instanceof Number !== true) { $ERROR('#3: new Number instanceof Number'); } - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T3.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T3.js index c8220049c2..8bca4d0e45 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T3.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only constructor call (with "new" keyword) makes instance - * - * @path ch11/11.8/11.8.6/S11.8.6_A4_T3.js - * @description Checking String case - */ +/*--- +info: Only constructor call (with "new" keyword) makes instance +es5id: 11.8.6_A4_T3 +description: Checking String case +---*/ //CHECK#1 if ("" instanceof String) { @@ -22,4 +21,3 @@ if (String("") instanceof String) { if (new String instanceof String !== true) { $ERROR('#3: new String instanceof String'); } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T1.js index a021a9ac35..972cc8bc5f 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TypeError is subclass of Error from instanceof operator point of view - * - * @path ch11/11.8/11.8.6/S11.8.6_A5_T1.js - * @description Checking Error case - */ +/*--- +info: TypeError is subclass of Error from instanceof operator point of view +es5id: 11.8.6_A5_T1 +description: Checking Error case +---*/ var __err = new Error; @@ -43,5 +42,3 @@ if (err__ instanceof TypeError) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T2.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T2.js index 8a9814a522..e8fff8cea6 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T2.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TypeError is subclass of Error from instanceof operator point of view - * - * @path ch11/11.8/11.8.6/S11.8.6_A5_T2.js - * @description Checking TypeError case - */ +/*--- +info: TypeError is subclass of Error from instanceof operator point of view +es5id: 11.8.6_A5_T2 +description: Checking TypeError case +---*/ var __t__err = new TypeError; @@ -32,5 +31,3 @@ if (!(err__t__ instanceof Error)) { if (!(err__t__ instanceof TypeError)) { $ERROR('#4: TypeError is subclass of Error from instanceof operator point of view'); } - - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T1.js index 16e0d82b3f..07860e5567 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only Function objects implement [[HasInstance]] and can be proper ShiftExpression for the "instanceof" operator consequently - * - * @path ch11/11.8/11.8.6/S11.8.6_A6_T1.js - * @description Checking "this" case - */ +/*--- +info: > + Only Function objects implement [[HasInstance]] and can be proper + ShiftExpression for the "instanceof" operator consequently +es5id: 11.8.6_A6_T1 +description: Checking "this" case +---*/ //CHECK#1 try{ @@ -18,4 +19,3 @@ catch(e){ $ERROR('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator'); } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T2.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T2.js index f25dbed82f..6a7f9c1b0e 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T2.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only Function objects implement [[HasInstance]] and can be proper ShiftExpression for the "instanceof" operator consequently - * - * @path ch11/11.8/11.8.6/S11.8.6_A6_T2.js - * @description Checking Math case - */ +/*--- +info: > + Only Function objects implement [[HasInstance]] and can be proper + ShiftExpression for the "instanceof" operator consequently +es5id: 11.8.6_A6_T2 +description: Checking Math case +---*/ //CHECK#1 try{ @@ -18,4 +19,3 @@ catch(e){ $ERROR('#1: 1 instanceof Math throw TypeError'); } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T3.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T3.js index 24773ad973..90d9d1f6fb 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T3.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only Function objects implement [[HasInstance]] and can be proper ShiftExpression for the "instanceof" operator consequently - * - * @path ch11/11.8/11.8.6/S11.8.6_A6_T3.js - * @description Checking if RelationalExpression is function - */ +/*--- +info: > + Only Function objects implement [[HasInstance]] and can be proper + ShiftExpression for the "instanceof" operator consequently +es5id: 11.8.6_A6_T3 +description: Checking if RelationalExpression is function +---*/ function MyFunct(){return 0}; @@ -24,4 +25,3 @@ if (MyFunct instanceof Function !== true){ if (MyFunct instanceof Object !== true){ $ERROR('#3 function MyFunct(){return 0}; MyFunct instanceof Object === true'); } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T4.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T4.js index 68aa843e81..dce76c8064 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T4.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A6_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only Function objects implement [[HasInstance]] and can be proper ShiftExpression for the "instanceof" operator consequently - * - * @path ch11/11.8/11.8.6/S11.8.6_A6_T4.js - * @description Checking if RelationalExpression is object - */ +/*--- +info: > + Only Function objects implement [[HasInstance]] and can be proper + ShiftExpression for the "instanceof" operator consequently +es5id: 11.8.6_A6_T4 +description: Checking if RelationalExpression is object +---*/ MyFunct = function(){}; __my__funct = new MyFunct; @@ -37,4 +38,3 @@ catch(e){ $ERROR('#4 Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator'); } } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T1.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T1.js index 97944a5fdd..197a8d8b7c 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T1.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "instanceof" returns true it means that GetValue(RelationalExpression) is constructed with ShiftExpression - * - * @path ch11/11.8/11.8.6/S11.8.6_A7_T1.js - * @description Checking Object object - */ +/*--- +info: > + When "instanceof" returns true it means that + GetValue(RelationalExpression) is constructed with ShiftExpression +es5id: 11.8.6_A7_T1 +description: Checking Object object +---*/ var __obj={}; @@ -19,4 +20,3 @@ if (!(__obj instanceof Object)) { if (__obj.constructor !== Object) { $ERROR('#2: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression'); } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T2.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T2.js index c77c93c186..1f0689b168 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T2.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "instanceof" returns true it means that GetValue(RelationalExpression) is constructed with ShiftExpression - * - * @path ch11/11.8/11.8.6/S11.8.6_A7_T2.js - * @description Checking Array object - */ +/*--- +info: > + When "instanceof" returns true it means that + GetValue(RelationalExpression) is constructed with ShiftExpression +es5id: 11.8.6_A7_T2 +description: Checking Array object +---*/ var __arr=[]; @@ -19,4 +20,3 @@ if (!(__arr instanceof Array)) { if (__arr.constructor !== Array) { $ERROR('#2: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression'); } - diff --git a/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T3.js b/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T3.js index 8d476a8adc..b0e41fe7dc 100644 --- a/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T3.js +++ b/test/suite/ch11/11.8/11.8.6/S11.8.6_A7_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "instanceof" returns true it means that GetValue(RelationalExpression) is constructed with ShiftExpression - * - * @path ch11/11.8/11.8.6/S11.8.6_A7_T3.js - * @description Checking Function object - */ +/*--- +info: > + When "instanceof" returns true it means that + GetValue(RelationalExpression) is constructed with ShiftExpression +es5id: 11.8.6_A7_T3 +description: Checking Function object +---*/ var __func = new Function; @@ -19,5 +20,3 @@ if (!(__func instanceof Function)) { if (__func.constructor !== Function) { $ERROR('#2: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression'); } - - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A1.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A1.js index 93c67bfcc4..1384889d8c 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A1.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between RelationalExpression and "in" and between "in" and ShiftExpression are allowed - * - * @path ch11/11.8/11.8.7/S11.8.7_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between RelationalExpression and "in" and + between "in" and ShiftExpression are allowed +es5id: 11.8.7_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("'MAX_VALUE'\u0009in\u0009Number") !== true) { @@ -57,4 +58,3 @@ if (eval("'MAX_VALUE'\u2029in\u2029Number") !== true) { if (eval("'MAX_VALUE'\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029in\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Number") !== true) { $ERROR('#10: "MAX_VALUE"\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029in\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number === true'); } - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T1.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T1.js index 0e33a3d029..63f8c58eed 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T1.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "in" uses GetValue - * - * @path ch11/11.8/11.8.7/S11.8.7_A2.1_T1.js - * @description Either Expression is not Reference or GetBase is not null - */ +/*--- +info: Operator "in" uses GetValue +es5id: 11.8.7_A2.1_T1 +description: Either Expression is not Reference or GetBase is not null +---*/ //CHECK#1 if ("MAX_VALUE" in Number !== true) { @@ -31,5 +30,3 @@ var y = Number; if (x in y !== true) { $ERROR('#4: var x = "MAX_VALUE"; var y = Number; x in y === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T2.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T2.js index 307b23b838..5f7d9dabde 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T2.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "in" uses GetValue - * - * @path ch11/11.8/11.8.7/S11.8.7_A2.1_T2.js - * @description If GetBase(RelationalExpression) is null, throw ReferenceError - */ +/*--- +info: Operator "in" uses GetValue +es5id: 11.8.7_A2.1_T2 +description: If GetBase(RelationalExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: MAX_VALUE in Number throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T3.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T3.js index 89f69661a2..757fd25019 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T3.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "in" uses GetValue - * - * @path ch11/11.8/11.8.7/S11.8.7_A2.1_T3.js - * @description If GetBase(ShiftExpression) is null, throw ReferenceError - */ +/*--- +info: Operator "in" uses GetValue +es5id: 11.8.7_A2.1_T3 +description: If GetBase(ShiftExpression) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,4 +17,3 @@ catch (e) { $ERROR('#1.2: "MAX_VALUE" in NUMBER throw ReferenceError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T1.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T1.js index 5403131aea..ff970bce04 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T1.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.7/S11.8.7_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.7_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var NUMBER = 0; @@ -19,5 +18,3 @@ var max_value = "MAX_VALUE"; if (max_value in (max_value = "none", Number) !== true) { $ERROR('#2: var max_value = "MAX_VALUE"; max_value in (max_value = "none", Number) === true'); } - - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T2.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T2.js index 3016c22787..9d65311aee 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T2.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.7/S11.8.7_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.7_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T3.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T3.js index 22744621a0..497a9d32be 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T3.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.8/11.8.7/S11.8.7_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.7_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((NUMBER = Number, "MAX_VALUE") in NUMBER !== true) { $ERROR('#2: (NUMBER = Number, "MAX_VALUE") in NUMBER !== true'); } - - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A3.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A3.js index 56dc731986..9aeb706e71 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A3.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ShiftExpression is not an object, throw TypeError - * - * @path ch11/11.8/11.8.7/S11.8.7_A3.js - * @description Checking all the types of primitives - */ +/*--- +info: If ShiftExpression is not an object, throw TypeError +es5id: 11.8.7_A3 +description: Checking all the types of primitives +---*/ //CHECK#1 try { @@ -62,4 +61,3 @@ catch (e) { $ERROR('#5: "toString" in null throw TypeError'); } } - diff --git a/test/suite/ch11/11.8/11.8.7/S11.8.7_A4.js b/test/suite/ch11/11.8/11.8.7/S11.8.7_A4.js index fcb4a6b86c..a4e3d97dde 100644 --- a/test/suite/ch11/11.8/11.8.7/S11.8.7_A4.js +++ b/test/suite/ch11/11.8/11.8.7/S11.8.7_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator "in" calls ToString(ShiftExpression) - * - * @path ch11/11.8/11.8.7/S11.8.7_A4.js - * @description Checking ToString coversion; - */ +/*--- +info: Operator "in" calls ToString(ShiftExpression) +es5id: 11.8.7_A4 +description: Checking ToString coversion; +---*/ //CHECK#1 var object = {}; @@ -35,4 +34,3 @@ object["null"] = 1; if (null in object !== "null" in object) { $ERROR('#5: "var object = {}; object["null"] = 1; null in object === "null" in object'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A1.js index 3f9904f462..c5cbbaa050 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between EqualityExpression and "==" or between "==" and RelationalExpression are allowed - * - * @path ch11/11.9/11.9.1/S11.9.1_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between EqualityExpression and "==" or + between "==" and RelationalExpression are allowed +es5id: 11.9.1_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("true\u0009==\u00091") !== true) { @@ -57,4 +58,3 @@ if (eval("true\u2029==\u20291") !== true) { if (eval("true\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029==\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== true) { $ERROR('#10: (true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029==\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T1.js index 2d59985aea..40c28cc11d 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x == y uses GetValue - * - * @path ch11/11.9/11.9.1/S11.9.1_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x == y uses GetValue +es5id: 11.9.1_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((1 == 1) !== true) { @@ -40,4 +39,3 @@ objecty.prop = 1; if ((objectx.prop == objecty.prop) !== true) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop == objecty.prop) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T2.js index 21994ea8b2..c112ba6dbd 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x == y uses GetValue - * - * @path ch11/11.9/11.9.1/S11.9.1_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x == y uses GetValue +es5id: 11.9.1_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x == 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T3.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T3.js index 0f8b2c3789..2bd0954ac6 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T3.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x == y uses GetValue - * - * @path ch11/11.9/11.9.1/S11.9.1_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x == y uses GetValue +es5id: 11.9.1_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 == y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T1.js index 04d461dcb2..368433d1ab 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.1/S11.9.1_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.1_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if ((x == (x = 1)) !== false) { $ERROR('#2: var x = 0; (x == (x = 1)) === false'); } - - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T2.js index fdfc3fc929..3950137bdb 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.1/S11.9.1_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.1_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T3.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T3.js index eecdc35aa5..799ef11899 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T3.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.1/S11.9.1_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.1_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if (((y = 1) == y) !== true) { $ERROR('#2: ((y = 1) == y) === true'); } - - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.1.js index f541589763..8e3c05c4e6 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return true, if x and y are both true or both false; otherwise, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A3.1.js - * @description x and y are boolean primitives - */ +/*--- +info: > + Return true, if x and y are both true or both false; otherwise, return + false +es5id: 11.9.1_A3.1 +description: x and y are boolean primitives +---*/ //CHECK#1 if ((true == true) !== true) { @@ -27,4 +28,3 @@ if ((true == false) !== false) { if ((false == true) !== false) { $ERROR('#4: (false == true) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.2.js index d64e869487..7808b2fbdc 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Boolean and Type(y) is Number, - * return the result of comparison ToNumber(x) == y - * - * @path ch11/11.9/11.9.1/S11.9.1_A3.2.js - * @description x is primitive boolean, y is primitive number - */ +/*--- +info: > + If Type(x) is Boolean and Type(y) is Number, + return the result of comparison ToNumber(x) == y +es5id: 11.9.1_A3.2 +description: x is primitive boolean, y is primitive number +---*/ //CHECK#1 if ((true == 1) !== true) { @@ -18,4 +18,3 @@ if ((true == 1) !== true) { if ((false == "0") !== true) { $ERROR('#2: (false == "0") === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.3.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.3.js index 342c6f961c..fe5908865e 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.3.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A3.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(y) is Number and Type(y) is Boolean, - * return the result of comparison x == ToNumber(y) - * - * @path ch11/11.9/11.9.1/S11.9.1_A3.3.js - * @description x is primitive number, y is primitive boolean - */ +/*--- +info: > + If Type(y) is Number and Type(y) is Boolean, + return the result of comparison x == ToNumber(y) +es5id: 11.9.1_A3.3 +description: x is primitive number, y is primitive boolean +---*/ //CHECK#1 if ((0 == false) !== true) { @@ -18,4 +18,3 @@ if ((0 == false) !== true) { if (("1" == true) !== true) { $ERROR('#2: ("1" == true) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T1.js index 2e5b4738a7..020fcdb831 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A4.1_T1.js - * @description x is NaN - */ +/*--- +info: If x or y is NaN, return false +es5id: 11.9.1_A4.1_T1 +description: x is NaN +---*/ //CHECK#1 if ((Number.NaN == true) !== false) { @@ -52,5 +51,3 @@ if ((Number.NaN == "string") !== false) { if ((Number.NaN == new Object()) !== false) { $ERROR('#9: (NaN == new Object()) === false'); } - - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T2.js index 8d3be41d2e..60c2e78615 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A4.1_T2.js - * @description y is NaN - */ +/*--- +info: If x or y is NaN, return false +es5id: 11.9.1_A4.1_T2 +description: y is NaN +---*/ //CHECK#1 if ((true == Number.NaN) !== false) { @@ -52,4 +51,3 @@ if (("string" == Number.NaN) !== false) { if ((new Object() == Number.NaN) !== false) { $ERROR('#9: (new Object() == NaN) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.2.js index b7e26344dc..ab08259450 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0(-0) and y is -0(+0), return true - * - * @path ch11/11.9/11.9.1/S11.9.1_A4.2.js - * @description Checking all combinations - */ +/*--- +info: If x is +0(-0) and y is -0(+0), return true +es5id: 11.9.1_A4.2 +description: Checking all combinations +---*/ //CHECK#1 if ((+0 == -0) !== true) { @@ -17,4 +16,3 @@ if ((+0 == -0) !== true) { if ((-0 == +0) !== true) { $ERROR('#2: (-0 == +0) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.3.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.3.js index b888b280cb..bc1ebb9bfe 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.3.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A4.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Number-s minus NaN, +0, -0. - * Return true, if x is the same number value as y; otherwise, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A4.3.js - * @description x and y are primitive numbers - */ +/*--- +info: > + Type(x) and Type(y) are Number-s minus NaN, +0, -0. + Return true, if x is the same number value as y; otherwise, return false +es5id: 11.9.1_A4.3 +description: x and y are primitive numbers +---*/ //CHECK#1 if ((Number.POSITIVE_INFINITY == Number.POSITIVE_INFINITY) !== true) { @@ -33,4 +33,3 @@ if ((1 == 0.999999999999) !== false) { if ((1.0 == 1) !== true) { $ERROR('#5: (1.0 == 1) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.1.js index 26ba2d50d0..6823707f3b 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are String-s. - * Return true, if x and y are exactly the same sequence of characters; otherwise, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A5.1.js - * @description x and y are primitive string - */ +/*--- +info: > + Type(x) and Type(y) are String-s. + Return true, if x and y are exactly the same sequence of characters; otherwise, return false +es5id: 11.9.1_A5.1 +description: x and y are primitive string +---*/ //CHECK#1 if (("" == "") !== true) { @@ -43,4 +43,3 @@ if (("1.0" == "1") !== false) { if (("0xff" == "255") !== false) { $ERROR('#7: ("0xff" == "255") === false'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.2.js index a6464a5196..70455e2f1f 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Number and Type(y) is String, - * return the result of comparison x == ToNumber(y) - * - * @path ch11/11.9/11.9.1/S11.9.1_A5.2.js - * @description x is primitive number, y is primitive string - */ +/*--- +info: > + If Type(x) is Number and Type(y) is String, + return the result of comparison x == ToNumber(y) +es5id: 11.9.1_A5.2 +description: x is primitive number, y is primitive string +---*/ //CHECK#1 if ((1 == "1") !== true) { @@ -33,4 +33,3 @@ if ((255 == "0xff") !== true) { if ((0 == "") !== true) { $ERROR('#5: (0 == "") === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.3.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.3.js index 7fb95cf748..03b1e1f3fa 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.3.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A5.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is String and Type(y) is Number, - * return the result of comparison ToNumber(x) == y - * - * @path ch11/11.9/11.9.1/S11.9.1_A5.3.js - * @description x is primitive string, y is primitive number - */ +/*--- +info: > + If Type(x) is String and Type(y) is Number, + return the result of comparison ToNumber(x) == y +es5id: 11.9.1_A5.3 +description: x is primitive string, y is primitive number +---*/ //CHECK#1 if (("-1" == -1) !== true) { @@ -28,5 +28,3 @@ if (("false" == 0) !== false) { if (("5e-324" == 5e-324) !== true) { $ERROR('#4: ("5e-324" == 5e-324) === true'); } - - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.1.js index 95e8b80d7d..86a2c8537b 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) as well as Type(y) is undefined or null, return true - * - * @path ch11/11.9/11.9.1/S11.9.1_A6.1.js - * @description Checking all combinations - */ +/*--- +info: If Type(x) as well as Type(y) is undefined or null, return true +es5id: 11.9.1_A6.1 +description: Checking all combinations +---*/ //CHECK#1 if ((undefined == undefined) !== true) { @@ -37,4 +36,3 @@ if ((null == void 0) !== true) { if ((null == null) !== true) { $ERROR('#6: (null == null) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T1.js index 4dcf840519..022f16828b 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If one expression is undefined or null and another is not, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A6.2_T1.js - * @description x is null or undefined, y is not - */ +/*--- +info: If one expression is undefined or null and another is not, return false +es5id: 11.9.1_A6.2_T1 +description: x is null or undefined, y is not +---*/ //CHECK#1 if ((undefined == true) !== false) { @@ -47,4 +46,3 @@ if ((null == "null") !== false) { if ((null == {}) !== false) { $ERROR('#8: (null == {}) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T2.js index 6f5f2ac70f..239b1f8622 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A6.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If one expression is undefined or null and another is not, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A6.2_T2.js - * @description y is null or undefined, x is not - */ +/*--- +info: If one expression is undefined or null and another is not, return false +es5id: 11.9.1_A6.2_T2 +description: y is null or undefined, x is not +---*/ //CHECK#1 if ((false == undefined) !== false) { @@ -47,4 +46,3 @@ if (("null" == null) !== false) { if (({} == null) !== false) { $ERROR('#8: ({} == null) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.1.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.1.js index b2f0d23a7b..720f58ba59 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.1.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Object-s. - * Return true, if x and y are references to the same Object; otherwise, return false - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.1.js - * @description Checking Boolean object, Number object, String object, Object object - */ +/*--- +info: > + Type(x) and Type(y) are Object-s. + Return true, if x and y are references to the same Object; otherwise, return false +es5id: 11.9.1_A7.1 +description: > + Checking Boolean object, Number object, String object, Object + object +---*/ //CHECK#1 if ((new Boolean(true) == new Boolean(true)) !== false) { @@ -50,4 +52,3 @@ if ((new Number(1) == new String("1")) !== false) { if ((new String("1") == new Boolean(true)) !== false) { $ERROR('#8: (new String("x") == new Boolean(true)) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.2.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.2.js index 5704688aea..5c8192847c 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.2.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is Boolean, - * return ToPrimitive(x) == y - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.2.js - * @description x is object, y is primitive boolean - */ +/*--- +info: > + If Type(x) is Object and Type(y) is Boolean, + return ToPrimitive(x) == y +es5id: 11.9.1_A7.2 +description: x is object, y is primitive boolean +---*/ //CHECK#1 if ((new Boolean(true) == true) !== true) { @@ -23,4 +23,3 @@ if ((new Number(1) == true) !== true) { if ((new String("1") == true) !== true) { $ERROR('#3: (new String("1") == true) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.3.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.3.js index c0c89cea08..490099055b 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.3.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Boolean and Type(y) is Object, - * return x == ToPrimitive(y) - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.3.js - * @description y is object, x is primitive boolean - */ +/*--- +info: > + If Type(x) is Boolean and Type(y) is Object, + return x == ToPrimitive(y) +es5id: 11.9.1_A7.3 +description: y is object, x is primitive boolean +---*/ //CHECK#1 if ((true == new Boolean(true)) !== true) { @@ -23,4 +23,3 @@ if ((true == new Number(1)) !== true) { if ((true == new String("+1")) !== true) { $ERROR('#3: (true == new String("+1")) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.4.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.4.js index 65ce2df603..55e6cac20a 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.4.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is Number, - * return ToPrimitive(x) == y - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.4.js - * @description x is object, y is primitive number - */ +/*--- +info: > + If Type(x) is Object and Type(y) is Number, + return ToPrimitive(x) == y +es5id: 11.9.1_A7.4 +description: x is object, y is primitive number +---*/ //CHECK#1 if ((new Boolean(true) == 1) !== true) { @@ -23,4 +23,3 @@ if ((new Number(-1) == -1) !== true) { if ((new String("-1") == -1) !== true) { $ERROR('#3: (new String("-1") == -1) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.5.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.5.js index 87cbe6eedc..c292c8f0ac 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.5.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Number and Type(y) is Object, - * return x == ToPrimitive(y) - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.5.js - * @description y is object, x is primitive number - */ +/*--- +info: > + If Type(x) is Number and Type(y) is Object, + return x == ToPrimitive(y) +es5id: 11.9.1_A7.5 +description: y is object, x is primitive number +---*/ //CHECK#1 if ((1 == new Boolean(true)) !== true) { @@ -23,4 +23,3 @@ if ((-1 == new Number(-1)) !== true) { if ((-1 == new String("-1")) !== true) { $ERROR('#3: (-1 == new String("-1")) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.6.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.6.js index 986f66b90e..3d16906ef3 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.6.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is String, - * return ToPrimitive(x) == y - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.6.js - * @description x is object, y is primitive string - */ +/*--- +info: > + If Type(x) is Object and Type(y) is String, + return ToPrimitive(x) == y +es5id: 11.9.1_A7.6 +description: x is object, y is primitive string +---*/ //CHECK#1 if ((new Boolean(true) == "1") !== true) { @@ -23,4 +23,3 @@ if ((new Number(-1) == "-1") !== true) { if ((new String("x") == "x") !== true) { $ERROR('#3: (new String("x") == "x") === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.7.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.7.js index 4d8412d302..334fed452c 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.7.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is String and Type(y) is Object, - * return x == ToPrimitive(y) - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.7.js - * @description y is object, x is primitive string - */ +/*--- +info: > + If Type(x) is String and Type(y) is Object, + return x == ToPrimitive(y) +es5id: 11.9.1_A7.7 +description: y is object, x is primitive string +---*/ //CHECK#1 if (("1" == new Boolean(true)) !== true) { @@ -23,4 +23,3 @@ if (("-1" == new Number(-1)) !== true) { if (("x" == new String("x")) !== true) { $ERROR('#3: ("x" == new String("x")) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.8.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.8.js index 9aa54434ee..a2130c817c 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.8.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is primitive type, - * return ToPrimitive(x) == y - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.8.js - * @description x is object, y is primtitive - */ +/*--- +info: > + If Type(x) is Object and Type(y) is primitive type, + return ToPrimitive(x) == y +es5id: 11.9.1_A7.8 +description: x is object, y is primtitive +---*/ //CHECK#1 if (({valueOf: function() {return 1}} == true) !== true) { @@ -73,4 +73,3 @@ catch (e) { $ERROR('#8.2: ({valueOf: function() {return {}}, toString: function() {return {}}} == 1) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.9.js b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.9.js index ba4d0f38d0..9e398fcbce 100644 --- a/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.9.js +++ b/test/suite/ch11/11.9/11.9.1/S11.9.1_A7.9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is primitive type and Type(y) is Object, - * return x == ToPrimitive(y) - * - * @path ch11/11.9/11.9.1/S11.9.1_A7.9.js - * @description y is object, x is primtitive - */ +/*--- +info: > + If Type(x) is primitive type and Type(y) is Object, + return x == ToPrimitive(y) +es5id: 11.9.1_A7.9 +description: y is object, x is primtitive +---*/ //CHECK#1 if ((true == {valueOf: function() {return 1}}) !== true) { @@ -73,4 +73,3 @@ catch (e) { $ERROR('#8.2: (1 == {valueOf: function() {return {}}, toString: function() {return {}}}) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A1.js index 5478e2d8ca..c3a1624ee1 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between EqualityExpression and "!=" or between "!=" and RelationalExpression are allowed - * - * @path ch11/11.9/11.9.2/S11.9.2_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between EqualityExpression and "!=" or + between "!=" and RelationalExpression are allowed +es5id: 11.9.2_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("true\u0009!=\u00091") !== false) { @@ -57,4 +58,3 @@ if (eval("true\u2029!=\u20291") !== false) { if (eval("true\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029!=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== false) { $ERROR('#10: (true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029!=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T1.js index 12b5bbe428..fb82d0f1eb 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x != y uses GetValue - * - * @path ch11/11.9/11.9.2/S11.9.2_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x != y uses GetValue +es5id: 11.9.2_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if ((1 != 1) !== false) { @@ -40,4 +39,3 @@ objecty.prop = 1; if ((objectx.prop != objecty.prop) !== false) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop != objecty.prop) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T2.js index aaf6f6a8c7..f06de4aa7d 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x != y uses GetValue - * - * @path ch11/11.9/11.9.2/S11.9.2_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x != y uses GetValue +es5id: 11.9.2_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x != 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T3.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T3.js index f8e65a173e..376c1a6ced 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T3.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x != y uses GetValue - * - * @path ch11/11.9/11.9.2/S11.9.2_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x != y uses GetValue +es5id: 11.9.2_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 != y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T1.js index 5cb029e4f6..67d6ed7292 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.2/S11.9.2_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.2_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if ((x != (x = 1)) !== true) { $ERROR('#2: var x = 0; (x != (x = 1)) === true'); } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T2.js index 6570ee33b5..0a50e4fdcd 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.2/S11.9.2_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.2_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T3.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T3.js index 93cde317eb..39496dd98e 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T3.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.2/S11.9.2_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.2_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if (((y = 1) != y) !== false) { $ERROR('#2: ((y = 1) != y) === false'); } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.1.js index 79921a295c..c49abc6777 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return false, if x and y are both true or both false; otherwise, return true - * - * @path ch11/11.9/11.9.2/S11.9.2_A3.1.js - * @description x and y are boolean primitives - */ +/*--- +info: > + Return false, if x and y are both true or both false; otherwise, return + true +es5id: 11.9.2_A3.1 +description: x and y are boolean primitives +---*/ //CHECK#1 if ((true != true) !== false) { @@ -27,4 +28,3 @@ if ((true != false) !== true) { if ((false != true) !== true) { $ERROR('#4: (false != true) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.2.js index ff0f9c8320..5e8723e027 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Boolean and Type(y) is Number, - * return the result of comparison ToNumber(x) != y - * - * @path ch11/11.9/11.9.2/S11.9.2_A3.2.js - * @description x is primitive boolean, y is primitive number - */ +/*--- +info: > + If Type(x) is Boolean and Type(y) is Number, + return the result of comparison ToNumber(x) != y +es5id: 11.9.2_A3.2 +description: x is primitive boolean, y is primitive number +---*/ //CHECK#1 if ((true != 1) !== false) { @@ -28,5 +28,3 @@ if ((true != new Boolean(true)) !== false) { if ((true != {valueOf: function () {return 1}}) !== false) { $ERROR('#4: (true != {valueOf: function () {return 1}}) === false'); } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.3.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.3.js index b32bf7fbd4..f763c632e4 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.3.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A3.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(y) is Number and Type(y) is Boolean, - * return the result of comparison x != ToNumber(y) - * - * @path ch11/11.9/11.9.2/S11.9.2_A3.3.js - * @description x is primitive number, y is primitive boolean - */ +/*--- +info: > + If Type(y) is Number and Type(y) is Boolean, + return the result of comparison x != ToNumber(y) +es5id: 11.9.2_A3.3 +description: x is primitive number, y is primitive boolean +---*/ //CHECK#1 if ((0 != false) !== false) { @@ -28,4 +28,3 @@ if ((new Boolean(false) != false) !== false) { if (({valueOf: function () {return "0"}} != false) !== false) { $ERROR('#4: ({valueOf: function () {return "0"}} != false) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T1.js index 98b9d074b4..3663ed79fc 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return true - * - * @path ch11/11.9/11.9.2/S11.9.2_A4.1_T1.js - * @description x is NaN - */ +/*--- +info: If x or y is NaN, return true +es5id: 11.9.2_A4.1_T1 +description: x is NaN +---*/ //CHECK#1 if ((Number.NaN != true) !== true) { @@ -52,5 +51,3 @@ if ((Number.NaN != "string") !== true) { if ((Number.NaN != new Object()) !== true) { $ERROR('#9: (NaN != new Object()) === true'); } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T2.js index 471bcb6f60..9a9fc843b7 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return true - * - * @path ch11/11.9/11.9.2/S11.9.2_A4.1_T2.js - * @description y is NaN - */ +/*--- +info: If x or y is NaN, return true +es5id: 11.9.2_A4.1_T2 +description: y is NaN +---*/ //CHECK#1 if ((true != Number.NaN) !== true) { @@ -52,4 +51,3 @@ if (("string" != Number.NaN) !== true) { if ((new Object() != Number.NaN) !== true) { $ERROR('#9: (new Object() != NaN) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.2.js index b8045a6a06..381a44082d 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0(-0) and y is -0(+0), return false - * - * @path ch11/11.9/11.9.2/S11.9.2_A4.2.js - * @description Checking all combinations - */ +/*--- +info: If x is +0(-0) and y is -0(+0), return false +es5id: 11.9.2_A4.2 +description: Checking all combinations +---*/ //CHECK#1 if ((+0 != -0) !== false) { @@ -17,4 +16,3 @@ if ((+0 != -0) !== false) { if ((-0 != +0) !== false) { $ERROR('#2: (-0 != +0) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.3.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.3.js index 21cc16ee19..10bee2eb40 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.3.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A4.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Number-s minus NaN, +0, -0. - * Return false, if x is the same number value as y; otherwise, return true - * - * @path ch11/11.9/11.9.2/S11.9.2_A4.3.js - * @description x and y are primitive numbers - */ +/*--- +info: > + Type(x) and Type(y) are Number-s minus NaN, +0, -0. + Return false, if x is the same number value as y; otherwise, return true +es5id: 11.9.2_A4.3 +description: x and y are primitive numbers +---*/ //CHECK#1 if ((Number.POSITIVE_INFINITY != Number.POSITIVE_INFINITY) !== false) { @@ -33,4 +33,3 @@ if ((1 != 0.999999999999) !== true) { if ((1.0 != 1) !== false) { $ERROR('#5: (1.0 != 1) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.1.js index 9476d907aa..9052291407 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are String-s. - * Return true, if x and y are exactly the same sequence of characters; otherwise, return false - * - * @path ch11/11.9/11.9.2/S11.9.2_A5.1.js - * @description x and y are primitive strings - */ +/*--- +info: > + Type(x) and Type(y) are String-s. + Return true, if x and y are exactly the same sequence of characters; otherwise, return false +es5id: 11.9.2_A5.1 +description: x and y are primitive strings +---*/ //CHECK#1 if (("" != "") !== false) { @@ -43,4 +43,3 @@ if (("1.0" != "1") !== true) { if (("0xff" != "255") !== true) { $ERROR('#7: ("0xff" != "255") === true'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.2.js index f63ffc17d5..96ba95afa8 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Number and Type(y) is String, - * return the result of comparison x != ToNumber(y) - * - * @path ch11/11.9/11.9.2/S11.9.2_A5.2.js - * @description x is primitive number, y is primitive string - */ +/*--- +info: > + If Type(x) is Number and Type(y) is String, + return the result of comparison x != ToNumber(y) +es5id: 11.9.2_A5.2 +description: x is primitive number, y is primitive string +---*/ //CHECK#1 if ((1 != "1") !== false) { @@ -33,4 +33,3 @@ if ((255 != "0xff") !== false) { if ((0 != "") !== false) { $ERROR('#5: (0 != "") === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.3.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.3.js index dedd18ce00..04aa29b5bc 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.3.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A5.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is String and Type(y) is Number, - * return the result of comparison ToNumber(x) != y - * - * @path ch11/11.9/11.9.2/S11.9.2_A5.3.js - * @description x is primitive string, y is primitive number - */ +/*--- +info: > + If Type(x) is String and Type(y) is Number, + return the result of comparison ToNumber(x) != y +es5id: 11.9.2_A5.3 +description: x is primitive string, y is primitive number +---*/ //CHECK#1 if (("-1" != -1) !== false) { @@ -28,5 +28,3 @@ if (("false" != 0) !== true) { if (("5e-324" != 5e-324) !== false) { $ERROR('#4: ("5e-324" != 5e-324) === false'); } - - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.1.js index 8d0cfcd35c..76e9d7a0a7 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) as well as Type(y) is Undefined or Null, return true - * - * @path ch11/11.9/11.9.2/S11.9.2_A6.1.js - * @description Checking all combinations - */ +/*--- +info: If Type(x) as well as Type(y) is Undefined or Null, return true +es5id: 11.9.2_A6.1 +description: Checking all combinations +---*/ //CHECK#1 if ((undefined != undefined) !== false) { @@ -37,4 +36,3 @@ if ((null != void 0) !== false) { if ((null != null) !== false) { $ERROR('#6: (null != null) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T1.js index e9a60e1248..cd6e764a80 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If one expression is undefined or null and another is not, return false - * - * @path ch11/11.9/11.9.2/S11.9.2_A6.2_T1.js - * @description x is null or undefined, y is not - */ +/*--- +info: If one expression is undefined or null and another is not, return false +es5id: 11.9.2_A6.2_T1 +description: x is null or undefined, y is not +---*/ //CHECK#1 if ((undefined != true) !== true) { @@ -47,4 +46,3 @@ if ((null != "null") !== true) { if ((null != {}) !== true) { $ERROR('#8: (null != {}) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T2.js index 05b592b48a..c042e0f09f 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A6.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If one expression is undefined or null and another is not, return false - * - * @path ch11/11.9/11.9.2/S11.9.2_A6.2_T2.js - * @description y is null or undefined, x is not - */ +/*--- +info: If one expression is undefined or null and another is not, return false +es5id: 11.9.2_A6.2_T2 +description: y is null or undefined, x is not +---*/ //CHECK#1 if ((false != undefined) !== true) { @@ -47,4 +46,3 @@ if (("null" != null) !== true) { if (({} != null) !== true) { $ERROR('#8: ({} != null) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.1.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.1.js index 66b468892d..4076e0cb44 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.1.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Object-s. - * Return true, if x and y are references to the same Object; otherwise, return false - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.1.js - * @description Checking Boolean object, Number object, String object, Object object - */ +/*--- +info: > + Type(x) and Type(y) are Object-s. + Return true, if x and y are references to the same Object; otherwise, return false +es5id: 11.9.2_A7.1 +description: > + Checking Boolean object, Number object, String object, Object + object +---*/ //CHECK#1 if ((new Boolean(true) != new Boolean(true)) !== true) { @@ -50,4 +52,3 @@ if ((new Number(1) != new String("1")) !== true) { if ((new String("1") != new Boolean(true)) !== true) { $ERROR('#8: (new String("x") != new Boolean(true)) === true'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.2.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.2.js index 44252a045d..8a64a192c4 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.2.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is Boolean, - * return ToPrimitive(x) != y - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.2.js - * @description x is object, y is primitive boolean - */ +/*--- +info: > + If Type(x) is Object and Type(y) is Boolean, + return ToPrimitive(x) != y +es5id: 11.9.2_A7.2 +description: x is object, y is primitive boolean +---*/ //CHECK#1 if ((new Boolean(true) != true) !== false) { @@ -23,4 +23,3 @@ if ((new Number(1) != true) !== false) { if ((new String("1") != true) !== false) { $ERROR('#3: (new String("1") != true) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.3.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.3.js index 7bd33386ea..08afc2faf0 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.3.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Boolean and Type(y) is Object, - * return x != ToPrimitive(y) - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.3.js - * @description y is object, x is primitive boolean - */ +/*--- +info: > + If Type(x) is Boolean and Type(y) is Object, + return x != ToPrimitive(y) +es5id: 11.9.2_A7.3 +description: y is object, x is primitive boolean +---*/ //CHECK#1 if ((true != new Boolean(true)) !== false) { @@ -23,4 +23,3 @@ if ((true != new Number(1)) !== false) { if ((true != new String("+1")) !== false) { $ERROR('#3: (true != new String("+1")) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.4.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.4.js index c13672d52b..aa8b859061 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.4.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is Number, - * return ToPrimitive(x) != y - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.4.js - * @description x is object, y is primitive number - */ +/*--- +info: > + If Type(x) is Object and Type(y) is Number, + return ToPrimitive(x) != y +es5id: 11.9.2_A7.4 +description: x is object, y is primitive number +---*/ //CHECK#1 if ((new Boolean(true) != 1) !== false) { @@ -23,4 +23,3 @@ if ((new Number(-1) != -1) !== false) { if ((new String("-1") != -1) !== false) { $ERROR('#3: (new String("-1") != -1) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.5.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.5.js index c6cfc4976a..66a35a548f 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.5.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Number and Type(y) is Object, - * return x != ToPrimitive(y) - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.5.js - * @description y is object, x is primitive number - */ +/*--- +info: > + If Type(x) is Number and Type(y) is Object, + return x != ToPrimitive(y) +es5id: 11.9.2_A7.5 +description: y is object, x is primitive number +---*/ //CHECK#1 if ((1 != new Boolean(true)) !== false) { @@ -23,4 +23,3 @@ if ((-1 != new Number(-1)) !== false) { if ((-1 != new String("-1")) !== false) { $ERROR('#3: (-1 != new String("-1")) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.6.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.6.js index 286b9d4d0d..e7b38afb63 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.6.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is String, - * return ToPrimitive(x) != y - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.6.js - * @description x is object, y is primitive string - */ +/*--- +info: > + If Type(x) is Object and Type(y) is String, + return ToPrimitive(x) != y +es5id: 11.9.2_A7.6 +description: x is object, y is primitive string +---*/ //CHECK#1 if ((new Boolean(true) != "1") !== false) { @@ -23,4 +23,3 @@ if ((new Number(-1) != "-1") !== false) { if ((new String("x") != "x") !== false) { $ERROR('#3: (new String("x") != "x") === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.7.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.7.js index cdc8161e07..c00fe0e8a8 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.7.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is String and Type(y) is Object, - * return x != ToPrimitive(y) - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.7.js - * @description y is object, x is primitive string - */ +/*--- +info: > + If Type(x) is String and Type(y) is Object, + return x != ToPrimitive(y) +es5id: 11.9.2_A7.7 +description: y is object, x is primitive string +---*/ //CHECK#1 if (("1" != new Boolean(true)) !== false) { @@ -23,4 +23,3 @@ if (("-1" != new Number(-1)) !== false) { if (("x" != new String("x")) !== false) { $ERROR('#3: ("x" != new String("x")) === false'); } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.8.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.8.js index cf9766d79c..25ffbf975c 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.8.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is Object and Type(y) is primitive type, - * return ToPrimitive(x) != y - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.8.js - * @description x is object, y is primtitive - */ +/*--- +info: > + If Type(x) is Object and Type(y) is primitive type, + return ToPrimitive(x) != y +es5id: 11.9.2_A7.8 +description: x is object, y is primtitive +---*/ //CHECK#1 if ((true != {valueOf: function() {return 1}}) !== false) { @@ -73,4 +73,3 @@ catch (e) { $ERROR('#8: (1 != {valueOf: function() {return {}}, toString: function() {return {}}}) throw TypeError'); } } - diff --git a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.9.js b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.9.js index c1ccc5f32a..b48e146699 100644 --- a/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.9.js +++ b/test/suite/ch11/11.9/11.9.2/S11.9.2_A7.9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is primitive type and Type(y) is Object, - * return x != ToPrimitive(y) - * - * @path ch11/11.9/11.9.2/S11.9.2_A7.9.js - * @description y is object, x is primtitive - */ +/*--- +info: > + If Type(x) is primitive type and Type(y) is Object, + return x != ToPrimitive(y) +es5id: 11.9.2_A7.9 +description: y is object, x is primtitive +---*/ //CHECK#1 if (({valueOf: function() {return 1}} != true) !== false) { @@ -73,4 +73,3 @@ catch (e) { $ERROR('#8.2: ({valueOf: function() {return {}}, toString: function() {return {}}} != 1) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A1.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A1.js index 410fe39626..fa8ba62e28 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A1.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between EqualityExpression and "===" or between "===" and RelationalExpression are allowed - * - * @path ch11/11.9/11.9.4/S11.9.4_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between EqualityExpression and "===" or + between "===" and RelationalExpression are allowed +es5id: 11.9.4_A1 +description: Checking by using eval +---*/ //CHECK#1 if (!(eval("1\u0009===\u00091"))) { @@ -57,4 +58,3 @@ if (!(eval("1\u2029===\u20291"))) { if (!(eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029===\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291"))) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029===\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T1.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T1.js index b9a1958cb1..0e17fab11a 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T1.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x === y uses GetValue - * - * @path ch11/11.9/11.9.4/S11.9.4_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x === y uses GetValue +es5id: 11.9.4_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (!(1 === 1)) { @@ -40,5 +39,3 @@ objecty.prop = 1; if (!(objectx.prop === objecty.prop)) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop === objecty.prop'); } - - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T2.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T2.js index c0741ccd19..32a77c3b7c 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T2.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x === y uses GetValue - * - * @path ch11/11.9/11.9.4/S11.9.4_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x === y uses GetValue +es5id: 11.9.4_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x === 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T3.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T3.js index dc50a2505c..c126bd8f87 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T3.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x === y uses GetValue - * - * @path ch11/11.9/11.9.4/S11.9.4_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x === y uses GetValue +es5id: 11.9.4_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 === y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T1.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T1.js index f24d933b01..40867e1e97 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T1.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.4/S11.9.4_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.4_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (x === (x = 1)) { $ERROR('#2: var x = 0; x !== (x = 1)'); } - - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T2.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T2.js index 02fe1ba7ce..c00358e51b 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T2.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.4/S11.9.4_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.4_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T3.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T3.js index 5b9fa7a039..2a1cc2e395 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T3.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.4/S11.9.4_A2.4_T3.js - * @description Checking with undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.4_A2.4_T3 +description: Checking with undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if (!((y = 1) === y)) { $ERROR('#2: (y = 1) === y'); } - - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A3.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A3.js index 5fc2545d4c..841a5e617a 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A3.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Boolean-s. - * Return true, if x and y are both true and both false; otherwise, return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A3.js - * @description x and y are primitive booleans - */ +/*--- +info: > + Type(x) and Type(y) are Boolean-s. + Return true, if x and y are both true and both false; otherwise, return false +es5id: 11.9.4_A3 +description: x and y are primitive booleans +---*/ //CHECK#1 if (!(true === true)) { @@ -28,4 +28,3 @@ if (true === false) { if (false === true) { $ERROR('#4: false !== true'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T1.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T1.js index b742929df5..2ccba193d4 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T1.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A4.1_T1.js - * @description x is NaN - */ +/*--- +info: If x or y is NaN, return false +es5id: 11.9.4_A4.1_T1 +description: x is NaN +---*/ //CHECK#1 if (Number.NaN === true) { @@ -52,5 +51,3 @@ if (Number.NaN === "string") { if (Number.NaN === new Object()) { $ERROR('#9: NaN !== new Object()'); } - - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T2.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T2.js index 3cd02a9fde..4e31302db0 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T2.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A4.1_T2.js - * @description y is NaN - */ +/*--- +info: If x or y is NaN, return false +es5id: 11.9.4_A4.1_T2 +description: y is NaN +---*/ //CHECK#1 if (true === Number.NaN) { @@ -52,4 +51,3 @@ if ("string" === Number.NaN) { if (new Object() === Number.NaN) { $ERROR('#9: new Object() !== NaN'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.2.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.2.js index 7de56ed7d8..c51e7722cb 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.2.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0(-0) and y is -0(+0), return true - * - * @path ch11/11.9/11.9.4/S11.9.4_A4.2.js - * @description Checking all combinations - */ +/*--- +info: If x is +0(-0) and y is -0(+0), return true +es5id: 11.9.4_A4.2 +description: Checking all combinations +---*/ //CHECK#1 if (!(+0 === -0)) { @@ -17,4 +16,3 @@ if (!(+0 === -0)) { if (!(-0 === +0)) { $ERROR('#2: -0 === +0'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.3.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.3.js index e13bea441b..4c160eb760 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.3.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A4.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Number-s minus NaN, +0, -0. - * Return true, if x is the same number value as y; otherwise, return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A4.3.js - * @description x and y are primitive numbers - */ +/*--- +info: > + Type(x) and Type(y) are Number-s minus NaN, +0, -0. + Return true, if x is the same number value as y; otherwise, return false +es5id: 11.9.4_A4.3 +description: x and y are primitive numbers +---*/ //CHECK#1 if (!(Number.POSITIVE_INFINITY === Number.POSITIVE_INFINITY)) { @@ -53,4 +53,3 @@ if (1 === 0.999999999999) { if (!(1.0 === 1)) { $ERROR('#9: 1.0 === 1'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A5.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A5.js index f32d7c5ae3..e54085300f 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A5.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are String-s. - * Return true, if x and y are exactly the same sequence of characters; otherwise, return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A5.js - * @description x and y are primitive strings - */ +/*--- +info: > + Type(x) and Type(y) are String-s. + Return true, if x and y are exactly the same sequence of characters; otherwise, return false +es5id: 11.9.4_A5 +description: x and y are primitive strings +---*/ //CHECK#1 if (!("" === "")) { @@ -33,4 +33,3 @@ if (" string" === "string ") { if ("1.0" === "1") { $ERROR('#5: "1.0" !== "1"'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.1.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.1.js index b392d432a3..024212f1e1 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.1.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) and Type(y) are Undefined-s, return true - * - * @path ch11/11.9/11.9.4/S11.9.4_A6.1.js - * @description void 0, eval("var x") is undefined - */ +/*--- +info: If Type(x) and Type(y) are Undefined-s, return true +es5id: 11.9.4_A6.1 +description: void 0, eval("var x") is undefined +---*/ //CHECK#1 if (!(undefined === undefined)) { @@ -22,4 +21,3 @@ if (!(void 0 === undefined)) { if (!(undefined === eval("var x"))) { $ERROR('#3: undefined === eval("var x")'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.2.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.2.js index 82bdbea6fd..ba8e341bbe 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.2.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A6.2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) and Type(y) are Null-s, return true - * - * @path ch11/11.9/11.9.4/S11.9.4_A6.2.js - * @description null === null - */ +/*--- +info: If Type(x) and Type(y) are Null-s, return true +es5id: 11.9.4_A6.2 +description: null === null +---*/ //CHECK#1 if (!(null === null)) { $ERROR('#1: null === null'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A7.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A7.js index 0c27f3df51..e3299beaf8 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A7.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Object-s. - * Return true, if x and y are references to the same Object; otherwise, return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A7.js - * @description Checking Boolean object, Number object, String object, Object object - */ +/*--- +info: > + Type(x) and Type(y) are Object-s. + Return true, if x and y are references to the same Object; otherwise, return false +es5id: 11.9.4_A7 +description: > + Checking Boolean object, Number object, String object, Object + object +---*/ //CHECK#1 if (new Object() === new Object()) { @@ -50,4 +52,3 @@ if (new Number(1) === new String("1")) { if (new String("1") === new Boolean(true)) { $ERROR('#8: new String("x") === new Boolean(true)'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T1.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T1.js index ce51dddefe..cb4648c277 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T1.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A8_T1.js - * @description x or y is primitive boolean - */ +/*--- +info: If Type(x) is different from Type(y), return false +es5id: 11.9.4_A8_T1 +description: x or y is primitive boolean +---*/ //CHECK#1 if (true === new Boolean(true)) { @@ -62,4 +61,3 @@ if (false === new String(false)) { if (true === {valueOf: function () {return true}}) { $ERROR('#11: true === {valueOf: function () {return true}}'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T2.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T2.js index c7bfa4d5bd..0a234571c8 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T2.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A8_T2.js - * @description x or y is primitive number - */ +/*--- +info: If Type(x) is different from Type(y), return false +es5id: 11.9.4_A8_T2 +description: x or y is primitive number +---*/ //CHECK#1 if (1 === new Number(1)) { @@ -62,4 +61,3 @@ if (new String(0) === 0) { if (1 === {valueOf: function () {return 1}}) { $ERROR('#11: 1 === {valueOf: function () {return 1}}'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T3.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T3.js index a448bbd70f..e5e4ab48b6 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T3.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A8_T3.js - * @description x or y is primitive string - */ +/*--- +info: If Type(x) is different from Type(y), return false +es5id: 11.9.4_A8_T3 +description: x or y is primitive string +---*/ //CHECK#1 if ("1" === new String("1")) { @@ -62,4 +61,3 @@ if (false === new Number(false)) { if ("1" === {valueOf: function () {return "1"}}) { $ERROR('#11: "1" === {valueOf: function () {return "1"}}'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T4.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T4.js index 92aa846cac..ccf493ab88 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T4.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A8_T4.js - * @description x or y is null or undefined - */ +/*--- +info: If Type(x) is different from Type(y), return false +es5id: 11.9.4_A8_T4 +description: x or y is null or undefined +---*/ //CHECK#1 if (undefined === null) { @@ -77,4 +76,3 @@ if (undefined === "undefined") { if ("undefined" === undefined) { $ERROR('#14: "undefined" !== undefined'); } - diff --git a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T5.js b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T5.js index 5e6bdb2fdc..1bfb5c7dc6 100644 --- a/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T5.js +++ b/test/suite/ch11/11.9/11.9.4/S11.9.4_A8_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return false - * - * @path ch11/11.9/11.9.4/S11.9.4_A8_T5.js - * @description Checking with such x and y that either x or y is primitive string and the other is primitive number - */ +/*--- +info: If Type(x) is different from Type(y), return false +es5id: 11.9.4_A8_T5 +description: > + Checking with such x and y that either x or y is primitive string + and the other is primitive number +---*/ //CHECK#1 try { @@ -24,5 +25,4 @@ try { if (1 === e) { $ERROR('#2: 1 !== throw "1"'); } -} - +} diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A1.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A1.js index c9e88dc0c3..795b37b0a5 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A1.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * White Space and Line Terminator between EqualityExpression and "!==" or between "!==" and RelationalExpression are allowed - * - * @path ch11/11.9/11.9.5/S11.9.5_A1.js - * @description Checking by using eval - */ +/*--- +info: > + White Space and Line Terminator between EqualityExpression and "!==" or + between "!==" and RelationalExpression are allowed +es5id: 11.9.5_A1 +description: Checking by using eval +---*/ //CHECK#1 if (eval("1\u0009!==\u00091")) { @@ -57,4 +58,3 @@ if (eval("1\u2029!==\u20291")) { if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029!==\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) { $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029!==\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T1.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T1.js index 4e9c43c3bb..524d7d7d68 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T1.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x !== y uses GetValue - * - * @path ch11/11.9/11.9.5/S11.9.5_A2.1_T1.js - * @description Either Type is not Reference or GetBase is not null - */ +/*--- +info: Operator x !== y uses GetValue +es5id: 11.9.5_A2.1_T1 +description: Either Type is not Reference or GetBase is not null +---*/ //CHECK#1 if (1 !== 1) { @@ -40,5 +39,3 @@ objecty.prop = 1; if (objectx.prop !== objecty.prop) { $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop === objecty.prop'); } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T2.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T2.js index 52637ce50a..a49fcd703a 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T2.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x !== y uses GetValue - * - * @path ch11/11.9/11.9.5/S11.9.5_A2.1_T2.js - * @description If GetBase(x) is null, throw ReferenceError - */ +/*--- +info: Operator x !== y uses GetValue +es5id: 11.9.5_A2.1_T2 +description: If GetBase(x) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: x !== 1 throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T3.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T3.js index e568cbe313..6cffe9acf7 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T3.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator x !== y uses GetValue - * - * @path ch11/11.9/11.9.5/S11.9.5_A2.1_T3.js - * @description If GetBase(y) is null, throw ReferenceError - */ +/*--- +info: Operator x !== y uses GetValue +es5id: 11.9.5_A2.1_T3 +description: If GetBase(y) is null, throw ReferenceError +---*/ //CHECK#1 try { @@ -18,5 +17,3 @@ catch (e) { $ERROR('#1.2: 1 !== y throw ReferenceError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T1.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T1.js index 7ed77b4405..b48ff2af21 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T1.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.5/S11.9.5_A2.4_T1.js - * @description Checking with "=" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.5_A2.4_T1 +description: Checking with "=" +---*/ //CHECK#1 var x = 0; @@ -19,5 +18,3 @@ var x = 0; if (!(x !== (x = 1))) { $ERROR('#2: var x = 0; x !== (x = 1)'); } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T2.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T2.js index b2872fcde6..efc275935a 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T2.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.5/S11.9.5_A2.4_T2.js - * @description Checking with "throw" - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.5_A2.4_T2 +description: Checking with "throw" +---*/ //CHECK#1 var x = function () { throw "x"; }; @@ -23,4 +22,3 @@ try { } } } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T3.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T3.js index d25f15e4d9..bdefcb3281 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T3.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A2.4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * First expression is evaluated first, and then second expression - * - * @path ch11/11.9/11.9.5/S11.9.5_A2.4_T3.js - * @description Checking undeclarated variables - */ +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.5_A2.4_T3 +description: Checking undeclarated variables +---*/ //CHECK#1 try { @@ -23,5 +22,3 @@ catch (e) { if ((y = 1) !== y) { $ERROR('#2: (y = 1) === y'); } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A3.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A3.js index f13b4574d4..948c47157f 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A3.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Boolean-s. - * Return false, if x and y are both true or both false; otherwise, return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A3.js - * @description x and y are primitive booleans - */ +/*--- +info: > + Type(x) and Type(y) are Boolean-s. + Return false, if x and y are both true or both false; otherwise, return true +es5id: 11.9.5_A3 +description: x and y are primitive booleans +---*/ //CHECK#1 if (true !== true) { @@ -28,4 +28,3 @@ if (!(true !== false)) { if (!(false !== true)) { $ERROR('#4: false !== true'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T1.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T1.js index 44548006bc..28cf08f361 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T1.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A4.1_T1.js - * @description x is NaN - */ +/*--- +info: If x or y is NaN, return true +es5id: 11.9.5_A4.1_T1 +description: x is NaN +---*/ //CHECK#1 if (!(Number.NaN !== true)) { @@ -52,5 +51,3 @@ if (!(Number.NaN !== "string")) { if (!(Number.NaN !== new Object())) { $ERROR('#9: NaN !== new Object()'); } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T2.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T2.js index 8503f0a412..c3a4f9350d 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T2.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x or y is NaN, return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A4.1_T2.js - * @description y is NaN - */ +/*--- +info: If x or y is NaN, return true +es5id: 11.9.5_A4.1_T2 +description: y is NaN +---*/ //CHECK#1 if (!(true !== Number.NaN)) { @@ -52,4 +51,3 @@ if (!("string" !== Number.NaN)) { if (!(new Object() !== Number.NaN)) { $ERROR('#9: new Object() !== NaN'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.2.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.2.js index 1844bb10fc..fe356369ae 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.2.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0(-0) and y is -0(+0), return false - * - * @path ch11/11.9/11.9.5/S11.9.5_A4.2.js - * @description Checking all combinations - */ +/*--- +info: If x is +0(-0) and y is -0(+0), return false +es5id: 11.9.5_A4.2 +description: Checking all combinations +---*/ //CHECK#1 if (+0 !== -0) { @@ -17,4 +16,3 @@ if (+0 !== -0) { if (-0 !== +0) { $ERROR('#2: -0 === +0'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.3.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.3.js index b5469c3b3b..7ec40966ac 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.3.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A4.3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Number-s minus NaN, +0, -0. - * Return false, if x is the same number value as y; otherwise, return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A4.3.js - * @description x and y are primitive numbers - */ +/*--- +info: > + Type(x) and Type(y) are Number-s minus NaN, +0, -0. + Return false, if x is the same number value as y; otherwise, return true +es5id: 11.9.5_A4.3 +description: x and y are primitive numbers +---*/ //CHECK#1 if (Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY) { @@ -53,4 +53,3 @@ if (!(1 !== 0.999999999999)) { if (1.0 !== 1) { $ERROR('#9: 1.0 === 1'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A5.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A5.js index dabb86dbca..46039a4d1c 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A5.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are String-s. - * Return false, if x and y are exactly the same sequence of characters; otherwise, return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A5.js - * @description x and y are primitive strings - */ +/*--- +info: > + Type(x) and Type(y) are String-s. + Return false, if x and y are exactly the same sequence of characters; otherwise, return true +es5id: 11.9.5_A5 +description: x and y are primitive strings +---*/ //CHECK#1 if ("" !== "") { @@ -33,4 +33,3 @@ if (!(" string" !== "string ")) { if (!("1.0" !== "1")) { $ERROR('#5: "1.0" !== "1"'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.1.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.1.js index 7e89a7b6d3..b9fcb5b189 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.1.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) and Type(y) are Undefined-s, return false - * - * @path ch11/11.9/11.9.5/S11.9.5_A6.1.js - * @description void 0, eval("var x") is undefined - */ +/*--- +info: If Type(x) and Type(y) are Undefined-s, return false +es5id: 11.9.5_A6.1 +description: void 0, eval("var x") is undefined +---*/ //CHECK#1 if (undefined !== undefined) { @@ -22,4 +21,3 @@ if (void 0 !== undefined) { if (undefined !== eval("var x")) { $ERROR('#3: undefined === eval("var x")'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.2.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.2.js index 9657e153f9..99f4db7e0d 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.2.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A6.2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) and Type(y) are Null-s, return false - * - * @path ch11/11.9/11.9.5/S11.9.5_A6.2.js - * @description null === null - */ +/*--- +info: If Type(x) and Type(y) are Null-s, return false +es5id: 11.9.5_A6.2 +description: null === null +---*/ //CHECK#1 if (null !== null) { $ERROR('#1: null === null'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A7.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A7.js index 1102b7a12e..6d6c3e777b 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A7.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Type(x) and Type(y) are Object-s. - * Return false, if x and y are references to the same Object; otherwise, return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A7.js - * @description Checking Boolean object, Number object, String object, Object object - */ +/*--- +info: > + Type(x) and Type(y) are Object-s. + Return false, if x and y are references to the same Object; otherwise, return true +es5id: 11.9.5_A7 +description: > + Checking Boolean object, Number object, String object, Object + object +---*/ //CHECK#1 if (!(new Object() !== new Object())) { @@ -50,6 +52,3 @@ if (!(new Number(1) !== new String("1"))) { if (!(new String("1") !== new Boolean(true))) { $ERROR('#8: new String("x") !== new Boolean(true)'); } - - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T1.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T1.js index 8e342212ea..2ae1e09fb3 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T1.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A8_T1.js - * @description x or y is primitive boolean - */ +/*--- +info: If Type(x) is different from Type(y), return true +es5id: 11.9.5_A8_T1 +description: x or y is primitive boolean +---*/ //CHECK#1 if (!(true !== new Boolean(true))) { @@ -62,4 +61,3 @@ if (!(false !== new String(false))) { if (!(true !== {valueOf: function () {return true}})) { $ERROR('#11: true !== {valueOf: function () {return true}}'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T2.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T2.js index 780807c97d..0cc4e7fcdd 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T2.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A8_T2.js - * @description x or y is primitive number - */ +/*--- +info: If Type(x) is different from Type(y), return true +es5id: 11.9.5_A8_T2 +description: x or y is primitive number +---*/ //CHECK#1 if (!(1 !== new Number(1))) { @@ -62,4 +61,3 @@ if (!(new String(0) !== 0)) { if (!(1 !== {valueOf: function () {return 1}})) { $ERROR('#11: 1 !== {valueOf: function () {return 1}}'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T3.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T3.js index 3206868db6..ddc660a221 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T3.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A8_T3.js - * @description x or y is primitive string - */ +/*--- +info: If Type(x) is different from Type(y), return true +es5id: 11.9.5_A8_T3 +description: x or y is primitive string +---*/ //CHECK#1 if (!("1" !== new String("1"))) { @@ -62,5 +61,3 @@ if (!(false !== new Number(false))) { if (!("1" !== {valueOf: function () {return "1"}})) { $ERROR('#11: "1" !== {valueOf: function () {return "1"}}'); } - - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T4.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T4.js index 004549142d..d57b423929 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T4.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A8_T4.js - * @description x or y is null or undefined - */ +/*--- +info: If Type(x) is different from Type(y), return true +es5id: 11.9.5_A8_T4 +description: x or y is null or undefined +---*/ //CHECK#1 if (!(undefined !== null)) { @@ -77,4 +76,3 @@ if (!(undefined !== "undefined")) { if (!("undefined" !== undefined)) { $ERROR('#14: "undefined" !== undefined'); } - diff --git a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T5.js b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T5.js index 3f2c4a6276..1bb1861aa5 100644 --- a/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T5.js +++ b/test/suite/ch11/11.9/11.9.5/S11.9.5_A8_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Type(x) is different from Type(y), return true - * - * @path ch11/11.9/11.9.5/S11.9.5_A8_T5.js - * @description Checking such x and y that either x or y is primitive string and the other is primitive number - */ +/*--- +info: If Type(x) is different from Type(y), return true +es5id: 11.9.5_A8_T5 +description: > + Checking such x and y that either x or y is primitive string and + the other is primitive number +---*/ //CHECK#1 try { @@ -24,5 +25,4 @@ try { if (!(1 !== e)) { $ERROR('#2: 1 !== throw "1"'); } -} - +} diff --git a/test/suite/ch12/12.1/12.1-1.js b/test/suite/ch12/12.1/12.1-1.js index e5311368f6..2e4483c882 100644 --- a/test/suite/ch12/12.1/12.1-1.js +++ b/test/suite/ch12/12.1/12.1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-1.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: try-catch - */ - - -function testcase() { - try { - eval("try{};catch(){}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-1 +description: "12.1 - block '{ StatementListopt };' is not allowed: try-catch" +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("try{};catch(){}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/12.1-2.js b/test/suite/ch12/12.1/12.1-2.js index ab1d4668ee..336a42ffa6 100644 --- a/test/suite/ch12/12.1/12.1-2.js +++ b/test/suite/ch12/12.1/12.1-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-2.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: try-catch-finally - */ - - -function testcase() { - try { - eval("try{};catch{};finally{}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-2 +description: > + 12.1 - block '{ StatementListopt };' is not allowed: + try-catch-finally +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("try{};catch{};finally{}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/12.1-3.js b/test/suite/ch12/12.1/12.1-3.js index e0ccd4f586..3a93757db1 100644 --- a/test/suite/ch12/12.1/12.1-3.js +++ b/test/suite/ch12/12.1/12.1-3.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-3.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: try-finally - */ - - -function testcase() { - try { - eval("try{};finally{}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-3 +description: "12.1 - block '{ StatementListopt };' is not allowed: try-finally" +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("try{};finally{}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/12.1-4.js b/test/suite/ch12/12.1/12.1-4.js index 4df0c5604f..3b33f446e6 100644 --- a/test/suite/ch12/12.1/12.1-4.js +++ b/test/suite/ch12/12.1/12.1-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-4.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: if-else - */ - - -function testcase() { - try { - eval("if{};else{}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-4 +description: "12.1 - block '{ StatementListopt };' is not allowed: if-else" +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("if{};else{}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/12.1-5.js b/test/suite/ch12/12.1/12.1-5.js index 4d2238962f..ce7f18e439 100644 --- a/test/suite/ch12/12.1/12.1-5.js +++ b/test/suite/ch12/12.1/12.1-5.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-5.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: if-else-if - */ - - -function testcase() { - try { - eval("if{};else if{}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-5 +description: "12.1 - block '{ StatementListopt };' is not allowed: if-else-if" +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("if{};else if{}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/12.1-6.js b/test/suite/ch12/12.1/12.1-6.js index d6907d9c6d..ca26adb930 100644 --- a/test/suite/ch12/12.1/12.1-6.js +++ b/test/suite/ch12/12.1/12.1-6.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-6.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: if-else-if-else - */ - - -function testcase() { - try { - eval("if{};else if{};else{}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-6 +description: > + 12.1 - block '{ StatementListopt };' is not allowed: + if-else-if-else +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("if{};else if{};else{}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/12.1-7.js b/test/suite/ch12/12.1/12.1-7.js index ab89adc8b1..9677264caa 100644 --- a/test/suite/ch12/12.1/12.1-7.js +++ b/test/suite/ch12/12.1/12.1-7.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.1/12.1-7.js - * @description 12.1 - block '{ StatementListopt };' is not allowed: do-while - */ - - -function testcase() { - try { - eval("do{};while()"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.1-7 +description: "12.1 - block '{ StatementListopt };' is not allowed: do-while" +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("do{};while()"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.1/S12.1_A2.js b/test/suite/ch12/12.1/S12.1_A2.js index eed2e89d40..eda09af2c4 100644 --- a/test/suite/ch12/12.1/S12.1_A2.js +++ b/test/suite/ch12/12.1/S12.1_A2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production StatementList Statement is evaluated as follows - * 1. Evaluate Statement. - * 2. If an exception was thrown, return (throw, V, empty) where V is the exception - * - * @path ch12/12.1/S12.1_A2.js - * @description Throwing exception within a Block - */ +/*--- +info: > + The production StatementList Statement is evaluated as follows + 1. Evaluate Statement. + 2. If an exception was thrown, return (throw, V, empty) where V is the exception +es5id: 12.1_A2 +description: Throwing exception within a Block +includes: [$PRINT.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -34,4 +35,3 @@ try { // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.1/S12.1_A4_T1.js b/test/suite/ch12/12.1/S12.1_A4_T1.js index 8acad6f1cf..ab3effee41 100644 --- a/test/suite/ch12/12.1/S12.1_A4_T1.js +++ b/test/suite/ch12/12.1/S12.1_A4_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Block can't be inside of expression - * - * @path ch12/12.1/S12.1_A4_T1.js - * @description Checking if execution of "y={__func}()" fails - * @negative - */ +/*--- +info: The production Block can't be inside of expression +es5id: 12.1_A4_T1 +description: Checking if execution of "y={__func}()" fails +flags: [negative] +---*/ function __func(){}; @@ -16,4 +15,3 @@ function __func(){}; y={__func}(); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.1/S12.1_A4_T2.js b/test/suite/ch12/12.1/S12.1_A4_T2.js index 510d6f7b08..7b332eb64d 100644 --- a/test/suite/ch12/12.1/S12.1_A4_T2.js +++ b/test/suite/ch12/12.1/S12.1_A4_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Block can't be inside of expression - * - * @path ch12/12.1/S12.1_A4_T2.js - * @description Checking if execution of "y={x}" fails - * @negative - */ +/*--- +info: The production Block can't be inside of expression +es5id: 12.1_A4_T2 +description: Checking if execution of "y={x}" fails +flags: [negative] +---*/ x=1; @@ -16,4 +15,3 @@ x=1; y={x}; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.1/S12.1_A5.js b/test/suite/ch12/12.1/S12.1_A5.js index 00356061f3..f254345413 100644 --- a/test/suite/ch12/12.1/S12.1_A5.js +++ b/test/suite/ch12/12.1/S12.1_A5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * StatementList: StatementList Statement inside the Block is evaluated from left to right - * - * @path ch12/12.1/S12.1_A5.js - * @description Throwing exceptions within embedded/sequence Blocks - */ +/*--- +info: > + StatementList: StatementList Statement inside the Block is evaluated from + left to right +es5id: 12.1_A5 +description: Throwing exceptions within embedded/sequence Blocks +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -53,5 +54,3 @@ try { } } //////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.10/12.10-0-1.js b/test/suite/ch12/12.10/12.10-0-1.js index b1da0a5b73..93dd3acca7 100644 --- a/test/suite/ch12/12.10/12.10-0-1.js +++ b/test/suite/ch12/12.10/12.10-0-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-1.js - * @description with does not change declaration scope - vars in with are visible outside - */ - - -function testcase() { - var o = {}; - var f = function () { - /* capture foo binding before executing with */ - return foo; - } - - with (o) { - var foo = "12.10-0-1"; - } - - return f()==="12.10-0-1" - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-1 +description: > + with does not change declaration scope - vars in with are visible + outside +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + var f = function () { + /* capture foo binding before executing with */ + return foo; + } + + with (o) { + var foo = "12.10-0-1"; + } + + return f()==="12.10-0-1" + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-10.js b/test/suite/ch12/12.10/12.10-0-10.js index 60e67f5aa5..3600da00b0 100644 --- a/test/suite/ch12/12.10/12.10-0-10.js +++ b/test/suite/ch12/12.10/12.10-0-10.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-10.js - * @description with introduces scope - name lookup finds function parameter - */ - - -function testcase() { - function f(o) { - - function innerf(o, x) { - with (o) { - return x; - } - } - - return innerf(o, 42); - } - - if (f({}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-10 +description: with introduces scope - name lookup finds function parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + + function innerf(o, x) { + with (o) { + return x; + } + } + + return innerf(o, 42); + } + + if (f({}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-11.js b/test/suite/ch12/12.10/12.10-0-11.js index 183ee45f76..cc4c97bb23 100644 --- a/test/suite/ch12/12.10/12.10-0-11.js +++ b/test/suite/ch12/12.10/12.10-0-11.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-11.js - * @description with introduces scope - name lookup finds inner variable - */ - - -function testcase() { - function f(o) { - - function innerf(o) { - var x = 42; - - with (o) { - return x; - } - } - - return innerf(o); - } - - if (f({}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-11 +description: with introduces scope - name lookup finds inner variable +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + + function innerf(o) { + var x = 42; + + with (o) { + return x; + } + } + + return innerf(o); + } + + if (f({}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-12.js b/test/suite/ch12/12.10/12.10-0-12.js index a2a22518b6..bdf59c5d0f 100644 --- a/test/suite/ch12/12.10/12.10-0-12.js +++ b/test/suite/ch12/12.10/12.10-0-12.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-12.js - * @description with introduces scope - name lookup finds property - */ - - -function testcase() { - function f(o) { - - function innerf(o) { - with (o) { - return x; - } - } - - return innerf(o); - } - - if (f({x:42}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-12 +description: with introduces scope - name lookup finds property +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + + function innerf(o) { + with (o) { + return x; + } + } + + return innerf(o); + } + + if (f({x:42}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-3.js b/test/suite/ch12/12.10/12.10-0-3.js index 22d67781eb..2795e32fc6 100644 --- a/test/suite/ch12/12.10/12.10-0-3.js +++ b/test/suite/ch12/12.10/12.10-0-3.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-3.js - * @description with introduces scope - that is captured by function expression - */ - - -function testcase() { - var o = {prop: "12.10-0-3 before"}; - var f; - - with (o) { - f = function () { return prop; } - } - o.prop = "12.10-0-3 after"; - return f()==="12.10-0-3 after" - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-3 +description: with introduces scope - that is captured by function expression +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {prop: "12.10-0-3 before"}; + var f; + + with (o) { + f = function () { return prop; } + } + o.prop = "12.10-0-3 after"; + return f()==="12.10-0-3 after" + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-7.js b/test/suite/ch12/12.10/12.10-0-7.js index 0f780d59e2..b87ae05b92 100644 --- a/test/suite/ch12/12.10/12.10-0-7.js +++ b/test/suite/ch12/12.10/12.10-0-7.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-7.js - * @description with introduces scope - scope removed when exiting with statement - */ - - -function testcase() { - var o = {foo: 1}; - - with (o) { - foo = 42; - } - - try { - foo; - } - catch (e) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-7 +description: with introduces scope - scope removed when exiting with statement +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {foo: 1}; + + with (o) { + foo = 42; + } + + try { + foo; + } + catch (e) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-8.js b/test/suite/ch12/12.10/12.10-0-8.js index 6137348905..f1898b810a 100644 --- a/test/suite/ch12/12.10/12.10-0-8.js +++ b/test/suite/ch12/12.10/12.10-0-8.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-8.js - * @description with introduces scope - var initializer sets like named property - */ - - -function testcase() { - var o = {foo: 42}; - - with (o) { - var foo = "set in with"; - } - - return o.foo === "set in with"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-8 +description: with introduces scope - var initializer sets like named property +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {foo: 42}; + + with (o) { + var foo = "set in with"; + } + + return o.foo === "set in with"; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-0-9.js b/test/suite/ch12/12.10/12.10-0-9.js index 746542ffaf..572df0e663 100644 --- a/test/suite/ch12/12.10/12.10-0-9.js +++ b/test/suite/ch12/12.10/12.10-0-9.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-0-9.js - * @description with introduces scope - name lookup finds outer variable - */ - - -function testcase() { - function f(o) { - var x = 42; - - function innerf(o) { - with (o) { - return x; - } - } - - return innerf(o); - } - - if (f({}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-0-9 +description: with introduces scope - name lookup finds outer variable +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + var x = 42; + + function innerf(o) { + with (o) { + return x; + } + } + + return innerf(o); + } + + if (f({}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-2-1.js b/test/suite/ch12/12.10/12.10-2-1.js index 3ba1eb1ebd..6860de42a5 100644 --- a/test/suite/ch12/12.10/12.10-2-1.js +++ b/test/suite/ch12/12.10/12.10-2-1.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-2-1.js - * @description with - expression being Number - */ - - -function testcase() { - var o = 2; - var foo = 1; - try - { - with (o) { - foo = 42; - } - } - catch(e) - { - } - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-2-1 +description: with - expression being Number +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = 2; + var foo = 1; + try + { + with (o) { + foo = 42; + } + } + catch(e) + { + } + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-2-2.js b/test/suite/ch12/12.10/12.10-2-2.js index a4de02221b..c60065f22a 100644 --- a/test/suite/ch12/12.10/12.10-2-2.js +++ b/test/suite/ch12/12.10/12.10-2-2.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-2-2.js - * @description with - expression being Boolean - */ - - -function testcase() { - var o = true; - var foo = 1; - try - { - with (o) { - foo = 42; - } - } - catch(e) - { - } - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-2-2 +description: with - expression being Boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = true; + var foo = 1; + try + { + with (o) { + foo = 42; + } + } + catch(e) + { + } + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-2-3.js b/test/suite/ch12/12.10/12.10-2-3.js index 07003092c1..ffe633f9d0 100644 --- a/test/suite/ch12/12.10/12.10-2-3.js +++ b/test/suite/ch12/12.10/12.10-2-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-2-3.js - * @description with - expression being string - */ - - -function testcase() { - var o = "str"; - var foo = 1; - try - { - with (o) { - foo = 42; - } - } - catch(e) - { - } - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-2-3 +description: with - expression being string +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = "str"; + var foo = 1; + try + { + with (o) { + foo = 42; + } + } + catch(e) + { + } + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10-7-1.js b/test/suite/ch12/12.10/12.10-7-1.js index 6292efd975..dbde66efad 100644 --- a/test/suite/ch12/12.10/12.10-7-1.js +++ b/test/suite/ch12/12.10/12.10-7-1.js @@ -1,32 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10-7-1.js - * @description with introduces scope - restores the earlier environment on exit - */ - - -function testcase() { - var a = 1; - - var o = {a : 2}; - try - { - with (o) { - a = 3; - throw 1; - a = 4; - } - } - catch(e) - {} - - if (a === 1 && o.a === 3) { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10-7-1 +description: with introduces scope - restores the earlier environment on exit +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = 1; + + var o = {a : 2}; + try + { + with (o) { + a = 3; + throw 1; + a = 4; + } + } + catch(e) + {} + + if (a === 1 && o.a === 3) { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-1-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-1-s.js index 3c042e4123..e4c2b31945 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-1-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-1-s.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-1-s.js - * @description with statement in strict mode throws SyntaxError (strict function) - * @onlyStrict - */ - - -function testcase() { - - try { - // wrapping it in eval since this needs to be a syntax error. The - // exception thrown must be a SyntaxError exception. - eval("\ - function f() {\ - \'use strict\';\ - var o = {}; \ - with (o) {};\ - }\ - "); - return false; - } - catch (e) { - return(e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-1-s +description: with statement in strict mode throws SyntaxError (strict function) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + // wrapping it in eval since this needs to be a syntax error. The + // exception thrown must be a SyntaxError exception. + eval("\ + function f() {\ + \'use strict\';\ + var o = {}; \ + with (o) {};\ + }\ + "); + return false; + } + catch (e) { + return(e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-10-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-10-s.js index 4e470b5170..e88d1eff0a 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-10-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-10-s.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-10-s.js - * @description with statement in strict mode throws SyntaxError (eval, where the container function is strict) - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - // wrapping it in eval since this needs to be a syntax error. The - // exception thrown must be a SyntaxError exception. Note that eval - // inherits the strictness of its calling context. - try { - eval("\ - var o = {};\ - with (o) {}\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-10-s +description: > + with statement in strict mode throws SyntaxError (eval, where the + container function is strict) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + // wrapping it in eval since this needs to be a syntax error. The + // exception thrown must be a SyntaxError exception. Note that eval + // inherits the strictness of its calling context. + try { + eval("\ + var o = {};\ + with (o) {}\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-11-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-11-s.js index 3c4e81daae..6e5bf2a8bd 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-11-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-11-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-11-s.js - * @description Strict Mode - SyntaxError is thrown when using WithStatement in strict mode code - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("with ({}) { throw new Error();}"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-11-s +description: > + Strict Mode - SyntaxError is thrown when using WithStatement in + strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("with ({}) { throw new Error();}"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-11gs.js b/test/suite/ch12/12.10/12.10.1/12.10.1-11gs.js index b40b37236a..f3b3d479c9 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-11gs.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-11gs.js @@ -1,16 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch12/12.10/12.10.1/12.10.1-11gs.js - * @description Strict Mode - SyntaxError is thrown when using with statement - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -with ({}) { } +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-11gs +description: Strict Mode - SyntaxError is thrown when using with statement +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +with ({}) { } diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-12-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-12-s.js index 0f327297d3..e45485ed0a 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-12-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-12-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-12-s.js - * @description with statement in strict mode throws SyntaxError (strict eval) - * @onlyStrict - */ - - -function testcase() { - try { - eval("\ - 'use strict'; \ - var o = {}; \ - with (o) {}\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError) ; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-12-s +description: with statement in strict mode throws SyntaxError (strict eval) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("\ + 'use strict'; \ + var o = {}; \ + with (o) {}\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError) ; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-13-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-13-s.js index 39d56659ee..e5d054e5bd 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-13-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-13-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-13-s.js - * @description Strict Mode - SyntaxError isn't thrown when WithStatement body is in strict mode code - * @noStrict - */ - - -function testcase() { - with ({}) { - "use strict"; - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-13-s +description: > + Strict Mode - SyntaxError isn't thrown when WithStatement body is + in strict mode code +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + with ({}) { + "use strict"; + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-14-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-14-s.js index 0e7e685b74..89f3d68790 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-14-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-14-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-14-s.js - * @description Strict Mode - SyntaxError is thrown when the getter of a literal object utilizes WithStatement - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var obj = { get: function (a) { with(a){} } }; "); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-14-s +description: > + Strict Mode - SyntaxError is thrown when the getter of a literal + object utilizes WithStatement +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var obj = { get: function (a) { with(a){} } }; "); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-15-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-15-s.js index 8621631f65..c9e3c81da6 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-15-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-15-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-15-s.js - * @description Strict Mode - SyntaxError is thrown when the RHS of a dot property assignment utilizes WithStatement - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var obj = {}; obj.get = function (a) { with(a){} }; "); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-15-s +description: > + Strict Mode - SyntaxError is thrown when the RHS of a dot property + assignment utilizes WithStatement +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var obj = {}; obj.get = function (a) { with(a){} }; "); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-16-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-16-s.js index e798b5715f..2dcdd737aa 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-16-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-16-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-16-s.js - * @description Strict Mode - SyntaxError is thrown when the RHS of an object indexer assignment utilizes WithStatement - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var obj = {}; obj['get'] = function (a) { with(a){} }; "); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-16-s +description: > + Strict Mode - SyntaxError is thrown when the RHS of an object + indexer assignment utilizes WithStatement +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var obj = {}; obj['get'] = function (a) { with(a){} }; "); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-2-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-2-s.js index 211a1386ef..80de16529e 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-2-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-2-s.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-2-s.js - * @description with statement in strict mode throws SyntaxError (nested function where container is strict) - * @onlyStrict - */ - - -function testcase() { - try { - // wrapping it in eval since this needs to be a syntax error. The - // exception thrown must be a SyntaxError exception. - eval("\ - function foo() {\ - \'use strict\'; \ - function f() {\ - var o = {}; \ - with (o) {};\ - }\ - }\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-2-s +description: > + with statement in strict mode throws SyntaxError (nested function + where container is strict) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + // wrapping it in eval since this needs to be a syntax error. The + // exception thrown must be a SyntaxError exception. + eval("\ + function foo() {\ + \'use strict\'; \ + function f() {\ + var o = {}; \ + with (o) {};\ + }\ + }\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-3-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-3-s.js index 8b0d2961bc..b6d2612189 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-3-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-3-s.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-3-s.js - * @description with statement in strict mode throws SyntaxError (nested strict function) - * @onlyStrict - */ - - -function testcase() { - try { - // wrapping it in eval since this needs to be a syntax error. The - // exception thrown must be a SyntaxError exception. - eval("\ - function foo() {\ - function f() {\ - \'use strict\'; \ - var o = {}; \ - with (o) {};\ - }\ - }\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-3-s +description: > + with statement in strict mode throws SyntaxError (nested strict + function) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + // wrapping it in eval since this needs to be a syntax error. The + // exception thrown must be a SyntaxError exception. + eval("\ + function foo() {\ + function f() {\ + \'use strict\'; \ + var o = {}; \ + with (o) {};\ + }\ + }\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-4-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-4-s.js index adb09673b5..cf7e1b6922 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-4-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-4-s.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-4-s.js - * @description with statement in strict mode throws SyntaxError (strict Function) - * @onlyStrict - */ - - -function testcase() { - try { - var f = Function("\ - \'use strict\'; \ - var o = {}; \ - with (o) {};\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-4-s +description: with statement in strict mode throws SyntaxError (strict Function) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var f = Function("\ + \'use strict\'; \ + var o = {}; \ + with (o) {};\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-5-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-5-s.js index 3a1ea1ad80..444c4868f8 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-5-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-5-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-5-s.js - * @description with statement allowed in nested Function even if its container Function is strict) - * @onlyStrict - */ - - -function testcase() { - - Function("\'use strict\'; var f1 = Function( \"var o = {}; with (o) {};\")"); - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-5-s +description: > + with statement allowed in nested Function even if its container + Function is strict) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + Function("\'use strict\'; var f1 = Function( \"var o = {}; with (o) {};\")"); + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-7-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-7-s.js index 0ceb2097eb..15a631d465 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-7-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-7-s.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-7-s.js - * @description with statement in strict mode throws SyntaxError (function expression, where the container function is directly evaled from strict code) - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval("var f = function () {\ - var o = {}; \ - with (o) {}; \ - }\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-7-s +description: > + with statement in strict mode throws SyntaxError (function + expression, where the container function is directly evaled from + strict code) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval("var f = function () {\ + var o = {}; \ + with (o) {}; \ + }\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-8-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-8-s.js index 55cfa8e4e7..5eba834357 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-8-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-8-s.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-8-s.js - * @description with statement in strict mode throws SyntaxError (function expression, where the container Function is strict) - * @onlyStrict - */ - - -function testcase() { - try { - Function("\ - \'use strict\'; \ - var f1 = function () {\ - var o = {}; \ - with (o) {}; \ - }\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-8-s +description: > + with statement in strict mode throws SyntaxError (function + expression, where the container Function is strict) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function("\ + \'use strict\'; \ + var f1 = function () {\ + var o = {}; \ + with (o) {}; \ + }\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/12.10.1/12.10.1-9-s.js b/test/suite/ch12/12.10/12.10.1/12.10.1-9-s.js index b0e29e2568..ae083fd876 100644 --- a/test/suite/ch12/12.10/12.10.1/12.10.1-9-s.js +++ b/test/suite/ch12/12.10/12.10.1/12.10.1-9-s.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.10/12.10.1/12.10.1-9-s.js - * @description with statement in strict mode throws SyntaxError (strict function expression) - * @onlyStrict - */ - - -function testcase() { - try { - eval("\ - var f = function () {\ - \'use strict\';\ - var o = {}; \ - with (o) {}; \ - }\ - "); - return false; - } - catch (e) { - return (e instanceof SyntaxError) ; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.10.1-9-s +description: > + with statement in strict mode throws SyntaxError (strict function + expression) +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("\ + var f = function () {\ + \'use strict\';\ + var o = {}; \ + with (o) {}; \ + }\ + "); + return false; + } + catch (e) { + return (e instanceof SyntaxError) ; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.10/S12.10_A1.10_T1.js b/test/suite/ch12/12.10/S12.10_A1.10_T1.js index 2256e66b73..8662e8cdce 100644 --- a/test/suite/ch12/12.10/S12.10_A1.10_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.10_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.10_T1.js - * @description Using interation statement within "with" statement leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.10_T1 +description: > + Using interation statement within "with" statement leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -136,4 +138,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.10_T2.js b/test/suite/ch12/12.10/S12.10_A1.10_T2.js index 35978c0d36..ad4b6735d8 100644 --- a/test/suite/ch12/12.10/S12.10_A1.10_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.10_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.10_T2.js - * @description Using iteration statement within "with" statement leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.10_T2 +description: > + Using iteration statement within "with" statement leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -145,4 +147,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.10_T3.js b/test/suite/ch12/12.10/S12.10_A1.10_T3.js index b7f67f5211..81f0bf4b0b 100644 --- a/test/suite/ch12/12.10/S12.10_A1.10_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.10_T3.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.10_T3.js - * @description Using iteration statment withing "with" statement leading to completion by exception - * iteration statement inside with statement - exception completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.10_T3 +description: > + Using iteration statment withing "with" statement leading to + completion by exception iteration statement inside with statement + - exception completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -148,4 +150,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.10_T4.js b/test/suite/ch12/12.10/S12.10_A1.10_T4.js index 87ba7f6549..c324f3f5ff 100644 --- a/test/suite/ch12/12.10/S12.10_A1.10_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.10_T4.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.10_T4.js - * @description Using iteration statement witthin "with" staement leading to completion by break - * iteration statement inside with statement - break completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.10_T4 +description: > + Using iteration statement witthin "with" staement leading to + completion by break iteration statement inside with statement - + break completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -138,4 +140,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.10_T5.js b/test/suite/ch12/12.10/S12.10_A1.10_T5.js index 05d7d8d046..b66322e324 100644 --- a/test/suite/ch12/12.10/S12.10_A1.10_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.10_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.10_T5.js - * @description Using iteration statement within "with" statement leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.10_T5 +description: > + Using iteration statement within "with" statement leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -139,4 +141,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.11_T1.js b/test/suite/ch12/12.10/S12.10_A1.11_T1.js index a939778d8f..dd5c3541bc 100644 --- a/test/suite/ch12/12.10/S12.10_A1.11_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.11_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.11_T1.js - * @description Calling a function within "with" statement declared without the statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.11_T1 +description: > + Calling a function within "with" statement declared without the + statement, leading to normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.11_T2.js b/test/suite/ch12/12.10/S12.10_A1.11_T2.js index cfbefef484..3ad8c7185e 100644 --- a/test/suite/ch12/12.10/S12.10_A1.11_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.11_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.11_T2.js - * @description Calling a function within "with" statement declared without the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.11_T2 +description: > + Calling a function within "with" statement declared without the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -149,4 +151,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.11_T3.js b/test/suite/ch12/12.10/S12.10_A1.11_T3.js index 9d68c9c9dd..ea2c5658ea 100644 --- a/test/suite/ch12/12.10/S12.10_A1.11_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.11_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.11_T3.js - * @description Calling a function within "with" statement declared without the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.11_T3 +description: > + Calling a function within "with" statement declared without the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -149,4 +151,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.11_T4.js b/test/suite/ch12/12.10/S12.10_A1.11_T4.js index d2fc84a753..368a781fa3 100644 --- a/test/suite/ch12/12.10/S12.10_A1.11_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.11_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.11_T4.js - * @description Calling a function within "with" statement declared without the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.11_T4 +description: > + Calling a function within "with" statement declared without the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,4 +154,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.11_T5.js b/test/suite/ch12/12.10/S12.10_A1.11_T5.js index 9dfc0e5dcd..4e976a4012 100644 --- a/test/suite/ch12/12.10/S12.10_A1.11_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.11_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.11_T5.js - * @description Calling a function within "with" statement declared without the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.11_T5 +description: > + Calling a function within "with" statement declared without the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,4 +154,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.12_T1.js b/test/suite/ch12/12.10/S12.10_A1.12_T1.js index 6ccbf0ca7d..0d0f4249bb 100644 --- a/test/suite/ch12/12.10/S12.10_A1.12_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.12_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.12_T1.js - * @description Calling a function without "with" statement declared within the statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.12_T1 +description: > + Calling a function without "with" statement declared within the + statement, leading to normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.12_T2.js b/test/suite/ch12/12.10/S12.10_A1.12_T2.js index bd0cbe0f84..958e0cd61e 100644 --- a/test/suite/ch12/12.10/S12.10_A1.12_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.12_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.12_T2.js - * @description Calling a function without "with" statement declared within the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.12_T2 +description: > + Calling a function without "with" statement declared within the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -147,4 +149,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.12_T3.js b/test/suite/ch12/12.10/S12.10_A1.12_T3.js index 39ab7d395e..7e02be48c8 100644 --- a/test/suite/ch12/12.10/S12.10_A1.12_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.12_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.12_T3.js - * @description Calling a function without "with" statement declared within the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.12_T3 +description: > + Calling a function without "with" statement declared within the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -148,5 +150,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A1.12_T4.js b/test/suite/ch12/12.10/S12.10_A1.12_T4.js index 49b58c6d51..ee19192c9b 100644 --- a/test/suite/ch12/12.10/S12.10_A1.12_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.12_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.12_T4.js - * @description Calling a function without "with" statement declared within the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.12_T4 +description: > + Calling a function without "with" statement declared within the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -149,4 +151,3 @@ try { if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.12_T5.js b/test/suite/ch12/12.10/S12.10_A1.12_T5.js index 2e35343671..885527c35a 100644 --- a/test/suite/ch12/12.10/S12.10_A1.12_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.12_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.12_T5.js - * @description Calling a function without "with" statement declared within the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.12_T5 +description: > + Calling a function without "with" statement declared within the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,5 +154,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A1.1_T1.js b/test/suite/ch12/12.10/S12.10_A1.1_T1.js index a749c9c207..72e9087f08 100644 --- a/test/suite/ch12/12.10/S12.10_A1.1_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.1_T1.js - * @description Using "with" inside of global context leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.1_T1 +description: Using "with" inside of global context leading to normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -133,4 +133,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.1_T2.js b/test/suite/ch12/12.10/S12.10_A1.1_T2.js index d07cb0e694..db371bb41a 100644 --- a/test/suite/ch12/12.10/S12.10_A1.1_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.1_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.1_T2.js - * @description Using "with" inside of global context leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.1_T2 +description: > + Using "with" inside of global context leading to completion by + exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -142,4 +144,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.1_T3.js b/test/suite/ch12/12.10/S12.10_A1.1_T3.js index 2002090190..37491e7a0b 100644 --- a/test/suite/ch12/12.10/S12.10_A1.1_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.1_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.1_T3.js - * @description Using "with" inside of global context leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.1_T3 +description: > + Using "with" inside of global context leading to completion by + exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.2_T1.js b/test/suite/ch12/12.10/S12.10_A1.2_T1.js index 20a344d48e..99e55b34c5 100644 --- a/test/suite/ch12/12.10/S12.10_A1.2_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.2_T1.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.2_T1.js - * @description Calling a function without "with" statement when the statement itself is declared within the function declaration, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.2_T1 +description: > + Calling a function without "with" statement when the statement + itself is declared within the function declaration, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +144,3 @@ catch(e){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.2_T2.js b/test/suite/ch12/12.10/S12.10_A1.2_T2.js index 39312c70a6..c872f5310d 100644 --- a/test/suite/ch12/12.10/S12.10_A1.2_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.2_T2.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.2_T2.js - * @description Calling a function without "with" statement when the statement itself is declared within the function declaration, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.2_T2 +description: > + Calling a function without "with" statement when the statement + itself is declared within the function declaration, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -146,4 +149,3 @@ catch(e){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.2_T3.js b/test/suite/ch12/12.10/S12.10_A1.2_T3.js index f34c7cb94d..2ff444d560 100644 --- a/test/suite/ch12/12.10/S12.10_A1.2_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.2_T3.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.2_T3.js - * @description Calling a function without "with" statement when the statement itself is declared within the function declaration, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.2_T3 +description: > + Calling a function without "with" statement when the statement + itself is declared within the function declaration, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -148,5 +151,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A1.2_T4.js b/test/suite/ch12/12.10/S12.10_A1.2_T4.js index f8bff8e206..85332a2c81 100644 --- a/test/suite/ch12/12.10/S12.10_A1.2_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.2_T4.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.2_T4.js - * @description Calling a function without "with" statement when the statement itself is declared within the function declaration, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.2_T4 +description: > + Calling a function without "with" statement when the statement + itself is declared within the function declaration, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -150,4 +153,3 @@ catch(e){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.2_T5.js b/test/suite/ch12/12.10/S12.10_A1.2_T5.js index d67f69d6d7..79d22af70f 100644 --- a/test/suite/ch12/12.10/S12.10_A1.2_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.2_T5.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.2_T5.js - * @description Calling a function without "with" statement when the statement itself is declared within the function declaration, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.2_T5 +description: > + Calling a function without "with" statement when the statement + itself is declared within the function declaration, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -148,4 +151,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.3_T1.js b/test/suite/ch12/12.10/S12.10_A1.3_T1.js index 3e453847b8..ab70139573 100644 --- a/test/suite/ch12/12.10/S12.10_A1.3_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.3_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.3_T1.js - * @description Using "with" statement within function constructor, leading to normal completition - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.3_T1 +description: > + Using "with" statement within function constructor, leading to + normal completition +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ catch(e){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.3_T2.js b/test/suite/ch12/12.10/S12.10_A1.3_T2.js index 183d0dabf1..1e0f158b9d 100644 --- a/test/suite/ch12/12.10/S12.10_A1.3_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.3_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.3_T2.js - * @description Using "with" statement within function constructor, leading to normal completition by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.3_T2 +description: > + Using "with" statement within function constructor, leading to + normal completition by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -142,4 +144,3 @@ catch(e){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.3_T3.js b/test/suite/ch12/12.10/S12.10_A1.3_T3.js index e413f3918c..ac3c3aaa29 100644 --- a/test/suite/ch12/12.10/S12.10_A1.3_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.3_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.3_T3.js - * @description Using "with" statement within function constructor, leading to normal completition by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.3_T3 +description: > + Using "with" statement within function constructor, leading to + normal completition by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,5 +146,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A1.3_T4.js b/test/suite/ch12/12.10/S12.10_A1.3_T4.js index 7ac5823f76..9dd378acb3 100644 --- a/test/suite/ch12/12.10/S12.10_A1.3_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.3_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.3_T4.js - * @description Using "with" statement within function constructor, leading to completition by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.3_T4 +description: > + Using "with" statement within function constructor, leading to + completition by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -146,4 +148,3 @@ catch(e){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.3_T5.js b/test/suite/ch12/12.10/S12.10_A1.3_T5.js index 41b85c6dc4..3fde2c8672 100644 --- a/test/suite/ch12/12.10/S12.10_A1.3_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.3_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.3_T5.js - * @description Using "with" statement within function constructor, leading to completition by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.3_T5 +description: > + Using "with" statement within function constructor, leading to + completition by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,5 +154,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A1.4_T1.js b/test/suite/ch12/12.10/S12.10_A1.4_T1.js index 2bbec00ecc..2797790ce1 100644 --- a/test/suite/ch12/12.10/S12.10_A1.4_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.4_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.4_T1.js - * @description Using "with" statement within iteration statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.4_T1 +description: > + Using "with" statement within iteration statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -136,4 +138,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.4_T2.js b/test/suite/ch12/12.10/S12.10_A1.4_T2.js index 9bafbb075b..405f88ff7c 100644 --- a/test/suite/ch12/12.10/S12.10_A1.4_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.4_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.4_T2.js - * @description Using "with" statement within iteration statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.4_T2 +description: > + Using "with" statement within iteration statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -145,4 +147,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.4_T3.js b/test/suite/ch12/12.10/S12.10_A1.4_T3.js index 3b3e72f8ae..ac0f5b2306 100644 --- a/test/suite/ch12/12.10/S12.10_A1.4_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.4_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.4_T3.js - * @description Using "with" statement within iteration statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.4_T3 +description: > + Using "with" statement within iteration statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -147,4 +149,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.4_T4.js b/test/suite/ch12/12.10/S12.10_A1.4_T4.js index b9209bb67c..f82c53a54d 100644 --- a/test/suite/ch12/12.10/S12.10_A1.4_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.4_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.4_T4.js - * @description Using "with" statement within iteration statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.4_T4 +description: > + Using "with" statement within iteration statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -137,4 +139,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.4_T5.js b/test/suite/ch12/12.10/S12.10_A1.4_T5.js index b942e2b415..e5576a7095 100644 --- a/test/suite/ch12/12.10/S12.10_A1.4_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.4_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.4_T5.js - * @description Using "with" statement within iteration statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.4_T5 +description: > + Using "with" statement within iteration statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -139,4 +141,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.5_T1.js b/test/suite/ch12/12.10/S12.10_A1.5_T1.js index a45cd5df14..2f64e9200c 100644 --- a/test/suite/ch12/12.10/S12.10_A1.5_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.5_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.5_T1.js - * @description Using "with" statement within "for-in" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.5_T1 +description: > + Using "with" statement within "for-in" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.5_T2.js b/test/suite/ch12/12.10/S12.10_A1.5_T2.js index 4efa5a2164..e5b98fb862 100644 --- a/test/suite/ch12/12.10/S12.10_A1.5_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.5_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.5_T2.js - * @description Using "with" statement within "for-in" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.5_T2 +description: > + Using "with" statement within "for-in" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.5_T3.js b/test/suite/ch12/12.10/S12.10_A1.5_T3.js index e4cace7e1f..a444a6c06f 100644 --- a/test/suite/ch12/12.10/S12.10_A1.5_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.5_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.5_T3.js - * @description Using "with" statement within "for-in" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.5_T3 +description: > + Using "with" statement within "for-in" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,4 +154,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.5_T4.js b/test/suite/ch12/12.10/S12.10_A1.5_T4.js index 6655901d66..2d4927502e 100644 --- a/test/suite/ch12/12.10/S12.10_A1.5_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.5_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.5_T4.js - * @description Using "with" statement within "for-in" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.5_T4 +description: > + Using "with" statement within "for-in" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -136,4 +138,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.5_T5.js b/test/suite/ch12/12.10/S12.10_A1.5_T5.js index 1273f5166f..876d3da07c 100644 --- a/test/suite/ch12/12.10/S12.10_A1.5_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.5_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.5_T5.js - * @description Using "with" statement within "for-in" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.5_T5 +description: > + Using "with" statement within "for-in" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.6_T1.js b/test/suite/ch12/12.10/S12.10_A1.6_T1.js index 608ceef9fa..4c50075c72 100644 --- a/test/suite/ch12/12.10/S12.10_A1.6_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.6_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.6_T1.js - * @description Using "with" statement within another "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.6_T1 +description: > + Using "with" statement within another "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -135,4 +137,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.6_T2.js b/test/suite/ch12/12.10/S12.10_A1.6_T2.js index 8cfae1a8bd..c51f3e249d 100644 --- a/test/suite/ch12/12.10/S12.10_A1.6_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.6_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.6_T2.js - * @description Using "with" statement within another "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.6_T2 +description: > + Using "with" statement within another "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.6_T3.js b/test/suite/ch12/12.10/S12.10_A1.6_T3.js index 4774eb44d9..bd85e26513 100644 --- a/test/suite/ch12/12.10/S12.10_A1.6_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.6_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.6_T3.js - * @description Using "with" statement within another "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.6_T3 +description: > + Using "with" statement within another "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -146,4 +148,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.7_T1.js b/test/suite/ch12/12.10/S12.10_A1.7_T1.js index 134af702c0..2fa36a9c65 100644 --- a/test/suite/ch12/12.10/S12.10_A1.7_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.7_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.7_T1.js - * @description Calling a function within "with" statement declared within the statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.7_T1 +description: > + Calling a function within "with" statement declared within the + statement, leading to normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.7_T2.js b/test/suite/ch12/12.10/S12.10_A1.7_T2.js index 3efde03289..c1177660b8 100644 --- a/test/suite/ch12/12.10/S12.10_A1.7_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.7_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.7_T2.js - * @description Calling a function within "with" statement declared within the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.7_T2 +description: > + Calling a function within "with" statement declared within the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -146,4 +148,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.7_T3.js b/test/suite/ch12/12.10/S12.10_A1.7_T3.js index d43395763f..7e23a49c9a 100644 --- a/test/suite/ch12/12.10/S12.10_A1.7_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.7_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.7_T3.js - * @description Calling a function within "with" statement declared within the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.7_T3 +description: > + Calling a function within "with" statement declared within the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -148,4 +150,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.7_T4.js b/test/suite/ch12/12.10/S12.10_A1.7_T4.js index 9ca70ef1cb..e0ca3f5173 100644 --- a/test/suite/ch12/12.10/S12.10_A1.7_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.7_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.7_T4.js - * @description Calling a function within "with" statement declared within the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.7_T4 +description: > + Calling a function within "with" statement declared within the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -150,4 +152,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.7_T5.js b/test/suite/ch12/12.10/S12.10_A1.7_T5.js index d7070388b0..3844d8fd35 100644 --- a/test/suite/ch12/12.10/S12.10_A1.7_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.7_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.7_T5.js - * @description Calling a function within "with" statement declared within the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.7_T5 +description: > + Calling a function within "with" statement declared within the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,4 +154,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.8_T1.js b/test/suite/ch12/12.10/S12.10_A1.8_T1.js index 73519377b6..c12761e398 100644 --- a/test/suite/ch12/12.10/S12.10_A1.8_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.8_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.8_T1.js - * @description Declaring function constructor within "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.8_T1 +description: > + Declaring function constructor within "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.8_T2.js b/test/suite/ch12/12.10/S12.10_A1.8_T2.js index fd81d2bfc6..d743660b09 100644 --- a/test/suite/ch12/12.10/S12.10_A1.8_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.8_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.8_T2.js - * @description Declaring function constructor within "with" statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.8_T2 +description: > + Declaring function constructor within "with" statement, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.8_T3.js b/test/suite/ch12/12.10/S12.10_A1.8_T3.js index 39a648266f..55303b67a3 100644 --- a/test/suite/ch12/12.10/S12.10_A1.8_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.8_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.8_T3.js - * @description Declaring function constructor within "with" statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.8_T3 +description: > + Declaring function constructor within "with" statement, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.8_T4.js b/test/suite/ch12/12.10/S12.10_A1.8_T4.js index f6eed2043e..1a5f1e62cd 100644 --- a/test/suite/ch12/12.10/S12.10_A1.8_T4.js +++ b/test/suite/ch12/12.10/S12.10_A1.8_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.8_T4.js - * @description Declaring function constructor within "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.8_T4 +description: > + Declaring function constructor within "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -149,4 +151,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.8_T5.js b/test/suite/ch12/12.10/S12.10_A1.8_T5.js index c2425b1f18..810a561226 100644 --- a/test/suite/ch12/12.10/S12.10_A1.8_T5.js +++ b/test/suite/ch12/12.10/S12.10_A1.8_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.8_T5.js - * @description Declaring function constructor within "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.8_T5 +description: > + Declaring function constructor within "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -152,4 +154,3 @@ catch(e){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.9_T1.js b/test/suite/ch12/12.10/S12.10_A1.9_T1.js index 629b517b40..c0f8ed31e9 100644 --- a/test/suite/ch12/12.10/S12.10_A1.9_T1.js +++ b/test/suite/ch12/12.10/S12.10_A1.9_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.9_T1.js - * @description Using "for-in" statement within "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.9_T1 +description: > + Using "for-in" statement within "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -141,4 +143,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.9_T2.js b/test/suite/ch12/12.10/S12.10_A1.9_T2.js index 8e82e60eb0..7496935955 100644 --- a/test/suite/ch12/12.10/S12.10_A1.9_T2.js +++ b/test/suite/ch12/12.10/S12.10_A1.9_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.9_T2.js - * @description Using "for-in" statement within "with" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.9_T2 +description: > + Using "for-in" statement within "with" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -136,4 +138,3 @@ if(!(value === undefined)){ if(!(myObj.value === "value")){ $ERROR('#19: myObj.value === "value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A1.9_T3.js b/test/suite/ch12/12.10/S12.10_A1.9_T3.js index 52ba815fc3..3bc91f9897 100644 --- a/test/suite/ch12/12.10/S12.10_A1.9_T3.js +++ b/test/suite/ch12/12.10/S12.10_A1.9_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The with statement adds a computed object to the front of the - * scope chain of the current execution context - * - * @path ch12/12.10/S12.10_A1.9_T3.js - * @description Using "for-in" statement within "with" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + The with statement adds a computed object to the front of the + scope chain of the current execution context +es5id: 12.10_A1.9_T3 +description: > + Using "for-in" statement within "with" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; this.p2 = 2; @@ -144,4 +146,3 @@ if(!(value === undefined)){ if(!(myObj.value === "myObj_value")){ $ERROR('#19: myObj.value === "myObj_value". Actual: myObj.value ==='+ myObj.value ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.10_T1.js b/test/suite/ch12/12.10/S12.10_A3.10_T1.js index 17fd49b0a1..2814ceee29 100644 --- a/test/suite/ch12/12.10/S12.10_A3.10_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.10_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.10_T1.js - * @description Using iteration statement within "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.10_T1 +description: > + Using iteration statement within "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -41,7 +43,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.10_T2.js b/test/suite/ch12/12.10/S12.10_A3.10_T2.js index 12c26bd865..533d1a7942 100644 --- a/test/suite/ch12/12.10/S12.10_A3.10_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.10_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.10_T2.js - * @description Using iteration statement within "with" statement, leading completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.10_T2 +description: > + Using iteration statement within "with" statement, leading + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.10_T3.js b/test/suite/ch12/12.10/S12.10_A3.10_T3.js index 32c27cce46..2b08e5afa6 100644 --- a/test/suite/ch12/12.10/S12.10_A3.10_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.10_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.10_T3.js - * @description Using iteration statement within "with" statement, leading completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.10_T3 +description: > + Using iteration statement within "with" statement, leading + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.10_T4.js b/test/suite/ch12/12.10/S12.10_A3.10_T4.js index 5f55777e2e..72b53ad24f 100644 --- a/test/suite/ch12/12.10/S12.10_A3.10_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.10_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.10_T4.js - * @description Using iteration statement within "with" statement, leading completion be break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.10_T4 +description: > + Using iteration statement within "with" statement, leading + completion be break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,6 +44,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.10_T5.js b/test/suite/ch12/12.10/S12.10_A3.10_T5.js index b26cd9d432..db3e63312b 100644 --- a/test/suite/ch12/12.10/S12.10_A3.10_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.10_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.10_T5.js - * @description Using iteration statement within "with" statement, leading completion be break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.10_T5 +description: > + Using iteration statement within "with" statement, leading + completion be break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,4 +44,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.11_T1.js b/test/suite/ch12/12.10/S12.10_A3.11_T1.js index 8d15c14863..62baa758d4 100644 --- a/test/suite/ch12/12.10/S12.10_A3.11_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.11_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.11_T1.js - * @description Calling a function within "with" statement declared without the statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.11_T1 +description: > + Calling a function within "with" statement declared without the + statement, leading to normal completion +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -32,4 +34,3 @@ if(!(p1 === "x1")){ if(!(myObj.p1 === "a")){ $ERROR('#2: myObj.p1 === "a". Actual: myObj.p1 ==='+ myObj.p1 ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.11_T2.js b/test/suite/ch12/12.10/S12.10_A3.11_T2.js index 81cdcc6af9..23068ab7ef 100644 --- a/test/suite/ch12/12.10/S12.10_A3.11_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.11_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.11_T2.js - * @description Calling a function within "with" statement declared without the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.11_T2 +description: > + Calling a function within "with" statement declared without the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -38,4 +40,3 @@ if(!(myObj.p1 === "a")){ if(!(result === "value")){ $ERROR('#3: result === "value". Actual: result ==='+ result ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.11_T3.js b/test/suite/ch12/12.10/S12.10_A3.11_T3.js index 35e24fee00..2e523a0026 100644 --- a/test/suite/ch12/12.10/S12.10_A3.11_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.11_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.11_T3.js - * @description Calling a function within "with" statement declared without the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.11_T3 +description: > + Calling a function within "with" statement declared without the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -38,5 +40,3 @@ if(!(myObj.p1 === "a")){ if(!(result === "value")){ $ERROR('#3: result === "value". Actual: result ==='+ result ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A3.11_T4.js b/test/suite/ch12/12.10/S12.10_A3.11_T4.js index 7056d61813..3e87e9ee2a 100644 --- a/test/suite/ch12/12.10/S12.10_A3.11_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.11_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.11_T4.js - * @description Calling a function within "with" statement declared without the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.11_T4 +description: > + Calling a function within "with" statement declared without the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -42,6 +44,3 @@ if(!(myObj.p1 === "a")){ if(!(result === "value")){ $ERROR('#3: result === "value". Actual: result ==='+ result ); } - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.11_T5.js b/test/suite/ch12/12.10/S12.10_A3.11_T5.js index ebce27c9fc..ef93ef1a77 100644 --- a/test/suite/ch12/12.10/S12.10_A3.11_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.11_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.11_T5.js - * @description Calling a function within "with" statement declared without the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.11_T5 +description: > + Calling a function within "with" statement declared without the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -41,5 +43,3 @@ if(!(myObj.p1 === "a")){ if(!(result === "value")){ $ERROR('#3: result === "value". Actual: result ==='+ result ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A3.12_T1.js b/test/suite/ch12/12.10/S12.10_A3.12_T1.js index 1ec9f76076..5920d79b14 100644 --- a/test/suite/ch12/12.10/S12.10_A3.12_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.12_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.12_T1.js - * @description Calling a function without "with" statement declared within the statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.12_T1 +description: > + Calling a function without "with" statement declared within the + statement, leading to normal completion +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -32,4 +34,3 @@ if(!(p1 === 1)){ if(!(myObj.p1 === "x1")){ $ERROR('#2: myObj.p1 === "x1". Actual: myObj.p1 ==='+ myObj.p1 ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.12_T2.js b/test/suite/ch12/12.10/S12.10_A3.12_T2.js index 171ef5808b..e65037884b 100644 --- a/test/suite/ch12/12.10/S12.10_A3.12_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.12_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.12_T2.js - * @description Calling a function without "with" statement declared within the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.12_T2 +description: > + Calling a function without "with" statement declared within the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -38,4 +40,3 @@ if(!(myObj.p1 === "x1")){ if(!(result === "myObj_value")){ $ERROR('#3: result === "myObj_value". Actual: result ==='+ result ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.12_T3.js b/test/suite/ch12/12.10/S12.10_A3.12_T3.js index 3cea6bc58c..cc91f694bf 100644 --- a/test/suite/ch12/12.10/S12.10_A3.12_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.12_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.12_T3.js - * @description Calling a function without "with" statement declared within the statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.12_T3 +description: > + Calling a function without "with" statement declared within the + statement, leading to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -37,4 +39,3 @@ if(!(myObj.p1 === "a")){ if(!(result === "myObj_value")){ $ERROR('#3: result === "myObj_value". Actual: result ==='+ result ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.12_T4.js b/test/suite/ch12/12.10/S12.10_A3.12_T4.js index 1049d25fec..0104493bda 100644 --- a/test/suite/ch12/12.10/S12.10_A3.12_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.12_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.12_T4.js - * @description Calling a function without "with" statement declared within the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.12_T4 +description: > + Calling a function without "with" statement declared within the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -41,5 +43,3 @@ if(!(myObj.p1 === "x1")){ if(!(result === "myObj_value")){ $ERROR('#3: result === "myObj_value". Actual: result ==='+ result ); } - - diff --git a/test/suite/ch12/12.10/S12.10_A3.12_T5.js b/test/suite/ch12/12.10/S12.10_A3.12_T5.js index 9d3c9fed91..60c69fbca1 100644 --- a/test/suite/ch12/12.10/S12.10_A3.12_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.12_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.12_T5.js - * @description Calling a function without "with" statement declared within the statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.12_T5 +description: > + Calling a function without "with" statement declared within the + statement, leading to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -41,4 +43,3 @@ if(!(myObj.p1 === "a")){ if(!(result === "myObj_value")){ $ERROR('#3: result === "myObj_value". Actual: result ==='+ result ); } - diff --git a/test/suite/ch12/12.10/S12.10_A3.1_T1.js b/test/suite/ch12/12.10/S12.10_A3.1_T1.js index 58ee15b9c3..7f7529087d 100644 --- a/test/suite/ch12/12.10/S12.10_A3.1_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.1_T1.js - * @description Using "with" statement within global context - normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.1_T1 +description: Using "with" statement within global context - normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -40,6 +40,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.1_T2.js b/test/suite/ch12/12.10/S12.10_A3.1_T2.js index 12b72b2c2a..07c868d04f 100644 --- a/test/suite/ch12/12.10/S12.10_A3.1_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.1_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.1_T2.js - * @description Using "with" statement within global context, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.1_T2 +description: > + Using "with" statement within global context, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -56,4 +58,3 @@ if (myObj.p1 !== "x1") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.1_T3.js b/test/suite/ch12/12.10/S12.10_A3.1_T3.js index f780520199..0a119e41b1 100644 --- a/test/suite/ch12/12.10/S12.10_A3.1_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.1_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.1_T3.js - * @description Using "with" statement within global context, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.1_T3 +description: > + Using "with" statement within global context, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; var result = "result"; @@ -51,8 +53,3 @@ if(!(myObj.p1 === "a")){ } // ////////////////////////////////////////////////////////////////////////////// - - - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.2_T1.js b/test/suite/ch12/12.10/S12.10_A3.2_T1.js index 0d3e11beb2..b224285a05 100644 --- a/test/suite/ch12/12.10/S12.10_A3.2_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.2_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.2_T1.js - * @description Declaring "with" statement within a function body, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.2_T1 +description: > + Declaring "with" statement within a function body, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -43,4 +45,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.2_T2.js b/test/suite/ch12/12.10/S12.10_A3.2_T2.js index 2ef4889d4a..4bf66f0873 100644 --- a/test/suite/ch12/12.10/S12.10_A3.2_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.2_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.2_T2.js - * @description Declaring "with" statement within a function body, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.2_T2 +description: > + Declaring "with" statement within a function body, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -44,6 +46,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.2_T3.js b/test/suite/ch12/12.10/S12.10_A3.2_T3.js index 8f46552e7c..f1700524d3 100644 --- a/test/suite/ch12/12.10/S12.10_A3.2_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.2_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.2_T3.js - * @description Declaring "with" statement within a function body, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.2_T3 +description: > + Declaring "with" statement within a function body, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -44,4 +46,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.2_T4.js b/test/suite/ch12/12.10/S12.10_A3.2_T4.js index 3c55980880..3b59d8612a 100644 --- a/test/suite/ch12/12.10/S12.10_A3.2_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.2_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.2_T4.js - * @description Declaring "with" statement within a function body, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.2_T4 +description: > + Declaring "with" statement within a function body, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -57,4 +59,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.2_T5.js b/test/suite/ch12/12.10/S12.10_A3.2_T5.js index 61d86905aa..aff2506168 100644 --- a/test/suite/ch12/12.10/S12.10_A3.2_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.2_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.2_T5.js - * @description Declaring "with" statement within a function body, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.2_T5 +description: > + Declaring "with" statement within a function body, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -56,8 +58,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - - - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.3_T1.js b/test/suite/ch12/12.10/S12.10_A3.3_T1.js index 27a3108374..b2a6fb200d 100644 --- a/test/suite/ch12/12.10/S12.10_A3.3_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.3_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.3_T1.js - * @description Declaring "with" statement within a function constructor, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.3_T1 +description: > + Declaring "with" statement within a function constructor, leading + to normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -43,6 +45,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.3_T2.js b/test/suite/ch12/12.10/S12.10_A3.3_T2.js index de6faab315..bb1ff220ae 100644 --- a/test/suite/ch12/12.10/S12.10_A3.3_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.3_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.3_T2.js - * @description Declaring "with" statement within a function constructor, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.3_T2 +description: > + Declaring "with" statement within a function constructor, leading + to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -44,4 +46,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.3_T3.js b/test/suite/ch12/12.10/S12.10_A3.3_T3.js index 4a981756af..3d03aac491 100644 --- a/test/suite/ch12/12.10/S12.10_A3.3_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.3_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.3_T3.js - * @description Declaring "with" statement within a function constructor, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.3_T3 +description: > + Declaring "with" statement within a function constructor, leading + to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -44,6 +46,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.3_T4.js b/test/suite/ch12/12.10/S12.10_A3.3_T4.js index 3eeb2ed5ea..a4a80a90d3 100644 --- a/test/suite/ch12/12.10/S12.10_A3.3_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.3_T4.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.3_T4.js - * @description Declaring "with" statement within a function constructor, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', the scope chain is + always restored to its former state +es5id: 12.10_A3.3_T4 +description: > + Declaring "with" statement within a function constructor, leading + to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -55,4 +58,3 @@ if (myObj.p1 !== "x1") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.4_T1.js b/test/suite/ch12/12.10/S12.10_A3.4_T1.js index 1ef21667b6..58244c23c8 100644 --- a/test/suite/ch12/12.10/S12.10_A3.4_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.4_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.4_T1.js - * @description Using "with" statement within iteration statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.4_T1 +description: > + Using "with" statement within iteration statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -41,6 +43,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.4_T2.js b/test/suite/ch12/12.10/S12.10_A3.4_T2.js index 801c592aa6..9051f659be 100644 --- a/test/suite/ch12/12.10/S12.10_A3.4_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.4_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.4_T2.js - * @description Using "with" statement within iteration statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.4_T2 +description: > + Using "with" statement within iteration statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.4_T3.js b/test/suite/ch12/12.10/S12.10_A3.4_T3.js index 56698024eb..78dcb2b493 100644 --- a/test/suite/ch12/12.10/S12.10_A3.4_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.4_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.4_T3.js - * @description Using "with" statement within iteration statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.4_T3 +description: > + Using "with" statement within iteration statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.4_T4.js b/test/suite/ch12/12.10/S12.10_A3.4_T4.js index 557666a9cb..203c84832f 100644 --- a/test/suite/ch12/12.10/S12.10_A3.4_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.4_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.4_T4.js - * @description Using "with" statement within iteration statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.4_T4 +description: > + Using "with" statement within iteration statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,6 +44,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.4_T5.js b/test/suite/ch12/12.10/S12.10_A3.4_T5.js index 06816be053..fec2624bb0 100644 --- a/test/suite/ch12/12.10/S12.10_A3.4_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.4_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.4_T5.js - * @description Using "with" statement within iteration statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.4_T5 +description: > + Using "with" statement within iteration statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,6 +44,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.5_T1.js b/test/suite/ch12/12.10/S12.10_A3.5_T1.js index b49962dc1a..afd2cfb7a2 100644 --- a/test/suite/ch12/12.10/S12.10_A3.5_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.5_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.5_T1.js - * @description Using "with" statement within "for-in" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.5_T1 +description: > + Using "with" statement within "for-in" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -41,4 +43,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.5_T2.js b/test/suite/ch12/12.10/S12.10_A3.5_T2.js index e1ec1d611f..78ceceb721 100644 --- a/test/suite/ch12/12.10/S12.10_A3.5_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.5_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.5_T2.js - * @description Using "with" statement within "for-in" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.5_T2 +description: > + Using "with" statement within "for-in" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.5_T3.js b/test/suite/ch12/12.10/S12.10_A3.5_T3.js index d85bca3bfb..1dba29e067 100644 --- a/test/suite/ch12/12.10/S12.10_A3.5_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.5_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.5_T3.js - * @description Using "with" statement within "for-in" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.5_T3 +description: > + Using "with" statement within "for-in" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.5_T4.js b/test/suite/ch12/12.10/S12.10_A3.5_T4.js index f85657a82f..fd969be0dd 100644 --- a/test/suite/ch12/12.10/S12.10_A3.5_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.5_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.5_T4.js - * @description Using "with" statement within "for-in" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.5_T4 +description: > + Using "with" statement within "for-in" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,4 +44,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.5_T5.js b/test/suite/ch12/12.10/S12.10_A3.5_T5.js index 78b526fc30..6f7d3a589b 100644 --- a/test/suite/ch12/12.10/S12.10_A3.5_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.5_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.5_T5.js - * @description Using "with" statement within "for-in" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.5_T5 +description: > + Using "with" statement within "for-in" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,7 +44,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.6_T1.js b/test/suite/ch12/12.10/S12.10_A3.6_T1.js index 4042e9b712..3dd0d06de0 100644 --- a/test/suite/ch12/12.10/S12.10_A3.6_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.6_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.6_T1.js - * @description Using "with" statement within another "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.6_T1 +description: > + Using "with" statement within another "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -55,6 +57,3 @@ if(theirObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.6_T2.js b/test/suite/ch12/12.10/S12.10_A3.6_T2.js index db1d04dfba..925f742884 100644 --- a/test/suite/ch12/12.10/S12.10_A3.6_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.6_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.6_T2.js - * @description Using "with" statement within another "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.6_T2 +description: > + Using "with" statement within another "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -61,5 +63,3 @@ if(theirObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.10/S12.10_A3.6_T3.js b/test/suite/ch12/12.10/S12.10_A3.6_T3.js index ade4cdc5f4..4ee9c68a7b 100644 --- a/test/suite/ch12/12.10/S12.10_A3.6_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.6_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.6_T3.js - * @description Using "with" statement within another "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.6_T3 +description: > + Using "with" statement within another "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -62,5 +64,3 @@ if(theirObj.p1 !== true){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.10/S12.10_A3.7_T1.js b/test/suite/ch12/12.10/S12.10_A3.7_T1.js index b24f131a49..ff425217f5 100644 --- a/test/suite/ch12/12.10/S12.10_A3.7_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.7_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.7_T1.js - * @description Declaring and calling a function within "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.7_T1 +description: > + Declaring and calling a function within "with" statement, leading + to normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -41,6 +43,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.7_T2.js b/test/suite/ch12/12.10/S12.10_A3.7_T2.js index 7494fa7f32..6a5be39a9f 100644 --- a/test/suite/ch12/12.10/S12.10_A3.7_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.7_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.7_T2.js - * @description Declaring and calling a function within "with" statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.7_T2 +description: > + Declaring and calling a function within "with" statement, leading + to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -50,6 +52,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.7_T3.js b/test/suite/ch12/12.10/S12.10_A3.7_T3.js index d3b72e03d0..3a545b4940 100644 --- a/test/suite/ch12/12.10/S12.10_A3.7_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.7_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.7_T3.js - * @description Declaring and calling a function within "with" statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.7_T3 +description: > + Declaring and calling a function within "with" statement, leading + to normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -50,4 +52,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.7_T4.js b/test/suite/ch12/12.10/S12.10_A3.7_T4.js index cd97c3c1bf..8bf1b3800c 100644 --- a/test/suite/ch12/12.10/S12.10_A3.7_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.7_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.7_T4.js - * @description Declaring and calling a function within "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.7_T4 +description: > + Declaring and calling a function within "with" statement, leading + to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.7_T5.js b/test/suite/ch12/12.10/S12.10_A3.7_T5.js index c0d9d84a2f..a72868d7c9 100644 --- a/test/suite/ch12/12.10/S12.10_A3.7_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.7_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.7_T5.js - * @description Declaring and calling a function within "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.7_T5 +description: > + Declaring and calling a function within "with" statement, leading + to completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -54,4 +56,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.8_T1.js b/test/suite/ch12/12.10/S12.10_A3.8_T1.js index efe008e85c..074560f83b 100644 --- a/test/suite/ch12/12.10/S12.10_A3.8_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.8_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.8_T1.js - * @description Declaring function constructor within "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.8_T1 +description: > + Declaring function constructor within "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,4 +44,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.8_T2.js b/test/suite/ch12/12.10/S12.10_A3.8_T2.js index 948270d0f5..4c9cb61715 100644 --- a/test/suite/ch12/12.10/S12.10_A3.8_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.8_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.8_T2.js - * @description Declaring function constructor within "with" statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.8_T2 +description: > + Declaring function constructor within "with" statement, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -43,4 +45,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.8_T3.js b/test/suite/ch12/12.10/S12.10_A3.8_T3.js index f104c10f35..be701c313e 100644 --- a/test/suite/ch12/12.10/S12.10_A3.8_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.8_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.8_T3.js - * @description Declaring function constructor within "with" statement, leading to normal completion by "return" - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.8_T3 +description: > + Declaring function constructor within "with" statement, leading to + normal completion by "return" +flags: [noStrict] +---*/ this.p1 = 1; @@ -43,4 +45,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.8_T4.js b/test/suite/ch12/12.10/S12.10_A3.8_T4.js index 2f034a106f..e3fdc5c5fb 100644 --- a/test/suite/ch12/12.10/S12.10_A3.8_T4.js +++ b/test/suite/ch12/12.10/S12.10_A3.8_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.8_T4.js - * @description Declaring function constructor within "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.8_T4 +description: > + Declaring function constructor within "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -55,4 +57,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.8_T5.js b/test/suite/ch12/12.10/S12.10_A3.8_T5.js index 7484ca06a9..98cfbc4abf 100644 --- a/test/suite/ch12/12.10/S12.10_A3.8_T5.js +++ b/test/suite/ch12/12.10/S12.10_A3.8_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.8_T5.js - * @description Declaring function constructor within "with" statement, leading to completion by exception - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.8_T5 +description: > + Declaring function constructor within "with" statement, leading to + completion by exception +flags: [noStrict] +---*/ this.p1 = 1; @@ -55,4 +57,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A3.9_T1.js b/test/suite/ch12/12.10/S12.10_A3.9_T1.js index f54c2087bd..10ee4e35c2 100644 --- a/test/suite/ch12/12.10/S12.10_A3.9_T1.js +++ b/test/suite/ch12/12.10/S12.10_A3.9_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.9_T1.js - * @description Using "for-in" statement within "with" statement, leading to normal completion - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.9_T1 +description: > + Using "for-in" statement within "with" statement, leading to + normal completion +flags: [noStrict] +---*/ this.p1 = 1; @@ -41,6 +43,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.10/S12.10_A3.9_T2.js b/test/suite/ch12/12.10/S12.10_A3.9_T2.js index a1bb6dfe93..0da733702e 100644 --- a/test/suite/ch12/12.10/S12.10_A3.9_T2.js +++ b/test/suite/ch12/12.10/S12.10_A3.9_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.9_T2.js - * @description Using "for-in" statement within "with" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.9_T2 +description: > + Using "for-in" statement within "with" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,5 +44,3 @@ if(myObj.p1 !== "x1"){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.10/S12.10_A3.9_T3.js b/test/suite/ch12/12.10/S12.10_A3.9_T3.js index c002003400..c95d7eeb17 100644 --- a/test/suite/ch12/12.10/S12.10_A3.9_T3.js +++ b/test/suite/ch12/12.10/S12.10_A3.9_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * No matter how control leaves the embedded 'Statement', - * the scope chain is always restored to its former state - * - * @path ch12/12.10/S12.10_A3.9_T3.js - * @description Using "for-in" statement within "with" statement, leading to completion by break - * @noStrict - */ +/*--- +info: > + No matter how control leaves the embedded 'Statement', + the scope chain is always restored to its former state +es5id: 12.10_A3.9_T3 +description: > + Using "for-in" statement within "with" statement, leading to + completion by break +flags: [noStrict] +---*/ this.p1 = 1; @@ -42,5 +44,3 @@ if(myObj.p1 !== "a"){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.10/S12.10_A4_T1.js b/test/suite/ch12/12.10/S12.10_A4_T1.js index 6deef5b1a7..a475f0c7ba 100644 --- a/test/suite/ch12/12.10/S12.10_A4_T1.js +++ b/test/suite/ch12/12.10/S12.10_A4_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A4_T1.js - * @description Changing string property - * @noStrict - */ +/*--- +info: Changing property using "eval" statement containing "with" statement +es5id: 12.10_A4_T1 +description: Changing string property +flags: [noStrict] +---*/ this.p1 = 1; var myObj = { @@ -30,4 +29,3 @@ if(myObj.p1 === 1){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A4_T2.js b/test/suite/ch12/12.10/S12.10_A4_T2.js index e31f52b849..b4bc9e3a90 100644 --- a/test/suite/ch12/12.10/S12.10_A4_T2.js +++ b/test/suite/ch12/12.10/S12.10_A4_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A4_T2.js - * @description Changing number property - * @noStrict - */ +/*--- +info: Changing property using "eval" statement containing "with" statement +es5id: 12.10_A4_T2 +description: Changing number property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -30,4 +29,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A4_T3.js b/test/suite/ch12/12.10/S12.10_A4_T3.js index 94c58701cb..1c0baade80 100644 --- a/test/suite/ch12/12.10/S12.10_A4_T3.js +++ b/test/suite/ch12/12.10/S12.10_A4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A4_T3.js - * @description Changing boolean property - * @noStrict - */ +/*--- +info: Changing property using "eval" statement containing "with" statement +es5id: 12.10_A4_T3 +description: Changing boolean property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -30,4 +29,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A4_T4.js b/test/suite/ch12/12.10/S12.10_A4_T4.js index 042d0dfc5f..04bc797d61 100644 --- a/test/suite/ch12/12.10/S12.10_A4_T4.js +++ b/test/suite/ch12/12.10/S12.10_A4_T4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A4_T4.js - * @description Changing object property - * @noStrict - */ +/*--- +info: Changing property using "eval" statement containing "with" statement +es5id: 12.10_A4_T4 +description: Changing object property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -39,4 +38,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A4_T5.js b/test/suite/ch12/12.10/S12.10_A4_T5.js index 38a743b03f..4bb306fc0b 100644 --- a/test/suite/ch12/12.10/S12.10_A4_T5.js +++ b/test/suite/ch12/12.10/S12.10_A4_T5.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A4_T5.js - * @description Changing array property - * @noStrict - */ +/*--- +info: Changing property using "eval" statement containing "with" statement +es5id: 12.10_A4_T5 +description: Changing array property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -30,4 +29,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A4_T6.js b/test/suite/ch12/12.10/S12.10_A4_T6.js index fce4511189..56f52e092e 100644 --- a/test/suite/ch12/12.10/S12.10_A4_T6.js +++ b/test/suite/ch12/12.10/S12.10_A4_T6.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Changing property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A4_T6.js - * @description Changing function property - * @noStrict - */ +/*--- +info: Changing property using "eval" statement containing "with" statement +es5id: 12.10_A4_T6 +description: Changing function property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -30,4 +29,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A5_T1.js b/test/suite/ch12/12.10/S12.10_A5_T1.js index 351e4bb9d0..4d46db2dec 100644 --- a/test/suite/ch12/12.10/S12.10_A5_T1.js +++ b/test/suite/ch12/12.10/S12.10_A5_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A5_T1.js - * @description Deleting string property - * @noStrict - */ +/*--- +info: Deleting property using "eval" statement containing "with" statement +es5id: 12.10_A5_T1 +description: Deleting string property +flags: [noStrict] +---*/ this.p1 = 1; var myObj = { @@ -47,4 +46,3 @@ if(myObj.p1 === 1){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A5_T2.js b/test/suite/ch12/12.10/S12.10_A5_T2.js index 909d79d032..01caf1453d 100644 --- a/test/suite/ch12/12.10/S12.10_A5_T2.js +++ b/test/suite/ch12/12.10/S12.10_A5_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A5_T2.js - * @description Deleting number property - * @noStrict - */ +/*--- +info: Deleting property using "eval" statement containing "with" statement +es5id: 12.10_A5_T2 +description: Deleting number property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -47,4 +46,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A5_T3.js b/test/suite/ch12/12.10/S12.10_A5_T3.js index cd2ec34872..00802080bd 100644 --- a/test/suite/ch12/12.10/S12.10_A5_T3.js +++ b/test/suite/ch12/12.10/S12.10_A5_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A5_T3.js - * @description Deleting boolean property - * @noStrict - */ +/*--- +info: Deleting property using "eval" statement containing "with" statement +es5id: 12.10_A5_T3 +description: Deleting boolean property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -48,4 +47,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A5_T4.js b/test/suite/ch12/12.10/S12.10_A5_T4.js index 96f2ded29b..e4e776d43c 100644 --- a/test/suite/ch12/12.10/S12.10_A5_T4.js +++ b/test/suite/ch12/12.10/S12.10_A5_T4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A5_T4.js - * @description Deleting object property - * @noStrict - */ +/*--- +info: Deleting property using "eval" statement containing "with" statement +es5id: 12.10_A5_T4 +description: Deleting object property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -52,4 +51,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A5_T5.js b/test/suite/ch12/12.10/S12.10_A5_T5.js index f0b52d07a2..4e463aef06 100644 --- a/test/suite/ch12/12.10/S12.10_A5_T5.js +++ b/test/suite/ch12/12.10/S12.10_A5_T5.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A5_T5.js - * @description Deleting array property - * @noStrict - */ +/*--- +info: Deleting property using "eval" statement containing "with" statement +es5id: 12.10_A5_T5 +description: Deleting array property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -52,4 +51,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.10/S12.10_A5_T6.js b/test/suite/ch12/12.10/S12.10_A5_T6.js index 67c79398ab..de474520a3 100644 --- a/test/suite/ch12/12.10/S12.10_A5_T6.js +++ b/test/suite/ch12/12.10/S12.10_A5_T6.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting property using "eval" statement containing "with" statement - * - * @path ch12/12.10/S12.10_A5_T6.js - * @description Deleting function property - * @noStrict - */ +/*--- +info: Deleting property using "eval" statement containing "with" statement +es5id: 12.10_A5_T6 +description: Deleting function property +flags: [noStrict] +---*/ this.p1 = 'a'; var myObj = { @@ -52,4 +51,3 @@ if(myObj.p1 === 'a'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.11/S12.11_A1_T1.js b/test/suite/ch12/12.11/S12.11_A1_T1.js index 0d637da55f..d23b2a8f73 100644 --- a/test/suite/ch12/12.11/S12.11_A1_T1.js +++ b/test/suite/ch12/12.11/S12.11_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result.type is break and Result.target is in the current - * label set, return (normal, Result.value, empty) - * - * @path ch12/12.11/S12.11_A1_T1.js - * @description Simple test using switch statement - */ +/*--- +info: > + If Result.type is break and Result.target is in the current + label set, return (normal, Result.value, empty) +es5id: 12.11_A1_T1 +description: Simple test using switch statement +---*/ function SwitchTest(value){ var result = 0; @@ -71,4 +71,3 @@ if(!(SwitchTest(void 0) === 32)){ if(!(SwitchTest('0') === 32)){ $ERROR("#10: SwitchTest('0') === 32. Actual: SwitchTest('0') ==="+ SwitchTest('0') ); } - diff --git a/test/suite/ch12/12.11/S12.11_A1_T2.js b/test/suite/ch12/12.11/S12.11_A1_T2.js index a7b4abc594..954d4d8967 100644 --- a/test/suite/ch12/12.11/S12.11_A1_T2.js +++ b/test/suite/ch12/12.11/S12.11_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result.type is break and Result.target is in the current - * label set, return (normal, Result.value, empty) - * - * @path ch12/12.11/S12.11_A1_T2.js - * @description Switch with different types of variables - */ +/*--- +info: > + If Result.type is break and Result.target is in the current + label set, return (normal, Result.value, empty) +es5id: 12.11_A1_T2 +description: Switch with different types of variables +---*/ var x = new Number(2); @@ -85,4 +85,3 @@ if(!(SwitchTest('0') === 32)){ if(!(SwitchTest(x) === 128)){ $ERROR("#10: SwitchTest(x) === 128. Actual: SwitchTest(x) ==="+ SwitchTest(x) ); } - diff --git a/test/suite/ch12/12.11/S12.11_A1_T3.js b/test/suite/ch12/12.11/S12.11_A1_T3.js index 3171a66613..839376d7d3 100644 --- a/test/suite/ch12/12.11/S12.11_A1_T3.js +++ b/test/suite/ch12/12.11/S12.11_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result.type is break and Result.target is in the current - * label set, return (normal, Result.value, empty) - * - * @path ch12/12.11/S12.11_A1_T3.js - * @description Using case with null, NaN, Infinity - */ +/*--- +info: > + If Result.type is break and Result.target is in the current + label set, return (normal, Result.value, empty) +es5id: 12.11_A1_T3 +description: Using case with null, NaN, Infinity +---*/ function SwitchTest(value){ var result = 0; @@ -89,4 +89,3 @@ if(!(SwitchTest(NaN) === 32)){ if(!(SwitchTest(Infinity) === 768)){ $ERROR("#10: SwitchTest(NaN) === 768. Actual: SwitchTest(NaN) ==="+ SwitchTest(NaN) ); } - diff --git a/test/suite/ch12/12.11/S12.11_A1_T4.js b/test/suite/ch12/12.11/S12.11_A1_T4.js index 0182397fe0..e0e6ca020a 100644 --- a/test/suite/ch12/12.11/S12.11_A1_T4.js +++ b/test/suite/ch12/12.11/S12.11_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result.type is break and Result.target is in the current - * label set, return (normal, Result.value, empty) - * - * @path ch12/12.11/S12.11_A1_T4.js - * @description Using case with isNaN and isNaN(value) - */ +/*--- +info: > + If Result.type is break and Result.target is in the current + label set, return (normal, Result.value, empty) +es5id: 12.11_A1_T4 +description: Using case with isNaN and isNaN(value) +---*/ function SwitchTest(value){ var result = 0; @@ -77,4 +77,3 @@ if(!(SwitchTest(NaN) === 32)){ if(!(SwitchTest(Infinity) === 768)){ $ERROR("#10: SwitchTest(NaN) === 768. Actual: SwitchTest(NaN) ==="+ SwitchTest(NaN) ); } - diff --git a/test/suite/ch12/12.11/S12.11_A2_T1.js b/test/suite/ch12/12.11/S12.11_A2_T1.js index 247437638a..c90633297d 100644 --- a/test/suite/ch12/12.11/S12.11_A2_T1.js +++ b/test/suite/ch12/12.11/S12.11_A2_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * There can be only one DefaultClause - * - * @path ch12/12.11/S12.11_A2_T1.js - * @description Duplicate DefaultClause - * @negative - */ +/*--- +info: There can be only one DefaultClause +es5id: 12.11_A2_T1 +description: Duplicate DefaultClause +flags: [negative] +---*/ function SwitchTest(value){ var result = 0; @@ -27,4 +26,3 @@ function SwitchTest(value){ } var x = SwitchTest(0); - diff --git a/test/suite/ch12/12.11/S12.11_A3_T1.js b/test/suite/ch12/12.11/S12.11_A3_T1.js index feab32852f..892defa42f 100644 --- a/test/suite/ch12/12.11/S12.11_A3_T1.js +++ b/test/suite/ch12/12.11/S12.11_A3_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Syntax constructions of switch statement - * - * @path ch12/12.11/S12.11_A3_T1.js - * @description Checking if execution of "switch() {}" fails - * @negative - */ +/*--- +info: Syntax constructions of switch statement +es5id: 12.11_A3_T1 +description: Checking if execution of "switch() {}" fails +flags: [negative] +---*/ function SwitchTest(value){ var result = 0; @@ -24,4 +23,3 @@ function SwitchTest(value){ } var x = SwitchTest(0); - diff --git a/test/suite/ch12/12.11/S12.11_A3_T2.js b/test/suite/ch12/12.11/S12.11_A3_T2.js index d879d60286..9ccf91ac10 100644 --- a/test/suite/ch12/12.11/S12.11_A3_T2.js +++ b/test/suite/ch12/12.11/S12.11_A3_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Syntax constructions of switch statement - * - * @path ch12/12.11/S12.11_A3_T2.js - * @description Checking if execution of "switch {}" fails - * @negative - */ +/*--- +info: Syntax constructions of switch statement +es5id: 12.11_A3_T2 +description: Checking if execution of "switch {}" fails +flags: [negative] +---*/ function SwitchTest(value){ var result = 0; @@ -24,4 +23,3 @@ function SwitchTest(value){ } var x = SwitchTest(0); - diff --git a/test/suite/ch12/12.11/S12.11_A3_T3.js b/test/suite/ch12/12.11/S12.11_A3_T3.js index 03d3898dc1..f0bd3f868a 100644 --- a/test/suite/ch12/12.11/S12.11_A3_T3.js +++ b/test/suite/ch12/12.11/S12.11_A3_T3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Syntax constructions of switch statement - * - * @path ch12/12.11/S12.11_A3_T3.js - * @description Checking if execution of "switch(value)" fails - * @negative - */ +/*--- +info: Syntax constructions of switch statement +es5id: 12.11_A3_T3 +description: Checking if execution of "switch(value)" fails +flags: [negative] +---*/ switch(value); - diff --git a/test/suite/ch12/12.11/S12.11_A3_T4.js b/test/suite/ch12/12.11/S12.11_A3_T4.js index 00def2926f..dd86d3e621 100644 --- a/test/suite/ch12/12.11/S12.11_A3_T4.js +++ b/test/suite/ch12/12.11/S12.11_A3_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Syntax constructions of switch statement - * - * @path ch12/12.11/S12.11_A3_T4.js - * @description Using "case" that has no Expresson after it. "CaseClause: case Expression : [StatementList]" - * @negative - */ +/*--- +info: Syntax constructions of switch statement +es5id: 12.11_A3_T4 +description: > + Using "case" that has no Expresson after it. "CaseClause: case + Expression : [StatementList]" +flags: [negative] +---*/ function SwitchTest(value){ var result = 0; @@ -24,4 +25,3 @@ function SwitchTest(value){ } var x = SwitchTest(0); - diff --git a/test/suite/ch12/12.11/S12.11_A3_T5.js b/test/suite/ch12/12.11/S12.11_A3_T5.js index 02cd94bd92..5aedd37f02 100644 --- a/test/suite/ch12/12.11/S12.11_A3_T5.js +++ b/test/suite/ch12/12.11/S12.11_A3_T5.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Syntax constructions of switch statement - * - * @path ch12/12.11/S12.11_A3_T5.js - * @description Introducing statement not followed by "case" keyword - * @negative - */ +/*--- +info: Syntax constructions of switch statement +es5id: 12.11_A3_T5 +description: Introducing statement not followed by "case" keyword +flags: [negative] +---*/ function SwitchTest(value){ var result = 0; @@ -25,4 +24,3 @@ function SwitchTest(value){ } var x = SwitchTest(0); - diff --git a/test/suite/ch12/12.11/S12.11_A4_T1.js b/test/suite/ch12/12.11/S12.11_A4_T1.js index 8fbafbc81e..cf81b50485 100644 --- a/test/suite/ch12/12.11/S12.11_A4_T1.js +++ b/test/suite/ch12/12.11/S12.11_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Embedded syntax constructions of switch statement - * - * @path ch12/12.11/S12.11_A4_T1.js - * @description Nesting one "switch" statement into StatementList of the other's - */ +/*--- +info: Embedded syntax constructions of switch statement +es5id: 12.11_A4_T1 +description: Nesting one "switch" statement into StatementList of the other's +---*/ function SwitchTest(value){ var result = 0; @@ -33,4 +32,3 @@ function SwitchTest(value){ var x = SwitchTest(0); if(x!==6) $ERROR("#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ==="+ SwitchTest(0) ); - diff --git a/test/suite/ch12/12.12/S12.12_A1_T1.js b/test/suite/ch12/12.12/S12.12_A1_T1.js index c88e0650ae..c9267e7039 100644 --- a/test/suite/ch12/12.12/S12.12_A1_T1.js +++ b/test/suite/ch12/12.12/S12.12_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Labelled statements are only used in conjunction with labelled - * break and continue statements - * - * @path ch12/12.12/S12.12_A1_T1.js - * @description Checking if labelled break works. See continue and break sections - */ +/*--- +info: > + Labelled statements are only used in conjunction with labelled + break and continue statements +es5id: 12.12_A1_T1 +description: Checking if labelled break works. See continue and break sections +---*/ var object = {p1: 1, p2: 1}; var result = 0; @@ -19,4 +19,3 @@ lbl: for(var i in object){ if(!(result === 1)){ $ERROR("'break label' should break execution of labelled iteration statement"); } - diff --git a/test/suite/ch12/12.13/S12.13_A1.js b/test/suite/ch12/12.13/S12.13_A1.js index bc24635770..e907a2fcbc 100644 --- a/test/suite/ch12/12.13/S12.13_A1.js +++ b/test/suite/ch12/12.13/S12.13_A1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Sanity test for throw statement - * - * @path ch12/12.13/S12.13_A1.js - * @description Trying to throw exception with "throw" - * @negative - */ +/*--- +info: Sanity test for throw statement +es5id: 12.13_A1 +description: Trying to throw exception with "throw" +flags: [negative] +---*/ throw "error"; - diff --git a/test/suite/ch12/12.13/S12.13_A2_T1.js b/test/suite/ch12/12.13/S12.13_A2_T1.js index bca31ea80a..5653cc8e1a 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T1.js +++ b/test/suite/ch12/12.13/S12.13_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T1.js - * @description Throwing undefined - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T1 +description: Throwing undefined +---*/ // CHECK#1 try{ @@ -15,4 +16,3 @@ try{ catch(e){ if (e!==undefined) $ERROR('#1: Exception === undefined. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A2_T2.js b/test/suite/ch12/12.13/S12.13_A2_T2.js index e068f39f61..ed9ce5c01f 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T2.js +++ b/test/suite/ch12/12.13/S12.13_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T2.js - * @description Throwing null - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T2 +description: Throwing null +---*/ // CHECK#1 try{ @@ -15,4 +16,3 @@ try{ catch(e){ if (e!==null) $ERROR('#1: Exception === null. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A2_T3.js b/test/suite/ch12/12.13/S12.13_A2_T3.js index 37592ac194..ace9d28705 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T3.js +++ b/test/suite/ch12/12.13/S12.13_A2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T3.js - * @description Throwing boolean - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T3 +description: Throwing boolean +---*/ // CHECK#1 try{ @@ -41,4 +42,3 @@ try{ catch(e){ if (e!==true) $ERROR('#4: Exception ===true. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A2_T4.js b/test/suite/ch12/12.13/S12.13_A2_T4.js index bddf2dac36..8cfebc076e 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T4.js +++ b/test/suite/ch12/12.13/S12.13_A2_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T4.js - * @description Throwing string - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T4 +description: Throwing string +---*/ // CHECK#1 try{ @@ -24,4 +25,3 @@ try{ catch(e){ if (e!=="exception #1") $ERROR('#2: Exception ==="exception #1". Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A2_T5.js b/test/suite/ch12/12.13/S12.13_A2_T5.js index 8d80848491..f6736794cb 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T5.js +++ b/test/suite/ch12/12.13/S12.13_A2_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T5.js - * @description Throwing number - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T5 +description: Throwing number +---*/ // CHECK#1 try{ @@ -72,4 +73,3 @@ try{ catch(e){ if (e!==-0) $ERROR('#8: Exception ===-0. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A2_T6.js b/test/suite/ch12/12.13/S12.13_A2_T6.js index 39e799852d..56e8c285ac 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T6.js +++ b/test/suite/ch12/12.13/S12.13_A2_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T6.js - * @description Throwing object - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T6 +description: Throwing object +---*/ var myObj = {p1: 'a', p2: 'b', @@ -42,4 +43,3 @@ try{ } catch(e){} if (myObj.i!==6) $ERROR('#4: Handling of catch must be correct'); - diff --git a/test/suite/ch12/12.13/S12.13_A2_T7.js b/test/suite/ch12/12.13/S12.13_A2_T7.js index bf633f868e..503df9becb 100644 --- a/test/suite/ch12/12.13/S12.13_A2_T7.js +++ b/test/suite/ch12/12.13/S12.13_A2_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 evaluates Expression - * - * @path ch12/12.13/S12.13_A2_T7.js - * @description Throwing Array - */ +/*--- +info: > + "throw Expression" returns (throw, GetValue(Result(1)), empty), where 1 + evaluates Expression +es5id: 12.13_A2_T7 +description: Throwing Array +---*/ var mycars = new Array(); mycars[0] = "Saab"; @@ -27,4 +28,3 @@ catch(e){ if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+'] === mycars['+i+']. Actual: Exception['+i+'] ==='+ e[i] ); } } - diff --git a/test/suite/ch12/12.13/S12.13_A3_T1.js b/test/suite/ch12/12.13/S12.13_A3_T1.js index 7843a64598..1485ba8fb4 100644 --- a/test/suite/ch12/12.13/S12.13_A3_T1.js +++ b/test/suite/ch12/12.13/S12.13_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1. Evaluate Expression - * - * @path ch12/12.13/S12.13_A3_T1.js - * @description Evaluating boolean expression - */ +/*--- +info: 1. Evaluate Expression +es5id: 12.13_A3_T1 +description: Evaluating boolean expression +---*/ // CHECK#1 var b=true; @@ -42,4 +41,3 @@ try{ catch(e){ if (e!==true) $ERROR('#4: Exception === true(operaton &&). Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A3_T2.js b/test/suite/ch12/12.13/S12.13_A3_T2.js index f8cb922039..977b235638 100644 --- a/test/suite/ch12/12.13/S12.13_A3_T2.js +++ b/test/suite/ch12/12.13/S12.13_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1. Evaluate Expression - * - * @path ch12/12.13/S12.13_A3_T2.js - * @description Evaluating string expression - */ +/*--- +info: 1. Evaluate Expression +es5id: 12.13_A3_T2 +description: Evaluating string expression +---*/ // CHECK#1 try{ @@ -25,4 +24,3 @@ try{ catch(e){ if (e!=="exception #1") $ERROR('#2: Exception === "exception #1"(operaton +). Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A3_T3.js b/test/suite/ch12/12.13/S12.13_A3_T3.js index 44c9d075ce..3821e7b3d4 100644 --- a/test/suite/ch12/12.13/S12.13_A3_T3.js +++ b/test/suite/ch12/12.13/S12.13_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1. Evaluate Expression - * - * @path ch12/12.13/S12.13_A3_T3.js - * @description Evaluating number expression - */ +/*--- +info: 1. Evaluate Expression +es5id: 12.13_A3_T3 +description: Evaluating number expression +---*/ // CHECK#1 try{ @@ -89,4 +88,3 @@ try{ catch(e){ if (e!==23) $ERROR('#10: Exception ===23(operaton %). Actual: Exception ==='+ e); } - diff --git a/test/suite/ch12/12.13/S12.13_A3_T4.js b/test/suite/ch12/12.13/S12.13_A3_T4.js index 9a6e010f0b..9bd7947cb6 100644 --- a/test/suite/ch12/12.13/S12.13_A3_T4.js +++ b/test/suite/ch12/12.13/S12.13_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1. Evaluate Expression - * - * @path ch12/12.13/S12.13_A3_T4.js - * @description Evaluating array expression - */ +/*--- +info: 1. Evaluate Expression +es5id: 12.13_A3_T4 +description: Evaluating array expression +---*/ var mycars = new Array(); mycars[0] = "Saab"; @@ -53,4 +52,3 @@ catch(e){ if (e[i]!==mycars2[i-3]) $ERROR('#3.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat(new)). Actual: Exception['+i+']==='+ e[i] ); } } - diff --git a/test/suite/ch12/12.13/S12.13_A3_T5.js b/test/suite/ch12/12.13/S12.13_A3_T5.js index 69fb016d53..d67f01bc64 100644 --- a/test/suite/ch12/12.13/S12.13_A3_T5.js +++ b/test/suite/ch12/12.13/S12.13_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1. Evaluate Expression - * - * @path ch12/12.13/S12.13_A3_T5.js - * @description Evaluating equation expression - */ +/*--- +info: 1. Evaluate Expression +es5id: 12.13_A3_T5 +description: Evaluating equation expression +---*/ // CHECK#1 var a=true; @@ -17,4 +16,3 @@ try{ catch(e){ if (e!=="exception") $ERROR('#1: Exception ==="exception"(operaton ? , ). Actual: Exception ==='+e ); } - diff --git a/test/suite/ch12/12.13/S12.13_A3_T6.js b/test/suite/ch12/12.13/S12.13_A3_T6.js index 7191c6bd65..23e27685ed 100644 --- a/test/suite/ch12/12.13/S12.13_A3_T6.js +++ b/test/suite/ch12/12.13/S12.13_A3_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1. Evaluate Expression - * - * @path ch12/12.13/S12.13_A3_T6.js - * @description Evaluating functions - */ +/*--- +info: 1. Evaluate Expression +es5id: 12.13_A3_T6 +description: Evaluating functions +---*/ // CHECK#1 var i=0; @@ -55,4 +54,3 @@ try{ catch(e){ if (e!==2) $ERROR('#4: Exception ===2. Actual: Exception ==='+ e); } - diff --git a/test/suite/ch12/12.14/12.14-1.js b/test/suite/ch12/12.14/12.14-1.js index 47bff810bd..052f4aec50 100644 --- a/test/suite/ch12/12.14/12.14-1.js +++ b/test/suite/ch12/12.14/12.14-1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-1.js - * @description catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter - */ - - -function testcase() { - foo = "prior to throw"; - try { - throw new Error(); - } - catch (foo) { - var foo = "initializer in catch"; - } - return foo === "prior to throw"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-1 +description: > + catch doesn't change declaration scope - var initializer in catch + with same name as catch parameter changes parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + foo = "prior to throw"; + try { + throw new Error(); + } + catch (foo) { + var foo = "initializer in catch"; + } + return foo === "prior to throw"; + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-10.js b/test/suite/ch12/12.14/12.14-10.js index 1bdf8273d2..c29aeee3f1 100644 --- a/test/suite/ch12/12.14/12.14-10.js +++ b/test/suite/ch12/12.14/12.14-10.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-10.js - * @description catch introduces scope - name lookup finds function parameter - */ - - -function testcase() { - function f(o) { - - function innerf(o, x) { - try { - throw o; - } - catch (e) { - return x; - } - } - - return innerf(o, 42); - } - - if (f({}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-10 +description: catch introduces scope - name lookup finds function parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + + function innerf(o, x) { + try { + throw o; + } + catch (e) { + return x; + } + } + + return innerf(o, 42); + } + + if (f({}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-11.js b/test/suite/ch12/12.14/12.14-11.js index 6fded5bee7..7fc3c25425 100644 --- a/test/suite/ch12/12.14/12.14-11.js +++ b/test/suite/ch12/12.14/12.14-11.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-11.js - * @description catch introduces scope - name lookup finds inner variable - */ - - -function testcase() { - function f(o) { - - function innerf(o) { - var x = 42; - - try { - throw o; - } - catch (e) { - return x; - } - } - - return innerf(o); - } - - if (f({}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-11 +description: catch introduces scope - name lookup finds inner variable +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + + function innerf(o) { + var x = 42; + + try { + throw o; + } + catch (e) { + return x; + } + } + + return innerf(o); + } + + if (f({}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-12.js b/test/suite/ch12/12.14/12.14-12.js index c92580cfec..c82003c910 100644 --- a/test/suite/ch12/12.14/12.14-12.js +++ b/test/suite/ch12/12.14/12.14-12.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-12.js - * @description catch introduces scope - name lookup finds property - */ - - -function testcase() { - function f(o) { - - function innerf(o) { - try { - throw o; - } - catch (e) { - return e.x; - } - } - - return innerf(o); - } - - if (f({x:42}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-12 +description: catch introduces scope - name lookup finds property +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + + function innerf(o) { + try { + throw o; + } + catch (e) { + return e.x; + } + } + + return innerf(o); + } + + if (f({x:42}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-13.js b/test/suite/ch12/12.14/12.14-13.js index 3efb989137..01348f2bd7 100644 --- a/test/suite/ch12/12.14/12.14-13.js +++ b/test/suite/ch12/12.14/12.14-13.js @@ -1,42 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-13.js - * @description catch introduces scope - updates are based on scope - */ - - -function testcase() { - var res1 = false; - var res2 = false; - var res3 = false; - - var x_12_14_13 = 'local'; - try { - function foo() { - this.x_12_14_13 = 'instance'; - } - - try { - throw foo; - } - catch (e) { - res1 = (x_12_14_13 === 'local'); - e(); - res2 = (x_12_14_13 === 'local'); - } - res3 = (x_12_14_13 === 'local'); - - if (res1 === true && - res2 === true && - res3 === true) { - return true; - } - } finally { - delete this.x_12_14_13; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-13 +description: catch introduces scope - updates are based on scope +includes: [runTestCase.js] +---*/ + +function testcase() { + var res1 = false; + var res2 = false; + var res3 = false; + + var x_12_14_13 = 'local'; + try { + function foo() { + this.x_12_14_13 = 'instance'; + } + + try { + throw foo; + } + catch (e) { + res1 = (x_12_14_13 === 'local'); + e(); + res2 = (x_12_14_13 === 'local'); + } + res3 = (x_12_14_13 === 'local'); + + if (res1 === true && + res2 === true && + res3 === true) { + return true; + } + } finally { + delete this.x_12_14_13; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-14.js b/test/suite/ch12/12.14/12.14-14.js index 40b2c82c82..20fc2a22d4 100644 --- a/test/suite/ch12/12.14/12.14-14.js +++ b/test/suite/ch12/12.14/12.14-14.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-14.js - * @description Exception object is a function, when an exception parameter is called as a function in catch block, global object is passed as the this value - */ - - -function testcase() { - try { - throw function () { - this._12_14_14_foo = "test"; - }; - return false; - } catch (e) { - e(); - return fnGlobalObject()._12_14_14_foo === "test"; - } - finally { - delete fnGlobalObject()._12_14_14_foo; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-14 +description: > + Exception object is a function, when an exception parameter is + called as a function in catch block, global object is passed as + the this value +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + try { + throw function () { + this._12_14_14_foo = "test"; + }; + return false; + } catch (e) { + e(); + return fnGlobalObject()._12_14_14_foo === "test"; + } + finally { + delete fnGlobalObject()._12_14_14_foo; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-15.js b/test/suite/ch12/12.14/12.14-15.js index e4397c17c9..1c556ce2b2 100644 --- a/test/suite/ch12/12.14/12.14-15.js +++ b/test/suite/ch12/12.14/12.14-15.js @@ -1,28 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-15.js - * @description Exception object is a function which is a property of an object, when an exception parameter is called as a function in catch block, global object is passed as the this value - */ - - -function testcase() { - var obj = {}; - obj.test = function () { - this._12_14_15_foo = "test"; - }; - try { - throw obj.test; - return false; - } catch (e) { - e(); - return fnGlobalObject()._12_14_15_foo === "test"; - } - finally { - delete fnGlobalObject()._12_14_15_foo; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-15 +description: > + Exception object is a function which is a property of an object, + when an exception parameter is called as a function in catch + block, global object is passed as the this value +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + obj.test = function () { + this._12_14_15_foo = "test"; + }; + try { + throw obj.test; + return false; + } catch (e) { + e(); + return fnGlobalObject()._12_14_15_foo === "test"; + } + finally { + delete fnGlobalObject()._12_14_15_foo; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-16.js b/test/suite/ch12/12.14/12.14-16.js index e160e3d374..b0da76e863 100644 --- a/test/suite/ch12/12.14/12.14-16.js +++ b/test/suite/ch12/12.14/12.14-16.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-16.js - * @description Exception object is a function which update in catch block, when an exception parameter is called as a function in catch block, global object is passed as the this value - */ - - -function testcase() { - try { - throw function () { - this._12_14_16_foo = "test"; - }; - return false; - } catch (e) { - var obj = {}; - obj.test = function () { - this._12_14_16_foo = "test1"; - }; - e = obj.test; - e(); - return fnGlobalObject()._12_14_16_foo === "test1"; - } - finally { - delete fnGlobalObject()._12_14_16_foo; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-16 +description: > + Exception object is a function which update in catch block, when + an exception parameter is called as a function in catch block, + global object is passed as the this value +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + try { + throw function () { + this._12_14_16_foo = "test"; + }; + return false; + } catch (e) { + var obj = {}; + obj.test = function () { + this._12_14_16_foo = "test1"; + }; + e = obj.test; + e(); + return fnGlobalObject()._12_14_16_foo === "test1"; + } + finally { + delete fnGlobalObject()._12_14_16_foo; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-2.js b/test/suite/ch12/12.14/12.14-2.js index 16d08d34c6..1a2f303096 100644 --- a/test/suite/ch12/12.14/12.14-2.js +++ b/test/suite/ch12/12.14/12.14-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-2.js - * @description catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter - */ - - -function testcase() { - function capturedFoo() {return foo}; - foo = "prior to throw"; - try { - throw new Error(); - } - catch (foo) { - var foo = "initializer in catch"; - return capturedFoo() !== "initializer in catch"; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-2 +description: > + catch doesn't change declaration scope - var initializer in catch + with same name as catch parameter changes parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + function capturedFoo() {return foo}; + foo = "prior to throw"; + try { + throw new Error(); + } + catch (foo) { + var foo = "initializer in catch"; + return capturedFoo() !== "initializer in catch"; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-3.js b/test/suite/ch12/12.14/12.14-3.js index 6cd5410616..37f4e36d67 100644 --- a/test/suite/ch12/12.14/12.14-3.js +++ b/test/suite/ch12/12.14/12.14-3.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * local vars must not be visible outside with block - * local functions must not be visible outside with block - * local function expresssions should not be visible outside with block - * local vars must shadow outer vars - * local functions must shadow outer functions - * local function expresssions must shadow outer function expressions - * eval should use the appended object to the scope chain - * - * @path ch12/12.14/12.14-3.js - * @description catch doesn't change declaration scope - var declaration are visible outside when name different from catch parameter - */ - - -function testcase() { - try { - throw new Error(); - } - catch (e) { - var foo = "declaration in catch"; - } - - return foo === "declaration in catch"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + local vars must not be visible outside with block + local functions must not be visible outside with block + local function expresssions should not be visible outside with block + local vars must shadow outer vars + local functions must shadow outer functions + local function expresssions must shadow outer function expressions + eval should use the appended object to the scope chain +es5id: 12.14-3 +description: > + catch doesn't change declaration scope - var declaration are + visible outside when name different from catch parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + throw new Error(); + } + catch (e) { + var foo = "declaration in catch"; + } + + return foo === "declaration in catch"; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-4.js b/test/suite/ch12/12.14/12.14-4.js index 1d3cb1b162..b343bd8ea3 100644 --- a/test/suite/ch12/12.14/12.14-4.js +++ b/test/suite/ch12/12.14/12.14-4.js @@ -1,34 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * local vars must not be visible outside with block - * local functions must not be visible outside with block - * local function expresssions should not be visible outside with block - * local vars must shadow outer vars - * local functions must shadow outer functions - * local function expresssions must shadow outer function expressions - * eval should use the appended object to the scope chain - * - * @path ch12/12.14/12.14-4.js - * @description catch introduces scope - block-local vars must shadow outer vars - */ - - -function testcase() { - var o = { foo : 42}; - - try { - throw o; - } - catch (e) { - var foo; - - if (foo === undefined) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + local vars must not be visible outside with block + local functions must not be visible outside with block + local function expresssions should not be visible outside with block + local vars must shadow outer vars + local functions must shadow outer functions + local function expresssions must shadow outer function expressions + eval should use the appended object to the scope chain +es5id: 12.14-4 +description: catch introduces scope - block-local vars must shadow outer vars +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { foo : 42}; + + try { + throw o; + } + catch (e) { + var foo; + + if (foo === undefined) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-6.js b/test/suite/ch12/12.14/12.14-6.js index ae31f846ec..e36fbef535 100644 --- a/test/suite/ch12/12.14/12.14-6.js +++ b/test/suite/ch12/12.14/12.14-6.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * local vars must not be visible outside with block - * local functions must not be visible outside with block - * local function expresssions should not be visible outside with block - * local vars must shadow outer vars - * local functions must shadow outer functions - * local function expresssions must shadow outer function expressions - * eval should use the appended object to the scope chain - * - * @path ch12/12.14/12.14-6.js - * @description catch introduces scope - block-local function expression must shadow outer function expression - */ - - -function testcase() { - var o = {foo : function () { return 42;}}; - - try { - throw o; - } - catch (e) { - var foo = function () {}; - if (foo() === undefined) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + local vars must not be visible outside with block + local functions must not be visible outside with block + local function expresssions should not be visible outside with block + local vars must shadow outer vars + local functions must shadow outer functions + local function expresssions must shadow outer function expressions + eval should use the appended object to the scope chain +es5id: 12.14-6 +description: > + catch introduces scope - block-local function expression must + shadow outer function expression +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {foo : function () { return 42;}}; + + try { + throw o; + } + catch (e) { + var foo = function () {}; + if (foo() === undefined) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-7.js b/test/suite/ch12/12.14/12.14-7.js index b7f8dbc367..e846140c60 100644 --- a/test/suite/ch12/12.14/12.14-7.js +++ b/test/suite/ch12/12.14/12.14-7.js @@ -1,39 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * local vars must not be visible outside with block - * local functions must not be visible outside with block - * local function expresssions should not be visible outside with block - * local vars must shadow outer vars - * local functions must shadow outer functions - * local function expresssions must shadow outer function expressions - * eval should use the appended object to the scope chain - * - * @path ch12/12.14/12.14-7.js - * @description catch introduces scope - scope removed when exiting catch block - */ - - -function testcase() { - var o = {foo: 1}; - var catchAccessed = false; - - try { - throw o; - } - catch (expObj) { - catchAccessed = (expObj.foo == 1); - } - - try { - expObj; - } - catch (e) { - return catchAccessed && e instanceof ReferenceError - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + local vars must not be visible outside with block + local functions must not be visible outside with block + local function expresssions should not be visible outside with block + local vars must shadow outer vars + local functions must shadow outer functions + local function expresssions must shadow outer function expressions + eval should use the appended object to the scope chain +es5id: 12.14-7 +description: catch introduces scope - scope removed when exiting catch block +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {foo: 1}; + var catchAccessed = false; + + try { + throw o; + } + catch (expObj) { + catchAccessed = (expObj.foo == 1); + } + + try { + expObj; + } + catch (e) { + return catchAccessed && e instanceof ReferenceError + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-8.js b/test/suite/ch12/12.14/12.14-8.js index d2e059cd9e..c44299199c 100644 --- a/test/suite/ch12/12.14/12.14-8.js +++ b/test/suite/ch12/12.14/12.14-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * local vars must not be visible outside with block - * local functions must not be visible outside with block - * local function expresssions should not be visible outside with block - * local vars must shadow outer vars - * local functions must shadow outer functions - * local function expresssions must shadow outer function expressions - * eval should use the appended object to the scope chain - * - * @path ch12/12.14/12.14-8.js - * @description catch introduces scope - scope removed when exiting catch block (properties) - */ - - -function testcase() { - var o = {foo: 42}; - - try { - throw o; - } - catch (e) { - var foo = 1; - } - - if (o.foo === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + local vars must not be visible outside with block + local functions must not be visible outside with block + local function expresssions should not be visible outside with block + local vars must shadow outer vars + local functions must shadow outer functions + local function expresssions must shadow outer function expressions + eval should use the appended object to the scope chain +es5id: 12.14-8 +description: > + catch introduces scope - scope removed when exiting catch block + (properties) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {foo: 42}; + + try { + throw o; + } + catch (e) { + var foo = 1; + } + + if (o.foo === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14-9.js b/test/suite/ch12/12.14/12.14-9.js index 2236dd1697..8b6d60aa21 100644 --- a/test/suite/ch12/12.14/12.14-9.js +++ b/test/suite/ch12/12.14/12.14-9.js @@ -1,32 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14-9.js - * @description catch introduces scope - name lookup finds outer variable - */ - - -function testcase() { - function f(o) { - var x = 42; - - function innerf(o) { - try { - throw o; - } - catch (e) { - return x; - } - } - - return innerf(o); - } - - if (f({}) === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14-9 +description: catch introduces scope - name lookup finds outer variable +includes: [runTestCase.js] +---*/ + +function testcase() { + function f(o) { + var x = 42; + + function innerf(o) { + try { + throw o; + } + catch (e) { + return x; + } + } + + return innerf(o); + } + + if (f({}) === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-1-s.js b/test/suite/ch12/12.14/12.14.1/12.14.1-1-s.js index 894a135012..16dc6275ac 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-1-s.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-1-s.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14.1/12.14.1-1-s.js - * @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("\ - try {} catch (eval) { }\ - "); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-1-s +description: > + Strict Mode - SyntaxError is thrown if a TryStatement with a Catch + occurs within strict code and the Identifier of the Catch + production is eval +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("\ + try {} catch (eval) { }\ + "); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-1gs.js b/test/suite/ch12/12.14/12.14.1/12.14.1-1gs.js index 04708c31e1..55ad37ef1f 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-1gs.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-1gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch12/12.14/12.14.1/12.14.1-1gs.js - * @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -try { } catch (eval) { } +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-1gs +description: > + Strict Mode - SyntaxError is thrown if a TryStatement with a Catch + occurs within strict code and the Identifier of the Catch + production is eval +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +try { } catch (eval) { } diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-2-s.js b/test/suite/ch12/12.14/12.14.1/12.14.1-2-s.js index b0e660bd03..b33b29950c 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-2-s.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-2-s.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14.1/12.14.1-2-s.js - * @description Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("\ - try {} catch (arguments) { }\ - "); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-2-s +description: > + Strict Mode - SyntaxError is thrown if a TryStatement with a Catch + occurs within strict code and the Identifier of the Catch + production is arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("\ + try {} catch (arguments) { }\ + "); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-3-s.js b/test/suite/ch12/12.14/12.14.1/12.14.1-3-s.js index 3c477785be..2ffc2c2a49 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-3-s.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-3-s.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14.1/12.14.1-3-s.js - * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL but throws SyntaxError if it is eval - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try{ eval(" try { \ - throw new Error(\"...\");\ - return false;\ - } catch (EVAL) {\ - try\ - {\ - throw new Error(\"...\");\ - }catch(eval)\ - {\ - return EVAL instanceof Error;\ - }\ - }"); - return false; - } catch(e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-3-s +description: > + Strict Mode - SyntaxError isn't thrown if a TryStatement with a + Catch occurs within strict code and the Identifier of the Catch + production is EVAL but throws SyntaxError if it is eval +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try{ eval(" try { \ + throw new Error(\"...\");\ + return false;\ + } catch (EVAL) {\ + try\ + {\ + throw new Error(\"...\");\ + }catch(eval)\ + {\ + return EVAL instanceof Error;\ + }\ + }"); + return false; + } catch(e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-4-s.js b/test/suite/ch12/12.14/12.14.1/12.14.1-4-s.js index 58f372cba0..4b4c34790b 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-4-s.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-4-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14.1/12.14.1-4-s.js - * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - throw new Error("..."); - return false; - } catch (EVAL) { - return EVAL instanceof Error; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-4-s +description: > + Strict Mode - SyntaxError isn't thrown if a TryStatement with a + Catch occurs within strict code and the Identifier of the Catch + production is EVAL +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + throw new Error("..."); + return false; + } catch (EVAL) { + return EVAL instanceof Error; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-5-s.js b/test/suite/ch12/12.14/12.14.1/12.14.1-5-s.js index 84e85593ae..dc2462a555 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-5-s.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-5-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14.1/12.14.1-5-s.js - * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is Arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - throw new Error("..."); - return false; - } catch (Arguments) { - return Arguments instanceof Error; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-5-s +description: > + Strict Mode - SyntaxError isn't thrown if a TryStatement with a + Catch occurs within strict code and the Identifier of the Catch + production is Arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + throw new Error("..."); + return false; + } catch (Arguments) { + return Arguments instanceof Error; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/12.14.1/12.14.1-6-s.js b/test/suite/ch12/12.14/12.14.1/12.14.1-6-s.js index edd8bb5587..aa46246964 100644 --- a/test/suite/ch12/12.14/12.14.1/12.14.1-6-s.js +++ b/test/suite/ch12/12.14/12.14.1/12.14.1-6-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.14/12.14.1/12.14.1-6-s.js - * @description Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is ARGUMENTS - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - throw new Error("..."); - return false; - } catch (ARGUMENTS) { - return ARGUMENTS instanceof Error; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.14.1-6-s +description: > + Strict Mode - SyntaxError isn't thrown if a TryStatement with a + Catch occurs within strict code and the Identifier of the Catch + production is ARGUMENTS +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + throw new Error("..."); + return false; + } catch (ARGUMENTS) { + return ARGUMENTS instanceof Error; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.14/S12.14_A1.js b/test/suite/ch12/12.14/S12.14_A1.js index 8943760090..362e84645a 100644 --- a/test/suite/ch12/12.14/S12.14_A1.js +++ b/test/suite/ch12/12.14/S12.14_A1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production TryStatement : try Block Catch is evaluated as follows: 2. If Result(1).type is not throw, return Result(1) - * - * @path ch12/12.14/S12.14_A1.js - * @description Executing TryStatement : try Block Catch. The statements doesn't cause actual exceptions - */ +/*--- +info: > + The production TryStatement : try Block Catch is evaluated as follows: 2. + If Result(1).type is not throw, return Result(1) +es5id: 12.14_A1 +description: > + Executing TryStatement : try Block Catch. The statements doesn't + cause actual exceptions +---*/ // CHECK#1 try { @@ -49,4 +52,3 @@ if(x2!==1){ if (c2!==1){ $ERROR('#3.3: "finally" block must be evaluated. Actual: finally Block has not been evaluated'); } - diff --git a/test/suite/ch12/12.14/S12.14_A10_T1.js b/test/suite/ch12/12.14/S12.14_A10_T1.js index c7a7c4651f..5ff260961a 100644 --- a/test/suite/ch12/12.14/S12.14_A10_T1.js +++ b/test/suite/ch12/12.14/S12.14_A10_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "while" statement - * - * @path ch12/12.14/S12.14_A10_T1.js - * @description Throwing exception while executing iteration statement placed into try Block - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "while" + statement +es5id: 12.14_A10_T1 +description: > + Throwing exception while executing iteration statement placed into + try Block +---*/ // CHECK#1 var i=0; @@ -19,4 +22,3 @@ while(i<10){ catch(e){ if(e!==5)$ERROR('#1: Exception === 5. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.14/S12.14_A10_T2.js b/test/suite/ch12/12.14/S12.14_A10_T2.js index 1826b48a8e..3118c61d52 100644 --- a/test/suite/ch12/12.14/S12.14_A10_T2.js +++ b/test/suite/ch12/12.14/S12.14_A10_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "while" statement - * - * @path ch12/12.14/S12.14_A10_T2.js - * @description Try statement inside loop, where use continue loop - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "while" + statement +es5id: 12.14_A10_T2 +description: Try statement inside loop, where use continue loop +---*/ // CHECK#1 var c1=0,fin=0; @@ -113,4 +114,3 @@ if(fin6!==1){ if(c6!==2){ $ERROR('#6.2: "try finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A10_T3.js b/test/suite/ch12/12.14/S12.14_A10_T3.js index 88e56168a3..2349ab4830 100644 --- a/test/suite/ch12/12.14/S12.14_A10_T3.js +++ b/test/suite/ch12/12.14/S12.14_A10_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "while" statement - * - * @path ch12/12.14/S12.14_A10_T3.js - * @description Try statement inside loop, where use break - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "while" + statement +es5id: 12.14_A10_T3 +description: Try statement inside loop, where use break +---*/ // CHECK#1 var c1=0,fin=0; @@ -148,4 +149,3 @@ if(fin7!==1){ if(c7!==1){ $ERROR('#7.2: "try finally{break}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A10_T4.js b/test/suite/ch12/12.14/S12.14_A10_T4.js index 926e564d38..347355031e 100644 --- a/test/suite/ch12/12.14/S12.14_A10_T4.js +++ b/test/suite/ch12/12.14/S12.14_A10_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "while" statement - * - * @path ch12/12.14/S12.14_A10_T4.js - * @description Try statement inside loop, where combinate using break and continue - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "while" + statement +es5id: 12.14_A10_T4 +description: Try statement inside loop, where combinate using break and continue +---*/ // CHECK#1 var c1=0,fin=0; @@ -53,4 +54,3 @@ if(fin2!==1){ if(c2!==2){ $ERROR('#2.2: "try catch{break} finally{continue} must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A10_T5.js b/test/suite/ch12/12.14/S12.14_A10_T5.js index e840e93956..18f7f271e7 100644 --- a/test/suite/ch12/12.14/S12.14_A10_T5.js +++ b/test/suite/ch12/12.14/S12.14_A10_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "while" statement - * - * @path ch12/12.14/S12.14_A10_T5.js - * @description Throw some exceptions from different place of loop body - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "while" + statement +es5id: 12.14_A10_T5 +description: Throw some exceptions from different place of loop body +---*/ // CHECK#1 var c=0, i=0; @@ -36,4 +37,3 @@ while(i<10){ if(fin!==10){ $ERROR('#1.4: "finally" block must be evaluated'); } - diff --git a/test/suite/ch12/12.14/S12.14_A11_T1.js b/test/suite/ch12/12.14/S12.14_A11_T1.js index 41cfdb0a5c..d845ef9619 100644 --- a/test/suite/ch12/12.14/S12.14_A11_T1.js +++ b/test/suite/ch12/12.14/S12.14_A11_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for" statement - * - * @path ch12/12.14/S12.14_A11_T1.js - * @description Loop inside try Block, where throw exception - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for" + statement +es5id: 12.14_A11_T1 +description: Loop inside try Block, where throw exception +---*/ // CHECK#1 try{ @@ -17,4 +18,3 @@ try{ catch(e){ if(e!==5)$ERROR('#1: Exception === 5. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.14/S12.14_A11_T2.js b/test/suite/ch12/12.14/S12.14_A11_T2.js index 7453936fdd..7658a0e9af 100644 --- a/test/suite/ch12/12.14/S12.14_A11_T2.js +++ b/test/suite/ch12/12.14/S12.14_A11_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for" statement - * - * @path ch12/12.14/S12.14_A11_T2.js - * @description Try statement inside loop, where use continue loop - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for" + statement +es5id: 12.14_A11_T2 +description: Try statement inside loop, where use continue loop +---*/ // CHECK#1 var fin=0; @@ -120,4 +121,3 @@ if(fin6!==1){ if(c6!==10){ $ERROR('#6.2: "try finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A11_T3.js b/test/suite/ch12/12.14/S12.14_A11_T3.js index af9976a2d0..b6d25018ad 100644 --- a/test/suite/ch12/12.14/S12.14_A11_T3.js +++ b/test/suite/ch12/12.14/S12.14_A11_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for" statement - * - * @path ch12/12.14/S12.14_A11_T3.js - * @description Try statement inside loop, where use break - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for" + statement +es5id: 12.14_A11_T3 +description: Try statement inside loop, where use break +---*/ // CHECK#1 var c1=0,fin=0; @@ -147,4 +148,3 @@ if(fin7!==1){ if(c7!==1){ $ERROR('#7.2: "try finally{break}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A11_T4.js b/test/suite/ch12/12.14/S12.14_A11_T4.js index 6f4762beb2..9d77798b9d 100644 --- a/test/suite/ch12/12.14/S12.14_A11_T4.js +++ b/test/suite/ch12/12.14/S12.14_A11_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for" statement - * - * @path ch12/12.14/S12.14_A11_T4.js - * @description Try statement inside loop, where combinate using break and continue - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for" + statement +es5id: 12.14_A11_T4 +description: Try statement inside loop, where combinate using break and continue +---*/ // CHECK#1 var c1=0,fin=0; @@ -53,4 +54,3 @@ if(fin2!==1){ if(c2!==5){ $ERROR('#2.2: "try catch{break} finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A12_T1.js b/test/suite/ch12/12.14/S12.14_A12_T1.js index b6906b1b8b..9f4be9caee 100644 --- a/test/suite/ch12/12.14/S12.14_A12_T1.js +++ b/test/suite/ch12/12.14/S12.14_A12_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for-in" statement - * - * @path ch12/12.14/S12.14_A12_T1.js - * @description Loop inside try Block, where throw exception - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for-in" + statement +es5id: 12.14_A12_T1 +description: Loop inside try Block, where throw exception +---*/ var x; var mycars = new Array(); @@ -23,6 +24,3 @@ try{ catch(e){ if(e!=="ex")$ERROR('#1: Exception ==="ex". Actual: Exception ==='+ e ); } - - - diff --git a/test/suite/ch12/12.14/S12.14_A12_T2.js b/test/suite/ch12/12.14/S12.14_A12_T2.js index 6a67299628..0c4a34bd5a 100644 --- a/test/suite/ch12/12.14/S12.14_A12_T2.js +++ b/test/suite/ch12/12.14/S12.14_A12_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for-in" statement - * - * @path ch12/12.14/S12.14_A12_T2.js - * @description Try statement inside loop, where use continue loop - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for-in" + statement +es5id: 12.14_A12_T2 +description: Try statement inside loop, where use continue loop +---*/ var x; var mycars = new Array(); @@ -129,4 +130,3 @@ if(fin6!==1){ if(c6!==3){ $ERROR('#6.2: "try finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A12_T3.js b/test/suite/ch12/12.14/S12.14_A12_T3.js index d3b4cea0c7..694a59d84e 100644 --- a/test/suite/ch12/12.14/S12.14_A12_T3.js +++ b/test/suite/ch12/12.14/S12.14_A12_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for-in" statement - * - * @path ch12/12.14/S12.14_A12_T3.js - * @description Try statement inside loop, where use break - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for-in" + statement +es5id: 12.14_A12_T3 +description: Try statement inside loop, where use break +---*/ var x; var mycars = new Array(); @@ -159,4 +160,3 @@ if(fin7!==1){ if(c7!==1){ $ERROR('#7.2: "try finally{break}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A12_T4.js b/test/suite/ch12/12.14/S12.14_A12_T4.js index c09b4e2e7d..1995327f07 100644 --- a/test/suite/ch12/12.14/S12.14_A12_T4.js +++ b/test/suite/ch12/12.14/S12.14_A12_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "for-in" statement - * - * @path ch12/12.14/S12.14_A12_T4.js - * @description Try statement inside loop, where combinate using break and continue - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "for-in" + statement +es5id: 12.14_A12_T4 +description: Try statement inside loop, where combinate using break and continue +---*/ var x; var mycars = new Array(); @@ -59,4 +60,3 @@ if(fin2!==1){ if(c2!==3){ $ERROR('#2.2: "try catch{break} finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A13_T1.js b/test/suite/ch12/12.14/S12.14_A13_T1.js index ab3b79d4df..ce49947cfd 100644 --- a/test/suite/ch12/12.14/S12.14_A13_T1.js +++ b/test/suite/ch12/12.14/S12.14_A13_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement with a "return" statement - * - * @path ch12/12.14/S12.14_A13_T1.js - * @description Using try/catch syntax construction - */ +/*--- +info: Using "try" with "catch" or "finally" statement with a "return" statement +es5id: 12.14_A13_T1 +description: Using try/catch syntax construction +---*/ // CHECK#1 function myFunction1(){ @@ -76,4 +75,3 @@ catch(e){ $ERROR('#4.3: Exception ==="ex2". Actual: Exception ==='+ e ); } } - diff --git a/test/suite/ch12/12.14/S12.14_A13_T2.js b/test/suite/ch12/12.14/S12.14_A13_T2.js index 9479264766..10bedab8a9 100644 --- a/test/suite/ch12/12.14/S12.14_A13_T2.js +++ b/test/suite/ch12/12.14/S12.14_A13_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement with a "return" statement - * - * @path ch12/12.14/S12.14_A13_T2.js - * @description Using try/finally syntax construction - */ +/*--- +info: Using "try" with "catch" or "finally" statement with a "return" statement +es5id: 12.14_A13_T2 +description: Using try/finally syntax construction +---*/ // CHECK#1 var c1=0; @@ -179,4 +178,3 @@ catch(ex1){ if (c8!==1){ $ERROR('#8: "finally" block must be evaluated'); } - diff --git a/test/suite/ch12/12.14/S12.14_A13_T3.js b/test/suite/ch12/12.14/S12.14_A13_T3.js index 9b3e4a3e9c..e8efa34d16 100644 --- a/test/suite/ch12/12.14/S12.14_A13_T3.js +++ b/test/suite/ch12/12.14/S12.14_A13_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement with a "return" statement - * - * @path ch12/12.14/S12.14_A13_T3.js - * @description Using try/catch/finally syntax construction - */ +/*--- +info: Using "try" with "catch" or "finally" statement with a "return" statement +es5id: 12.14_A13_T3 +description: Using try/catch/finally syntax construction +---*/ // CHECK#1 var c1=0; @@ -183,4 +182,3 @@ try{ } catch(e){} if(c7!==1) $ERROR('#7.2: "finally" block must be evaluated'); - diff --git a/test/suite/ch12/12.14/S12.14_A14.js b/test/suite/ch12/12.14/S12.14_A14.js index af2177a059..595dc45bb0 100644 --- a/test/suite/ch12/12.14/S12.14_A14.js +++ b/test/suite/ch12/12.14/S12.14_A14.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "with" statement - * - * @path ch12/12.14/S12.14_A14.js - * @description Using try/catch/finally in With and With in try/catch/finally - * @noStrict - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "with" + statement +es5id: 12.14_A14 +description: Using try/catch/finally in With and With in try/catch/finally +flags: [noStrict] +---*/ var myObj = {p1: 'a', p2: 'b', @@ -76,4 +77,3 @@ try{ } catch(e){} if(myObj.p1!=='pass') $ERROR('#4: "finally" block must be evaluated'); - diff --git a/test/suite/ch12/12.14/S12.14_A15.js b/test/suite/ch12/12.14/S12.14_A15.js index abd6a63a7d..1c63a6960e 100644 --- a/test/suite/ch12/12.14/S12.14_A15.js +++ b/test/suite/ch12/12.14/S12.14_A15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement within/without a "switch" statement - * - * @path ch12/12.14/S12.14_A15.js - * @description Insert try/catch/finally to switch statement - */ +/*--- +info: > + Using "try" with "catch" or "finally" statement within/without a "switch" + statement +es5id: 12.14_A15 +description: Insert try/catch/finally to switch statement +---*/ // CHECK#1 function SwitchTest1(value){ @@ -89,4 +90,3 @@ try{ catch(e){ $ERROR('#3.2: Catching exception inside function does not lead to throwing exception outside this function'); } - diff --git a/test/suite/ch12/12.14/S12.14_A16_T1.js b/test/suite/ch12/12.14/S12.14_A16_T1.js index b6e39191b0..f6dd97aac1 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T1.js +++ b/test/suite/ch12/12.14/S12.14_A16_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T1.js - * @description Checking if pure "try" syntax construction passes - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T1 +description: Checking if pure "try" syntax construction passes +flags: [negative] +---*/ // CHECK#1 try - diff --git a/test/suite/ch12/12.14/S12.14_A16_T10.js b/test/suite/ch12/12.14/S12.14_A16_T10.js index 2baef30d04..c5579e419b 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T10.js +++ b/test/suite/ch12/12.14/S12.14_A16_T10.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T10.js - * @description Catch: "catch (Identifier ) Block" - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T10 +description: "Catch: \"catch (Identifier ) Block\"" +flags: [negative] +---*/ // CHECK#1 try{} catch(){} finally{} - - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T11.js b/test/suite/ch12/12.14/S12.14_A16_T11.js index 8d8699e6b7..03a4c4059b 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T11.js +++ b/test/suite/ch12/12.14/S12.14_A16_T11.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T11.js - * @description Catch and Finally are placed into the Block of "try" (whitle expected outside) - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T11 +description: > + Catch and Finally are placed into the Block of "try" (whitle + expected outside) +flags: [negative] +---*/ // CHECK#1 try{ @@ -16,5 +19,3 @@ try{ catch(e){} finally{} } - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T12.js b/test/suite/ch12/12.14/S12.14_A16_T12.js index dacc1a6a69..e20b1f0b49 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T12.js +++ b/test/suite/ch12/12.14/S12.14_A16_T12.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T12.js - * @description Embedded "try" statements followed by two "catch" statements - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T12 +description: Embedded "try" statements followed by two "catch" statements +flags: [negative] +---*/ // CHECK#1 try @@ -18,6 +19,3 @@ try } catch(e1){} catch(e2){} - - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T13.js b/test/suite/ch12/12.14/S12.14_A16_T13.js index 20b4754996..b1d24f6647 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T13.js +++ b/test/suite/ch12/12.14/S12.14_A16_T13.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T13.js - * @description Catch: "catch (Identifier ) Block". Checking if execution of "22" passes at the place of Identifier of "catch" - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T13 +description: > + Catch: "catch (Identifier ) Block". Checking if execution of "22" + passes at the place of Identifier of "catch" +flags: [negative] +---*/ // CHECK#1 try @@ -16,7 +19,3 @@ try catch("22") { } - - - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T14.js b/test/suite/ch12/12.14/S12.14_A16_T14.js index dfcbc2c657..9fed9a23fc 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T14.js +++ b/test/suite/ch12/12.14/S12.14_A16_T14.js @@ -1,19 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T14.js - * @description Checking if passing argument to "try" statement fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T14 +description: Checking if passing argument to "try" statement fails +flags: [negative] +---*/ // CHECK#1 try(e1){ } catch(e){} - - - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T15.js b/test/suite/ch12/12.14/S12.14_A16_T15.js index 720bf61dd9..47d7f8c995 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T15.js +++ b/test/suite/ch12/12.14/S12.14_A16_T15.js @@ -1,20 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T15.js - * @description Finally: "finally Block". Checking if passing argument to "try" statement fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T15 +description: > + Finally: "finally Block". Checking if passing argument to "try" + statement fails +flags: [negative] +---*/ // CHECK#1 try{ } finally(e){} - - - - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T2.js b/test/suite/ch12/12.14/S12.14_A16_T2.js index a3e9421d52..1d21b5c98c 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T2.js +++ b/test/suite/ch12/12.14/S12.14_A16_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T2.js - * @description Checking if execution of "catch" with no "try" fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T2 +description: Checking if execution of "catch" with no "try" fails +flags: [negative] +---*/ // CHECK#1 catch - diff --git a/test/suite/ch12/12.14/S12.14_A16_T3.js b/test/suite/ch12/12.14/S12.14_A16_T3.js index 237580b023..5b8e70e4ac 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T3.js +++ b/test/suite/ch12/12.14/S12.14_A16_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T3.js - * @description Checking if execution of "finally" with no "try" fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T3 +description: Checking if execution of "finally" with no "try" fails +flags: [negative] +---*/ // CHECK#1 finally - diff --git a/test/suite/ch12/12.14/S12.14_A16_T4.js b/test/suite/ch12/12.14/S12.14_A16_T4.js index ae3e45bba4..4078ed6e52 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T4.js +++ b/test/suite/ch12/12.14/S12.14_A16_T4.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T4.js - * @description Catch: "catch (Identifier ) Block". Checking if execution of "catch" that takes no arguments fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T4 +description: > + Catch: "catch (Identifier ) Block". Checking if execution of + "catch" that takes no arguments fails +flags: [negative] +---*/ // CHECK#1 try{} catch{} - diff --git a/test/suite/ch12/12.14/S12.14_A16_T5.js b/test/suite/ch12/12.14/S12.14_A16_T5.js index a825e889a6..896b6487fb 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T5.js +++ b/test/suite/ch12/12.14/S12.14_A16_T5.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T5.js - * @description Catch: "catch (Identifier ) Block". Checking if execution of "catch" with no Block fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T5 +description: > + Catch: "catch (Identifier ) Block". Checking if execution of + "catch" with no Block fails +flags: [negative] +---*/ // CHECK#1 try{} catch() - diff --git a/test/suite/ch12/12.14/S12.14_A16_T6.js b/test/suite/ch12/12.14/S12.14_A16_T6.js index 8210671c45..261160f453 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T6.js +++ b/test/suite/ch12/12.14/S12.14_A16_T6.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T6.js - * @description Block: "{ StatementList }". Checking if execution of "try{ catch{}{}" fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T6 +description: > + Block: "{ StatementList }". Checking if execution of "try{ + catch{}{}" fails +flags: [negative] +---*/ // CHECK#1 try{ catch(){} - diff --git a/test/suite/ch12/12.14/S12.14_A16_T7.js b/test/suite/ch12/12.14/S12.14_A16_T7.js index 76990243d1..96d948160a 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T7.js +++ b/test/suite/ch12/12.14/S12.14_A16_T7.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T7.js - * @description Block: "{ StatementList }". Checking if execution of "try{} catch(){" fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T7 +description: > + Block: "{ StatementList }". Checking if execution of "try{} + catch(){" fails +flags: [negative] +---*/ // CHECK#1 try{} catch(){ - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T8.js b/test/suite/ch12/12.14/S12.14_A16_T8.js index 93774a7b6f..6eebb0dd36 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T8.js +++ b/test/suite/ch12/12.14/S12.14_A16_T8.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T8.js - * @description Block: "{ StatementList }". Catch: "catch (Identifier ) Block". Checking if execution of "try{} catch(){finally{}" fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T8 +description: > + Block: "{ StatementList }". Catch: "catch (Identifier ) Block". + Checking if execution of "try{} catch(){finally{}" fails +flags: [negative] +---*/ // CHECK#1 try{} catch(){ finally{} - - - diff --git a/test/suite/ch12/12.14/S12.14_A16_T9.js b/test/suite/ch12/12.14/S12.14_A16_T9.js index d7fb3308e7..1eec9a544a 100644 --- a/test/suite/ch12/12.14/S12.14_A16_T9.js +++ b/test/suite/ch12/12.14/S12.14_A16_T9.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * TryStatement: "try Block Catch" or "try Block Finally" or "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A16_T9.js - * @description Checking if execution of "catch(){} finally{}" fails - * @negative - */ +/*--- +info: > + TryStatement: "try Block Catch" or "try Block Finally" or "try Block + Catch Finally" +es5id: 12.14_A16_T9 +description: Checking if execution of "catch(){} finally{}" fails +flags: [negative] +---*/ // CHECK#1 catch(){} finally{} - - - diff --git a/test/suite/ch12/12.14/S12.14_A17.js b/test/suite/ch12/12.14/S12.14_A17.js index 6878502e63..a5512f2b24 100644 --- a/test/suite/ch12/12.14/S12.14_A17.js +++ b/test/suite/ch12/12.14/S12.14_A17.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "try" with "catch" or "finally" statement in a constructor - * - * @path ch12/12.14/S12.14_A17.js - * @description Creating exceptions within constructor - */ +/*--- +info: Using "try" with "catch" or "finally" statement in a constructor +es5id: 12.14_A17 +description: Creating exceptions within constructor +---*/ var i=1; function Integer( value, exception ) { @@ -42,4 +41,3 @@ new Integer(Infinity, false); new Integer(-1.23, true); // CHECK#6 new Integer(Math.LN2, true); - diff --git a/test/suite/ch12/12.14/S12.14_A18_T1.js b/test/suite/ch12/12.14/S12.14_A18_T1.js index 635c235d04..177ead44b4 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T1.js +++ b/test/suite/ch12/12.14/S12.14_A18_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T1.js - * @description Catching undefined - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T1 +description: Catching undefined +---*/ // CHECK#1 try{ @@ -15,4 +14,3 @@ try{ catch(e){ if (e!==undefined) $ERROR('#1: Exception === undefined. Actual: '+e); } - diff --git a/test/suite/ch12/12.14/S12.14_A18_T2.js b/test/suite/ch12/12.14/S12.14_A18_T2.js index f6499be276..87159a3419 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T2.js +++ b/test/suite/ch12/12.14/S12.14_A18_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T2.js - * @description Catching null - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T2 +description: Catching null +---*/ // CHECK#1 try{ @@ -15,4 +14,3 @@ try{ catch(e){ if (e!==null) $ERROR('#1: Exception ===null. Actual: '+e); } - diff --git a/test/suite/ch12/12.14/S12.14_A18_T3.js b/test/suite/ch12/12.14/S12.14_A18_T3.js index 1ee0644d18..7ff931f52a 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T3.js +++ b/test/suite/ch12/12.14/S12.14_A18_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T3.js - * @description Catching boolean - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T3 +description: Catching boolean +---*/ // CHECK#1 try{ @@ -59,4 +58,3 @@ try{ catch(e){ if (e!==true) $ERROR('#6: Exception ===true. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.14/S12.14_A18_T4.js b/test/suite/ch12/12.14/S12.14_A18_T4.js index 3cd7d90645..c657105dbe 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T4.js +++ b/test/suite/ch12/12.14/S12.14_A18_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T4.js - * @description Catching string - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T4 +description: Catching string +---*/ // CHECK#1 try{ @@ -42,4 +41,3 @@ try{ catch(e){ if (e!=="exception #1") $ERROR('#4: Exception ==="exception #1". Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.14/S12.14_A18_T5.js b/test/suite/ch12/12.14/S12.14_A18_T5.js index c46c421bec..c22ced99e1 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T5.js +++ b/test/suite/ch12/12.14/S12.14_A18_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T5.js - * @description Catching Number - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T5 +description: Catching Number +---*/ // CHECK#1 try{ @@ -99,4 +98,3 @@ try{ catch(e){ if (e!==-0) $ERROR('#11: Exception ===-0. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.14/S12.14_A18_T6.js b/test/suite/ch12/12.14/S12.14_A18_T6.js index ca17450b34..bb19b2a1bd 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T6.js +++ b/test/suite/ch12/12.14/S12.14_A18_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T6.js - * @description Catching Object - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T6 +description: Catching Object +---*/ var myObj = {p1: 'a', p2: 'b', @@ -52,4 +51,3 @@ catch(e){ e.i=10; } if (myObj.i!==10) $ERROR('#5: Handling of catch must be correct'); - diff --git a/test/suite/ch12/12.14/S12.14_A18_T7.js b/test/suite/ch12/12.14/S12.14_A18_T7.js index 905cfa0bca..28acd80f12 100644 --- a/test/suite/ch12/12.14/S12.14_A18_T7.js +++ b/test/suite/ch12/12.14/S12.14_A18_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching objects with try/catch/finally statement - * - * @path ch12/12.14/S12.14_A18_T7.js - * @description Catching Array - */ +/*--- +info: Catching objects with try/catch/finally statement +es5id: 12.14_A18_T7 +description: Catching Array +---*/ var mycars = new Array(); mycars[0] = "Saab"; @@ -63,4 +62,3 @@ catch(e){ if (e[i]!==mycars2[i-3]) $ERROR('#4.'+i+': Exception['+i+']===mycars2['+(i-3)+']. Actual: Exception['+i+']==='+ e[i]); } } - diff --git a/test/suite/ch12/12.14/S12.14_A19_T1.js b/test/suite/ch12/12.14/S12.14_A19_T1.js index c2e8d27a4c..f7b07420d7 100644 --- a/test/suite/ch12/12.14/S12.14_A19_T1.js +++ b/test/suite/ch12/12.14/S12.14_A19_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching system exceptions of different types with try statement - * - * @path ch12/12.14/S12.14_A19_T1.js - * @description Testing try/catch syntax construction - */ +/*--- +info: Catching system exceptions of different types with try statement +es5id: 12.14_A19_T1 +description: Testing try/catch syntax construction +---*/ // CHECK#1 try{ @@ -65,4 +64,3 @@ try{ catch(e){ if (e.toString()!=="URIError: message") $ERROR('#7: Exception.toString()==="URIError: message". Actual: Exception is '+e); } - diff --git a/test/suite/ch12/12.14/S12.14_A19_T2.js b/test/suite/ch12/12.14/S12.14_A19_T2.js index acc465ea1d..bbf4fbed66 100644 --- a/test/suite/ch12/12.14/S12.14_A19_T2.js +++ b/test/suite/ch12/12.14/S12.14_A19_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching system exceptions of different types with try statement - * - * @path ch12/12.14/S12.14_A19_T2.js - * @description Testing try/catch/finally syntax construction - */ +/*--- +info: Catching system exceptions of different types with try statement +es5id: 12.14_A19_T2 +description: Testing try/catch/finally syntax construction +---*/ var fin=0; // CHECK#1 @@ -98,5 +97,4 @@ catch(e){ finally{ fin=1; } -if (fin!==1) $ERROR('#7.2: "finally" block must be evaluated'); - +if (fin!==1) $ERROR('#7.2: "finally" block must be evaluated'); diff --git a/test/suite/ch12/12.14/S12.14_A2.js b/test/suite/ch12/12.14/S12.14_A2.js index 4185b346f2..86203704e8 100644 --- a/test/suite/ch12/12.14/S12.14_A2.js +++ b/test/suite/ch12/12.14/S12.14_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Throwing exception with "throw" and catching it with "try" statement - * - * @path ch12/12.14/S12.14_A2.js - * @description Checking if execution of "catch" catches an exception thrown with "throw" - */ +/*--- +info: Throwing exception with "throw" and catching it with "try" statement +es5id: 12.14_A2 +description: > + Checking if execution of "catch" catches an exception thrown with + "throw" +---*/ // CHECK#1 try { @@ -49,4 +50,3 @@ if (x3!==1){ if (c3!==1){ $ERROR('#3.3: "finally" block must be evaluated'); } - diff --git a/test/suite/ch12/12.14/S12.14_A3.js b/test/suite/ch12/12.14/S12.14_A3.js index b87f6d57c7..5250db2f53 100644 --- a/test/suite/ch12/12.14/S12.14_A3.js +++ b/test/suite/ch12/12.14/S12.14_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Catching system exception with "try" statement - * - * @path ch12/12.14/S12.14_A3.js - * @description Checking if execution of "catch" catches system exceptions - */ +/*--- +info: Catching system exception with "try" statement +es5id: 12.14_A3 +description: Checking if execution of "catch" catches system exceptions +---*/ // CHECK#1 try{ @@ -50,4 +49,3 @@ if (x3!==1){ if (c3!==1){ $ERROR('#3.3: "finally" block must be evaluated'); } - diff --git a/test/suite/ch12/12.14/S12.14_A4.js b/test/suite/ch12/12.14/S12.14_A4.js index e904f5c9e3..3a4679c846 100644 --- a/test/suite/ch12/12.14/S12.14_A4.js +++ b/test/suite/ch12/12.14/S12.14_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Sanity test for "catch(Indetifier) statement" - * - * @path ch12/12.14/S12.14_A4.js - * @description Checking if deleting an exception fails - * @noStrict - */ +/*--- +info: Sanity test for "catch(Indetifier) statement" +es5id: 12.14_A4 +description: Checking if deleting an exception fails +flags: [noStrict] +---*/ // CHECK#1 try { @@ -34,4 +33,3 @@ try{ $ERROR('#2.2: Deleting catching exception after ending "catch" block'); } catch(err){} - diff --git a/test/suite/ch12/12.14/S12.14_A5.js b/test/suite/ch12/12.14/S12.14_A5.js index f7620908bd..ecd6b6dd49 100644 --- a/test/suite/ch12/12.14/S12.14_A5.js +++ b/test/suite/ch12/12.14/S12.14_A5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production TryStatement: "try Block Finally" and the production TryStatement: "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A5.js - * @description Checking "catch" catches the Identifier in appropriate way - */ +/*--- +info: > + The production TryStatement: "try Block Finally" and the production + TryStatement: "try Block Catch Finally" +es5id: 12.14_A5 +description: Checking "catch" catches the Identifier in appropriate way +---*/ // CHECK#1 try { @@ -48,4 +49,3 @@ function SwitchTest1(value){ } if (SwitchTest1(1)!==4) $ERROR('#2.3: "finally" block must be evaluated'); if (SwitchTest1(4)!==64)$ERROR('#2.4: "finally" block must be evaluated'); - diff --git a/test/suite/ch12/12.14/S12.14_A6.js b/test/suite/ch12/12.14/S12.14_A6.js index 96b30dbc09..2daaa143e2 100644 --- a/test/suite/ch12/12.14/S12.14_A6.js +++ b/test/suite/ch12/12.14/S12.14_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production TryStatement: "try Block Catch Finally" - * - * @path ch12/12.14/S12.14_A6.js - * @description Executing sequence of "try" statements, using counters with varying values within - */ +/*--- +info: "The production TryStatement: \"try Block Catch Finally\"" +es5id: 12.14_A6 +description: > + Executing sequence of "try" statements, using counters with + varying values within +---*/ // CHECK#1 var c1=0; @@ -63,5 +64,4 @@ finally{ } if (c4!==2){ $ERROR('#4: Sequence evaluation of commands try/catch/finally(without exception) is 1. try, 2. finally'); -} - +} diff --git a/test/suite/ch12/12.14/S12.14_A7_T1.js b/test/suite/ch12/12.14/S12.14_A7_T1.js index 86efa4fadf..f44b2b6c8e 100644 --- a/test/suite/ch12/12.14/S12.14_A7_T1.js +++ b/test/suite/ch12/12.14/S12.14_A7_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluating the nested productions TryStatement - * - * @path ch12/12.14/S12.14_A7_T1.js - * @description Checking if the production of nested TryStatement statements evaluates correct - */ +/*--- +info: Evaluating the nested productions TryStatement +es5id: 12.14_A7_T1 +description: > + Checking if the production of nested TryStatement statements + evaluates correct +---*/ // CHECK#1 try{ @@ -135,4 +136,3 @@ catch(er1){ if (er1!=="ex1") $ERROR('#7.3: Exception ==="ex1". Actual: Exception ==='+ er1 ); } if (c7!==2) $ERROR('#7.4: "finally" block must be evaluated'); - diff --git a/test/suite/ch12/12.14/S12.14_A7_T2.js b/test/suite/ch12/12.14/S12.14_A7_T2.js index 94a8c343d8..9e1e32b1b7 100644 --- a/test/suite/ch12/12.14/S12.14_A7_T2.js +++ b/test/suite/ch12/12.14/S12.14_A7_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluating the nested productions TryStatement - * - * @path ch12/12.14/S12.14_A7_T2.js - * @description Checking if the production of nested TryStatement statements evaluates correct - */ +/*--- +info: Evaluating the nested productions TryStatement +es5id: 12.14_A7_T2 +description: > + Checking if the production of nested TryStatement statements + evaluates correct +---*/ // CHECK#1 try{ @@ -149,4 +150,3 @@ catch(er1){ if (er1!=="ex3") $ERROR('#7.1: Exception === "ex3". Actual: Exception ==='+er1 ); } if (c7!==2) $ERROR('#7.2: Embedded "try/finally" blocks must be evaluated'); - diff --git a/test/suite/ch12/12.14/S12.14_A7_T3.js b/test/suite/ch12/12.14/S12.14_A7_T3.js index 183ab7d22e..43d0d68465 100644 --- a/test/suite/ch12/12.14/S12.14_A7_T3.js +++ b/test/suite/ch12/12.14/S12.14_A7_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Evaluating the nested productions TryStatement - * - * @path ch12/12.14/S12.14_A7_T3.js - * @description Checking if the production of nested TryStatement statements evaluates correct - */ +/*--- +info: Evaluating the nested productions TryStatement +es5id: 12.14_A7_T3 +description: > + Checking if the production of nested TryStatement statements + evaluates correct +---*/ // CHECK#1 try{ @@ -166,4 +167,3 @@ catch(er1){ if (er1!=="ex1") $ERROR('#7.3: Exception === "ex1". Actual: Exception ==='+er1); } if (c7!==4) $ERROR('#7.4: "finally" block must be evaluated'); - diff --git a/test/suite/ch12/12.14/S12.14_A8.js b/test/suite/ch12/12.14/S12.14_A8.js index 4ac0574a25..b1c3f39c6b 100644 --- a/test/suite/ch12/12.14/S12.14_A8.js +++ b/test/suite/ch12/12.14/S12.14_A8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "try" with "catch" or "finally" statement within/without an "if" statement - * - * @path ch12/12.14/S12.14_A8.js - * @description Throwing exception within an "if" statement - */ +/*--- +info: "\"try\" with \"catch\" or \"finally\" statement within/without an \"if\" statement" +es5id: 12.14_A8 +description: Throwing exception within an "if" statement +---*/ // CHECK#1 var c1=1; @@ -32,4 +31,3 @@ if(c2===1){ if(er1!="ex1") $ERROR('#2.2: Exception ==="ex1". Actual: Exception ==='+er1); } } - diff --git a/test/suite/ch12/12.14/S12.14_A9_T1.js b/test/suite/ch12/12.14/S12.14_A9_T1.js index 974b9e7254..33de8f892e 100644 --- a/test/suite/ch12/12.14/S12.14_A9_T1.js +++ b/test/suite/ch12/12.14/S12.14_A9_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "try" with "catch" or "finally" statement within/without an "do while" statement - * - * @path ch12/12.14/S12.14_A9_T1.js - * @description Loop within a "try" Block, from where exception is thrown - */ +/*--- +info: > + "try" with "catch" or "finally" statement within/without an "do while" + statement +es5id: 12.14_A9_T1 +description: Loop within a "try" Block, from where exception is thrown +---*/ // CHECK#1 var i=0; @@ -20,4 +21,3 @@ try{ catch(e){ if(e!==5)$ERROR('#1: Exception ===5. Actual: Exception ==='+ e ); } - diff --git a/test/suite/ch12/12.14/S12.14_A9_T2.js b/test/suite/ch12/12.14/S12.14_A9_T2.js index 9b36f31fb2..8957a8f7b0 100644 --- a/test/suite/ch12/12.14/S12.14_A9_T2.js +++ b/test/suite/ch12/12.14/S12.14_A9_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "try" with "catch" or "finally" statement within/without an "do while" statement - * - * @path ch12/12.14/S12.14_A9_T2.js - * @description "try" statement within a loop, the statement contains "continue" statement - */ +/*--- +info: > + "try" with "catch" or "finally" statement within/without an "do while" + statement +es5id: 12.14_A9_T2 +description: > + "try" statement within a loop, the statement contains "continue" + statement +---*/ // CHECK#1 var c1=0,fin=0; @@ -119,4 +122,3 @@ if(fin6!==1){ if(c6!==2){ $ERROR('#6.2: "try finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A9_T3.js b/test/suite/ch12/12.14/S12.14_A9_T3.js index 60bdd4b303..2a342b7583 100644 --- a/test/suite/ch12/12.14/S12.14_A9_T3.js +++ b/test/suite/ch12/12.14/S12.14_A9_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "try" with "catch" or "finally" statement within/without an "do while" statement - * - * @path ch12/12.14/S12.14_A9_T3.js - * @description "try" statement within a loop, the statement contains "break" statement - */ +/*--- +info: > + "try" with "catch" or "finally" statement within/without an "do while" + statement +es5id: 12.14_A9_T3 +description: > + "try" statement within a loop, the statement contains "break" + statement +---*/ // CHECK#1 var c1=0,fin=0; @@ -155,4 +158,3 @@ if(fin7!==1){ if(c7!==1){ $ERROR('#7.2: try finally{break} error'); } - diff --git a/test/suite/ch12/12.14/S12.14_A9_T4.js b/test/suite/ch12/12.14/S12.14_A9_T4.js index 06542b1d19..e2892812dc 100644 --- a/test/suite/ch12/12.14/S12.14_A9_T4.js +++ b/test/suite/ch12/12.14/S12.14_A9_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "try" with "catch" or "finally" statement within/without an "do while" statement - * - * @path ch12/12.14/S12.14_A9_T4.js - * @description "try" statement within a loop, the statement contains "continue" and "break" statements - */ +/*--- +info: > + "try" with "catch" or "finally" statement within/without an "do while" + statement +es5id: 12.14_A9_T4 +description: > + "try" statement within a loop, the statement contains "continue" + and "break" statements +---*/ // CHECK#1 var c1=0,fin=0; @@ -55,4 +58,3 @@ if(fin2!==1){ if(c2!==2){ $ERROR('#2.2: "try catch{break} finally{continue}" must work correctly'); } - diff --git a/test/suite/ch12/12.14/S12.14_A9_T5.js b/test/suite/ch12/12.14/S12.14_A9_T5.js index dd16dfe2d9..c3174977e7 100644 --- a/test/suite/ch12/12.14/S12.14_A9_T5.js +++ b/test/suite/ch12/12.14/S12.14_A9_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "try" with "catch" or "finally" statement within/without an "do while" statement - * - * @path ch12/12.14/S12.14_A9_T5.js - * @description Checking if exceptions are thrown correctly from wherever of loop body - */ +/*--- +info: > + "try" with "catch" or "finally" statement within/without an "do while" + statement +es5id: 12.14_A9_T5 +description: > + Checking if exceptions are thrown correctly from wherever of loop + body +---*/ // CHECK#1 var c=0, i=0; @@ -37,5 +40,3 @@ while(i<10); if(fin!==10){ $ERROR('#1.4: "finally" block must be evaluated'); } - - diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-1-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-1-s.js index 102f9fdb04..4d8619500a 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-1-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-1-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-1-s.js - * @description eval - a function declaring a var named 'eval' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var eval; }'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-1-s +description: > + eval - a function declaring a var named 'eval' throws SyntaxError + in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var eval; }'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-10-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-10-s.js index 8f442fc90b..c3c65be193 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-10-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-10-s.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-10-s.js - * @description Strict Mode: an indirect eval assigning into 'eval' does not throw - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - var s = eval; - s('eval = 42;'); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-10-s +description: "Strict Mode: an indirect eval assigning into 'eval' does not throw" +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + var s = eval; + s('eval = 42;'); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-11.js b/test/suite/ch12/12.2/12.2.1/12.2.1-11.js index 650835ee1d..fce16af7b8 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-11.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-11.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-11.js - * @description arguments as var identifier in eval code is allowed - */ - - -function testcase() { - eval("var arguments;"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-11 +description: arguments as var identifier in eval code is allowed +includes: [runTestCase.js] +---*/ + +function testcase() { + eval("var arguments;"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-12-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-12-s.js index 7d96f25fef..3877dc971e 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-12-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-12-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-12-s.js - * @description arguments as local var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var arguments;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-12-s +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var arguments;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-12.js b/test/suite/ch12/12.2/12.2.1/12.2.1-12.js index f5ba2925d8..e9d81b7d3b 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-12.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-12.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-12.js - * @description arguments as local var identifier is allowed - */ - - -function testcase() { - eval("(function (){var arguments;})"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-12 +description: arguments as local var identifier is allowed +includes: [runTestCase.js] +---*/ + +function testcase() { + eval("(function (){var arguments;})"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-13-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-13-s.js index d34ab90d18..a42e1e92f4 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-13-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-13-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-13-s.js - * @description arguments assignment throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { arguments = 42; }; foo()'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-13-s +description: arguments assignment throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { arguments = 42; }; foo()'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-14-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-14-s.js index 252688c96d..1b19b2dd51 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-14-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-14-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-14-s.js - * @description arguments - a function expr declaring a var named 'arguments' throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('(function (){var arguments;});'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-14-s +description: > + arguments - a function expr declaring a var named 'arguments' + throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('(function (){var arguments;});'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-15-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-15-s.js index 185ba51561..6738ed8eca 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-15-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-15-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-15-s.js - * @description arguments - a function expr assigning into 'arguments' throws a SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('(function () {arguments = 42;})()'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-15-s +description: > + arguments - a function expr assigning into 'arguments' throws a + SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('(function () {arguments = 42;})()'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-16-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-16-s.js index d39963bc72..f8586153c4 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-16-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-16-s.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-16-s.js - * @description A Function constructor (called as a function) declaring a var named 'arguments' does not throw a SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - Function('var arguments;'); - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-16-s +description: > + A Function constructor (called as a function) declaring a var + named 'arguments' does not throw a SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + Function('var arguments;'); + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-17-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-17-s.js index c53dce2586..2b3ecc9550 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-17-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-17-s.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-17-s.js - * @description A Function constructor (called as a function) assigning into 'arguments' will not throw any error if contained within strict mode and its body does not start with strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - var f = Function('arguments = 42;'); - f(); - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-17-s +description: > + A Function constructor (called as a function) assigning into + 'arguments' will not throw any error if contained within strict + mode and its body does not start with strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + var f = Function('arguments = 42;'); + f(); + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-18-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-18-s.js index fb4afd3c22..a59905198b 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-18-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-18-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-18-s.js - * @description A direct eval declaring a var named 'arguments' throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('var arguments;'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-18-s +description: > + A direct eval declaring a var named 'arguments' throws SyntaxError + in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('var arguments;'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-19-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-19-s.js index 18fcc5d18e..b308a337f8 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-19-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-19-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-19-s.js - * @description A direct eval assigning into 'arguments' throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('arguments = 42;'); - return false; - } - catch (e) { - return (e instanceof SyntaxError) ; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-19-s +description: > + A direct eval assigning into 'arguments' throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('arguments = 42;'); + return false; + } + catch (e) { + return (e instanceof SyntaxError) ; + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-1gs.js b/test/suite/ch12/12.2/12.2.1/12.2.1-1gs.js index a93b2aae7e..5cd0797eae 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-1gs.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-1gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-1gs.js - * @description Strict Mode - SyntaxError is thrown if a VariableDeclaration occurs within strict code and its Identifier is eval - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -for (var eval in arrObj) { } \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-1gs +description: > + Strict Mode - SyntaxError is thrown if a VariableDeclaration + occurs within strict code and its Identifier is eval +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +for (var eval in arrObj) { } diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-2-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-2-s.js index 8b9848c549..80b6086596 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-2-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-2-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-2-s.js - * @description eval - a function assigning into 'eval' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { eval = 42; }; foo()'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-2-s +description: > + eval - a function assigning into 'eval' throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { eval = 42; }; foo()'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-20-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-20-s.js index 230340fda2..023d0492a2 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-20-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-20-s.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-20-s.js - * @description Strict Mode: an indirect eval declaring a var named 'arguments' does not throw - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - var s = eval; - s('var arguments;'); - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-20-s +description: > + Strict Mode: an indirect eval declaring a var named 'arguments' + does not throw +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + var s = eval; + s('var arguments;'); + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-21-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-21-s.js index 2d1907b017..80ba4d5d2a 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-21-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-21-s.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-21-s.js - * @description Strict Mode: an indirect eval assigning into 'arguments' does not throw - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - var s = eval; - s('arguments = 42;'); - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-21-s +description: > + Strict Mode: an indirect eval assigning into 'arguments' does not + throw +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + var s = eval; + s('arguments = 42;'); + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-22-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-22-s.js index 943360cdaf..b0b7854c0c 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-22-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-22-s.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-22-s.js - * @description arguments as global var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - - var indirectEval = eval; - - try { - indirectEval("'use strict'; var arguments;"); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-22-s +description: > + arguments as global var identifier throws SyntaxError in strict + mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + var indirectEval = eval; + + try { + indirectEval("'use strict'; var arguments;"); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-23-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-23-s.js index 29d667897d..470c058fea 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-23-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-23-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-23-s.js - * @description arguments as local var identifier assigned to throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var arguments = 42;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-23-s +description: > + arguments as local var identifier assigned to throws SyntaxError + in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var arguments = 42;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-24-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-24-s.js index bd9cc069df..ed33bf3706 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-24-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-24-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-24-s.js - * @description eval as local var identifier assigned to throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var eval = 42;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-24-s +description: > + eval as local var identifier assigned to throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var eval = 42;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-25-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-25-s.js index f283979597..82a8061671 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-25-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-25-s.js @@ -1,26 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-25-s.js - * @description arguments as local var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var arguments, a;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-25-s +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var arguments, a;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-26-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-26-s.js index b4e24356fb..4eee1bec99 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-26-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-26-s.js @@ -1,26 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-26-s.js - * @description eval as local var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var a, eval;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-26-s +description: eval as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var a, eval;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-27-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-27-s.js index 8f08b1b2ab..6b9d0c4332 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-27-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-27-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-27-s.js - * @description eval as local var identifier assigned to throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var eval = 42, a;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-27-s +description: > + eval as local var identifier assigned to throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var eval = 42, a;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-28-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-28-s.js index ea6d73a0cd..902310f3c0 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-28-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-28-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-28-s.js - * @description arguments as local var identifier assigned to throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var a, arguments = 42;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-28-s +description: > + arguments as local var identifier assigned to throws SyntaxError + in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var a, arguments = 42;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-29-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-29-s.js index 4b389d9665..a07ce81498 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-29-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-29-s.js @@ -1,26 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-29-s.js - * @description eval as local var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var eval, a = 42;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-29-s +description: eval as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var eval, a = 42;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-3-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-3-s.js index 6f207527e5..b64e13fbbe 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-3-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-3-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-3-s.js - * @description eval - a function expr declaring a var named 'eval' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('(function () { var eval; })'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-3-s +description: > + eval - a function expr declaring a var named 'eval' throws + SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('(function () { var eval; })'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-30-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-30-s.js index 8998405d0c..be76be316f 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-30-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-30-s.js @@ -1,26 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-30-s.js - * @description arguments as local var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var a = 42, arguments;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-30-s +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var a = 42, arguments;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-31-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-31-s.js index 305af43d2d..92396574e3 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-31-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-31-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-31-s.js - * @description eval as local var identifier defined twice throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var eval, eval;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-31-s +description: > + eval as local var identifier defined twice throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var eval, eval;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-32-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-32-s.js index b68ecb63dd..bbc47963c3 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-32-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-32-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-32-s.js - * @description arguments as local var identifier defined twice and assigned once throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var arguments, arguments = 42;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-32-s +description: > + arguments as local var identifier defined twice and assigned once + throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var arguments, arguments = 42;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-33-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-33-s.js index 1a54c5e5be..eac0cd292f 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-33-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-33-s.js @@ -1,26 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-33-s.js - * @description arguments as local var identifier throws SyntaxError in strict mode - * @onlyStrict - */ - - - - -function testcase() { - 'use strict'; - - try { - eval('function foo() { var a, arguments, b;}'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-33-s +description: arguments as local var identifier throws SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('function foo() { var a, arguments, b;}'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } +} +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-34-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-34-s.js index c41cb67a63..e88e3e33f5 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-34-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-34-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-34-s.js - * @description 'for(var eval in ...) {...}' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('for (var eval in null) {};'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-34-s +description: "'for(var eval in ...) {...}' throws SyntaxError in strict mode" +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('for (var eval in null) {};'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-35-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-35-s.js index 41eaacabf9..4316503ba6 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-35-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-35-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-35-s.js - * @description 'for(var eval = 42 in ...) {...}' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('for (var eval = 42 in null) {};'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-35-s +description: "'for(var eval = 42 in ...) {...}' throws SyntaxError in strict mode" +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('for (var eval = 42 in null) {};'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-36-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-36-s.js index f331694834..0aa0b4c238 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-36-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-36-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-36-s.js - * @description 'for(var arguments in ...) {...}' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('for (var arguments in null) {};'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-36-s +description: "'for(var arguments in ...) {...}' throws SyntaxError in strict mode" +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('for (var arguments in null) {};'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-37-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-37-s.js index 2a134a6654..903f0043a7 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-37-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-37-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-37-s.js - * @description 'for(var arguments = 42 in ...) {...}' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('for (var arguments = 42 in null) {};'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-37-s +description: > + 'for(var arguments = 42 in ...) {...}' throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('for (var arguments = 42 in null) {};'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-4-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-4-s.js index 2eef4faaa9..375d5965bb 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-4-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-4-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-4-s.js - * @description eval - a function expr assigning into 'eval' throws a SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('(function () { eval = 42; })()'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-4-s +description: > + eval - a function expr assigning into 'eval' throws a SyntaxError + in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('(function () { eval = 42; })()'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-4gs.js b/test/suite/ch12/12.2/12.2.1/12.2.1-4gs.js index add5e144d6..111bf357ad 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-4gs.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-4gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-4gs.js - * @description Strict Mode - SyntaxError is thrown if a VariableDeclarationNoIn occurs within strict code and its Identifier is arguments - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -var arguments; \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-4gs +description: > + Strict Mode - SyntaxError is thrown if a VariableDeclarationNoIn + occurs within strict code and its Identifier is arguments +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +var arguments; diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-5-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-5-s.js index 8644c4a205..f328da59f2 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-5-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-5-s.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-5-s.js - * @description Strict Mode - a Function declaring var named 'eval' does not throw SyntaxError - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - Function('var eval;'); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-5-s +description: > + Strict Mode - a Function declaring var named 'eval' does not throw + SyntaxError +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + Function('var eval;'); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-6-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-6-s.js index 2db1c2bf8c..a04b1e9007 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-6-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-6-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-6-s.js - * @description eval - a Function assigning into 'eval' will not throw any error if contained within strict mode and its body does not start with strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - var f = Function('eval = 42;'); - f(); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-6-s +description: > + eval - a Function assigning into 'eval' will not throw any error + if contained within strict mode and its body does not start with + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + var f = Function('eval = 42;'); + f(); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-7-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-7-s.js index fec5ae6597..17681cf97b 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-7-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-7-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-7-s.js - * @description eval - a direct eval declaring a var named 'eval' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('var eval;'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-7-s +description: > + eval - a direct eval declaring a var named 'eval' throws + SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('var eval;'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-8-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-8-s.js index 385808d441..ff2fe6b778 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-8-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-8-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-8-s.js - * @description eval - a direct eval assigning into 'eval' throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - - try { - eval('eval = 42;'); - return false; - } - catch (e) { - return (e instanceof SyntaxError) ; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-8-s +description: > + eval - a direct eval assigning into 'eval' throws SyntaxError in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + + try { + eval('eval = 42;'); + return false; + } + catch (e) { + return (e instanceof SyntaxError) ; + } + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/12.2.1/12.2.1-9-s.js b/test/suite/ch12/12.2/12.2.1/12.2.1-9-s.js index 6479cc1749..a43f3b6029 100644 --- a/test/suite/ch12/12.2/12.2.1/12.2.1-9-s.js +++ b/test/suite/ch12/12.2/12.2.1/12.2.1-9-s.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.2/12.2.1/12.2.1-9-s.js - * @description Strict Mode: an indirect eval declaring a var named 'eval' does not throw - * @onlyStrict - */ - - -function testcase() { - 'use strict'; - var s = eval; - s('var eval;'); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.2.1-9-s +description: > + Strict Mode: an indirect eval declaring a var named 'eval' does + not throw +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + 'use strict'; + var s = eval; + s('var eval;'); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.2/S12.2_A1.js b/test/suite/ch12/12.2/S12.2_A1.js index 520daebf59..76bf477558 100644 --- a/test/suite/ch12/12.2/S12.2_A1.js +++ b/test/suite/ch12/12.2/S12.2_A1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Variables are created when the program is entered. Variables are initialised to "undefined" - * when created. A variable with an Initialiser is assigned the value of its AssignmentExpression when the - * VariableStatement is executed, not when the variable is created - * - * @path ch12/12.2/S12.2_A1.js - * @description Creating variables after entering the execution scope - */ +/*--- +info: > + Variables are created when the program is entered. Variables are initialised to "undefined" + when created. A variable with an Initialiser is assigned the value of its AssignmentExpression when the + VariableStatement is executed, not when the variable is created +es5id: 12.2_A1 +description: Creating variables after entering the execution scope +includes: [$PRINT.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -50,4 +51,3 @@ if (!__y&!(__z = "smeagol")) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A10.js b/test/suite/ch12/12.2/S12.2_A10.js index b85f957b2b..7d1440a317 100644 --- a/test/suite/ch12/12.2/S12.2_A10.js +++ b/test/suite/ch12/12.2/S12.2_A10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "var" statement within "for" statement is allowed - * - * @path ch12/12.2/S12.2_A10.js - * @description Declaring variable within a "for" IterationStatement - */ +/*--- +info: "\"var\" statement within \"for\" statement is allowed" +es5id: 12.2_A10 +description: Declaring variable within a "for" IterationStatement +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -21,4 +20,3 @@ try { for (var __ind;;){ break; } - diff --git a/test/suite/ch12/12.2/S12.2_A11.js b/test/suite/ch12/12.2/S12.2_A11.js index 392d4e74b9..43695c5144 100644 --- a/test/suite/ch12/12.2/S12.2_A11.js +++ b/test/suite/ch12/12.2/S12.2_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When using property attributes, {ReadOnly} is not used - * - * @path ch12/12.2/S12.2_A11.js - * @description Changing variable value using property attributes - */ +/*--- +info: When using property attributes, {ReadOnly} is not used +es5id: 12.2_A11 +description: Changing variable value using property attributes +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -26,4 +25,3 @@ if (__declared__var !== "baloon") { ////////////////////////////////////////////////////////////////////////////// var __declared__var; - diff --git a/test/suite/ch12/12.2/S12.2_A12.js b/test/suite/ch12/12.2/S12.2_A12.js index d69e27539c..ca5de6057d 100644 --- a/test/suite/ch12/12.2/S12.2_A12.js +++ b/test/suite/ch12/12.2/S12.2_A12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VariableDeclaration within "do-while" loop is allowed - * - * @path ch12/12.2/S12.2_A12.js - * @description Declaring variable within "do-while" statement - */ +/*--- +info: VariableDeclaration within "do-while" loop is allowed +es5id: 12.2_A12 +description: Declaring variable within "do-while" statement +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -19,4 +18,3 @@ try { ////////////////////////////////////////////////////////////////////////////// do var x; while (false); - diff --git a/test/suite/ch12/12.2/S12.2_A2.js b/test/suite/ch12/12.2/S12.2_A2.js index 5f7de5abc7..3b02e0318e 100644 --- a/test/suite/ch12/12.2/S12.2_A2.js +++ b/test/suite/ch12/12.2/S12.2_A2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Variables are defined with global scope (that is, they are created as members of the global object, as described in 10.1.3) using property attributes { DontDelete} - * - * @path ch12/12.2/S12.2_A2.js - * @description Checking if deleting global variables that have the attributes {DontDelete} fails - */ +/*--- +info: > + Variables are defined with global scope (that is, they are created as + members of the global object, as described in 10.1.3) using property + attributes { DontDelete} +es5id: 12.2_A2 +description: > + Checking if deleting global variables that have the attributes + {DontDelete} fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -43,5 +47,3 @@ if ((__variable !== "defined")|(this["__variable"] !=="defined")) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.2/S12.2_A3.js b/test/suite/ch12/12.2/S12.2_A3.js index 5c0845ad22..392a5e9395 100644 --- a/test/suite/ch12/12.2/S12.2_A3.js +++ b/test/suite/ch12/12.2/S12.2_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration produces a new scope - * - * @path ch12/12.2/S12.2_A3.js - * @description Using Global scope and Function scope together - */ +/*--- +info: FunctionDeclaration produces a new scope +es5id: 12.2_A3 +description: Using Global scope and Function scope together +---*/ var __var = "OUT"; @@ -52,4 +51,3 @@ if (__var!=="INNERED") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A4.js b/test/suite/ch12/12.2/S12.2_A4.js index 17f5c6a87b..a2d23e5c2c 100644 --- a/test/suite/ch12/12.2/S12.2_A4.js +++ b/test/suite/ch12/12.2/S12.2_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Unicode characters in variable Identifier are allowed - * - * @path ch12/12.2/S12.2_A4.js - * @description Create and use unicode characters in variable Identifier - */ +/*--- +info: Unicode characters in variable Identifier are allowed +es5id: 12.2_A4 +description: Create and use unicode characters in variable Identifier +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +26,3 @@ if (__var !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A5.js b/test/suite/ch12/12.2/S12.2_A5.js index c168bfd2bc..f79de28b9b 100644 --- a/test/suite/ch12/12.2/S12.2_A5.js +++ b/test/suite/ch12/12.2/S12.2_A5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VariableDeclaration within Eval statement is initialized as the program reaches the eval statement - * - * @path ch12/12.2/S12.2_A5.js - * @description Executing eval("var x") - */ +/*--- +info: > + VariableDeclaration within Eval statement is initialized as the program + reaches the eval statement +es5id: 12.2_A5 +description: Executing eval("var x") +includes: [$PRINT.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -30,4 +32,3 @@ try{ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A6_T1.js b/test/suite/ch12/12.2/S12.2_A6_T1.js index 34e7f0e7af..a342cfec9b 100644 --- a/test/suite/ch12/12.2/S12.2_A6_T1.js +++ b/test/suite/ch12/12.2/S12.2_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VariableDeclaration within "try-catch" statement is allowed - * - * @path ch12/12.2/S12.2_A6_T1.js - * @description Declaring variable within "try-catch" statement - */ +/*--- +info: VariableDeclaration within "try-catch" statement is allowed +es5id: 12.2_A6_T1 +description: Declaring variable within "try-catch" statement +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -33,4 +32,3 @@ try{ }catch(e){ var incatch__var; }; - diff --git a/test/suite/ch12/12.2/S12.2_A6_T2.js b/test/suite/ch12/12.2/S12.2_A6_T2.js index 4b586e0ab6..33a9c1cf74 100644 --- a/test/suite/ch12/12.2/S12.2_A6_T2.js +++ b/test/suite/ch12/12.2/S12.2_A6_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VariableDeclaration within "try-catch" statement is allowed - * - * @path ch12/12.2/S12.2_A6_T2.js - * @description Declaring variables within "try-catch" statement - */ +/*--- +info: VariableDeclaration within "try-catch" statement is allowed +es5id: 12.2_A6_T2 +description: Declaring variables within "try-catch" statement +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -35,4 +34,3 @@ try{ } }; - diff --git a/test/suite/ch12/12.2/S12.2_A7.js b/test/suite/ch12/12.2/S12.2_A7.js index 167355a9fa..1dbc3e6cc3 100644 --- a/test/suite/ch12/12.2/S12.2_A7.js +++ b/test/suite/ch12/12.2/S12.2_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VariableDeclaration within "for" statement is allowed - * - * @path ch12/12.2/S12.2_A7.js - * @description Declaring variable within "for" statement - */ +/*--- +info: VariableDeclaration within "for" statement is allowed +es5id: 12.2_A7 +description: Declaring variable within "for" statement +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -22,4 +21,3 @@ for (;;){ break; var infor_var; } - diff --git a/test/suite/ch12/12.2/S12.2_A8_T1.js b/test/suite/ch12/12.2/S12.2_A8_T1.js index c9466b665d..51e06b78ba 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T1.js +++ b/test/suite/ch12/12.2/S12.2_A8_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T1.js - * @description Checking if execution of "var x += 1" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T1 +description: Checking if execution of "var x += 1" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x += 1; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A8_T2.js b/test/suite/ch12/12.2/S12.2_A8_T2.js index f5b9edc5f8..c71294daa0 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T2.js +++ b/test/suite/ch12/12.2/S12.2_A8_T2.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T2.js - * @description Checking if execution of "var x | true" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T2 +description: Checking if execution of "var x | true" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x | true; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A8_T3.js b/test/suite/ch12/12.2/S12.2_A8_T3.js index 4272e5c1bf..00fcb034fb 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T3.js +++ b/test/suite/ch12/12.2/S12.2_A8_T3.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T3.js - * @description Checking if execution of "var x && 1" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T3 +description: Checking if execution of "var x && 1" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x && 1; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A8_T4.js b/test/suite/ch12/12.2/S12.2_A8_T4.js index 1f46417708..e23fc937e8 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T4.js +++ b/test/suite/ch12/12.2/S12.2_A8_T4.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T4.js - * @description Checking if execution of "var x++" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T4 +description: Checking if execution of "var x++" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x++; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A8_T5.js b/test/suite/ch12/12.2/S12.2_A8_T5.js index 1c414f6ddd..cde132209b 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T5.js +++ b/test/suite/ch12/12.2/S12.2_A8_T5.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T5.js - * @description Checking if execution of "var --x" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T5 +description: Checking if execution of "var --x" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var --x; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.2/S12.2_A8_T6.js b/test/suite/ch12/12.2/S12.2_A8_T6.js index c763f07aa9..dca790eeed 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T6.js +++ b/test/suite/ch12/12.2/S12.2_A8_T6.js @@ -1,18 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T6.js - * @description Checking if execution of "var x*1" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T6 +description: Checking if execution of "var x*1" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x*1; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.2/S12.2_A8_T7.js b/test/suite/ch12/12.2/S12.2_A8_T7.js index 86d1c33988..32b93b4483 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T7.js +++ b/test/suite/ch12/12.2/S12.2_A8_T7.js @@ -1,18 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T7.js - * @description Checking if execution of "var x>>1" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T7 +description: Checking if execution of "var x>>1" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x>>1; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.2/S12.2_A8_T8.js b/test/suite/ch12/12.2/S12.2_A8_T8.js index d798757d68..9b7795e2b3 100644 --- a/test/suite/ch12/12.2/S12.2_A8_T8.js +++ b/test/suite/ch12/12.2/S12.2_A8_T8.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only AssignmentExpression is admitted when variable is initialized - * - * @path ch12/12.2/S12.2_A8_T8.js - * @description Checking if execution of "var x in __arr" fails - * @negative - */ +/*--- +info: Only AssignmentExpression is admitted when variable is initialized +es5id: 12.2_A8_T8 +description: Checking if execution of "var x in __arr" fails +flags: [negative] +---*/ __arr = []; @@ -16,5 +15,3 @@ __arr = []; var x in __arr; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.2/S12.2_A9.js b/test/suite/ch12/12.2/S12.2_A9.js index 261599a656..78268f8bfd 100644 --- a/test/suite/ch12/12.2/S12.2_A9.js +++ b/test/suite/ch12/12.2/S12.2_A9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When using property attributes, {DontEnum} is not used - * - * @path ch12/12.2/S12.2_A9.js - * @description Enumerating property attributes of "this" and then searching for the declared variable - */ +/*--- +info: When using property attributes, {DontEnum} is not used +es5id: 12.2_A9 +description: > + Enumerating property attributes of "this" and then searching for + the declared variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -21,4 +22,3 @@ if (!(enumed)) { ////////////////////////////////////////////////////////////////////////////// var __declared__var; - diff --git a/test/suite/ch12/12.3/S12.3_A1.js b/test/suite/ch12/12.3/S12.3_A1.js index e314b179e5..1792a2c4b1 100644 --- a/test/suite/ch12/12.3/S12.3_A1.js +++ b/test/suite/ch12/12.3/S12.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production EmptyStatement ; is evaluated as follows Return (normal, empty, empty) - * - * @path ch12/12.3/S12.3_A1.js - * @description Using EmptyStatement ; - */ +/*--- +info: > + The production EmptyStatement ; is evaluated as follows Return (normal, + empty, empty) +es5id: 12.3_A1 +description: Using EmptyStatement ; +---*/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; ;;;;;; ;; ;; ;;;;;; ;;;;;;;; ;; ;; ;;;;; @@ -15,4 +16,3 @@ ;;;;; ;; ;; ;; ;; ;; ;; ;; ;;;;; ;;;;; ;;;;;; ;; ;; ;; ;; ;; ;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - diff --git a/test/suite/ch12/12.4/S12.4_A1.js b/test/suite/ch12/12.4/S12.4_A1.js index 0754d791e9..4ca4e197f1 100644 --- a/test/suite/ch12/12.4/S12.4_A1.js +++ b/test/suite/ch12/12.4/S12.4_A1.js @@ -1,17 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An ExpressionStatement can not start with the function keyword because that might make it ambiguous with a FunctionDeclaration - * - * @path ch12/12.4/S12.4_A1.js - * @description Checking if execution of "function(){}()" fails - * @negative - */ +/*--- +info: > + An ExpressionStatement can not start with the function keyword because + that might make it ambiguous with a FunctionDeclaration +es5id: 12.4_A1 +description: Checking if execution of "function(){}()" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 function(){}(); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.4/S12.4_A2_T1.js b/test/suite/ch12/12.4/S12.4_A2_T1.js index 70d0aa62d2..742b586575 100644 --- a/test/suite/ch12/12.4/S12.4_A2_T1.js +++ b/test/suite/ch12/12.4/S12.4_A2_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production ExpressionStatement : [lookahead \notin {{, function}] Expression; is evaluated as follows: - * 1. Evaluate Expression. - * 2. Call GetValue(Result(1)). - * 3. Return (normal, Result(2), empty) - * - * @path ch12/12.4/S12.4_A2_T1.js - * @description Checking by using eval "(eval("x+1+x==1"))" - */ +/*--- +info: > + The production ExpressionStatement : [lookahead \notin {{, function}] Expression; is evaluated as follows: + 1. Evaluate Expression. + 2. Call GetValue(Result(1)). + 3. Return (normal, Result(2), empty) +es5id: 12.4_A2_T1 +description: Checking by using eval "(eval("x+1+x==1"))" +---*/ x=1; @@ -32,4 +32,3 @@ if (__evaluated !== false) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.4/S12.4_A2_T2.js b/test/suite/ch12/12.4/S12.4_A2_T2.js index 2fdadc0088..a2f294f80c 100644 --- a/test/suite/ch12/12.4/S12.4_A2_T2.js +++ b/test/suite/ch12/12.4/S12.4_A2_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production ExpressionStatement : [lookahead \notin {{, function}] Expression; is evaluated as follows: - * 1. Evaluate Expression. - * 2. Call GetValue(Result(1)). - * 3. Return (normal, Result(2), empty) - * - * @path ch12/12.4/S12.4_A2_T2.js - * @description Checking by using eval(eval(x), where x is any string) - */ +/*--- +info: > + The production ExpressionStatement : [lookahead \notin {{, function}] Expression; is evaluated as follows: + 1. Evaluate Expression. + 2. Call GetValue(Result(1)). + 3. Return (normal, Result(2), empty) +es5id: 12.4_A2_T2 +description: Checking by using eval(eval(x), where x is any string) +---*/ x="5+1|0===0"; @@ -32,4 +32,3 @@ if (__evaluated !== 11) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A1.1_T1.js b/test/suite/ch12/12.5/S12.5_A1.1_T1.js index ae2038c98d..e0df0e43af 100644 --- a/test/suite/ch12/12.5/S12.5_A1.1_T1.js +++ b/test/suite/ch12/12.5/S12.5_A1.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 0, null, undefined, false, empty string, NaN in expression is evaluated to false - * - * @path ch12/12.5/S12.5_A1.1_T1.js - * @description Using "if" without "else" construction - */ +/*--- +info: > + 0, null, undefined, false, empty string, NaN in expression is evaluated + to false +es5id: 12.5_A1.1_T1 +description: Using "if" without "else" construction +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -50,4 +51,3 @@ if(NaN) $ERROR('#5: NaN in expression is evaluated to false '); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A1.1_T2.js b/test/suite/ch12/12.5/S12.5_A1.1_T2.js index ba5d8e3cb0..eb3b8bbe9f 100644 --- a/test/suite/ch12/12.5/S12.5_A1.1_T2.js +++ b/test/suite/ch12/12.5/S12.5_A1.1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 0, null, undefined, false, empty string, NaN in expression is evaluated to false - * - * @path ch12/12.5/S12.5_A1.1_T2.js - * @description Using "if/else" construction - */ +/*--- +info: > + 0, null, undefined, false, empty string, NaN in expression is evaluated + to false +es5id: 12.5_A1.1_T2 +description: Using "if/else" construction +---*/ var c=0; ////////////////////////////////////////////////////////////////////////////// @@ -68,4 +69,3 @@ else if (c!=6) $ERROR('#6.2: else branch don`t execute'); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A1.2_T1.js b/test/suite/ch12/12.5/S12.5_A1.2_T1.js index 19ba4cdd19..98b5ed0177 100644 --- a/test/suite/ch12/12.5/S12.5_A1.2_T1.js +++ b/test/suite/ch12/12.5/S12.5_A1.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1, true, non-empty string and others in expression is evaluated to true when using operator "new" - * - * @path ch12/12.5/S12.5_A1.2_T1.js - * @description Using "if" without "else" construction - */ +/*--- +info: > + 1, true, non-empty string and others in expression is evaluated to true + when using operator "new" +es5id: 12.5_A1.2_T1 +description: Using "if" without "else" construction +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -70,4 +71,3 @@ if(!(new String(""))) $ERROR('#9: new empty string in expression is evaluated to true '); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A1.2_T2.js b/test/suite/ch12/12.5/S12.5_A1.2_T2.js index b384311f1b..d025b44e67 100644 --- a/test/suite/ch12/12.5/S12.5_A1.2_T2.js +++ b/test/suite/ch12/12.5/S12.5_A1.2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1, true, non-empty string and others in expression is evaluated to true when using operator "new" - * - * @path ch12/12.5/S12.5_A1.2_T2.js - * @description Using "if/else" construction - */ +/*--- +info: > + 1, true, non-empty string and others in expression is evaluated to true + when using operator "new" +es5id: 12.5_A1.2_T2 +description: Using "if/else" construction +---*/ var c=0; ////////////////////////////////////////////////////////////////////////////// @@ -98,4 +99,3 @@ else if (c!=9) $ERROR('#9.2: else branch don`t execute'); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A10_T1.js b/test/suite/ch12/12.5/S12.5_A10_T1.js index 4995fe1c23..21005ed4d9 100644 --- a/test/suite/ch12/12.5/S12.5_A10_T1.js +++ b/test/suite/ch12/12.5/S12.5_A10_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function expession inside the "if" expression is allowed - * - * @path ch12/12.5/S12.5_A10_T1.js - * @description Using function expession(function __func(){return 0;}) inside the "if" expression - */ +/*--- +info: Function expession inside the "if" expression is allowed +es5id: 12.5_A10_T1 +description: > + Using function expession(function __func(){return 0;}) inside the + "if" expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -17,4 +18,3 @@ if(function __func(){return 0;}){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A10_T2.js b/test/suite/ch12/12.5/S12.5_A10_T2.js index bcb187b083..7e09becf72 100644 --- a/test/suite/ch12/12.5/S12.5_A10_T2.js +++ b/test/suite/ch12/12.5/S12.5_A10_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function expession inside the "if" expression is allowed - * - * @path ch12/12.5/S12.5_A10_T2.js - * @description Using function expession "function __func(){return 0;}()" within "if" expression - */ +/*--- +info: Function expession inside the "if" expression is allowed +es5id: 12.5_A10_T2 +description: > + Using function expession "function __func(){return 0;}()" within + "if" expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -17,4 +18,3 @@ if(function __func(){return 0;}()){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A11.js b/test/suite/ch12/12.5/S12.5_A11.js index 250b29f508..d2f9ae7c06 100644 --- a/test/suite/ch12/12.5/S12.5_A11.js +++ b/test/suite/ch12/12.5/S12.5_A11.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * {} within the "if" expression is not allowed - * - * @path ch12/12.5/S12.5_A11.js - * @description Checking if execution of "if({1})" fails - * @negative - */ +/*--- +info: "{} within the \"if\" expression is not allowed" +es5id: 12.5_A11 +description: Checking if execution of "if({1})" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -20,4 +19,3 @@ if({1}) } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A12_T1.js b/test/suite/ch12/12.5/S12.5_A12_T1.js index 43f858b091..bc8cf859f5 100644 --- a/test/suite/ch12/12.5/S12.5_A12_T1.js +++ b/test/suite/ch12/12.5/S12.5_A12_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Embedded "if/else" constructions are allowed - * - * @path ch12/12.5/S12.5_A12_T1.js - * @description Using embedded "if/else" into "if/else" constructions - */ +/*--- +info: Embedded "if/else" constructions are allowed +es5id: 12.5_A12_T1 +description: Using embedded "if/else" into "if/else" constructions +---*/ //CHECK# 1 if(true) @@ -55,4 +54,3 @@ else $ERROR('#4.3: At embedded "if/else" constructions engine must select right branches'); else ; - diff --git a/test/suite/ch12/12.5/S12.5_A12_T2.js b/test/suite/ch12/12.5/S12.5_A12_T2.js index c9115994b6..17a267c02a 100644 --- a/test/suite/ch12/12.5/S12.5_A12_T2.js +++ b/test/suite/ch12/12.5/S12.5_A12_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Embedded "if/else" constructions are allowed - * - * @path ch12/12.5/S12.5_A12_T2.js - * @description Using embedded "if" into "if/else" constructions - */ +/*--- +info: Embedded "if/else" constructions are allowed +es5id: 12.5_A12_T2 +description: Using embedded "if" into "if/else" constructions +---*/ //CHECK# 1 if(true){ @@ -47,4 +46,3 @@ else{ if (false) $ERROR('#4.3: At embedded "if/else" constructions engine must select right branches'); } - diff --git a/test/suite/ch12/12.5/S12.5_A12_T3.js b/test/suite/ch12/12.5/S12.5_A12_T3.js index a17cff21f6..0e6d987c10 100644 --- a/test/suite/ch12/12.5/S12.5_A12_T3.js +++ b/test/suite/ch12/12.5/S12.5_A12_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Embedded "if/else" constructions are allowed - * - * @path ch12/12.5/S12.5_A12_T3.js - * @description Using embedded "if/else" into "if" without "else" constructions - */ +/*--- +info: Embedded "if/else" constructions are allowed +es5id: 12.5_A12_T3 +description: Using embedded "if/else" into "if" without "else" constructions +---*/ //CHECK# 1 if(true) @@ -35,4 +34,3 @@ if(false) $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches'); else $ERROR('#4.2: At embedded "if/else" constructions engine must select right branches'); - diff --git a/test/suite/ch12/12.5/S12.5_A12_T4.js b/test/suite/ch12/12.5/S12.5_A12_T4.js index 03f643d628..39df51bff2 100644 --- a/test/suite/ch12/12.5/S12.5_A12_T4.js +++ b/test/suite/ch12/12.5/S12.5_A12_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Embedded "if/else" constructions are allowed - * - * @path ch12/12.5/S12.5_A12_T4.js - * @description Using embedded "if" into "if" constructions - */ +/*--- +info: Embedded "if/else" constructions are allowed +es5id: 12.5_A12_T4 +description: Using embedded "if" into "if" constructions +---*/ //CHECK# 1 if(true) @@ -30,4 +29,3 @@ if(false) if(false) if (true) $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches'); - diff --git a/test/suite/ch12/12.5/S12.5_A1_T1.js b/test/suite/ch12/12.5/S12.5_A1_T1.js index df6f327d4f..1a3dbbb03b 100644 --- a/test/suite/ch12/12.5/S12.5_A1_T1.js +++ b/test/suite/ch12/12.5/S12.5_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1, true, non-empty string in expression is evaluated to true - * - * @path ch12/12.5/S12.5_A1_T1.js - * @description Using "if" without "else" construction - */ +/*--- +info: 1, true, non-empty string in expression is evaluated to true +es5id: 12.5_A1_T1 +description: Using "if" without "else" construction +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -35,5 +34,3 @@ if(!("A")) $ERROR('#4: "A" in expression is evaluated to true'); // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.5/S12.5_A1_T2.js b/test/suite/ch12/12.5/S12.5_A1_T2.js index ea952a9303..d36d6d150d 100644 --- a/test/suite/ch12/12.5/S12.5_A1_T2.js +++ b/test/suite/ch12/12.5/S12.5_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * 1, true, non-empty string in expression is evaluated to true - * - * @path ch12/12.5/S12.5_A1_T2.js - * @description Using "if/else" construction - */ +/*--- +info: 1, true, non-empty string in expression is evaluated to true +es5id: 12.5_A1_T2 +description: Using "if/else" construction +---*/ var c=0; ////////////////////////////////////////////////////////////////////////////// @@ -48,5 +47,3 @@ else if (c!=4) $ERROR('#4.2: else branch don`t execute'); // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.5/S12.5_A2.js b/test/suite/ch12/12.5/S12.5_A2.js index c953c29cdc..ec21a34719 100644 --- a/test/suite/ch12/12.5/S12.5_A2.js +++ b/test/suite/ch12/12.5/S12.5_A2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In the "if" Statement eval in Expression is admitted - * - * @path ch12/12.5/S12.5_A2.js - * @description Checking by using eval "eval("true")" - * @negative - */ +/*--- +info: In the "if" Statement eval in Expression is admitted +es5id: 12.5_A2 +description: Checking by using eval "eval("true")" +flags: [negative] +includes: [$FAIL.js] +---*/ if (eval("true")) $FAIL('#1: In the "if" Statement eval as Expression is admitted'); - diff --git a/test/suite/ch12/12.5/S12.5_A3.js b/test/suite/ch12/12.5/S12.5_A3.js index 3eb41d59b8..4485c754bd 100644 --- a/test/suite/ch12/12.5/S12.5_A3.js +++ b/test/suite/ch12/12.5/S12.5_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the production "IfStatement: if ( Expression ) Statement else Statement" is evaluated, Expression is evaluated first - * - * @path ch12/12.5/S12.5_A3.js - * @description The Expression is "(function(){throw 1})()" - */ +/*--- +info: > + When the production "IfStatement: if ( Expression ) Statement else + Statement" is evaluated, Expression is evaluated first +es5id: 12.5_A3 +description: The Expression is "(function(){throw 1})()" +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -31,5 +32,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.5/S12.5_A4.js b/test/suite/ch12/12.5/S12.5_A4.js index 73babcfeaf..0b359d4773 100644 --- a/test/suite/ch12/12.5/S12.5_A4.js +++ b/test/suite/ch12/12.5/S12.5_A4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the production "IfStatement: if ( Expression ) Statement else Statement" is evaluated, Statement(s) is(are) evaluated second - * - * @path ch12/12.5/S12.5_A4.js - * @description The first statement is "(function(){throw "instatement"})()" - */ +/*--- +info: > + When the production "IfStatement: if ( Expression ) Statement else + Statement" is evaluated, Statement(s) is(are) evaluated second +es5id: 12.5_A4 +description: The first statement is "(function(){throw "instatement"})()" +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -33,5 +35,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.5/S12.5_A5.js b/test/suite/ch12/12.5/S12.5_A5.js index 72c334a67c..1ba136a795 100644 --- a/test/suite/ch12/12.5/S12.5_A5.js +++ b/test/suite/ch12/12.5/S12.5_A5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration inside the "if" Expression is evaluated as true and function will not be declarated - * - * @path ch12/12.5/S12.5_A5.js - * @description The "if" Expression is "function __func(){throw "FunctionExpression";}" - */ +/*--- +info: > + FunctionDeclaration inside the "if" Expression is evaluated as true and + function will not be declarated +es5id: 12.5_A5 +description: > + The "if" Expression is "function __func(){throw + "FunctionExpression";}" +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -42,7 +45,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.5/S12.5_A6_T1.js b/test/suite/ch12/12.5/S12.5_A6_T1.js index 76aabe63c4..ddac88dfe3 100644 --- a/test/suite/ch12/12.5/S12.5_A6_T1.js +++ b/test/suite/ch12/12.5/S12.5_A6_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In the If statement expression must be enclosed in braces - * - * @path ch12/12.5/S12.5_A6_T1.js - * @description Checking if execution of "if true" fails - * @negative - */ +/*--- +info: In the If statement expression must be enclosed in braces +es5id: 12.5_A6_T1 +description: Checking if execution of "if true" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if true; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A6_T2.js b/test/suite/ch12/12.5/S12.5_A6_T2.js index 1b6f383ab7..1628a57b6d 100644 --- a/test/suite/ch12/12.5/S12.5_A6_T2.js +++ b/test/suite/ch12/12.5/S12.5_A6_T2.js @@ -1,18 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In the If statement expression must be enclosed in braces - * - * @path ch12/12.5/S12.5_A6_T2.js - * @description Checking if execution of "if false" fails - * @negative - */ +/*--- +info: In the If statement expression must be enclosed in braces +es5id: 12.5_A6_T2 +description: Checking if execution of "if false" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if false; // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.5/S12.5_A7.js b/test/suite/ch12/12.5/S12.5_A7.js index f450d6aea2..dd2ebc61bf 100644 --- a/test/suite/ch12/12.5/S12.5_A7.js +++ b/test/suite/ch12/12.5/S12.5_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In the "if" statement empty statement is allowed and is evaluated to "undefined" - * - * @path ch12/12.5/S12.5_A7.js - * @description Checking by using eval "eval("if(1);"))" - */ +/*--- +info: > + In the "if" statement empty statement is allowed and is evaluated to + "undefined" +es5id: 12.5_A7 +description: Checking by using eval "eval("if(1);"))" +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -22,4 +23,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.5/S12.5_A8.js b/test/suite/ch12/12.5/S12.5_A8.js index 7a2d4b9c67..6ccf77f501 100644 --- a/test/suite/ch12/12.5/S12.5_A8.js +++ b/test/suite/ch12/12.5/S12.5_A8.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In the "if" Statement empty expression is not allowed - * - * @path ch12/12.5/S12.5_A8.js - * @description Checking if execution of "if()" fails - * @negative - */ +/*--- +info: In the "if" Statement empty expression is not allowed +es5id: 12.5_A8 +description: Checking if execution of "if()" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if(); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A1.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A1.js index b4cf09ab90..ca57038768 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A1.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the production "do Statement while ( Expression )" is evaluated, Statement is evaluated first - * - * @path ch12/12.6/12.6.1/S12.6.1_A1.js - * @description Evaluating various Expressions - */ +/*--- +info: > + When the production "do Statement while ( Expression )" is evaluated, + Statement is evaluated first +es5id: 12.6.1_A1 +description: Evaluating various Expressions +---*/ var __in__do; @@ -39,4 +40,3 @@ if (__in__do!==3) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A10.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A10.js index 0c01a5e2ed..49c57e87e1 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A10.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a "do-while" statement is allowed, but no function with the given name will appear in the global context - * - * @path ch12/12.6/12.6.1/S12.6.1_A10.js - * @description Also this a test on FunctionExpression - */ +/*--- +info: > + FunctionExpression within a "do-while" statement is allowed, but no + function with the given name will appear in the global context +es5id: 12.6.1_A10 +description: Also this a test on FunctionExpression +---*/ var check = 0; do { @@ -26,4 +27,3 @@ if (check !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A11.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A11.js index 60071bd6b4..4df1d76e85 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A11.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Block "{}" in a "do-while" Expression is evaluated to true - * - * @path ch12/12.6/12.6.1/S12.6.1_A11.js - * @description Checking if execution of "do {} while({})" passes - */ +/*--- +info: Block "{}" in a "do-while" Expression is evaluated to true +es5id: 12.6.1_A11 +description: Checking if execution of "do {} while({})" passes +---*/ do { var __in__do=1; @@ -20,4 +19,3 @@ if (__in__do !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A12.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A12.js index 1e623bc43d..19d010b46a 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A12.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A12.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Any statement within "do-while" construction must be a compound - * - * @path ch12/12.6/12.6.1/S12.6.1_A12.js - * @description Checking if execution of "do var x=1; var y =2; while (0)" fails - * @negative - */ +/*--- +info: Any statement within "do-while" construction must be a compound +es5id: 12.6.1_A12 +description: Checking if execution of "do var x=1; var y =2; while (0)" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do var x=1; var y =2; while (0); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T1.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T1.js index 38bc21491b..c3b7b6b390 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T1.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a "do-while" Expression is allowed - * - * @path ch12/12.6/12.6.1/S12.6.1_A14_T1.js - * @description Using FunctionExpression "function __func(){return 0;}" as an Expression - */ +/*--- +info: FunctionExpression within a "do-while" Expression is allowed +es5id: 12.6.1_A14_T1 +description: > + Using FunctionExpression "function __func(){return 0;}" as an + Expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -24,4 +25,3 @@ if (__reached !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T2.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T2.js index 9ae3ad7638..b3b8e9922b 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T2.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A14_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a "do-while" Expression is allowed - * - * @path ch12/12.6/12.6.1/S12.6.1_A14_T2.js - * @description Using FunctionExpression "function __func(){return 0;}()" as an Expression - */ +/*--- +info: FunctionExpression within a "do-while" Expression is allowed +es5id: 12.6.1_A14_T2 +description: > + Using FunctionExpression "function __func(){return 0;}()" as an + Expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -24,4 +25,3 @@ if (__reached !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A15.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A15.js index 65588750c8..198d7b3b93 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A15.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A15.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Block within a "do-while" Expression is not allowed - * - * @path ch12/12.6/12.6.1/S12.6.1_A15.js - * @description Using "{0}" Block as an Expression - * @negative - */ +/*--- +info: Block within a "do-while" Expression is not allowed +es5id: 12.6.1_A15 +description: Using "{0}" Block as an Expression +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -16,4 +15,3 @@ do{ }while({0}); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A2.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A2.js index 023c7d4a28..0c4462a7d8 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A2.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A2.js @@ -1,17 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating "do Statement while ( Expression )", Statement is evaluated first and only after it is done Expression is checked - * - * @path ch12/12.6/12.6.1/S12.6.1_A2.js - * @description Evaluating Statement with error Expression - */ +/*--- +info: > + While evaluating "do Statement while ( Expression )", Statement is + evaluated first and only after it is done Expression is checked +es5id: 12.6.1_A2 +description: Evaluating Statement with error Expression +includes: [Test262Error.js] +---*/ try { do __in__do = "reached"; while (abbracadabra); - $ERROR('#1: \'do __in__do = "reached"; while (abbracadabra)\' lead to throwing exception'); -} catch (e) { + $ERROR('#1: \'do __in__do = "reached"; while (abbracadabra)\' lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } @@ -22,6 +24,3 @@ if (__in__do !== "reached") { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A3.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A3.js index 5f5f0ed690..52adc3c251 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A3.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the production "do Statement while ( Expression )" is evaluated, then (normal, V, empty) is returned - * - * @path ch12/12.6/12.6.1/S12.6.1_A3.js - * @description Using eval "eval("do __in__do=1; while (false)")" - */ +/*--- +info: > + When the production "do Statement while ( Expression )" is evaluated, + then (normal, V, empty) is returned +es5id: 12.6.1_A3 +description: Using eval "eval("do __in__do=1; while (false)")" +---*/ __evaluated = eval("do __in__do=1; while (false)"); @@ -25,4 +26,3 @@ if (__evaluated !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T1.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T1.js index 917afe3293..28eab4f193 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T1.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "do-while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.1/S12.6.1_A4_T1.js - * @description Using "break" within a "do-while" loop - */ +/*--- +info: > + "break" within a "do-while" Statement is allowed and performed as + described in 12.8 +es5id: 12.6.1_A4_T1 +description: Using "break" within a "do-while" loop +---*/ do { __in__do__before__break="reached"; @@ -29,4 +30,3 @@ if (typeof __in__do__after__break !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T2.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T2.js index 72e01a07d9..f489361537 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T2.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "do-while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.1/S12.6.1_A4_T2.js - * @description "break" and VariableDeclaration within a "do-while" statement - */ +/*--- +info: > + "break" within a "do-while" Statement is allowed and performed as + described in 12.8 +es5id: 12.6.1_A4_T2 +description: "\"break\" and VariableDeclaration within a \"do-while\" statement" +---*/ do_out : do { var __in__do__before__break="black"; @@ -25,4 +26,3 @@ if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T3.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T3.js index a6adc08369..90905ccaee 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T3.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "do-while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.1/S12.6.1_A4_T3.js - * @description "break" and VariableDeclaration within a "do-while" statement - */ +/*--- +info: > + "break" within a "do-while" Statement is allowed and performed as + described in 12.8 +es5id: 12.6.1_A4_T3 +description: "\"break\" and VariableDeclaration within a \"do-while\" statement" +---*/ do_out : do { var __in__do__before__break="once"; @@ -25,4 +26,3 @@ if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T4.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T4.js index 52cb23cc95..955fbcfc9f 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T4.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "do-while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.1/S12.6.1_A4_T4.js - * @description "break" and VariableDeclaration within a "do-while" statement - */ +/*--- +info: > + "break" within a "do-while" Statement is allowed and performed as + described in 12.8 +es5id: 12.6.1_A4_T4 +description: "\"break\" and VariableDeclaration within a \"do-while\" statement" +---*/ do_out : do { var __in__do__before__break="reached"; @@ -25,5 +26,3 @@ if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T5.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T5.js index 97f65bf598..6164c9baf2 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T5.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A4_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "do-while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.1/S12.6.1_A4_T5.js - * @description Using labeled "break" in order to continue a loop - */ +/*--- +info: > + "break" within a "do-while" Statement is allowed and performed as + described in 12.8 +es5id: 12.6.1_A4_T5 +description: Using labeled "break" in order to continue a loop +---*/ //CHECK#1 var i=0; @@ -20,4 +21,3 @@ woohoo:{ } while ( true ); if (i!==10) $ERROR('#1.2: i===10. Actual: i==='+ i ); } - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A5.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A5.js index 67bc20de25..5467a9d876 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A5.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * After "do-while" is broken, (normal, V, empty) is returned - * - * @path ch12/12.6/12.6.1/S12.6.1_A5.js - * @description Using eval - */ +/*--- +info: After "do-while" is broken, (normal, V, empty) is returned +es5id: 12.6.1_A5 +description: Using eval +---*/ __evaluated = eval("do {__in__do__before__break=1; break; __in__do__after__break=2;} while(0)"); @@ -33,4 +32,3 @@ if (__evaluated !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T1.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T1.js index 40af77c630..f12b627d1c 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T1.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "do-while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.1/S12.6.1_A6_T1.js - * @description Checking if execution of "do{} while 1" fails - * @negative - */ +/*--- +info: Expression in "do-while" IterationStatement is bracketed with braces +es5id: 12.6.1_A6_T1 +description: Checking if execution of "do{} while 1" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do break; while 1; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T2.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T2.js index 06fb063cae..b4adc61884 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T2.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T2.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "do-while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.1/S12.6.1_A6_T2.js - * @description Checking if execution of "do{} while 0" fails - * @negative - */ +/*--- +info: Expression in "do-while" IterationStatement is bracketed with braces +es5id: 12.6.1_A6_T2 +description: Checking if execution of "do{} while 0" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do break; while 0; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T3.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T3.js index b29c7c83f3..a392a85dc5 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T3.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T3.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "do-while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.1/S12.6.1_A6_T3.js - * @description Checking if execution of "do{}while true" fails - * @negative - */ +/*--- +info: Expression in "do-while" IterationStatement is bracketed with braces +es5id: 12.6.1_A6_T3 +description: Checking if execution of "do{}while true" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do break; while true; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T4.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T4.js index 55b6705065..674fde0de4 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T4.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T4.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "do-while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.1/S12.6.1_A6_T4.js - * @description Checking if execution of "do{}while false" fails - * @negative - */ +/*--- +info: Expression in "do-while" IterationStatement is bracketed with braces +es5id: 12.6.1_A6_T4 +description: Checking if execution of "do{}while false" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do break; while false; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T5.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T5.js index 4b0b062022..d40e36d7c8 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T5.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T5.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "do-while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.1/S12.6.1_A6_T5.js - * @description Checking if execution of "do{}while ''" fails - * @negative - */ +/*--- +info: Expression in "do-while" IterationStatement is bracketed with braces +es5id: 12.6.1_A6_T5 +description: Checking if execution of "do{}while ''" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do break; while ''; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T6.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T6.js index 35e96f41e3..f84325b85c 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T6.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A6_T6.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "do-while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.1/S12.6.1_A6_T6.js - * @description Checking if execution of "do{}while 'hood'" fails - * @negative - */ +/*--- +info: Expression in "do-while" IterationStatement is bracketed with braces +es5id: 12.6.1_A6_T6 +description: Checking if execution of "do{}while 'hood'" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 do break; while 'hood'; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A7.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A7.js index 78ca8c4ec6..b4cc8a457d 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A7.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "do-while" Statement is evaluted according to 12.6.1 and returns (normal, V, empty) - * - * @path ch12/12.6/12.6.1/S12.6.1_A7.js - * @description Using eval - */ +/*--- +info: > + The "do-while" Statement is evaluted according to 12.6.1 and returns + (normal, V, empty) +es5id: 12.6.1_A7 +description: Using eval +---*/ var __condition=0 @@ -27,5 +28,3 @@ if (__evaluated !== 4) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A8.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A8.js index 2f7c7e742e..144f002784 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A8.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "continue" statement within a "do-while" Statement is allowed - * - * @path ch12/12.6/12.6.1/S12.6.1_A8.js - * @description Using eval - */ +/*--- +info: "\"continue\" statement within a \"do-while\" Statement is allowed" +es5id: 12.6.1_A8 +description: Using eval +---*/ var __condition = 0, __odds=0; @@ -27,5 +26,3 @@ if (__evaluated !== 4) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.1/S12.6.1_A9.js b/test/suite/ch12/12.6/12.6.1/S12.6.1_A9.js index e9e831b073..1d399a7066 100644 --- a/test/suite/ch12/12.6/12.6.1/S12.6.1_A9.js +++ b/test/suite/ch12/12.6/12.6.1/S12.6.1_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "do-while" Statement is evaluated without syntax checks - * - * @path ch12/12.6/12.6.1/S12.6.1_A9.js - * @description Throwing system exception whithin a "do-while" loop - */ +/*--- +info: "\"do-while\" Statement is evaluated without syntax checks" +es5id: 12.6.1_A9 +description: Throwing system exception whithin a "do-while" loop +includes: [Test262Error.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,9 +15,9 @@ try { var x = 1; abaracadabara; } while(0); - $ERROR('#1: "abbracadabra" lead to throwing exception'); - -} catch (e) { + $ERROR('#1: "abbracadabra" lead to throwing exception'); + +} catch (e) { if (e instanceof Test262Error) throw e; } @@ -26,4 +26,3 @@ if (x !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A1.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A1.js index cb7fff7222..02bbc10dbe 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A1.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression from "while" IterationStatement is evaluated first; "false", "0", "null", "undefined" and "empty" strings used as the Expression are evaluated to "false" - * - * @path ch12/12.6/12.6.2/S12.6.2_A1.js - * @description Evaluating various Expressions - */ +/*--- +info: > + Expression from "while" IterationStatement is evaluated first; "false", + "0", "null", "undefined" and "empty" strings used as the Expression are + evaluated to "false" +es5id: 12.6.2_A1 +description: Evaluating various Expressions +---*/ var __in__do; @@ -59,4 +61,3 @@ if (__in__do !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A10.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A10.js index 9a05fe3172..f0424d46d5 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A10.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a "while" IterationStatement is allowed, but no function with the given name will appear in the global context - * - * @path ch12/12.6/12.6.2/S12.6.2_A10.js - * @description Testing FunctionExpression too - */ +/*--- +info: > + FunctionExpression within a "while" IterationStatement is allowed, but no + function with the given name will appear in the global context +es5id: 12.6.2_A10 +description: Testing FunctionExpression too +---*/ var check=0; while(function f(){}){ @@ -26,4 +27,3 @@ if (check !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A11.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A11.js index 6ff4c779c8..9063b1fc2b 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A11.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "{}" Block within a "while" Expression is evaluated to true - * - * @path ch12/12.6/12.6.2/S12.6.2_A11.js - * @description Checking if execution of "while({}){}" passes - */ +/*--- +info: "\"{}\" Block within a \"while\" Expression is evaluated to true" +es5id: 12.6.2_A11 +description: Checking if execution of "while({}){}" passes +---*/ while({}){ var __in__do=1; @@ -20,4 +19,3 @@ if (__in__do !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T1.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T1.js index f27b9df262..88ef24773b 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T1.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a "while" Expression is allowed - * - * @path ch12/12.6/12.6.2/S12.6.2_A14_T1.js - * @description Using "function __func(){return 0;}" as an Expression - */ +/*--- +info: FunctionExpression within a "while" Expression is allowed +es5id: 12.6.2_A14_T1 +description: Using "function __func(){return 0;}" as an Expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -24,4 +23,3 @@ if (__reached !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T2.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T2.js index cd867ea973..24bc86b247 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T2.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A14_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a "while" Expression is allowed - * - * @path ch12/12.6/12.6.2/S12.6.2_A14_T2.js - * @description Using function call as an Expression - */ +/*--- +info: FunctionExpression within a "while" Expression is allowed +es5id: 12.6.2_A14_T2 +description: Using function call as an Expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -24,4 +23,3 @@ if (__reached !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A15.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A15.js index e1e231dd4c..0ec17b53d1 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A15.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A15.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Block within a "while" Expression is not allowed - * - * @path ch12/12.6/12.6.2/S12.6.2_A15.js - * @description Expression is "{0}" - * @negative - */ +/*--- +info: Block within a "while" Expression is not allowed +es5id: 12.6.2_A15 +description: Expression is "{0}" +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -16,4 +15,3 @@ while({1}){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A2.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A2.js index e3994d4749..642869614c 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A2.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating The production IterationStatement: "while ( Expression ) Statement", Expression is evaluated first - * - * @path ch12/12.6/12.6.2/S12.6.2_A2.js - * @description Evaluating Statement with error Expression - */ +/*--- +info: > + While evaluating The production IterationStatement: "while ( Expression ) + Statement", Expression is evaluated first +es5id: 12.6.2_A2 +description: Evaluating Statement with error Expression +---*/ try { while ((function(){throw 1})()) __in__while = "reached"; @@ -24,6 +25,3 @@ if (typeof __in__while !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A3.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A3.js index ec8934e8e4..e1cc457fd0 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A3.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "while" IterationStatement is evaluated, (normal, V, empty) is returned - * - * @path ch12/12.6/12.6.2/S12.6.2_A3.js - * @description Using eval - */ +/*--- +info: > + When "while" IterationStatement is evaluated, (normal, V, empty) is + returned +es5id: 12.6.2_A3 +description: Using eval +---*/ var __in__do; @@ -27,4 +28,3 @@ if (__evaluated !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T1.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T1.js index 5e20d53ba2..07d8d4f523 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T1.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.2/S12.6.2_A4_T1.js - * @description "break" within a "while" Statement - */ +/*--- +info: > + "break" within a "while" Statement is allowed and performed as described + in 12.8 +es5id: 12.6.2_A4_T1 +description: "\"break\" within a \"while\" Statement" +---*/ while(1===1){ __in__do__before__break="reached"; @@ -29,4 +30,3 @@ if (typeof __in__do__after__break !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T2.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T2.js index 616145c020..76f7dcb92a 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T2.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.2/S12.6.2_A4_T2.js - * @description "break" and VariableDeclaration within a "while" Statement - */ +/*--- +info: > + "break" within a "while" Statement is allowed and performed as described + in 12.8 +es5id: 12.6.2_A4_T2 +description: "\"break\" and VariableDeclaration within a \"while\" Statement" +---*/ do_out : while(1===1) { if (__in__do__before__break) break; @@ -26,4 +27,3 @@ if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T3.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T3.js index a86e957051..09116572f7 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T3.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.2/S12.6.2_A4_T3.js - * @description "break" and VariableDeclaration within a "while" Statement - */ +/*--- +info: > + "break" within a "while" Statement is allowed and performed as described + in 12.8 +es5id: 12.6.2_A4_T3 +description: "\"break\" and VariableDeclaration within a \"while\" Statement" +---*/ do_out : while(1===1) { if (__in__do__before__break) break; @@ -26,4 +27,3 @@ if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T4.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T4.js index 4dc75f1375..7eb0b4fcb0 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T4.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.2/S12.6.2_A4_T4.js - * @description "break" and VariableDeclaration within a "while" Statement - */ +/*--- +info: > + "break" within a "while" Statement is allowed and performed as described + in 12.8 +es5id: 12.6.2_A4_T4 +description: "\"break\" and VariableDeclaration within a \"while\" Statement" +---*/ do_out : while(1===1) { if(__in__do__before__break)break; @@ -26,5 +27,3 @@ if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T5.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T5.js index 46e5b95c7a..292675b46c 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T5.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A4_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "break" within a "while" Statement is allowed and performed as described in 12.8 - * - * @path ch12/12.6/12.6.2/S12.6.2_A4_T5.js - * @description Using labeled "break" in order to continue a "while" loop - */ +/*--- +info: > + "break" within a "while" Statement is allowed and performed as described + in 12.8 +es5id: 12.6.2_A4_T5 +description: Using labeled "break" in order to continue a "while" loop +---*/ //CHECK#1 var i=0; @@ -20,4 +21,3 @@ woohoo:{ } if (i!==10) $ERROR('#1.2: i===10. Actual: i==='+ i ); } - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A5.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A5.js index 899837466e..fa1b130185 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A5.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While using "while" within an eval statement, source "break" is allowed and (normal, V, empty) is returned - * - * @path ch12/12.6/12.6.2/S12.6.2_A5.js - * @description Using eval - */ +/*--- +info: > + While using "while" within an eval statement, source "break" is allowed + and (normal, V, empty) is returned +es5id: 12.6.2_A5 +description: Using eval +---*/ __evaluated = eval("while(1) {__in__do__before__break=1; break; __in__do__after__break=2;}"); @@ -33,4 +34,3 @@ if (__evaluated !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T1.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T1.js index f9a4e97448..d5b8a897db 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T1.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.2/S12.6.2_A6_T1.js - * @description Checking if execution of "while 1 break" fails - * @negative - */ +/*--- +info: Expression in "while" IterationStatement is bracketed with braces +es5id: 12.6.2_A6_T1 +description: Checking if execution of "while 1 break" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 while 1 break; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T2.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T2.js index b7f61b8b4f..0d611b50e8 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T2.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T2.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.2/S12.6.2_A6_T2.js - * @description Checking if execution of "while 0 break" fails - * @negative - */ +/*--- +info: Expression in "while" IterationStatement is bracketed with braces +es5id: 12.6.2_A6_T2 +description: Checking if execution of "while 0 break" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 while 0 break; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T3.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T3.js index 4b0eaea035..6a7ab5475c 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T3.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T3.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.2/S12.6.2_A6_T3.js - * @description Checking if execution of "while true break" fails - * @negative - */ +/*--- +info: Expression in "while" IterationStatement is bracketed with braces +es5id: 12.6.2_A6_T3 +description: Checking if execution of "while true break" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 while true break; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T4.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T4.js index 8d17ce8f16..5534501bbd 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T4.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T4.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.2/S12.6.2_A6_T4.js - * @description Checking if execution of "while false break" fails - * @negative - */ +/*--- +info: Expression in "while" IterationStatement is bracketed with braces +es5id: 12.6.2_A6_T4 +description: Checking if execution of "while false break" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 while false break; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T5.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T5.js index e1b6777419..403bb69924 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T5.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T5.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.2/S12.6.2_A6_T5.js - * @description Checking if execution of "while '' break" fails - * @negative - */ +/*--- +info: Expression in "while" IterationStatement is bracketed with braces +es5id: 12.6.2_A6_T5 +description: Checking if execution of "while '' break" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 while '' break; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T6.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T6.js index 78ce3abdb5..7996d422c3 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T6.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A6_T6.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Expression in "while" IterationStatement is bracketed with braces - * - * @path ch12/12.6/12.6.2/S12.6.2_A6_T6.js - * @description Checking if execution of "while 'hood' break" fails - * @negative - */ +/*--- +info: Expression in "while" IterationStatement is bracketed with braces +es5id: 12.6.2_A6_T6 +description: Checking if execution of "while 'hood' break" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 while 'hood' break; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A7.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A7.js index 5743cd6d4e..d5bd119315 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A7.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "while" Statement is evaluted according to 12.6.2 and returns (normal, V, empty) - * - * @path ch12/12.6/12.6.2/S12.6.2_A7.js - * @description using eval - */ +/*--- +info: > + The "while" Statement is evaluted according to 12.6.2 and returns + (normal, V, empty) +es5id: 12.6.2_A7 +description: using eval +---*/ var __condition=0 @@ -27,5 +28,3 @@ if (__evaluated !== 4) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A8.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A8.js index a5af5748db..858e8ba5ab 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A8.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "continue" statement within a "while" Statement is allowed - * - * @path ch12/12.6/12.6.2/S12.6.2_A8.js - * @description using eval - */ +/*--- +info: "\"continue\" statement within a \"while\" Statement is allowed" +es5id: 12.6.2_A8 +description: using eval +---*/ var __condition = 0, __odds=0; @@ -27,5 +26,3 @@ if (__evaluated !== 4) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.2/S12.6.2_A9.js b/test/suite/ch12/12.6/12.6.2/S12.6.2_A9.js index f8cbed0a16..e1feedfbff 100644 --- a/test/suite/ch12/12.6/12.6.2/S12.6.2_A9.js +++ b/test/suite/ch12/12.6/12.6.2/S12.6.2_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "while" Statement is evaluated without syntax checks - * - * @path ch12/12.6/12.6.2/S12.6.2_A9.js - * @description Throwing system exception inside "while" loop - */ +/*--- +info: "\"while\" Statement is evaluated without syntax checks" +es5id: 12.6.2_A9 +description: Throwing system exception inside "while" loop +includes: [Test262Error.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,9 +15,9 @@ try { var x = 1; abaracadabara; }; - $ERROR('#1: "abbracadabra" lead to throwing exception'); - -} catch (e) { + $ERROR('#1: "abbracadabra" lead to throwing exception'); + +} catch (e) { if (e instanceof Test262Error) throw e; } @@ -26,4 +26,3 @@ if (x !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-1.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-1.js index a0aa031566..91d3878d3f 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-1.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-1.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is an Object with value false - */ - - -function testcase() { - var accessed = false; - var obj = { value: false }; - for (var i = 0; obj; ) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-1 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is an Object with value false +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj = { value: false }; + for (var i = 0; obj; ) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-10.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-10.js index cc1cb63d68..1972c9f975 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-10.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-10.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-10.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is '1') - */ - - -function testcase() { - var accessed = false; - var strObj = new String("1"); - for (var i = 0; strObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-10 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a String object (value is '1') +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var strObj = new String("1"); + for (var i = 0; strObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-11.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-11.js index 2bccf56df9..7340922d04 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-11.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-11.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-11.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is undefined - */ - - -function testcase() { - var count = 0; - for (var i = 0; undefined;) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-11 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; undefined;) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-12.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-12.js index 6698b966b3..fa85f08d5b 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-12.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-12.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-12.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is null - */ - - -function testcase() { - var count = 0; - for (var i = 0; null;) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-12 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is null +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; null;) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-13.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-13.js index 4e7d393331..2ae5fd1ce7 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-13.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-13.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-13.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a boolean (value is false) - */ - - -function testcase() { - var count = 0; - for (var i = 0; false;) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-13 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a boolean (value is false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; false;) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-14.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-14.js index 865f68d77c..a5573b3d56 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-14.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-14.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-14.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is NaN) - */ - - -function testcase() { - var count = 0; - for (var i = 0; NaN;) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-14 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a number (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; NaN;) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-15.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-15.js index 8f85811f3d..1f231292da 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-15.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-15.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-15.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is +0) - */ - - -function testcase() { - var count = 0; - for (var i = 0; +0;) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-15 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a number (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; +0;) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-16.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-16.js index 20d03326e6..97eaad0ec6 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-16.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-16.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-16.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is -0) - */ - - -function testcase() { - var count = 0; - for (var i = 0; -0;) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-16 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a number (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; -0;) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-17.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-17.js index faca415663..2c6287c339 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-17.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-17.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-17.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is a positive) - */ - - -function testcase() { - var accessed = false; - for (var i = 0; 2;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-17 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a number (value is a positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + for (var i = 0; 2;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-18.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-18.js index 8fc6251def..21b9311a9c 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-18.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-18.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-18.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is empty string) - */ - - -function testcase() { - var count = 0; - for (var i = 0; "";) { - count++; - } - return count === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-18 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a string (value is empty string) +includes: [runTestCase.js] +---*/ + +function testcase() { + var count = 0; + for (var i = 0; "";) { + count++; + } + return count === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-19.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-19.js index 19dc79e058..61b118b6ca 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-19.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-19.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-19.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is 'undefined') - */ - - -function testcase() { - var accessed = false; - for (var i = 0; "undefined";) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-19 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a string (value is 'undefined') +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + for (var i = 0; "undefined";) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-2.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-2.js index eaf600c6e1..dc68228120 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-2.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-2.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a Boolean object - */ - - -function testcase() { - var accessed = false; - var boolObj = new Boolean(false); - for (var i = 0; boolObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-2 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var boolObj = new Boolean(false); + for (var i = 0; boolObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-20.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-20.js index 6c8e61c592..0fe526704c 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-20.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-20.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-20.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is 'null') - */ - - -function testcase() { - var accessed = false; - for (var i = 0; "null";) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-20 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a string (value is 'null') +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + for (var i = 0; "null";) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-21.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-21.js index d83bd0b188..93255da2cf 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-21.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-21.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-21.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is '1') - */ - - -function testcase() { - var accessed = false; - for (var i = 0; "1";) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-21 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a string (value is '1') +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + for (var i = 0; "1";) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-3.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-3.js index 76f27f8bd7..ed7d474dff 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-3.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-3.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is NaN) - */ - - -function testcase() { - var accessed = false; - var numObj = new Number(NaN); - for (var i = 0; numObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-3 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a Number object (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var numObj = new Number(NaN); + for (var i = 0; numObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-4.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-4.js index 81599d37b5..4cc51863b9 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-4.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-4.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is +0) - */ - - -function testcase() { - var accessed = false; - var numObj = new Number(+0); - for (var i = 0; numObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-4 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a Number object (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var numObj = new Number(+0); + for (var i = 0; numObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-5.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-5.js index 5a31999478..25d92e1dd7 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-5.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-5.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-5.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is -0) - */ - - -function testcase() { - var accessed = false; - var numObj = new Number(-0); - for (var i = 0; numObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-5 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a Number object (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var numObj = new Number(-0); + for (var i = 0; numObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-6.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-6.js index 6f8ed9cd37..2d86494d99 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-6.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-6.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-6.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is a positive) - */ - - -function testcase() { - var accessed = false; - var numObj = new Number(12); - for (var i = 0; numObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-6 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a Number object (value is a positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var numObj = new Number(12); + for (var i = 0; numObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-7.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-7.js index 920911c94e..70bd4c38c8 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-7.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-7.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is empty string) - */ - - -function testcase() { - var accessed = false; - var strObj = new String(""); - for (var i = 0; strObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-7 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a String object (value is empty string) +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var strObj = new String(""); + for (var i = 0; strObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-8.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-8.js index f087aa2070..93a5a654bf 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-8.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-8.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-8.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is 'undefined') - */ - - -function testcase() { - var accessed = false; - var strObj = new String("undefined"); - for (var i = 0; strObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-8 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a String object (value is 'undefined') +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var strObj = new String("undefined"); + for (var i = 0; strObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-9.js b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-9.js index 45ed58923f..65948b6548 100644 --- a/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-9.js +++ b/test/suite/ch12/12.6/12.6.3/12.6.3_2-3-a-ii-9.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 12.6.3; - * The production - * IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement - * is evaluated as follows: - * - * @path ch12/12.6/12.6.3/12.6.3_2-3-a-ii-9.js - * @description The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is 'null') - */ - - -function testcase() { - var accessed = false; - var strObj = new String("null"); - for (var i = 0; strObj;) { - accessed = true; - break; - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 12.6.3; + The production + IterationStatement : for ( var VariableDeclarationListNoIn ; Expressionopt ; Expressionopt ) Statement + is evaluated as follows: +es5id: 12.6.3_2-3-a-ii-9 +description: > + The for Statement - (normal, V, empty) will be returned when first + Expression is a String object (value is 'null') +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var strObj = new String("null"); + for (var i = 0; strObj;) { + accessed = true; + break; + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A1.js index dd200559c5..8bc9ef7e91 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "for {;;}" for Statement with empty expressions is allowed and leads to performing an infinite loop - * - * @path ch12/12.6/12.6.3/S12.6.3_A1.js - * @description Breaking an infinite loop by throwing exception - */ +/*--- +info: > + The "for {;;}" for Statement with empty expressions is allowed and leads + to performing an infinite loop +es5id: 12.6.3_A1 +description: Breaking an infinite loop by throwing exception +---*/ var __in__for = 0; @@ -32,5 +33,3 @@ if (__in__for !== 101) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.1.js index 13bfc59fff..8d74ca271b 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Nested "var-loops" nine blocks depth is evaluated properly - * - * @path ch12/12.6/12.6.3/S12.6.3_A10.1.js - * @description Checking if executing nested "var-loops" nine blocks depth is evaluated properly - */ +/*--- +info: Nested "var-loops" nine blocks depth is evaluated properly +es5id: 12.6.3_A10.1 +description: > + Checking if executing nested "var-loops" nine blocks depth is + evaluated properly +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -108,4 +109,3 @@ if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.js index fb17b0b2c5..d2c7903dac 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Nested "var-loops" nine blocks depth is evaluated properly - * - * @path ch12/12.6/12.6.3/S12.6.3_A10.js - * @description Checking if executing nested "var-loops" nine blocks depth is evaluated properly - */ +/*--- +info: Nested "var-loops" nine blocks depth is evaluated properly +es5id: 12.6.3_A10 +description: > + Checking if executing nested "var-loops" nine blocks depth is + evaluated properly +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -48,4 +49,3 @@ if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T1.js index d050b3dbc0..298c208dfc 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "continue" and (Evaluate Statement).target is in the current label set, iteration of labeled "var-loop" breaks - * - * @path ch12/12.6/12.6.3/S12.6.3_A11.1_T1.js - * @description Using "continue" in order to continue a loop - */ +/*--- +info: > + If (Evaluate Statement).type is "continue" and (Evaluate + Statement).target is in the current label set, iteration of labeled + "var-loop" breaks +es5id: 12.6.3_A11.1_T1 +description: Using "continue" in order to continue a loop +---*/ __str="" @@ -18,4 +20,3 @@ for(var index=0; index<10; index+=1) { if (__str!=="56789") { $ERROR('#1: __str === "56789". Actual: __str ==='+ __str ); } - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T2.js index cc0233d418..2e448389f2 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "continue" and (Evaluate Statement).target is in the current label set, iteration of labeled "var-loop" breaks - * - * @path ch12/12.6/12.6.3/S12.6.3_A11.1_T2.js - * @description Embedded loops - */ +/*--- +info: > + If (Evaluate Statement).type is "continue" and (Evaluate + Statement).target is in the current label set, iteration of labeled + "var-loop" breaks +es5id: 12.6.3_A11.1_T2 +description: Embedded loops +---*/ __str=""; @@ -57,7 +59,3 @@ if (__str !== "001011202122303133") { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T3.js index d02abf2928..67a98b22bc 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11.1_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "continue" and (Evaluate Statement).target is in the current label set, iteration of labeled "var-loop" breaks - * - * @path ch12/12.6/12.6.3/S12.6.3_A11.1_T3.js - * @description Trying to continue non-existent label - * @negative - */ +/*--- +info: > + If (Evaluate Statement).type is "continue" and (Evaluate + Statement).target is in the current label set, iteration of labeled + "var-loop" breaks +es5id: 12.6.3_A11.1_T3 +description: Trying to continue non-existent label +flags: [negative] +---*/ __str=""; @@ -21,7 +23,3 @@ outer:for(var index=0;index<4;index+=1){ } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T1.js index 192f1ebd52..9295466669 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "continue" and (Evaluate Statement).target is in the current label set, iteration of labeled loop breaks - * - * @path ch12/12.6/12.6.3/S12.6.3_A11_T1.js - * @description Simple test of continue loop with using "continue" - */ +/*--- +info: > + If (Evaluate Statement).type is "continue" and (Evaluate + Statement).target is in the current label set, iteration of labeled loop + breaks +es5id: 12.6.3_A11_T1 +description: Simple test of continue loop with using "continue" +---*/ __str="" @@ -18,4 +20,3 @@ for(index=0; index<10; index+=1) { if (__str!=="56789") { $ERROR('#1: __str === "56789". Actual: __str ==='+ __str ); } - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T2.js index cdc606b5c2..b24ede0206 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "continue" and (Evaluate Statement).target is in the current label set, iteration of labeled loop breaks - * - * @path ch12/12.6/12.6.3/S12.6.3_A11_T2.js - * @description Embedded loops - */ +/*--- +info: > + If (Evaluate Statement).type is "continue" and (Evaluate + Statement).target is in the current label set, iteration of labeled loop + breaks +es5id: 12.6.3_A11_T2 +description: Embedded loops +---*/ __str=""; @@ -57,7 +59,3 @@ if (__str !== "001011202122303133") { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T3.js index 2807bc86ff..a8b6ca9c26 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A11_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "continue" and (Evaluate Statement).target is in the current label set, iteration of labeled loop breaks - * - * @path ch12/12.6/12.6.3/S12.6.3_A11_T3.js - * @description Trying to continue non-existent label - * @negative - */ +/*--- +info: > + If (Evaluate Statement).type is "continue" and (Evaluate + Statement).target is in the current label set, iteration of labeled loop + breaks +es5id: 12.6.3_A11_T3 +description: Trying to continue non-existent label +flags: [negative] +---*/ __str=""; @@ -21,7 +23,3 @@ outer:for(index=0;index<4;index+=1){ } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T1.js index 48fc3b30c1..835555b4a4 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "break" and (Evaluate Statement).target is in the current label set, (normal, (Evaluate Statement), empty) is returned while evaluating a "var-loop" - * - * @path ch12/12.6/12.6.3/S12.6.3_A12.1_T1.js - * @description Breaking a loop with "break" - */ +/*--- +info: > + If (Evaluate Statement).type is "break" and (Evaluate Statement).target + is in the current label set, (normal, (Evaluate Statement), empty) is + returned while evaluating a "var-loop" +es5id: 12.6.3_A12.1_T1 +description: Breaking a loop with "break" +---*/ __str="" @@ -18,4 +20,3 @@ for(var index=0; index<10; index+=1) { if (__str!=="012345") { $ERROR('#1: __str === "012345". Actual: __str ==='+ __str ); } - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T2.js index 939fd991d7..9acae6ba19 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "break" and (Evaluate Statement).target is in the current label set, (normal, (Evaluate Statement), empty) is returned while evaluating a "var-loop" - * - * @path ch12/12.6/12.6.3/S12.6.3_A12.1_T2.js - * @description Embedded loops - */ +/*--- +info: > + If (Evaluate Statement).type is "break" and (Evaluate Statement).target + is in the current label set, (normal, (Evaluate Statement), empty) is + returned while evaluating a "var-loop" +es5id: 12.6.3_A12.1_T2 +description: Embedded loops +---*/ __str=""; @@ -58,7 +60,3 @@ if (__str !== "00101120213031") { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T3.js index 96a5accd9c..467305186d 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12.1_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "break" and (Evaluate Statement).target is in the current label set, (normal, (Evaluate Statement), empty) is returned while evaluating a "var-loop" - * - * @path ch12/12.6/12.6.3/S12.6.3_A12.1_T3.js - * @description Trying to break non-existent label - * @negative - */ +/*--- +info: > + If (Evaluate Statement).type is "break" and (Evaluate Statement).target + is in the current label set, (normal, (Evaluate Statement), empty) is + returned while evaluating a "var-loop" +es5id: 12.6.3_A12.1_T3 +description: Trying to break non-existent label +flags: [negative] +---*/ __str=""; @@ -21,4 +23,3 @@ outer:for(var index=0;index<4;index+=1){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T1.js index 55031321d0..10b3eff3b0 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "break" and (Evaluate Statement).target is in the current label set, (normal, (Evaluate Statement), empty) is returned while evaluating a loop - * - * @path ch12/12.6/12.6.3/S12.6.3_A12_T1.js - * @description Breaking a loop with "break" - */ +/*--- +info: > + If (Evaluate Statement).type is "break" and (Evaluate Statement).target + is in the current label set, (normal, (Evaluate Statement), empty) is + returned while evaluating a loop +es5id: 12.6.3_A12_T1 +description: Breaking a loop with "break" +---*/ __str="" @@ -18,4 +20,3 @@ for(index=0; index<10; index+=1) { if (__str!=="012345") { $ERROR('#1:__str === "012345". Actual: __str ==='+__str ); } - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T2.js index e97dc7da3e..f1c412cbd7 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "break" and (Evaluate Statement).target is in the current label set, (normal, (Evaluate Statement), empty) is returned while evaluating a loop - * - * @path ch12/12.6/12.6.3/S12.6.3_A12_T2.js - * @description Embedded loops - */ +/*--- +info: > + If (Evaluate Statement).type is "break" and (Evaluate Statement).target + is in the current label set, (normal, (Evaluate Statement), empty) is + returned while evaluating a loop +es5id: 12.6.3_A12_T2 +description: Embedded loops +---*/ __str=""; @@ -58,7 +60,3 @@ if (__str !== "00101120213031") { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T3.js index 67fd236cd3..022e9318d7 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A12_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If (Evaluate Statement).type is "break" and (Evaluate Statement).target is in the current label set, (normal, (Evaluate Statement), empty) is returned while evaluating a loop - * - * @path ch12/12.6/12.6.3/S12.6.3_A12_T3.js - * @description Trying to break non-existent label - * @negative - */ +/*--- +info: > + If (Evaluate Statement).type is "break" and (Evaluate Statement).target + is in the current label set, (normal, (Evaluate Statement), empty) is + returned while evaluating a loop +es5id: 12.6.3_A12_T3 +description: Trying to break non-existent label +flags: [negative] +---*/ __str=""; @@ -21,7 +23,3 @@ outer:for(index=0;index<4;index+=1){ }; // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A13.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A13.js index 452902537e..e034c96e20 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A13.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * VariableDeclaration in "var VariableDeclarationListNoIn" of for IterationStatement is allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A13.js - * @description Declaring variable in "for" ExpressionNoIn - */ +/*--- +info: > + VariableDeclaration in "var VariableDeclarationListNoIn" of for + IterationStatement is allowed +es5id: 12.6.3_A13 +description: Declaring variable in "for" ExpressionNoIn +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -22,4 +23,3 @@ try { for(var index=0; index<6; index++) { ; } - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A14.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A14.js index 182482dd92..a7c20642e9 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A14.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A14.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationListNoIn; Expression; Expression) Statement" - * - * @path ch12/12.6/12.6.3/S12.6.3_A14.js - * @description Using +,*,/, as the second Expression - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationListNoIn; + Expression; Expression) Statement" +es5id: 12.6.3_A14 +description: Using +,*,/, as the second Expression +---*/ //CHECK#1 for(var i=0;i<10;i++){} @@ -43,4 +44,3 @@ for(var i=2;i<10;i*=i){ } if (i!==16) $ERROR('#5.1: i === 16. Actual: i ==='+ i ); if (j!==2) $ERROR('#5.2: j === 2. Actual: j ==='+ j ); - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A15.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A15.js index 4ec6147b9e..9dbaaa2360 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A15.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationListNoIn; Expression; Expression) Statement" - * - * @path ch12/12.6/12.6.3/S12.6.3_A15.js - * @description Statement must be evaluated before second Expression is evaluated - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationListNoIn; + Expression; Expression) Statement" +es5id: 12.6.3_A15 +description: Statement must be evaluated before second Expression is evaluated +---*/ //CHECK#1 for(var i=0;i<10;i++){ @@ -20,5 +21,3 @@ for(var i=0;i<10;i++){ i*=2; if (i===3) $ERROR('#2: i !== 3'); } - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.1.js index 78372a2d7e..76540e9490 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating "for (ExpressionNoIn ; ; Expression) Statement", Statement is evaulated first - * - * @path ch12/12.6/12.6.3/S12.6.3_A2.1.js - * @description Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn - */ +/*--- +info: > + While evaluating "for (ExpressionNoIn ; ; Expression) Statement", + Statement is evaulated first +es5id: 12.6.3_A2.1 +description: Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -22,4 +23,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.2.js index f6391e2f7b..c02d6c77d9 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating "for (ExpressionNoIn;;) Statement", Statement is evaulated first - * - * @path ch12/12.6/12.6.3/S12.6.3_A2.2.js - * @description Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn - */ +/*--- +info: > + While evaluating "for (ExpressionNoIn;;) Statement", Statement is + evaulated first +es5id: 12.6.3_A2.2 +description: Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -22,4 +23,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.js index 86718d9d15..1b0d7d864e 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating "for (ExpressionNoIn; Expression; Expression) Statement", ExpressionNoIn is evaulated first - * - * @path ch12/12.6/12.6.3/S12.6.3_A2.js - * @description Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn - */ +/*--- +info: > + While evaluating "for (ExpressionNoIn; Expression; Expression) + Statement", ExpressionNoIn is evaulated first +es5id: 12.6.3_A2 +description: Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -30,4 +31,3 @@ if (in_for !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A3.js index 2c46dbfbb8..20653fc282 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating "for (ExpressionNoIn; FirstExpression; SecondExpression) Statement", ExpressionNoIn is evaulated first, FirstExpressoin is evaluated second - * - * @path ch12/12.6/12.6.3/S12.6.3_A3.js - * @description Using "(function(){throw "FirstExpression"})()" as FirstExpression - */ +/*--- +info: > + While evaluating "for (ExpressionNoIn; FirstExpression; SecondExpression) + Statement", ExpressionNoIn is evaulated first, FirstExpressoin is + evaluated second +es5id: 12.6.3_A3 +description: Using "(function(){throw "FirstExpression"})()" as FirstExpression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -38,4 +40,3 @@ if (typeof __in__for !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A4.1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A4.1.js index a649352745..4fff7bdc71 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A4.1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A4.1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "in"-expression is not allowed as a ExpressionNoIn in "for (ExpressionNoIn; FirstExpression; SecondExpression) Statement" IterationStatement - * - * @path ch12/12.6/12.6.3/S12.6.3_A4.1.js - * @description Checking if execution of "for (var a in arr;1;){}" fails - * @negative - */ +/*--- +info: > + "in"-expression is not allowed as a ExpressionNoIn in "for + (ExpressionNoIn; FirstExpression; SecondExpression) Statement" + IterationStatement +es5id: 12.6.3_A4.1 +description: Checking if execution of "for (var a in arr;1;){}" fails +flags: [negative] +---*/ arr = [1,2,3,4,5]; @@ -18,5 +20,3 @@ for (var a in arr;1;){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T1.js index 48e56c4b14..6a8945f26d 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "in"-expression is not allowed as a ExpressionNoIn in "for (ExpressionNoIn; FirstExpression; SecondExpression) Statement" IterationStatement - * - * @path ch12/12.6/12.6.3/S12.6.3_A4_T1.js - * @description Checking if execution of "for (a in arr;1;){}" fails - * @negative - */ +/*--- +info: > + "in"-expression is not allowed as a ExpressionNoIn in "for + (ExpressionNoIn; FirstExpression; SecondExpression) Statement" + IterationStatement +es5id: 12.6.3_A4_T1 +description: Checking if execution of "for (a in arr;1;){}" fails +flags: [negative] +---*/ arr = [1,2,3,4,5]; @@ -18,5 +20,3 @@ for (a in arr;1;){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T2.js index 2a292a8089..f2116de452 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A4_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "in"-expression is not allowed as a ExpressionNoIn in "for (ExpressionNoIn; FirstExpression; SecondExpression) Statement" IterationStatement - * - * @path ch12/12.6/12.6.3/S12.6.3_A4_T2.js - * @description Checking if execution of "for (1 in arr;1;){}" fails - * @negative - */ +/*--- +info: > + "in"-expression is not allowed as a ExpressionNoIn in "for + (ExpressionNoIn; FirstExpression; SecondExpression) Statement" + IterationStatement +es5id: 12.6.3_A4_T2 +description: Checking if execution of "for (1 in arr;1;){}" fails +flags: [negative] +---*/ arr = [1,2,3,4,5]; @@ -18,5 +20,3 @@ for(1 in arr;1;) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A5.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A5.js index 6cab0f017a..41c7876a53 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A5.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "in"-expression wrapped into "eval" statement is allowed as a ExpressionNoIn in "for (ExpressionNoIn; FirstExpression; SecondExpression) Statement" IterationStatement - * - * @path ch12/12.6/12.6.3/S12.6.3_A5.js - * @description Using eval "for(eval("i in arr");1;)" - */ +/*--- +info: > + "in"-expression wrapped into "eval" statement is allowed as a + ExpressionNoIn in "for (ExpressionNoIn; FirstExpression; + SecondExpression) Statement" IterationStatement +es5id: 12.6.3_A5 +description: Using eval "for(eval("i in arr");1;)" +---*/ arr = [1,2,3,4,5]; i = 1; @@ -39,4 +41,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A6.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A6.js index 1dfd5b4575..b17caae6a5 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A6.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * While evaluating "for ( ; ; Expression) Statement", Statement is evaluated first and then Expression is evaluated - * - * @path ch12/12.6/12.6.3/S12.6.3_A6.js - * @description Using "(function(){throw "SecondExpression";})()" as an Expression - */ +/*--- +info: > + While evaluating "for ( ; ; Expression) Statement", Statement is + evaluated first and then Expression is evaluated +es5id: 12.6.3_A6 +description: Using "(function(){throw "SecondExpression";})()" as an Expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -30,4 +31,3 @@ if (__in__for !== "reached") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T1.js index f8b2fdbd06..8646600c66 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T1.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only three expressions and two semicolons in "for(with var)" braces are allowed. - * Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError - * - * @path ch12/12.6/12.6.3/S12.6.3_A7.1_T1.js - * @description Checking if execution of "for(var index=0; index<10; index++; index--)" fails - * @negative - */ +/*--- +info: > + Only three expressions and two semicolons in "for(with var)" braces are allowed. + Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError +es5id: 12.6.3_A7.1_T1 +description: > + Checking if execution of "for(var index=0; index<10; index++; + index--)" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 for(var index=0; index<10; index++; index--); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T2.js index 550b14b19f..cad7077293 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7.1_T2.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only three expressions and two semicolons in "for(with var)" braces are allowed. - * Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError - * - * @path ch12/12.6/12.6.3/S12.6.3_A7.1_T2.js - * @description Checking if execution of "for(var index=0; index<10; index+=4; index++; index--)" fails - * @negative - */ +/*--- +info: > + Only three expressions and two semicolons in "for(with var)" braces are allowed. + Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError +es5id: 12.6.3_A7.1_T2 +description: > + Checking if execution of "for(var index=0; index<10; index+=4; + index++; index--)" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 for(var index=0; index<10; index+=4; index++; index--) ; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T1.js index 39dcc1c6a5..b4e47a486a 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T1.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only three expressions and two semicolons in "for" braces are allowed. - * Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError - * - * @path ch12/12.6/12.6.3/S12.6.3_A7_T1.js - * @description Checking if execution of "for(index=0; index<10; index++; index--)" fails - * @negative - */ +/*--- +info: > + Only three expressions and two semicolons in "for" braces are allowed. + Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError +es5id: 12.6.3_A7_T1 +description: > + Checking if execution of "for(index=0; index<10; index++; + index--)" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 for(index=0; index<10; index++; index--) ; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T2.js index 2f22dbf3c6..ecc6011ccf 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A7_T2.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Only three expressions and two semicolons in "for" braces are allowed. - * Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError - * - * @path ch12/12.6/12.6.3/S12.6.3_A7_T2.js - * @description Checking if execution of "for(index=0; index<10; index+=4; index++; index--)" fails - * @negative - */ +/*--- +info: > + Only three expressions and two semicolons in "for" braces are allowed. + Appearing of for (ExpressionNoIn_opt ; Expression_opt ; Expression_opt; Expression_opt; Expression_opt;) statement leads to SyntaxError +es5id: 12.6.3_A7_T2 +description: > + Checking if execution of "for(index=0; index<10; index+=4; + index++; index--)" fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 for(index=0; index<10; index+=4; index++; index--) ; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T1.js index ddd3c30e41..6e680ac17f 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Blocks within "for(with var)" braces are not allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A8.1_T1.js - * @description Checking if execution of "for(var index=0; index<100; {index++; index*2;}) { arr.add(""+index);}" fails - * @negative - */ +/*--- +info: Blocks within "for(with var)" braces are not allowed +es5id: 12.6.3_A8.1_T1 +description: > + Checking if execution of "for(var index=0; index<100; {index++; + index*2;}) { arr.add(""+index);}" fails +flags: [negative] +---*/ var arr = []; @@ -16,4 +17,3 @@ var arr = []; for(var index=0; index<100; {index++; index*2;}) { arr.add(""+index);}; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T2.js index 81cbed22bf..4075a08b4d 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Blocks within "for(with var)" braces are not allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A8.1_T2.js - * @description Checking if execution of "for(var index=0; {index++;index<100;}; index*2;) { arr.add(""+index);}" fails - * @negative - */ +/*--- +info: Blocks within "for(with var)" braces are not allowed +es5id: 12.6.3_A8.1_T2 +description: > + Checking if execution of "for(var index=0; {index++;index<100;}; + index*2;) { arr.add(""+index);}" fails +flags: [negative] +---*/ var arr = []; @@ -16,7 +17,3 @@ var arr = []; for(var index=0; {index++;index<100;}; index*2;) { arr.add(""+index);}; // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T3.js index 8c26060e3e..2d11d19c0e 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8.1_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Blocks within "for(with var)" braces are not allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A8.1_T3.js - * @description Checking if execution of "for({var index=0; index+=1;} index++<=10; index*2;) { arr.add(""+index);}" fails - * @negative - */ +/*--- +info: Blocks within "for(with var)" braces are not allowed +es5id: 12.6.3_A8.1_T3 +description: > + Checking if execution of "for({var index=0; index+=1;} + index++<=10; index*2;) { arr.add(""+index);}" fails +flags: [negative] +---*/ var arr = []; @@ -16,7 +17,3 @@ var arr = []; for({var index=0; index+=1;} index++<=10; index*2;) { arr.add(""+index);}; // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T1.js index 8f9ce29d68..b61735e61d 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Blocks within "for" braces are not allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A8_T1.js - * @description Checking if execution of "for(index=0; index<100; {index++; index*2;}) { arr.add(""+index);}" fails - * @negative - */ +/*--- +info: Blocks within "for" braces are not allowed +es5id: 12.6.3_A8_T1 +description: > + Checking if execution of "for(index=0; index<100; {index++; + index*2;}) { arr.add(""+index);}" fails +flags: [negative] +---*/ var arr = []; @@ -16,4 +17,3 @@ var arr = []; for(index=0; index<100; {index++; index*2;}) { arr.add(""+index);}; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T2.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T2.js index 406d23bbb7..aac7670df1 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T2.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Blocks within "for" braces are not allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A8_T2.js - * @description Checking if execution of "for(index=0; {index++;index<100;}; index*2;) { arr.add(""+index);}" fails - * @negative - */ +/*--- +info: Blocks within "for" braces are not allowed +es5id: 12.6.3_A8_T2 +description: > + Checking if execution of "for(index=0; {index++;index<100;}; + index*2;) { arr.add(""+index);}" fails +flags: [negative] +---*/ var arr = []; @@ -16,4 +17,3 @@ var arr = []; for(index=0; {index++;index<100;}; index*2;) { arr.add(""+index);}; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T3.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T3.js index 9843a3229e..a343bde6d5 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T3.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A8_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Blocks within "for" braces are not allowed - * - * @path ch12/12.6/12.6.3/S12.6.3_A8_T3.js - * @description Checking if execution of "for({index=0; index+=1;} index++<=10; index*2;) { arr.add(""+index);}" fails - * @negative - */ +/*--- +info: Blocks within "for" braces are not allowed +es5id: 12.6.3_A8_T3 +description: > + Checking if execution of "for({index=0; index+=1;} index++<=10; + index*2;) { arr.add(""+index);}" fails +flags: [negative] +---*/ var arr = []; @@ -16,7 +17,3 @@ var arr = []; for({index=0; index+=1;} index++<=10; index*2;) { arr.add(""+index);}; // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.1.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.1.js index c2031c9ab3..f1ded83ef0 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.1.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of evaluating "for( ExpNoIn;Exp;Exp)" loop is returning (normal, evalValue, empty) - * - * @path ch12/12.6/12.6.3/S12.6.3_A9.1.js - * @description Using eval - */ +/*--- +info: > + The result of evaluating "for( ExpNoIn;Exp;Exp)" loop is returning + (normal, evalValue, empty) +es5id: 12.6.3_A9.1 +description: Using eval +---*/ supreme=5; @@ -22,4 +23,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.js b/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.js index 11b88316f6..701d9ec607 100644 --- a/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.js +++ b/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of evaluating "for(var ExpNoIn;Exp;Exp)" loop is returning (normal, evalValue, empty) - * - * @path ch12/12.6/12.6.3/S12.6.3_A9.js - * @description Using eval - */ +/*--- +info: > + The result of evaluating "for(var ExpNoIn;Exp;Exp)" loop is returning + (normal, evalValue, empty) +es5id: 12.6.3_A9 +description: Using eval +---*/ supreme=5; @@ -22,4 +23,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.4/12.6.4-1.js b/test/suite/ch12/12.6/12.6.4/12.6.4-1.js index 3929b0a236..bc7570bff6 100644 --- a/test/suite/ch12/12.6/12.6.4/12.6.4-1.js +++ b/test/suite/ch12/12.6/12.6.4/12.6.4-1.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.6/12.6.4/12.6.4-1.js - * @description The for-in Statement - a property name must not be visited more than once in any enumeration. - */ - - -function testcase() { - var obj = { prop1: "abc", prop2: "bbc", prop3: "cnn" }; - - var countProp1 = 0; - var countProp2 = 0; - var countProp3 = 0; - - for (var p in obj) { - if (obj.hasOwnProperty(p)) { - if (p === "prop1") { - countProp1++; - } - if (p === "prop2") { - countProp2++; - } - if (p === "prop3") { - countProp3++; - } - } - } - return countProp1 === 1 && countProp2 === 1 && countProp3 === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.6.4-1 +description: > + The for-in Statement - a property name must not be visited more + than once in any enumeration. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: "abc", prop2: "bbc", prop3: "cnn" }; + + var countProp1 = 0; + var countProp2 = 0; + var countProp3 = 0; + + for (var p in obj) { + if (obj.hasOwnProperty(p)) { + if (p === "prop1") { + countProp1++; + } + if (p === "prop2") { + countProp2++; + } + if (p === "prop3") { + countProp3++; + } + } + } + return countProp1 === 1 && countProp2 === 1 && countProp3 === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.4/12.6.4-2.js b/test/suite/ch12/12.6/12.6.4/12.6.4-2.js index ffdd58cdfb..048dfec9ae 100644 --- a/test/suite/ch12/12.6/12.6.4/12.6.4-2.js +++ b/test/suite/ch12/12.6/12.6.4/12.6.4-2.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.6/12.6.4/12.6.4-2.js - * @description The for-in Statement - the values of [[Enumerable]] attributes are not considered when determining if a property of a prototype object is shadowed by a previous object on the prototype chain - */ - - -function testcase() { - var proto = { - prop: "enumerableValue" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(child, "prop", { - value: "nonEnumerableValue", - enumerable: false - }); - - var accessedProp = false; - - for (var p in child) { - if (p === "prop") { - accessedProp = true; - } - } - return !accessedProp; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.6.4-2 +description: > + The for-in Statement - the values of [[Enumerable]] attributes are + not considered when determining if a property of a prototype + object is shadowed by a previous object on the prototype chain +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = { + prop: "enumerableValue" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(child, "prop", { + value: "nonEnumerableValue", + enumerable: false + }); + + var accessedProp = false; + + for (var p in child) { + if (p === "prop") { + accessedProp = true; + } + } + return !accessedProp; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A1.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A1.js index fd8c754bfe..65dcba311e 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A1.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "for(key in undefined)" Statement is allowed - * - * @path ch12/12.6/12.6.4/S12.6.4_A1.js - * @description Checking if execution of "for(key in undefined)" passes - */ +/*--- +info: "\"for(key in undefined)\" Statement is allowed" +es5id: 12.6.4_A1 +description: Checking if execution of "for(key in undefined)" passes +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -28,6 +27,3 @@ if (key!==undefined) { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A14_T2.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A14_T2.js index b90e3e99b2..48c1d4a5a2 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A14_T2.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A14_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpession within a "for-in" Expression is allowed - * - * @path ch12/12.6/12.6.4/S12.6.4_A14_T2.js - * @description Using "function __func(){return {a:1};}()" as Expession - */ +/*--- +info: FunctionExpession within a "for-in" Expression is allowed +es5id: 12.6.4_A14_T2 +description: "Using \"function __func(){return {a:1};}()\" as Expession" +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -23,4 +22,3 @@ if (__reached !== "a") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A15.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A15.js index c19908904d..039ec346ea 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A15.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A15.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Block within a "for-in" Expression is not allowed - * - * @path ch12/12.6/12.6.4/S12.6.4_A15.js - * @description Using block within "for-in" Expression - * @negative - */ +/*--- +info: Block within a "for-in" Expression is not allowed +es5id: 12.6.4_A15 +description: Using block within "for-in" Expression +flags: [negative] +---*/ var __arr=[1,2,3]; @@ -18,4 +17,3 @@ for(x in {__arr}){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A2.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A2.js index e8db640c0d..a0a8cbfe76 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A2.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "for(key in null)" Expression is allowed - * - * @path ch12/12.6/12.6.4/S12.6.4_A2.js - * @description Checking if execution of "for(key in null)" passes - */ +/*--- +info: "\"for(key in null)\" Expression is allowed" +es5id: 12.6.4_A2 +description: Checking if execution of "for(key in null)" passes +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK# @@ -27,7 +26,3 @@ if (key!==undefined) { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.1.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.1.js index d232fe48d9..13ecc79638 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.1.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A3.1.js - * @description Using an array as an Expression is appropriate. Here Expression is an array of numbers - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A3.1 +description: > + Using an array as an Expression is appropriate. Here Expression is + an array of numbers +---*/ __str=""; @@ -27,7 +30,3 @@ if (!( (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4") } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.js index 2b34c38c73..899b244e07 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A3.js - * @description Using an array as an Expression is appropriate. Here Expression is an array of numbers. Eval is used - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A3 +description: > + Using an array as an Expression is appropriate. Here Expression is + an array of numbers. Eval is used +---*/ __str=""; @@ -27,7 +30,3 @@ if (!( (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4") } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.1.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.1.js index a491b3f341..ab2d46b91d 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.1.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A4.1.js - * @description Using Object as an Expression is appropriate. Eval is used - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A4.1 +description: Using Object as an Expression is appropriate. Eval is used +---*/ __str=""; @@ -27,8 +28,3 @@ if (__str !== __evaluated) { } // ////////////////////////////////////////////////////////////////////////////// - - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.js index 79f496b8cd..d41ee1c768 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A4.js - * @description Using Object as an Expression is appropriate. Eval is used - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A4 +description: Using Object as an Expression is appropriate. Eval is used +---*/ __str=""; @@ -27,8 +28,3 @@ if (__str !== __evaluated) { } // ////////////////////////////////////////////////////////////////////////////// - - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.1.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.1.js index 37992e1dd9..198341268f 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.1.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A5.1.js - * @description Using hierarchical Object as an Expression is appropriate. The depth is two - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A5.1 +description: > + Using hierarchical Object as an Expression is appropriate. The + depth is two +---*/ __hash__map={a:{aa:1,ab:2,ac:3,ad:4},b:{ba:1,bb:2,bc:3,bd:4},c:{ca:1,cb:2,cc:3,cd:4},d:{da:1,db:2,dc:3,dd:4}}; @@ -36,7 +39,3 @@ if(!( (__arr.indexOf("dc3")!==-1)& (__arr.indexOf("dd4")!==-1) )) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard'); - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.js index 974659f107..d23e0e15b1 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A5.js - * @description Using hierarchical Object as an Expression is appropriate. The depth is two - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A5 +description: > + Using hierarchical Object as an Expression is appropriate. The + depth is two +---*/ __hash__map={a:{aa:1,ab:2,ac:3,ad:4},b:{ba:1,bb:2,bc:3,bd:4},c:{ca:1,cb:2,cc:3,cd:4},d:{da:1,db:2,dc:3,dd:4}}; @@ -36,7 +39,3 @@ if(!( (__arr.indexOf("dc3")!==-1)& (__arr.indexOf("dd4")!==-1) )) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard'); - - - - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.1.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.1.js index 78cc2e8420..646cbda5dd 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.1.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A6.1.js - * @description Using Object with custom prototype as an Expression is appropriate. The prototype is "{feat:2,hint:"protohint"}" - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A6.1 +description: > + Using Object with custom prototype as an Expression is + appropriate. The prototype is "{feat:2,hint:"protohint"}" +---*/ function FACTORY(){this.prop=1;this.hint="hinted"}; @@ -35,4 +38,3 @@ if (__accum.indexOf("hintprotohint")!==-1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.js index 5a1f8d9c2b..ac4bcb2684 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement" - * - * @path ch12/12.6/12.6.4/S12.6.4_A6.js - * @description Using Object with custom prototype as an Expression is appropriate. The prototype is "{feat:2,hint:"protohint"}" - */ +/*--- +info: > + The production IterationStatement: "for (var VariableDeclarationNoIn in + Expression) Statement" +es5id: 12.6.4_A6 +description: > + Using Object with custom prototype as an Expression is + appropriate. The prototype is "{feat:2,hint:"protohint"}" +---*/ function FACTORY(){this.prop=1;this.hint="hinted"}; @@ -35,4 +38,3 @@ if (__accum.indexOf("hintprotohint")!==-1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T1.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T1.js index 1105b7ff25..bccfb2c7e5 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T1.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Properties of the object being enumerated may be deleted during enumeration - * - * @path ch12/12.6/12.6.4/S12.6.4_A7_T1.js - * @description Checking "for (LeftHandSideExpression in Expression) Statement" case - */ +/*--- +info: > + Properties of the object being enumerated may be deleted during + enumeration +es5id: 12.6.4_A7_T1 +description: > + Checking "for (LeftHandSideExpression in Expression) Statement" + case +---*/ __obj={aa:1,ba:2,ca:3}; @@ -46,4 +49,3 @@ function erasator_T_1000(hash_map, charactr){ }; } } - diff --git a/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T2.js b/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T2.js index 48be196ab2..7c24fa78c6 100644 --- a/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T2.js +++ b/test/suite/ch12/12.6/12.6.4/S12.6.4_A7_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Properties of the object being enumerated may be deleted during enumeration - * - * @path ch12/12.6/12.6.4/S12.6.4_A7_T2.js - * @description Checking "for (var VariableDeclarationNoIn in Expression) Statement" case - */ +/*--- +info: > + Properties of the object being enumerated may be deleted during + enumeration +es5id: 12.6.4_A7_T2 +description: > + Checking "for (var VariableDeclarationNoIn in Expression) + Statement" case +---*/ __obj={aa:1,ba:2,ca:3}; @@ -46,4 +49,3 @@ function erasator_T_1000(hash_map, charactr){ }; } } - diff --git a/test/suite/ch12/12.7/12.7-1.js b/test/suite/ch12/12.7/12.7-1.js index a19060a82c..03b5299728 100644 --- a/test/suite/ch12/12.7/12.7-1.js +++ b/test/suite/ch12/12.7/12.7-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.7/12.7-1.js - * @description The continue Statement - a continue statement without an identifier may have a LineTerminator before the semi-colon - */ - - -function testcase() { - var sum = 0; - for (var i = 1; i <= 10; i++) { - continue - ; - sum += i; - } - return sum === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.7-1 +description: > + The continue Statement - a continue statement without an + identifier may have a LineTerminator before the semi-colon +includes: [runTestCase.js] +---*/ + +function testcase() { + var sum = 0; + for (var i = 1; i <= 10; i++) { + continue + ; + sum += i; + } + return sum === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.7/S12.7_A1_T1.js b/test/suite/ch12/12.7/S12.7_A1_T1.js index ec172729f8..30b5da7b65 100644 --- a/test/suite/ch12/12.7/S12.7_A1_T1.js +++ b/test/suite/ch12/12.7/S12.7_A1_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of continue without an IterationStatement leads to syntax error - * - * @path ch12/12.7/S12.7_A1_T1.js - * @description Checking if execution of single "continue" without any IterationStatement fails - * @negative - */ +/*--- +info: Appearing of continue without an IterationStatement leads to syntax error +es5id: 12.7_A1_T1 +description: > + Checking if execution of single "continue" without any + IterationStatement fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ continue; var y=2; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.7/S12.7_A1_T2.js b/test/suite/ch12/12.7/S12.7_A1_T2.js index 2aa90f8b1b..7158c19cc3 100644 --- a/test/suite/ch12/12.7/S12.7_A1_T2.js +++ b/test/suite/ch12/12.7/S12.7_A1_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of continue without an IterationStatement leads to syntax error - * - * @path ch12/12.7/S12.7_A1_T2.js - * @description Checking if single "continue" with Label but without any IterationStatement fails - * @negative - */ +/*--- +info: Appearing of continue without an IterationStatement leads to syntax error +es5id: 12.7_A1_T2 +description: > + Checking if single "continue" with Label but without any + IterationStatement fails +flags: [negative] +---*/ LABEL : x=3.14; @@ -18,4 +19,3 @@ continue LABEL; var y=2; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.7/S12.7_A1_T3.js b/test/suite/ch12/12.7/S12.7_A1_T3.js index 4652dc8652..b5b980febb 100644 --- a/test/suite/ch12/12.7/S12.7_A1_T3.js +++ b/test/suite/ch12/12.7/S12.7_A1_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of continue without an IterationStatement leads to syntax error - * - * @path ch12/12.7/S12.7_A1_T3.js - * @description Checking if laballed "continue" with no IterationStatement, placed into a block, fails - * @negative - */ +/*--- +info: Appearing of continue without an IterationStatement leads to syntax error +es5id: 12.7_A1_T3 +description: > + Checking if laballed "continue" with no IterationStatement, placed + into a block, fails +flags: [negative] +---*/ LABEL : x=3.14; @@ -20,4 +21,3 @@ LABEL : x=3.14; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.7/S12.7_A1_T4.js b/test/suite/ch12/12.7/S12.7_A1_T4.js index ac34f2642b..72d7b6a5da 100644 --- a/test/suite/ch12/12.7/S12.7_A1_T4.js +++ b/test/suite/ch12/12.7/S12.7_A1_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of continue without an IterationStatement leads to syntax error - * - * @path ch12/12.7/S12.7_A1_T4.js - * @description Checking if execution of "continue" with no IterationStatement, placed into a block, fails - * @negative - */ +/*--- +info: Appearing of continue without an IterationStatement leads to syntax error +es5id: 12.7_A1_T4 +description: > + Checking if execution of "continue" with no IterationStatement, + placed into a block, fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,5 +19,3 @@ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch12/12.7/S12.7_A2.js b/test/suite/ch12/12.7/S12.7_A2.js index 3f76aa1a4c..1a4aa7c5fe 100644 --- a/test/suite/ch12/12.7/S12.7_A2.js +++ b/test/suite/ch12/12.7/S12.7_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since LineTerminator between "continue" and Identifier is not allowed, "continue" is evaluated without label - * - * @path ch12/12.7/S12.7_A2.js - * @description Checking by using eval, inserting LineTerminator between continue and Identifier - */ +/*--- +info: > + Since LineTerminator between "continue" and Identifier is not allowed, + "continue" is evaluated without label +es5id: 12.7_A2 +description: > + Checking by using eval, inserting LineTerminator between continue + and Identifier +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -59,6 +62,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.7/S12.7_A5_T1.js b/test/suite/ch12/12.7/S12.7_A5_T1.js index 14a8b5f7a6..82655a7caa 100644 --- a/test/suite/ch12/12.7/S12.7_A5_T1.js +++ b/test/suite/ch12/12.7/S12.7_A5_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "continue Identifier" is evaluated Identifier must be label in the label set of an enclosing (but not crossing function boundaries) IterationStatement - * - * @path ch12/12.7/S12.7_A5_T1.js - * @description Trying to continue another labeled loop - * @negative - */ +/*--- +info: > + When "continue Identifier" is evaluated Identifier must be label in the + label set of an enclosing (but not crossing function boundaries) + IterationStatement +es5id: 12.7_A5_T1 +description: Trying to continue another labeled loop +flags: [negative] +---*/ LABEL_OUT : var x=0, y=0; LABEL_DO_LOOP : do { @@ -23,4 +25,3 @@ LABEL_ANOTHER_LOOP : do { } while(0); function OUT_FUNC(){} - diff --git a/test/suite/ch12/12.7/S12.7_A5_T2.js b/test/suite/ch12/12.7/S12.7_A5_T2.js index 1d3f7e9c1a..c2ba06648b 100644 --- a/test/suite/ch12/12.7/S12.7_A5_T2.js +++ b/test/suite/ch12/12.7/S12.7_A5_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "continue Identifier" is evaluated Identifier must be label in the label set of an enclosing (but not crossing function boundaries) IterationStatement - * - * @path ch12/12.7/S12.7_A5_T2.js - * @description Identifier is a function name - * @negative - */ +/*--- +info: > + When "continue Identifier" is evaluated Identifier must be label in the + label set of an enclosing (but not crossing function boundaries) + IterationStatement +es5id: 12.7_A5_T2 +description: Identifier is a function name +flags: [negative] +---*/ LABEL_OUT : var x=0, y=0; LABEL_DO_LOOP : do { @@ -23,4 +25,3 @@ LABEL_ANOTHER_LOOP : do { } while(0); function OUT_FUNC(){}; - diff --git a/test/suite/ch12/12.7/S12.7_A5_T3.js b/test/suite/ch12/12.7/S12.7_A5_T3.js index 16babd629b..d1b6aec5ee 100644 --- a/test/suite/ch12/12.7/S12.7_A5_T3.js +++ b/test/suite/ch12/12.7/S12.7_A5_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "continue Identifier" is evaluated Identifier must be label in the label set of an enclosing (but not crossing function boundaries) IterationStatement - * - * @path ch12/12.7/S12.7_A5_T3.js - * @description Identifier is within loop label - * @negative - */ +/*--- +info: > + When "continue Identifier" is evaluated Identifier must be label in the + label set of an enclosing (but not crossing function boundaries) + IterationStatement +es5id: 12.7_A5_T3 +description: Identifier is within loop label +flags: [negative] +---*/ LABEL_OUT : var x=0, y=0; @@ -24,4 +26,3 @@ LABEL_ANOTHER_LOOP : do { } while(0); function OUT_FUNC(){} - diff --git a/test/suite/ch12/12.7/S12.7_A6.js b/test/suite/ch12/12.7/S12.7_A6.js index 11bb439aa3..2ba847496f 100644 --- a/test/suite/ch12/12.7/S12.7_A6.js +++ b/test/suite/ch12/12.7/S12.7_A6.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "continue" within a function call that is within an IterationStatement yields SyntaxError - * - * @path ch12/12.7/S12.7_A6.js - * @description Using labaled "continue Identifier" within a function body - * @negative - */ +/*--- +info: > + Appearing of "continue" within a function call that is within an + IterationStatement yields SyntaxError +es5id: 12.7_A6 +description: Using labaled "continue Identifier" within a function body +flags: [negative] +---*/ var x=0,y=0; @@ -16,4 +17,3 @@ LABEL1 : do { (function(){continue LABEL1;})(); y++; } while(0); - diff --git a/test/suite/ch12/12.7/S12.7_A7.js b/test/suite/ch12/12.7/S12.7_A7.js index c43f701e1c..748e028310 100644 --- a/test/suite/ch12/12.7/S12.7_A7.js +++ b/test/suite/ch12/12.7/S12.7_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of continue within eval statement that is within an IterationStatement yields SyntaxError - * - * @path ch12/12.7/S12.7_A7.js - * @description Using eval "eval("continue LABEL1")" - */ +/*--- +info: > + Appearing of continue within eval statement that is within an + IterationStatement yields SyntaxError +es5id: 12.7_A7 +description: Using eval "eval("continue LABEL1")" +---*/ var x=0,y=0; @@ -26,4 +27,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.7/S12.7_A8_T1.js b/test/suite/ch12/12.7/S12.7_A8_T1.js index 76f8538a8f..3887cd247c 100644 --- a/test/suite/ch12/12.7/S12.7_A8_T1.js +++ b/test/suite/ch12/12.7/S12.7_A8_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "continue" within a "try/catch" Block yields SyntaxError - * - * @path ch12/12.7/S12.7_A8_T1.js - * @description Checking if execution of "continue Identifier" within catch Block fails - * @negative - */ +/*--- +info: Appearing of "continue" within a "try/catch" Block yields SyntaxError +es5id: 12.7_A8_T1 +description: > + Checking if execution of "continue Identifier" within catch Block + fails +flags: [negative] +---*/ var x=0,y=0; @@ -25,4 +26,3 @@ try{ y++; } while(0); }; - diff --git a/test/suite/ch12/12.7/S12.7_A8_T2.js b/test/suite/ch12/12.7/S12.7_A8_T2.js index 4d6f48e8b5..90228d44ab 100644 --- a/test/suite/ch12/12.7/S12.7_A8_T2.js +++ b/test/suite/ch12/12.7/S12.7_A8_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "continue" within a "try/catch" Block yields SyntaxError - * - * @path ch12/12.7/S12.7_A8_T2.js - * @description Checking if execution of "continue" within catch Block fails - * @negative - */ +/*--- +info: Appearing of "continue" within a "try/catch" Block yields SyntaxError +es5id: 12.7_A8_T2 +description: Checking if execution of "continue" within catch Block fails +flags: [negative] +---*/ var x=0,y=0; @@ -25,4 +24,3 @@ try{ y++; } while(0); }; - diff --git a/test/suite/ch12/12.7/S12.7_A9_T1.js b/test/suite/ch12/12.7/S12.7_A9_T1.js index e6ab1f5425..173897070d 100644 --- a/test/suite/ch12/12.7/S12.7_A9_T1.js +++ b/test/suite/ch12/12.7/S12.7_A9_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Continue inside of try-catch nested in a loop is allowed - * - * @path ch12/12.7/S12.7_A9_T1.js - * @description Using "continue Identifier" within catch Block that is within a loop - */ +/*--- +info: Continue inside of try-catch nested in a loop is allowed +es5id: 12.7_A9_T1 +description: > + Using "continue Identifier" within catch Block that is within a + loop +---*/ var x=0,y=0; @@ -29,4 +30,3 @@ if (x!==10) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.7/S12.7_A9_T2.js b/test/suite/ch12/12.7/S12.7_A9_T2.js index 8763414ebd..8ea11d3eac 100644 --- a/test/suite/ch12/12.7/S12.7_A9_T2.js +++ b/test/suite/ch12/12.7/S12.7_A9_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Continue inside of try-catch nested in a loop is allowed - * - * @path ch12/12.7/S12.7_A9_T2.js - * @description Using "continue" within catch Block that is within a loop - */ +/*--- +info: Continue inside of try-catch nested in a loop is allowed +es5id: 12.7_A9_T2 +description: Using "continue" within catch Block that is within a loop +---*/ var x=0,y=0; @@ -29,4 +28,3 @@ if (x!==10) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/12.8-1.js b/test/suite/ch12/12.8/12.8-1.js index e32f54168f..743e82d937 100644 --- a/test/suite/ch12/12.8/12.8-1.js +++ b/test/suite/ch12/12.8/12.8-1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.8/12.8-1.js - * @description The break Statement - a break statement without an identifier may have a LineTerminator before the semi-colon - */ - - -function testcase() { - var sum = 0; - for (var i = 1; i <= 10; i++) { - if (i === 6) { - break - ; - } - sum += i; - } - return sum === 15; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.8-1 +description: > + The break Statement - a break statement without an identifier may + have a LineTerminator before the semi-colon +includes: [runTestCase.js] +---*/ + +function testcase() { + var sum = 0; + for (var i = 1; i <= 10; i++) { + if (i === 6) { + break + ; + } + sum += i; + } + return sum === 15; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.8/S12.8_A1_T1.js b/test/suite/ch12/12.8/S12.8_A1_T1.js index 546e667809..da7652d465 100644 --- a/test/suite/ch12/12.8/S12.8_A1_T1.js +++ b/test/suite/ch12/12.8/S12.8_A1_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of break without an IterationStatement leads to syntax error - * - * @path ch12/12.8/S12.8_A1_T1.js - * @description Checking if break statement with no loop fails - * @negative - */ +/*--- +info: Appearing of break without an IterationStatement leads to syntax error +es5id: 12.8_A1_T1 +description: Checking if break statement with no loop fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ break; var y=2; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A1_T2.js b/test/suite/ch12/12.8/S12.8_A1_T2.js index c141c7722a..7076da14b4 100644 --- a/test/suite/ch12/12.8/S12.8_A1_T2.js +++ b/test/suite/ch12/12.8/S12.8_A1_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of break without an IterationStatement leads to syntax error - * - * @path ch12/12.8/S12.8_A1_T2.js - * @description Checking if break Identifier with no loop fails - * @negative - */ +/*--- +info: Appearing of break without an IterationStatement leads to syntax error +es5id: 12.8_A1_T2 +description: Checking if break Identifier with no loop fails +flags: [negative] +---*/ LABEL : x=3.14; @@ -18,4 +17,3 @@ break LABEL; var y=2; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A1_T3.js b/test/suite/ch12/12.8/S12.8_A1_T3.js index 6627be368a..f0491b68aa 100644 --- a/test/suite/ch12/12.8/S12.8_A1_T3.js +++ b/test/suite/ch12/12.8/S12.8_A1_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of break without an IterationStatement leads to syntax error - * - * @path ch12/12.8/S12.8_A1_T3.js - * @description Checking if break statement with no loop, placed into a block, fails - * @negative - */ +/*--- +info: Appearing of break without an IterationStatement leads to syntax error +es5id: 12.8_A1_T3 +description: > + Checking if break statement with no loop, placed into a block, + fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A1_T4.js b/test/suite/ch12/12.8/S12.8_A1_T4.js index 1663fc5f5b..d011cc1b1e 100644 --- a/test/suite/ch12/12.8/S12.8_A1_T4.js +++ b/test/suite/ch12/12.8/S12.8_A1_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of break without an IterationStatement leads to syntax error - * - * @path ch12/12.8/S12.8_A1_T4.js - * @description Checking if break Identifier with no loop, placed into a block, fails - * @negative - */ +/*--- +info: Appearing of break without an IterationStatement leads to syntax error +es5id: 12.8_A1_T4 +description: > + Checking if break Identifier with no loop, placed into a block, + fails +flags: [negative] +---*/ LABEL : x=3.14; @@ -20,4 +21,3 @@ LABEL : x=3.14; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A2.js b/test/suite/ch12/12.8/S12.8_A2.js index a1154aeca0..9c231b2b7e 100644 --- a/test/suite/ch12/12.8/S12.8_A2.js +++ b/test/suite/ch12/12.8/S12.8_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since LineTerminator between "break" and Identifier is not allowed, "break" is evaluated without label - * - * @path ch12/12.8/S12.8_A2.js - * @description Checking by using eval, inserting LineTerminator between break and Identifier - */ +/*--- +info: > + Since LineTerminator between "break" and Identifier is not allowed, + "break" is evaluated without label +es5id: 12.8_A2 +description: > + Checking by using eval, inserting LineTerminator between break and + Identifier +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -59,6 +62,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch12/12.8/S12.8_A3.js b/test/suite/ch12/12.8/S12.8_A3.js index d2aaa5ad3e..ad15b083dc 100644 --- a/test/suite/ch12/12.8/S12.8_A3.js +++ b/test/suite/ch12/12.8/S12.8_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "break" is evaluated, (break, empty, empty) is returned - * - * @path ch12/12.8/S12.8_A3.js - * @description Using "break" without Identifier within labeled loop - */ +/*--- +info: When "break" is evaluated, (break, empty, empty) is returned +es5id: 12.8_A3 +description: Using "break" without Identifier within labeled loop +---*/ LABEL_OUT : var x=0, y=0; @@ -31,4 +30,3 @@ if ((x!==2)&&(y!==0)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A4_T1.js b/test/suite/ch12/12.8/S12.8_A4_T1.js index 86e258a4ee..bfd90ea0c0 100644 --- a/test/suite/ch12/12.8/S12.8_A4_T1.js +++ b/test/suite/ch12/12.8/S12.8_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "break Identifier" is evaluated, (break, empty, Identifier) is returned - * - * @path ch12/12.8/S12.8_A4_T1.js - * @description Using "break Identifier" within labaeled loop - */ +/*--- +info: > + When "break Identifier" is evaluated, (break, empty, Identifier) is + returned +es5id: 12.8_A4_T1 +description: Using "break Identifier" within labaeled loop +---*/ LABEL_OUT : var x=0, y=0; (function(){ @@ -32,4 +33,3 @@ if ((x!==1)&&(y!==0)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A4_T2.js b/test/suite/ch12/12.8/S12.8_A4_T2.js index 8662cf8290..fe71a1b327 100644 --- a/test/suite/ch12/12.8/S12.8_A4_T2.js +++ b/test/suite/ch12/12.8/S12.8_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "break Identifier" is evaluated, (break, empty, Identifier) is returned - * - * @path ch12/12.8/S12.8_A4_T2.js - * @description Using embedded and labeled loops, breaking to nested loop - */ +/*--- +info: > + When "break Identifier" is evaluated, (break, empty, Identifier) is + returned +es5id: 12.8_A4_T2 +description: Using embedded and labeled loops, breaking to nested loop +---*/ LABEL_OUT : var x=0, y=0, xx=0, yy=0; (function(){ @@ -38,4 +39,3 @@ if ((x!==1)&&(y!==1)&&(xx!==1)&(yy!==0)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A4_T3.js b/test/suite/ch12/12.8/S12.8_A4_T3.js index 7ca7fc2d66..d916f948d5 100644 --- a/test/suite/ch12/12.8/S12.8_A4_T3.js +++ b/test/suite/ch12/12.8/S12.8_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "break Identifier" is evaluated, (break, empty, Identifier) is returned - * - * @path ch12/12.8/S12.8_A4_T3.js - * @description Using embedded and labeled loops, breaking to outer loop - */ +/*--- +info: > + When "break Identifier" is evaluated, (break, empty, Identifier) is + returned +es5id: 12.8_A4_T3 +description: Using embedded and labeled loops, breaking to outer loop +---*/ LABEL_OUT : var x=0, y=0, xx=0, yy=0; (function(){ @@ -38,4 +39,3 @@ if ((x!==1)&&(y!==0)&&(xx!==1)&(yy!==0)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A5_T1.js b/test/suite/ch12/12.8/S12.8_A5_T1.js index 34fbed938a..53fe39c746 100644 --- a/test/suite/ch12/12.8/S12.8_A5_T1.js +++ b/test/suite/ch12/12.8/S12.8_A5_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Identifier must be label in the label set of an enclosing (but not crossing function boundaries) IterationStatement - * - * @path ch12/12.8/S12.8_A5_T1.js - * @description Checking if breaking another labeled loop fails - * @negative - */ +/*--- +info: > + Identifier must be label in the label set of an enclosing (but not + crossing function boundaries) IterationStatement +es5id: 12.8_A5_T1 +description: Checking if breaking another labeled loop fails +flags: [negative] +---*/ (function(){ LABEL_OUT : var x=0, y=0; @@ -26,4 +27,3 @@ function OUT_FUNC(){} })(); - diff --git a/test/suite/ch12/12.8/S12.8_A5_T2.js b/test/suite/ch12/12.8/S12.8_A5_T2.js index f843c3bb11..2c9eb0ba90 100644 --- a/test/suite/ch12/12.8/S12.8_A5_T2.js +++ b/test/suite/ch12/12.8/S12.8_A5_T2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Identifier must be label in the label set of an enclosing (but not crossing function boundaries) IterationStatement - * - * @path ch12/12.8/S12.8_A5_T2.js - * @description Checking if using function name as an Identifier appears to be invalid - * @negative - */ +/*--- +info: > + Identifier must be label in the label set of an enclosing (but not + crossing function boundaries) IterationStatement +es5id: 12.8_A5_T2 +description: > + Checking if using function name as an Identifier appears to be + invalid +flags: [negative] +---*/ (function(){ LABEL_OUT : var x=0, y=0; @@ -26,4 +29,3 @@ function OUT_FUNC(){} })(); - diff --git a/test/suite/ch12/12.8/S12.8_A5_T3.js b/test/suite/ch12/12.8/S12.8_A5_T3.js index d6f930705c..456c611690 100644 --- a/test/suite/ch12/12.8/S12.8_A5_T3.js +++ b/test/suite/ch12/12.8/S12.8_A5_T3.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Identifier must be label in the label set of an enclosing (but not crossing function boundaries) IterationStatement - * - * @path ch12/12.8/S12.8_A5_T3.js - * @description Checking if using internal loop label as an Identifier appears to be invalid - * @negative - */ +/*--- +info: > + Identifier must be label in the label set of an enclosing (but not + crossing function boundaries) IterationStatement +es5id: 12.8_A5_T3 +description: > + Checking if using internal loop label as an Identifier appears to + be invalid +flags: [negative] +---*/ (function(){ LABEL_OUT : var x=0, y=0; @@ -29,4 +32,3 @@ function OUT_FUNC(){} })(); - diff --git a/test/suite/ch12/12.8/S12.8_A6.js b/test/suite/ch12/12.8/S12.8_A6.js index 264f74d862..e503aa14a0 100644 --- a/test/suite/ch12/12.8/S12.8_A6.js +++ b/test/suite/ch12/12.8/S12.8_A6.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "break" within a function call that is nested in a IterationStatement yields SyntaxError - * - * @path ch12/12.8/S12.8_A6.js - * @description Checking if using "break Identifier" within a function body appears to be invalid - * @negative - */ +/*--- +info: > + Appearing of "break" within a function call that is nested in a + IterationStatement yields SyntaxError +es5id: 12.8_A6 +description: > + Checking if using "break Identifier" within a function body + appears to be invalid +flags: [negative] +---*/ var x=0,y=0; @@ -16,4 +19,3 @@ LABEL1 : do { (function(){break LABEL1;})(); y++; } while(0); - diff --git a/test/suite/ch12/12.8/S12.8_A7.js b/test/suite/ch12/12.8/S12.8_A7.js index a5f5bebaf5..fe28ce36b3 100644 --- a/test/suite/ch12/12.8/S12.8_A7.js +++ b/test/suite/ch12/12.8/S12.8_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "break" within eval statement that is nested in an IterationStatement yields SyntaxError - * - * @path ch12/12.8/S12.8_A7.js - * @description Using eval "eval("break LABEL1")" - */ +/*--- +info: > + Appearing of "break" within eval statement that is nested in an + IterationStatement yields SyntaxError +es5id: 12.8_A7 +description: Using eval "eval("break LABEL1")" +---*/ var x=0,y=0; @@ -26,4 +27,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A8_T1.js b/test/suite/ch12/12.8/S12.8_A8_T1.js index cbcba7f69c..9b995278da 100644 --- a/test/suite/ch12/12.8/S12.8_A8_T1.js +++ b/test/suite/ch12/12.8/S12.8_A8_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "break" within "try/catch" Block yields SyntaxError - * - * @path ch12/12.8/S12.8_A8_T1.js - * @description Checking if using "break Identifier" from within catch Block appears to be invalid - * @negative - */ +/*--- +info: Appearing of "break" within "try/catch" Block yields SyntaxError +es5id: 12.8_A8_T1 +description: > + Checking if using "break Identifier" from within catch Block + appears to be invalid +flags: [negative] +---*/ var x=0,y=0; @@ -25,5 +26,3 @@ try{ y++; } while(0); } - - diff --git a/test/suite/ch12/12.8/S12.8_A8_T2.js b/test/suite/ch12/12.8/S12.8_A8_T2.js index 92771babf4..946bef6072 100644 --- a/test/suite/ch12/12.8/S12.8_A8_T2.js +++ b/test/suite/ch12/12.8/S12.8_A8_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "break" within "try/catch" Block yields SyntaxError - * - * @path ch12/12.8/S12.8_A8_T2.js - * @description Checking if using "break Identifier" from within catch Block appears to be invalid - * @negative - */ +/*--- +info: Appearing of "break" within "try/catch" Block yields SyntaxError +es5id: 12.8_A8_T2 +description: > + Checking if using "break Identifier" from within catch Block + appears to be invalid +flags: [negative] +---*/ var x=0,y=0; @@ -25,5 +26,3 @@ try{ y++; } while(0); } - - diff --git a/test/suite/ch12/12.8/S12.8_A9_T1.js b/test/suite/ch12/12.8/S12.8_A9_T1.js index 60da11ef29..dcc4c8a5f1 100644 --- a/test/suite/ch12/12.8/S12.8_A9_T1.js +++ b/test/suite/ch12/12.8/S12.8_A9_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "break" within "try/catch" statement that is nested in a loop is allowed - * - * @path ch12/12.8/S12.8_A9_T1.js - * @description Using "continue Identifier" within "catch" statement - */ +/*--- +info: > + Using "break" within "try/catch" statement that is nested in a loop is + allowed +es5id: 12.8_A9_T1 +description: Using "continue Identifier" within "catch" statement +---*/ var x=0,y=0; @@ -29,4 +30,3 @@ if (x!==1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.8/S12.8_A9_T2.js b/test/suite/ch12/12.8/S12.8_A9_T2.js index 53dc3555ca..a07739c9a2 100644 --- a/test/suite/ch12/12.8/S12.8_A9_T2.js +++ b/test/suite/ch12/12.8/S12.8_A9_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using "break" within "try/catch" statement that is nested in a loop is allowed - * - * @path ch12/12.8/S12.8_A9_T2.js - * @description Using "continue Identifier" within "catch" statement - */ +/*--- +info: > + Using "break" within "try/catch" statement that is nested in a loop is + allowed +es5id: 12.8_A9_T2 +description: Using "continue Identifier" within "catch" statement +---*/ var x=0,y=0; @@ -29,4 +30,3 @@ if (x!==1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/12.9-1.js b/test/suite/ch12/12.9/12.9-1.js index 098042e938..8cfb74b19d 100644 --- a/test/suite/ch12/12.9/12.9-1.js +++ b/test/suite/ch12/12.9/12.9-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch12/12.9/12.9-1.js - * @description The return Statement - a return statement without an expression may have a LineTerminator before the semi-colon - */ - - -function testcase() { - var sum = 0; - (function innerTest() { - for (var i = 1; i <= 10; i++) { - if (i === 6) { - return - ; - } - sum += i; - } - })(); - return sum === 15; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 12.9-1 +description: > + The return Statement - a return statement without an expression + may have a LineTerminator before the semi-colon +includes: [runTestCase.js] +---*/ + +function testcase() { + var sum = 0; + (function innerTest() { + for (var i = 1; i <= 10; i++) { + if (i === 6) { + return + ; + } + sum += i; + } + })(); + return sum === 15; + } +runTestCase(testcase); diff --git a/test/suite/ch12/12.9/S12.9_A1_T1.js b/test/suite/ch12/12.9/S12.9_A1_T1.js index a4115f7ec8..f4e191e38f 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T1.js +++ b/test/suite/ch12/12.9/S12.9_A1_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T1.js - * @description Checking if execution of "return" with no function fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T1 +description: Checking if execution of "return" with no function fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x=1; return; var y=2; - diff --git a/test/suite/ch12/12.9/S12.9_A1_T10.js b/test/suite/ch12/12.9/S12.9_A1_T10.js index 63bcd816c7..fe67d24c73 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T10.js +++ b/test/suite/ch12/12.9/S12.9_A1_T10.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T10.js - * @description Checking if execution of "return (0)" with no function fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T10 +description: Checking if execution of "return (0)" with no function fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 return (0); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T2.js b/test/suite/ch12/12.9/S12.9_A1_T2.js index 74f657b600..c8348dd9df 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T2.js +++ b/test/suite/ch12/12.9/S12.9_A1_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T2.js - * @description Checking if execution of "return x" with no function fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T2 +description: Checking if execution of "return x" with no function fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ return x; var y=2; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T3.js b/test/suite/ch12/12.9/S12.9_A1_T3.js index 8f22b8859a..353b902cf4 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T3.js +++ b/test/suite/ch12/12.9/S12.9_A1_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T3.js - * @description Checking if execution of "return" within "try" statement fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T3 +description: Checking if execution of "return" within "try" statement fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +17,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T4.js b/test/suite/ch12/12.9/S12.9_A1_T4.js index 3add975cb8..a372d85418 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T4.js +++ b/test/suite/ch12/12.9/S12.9_A1_T4.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T4.js - * @description Checking if execution of "return" with no function fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T4 +description: Checking if execution of "return" with no function fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 return; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T5.js b/test/suite/ch12/12.9/S12.9_A1_T5.js index a53d7c7641..473ea4efc8 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T5.js +++ b/test/suite/ch12/12.9/S12.9_A1_T5.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T5.js - * @description Checking if execution of "return" with no function, placed into a Block, fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T5 +description: > + Checking if execution of "return" with no function, placed into a + Block, fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T6.js b/test/suite/ch12/12.9/S12.9_A1_T6.js index aea6ec9779..0438d5c46b 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T6.js +++ b/test/suite/ch12/12.9/S12.9_A1_T6.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T6.js - * @description Checking if execution of "return" with no function, placed into a loop, fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T6 +description: > + Checking if execution of "return" with no function, placed into a + loop, fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ do { } while(0); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T7.js b/test/suite/ch12/12.9/S12.9_A1_T7.js index ad863d4734..e9f64c79d1 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T7.js +++ b/test/suite/ch12/12.9/S12.9_A1_T7.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T7.js - * @description Checking if execution of "return x" with no function, placed inside Block, fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T7 +description: > + Checking if execution of "return x" with no function, placed + inside Block, fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T8.js b/test/suite/ch12/12.9/S12.9_A1_T8.js index edfbd1660e..1545778753 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T8.js +++ b/test/suite/ch12/12.9/S12.9_A1_T8.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T8.js - * @description Checking if execution of "return x" with no function, placed into a loop, fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T8 +description: > + Checking if execution of "return x" with no function, placed into + a loop, fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ do { } while(0); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A1_T9.js b/test/suite/ch12/12.9/S12.9_A1_T9.js index 57e39aee73..ef3fa9c442 100644 --- a/test/suite/ch12/12.9/S12.9_A1_T9.js +++ b/test/suite/ch12/12.9/S12.9_A1_T9.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Appearing of "return" without a function body leads to syntax error - * - * @path ch12/12.9/S12.9_A1_T9.js - * @description Checking if execution of "return", placed into a catch Block, fails - * @negative - */ +/*--- +info: Appearing of "return" without a function body leads to syntax error +es5id: 12.9_A1_T9 +description: Checking if execution of "return", placed into a catch Block, fails +flags: [negative] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +17,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A2.js b/test/suite/ch12/12.9/S12.9_A2.js index 177205dbb4..c9faab9781 100644 --- a/test/suite/ch12/12.9/S12.9_A2.js +++ b/test/suite/ch12/12.9/S12.9_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * LineTerminator between return and Identifier_opt yields return without Identifier_opt - * - * @path ch12/12.9/S12.9_A2.js - * @description Checking by using eval, inserting LineTerminator between return and Variable - */ +/*--- +info: > + LineTerminator between return and Identifier_opt yields return without + Identifier_opt +es5id: 12.9_A2 +description: > + Checking by using eval, inserting LineTerminator between return + and Variable +---*/ //CHECK#1 try{ @@ -52,4 +55,3 @@ try{ } catch(e){ $ERROR('#4: eval("(function(){var x =1;return\\u2029x;var y=2;})()") does not lead to throwing exception'); } - diff --git a/test/suite/ch12/12.9/S12.9_A3.js b/test/suite/ch12/12.9/S12.9_A3.js index 95b87c3637..568196f8b5 100644 --- a/test/suite/ch12/12.9/S12.9_A3.js +++ b/test/suite/ch12/12.9/S12.9_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Expression is omitted, the return value is undefined - * - * @path ch12/12.9/S12.9_A3.js - * @description Return without Expression - */ +/*--- +info: If Expression is omitted, the return value is undefined +es5id: 12.9_A3 +description: Return without Expression +---*/ __evaluated = (function (){return;})(); @@ -17,4 +16,3 @@ if (__evaluated !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A4.js b/test/suite/ch12/12.9/S12.9_A4.js index 97c9239794..d0e38cf2de 100644 --- a/test/suite/ch12/12.9/S12.9_A4.js +++ b/test/suite/ch12/12.9/S12.9_A4.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production ReturnStatement : return Expression; is evaluated as: - * i) Evaluate Expression. - * ii) Call GetValue(Result(2)). - * iii) Return (return, Result(3), empty) - * - * @path ch12/12.9/S12.9_A4.js - * @description Return very sophisticated expression and function - */ +/*--- +info: > + The production ReturnStatement : return Expression; is evaluated as: + i) Evaluate Expression. + ii) Call GetValue(Result(2)). + iii) Return (return, Result(3), empty) +es5id: 12.9_A4 +description: Return very sophisticated expression and function +---*/ // second derivative function DD_operator(f, delta){return function(x){return (f(x+delta)-2*f(x)+f(x-delta))/(delta*delta)};} @@ -25,4 +25,3 @@ if (DDsin( Math.PI/2 ) + Math.sin( Math.PI/2 ) > 0.00001) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch12/12.9/S12.9_A5.js b/test/suite/ch12/12.9/S12.9_A5.js index 3b0b98e435..e93211bb80 100644 --- a/test/suite/ch12/12.9/S12.9_A5.js +++ b/test/suite/ch12/12.9/S12.9_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Code after ReturnStatement is not evaluated - * - * @path ch12/12.9/S12.9_A5.js - * @description Using code after Return statement - */ +/*--- +info: Code after ReturnStatement is not evaluated +es5id: 12.9_A5 +description: Using code after Return statement +---*/ //CHECK#1 var x1=1; @@ -37,4 +36,3 @@ function myfunc3(){ x3*=2; } if (myfunc3()!==undefined) $ERROR('#3: myfunc3() === undefined. Actual: myfunc3() ==='+ myfunc3() ); - diff --git a/test/suite/ch13/13.0/13.0-1.js b/test/suite/ch13/13.0/13.0-1.js index 0873465b51..38299da057 100644 --- a/test/suite/ch13/13.0/13.0-1.js +++ b/test/suite/ch13/13.0/13.0-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.0/13.0-1.js - * @description 13.0 - multiple names in one function declaration is not allowed, two function names - */ - - -function testcase() { - try { - eval("function x, y() {}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.0-1 +description: > + 13.0 - multiple names in one function declaration is not allowed, + two function names +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("function x, y() {}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-10-s.js b/test/suite/ch13/13.0/13.0-10-s.js index 71af1f4e46..8176c8cb7f 100644 --- a/test/suite/ch13/13.0/13.0-10-s.js +++ b/test/suite/ch13/13.0/13.0-10-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-10-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionBody with an inner function contains a Use Strict Directive - * @onlyStrict - */ - - -function testcase() { - - function _13_0_10_fun() { - function _13_0_10_inner() { - "use strict"; - eval("eval = 42;"); - } - _13_0_10_inner(); - }; - try { - _13_0_10_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-10-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + the code of this FunctionBody with an inner function contains a + Use Strict Directive +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function _13_0_10_fun() { + function _13_0_10_inner() { + "use strict"; + eval("eval = 42;"); + } + _13_0_10_inner(); + }; + try { + _13_0_10_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-11-s.js b/test/suite/ch13/13.0/13.0-11-s.js index 5c623c0543..440138f881 100644 --- a/test/suite/ch13/13.0/13.0-11-s.js +++ b/test/suite/ch13/13.0/13.0-11-s.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-11-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionBody with an inner function which is in strict mode - * @onlyStrict - */ - - -function testcase() { - - function _13_0_11_fun() { - "use strict"; - function _13_0_11_inner() { - eval("eval = 42;"); - } - _13_0_11_inner(); - }; - try { - _13_0_11_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-11-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + the code of this FunctionBody with an inner function which is in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function _13_0_11_fun() { + "use strict"; + function _13_0_11_inner() { + eval("eval = 42;"); + } + _13_0_11_inner(); + }; + try { + _13_0_11_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-12-s.js b/test/suite/ch13/13.0/13.0-12-s.js index 17d593f1e4..d05941b797 100644 --- a/test/suite/ch13/13.0/13.0-12-s.js +++ b/test/suite/ch13/13.0/13.0-12-s.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-12-s.js - * @description Strict Mode - SourceElements is not evaluated as strict mode code when a Function constructor is contained in strict mode code and the function constructor body is not strict - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var _13_0_12_fun = new Function(" ","eval = 42;"); - _13_0_12_fun(); - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-12-s +description: > + Strict Mode - SourceElements is not evaluated as strict mode code + when a Function constructor is contained in strict mode code and + the function constructor body is not strict +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var _13_0_12_fun = new Function(" ","eval = 42;"); + _13_0_12_fun(); + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-13-s.js b/test/suite/ch13/13.0/13.0-13-s.js index 1e231e4aad..6e22edfe59 100644 --- a/test/suite/ch13/13.0/13.0-13-s.js +++ b/test/suite/ch13/13.0/13.0-13-s.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-13-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when the function body of a Function constructor begins with a Strict Directive - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var _13_0_13_fun = new Function(\" \", \"'use strict'; eval = 42;\"); _13_0_13_fun();"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-13-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + the function body of a Function constructor begins with a Strict + Directive +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var _13_0_13_fun = new Function(\" \", \"'use strict'; eval = 42;\"); _13_0_13_fun();"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-14-s.js b/test/suite/ch13/13.0/13.0-14-s.js index 86ec4534db..dd0ae3b9ac 100644 --- a/test/suite/ch13/13.0/13.0-14-s.js +++ b/test/suite/ch13/13.0/13.0-14-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-14-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when the function body of a Function constructor contains a Strict Directive - * @onlyStrict - */ - - -function testcase() { - - try { - var _13_0_14_fun = new Function(" ", "'use strict'; eval = 42; "); - _13_0_14_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-14-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + the function body of a Function constructor contains a Strict + Directive +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + var _13_0_14_fun = new Function(" ", "'use strict'; eval = 42; "); + _13_0_14_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-15-s.js b/test/suite/ch13/13.0/13.0-15-s.js index 7f86492f78..0ef01a80b2 100644 --- a/test/suite/ch13/13.0/13.0-15-s.js +++ b/test/suite/ch13/13.0/13.0-15-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-15-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when a FunctionDeclaration is contained in strict mode code within eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function _13_0_15_fun() {eval = 42;};"); - _13_0_15_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-15-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + a FunctionDeclaration is contained in strict mode code within eval + code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function _13_0_15_fun() {eval = 42;};"); + _13_0_15_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-16-s.js b/test/suite/ch13/13.0/13.0-16-s.js index 93c01c323d..08837aef2c 100644 --- a/test/suite/ch13/13.0/13.0-16-s.js +++ b/test/suite/ch13/13.0/13.0-16-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-16-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when a FunctionExpression is contained in strict mode code within eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; var _13_0_16_fun = function () {eval = 42;};"); - _13_0_16_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-16-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + a FunctionExpression is contained in strict mode code within eval + code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; var _13_0_16_fun = function () {eval = 42;};"); + _13_0_16_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-17-s.js b/test/suite/ch13/13.0/13.0-17-s.js index 283b3f7c3e..d595bcf6bc 100644 --- a/test/suite/ch13/13.0/13.0-17-s.js +++ b/test/suite/ch13/13.0/13.0-17-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-17-s.js - * @description Strict Mode - SourceElements is not evaluated as strict mode code when a Function constructor is contained in strict mode code within eval code - * @onlyStrict - */ - - -function testcase() { - - eval("'use strict'; var _13_0_17_fun = new Function('eval = 42;'); _13_0_17_fun();"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-17-s +description: > + Strict Mode - SourceElements is not evaluated as strict mode code + when a Function constructor is contained in strict mode code + within eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + eval("'use strict'; var _13_0_17_fun = new Function('eval = 42;'); _13_0_17_fun();"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-2.js b/test/suite/ch13/13.0/13.0-2.js index d30becfbf1..6dac57c780 100644 --- a/test/suite/ch13/13.0/13.0-2.js +++ b/test/suite/ch13/13.0/13.0-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.0/13.0-2.js - * @description 13.0 - multiple names in one function declaration is not allowed, three function names - */ - - -function testcase() { - try { - eval("function x,y,z(){}"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.0-2 +description: > + 13.0 - multiple names in one function declaration is not allowed, + three function names +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + eval("function x,y,z(){}"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-3.js b/test/suite/ch13/13.0/13.0-3.js index 780c2d2b9c..607c55ab00 100644 --- a/test/suite/ch13/13.0/13.0-3.js +++ b/test/suite/ch13/13.0/13.0-3.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.0/13.0-3.js - * @description 13.0 - property names in function definition is not allowed, add a new property into object - */ - - -function testcase() { - var obj = {}; - try { - eval("function obj.tt() {};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.0-3 +description: > + 13.0 - property names in function definition is not allowed, add a + new property into object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + eval("function obj.tt() {};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-4.js b/test/suite/ch13/13.0/13.0-4.js index ce881f319c..1caa3a4953 100644 --- a/test/suite/ch13/13.0/13.0-4.js +++ b/test/suite/ch13/13.0/13.0-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.0/13.0-4.js - * @description 13.0 - multiple names in one function declaration is not allowed, add a new property into a property which is a object - */ - - -function testcase() { - var obj = {}; - obj.tt = { len: 10 }; - try { - eval("function obj.tt.ss() {};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.0-4 +description: > + 13.0 - multiple names in one function declaration is not allowed, + add a new property into a property which is a object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + obj.tt = { len: 10 }; + try { + eval("function obj.tt.ss() {};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-7-s.js b/test/suite/ch13/13.0/13.0-7-s.js index e73ed65487..4bdfa42b94 100644 --- a/test/suite/ch13/13.0/13.0-7-s.js +++ b/test/suite/ch13/13.0/13.0-7-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-7-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionDeclaration is contained in non-strict mode but the call to eval is a direct call in strict mode code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function _13_0_7_fun() {eval = 42;};"); - _13_0_7_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-7-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + the code of this FunctionDeclaration is contained in non-strict + mode but the call to eval is a direct call in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function _13_0_7_fun() {eval = 42;};"); + _13_0_7_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-8-s.js b/test/suite/ch13/13.0/13.0-8-s.js index a1b6e22a37..6e9ca1ddda 100644 --- a/test/suite/ch13/13.0/13.0-8-s.js +++ b/test/suite/ch13/13.0/13.0-8-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-8-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionExpression is contained in non-strict mode but the call to eval is a direct call in strict mode code - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var _13_0_8_fun = function () {eval = 42;};"); - _13_0_8_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-8-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + the code of this FunctionExpression is contained in non-strict + mode but the call to eval is a direct call in strict mode code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var _13_0_8_fun = function () {eval = 42;};"); + _13_0_8_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0-9-s.js b/test/suite/ch13/13.0/13.0-9-s.js index a7f12ca4f4..679efd9f6f 100644 --- a/test/suite/ch13/13.0/13.0-9-s.js +++ b/test/suite/ch13/13.0/13.0-9-s.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13; - * The production FunctionBody : SourceElementsopt is evaluated as follows: - * - * @path ch13/13.0/13.0-9-s.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when a FunctionDeclaration that is contained in strict mode code has an inner function - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var _13_0_9_fun = function () { - function _13_0_9_inner() { eval("eval = 42;"); } - _13_0_9_inner(); - }; - try { - _13_0_9_fun(); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13; + The production FunctionBody : SourceElementsopt is evaluated as follows: +es5id: 13.0-9-s +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + a FunctionDeclaration that is contained in strict mode code has an + inner function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var _13_0_9_fun = function () { + function _13_0_9_inner() { eval("eval = 42;"); } + _13_0_9_inner(); + }; + try { + _13_0_9_fun(); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.0/13.0_4-17gs.js b/test/suite/ch13/13.0/13.0_4-17gs.js index c5eb743021..fe927783c9 100644 --- a/test/suite/ch13/13.0/13.0_4-17gs.js +++ b/test/suite/ch13/13.0/13.0_4-17gs.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch13/13.0/13.0_4-17gs.js - * @description Strict Mode - SourceElements is not evaluated as strict mode code when a Function constructor is contained in strict mode code - * @onlyStrict - * @negative NotEarlyError - */ - -"use strict"; -var _13_0_4_17_fun = new Function('eval = 42;'); -throw NotEarlyError; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.0_4-17gs +description: > + Strict Mode - SourceElements is not evaluated as strict mode code + when a Function constructor is contained in strict mode code +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +"use strict"; +var _13_0_4_17_fun = new Function('eval = 42;'); +throw new Test262Error(); diff --git a/test/suite/ch13/13.0/13.0_4-5gs.js b/test/suite/ch13/13.0/13.0_4-5gs.js index 4f9c013259..b5d43182aa 100644 --- a/test/suite/ch13/13.0/13.0_4-5gs.js +++ b/test/suite/ch13/13.0/13.0_4-5gs.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch13/13.0/13.0_4-5gs.js - * @description Strict Mode - SourceElements is evaluated as strict mode code when a FunctionDeclaration is contained in strict mode code - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -throw NotEarlyError; -function _13_0_4_5_fun() { eval = 42; }; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.0_4-5gs +description: > + Strict Mode - SourceElements is evaluated as strict mode code when + a FunctionDeclaration is contained in strict mode code +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +function _13_0_4_5_fun() { eval = 42; }; diff --git a/test/suite/ch13/13.0/S13_A1.js b/test/suite/ch13/13.0/S13_A1.js index 8d0a905af6..104b16b0d3 100644 --- a/test/suite/ch13/13.0/S13_A1.js +++ b/test/suite/ch13/13.0/S13_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "x=function y(){}" statement does not store a reference to the new function in the varaible y(Identifier) - * - * @path ch13/13.0/S13_A1.js - * @description Checking the type of y - */ +/*--- +info: > + "x=function y(){}" statement does not store a reference to the new + function in the varaible y(Identifier) +es5id: 13_A1 +description: Checking the type of y +---*/ var __func = function __exp__func(){return 0;}; @@ -28,4 +29,3 @@ if (typeof __exp__func !== "undefined"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A10.js b/test/suite/ch13/13.0/S13_A10.js index dd85f242bd..cfc8bf53b0 100644 --- a/test/suite/ch13/13.0/S13_A10.js +++ b/test/suite/ch13/13.0/S13_A10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function is a data - * - * @path ch13/13.0/S13_A10.js - * @description Using function as a property of an object - */ +/*--- +info: Function is a data +es5id: 13_A10 +description: Using function as a property of an object +---*/ function __ziggy__func(){return "ziggy stardust"} @@ -29,4 +28,3 @@ if (__music_box.ziggy() !== "ziggy stardust") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A11_T1.js b/test/suite/ch13/13.0/S13_A11_T1.js index e9dc0e39ab..8f60d3a26a 100644 --- a/test/suite/ch13/13.0/S13_A11_T1.js +++ b/test/suite/ch13/13.0/S13_A11_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since arguments property has attribute { DontDelete }, only its elements can be deleted - * - * @path ch13/13.0/S13_A11_T1.js - * @description Returning result of "delete arguments" - */ +/*--- +info: > + Since arguments property has attribute { DontDelete }, only its elements + can be deleted +es5id: 13_A11_T1 +description: Returning result of "delete arguments" +---*/ function __func(){ return delete arguments;} @@ -17,4 +18,3 @@ if (__func("A","B",1,2)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A11_T2.js b/test/suite/ch13/13.0/S13_A11_T2.js index 18886a3073..430413931a 100644 --- a/test/suite/ch13/13.0/S13_A11_T2.js +++ b/test/suite/ch13/13.0/S13_A11_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since arguments property has attribute { DontDelete }, only its elements can be deleted - * - * @path ch13/13.0/S13_A11_T2.js - * @description Checking if deleting the arguments property fails and then returning it - */ +/*--- +info: > + Since arguments property has attribute { DontDelete }, only its elements + can be deleted +es5id: 13_A11_T2 +description: > + Checking if deleting the arguments property fails and then + returning it +---*/ function __func(){ delete arguments; @@ -20,4 +23,3 @@ if (typeof __func("A","B",1,2) !== "object") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A11_T3.js b/test/suite/ch13/13.0/S13_A11_T3.js index 94345da8f3..6b7fd85b78 100644 --- a/test/suite/ch13/13.0/S13_A11_T3.js +++ b/test/suite/ch13/13.0/S13_A11_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since arguments property has attribute { DontDelete }, only its elements can be deleted - * - * @path ch13/13.0/S13_A11_T3.js - * @description Deleting arguments[i] and returning result of the operation - */ +/*--- +info: > + Since arguments property has attribute { DontDelete }, only its elements + can be deleted +es5id: 13_A11_T3 +description: Deleting arguments[i] and returning result of the operation +---*/ function __func(){ was_del=false; @@ -22,4 +23,3 @@ if (!__func("A","B",1,2)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A11_T4.js b/test/suite/ch13/13.0/S13_A11_T4.js index c107879cda..583c65c319 100644 --- a/test/suite/ch13/13.0/S13_A11_T4.js +++ b/test/suite/ch13/13.0/S13_A11_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since arguments property has attribute { DontDelete }, only its elements can be deleted - * - * @path ch13/13.0/S13_A11_T4.js - * @description Deleting arguments[i] and checking the type of arguments[i] - */ +/*--- +info: > + Since arguments property has attribute { DontDelete }, only its elements + can be deleted +es5id: 13_A11_T4 +description: Deleting arguments[i] and checking the type of arguments[i] +---*/ function __func(){ is_undef=true; @@ -25,4 +26,3 @@ if (!__func("A","B",1,2)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A12_T1.js b/test/suite/ch13/13.0/S13_A12_T1.js index 278a46ac67..5d927f44f6 100644 --- a/test/suite/ch13/13.0/S13_A12_T1.js +++ b/test/suite/ch13/13.0/S13_A12_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declarations in global or function scope are {DontDelete} - * - * @path ch13/13.0/S13_A12_T1.js - * @description Checking if deleting a function that is declared in global scope fails - */ +/*--- +info: Function declarations in global or function scope are {DontDelete} +es5id: 13_A12_T1 +description: > + Checking if deleting a function that is declared in global scope + fails +---*/ ALIVE="Letov is alive" @@ -29,4 +30,3 @@ if (__func() !== ALIVE) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A12_T2.js b/test/suite/ch13/13.0/S13_A12_T2.js index 08ea182474..24f83d0c3c 100644 --- a/test/suite/ch13/13.0/S13_A12_T2.js +++ b/test/suite/ch13/13.0/S13_A12_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function declarations in global or function scope are {DontDelete} - * - * @path ch13/13.0/S13_A12_T2.js - * @description Checking if deleting a function that is declared in function scope fails - */ +/*--- +info: Function declarations in global or function scope are {DontDelete} +es5id: 13_A12_T2 +description: > + Checking if deleting a function that is declared in function scope + fails +---*/ ALIVE="Letov is alive" @@ -34,4 +35,3 @@ function __cont(){ }; __cont(); - diff --git a/test/suite/ch13/13.0/S13_A13_T1.js b/test/suite/ch13/13.0/S13_A13_T1.js index 0729661968..509e98ed1d 100644 --- a/test/suite/ch13/13.0/S13_A13_T1.js +++ b/test/suite/ch13/13.0/S13_A13_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting arguments[i] leads to breaking the connection to local reference - * - * @path ch13/13.0/S13_A13_T1.js - * @description Deleting arguments[i] - */ +/*--- +info: Deleting arguments[i] leads to breaking the connection to local reference +es5id: 13_A13_T1 +description: Deleting arguments[i] +---*/ function __func(__arg){ delete arguments[0]; @@ -23,4 +22,3 @@ if (__func(1) !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A13_T2.js b/test/suite/ch13/13.0/S13_A13_T2.js index 49ba62ada9..2ca9ca3bbf 100644 --- a/test/suite/ch13/13.0/S13_A13_T2.js +++ b/test/suite/ch13/13.0/S13_A13_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting arguments[i] leads to breaking the connection to local reference - * - * @path ch13/13.0/S13_A13_T2.js - * @description Changing arguments value and then deleting the argument - */ +/*--- +info: Deleting arguments[i] leads to breaking the connection to local reference +es5id: 13_A13_T2 +description: Changing arguments value and then deleting the argument +---*/ function __func(__arg){ __arg = 2; @@ -24,4 +23,3 @@ if (__func(1) !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A13_T3.js b/test/suite/ch13/13.0/S13_A13_T3.js index 7151500184..73260e9390 100644 --- a/test/suite/ch13/13.0/S13_A13_T3.js +++ b/test/suite/ch13/13.0/S13_A13_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Deleting arguments[i] leads to breaking the connection to local reference - * - * @path ch13/13.0/S13_A13_T3.js - * @description Changing argument value, deleting the argument and then defining a new value for arguments[i] - */ +/*--- +info: Deleting arguments[i] leads to breaking the connection to local reference +es5id: 13_A13_T3 +description: > + Changing argument value, deleting the argument and then defining a + new value for arguments[i] +---*/ function __func(__arg){ __arg = 2; @@ -28,4 +29,3 @@ if (__func(1) !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A14.js b/test/suite/ch13/13.0/S13_A14.js index 7d5bc732f6..b323b1bce8 100644 --- a/test/suite/ch13/13.0/S13_A14.js +++ b/test/suite/ch13/13.0/S13_A14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Unicode symbols in function name are allowed - * - * @path ch13/13.0/S13_A14.js - * @description Defining function name with unicode symbols - */ +/*--- +info: Unicode symbols in function name are allowed +es5id: 13_A14 +description: Defining function name with unicode symbols +---*/ eval("function __func\u0041(__arg){return __arg;};"); @@ -17,4 +16,3 @@ if (typeof __funcA !== "function") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A15_T1.js b/test/suite/ch13/13.0/S13_A15_T1.js index 74531f8c56..7255675703 100644 --- a/test/suite/ch13/13.0/S13_A15_T1.js +++ b/test/suite/ch13/13.0/S13_A15_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ''arguments'' variable overrides ActivationObject.arguments - * - * @path ch13/13.0/S13_A15_T1.js - * @description Declaring a function with "__func(arguments)" - */ +/*--- +info: "''arguments'' variable overrides ActivationObject.arguments" +es5id: 13_A15_T1 +description: Declaring a function with "__func(arguments)" +---*/ function __func(arguments){ return arguments; @@ -19,4 +18,3 @@ if (__func(42) !== 42) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A15_T2.js b/test/suite/ch13/13.0/S13_A15_T2.js index 77e7c847b6..f3bf4276ec 100644 --- a/test/suite/ch13/13.0/S13_A15_T2.js +++ b/test/suite/ch13/13.0/S13_A15_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ''arguments'' variable overrides ActivationObject.arguments - * - * @path ch13/13.0/S13_A15_T2.js - * @description Overriding arguments within functions body - */ +/*--- +info: "''arguments'' variable overrides ActivationObject.arguments" +es5id: 13_A15_T2 +description: Overriding arguments within functions body +---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; @@ -22,4 +21,3 @@ if (__func(42,42,42) !== THE_ANSWER) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A15_T3.js b/test/suite/ch13/13.0/S13_A15_T3.js index 4ba50e7177..2931c034dc 100644 --- a/test/suite/ch13/13.0/S13_A15_T3.js +++ b/test/suite/ch13/13.0/S13_A15_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ''arguments'' variable overrides ActivationObject.arguments - * - * @path ch13/13.0/S13_A15_T3.js - * @description Declaring a variable named with "arguments" without a function - */ +/*--- +info: "''arguments'' variable overrides ActivationObject.arguments" +es5id: 13_A15_T3 +description: Declaring a variable named with "arguments" without a function +---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; @@ -32,4 +31,3 @@ if (__func("The Ultimate Question") !== "The Ultimate Question") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A15_T4.js b/test/suite/ch13/13.0/S13_A15_T4.js index a71b348333..72acf77b12 100644 --- a/test/suite/ch13/13.0/S13_A15_T4.js +++ b/test/suite/ch13/13.0/S13_A15_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ''arguments'' variable overrides ActivationObject.arguments - * - * @path ch13/13.0/S13_A15_T4.js - * @description Declaring a variable named with "arguments" and following a "return" statement within a function body - */ +/*--- +info: "''arguments'' variable overrides ActivationObject.arguments" +es5id: 13_A15_T4 +description: > + Declaring a variable named with "arguments" and following a + "return" statement within a function body +---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; @@ -22,4 +23,3 @@ if (__func(42,42,42) !== "object") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A15_T5.js b/test/suite/ch13/13.0/S13_A15_T5.js index 4896a19c22..5e2cf9e661 100644 --- a/test/suite/ch13/13.0/S13_A15_T5.js +++ b/test/suite/ch13/13.0/S13_A15_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * ''arguments'' variable overrides ActivationObject.arguments - * - * @path ch13/13.0/S13_A15_T5.js - * @description Creating a variable named with "arguments" without a function - */ +/*--- +info: "''arguments'' variable overrides ActivationObject.arguments" +es5id: 13_A15_T5 +description: Creating a variable named with "arguments" without a function +---*/ THE_ANSWER="Answer to Life, the Universe, and Everything"; @@ -31,4 +30,3 @@ if (__func("The Ultimate Question") === "The Ultimate Question") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A16.js b/test/suite/ch13/13.0/S13_A16.js index 8b8ee7080f..6d2bdbea98 100644 --- a/test/suite/ch13/13.0/S13_A16.js +++ b/test/suite/ch13/13.0/S13_A16.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Any separators are admitted between declaration chunks - * - * @path ch13/13.0/S13_A16.js - * @description Inserting separators between declaration chunks - */ +/*--- +info: Any separators are admitted between declaration chunks +es5id: 13_A16 +description: Inserting separators between declaration chunks +---*/ function x @@ -41,4 +40,3 @@ z(); eval("function\u0009\u2029w(\u000C)\u00A0{\u000D};"); w(); - diff --git a/test/suite/ch13/13.0/S13_A17_T1.js b/test/suite/ch13/13.0/S13_A17_T1.js index 1ea6c287a1..20cad1d2e0 100644 --- a/test/suite/ch13/13.0/S13_A17_T1.js +++ b/test/suite/ch13/13.0/S13_A17_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function call cannot appear in the program before the FunctionExpression appears - * - * @path ch13/13.0/S13_A17_T1.js - * @description Trying to call a function before the FunctionExpression appears - */ +/*--- +info: > + Function call cannot appear in the program before the FunctionExpression + appears +es5id: 13_A17_T1 +description: Trying to call a function before the FunctionExpression appears +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -42,4 +44,3 @@ if (__result !== "TWO") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A17_T2.js b/test/suite/ch13/13.0/S13_A17_T2.js index d502d3b46a..803beccbc9 100644 --- a/test/suite/ch13/13.0/S13_A17_T2.js +++ b/test/suite/ch13/13.0/S13_A17_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function call cannot appear in the program before the FunctionExpression appears - * - * @path ch13/13.0/S13_A17_T2.js - * @description Trying to call a function before the FunctionExpression appears and then using the FunctionExpression one more time - */ +/*--- +info: > + Function call cannot appear in the program before the FunctionExpression + appears +es5id: 13_A17_T2 +description: > + Trying to call a function before the FunctionExpression appears + and then using the FunctionExpression one more time +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -43,4 +46,3 @@ if (__result !== "TWO") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A18.js b/test/suite/ch13/13.0/S13_A18.js index 827db75475..e1ec3b9e84 100644 --- a/test/suite/ch13/13.0/S13_A18.js +++ b/test/suite/ch13/13.0/S13_A18.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Closures are admitted - * - * @path ch13/13.0/S13_A18.js - * @description Using a function declaration as a function parameter - */ +/*--- +info: Closures are admitted +es5id: 13_A18 +description: Using a function declaration as a function parameter +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -29,4 +28,3 @@ if (typeof sinx !== 'undefined') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A19_T1.js b/test/suite/ch13/13.0/S13_A19_T1.js index 9bcf1921f3..ae1be8c98b 100644 --- a/test/suite/ch13/13.0/S13_A19_T1.js +++ b/test/suite/ch13/13.0/S13_A19_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "var" does not override function declaration - * - * @path ch13/13.0/S13_A19_T1.js - * @description Creating a function and a variable with identical Identifiers in global scope - */ +/*--- +info: "\"var\" does not override function declaration" +es5id: 13_A19_T1 +description: > + Creating a function and a variable with identical Identifiers in + global scope +---*/ // since "var" does not override function declaration __decl is set to function ////////////////////////////////////////////////////////////////////////////// @@ -29,4 +30,3 @@ if (__decl !== 1) { ////////////////////////////////////////////////////////////////////////////// function __decl(){return 1;} - diff --git a/test/suite/ch13/13.0/S13_A19_T2.js b/test/suite/ch13/13.0/S13_A19_T2.js index 7757d8be64..f94f0dcfc4 100644 --- a/test/suite/ch13/13.0/S13_A19_T2.js +++ b/test/suite/ch13/13.0/S13_A19_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "var" does not override function declaration - * - * @path ch13/13.0/S13_A19_T2.js - * @description Creating a function and a variable with identical Identifiers within function scope - */ +/*--- +info: "\"var\" does not override function declaration" +es5id: 13_A19_T2 +description: > + Creating a function and a variable with identical Identifiers + within function scope +---*/ (function (){ @@ -31,5 +32,4 @@ ////////////////////////////////////////////////////////////////////////////// function __decl(){return 1;} -})(); - +})(); diff --git a/test/suite/ch13/13.0/S13_A2_T1.js b/test/suite/ch13/13.0/S13_A2_T1.js index b9307ac70f..a761932101 100644 --- a/test/suite/ch13/13.0/S13_A2_T1.js +++ b/test/suite/ch13/13.0/S13_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * function must be evaluated inside the expression - * - * @path ch13/13.0/S13_A2_T1.js - * @description Defining function body with "return arg" - */ +/*--- +info: function must be evaluated inside the expression +es5id: 13_A2_T1 +description: Defining function body with "return arg" +---*/ var x = (function __func(arg){return arg})(1); @@ -26,4 +25,3 @@ if (typeof __func !== 'undefined') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A2_T2.js b/test/suite/ch13/13.0/S13_A2_T2.js index c43c58e791..cee87be37a 100644 --- a/test/suite/ch13/13.0/S13_A2_T2.js +++ b/test/suite/ch13/13.0/S13_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * function must be evaluated inside the expression - * - * @path ch13/13.0/S13_A2_T2.js - * @description Defining function body with "return arg + arguments[1]" - */ +/*--- +info: function must be evaluated inside the expression +es5id: 13_A2_T2 +description: Defining function body with "return arg + arguments[1]" +---*/ var x = (function __func(arg){return arg + arguments[1]})(1,"1"); @@ -26,4 +25,3 @@ if (typeof __func !== 'undefined') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A2_T3.js b/test/suite/ch13/13.0/S13_A2_T3.js index 83d3f24630..64e553652f 100644 --- a/test/suite/ch13/13.0/S13_A2_T3.js +++ b/test/suite/ch13/13.0/S13_A2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * function must be evaluated inside the expression - * - * @path ch13/13.0/S13_A2_T3.js - * @description Defining function body with "return arguments[0] +"-"+ arguments[1]" - */ +/*--- +info: function must be evaluated inside the expression +es5id: 13_A2_T3 +description: > + Defining function body with "return arguments[0] +"-"+ + arguments[1]" +---*/ var x = (function __func(){return arguments[0] +"-"+ arguments[1]})("Obi","Wan"); @@ -26,4 +27,3 @@ if (typeof __func !== 'undefined') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A3_T1.js b/test/suite/ch13/13.0/S13_A3_T1.js index cac7e243d2..1777fe66d7 100644 --- a/test/suite/ch13/13.0/S13_A3_T1.js +++ b/test/suite/ch13/13.0/S13_A3_T1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Identifier in a FunctionExpression can be referenced from inside the FunctionExpression's FunctionBody to allow the function calling itself recursively - * - * @path ch13/13.0/S13_A3_T1.js - * @description Creating a recursive function that calculates factorial, as a variable. - * Function call itself by it`s name - */ +/*--- +info: > + The Identifier in a FunctionExpression can be referenced from inside the + FunctionExpression's FunctionBody to allow the function calling itself + recursively +es5id: 13_A3_T1 +description: > + Creating a recursive function that calculates factorial, as a + variable. Function call itself by it`s name +---*/ var __func = function __exp__func(arg){ if (arg === 1) { @@ -26,4 +29,3 @@ if (fact_of_3 !== 6) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A3_T2.js b/test/suite/ch13/13.0/S13_A3_T2.js index 2137666a75..8c8cf985a7 100644 --- a/test/suite/ch13/13.0/S13_A3_T2.js +++ b/test/suite/ch13/13.0/S13_A3_T2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Identifier in a FunctionExpression can be referenced from inside the FunctionExpression's FunctionBody to allow the function calling itself recursively - * - * @path ch13/13.0/S13_A3_T2.js - * @description Creating a recursive function that calculates factorial, as a variable. - * Function calls itself by the name of the variable - */ +/*--- +info: > + The Identifier in a FunctionExpression can be referenced from inside the + FunctionExpression's FunctionBody to allow the function calling itself + recursively +es5id: 13_A3_T2 +description: > + Creating a recursive function that calculates factorial, as a + variable. Function calls itself by the name of the variable +---*/ var __func = function (arg){ if (arg === 1) { @@ -26,4 +29,3 @@ if (fact_of_3 !== 6) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A3_T3.js b/test/suite/ch13/13.0/S13_A3_T3.js index 467f3fea51..83d6006cfb 100644 --- a/test/suite/ch13/13.0/S13_A3_T3.js +++ b/test/suite/ch13/13.0/S13_A3_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Identifier in a FunctionExpression can be referenced from inside the FunctionExpression's FunctionBody to allow the function calling itself recursively - * - * @path ch13/13.0/S13_A3_T3.js - * @description Creating simple recursive function that calculates factorial - */ +/*--- +info: > + The Identifier in a FunctionExpression can be referenced from inside the + FunctionExpression's FunctionBody to allow the function calling itself + recursively +es5id: 13_A3_T3 +description: Creating simple recursive function that calculates factorial +---*/ function __func(arg){ if (arg === 1) { @@ -25,4 +27,3 @@ if (fact_of_3 !== 6) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A4_T1.js b/test/suite/ch13/13.0/S13_A4_T1.js index 4532071585..a92d0cb48f 100644 --- a/test/suite/ch13/13.0/S13_A4_T1.js +++ b/test/suite/ch13/13.0/S13_A4_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production FunctionDeclaration: "function Identifier ( FormalParameterList_opt ) { FunctionBody }" is processed by function declarations - * - * @path ch13/13.0/S13_A4_T1.js - * @description Declaring a function that returns string - */ +/*--- +info: > + The production FunctionDeclaration: "function Identifier ( + FormalParameterList_opt ) { FunctionBody }" is processed by function + declarations +es5id: 13_A4_T1 +description: Declaring a function that returns string +---*/ function __func(){return "zig-zig-sputnik";}; @@ -25,4 +27,3 @@ if (__func() !== "zig-zig-sputnik") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A4_T2.js b/test/suite/ch13/13.0/S13_A4_T2.js index d7b4a27887..4fbf5df9ae 100644 --- a/test/suite/ch13/13.0/S13_A4_T2.js +++ b/test/suite/ch13/13.0/S13_A4_T2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production FunctionDeclaration: "function Identifier ( FormalParameterList_opt ) { FunctionBody }" is processed by function declarations - * - * @path ch13/13.0/S13_A4_T2.js - * @description Declaring a function that uses prefix increment operator within its "return" Expression - */ +/*--- +info: > + The production FunctionDeclaration: "function Identifier ( + FormalParameterList_opt ) { FunctionBody }" is processed by function + declarations +es5id: 13_A4_T2 +description: > + Declaring a function that uses prefix increment operator within + its "return" Expression +---*/ function __func(arg){return ++arg;}; @@ -25,4 +29,3 @@ if (__func(1) !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A4_T3.js b/test/suite/ch13/13.0/S13_A4_T3.js index 6595f4f773..845b3c4065 100644 --- a/test/suite/ch13/13.0/S13_A4_T3.js +++ b/test/suite/ch13/13.0/S13_A4_T3.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production FunctionDeclaration: "function Identifier ( FormalParameterList_opt ) { FunctionBody }" is processed by function declarations - * - * @path ch13/13.0/S13_A4_T3.js - * @description Declaring a function that uses arithmetical operators within its "return" Expression - */ +/*--- +info: > + The production FunctionDeclaration: "function Identifier ( + FormalParameterList_opt ) { FunctionBody }" is processed by function + declarations +es5id: 13_A4_T3 +description: > + Declaring a function that uses arithmetical operators within its + "return" Expression +---*/ function __func(arg1, arg2, arg3){return arg1+=(arg2+=arg3);}; @@ -25,4 +29,3 @@ if (__func(10, 20, 30) !== 60) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A4_T4.js b/test/suite/ch13/13.0/S13_A4_T4.js index 7330bd80f4..714f2d5c1d 100644 --- a/test/suite/ch13/13.0/S13_A4_T4.js +++ b/test/suite/ch13/13.0/S13_A4_T4.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production FunctionDeclaration: "function Identifier ( FormalParameterList_opt ) { FunctionBody }" is processed by function declarations - * - * @path ch13/13.0/S13_A4_T4.js - * @description Declaring a function that uses strings concatenaion opeator within its "return" Expression - */ +/*--- +info: > + The production FunctionDeclaration: "function Identifier ( + FormalParameterList_opt ) { FunctionBody }" is processed by function + declarations +es5id: 13_A4_T4 +description: > + Declaring a function that uses strings concatenaion opeator within + its "return" Expression +---*/ function __func(){return arguments[0].name + " " + arguments[0].surname;}; @@ -43,4 +47,3 @@ if (func__({name:'john', surname:'lennon'}) !== "john lennon") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A6_T1.js b/test/suite/ch13/13.0/S13_A6_T1.js index 2cdd537093..a20a1a6e38 100644 --- a/test/suite/ch13/13.0/S13_A6_T1.js +++ b/test/suite/ch13/13.0/S13_A6_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration can be overrided by other FunctionDeclaration with the same Identifier - * - * @path ch13/13.0/S13_A6_T1.js - * @description Duplicating function declaration - */ +/*--- +info: > + FunctionDeclaration can be overrided by other FunctionDeclaration with + the same Identifier +es5id: 13_A6_T1 +description: Duplicating function declaration +---*/ function __func(){return 1}; @@ -33,4 +34,3 @@ if (__1 !== __A) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A6_T2.js b/test/suite/ch13/13.0/S13_A6_T2.js index 6268e06e27..c6e0092f71 100644 --- a/test/suite/ch13/13.0/S13_A6_T2.js +++ b/test/suite/ch13/13.0/S13_A6_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration can be overrided by other FunctionDeclaration with the same Identifier - * - * @path ch13/13.0/S13_A6_T2.js - * @description Calling a function before it is declared one more time - */ +/*--- +info: > + FunctionDeclaration can be overrided by other FunctionDeclaration with + the same Identifier +es5id: 13_A6_T2 +description: Calling a function before it is declared one more time +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -33,4 +35,3 @@ if (__result !== "SECOND") { ////////////////////////////////////////////////////////////////////////////// function __func(){return "SECOND";}; - diff --git a/test/suite/ch13/13.0/S13_A7_T1.js b/test/suite/ch13/13.0/S13_A7_T1.js index b83e6e1409..7c14554477 100644 --- a/test/suite/ch13/13.0/S13_A7_T1.js +++ b/test/suite/ch13/13.0/S13_A7_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The FunctionBody must be SourceElements - * - * @path ch13/13.0/S13_A7_T1.js - * @description Using only SourceElements within the FunctionBody - */ +/*--- +info: The FunctionBody must be SourceElements +es5id: 13_A7_T1 +description: Using only SourceElements within the FunctionBody +---*/ function __func(){'ground control to major tom'}; ////////////////////////////////////////////////////////////////////////////// @@ -70,4 +69,3 @@ if (typeof __func__6 !== "function") { //} // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A7_T2.js b/test/suite/ch13/13.0/S13_A7_T2.js index 6b381b7943..b4ed77cab5 100644 --- a/test/suite/ch13/13.0/S13_A7_T2.js +++ b/test/suite/ch13/13.0/S13_A7_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The FunctionBody must be SourceElements - * - * @path ch13/13.0/S13_A7_T2.js - * @description Inserting elements that is different from SourceElements into the FunctionBody - */ +/*--- +info: The FunctionBody must be SourceElements +es5id: 13_A7_T2 +description: > + Inserting elements that is different from SourceElements into the + FunctionBody +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -46,4 +47,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A7_T3.js b/test/suite/ch13/13.0/S13_A7_T3.js index e2b893b654..cc00387e21 100644 --- a/test/suite/ch13/13.0/S13_A7_T3.js +++ b/test/suite/ch13/13.0/S13_A7_T3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The FunctionBody must be SourceElements - * - * @path ch13/13.0/S13_A7_T3.js - * @description Checking if execution of "function __func(){\A\B\C}" fails - * @negative - */ +/*--- +info: The FunctionBody must be SourceElements +es5id: 13_A7_T3 +description: Checking if execution of "function __func(){\A\B\C}" fails +flags: [negative] +---*/ function __func(){\A\B\C}; - diff --git a/test/suite/ch13/13.0/S13_A8_T1.js b/test/suite/ch13/13.0/S13_A8_T1.js index d147259ce3..07be720f96 100644 --- a/test/suite/ch13/13.0/S13_A8_T1.js +++ b/test/suite/ch13/13.0/S13_A8_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments property of activation object contains real params to be passed - * - * @path ch13/13.0/S13_A8_T1.js - * @description Creating a function declared with "function __func(param1, param2, param3)" and using arguments.length property in order to perform the test - */ +/*--- +info: Arguments property of activation object contains real params to be passed +es5id: 13_A8_T1 +description: > + Creating a function declared with "function __func(param1, param2, + param3)" and using arguments.length property in order to perform + the test +---*/ - function __func(param1, param2, param3) { +function __func(param1, param2, param3) { return arguments.length; } @@ -27,7 +29,3 @@ if (__func('A', 'B', 1, 2,__func) !== 5) { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch13/13.0/S13_A8_T2.js b/test/suite/ch13/13.0/S13_A8_T2.js index 6e4b3f05c5..778fde9179 100644 --- a/test/suite/ch13/13.0/S13_A8_T2.js +++ b/test/suite/ch13/13.0/S13_A8_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Arguments property of activation object contains real params to be passed - * - * @path ch13/13.0/S13_A8_T2.js - * @description Creating a function with no parameters and using arguments.length property in order to perform the test - */ +/*--- +info: Arguments property of activation object contains real params to be passed +es5id: 13_A8_T2 +description: > + Creating a function with no parameters and using arguments.length + property in order to perform the test +---*/ - function __func() { +function __func() { return arguments.length; } @@ -35,4 +36,3 @@ if (__func() !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.0/S13_A9.js b/test/suite/ch13/13.0/S13_A9.js index c13119af97..d15be5c50a 100644 --- a/test/suite/ch13/13.0/S13_A9.js +++ b/test/suite/ch13/13.0/S13_A9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function can be passed as argument - * - * @path ch13/13.0/S13_A9.js - * @description Using function as argument of another function - */ +/*--- +info: Function can be passed as argument +es5id: 13_A9 +description: Using function as argument of another function +---*/ function __func__INC(arg){return arg + 1;}; function __func__MULT(incrementator, arg, mult){ return incrementator(arg)*mult; }; @@ -18,5 +17,3 @@ if (__func__MULT(__func__INC, 2, 2) !== 6) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.1/13.1-1-1.js b/test/suite/ch13/13.1/13.1-1-1.js index a30103edcf..1b83c23a85 100644 --- a/test/suite/ch13/13.1/13.1-1-1.js +++ b/test/suite/ch13/13.1/13.1-1-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-1-1.js - * @description Duplicate identifier allowed in non-strict function declaration parameter list - */ - - -function testcase() -{ - try - { - eval('function foo(a,a){}'); - return true; - } - catch (e) { return false } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-1-1 +description: > + Duplicate identifier allowed in non-strict function declaration + parameter list +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval('function foo(a,a){}'); + return true; + } + catch (e) { return false } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-1-2.js b/test/suite/ch13/13.1/13.1-1-2.js index dc6708fb48..9b7ba19eab 100644 --- a/test/suite/ch13/13.1/13.1-1-2.js +++ b/test/suite/ch13/13.1/13.1-1-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-1-2.js - * @description Duplicate identifier allowed in non-strict function expression parameter list - */ - - -function testcase() -{ - try - { - eval('(function foo(a,a){})'); - return true; - } - catch (e) { return false } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-1-2 +description: > + Duplicate identifier allowed in non-strict function expression + parameter list +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval('(function foo(a,a){})'); + return true; + } + catch (e) { return false } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-1-s.js b/test/suite/ch13/13.1/13.1-1-s.js index 4768b20729..9c6282ea1d 100644 --- a/test/suite/ch13/13.1/13.1-1-s.js +++ b/test/suite/ch13/13.1/13.1-1-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-1-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("function _13_1_1_fun(eval) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-1-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionDeclaration +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("function _13_1_1_fun(eval) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-10-s.js b/test/suite/ch13/13.1/13.1-10-s.js index 802c13ab4c..e3cb2d0cc6 100644 --- a/test/suite/ch13/13.1/13.1-10-s.js +++ b/test/suite/ch13/13.1/13.1-10-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-10-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has three identical parameters - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var _13_1_10_fun = function (param, param, param) { };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-10-s +description: > + Strict Mode - SyntaxError is thrown if a function is created in + 'strict mode' using a FunctionExpression and the function has + three identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var _13_1_10_fun = function (param, param, param) { };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-11-s.js b/test/suite/ch13/13.1/13.1-11-s.js index 5f63b56279..6bf3d29bd6 100644 --- a/test/suite/ch13/13.1/13.1-11-s.js +++ b/test/suite/ch13/13.1/13.1-11-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-11-s.js - * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration in strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - eval("function eval() { };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-11-s +description: > + StrictMode - SyntaxError is thrown if 'eval' occurs as the + function name of a FunctionDeclaration in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + eval("function eval() { };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-12-s.js b/test/suite/ch13/13.1/13.1-12-s.js index 8ebf40b269..b792d17e2c 100644 --- a/test/suite/ch13/13.1/13.1-12-s.js +++ b/test/suite/ch13/13.1/13.1-12-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-12-s.js - * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression in strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _13_1_12_s = {}; - - try { - eval("_13_1_12_s.x = function eval() {};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-12-s +description: > + StrictMode - SyntaxError is thrown if 'eval' occurs as the + Identifier of a FunctionExpression in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _13_1_12_s = {}; + + try { + eval("_13_1_12_s.x = function eval() {};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-13-s.js b/test/suite/ch13/13.1/13.1-13-s.js index b1eb174217..3a088a4348 100644 --- a/test/suite/ch13/13.1/13.1-13-s.js +++ b/test/suite/ch13/13.1/13.1-13-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-13-s.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the function name of a FunctionDeclaration in strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("function arguments() { };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-13-s +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + function name of a FunctionDeclaration in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("function arguments() { };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-13gs.js b/test/suite/ch13/13.1/13.1-13gs.js index 5287ab343c..0c2f8eb7ed 100644 --- a/test/suite/ch13/13.1/13.1-13gs.js +++ b/test/suite/ch13/13.1/13.1-13gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-13gs.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionDeclaration - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -function arguments() { }; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-13gs +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + Identifier of a FunctionDeclaration +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +function arguments() { }; diff --git a/test/suite/ch13/13.1/13.1-14-s.js b/test/suite/ch13/13.1/13.1-14-s.js index 4841cee187..fa03f343b4 100644 --- a/test/suite/ch13/13.1/13.1-14-s.js +++ b/test/suite/ch13/13.1/13.1-14-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-14-s.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression in strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - var _13_1_14_s = {}; - - try { - eval("_13_1_14_s.x = function arguments() {};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-14-s +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + Identifier of a FunctionExpression in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + var _13_1_14_s = {}; + + try { + eval("_13_1_14_s.x = function arguments() {};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-15-s.js b/test/suite/ch13/13.1/13.1-15-s.js index 0f49d0b973..67bd1fdf00 100644 --- a/test/suite/ch13/13.1/13.1-15-s.js +++ b/test/suite/ch13/13.1/13.1-15-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-15-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration in strict eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict';function _13_1_15_fun(eval) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-15-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionDeclaration in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict';function _13_1_15_fun(eval) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-16-s.js b/test/suite/ch13/13.1/13.1-16-s.js index 4dd74265a7..4e699d198a 100644 --- a/test/suite/ch13/13.1/13.1-16-s.js +++ b/test/suite/ch13/13.1/13.1-16-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-16-s.js - * @description StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration when FuctionBody is strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("function _13_1_16_fun(eval) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-16-s +description: > + StrictMode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionDeclaration when FuctionBody is strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("function _13_1_16_fun(eval) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-17-s.js b/test/suite/ch13/13.1/13.1-17-s.js index e38ee27c6e..c30d0ba5e0 100644 --- a/test/suite/ch13/13.1/13.1-17-s.js +++ b/test/suite/ch13/13.1/13.1-17-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-17-s.js - * @description StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression in strict eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; var _13_1_17_fun = function (eval) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-17-s +description: > + StrictMode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionExpression in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; var _13_1_17_fun = function (eval) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-18-s.js b/test/suite/ch13/13.1/13.1-18-s.js index 51668c621a..e852949774 100644 --- a/test/suite/ch13/13.1/13.1-18-s.js +++ b/test/suite/ch13/13.1/13.1-18-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-18-s.js - * @description StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression when FuctionBody is strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var _13_1_18_fun = function (eval) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-18-s +description: > + StrictMode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionExpression when FuctionBody is strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var _13_1_18_fun = function (eval) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-19-s.js b/test/suite/ch13/13.1/13.1-19-s.js index a063fba9f0..1d6c6e4594 100644 --- a/test/suite/ch13/13.1/13.1-19-s.js +++ b/test/suite/ch13/13.1/13.1-19-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-19-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration in strict eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict';function _13_1_19_fun(arguments) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-19-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionDeclaration in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict';function _13_1_19_fun(arguments) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-1gs.js b/test/suite/ch13/13.1/13.1-1gs.js index bc49712917..cfb1b8e67d 100644 --- a/test/suite/ch13/13.1/13.1-1gs.js +++ b/test/suite/ch13/13.1/13.1-1gs.js @@ -1,14 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-1gs.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -function _13_1_1_fun(eval) { } \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-1gs +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionDeclaration +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +function _13_1_1_fun(eval) { } diff --git a/test/suite/ch13/13.1/13.1-2-1.js b/test/suite/ch13/13.1/13.1-2-1.js index 8d4155037c..018f0098c8 100644 --- a/test/suite/ch13/13.1/13.1-2-1.js +++ b/test/suite/ch13/13.1/13.1-2-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-2-1.js - * @description eval allowed as formal parameter name of a non-strict function declaration - */ - - -function testcase() -{ - try - { - eval("function foo(eval){};"); - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-2-1 +description: > + eval allowed as formal parameter name of a non-strict function + declaration +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval("function foo(eval){};"); + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-2-2.js b/test/suite/ch13/13.1/13.1-2-2.js index 04e19c1a67..b60482d5ed 100644 --- a/test/suite/ch13/13.1/13.1-2-2.js +++ b/test/suite/ch13/13.1/13.1-2-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-2-2.js - * @description eval allowed as formal parameter name of a non-strict function expression - */ - - -function testcase() -{ - eval("(function foo(eval){});"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-2-2 +description: > + eval allowed as formal parameter name of a non-strict function + expression +includes: [runTestCase.js] +---*/ + +function testcase() +{ + eval("(function foo(eval){});"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-2-5.js b/test/suite/ch13/13.1/13.1-2-5.js index e60842ff16..9b069fbf61 100644 --- a/test/suite/ch13/13.1/13.1-2-5.js +++ b/test/suite/ch13/13.1/13.1-2-5.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-2-5.js - * @description arguments allowed as formal parameter name of a non-strict function declaration - */ - - -function testcase() -{ - try - { - eval("function foo(arguments){};"); - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-2-5 +description: > + arguments allowed as formal parameter name of a non-strict + function declaration +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval("function foo(arguments){};"); + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-2-6.js b/test/suite/ch13/13.1/13.1-2-6.js index ce9b76b3c9..0bfb81b09c 100644 --- a/test/suite/ch13/13.1/13.1-2-6.js +++ b/test/suite/ch13/13.1/13.1-2-6.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-2-6.js - * @description arguments allowed as formal parameter name of a non-strict function expression - */ - - -function testcase() -{ - eval("(function foo(arguments){});"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-2-6 +description: > + arguments allowed as formal parameter name of a non-strict + function expression +includes: [runTestCase.js] +---*/ + +function testcase() +{ + eval("(function foo(arguments){});"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-2-s.js b/test/suite/ch13/13.1/13.1-2-s.js index 0e3c4473a8..9514ede901 100644 --- a/test/suite/ch13/13.1/13.1-2-s.js +++ b/test/suite/ch13/13.1/13.1-2-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-2-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var _13_1_2_fun = function (eval) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-2-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'eval' + appears within a FormalParameterList of a strict mode + FunctionExpression +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var _13_1_2_fun = function (eval) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-20-s.js b/test/suite/ch13/13.1/13.1-20-s.js index 064bc4deba..1108b1573b 100644 --- a/test/suite/ch13/13.1/13.1-20-s.js +++ b/test/suite/ch13/13.1/13.1-20-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-20-s.js - * @description StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration when FuctionBody is strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("function _13_1_20_fun(arguments) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-20-s +description: > + StrictMode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionDeclaration when FuctionBody is strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("function _13_1_20_fun(arguments) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-21-s.js b/test/suite/ch13/13.1/13.1-21-s.js index 2bf1270832..0ab8935177 100644 --- a/test/suite/ch13/13.1/13.1-21-s.js +++ b/test/suite/ch13/13.1/13.1-21-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-21-s.js - * @description StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression in strict eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; var _13_1_21_fun = function (arguments) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-21-s +description: > + StrictMode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionExpression in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; var _13_1_21_fun = function (arguments) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-22-s.js b/test/suite/ch13/13.1/13.1-22-s.js index 38e2e97263..7359b8fc78 100644 --- a/test/suite/ch13/13.1/13.1-22-s.js +++ b/test/suite/ch13/13.1/13.1-22-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-22-s.js - * @description StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression when FuctionBody is strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var _13_1_22_fun = function (arguments) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-22-s +description: > + StrictMode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionExpression when FuctionBody is strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var _13_1_22_fun = function (arguments) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-23-s.js b/test/suite/ch13/13.1/13.1-23-s.js index 7480440894..d7606ed582 100644 --- a/test/suite/ch13/13.1/13.1-23-s.js +++ b/test/suite/ch13/13.1/13.1-23-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-23-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has two identical parameters - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function _13_1_23_fun(param, param) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-23-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionDeclaration that is contained in eval strict code and + the function has two identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function _13_1_23_fun(param, param) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-24-s.js b/test/suite/ch13/13.1/13.1-24-s.js index b39fc5c191..7da4126fff 100644 --- a/test/suite/ch13/13.1/13.1-24-s.js +++ b/test/suite/ch13/13.1/13.1-24-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-24-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has two identical parameters - * @onlyStrict - */ - - -function testcase() { - - try { - eval("function _13_1_24_fun(param, param) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-24-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionDeclaration whose FunctionBody is contained in strict + code and the function has two identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("function _13_1_24_fun(param, param) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-25-s.js b/test/suite/ch13/13.1/13.1-25-s.js index 45b0026b57..1b3eb485c0 100644 --- a/test/suite/ch13/13.1/13.1-25-s.js +++ b/test/suite/ch13/13.1/13.1-25-s.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-25-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has two identical parameters which are separated by a unique parameter name - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-25-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionDeclaration that is contained in eval strict code and + the function has two identical parameters which are separated by a + unique parameter name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-26-s.js b/test/suite/ch13/13.1/13.1-26-s.js index c9f9410fd0..213c2481f5 100644 --- a/test/suite/ch13/13.1/13.1-26-s.js +++ b/test/suite/ch13/13.1/13.1-26-s.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-26-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has two identical parameters which are separated by a unique parameter name - * @onlyStrict - */ - - -function testcase() { - - try { - eval("function _13_1_26_fun(param1, param2, param1) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-26-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionDeclaration whose FunctionBody is contained in strict + code and the function has two identical parameters which are + separated by a unique parameter name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("function _13_1_26_fun(param1, param2, param1) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-27-s.js b/test/suite/ch13/13.1/13.1-27-s.js index aa50843325..d39a883dd8 100644 --- a/test/suite/ch13/13.1/13.1-27-s.js +++ b/test/suite/ch13/13.1/13.1-27-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-27-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has three identical parameters - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function _13_1_27_fun(param, param, param) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-27-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionDeclaration that is contained in eval strict code and + the function has three identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function _13_1_27_fun(param, param, param) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-28-s.js b/test/suite/ch13/13.1/13.1-28-s.js index 1dbda4fc56..522239054d 100644 --- a/test/suite/ch13/13.1/13.1-28-s.js +++ b/test/suite/ch13/13.1/13.1-28-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-28-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has three identical parameters - * @onlyStrict - */ - - -function testcase() { - - - try { - eval("function _13_1_28_fun(param, param, param) { 'use strict'; }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-28-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionDeclaration whose FunctionBody is contained in strict + code and the function has three identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + + try { + eval("function _13_1_28_fun(param, param, param) { 'use strict'; }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-29-s.js b/test/suite/ch13/13.1/13.1-29-s.js index a7c74290d6..667efb867e 100644 --- a/test/suite/ch13/13.1/13.1-29-s.js +++ b/test/suite/ch13/13.1/13.1-29-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-29-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression that is contained in eval strict code and the function has two identical parameters - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; var _13_1_29_fun = function (param, param) { };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-29-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionExpression that is contained in eval strict code and the + function has two identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; var _13_1_29_fun = function (param, param) { };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-3-1.js b/test/suite/ch13/13.1/13.1-3-1.js index 47598c165e..d75777447d 100644 --- a/test/suite/ch13/13.1/13.1-3-1.js +++ b/test/suite/ch13/13.1/13.1-3-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-3-1.js - * @description eval allowed as function identifier in non-strict function declaration - */ - - -function testcase() -{ - try - { - eval("function eval(){};"); - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-3-1 +description: > + eval allowed as function identifier in non-strict function + declaration +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval("function eval(){};"); + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-3-2.js b/test/suite/ch13/13.1/13.1-3-2.js index 598e3faf65..05b0720315 100644 --- a/test/suite/ch13/13.1/13.1-3-2.js +++ b/test/suite/ch13/13.1/13.1-3-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-3-2.js - * @description eval allowed as function identifier in non-strict function expression - */ - - -function testcase() -{ - try - { - eval("(function eval(){});"); - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-3-2 +description: > + eval allowed as function identifier in non-strict function + expression +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval("(function eval(){});"); + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-3-7.js b/test/suite/ch13/13.1/13.1-3-7.js index c6bbd159ce..0a059e4692 100644 --- a/test/suite/ch13/13.1/13.1-3-7.js +++ b/test/suite/ch13/13.1/13.1-3-7.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-3-7.js - * @description arguments allowed as function identifier in non-strict function declaration - */ - - -function testcase() -{ - try - { - eval("function arguments (){};"); - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-3-7 +description: > + arguments allowed as function identifier in non-strict function + declaration +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval("function arguments (){};"); + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-3-8.js b/test/suite/ch13/13.1/13.1-3-8.js index cd9ef9a2af..356dbc78ae 100644 --- a/test/suite/ch13/13.1/13.1-3-8.js +++ b/test/suite/ch13/13.1/13.1-3-8.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-3-8.js - * @description arguments allowed as function identifier in non-strict function expression - */ - - -function testcase() -{ - try - { - eval("(function arguments (){});"); - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-3-8 +description: > + arguments allowed as function identifier in non-strict function + expression +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + eval("(function arguments (){});"); + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-3-s.js b/test/suite/ch13/13.1/13.1-3-s.js index ecc0385ea0..c161f4321e 100644 --- a/test/suite/ch13/13.1/13.1-3-s.js +++ b/test/suite/ch13/13.1/13.1-3-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-3-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("function _13_1_3_fun(arguments) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-3-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionDeclaration +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("function _13_1_3_fun(arguments) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-30-s.js b/test/suite/ch13/13.1/13.1-30-s.js index b07291c1d3..b15a96e6dc 100644 --- a/test/suite/ch13/13.1/13.1-30-s.js +++ b/test/suite/ch13/13.1/13.1-30-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-30-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression whose FunctionBody is contained in strict code and the function has two identical parameters - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var _13_1_30_fun = function (param, param) { 'use strict'; };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-30-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionExpression whose FunctionBody is contained in strict + code and the function has two identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var _13_1_30_fun = function (param, param) { 'use strict'; };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-31-s.js b/test/suite/ch13/13.1/13.1-31-s.js index 1e47d2acf8..0bb2d09c72 100644 --- a/test/suite/ch13/13.1/13.1-31-s.js +++ b/test/suite/ch13/13.1/13.1-31-s.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-31-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression that is contained in eval strict code and the function has two identical parameters, which are separated by a unique parameter name - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-31-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionExpression that is contained in eval strict code and the + function has two identical parameters, which are separated by a + unique parameter name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-32-s.js b/test/suite/ch13/13.1/13.1-32-s.js index b1a4ef8b12..89f56c568c 100644 --- a/test/suite/ch13/13.1/13.1-32-s.js +++ b/test/suite/ch13/13.1/13.1-32-s.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-32-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression whose FunctionBody is strict and the function has two identical parameters, which are separated by a unique parameter name - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var _13_1_32_fun = function (param1, param2, param1) { 'use strict'; };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-32-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + a FunctionExpression whose FunctionBody is strict and the function + has two identical parameters, which are separated by a unique + parameter name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var _13_1_32_fun = function (param1, param2, param1) { 'use strict'; };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-33-s.js b/test/suite/ch13/13.1/13.1-33-s.js index bcffbd0233..597f37fa93 100644 --- a/test/suite/ch13/13.1/13.1-33-s.js +++ b/test/suite/ch13/13.1/13.1-33-s.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-33-s.js - * @description Strict Mode - SyntaxError is thrown if function is created using a FunctionExpression that is contained in eval strict code and the function has three identical parameters - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-33-s +description: > + Strict Mode - SyntaxError is thrown if function is created using a + FunctionExpression that is contained in eval strict code and the + function has three identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-34-s.js b/test/suite/ch13/13.1/13.1-34-s.js index aca13ea5da..2deee03de6 100644 --- a/test/suite/ch13/13.1/13.1-34-s.js +++ b/test/suite/ch13/13.1/13.1-34-s.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-34-s.js - * @description Strict Mode - SyntaxError is thrown if a function declaration has three identical parameters with a strict mode body - * @onlyStrict - */ - - -function testcase() { - - try { - eval("var _13_1_34_fun = function (param, param, param) { 'use strict'; };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-34-s +description: > + Strict Mode - SyntaxError is thrown if a function declaration has + three identical parameters with a strict mode body +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("var _13_1_34_fun = function (param, param, param) { 'use strict'; };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-35-s.js b/test/suite/ch13/13.1/13.1-35-s.js index ebe7e71f2c..44d33e0722 100644 --- a/test/suite/ch13/13.1/13.1-35-s.js +++ b/test/suite/ch13/13.1/13.1-35-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-35-s.js - * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration in strict eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function eval() { };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-35-s +description: > + StrictMode - SyntaxError is thrown if 'eval' occurs as the + function name of a FunctionDeclaration in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function eval() { };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-36-s.js b/test/suite/ch13/13.1/13.1-36-s.js index 63d08a282c..7d09f629e6 100644 --- a/test/suite/ch13/13.1/13.1-36-s.js +++ b/test/suite/ch13/13.1/13.1-36-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-36-s.js - * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration whose FunctionBody is in strict mode - * @onlyStrict - */ - - -function testcase() { - - try { - eval("function eval() { 'use strict'; };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-36-s +description: > + StrictMode - SyntaxError is thrown if 'eval' occurs as the + function name of a FunctionDeclaration whose FunctionBody is in + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("function eval() { 'use strict'; };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-37-s.js b/test/suite/ch13/13.1/13.1-37-s.js index c2f27c0f1a..e46c8c545b 100644 --- a/test/suite/ch13/13.1/13.1-37-s.js +++ b/test/suite/ch13/13.1/13.1-37-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-37-s.js - * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression in strict eval code - * @onlyStrict - */ - - -function testcase() { - var _13_1_37_s = {}; - try { - eval("'use strict'; _13_1_37_s.x = function eval() {};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-37-s +description: > + StrictMode - SyntaxError is thrown if 'eval' occurs as the + Identifier of a FunctionExpression in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var _13_1_37_s = {}; + try { + eval("'use strict'; _13_1_37_s.x = function eval() {};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-38-s.js b/test/suite/ch13/13.1/13.1-38-s.js index 5d73e72c3a..0fa9123db1 100644 --- a/test/suite/ch13/13.1/13.1-38-s.js +++ b/test/suite/ch13/13.1/13.1-38-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-38-s.js - * @description StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression whose FunctionBody is contained in strict code - * @onlyStrict - */ - - -function testcase() { - var _13_1_38_s = {}; - try { - eval("_13_1_38_s.x = function eval() {'use strict'; };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-38-s +description: > + StrictMode - SyntaxError is thrown if 'eval' occurs as the + Identifier of a FunctionExpression whose FunctionBody is contained + in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var _13_1_38_s = {}; + try { + eval("_13_1_38_s.x = function eval() {'use strict'; };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-39-s.js b/test/suite/ch13/13.1/13.1-39-s.js index 54eb5ee034..c6c02f7400 100644 --- a/test/suite/ch13/13.1/13.1-39-s.js +++ b/test/suite/ch13/13.1/13.1-39-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-39-s.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the function name of a FunctionDeclaration in strict eval code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("'use strict'; function arguments() { };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-39-s +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + function name of a FunctionDeclaration in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("'use strict'; function arguments() { };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-4-s.js b/test/suite/ch13/13.1/13.1-4-s.js index ba0c1cee45..4f1542e607 100644 --- a/test/suite/ch13/13.1/13.1-4-s.js +++ b/test/suite/ch13/13.1/13.1-4-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList - * of a strict mode FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-4-s.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var _13_1_4_fun = function (arguments) { };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs within a FormalParameterList + of a strict mode FunctionDeclaration or FunctionExpression. +es5id: 13.1-4-s +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionExpression +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var _13_1_4_fun = function (arguments) { };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-40-s.js b/test/suite/ch13/13.1/13.1-40-s.js index 42d7bcbba9..a7643915aa 100644 --- a/test/suite/ch13/13.1/13.1-40-s.js +++ b/test/suite/ch13/13.1/13.1-40-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-40-s.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionDeclaration whose FunctionBody is contained in strict code - * @onlyStrict - */ - - -function testcase() { - - try { - eval("function arguments() { 'use strict'; };") - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-40-s +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + Identifier of a FunctionDeclaration whose FunctionBody is + contained in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + eval("function arguments() { 'use strict'; };") + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-41-s.js b/test/suite/ch13/13.1/13.1-41-s.js index 9a9a3ca2b1..a4c0ca0d69 100644 --- a/test/suite/ch13/13.1/13.1-41-s.js +++ b/test/suite/ch13/13.1/13.1-41-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-41-s.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression in strict eval code - * @onlyStrict - */ - - -function testcase() { - var _13_1_41_s = {}; - try { - eval("'use strict'; _13_1_41_s.x = function arguments() {};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-41-s +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + Identifier of a FunctionExpression in strict eval code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var _13_1_41_s = {}; + try { + eval("'use strict'; _13_1_41_s.x = function arguments() {};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-42-s.js b/test/suite/ch13/13.1/13.1-42-s.js index f19d56c98e..355a7ee802 100644 --- a/test/suite/ch13/13.1/13.1-42-s.js +++ b/test/suite/ch13/13.1/13.1-42-s.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-42-s.js - * @description StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression whose FunctionBody is contained in strict code - * @onlyStrict - */ - - -function testcase() { - var _13_1_42_s = {}; - try { - eval("_13_1_42_s.x = function arguments() {'use strict';};"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-42-s +description: > + StrictMode - SyntaxError is thrown if 'arguments' occurs as the + Identifier of a FunctionExpression whose FunctionBody is contained + in strict code +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var _13_1_42_s = {}; + try { + eval("_13_1_42_s.x = function arguments() {'use strict';};"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-4gs.js b/test/suite/ch13/13.1/13.1-4gs.js index 0c501018a9..1f97e1e09b 100644 --- a/test/suite/ch13/13.1/13.1-4gs.js +++ b/test/suite/ch13/13.1/13.1-4gs.js @@ -1,14 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-4gs.js - * @description Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -var _13_1_4_fun = function (arguments) { }; \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-4gs +description: > + Strict Mode - SyntaxError is thrown if the identifier 'arguments' + appears within a FormalParameterList of a strict mode + FunctionExpression +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +var _13_1_4_fun = function (arguments) { }; diff --git a/test/suite/ch13/13.1/13.1-5-s.js b/test/suite/ch13/13.1/13.1-5-s.js index 6d13ca1353..ff2ece54c5 100644 --- a/test/suite/ch13/13.1/13.1-5-s.js +++ b/test/suite/ch13/13.1/13.1-5-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-5-s.js - * @description Strict Mode - SyntaxError is thrown if a function is declared in 'strict mode' using a FunctionDeclaration and the function has two identical parameters - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("function _13_1_5_fun(param, param) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-5-s +description: > + Strict Mode - SyntaxError is thrown if a function is declared in + 'strict mode' using a FunctionDeclaration and the function has two + identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("function _13_1_5_fun(param, param) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-5gs.js b/test/suite/ch13/13.1/13.1-5gs.js index 709deb1e90..0bf5dbde20 100644 --- a/test/suite/ch13/13.1/13.1-5gs.js +++ b/test/suite/ch13/13.1/13.1-5gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-5gs.js - * @description Strict Mode - SyntaxError is thrown if a FunctionDeclaration has two identical parameters - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -function _13_1_5_fun(param, param) { } \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-5gs +description: > + Strict Mode - SyntaxError is thrown if a FunctionDeclaration has + two identical parameters +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +function _13_1_5_fun(param, param) { } diff --git a/test/suite/ch13/13.1/13.1-6-s.js b/test/suite/ch13/13.1/13.1-6-s.js index 10e6e7d9a3..1b6a8ecce0 100644 --- a/test/suite/ch13/13.1/13.1-6-s.js +++ b/test/suite/ch13/13.1/13.1-6-s.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-6-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionDeclaration and the function has two identical parameters, which are separated by a unique parameter name - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("function _13_1_6_fun(param1, param2, param1) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-6-s +description: > + Strict Mode - SyntaxError is thrown if a function is created in + 'strict mode' using a FunctionDeclaration and the function has two + identical parameters, which are separated by a unique parameter + name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("function _13_1_6_fun(param1, param2, param1) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-7-s.js b/test/suite/ch13/13.1/13.1-7-s.js index 087a20f7ec..fcc1bf9347 100644 --- a/test/suite/ch13/13.1/13.1-7-s.js +++ b/test/suite/ch13/13.1/13.1-7-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-7-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionDeclaration and the function has three identical parameters - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("function _13_1_7_fun(param, param, param) { }"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-7-s +description: > + Strict Mode - SyntaxError is thrown if a function is created in + 'strict mode' using a FunctionDeclaration and the function has + three identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("function _13_1_7_fun(param, param, param) { }"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-8-s.js b/test/suite/ch13/13.1/13.1-8-s.js index eb9a3976be..47e031199d 100644 --- a/test/suite/ch13/13.1/13.1-8-s.js +++ b/test/suite/ch13/13.1/13.1-8-s.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-8-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has two identical parameters - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var _13_1_8_fun = function (param, param) { };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-8-s +description: > + Strict Mode - SyntaxError is thrown if a function is created in + 'strict mode' using a FunctionExpression and the function has two + identical parameters +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var _13_1_8_fun = function (param, param) { };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.1/13.1-8gs.js b/test/suite/ch13/13.1/13.1-8gs.js index f647656d9c..bb81b20d4b 100644 --- a/test/suite/ch13/13.1/13.1-8gs.js +++ b/test/suite/ch13/13.1/13.1-8gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.1/13.1-8gs.js - * @description Strict Mode - SyntaxError is thrown if a FunctionExpression has two identical parameters - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -var _13_1_8_fun = function (param, param) { }; \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.1-8gs +description: > + Strict Mode - SyntaxError is thrown if a FunctionExpression has + two identical parameters +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +var _13_1_8_fun = function (param, param) { }; diff --git a/test/suite/ch13/13.1/13.1-9-s.js b/test/suite/ch13/13.1/13.1-9-s.js index 11aba0ce29..3ce7acb162 100644 --- a/test/suite/ch13/13.1/13.1-9-s.js +++ b/test/suite/ch13/13.1/13.1-9-s.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Refer 13.1; - * It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode - * FunctionDeclaration or FunctionExpression. - * - * @path ch13/13.1/13.1-9-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has two identical parameters, which are separated by a unique parameter name - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - try { - eval("var _13_1_9_fun = function (param1, param2, param1) { };"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Refer 13.1; + It is a SyntaxError if any Identifier value occurs more than once within a FormalParameterList of a strict mode + FunctionDeclaration or FunctionExpression. +es5id: 13.1-9-s +description: > + Strict Mode - SyntaxError is thrown if a function is created in + 'strict mode' using a FunctionExpression and the function has two + identical parameters, which are separated by a unique parameter + name +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + try { + eval("var _13_1_9_fun = function (param1, param2, param1) { };"); + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-1-s.js b/test/suite/ch13/13.2/13.2-1-s.js index 9b3b7e1d70..3380c4f9b2 100644 --- a/test/suite/ch13/13.2/13.2-1-s.js +++ b/test/suite/ch13/13.2/13.2-1-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-1-s.js - * @description StrictMode - Writing or reading from a property named 'caller' of function objects is allowed under both strict and normal modes. - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var foo = function () { - this.caller = 12; - } - var obj = new foo(); - return obj.caller === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-1-s +description: > + StrictMode - Writing or reading from a property named 'caller' of + function objects is allowed under both strict and normal modes. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var foo = function () { + this.caller = 12; + } + var obj = new foo(); + return obj.caller === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-10-s.js b/test/suite/ch13/13.2/13.2-10-s.js index 9ab52ea931..67b8b36ad1 100644 --- a/test/suite/ch13/13.2/13.2-10-s.js +++ b/test/suite/ch13/13.2/13.2-10-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-10-s.js - * @description StrictMode - writing a property named 'caller' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict';"); - try { - foo.caller = 41; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-10-s +description: > + StrictMode - writing a property named 'caller' of function objects + is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict';"); + try { + foo.caller = 41; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-11-s.js b/test/suite/ch13/13.2/13.2-11-s.js index f08680ceb7..0c498f0d7f 100644 --- a/test/suite/ch13/13.2/13.2-11-s.js +++ b/test/suite/ch13/13.2/13.2-11-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-11-s.js - * @description StrictMode - enumerating over a function object looking for 'caller' fails outside of the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict';"); - - for (var tempIndex in foo) { - if (tempIndex === "caller") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-11-s +description: > + StrictMode - enumerating over a function object looking for + 'caller' fails outside of the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict';"); + + for (var tempIndex in foo) { + if (tempIndex === "caller") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-12-s.js b/test/suite/ch13/13.2/13.2-12-s.js index ecb9ae413a..7ae1f86988 100644 --- a/test/suite/ch13/13.2/13.2-12-s.js +++ b/test/suite/ch13/13.2/13.2-12-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-12-s.js - * @description StrictMode - enumerating over a function object looking for 'caller' fails inside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"caller\") {return false;}}; return true;"); - return foo(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-12-s +description: > + StrictMode - enumerating over a function object looking for + 'caller' fails inside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"caller\") {return false;}}; return true;"); + return foo(); +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-13-s.js b/test/suite/ch13/13.2/13.2-13-s.js index 2a087ddadd..394f1c9729 100644 --- a/test/suite/ch13/13.2/13.2-13-s.js +++ b/test/suite/ch13/13.2/13.2-13-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-13-s.js - * @description StrictMode - reading a property named 'arguments' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = new Function("'use strict';"); - try { - var temp = foo.arguments; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-13-s +description: > + StrictMode - reading a property named 'arguments' of function + objects is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict';"); + try { + var temp = foo.arguments; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-14-s.js b/test/suite/ch13/13.2/13.2-14-s.js index 53b9bf0211..acfd0961a4 100644 --- a/test/suite/ch13/13.2/13.2-14-s.js +++ b/test/suite/ch13/13.2/13.2-14-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-14-s.js - * @description StrictMode - writing a property named 'arguments' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = new Function("'use strict';"); - try { - foo.arguments = 41; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-14-s +description: > + StrictMode - writing a property named 'arguments' of function + objects is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict';"); + try { + foo.arguments = 41; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-15-1.js b/test/suite/ch13/13.2/13.2-15-1.js index 7575c6037b..3824798895 100644 --- a/test/suite/ch13/13.2/13.2-15-1.js +++ b/test/suite/ch13/13.2/13.2-15-1.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-15-1.js - * @description Function Object has length as its own property and does not invoke the setter defined on Function.prototype.length (Step 15) - */ - - -function testcase() { - var fun = function (x, y) { }; - - var verifyValue = false; - verifyValue = (fun.hasOwnProperty("length") && fun.length === 2); - - var verifyWritable = false; - fun.length = 1001; - verifyWritable = (fun.length === 1001); - - var verifyEnumerable = false; - for (var p in fun) { - if (p === "length") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete fun.length; - verifyConfigurable = fun.hasOwnProperty("length"); - - return verifyValue && !verifyWritable && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-15-1 +description: > + Function Object has length as its own property and does not invoke + the setter defined on Function.prototype.length (Step 15) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fun = function (x, y) { }; + + var verifyValue = false; + verifyValue = (fun.hasOwnProperty("length") && fun.length === 2); + + var verifyWritable = false; + fun.length = 1001; + verifyWritable = (fun.length === 1001); + + var verifyEnumerable = false; + for (var p in fun) { + if (p === "length") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete fun.length; + verifyConfigurable = fun.hasOwnProperty("length"); + + return verifyValue && !verifyWritable && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-15-s.js b/test/suite/ch13/13.2/13.2-15-s.js index b14dd3cadd..5288ebfccd 100644 --- a/test/suite/ch13/13.2/13.2-15-s.js +++ b/test/suite/ch13/13.2/13.2-15-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-15-s.js - * @description StrictMode - enumerating over a function object looking for 'arguments' fails outside of the function - * @onlyStrict - */ - - - -function testcase() { - var foo = new Function("'use strict';"); - - for (var tempIndex in foo) { - if (tempIndex === "arguments") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-15-s +description: > + StrictMode - enumerating over a function object looking for + 'arguments' fails outside of the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict';"); + + for (var tempIndex in foo) { + if (tempIndex === "arguments") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-16-s.js b/test/suite/ch13/13.2/13.2-16-s.js index 154887e9a1..1dc12d6102 100644 --- a/test/suite/ch13/13.2/13.2-16-s.js +++ b/test/suite/ch13/13.2/13.2-16-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-16-s.js - * @description StrictMode - enumerating over a function object looking for 'arguments' fails inside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = new Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"arguments\") {return false;}}; return true;"); - return foo(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-16-s +description: > + StrictMode - enumerating over a function object looking for + 'arguments' fails inside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"arguments\") {return false;}}; return true;"); + return foo(); +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-17-1.js b/test/suite/ch13/13.2/13.2-17-1.js index 654f2b5dd4..85e9b59aad 100644 --- a/test/suite/ch13/13.2/13.2-17-1.js +++ b/test/suite/ch13/13.2/13.2-17-1.js @@ -1,55 +1,59 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-17-1.js - * @description Function Object has 'constructor' as its own property, it is not enumerable and does not invoke the setter defined on Function.prototype.constructor (Step 17) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor"); - try { - var getFunc = function () { - return 100; - }; - - var data = "data"; - var setFunc = function (value) { - data = value; - }; - - Object.defineProperty(Object.prototype, "constructor", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var fun = function () {}; - - var verifyValue = false; - verifyValue = typeof fun.prototype.constructor === "function"; - - var verifyEnumerable = false; - for (var p in fun.prototype) { - if (p === "constructor" && fun.prototype.hasOwnProperty("constructor")) { - verifyEnumerable = true; - } - } - - var verifyWritable = false; - fun.prototype.constructor = 12; - verifyWritable = (fun.prototype.constructor === 12); - - var verifyConfigurable = false; - delete fun.prototype.constructor; - verifyConfigurable = fun.hasOwnProperty("constructor"); - - return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === "data"; - } finally { - Object.defineProperty(Object.prototype, "constructor", desc); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-17-1 +description: > + Function Object has 'constructor' as its own property, it is not + enumerable and does not invoke the setter defined on + Function.prototype.constructor (Step 17) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor"); + try { + var getFunc = function () { + return 100; + }; + + var data = "data"; + var setFunc = function (value) { + data = value; + }; + + Object.defineProperty(Object.prototype, "constructor", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var fun = function () {}; + + var verifyValue = false; + verifyValue = typeof fun.prototype.constructor === "function"; + + var verifyEnumerable = false; + for (var p in fun.prototype) { + if (p === "constructor" && fun.prototype.hasOwnProperty("constructor")) { + verifyEnumerable = true; + } + } + + var verifyWritable = false; + fun.prototype.constructor = 12; + verifyWritable = (fun.prototype.constructor === 12); + + var verifyConfigurable = false; + delete fun.prototype.constructor; + verifyConfigurable = fun.hasOwnProperty("constructor"); + + return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === "data"; + } finally { + Object.defineProperty(Object.prototype, "constructor", desc); + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-17-s.js b/test/suite/ch13/13.2/13.2-17-s.js index 6ff1776b6d..d94a55047d 100644 --- a/test/suite/ch13/13.2/13.2-17-s.js +++ b/test/suite/ch13/13.2/13.2-17-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-17-s.js - * @description StrictMode - reading a property named 'arguments' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict';"); - try { - var temp = foo.arguments; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-17-s +description: > + StrictMode - reading a property named 'arguments' of function + objects is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict';"); + try { + var temp = foo.arguments; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-18-1.js b/test/suite/ch13/13.2/13.2-18-1.js index d3614872ca..8d7b8af248 100644 --- a/test/suite/ch13/13.2/13.2-18-1.js +++ b/test/suite/ch13/13.2/13.2-18-1.js @@ -1,53 +1,57 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-18-1.js - * @description Function Object has 'prototype' as its own property, it is not enumerable and does not invoke the setter defined on Function.prototype (Step 18) - */ - - -function testcase() { - try { - var getFunc = function () { - return 100; - }; - - var data = "data"; - var setFunc = function (value) { - data = value; - }; - Object.defineProperty(Function.prototype, "prototype", { - get: getFunc, - set: setFunc, - configurable: true - }); - - var fun = function () { }; - - var verifyValue = false; - verifyValue = (fun.prototype !== 100 && fun.prototype.toString() === "[object Object]"); - - var verifyEnumerable = false; - for (var p in fun) { - if (p === "prototype" && fun.hasOwnProperty("prototype")) { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete fun.prototype; - verifyConfigurable = fun.hasOwnProperty("prototype"); - - var verifyWritable = false; - fun.prototype = 12 - verifyWritable = (fun.prototype === 12); - - return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable && data === "data"; - } finally { - delete Function.prototype.prototype; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-18-1 +description: > + Function Object has 'prototype' as its own property, it is not + enumerable and does not invoke the setter defined on + Function.prototype (Step 18) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var getFunc = function () { + return 100; + }; + + var data = "data"; + var setFunc = function (value) { + data = value; + }; + Object.defineProperty(Function.prototype, "prototype", { + get: getFunc, + set: setFunc, + configurable: true + }); + + var fun = function () { }; + + var verifyValue = false; + verifyValue = (fun.prototype !== 100 && fun.prototype.toString() === "[object Object]"); + + var verifyEnumerable = false; + for (var p in fun) { + if (p === "prototype" && fun.hasOwnProperty("prototype")) { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete fun.prototype; + verifyConfigurable = fun.hasOwnProperty("prototype"); + + var verifyWritable = false; + fun.prototype = 12 + verifyWritable = (fun.prototype === 12); + + return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable && data === "data"; + } finally { + delete Function.prototype.prototype; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-18-s.js b/test/suite/ch13/13.2/13.2-18-s.js index c0ac07cc92..65b164edac 100644 --- a/test/suite/ch13/13.2/13.2-18-s.js +++ b/test/suite/ch13/13.2/13.2-18-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-18-s.js - * @description StrictMode - writing a property named 'arguments' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict';"); - try { - foo.arguments = 41; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-18-s +description: > + StrictMode - writing a property named 'arguments' of function + objects is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict';"); + try { + foo.arguments = 41; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-19-b-3gs.js b/test/suite/ch13/13.2/13.2-19-b-3gs.js index cd356070d3..7a12438343 100644 --- a/test/suite/ch13/13.2/13.2-19-b-3gs.js +++ b/test/suite/ch13/13.2/13.2-19-b-3gs.js @@ -1,15 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-19-b-3gs.js - * @description StrictMode - error is thrown when assign a value to the 'caller' property of a function object - * @onlyStrict - * @negative NotEarlyError - */ -"use strict"; -throw NotEarlyError; -function _13_2_19_b_3_gs() {} -_13_2_19_b_3_gs.caller = 1; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-19-b-3gs +description: > + StrictMode - error is thrown when assign a value to the 'caller' + property of a function object +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +"use strict"; +throw new Test262Error(); +function _13_2_19_b_3_gs() {} +_13_2_19_b_3_gs.caller = 1; diff --git a/test/suite/ch13/13.2/13.2-19-s.js b/test/suite/ch13/13.2/13.2-19-s.js index 5e8b67e6aa..36e610a8ca 100644 --- a/test/suite/ch13/13.2/13.2-19-s.js +++ b/test/suite/ch13/13.2/13.2-19-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-19-s.js - * @description StrictMode - enumerating over a function object looking for 'arguments' fails outside of the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict';"); - - for (var tempIndex in foo) { - if (tempIndex === "arguments") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-19-s +description: > + StrictMode - enumerating over a function object looking for + 'arguments' fails outside of the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict';"); + + for (var tempIndex in foo) { + if (tempIndex === "arguments") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-2-s.js b/test/suite/ch13/13.2/13.2-2-s.js index f2bdf68984..f67635a798 100644 --- a/test/suite/ch13/13.2/13.2-2-s.js +++ b/test/suite/ch13/13.2/13.2-2-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-2-s.js - * @description StrictMode - A TypeError is thrown when a strict mode code writes to properties named 'caller' of function instances. - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - var foo = function () { - } - foo.caller = 20; - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-2-s +description: > + StrictMode - A TypeError is thrown when a strict mode code writes + to properties named 'caller' of function instances. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + var foo = function () { + } + foo.caller = 20; + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-20-s.js b/test/suite/ch13/13.2/13.2-20-s.js index 5eee4a3217..10c457200e 100644 --- a/test/suite/ch13/13.2/13.2-20-s.js +++ b/test/suite/ch13/13.2/13.2-20-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-20-s.js - * @description StrictMode - enumerating over a function object looking for 'arguments' fails inside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"arguments\") {return false;}}; return true;"); - return foo(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-20-s +description: > + StrictMode - enumerating over a function object looking for + 'arguments' fails inside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"arguments\") {return false;}}; return true;"); + return foo(); +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-21-s.js b/test/suite/ch13/13.2/13.2-21-s.js index 42ad838157..3efd76210a 100644 --- a/test/suite/ch13/13.2/13.2-21-s.js +++ b/test/suite/ch13/13.2/13.2-21-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-21-s.js - * @description StrictMode - reading a property named 'caller' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - function foo () {"use strict";} - try { - var temp = foo.caller; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-21-s +description: > + StrictMode - reading a property named 'caller' of function objects + is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () {"use strict";} + try { + var temp = foo.caller; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-22-s.js b/test/suite/ch13/13.2/13.2-22-s.js index ab901903c2..a92d7a0ed4 100644 --- a/test/suite/ch13/13.2/13.2-22-s.js +++ b/test/suite/ch13/13.2/13.2-22-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-22-s.js - * @description StrictMode - writing a property named 'caller' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - function foo () {"use strict";} - try { - foo.caller = 41; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-22-s +description: > + StrictMode - writing a property named 'caller' of function objects + is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () {"use strict";} + try { + foo.caller = 41; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-23-s.js b/test/suite/ch13/13.2/13.2-23-s.js index 0e89b66aeb..2a72651c21 100644 --- a/test/suite/ch13/13.2/13.2-23-s.js +++ b/test/suite/ch13/13.2/13.2-23-s.js @@ -1,23 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-23-s.js - * @description StrictMode - enumerating over a function object looking for 'caller' fails outside of the function - * @onlyStrict - */ - - - -function testcase() { - function foo () {"use strict";} - for (var tempIndex in foo) { - if (tempIndex === "caller") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-23-s +description: > + StrictMode - enumerating over a function object looking for + 'caller' fails outside of the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () {"use strict";} + for (var tempIndex in foo) { + if (tempIndex === "caller") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-24-s.js b/test/suite/ch13/13.2/13.2-24-s.js index f9008fc56d..741a64cfe6 100644 --- a/test/suite/ch13/13.2/13.2-24-s.js +++ b/test/suite/ch13/13.2/13.2-24-s.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-24-s.js - * @description StrictMode - enumerating over a function object looking for 'caller' fails inside the function - * @onlyStrict - */ - - - -function testcase() { - function foo () { - "use strict"; - for (var tempIndex in this) { - if (tempIndex==="caller") { - return false; - } - } - return true; - } - return foo(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-24-s +description: > + StrictMode - enumerating over a function object looking for + 'caller' fails inside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () { + "use strict"; + for (var tempIndex in this) { + if (tempIndex==="caller") { + return false; + } + } + return true; + } + return foo(); +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-25-s.js b/test/suite/ch13/13.2/13.2-25-s.js index b4c6508978..067552b1c4 100644 --- a/test/suite/ch13/13.2/13.2-25-s.js +++ b/test/suite/ch13/13.2/13.2-25-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-25-s.js - * @description StrictMode - reading a property named 'arguments' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - function foo () {"use strict";} - try { - var temp = foo.arguments; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-25-s +description: > + StrictMode - reading a property named 'arguments' of function + objects is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () {"use strict";} + try { + var temp = foo.arguments; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-26-s.js b/test/suite/ch13/13.2/13.2-26-s.js index 68682ce317..f602278f7f 100644 --- a/test/suite/ch13/13.2/13.2-26-s.js +++ b/test/suite/ch13/13.2/13.2-26-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-26-s.js - * @description StrictMode - writing a property named 'arguments' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - function foo () {"use strict";} - try { - foo.arguments = 41; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-26-s +description: > + StrictMode - writing a property named 'arguments' of function + objects is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () {"use strict";} + try { + foo.arguments = 41; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-27-s.js b/test/suite/ch13/13.2/13.2-27-s.js index d6177986a3..3526e4ad7f 100644 --- a/test/suite/ch13/13.2/13.2-27-s.js +++ b/test/suite/ch13/13.2/13.2-27-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-27-s.js - * @description StrictMode - enumerating over a function object looking for 'arguments' fails outside of the function - * @onlyStrict - */ - - - -function testcase() { - function foo () {"use strict";} - - for (var tempIndex in foo) { - if (tempIndex === "arguments") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-27-s +description: > + StrictMode - enumerating over a function object looking for + 'arguments' fails outside of the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo () {"use strict";} + + for (var tempIndex in foo) { + if (tempIndex === "arguments") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-28-s.js b/test/suite/ch13/13.2/13.2-28-s.js index dd9dad3ee2..74293082c7 100644 --- a/test/suite/ch13/13.2/13.2-28-s.js +++ b/test/suite/ch13/13.2/13.2-28-s.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-28-s.js - * @description StrictMode - enumerating over a function object looking for 'arguments' fails inside the function - * @onlyStrict - */ - - - -function testcase() { - function foo() { - "use strict"; - for (var tempIndex in this) { - if (tempIndex==="arguments") { - return false; - } - } - return true; - } - return foo(); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-28-s +description: > + StrictMode - enumerating over a function object looking for + 'arguments' fails inside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { + "use strict"; + for (var tempIndex in this) { + if (tempIndex==="arguments") { + return false; + } + } + return true; + } + return foo(); +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-29-s.js b/test/suite/ch13/13.2/13.2-29-s.js index 8f2b59d391..a70debdda8 100644 --- a/test/suite/ch13/13.2/13.2-29-s.js +++ b/test/suite/ch13/13.2/13.2-29-s.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-29-s.js - * @description StrictMode - property named 'caller' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - function foo() {"use strict";} - return ! Object.getOwnPropertyDescriptor(foo, - "caller").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-29-s +description: > + StrictMode - property named 'caller' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() {"use strict";} + return ! Object.getOwnPropertyDescriptor(foo, + "caller").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-3-s.js b/test/suite/ch13/13.2/13.2-3-s.js index 642f417c70..dfe4ab330b 100644 --- a/test/suite/ch13/13.2/13.2-3-s.js +++ b/test/suite/ch13/13.2/13.2-3-s.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-3-s.js - * @description StrictMode - Writing or reading from a property named 'arguments' of function objects is allowed under both strict and normal modes. - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var foo = function () { - this.arguments = 12; - } - var obj = new foo(); - return obj.arguments === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-3-s +description: > + StrictMode - Writing or reading from a property named 'arguments' + of function objects is allowed under both strict and normal modes. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var foo = function () { + this.arguments = 12; + } + var obj = new foo(); + return obj.arguments === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-30-s.js b/test/suite/ch13/13.2/13.2-30-s.js index fd531f4c5b..8984e4f752 100644 --- a/test/suite/ch13/13.2/13.2-30-s.js +++ b/test/suite/ch13/13.2/13.2-30-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-30-s.js - * @description StrictMode - property named 'caller' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - return ! Object.getOwnPropertyDescriptor(Function("'use strict';"), - "caller").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-30-s +description: > + StrictMode - property named 'caller' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return ! Object.getOwnPropertyDescriptor(Function("'use strict';"), + "caller").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-31-s.js b/test/suite/ch13/13.2/13.2-31-s.js index e5693beb9f..db90374682 100644 --- a/test/suite/ch13/13.2/13.2-31-s.js +++ b/test/suite/ch13/13.2/13.2-31-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-31-s.js - * @description StrictMode - property named 'caller' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - return ! Object.getOwnPropertyDescriptor(new Function("'use strict';"), - "caller").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-31-s +description: > + StrictMode - property named 'caller' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return ! Object.getOwnPropertyDescriptor(new Function("'use strict';"), + "caller").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-32-s.js b/test/suite/ch13/13.2/13.2-32-s.js index cc0c1f9caf..d62d684de2 100644 --- a/test/suite/ch13/13.2/13.2-32-s.js +++ b/test/suite/ch13/13.2/13.2-32-s.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-32-s.js - * @description StrictMode - property named 'caller' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - var funcExpr = function () { "use strict";}; - return ! Object.getOwnPropertyDescriptor(funcExpr, - "caller").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-32-s +description: > + StrictMode - property named 'caller' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var funcExpr = function () { "use strict";}; + return ! Object.getOwnPropertyDescriptor(funcExpr, + "caller").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-33-s.js b/test/suite/ch13/13.2/13.2-33-s.js index 602a0d808c..dbd1835490 100644 --- a/test/suite/ch13/13.2/13.2-33-s.js +++ b/test/suite/ch13/13.2/13.2-33-s.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-33-s.js - * @description StrictMode - property named 'arguments' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - function foo() {"use strict";} - return ! Object.getOwnPropertyDescriptor(foo, - "arguments").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-33-s +description: > + StrictMode - property named 'arguments' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() {"use strict";} + return ! Object.getOwnPropertyDescriptor(foo, + "arguments").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-34-s.js b/test/suite/ch13/13.2/13.2-34-s.js index 81f9fd0d7e..7bd0f8a3d9 100644 --- a/test/suite/ch13/13.2/13.2-34-s.js +++ b/test/suite/ch13/13.2/13.2-34-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-34-s.js - * @description StrictMode - property named 'arguments' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - return ! Object.getOwnPropertyDescriptor(Function("'use strict';"), - "arguments").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-34-s +description: > + StrictMode - property named 'arguments' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return ! Object.getOwnPropertyDescriptor(Function("'use strict';"), + "arguments").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-35-s.js b/test/suite/ch13/13.2/13.2-35-s.js index e6031df2d5..49b03f91ec 100644 --- a/test/suite/ch13/13.2/13.2-35-s.js +++ b/test/suite/ch13/13.2/13.2-35-s.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-35-s.js - * @description StrictMode - property named 'arguments' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - return ! Object.getOwnPropertyDescriptor(new Function("'use strict';"), - "arguments").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-35-s +description: > + StrictMode - property named 'arguments' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + return ! Object.getOwnPropertyDescriptor(new Function("'use strict';"), + "arguments").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-36-s.js b/test/suite/ch13/13.2/13.2-36-s.js index 4e958dee08..1052790663 100644 --- a/test/suite/ch13/13.2/13.2-36-s.js +++ b/test/suite/ch13/13.2/13.2-36-s.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-36-s.js - * @description StrictMode - property named 'arguments' of function objects is not configurable - * @onlyStrict - */ - - - -function testcase() { - var funcExpr = function () { "use strict";}; - return ! Object.getOwnPropertyDescriptor(funcExpr, - "arguments").configurable; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-36-s +description: > + StrictMode - property named 'arguments' of function objects is not + configurable +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var funcExpr = function () { "use strict";}; + return ! Object.getOwnPropertyDescriptor(funcExpr, + "arguments").configurable; +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-4-s.js b/test/suite/ch13/13.2/13.2-4-s.js index 82981f467e..3ac7c510c1 100644 --- a/test/suite/ch13/13.2/13.2-4-s.js +++ b/test/suite/ch13/13.2/13.2-4-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-4-s.js - * @description StrictMode - A TypeError is thrown when a code in strict mode tries to write to 'arguments' of function instances. - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - var foo = function () { - } - foo.arguments = 20; - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-4-s +description: > + StrictMode - A TypeError is thrown when a code in strict mode + tries to write to 'arguments' of function instances. +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + var foo = function () { + } + foo.arguments = 20; + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-5-s.js b/test/suite/ch13/13.2/13.2-5-s.js index 2512e5ef0d..3697a826f2 100644 --- a/test/suite/ch13/13.2/13.2-5-s.js +++ b/test/suite/ch13/13.2/13.2-5-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-5-s.js - * @description StrictMode - reading a property named 'caller' of function objects is not allowed outside the function - * @onlyStrict - */ - - -function testcase() { - var foo = new Function("'use strict';"); - try { - var temp = foo.caller; - return false; - } - catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-5-s +description: > + StrictMode - reading a property named 'caller' of function objects + is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict';"); + try { + var temp = foo.caller; + return false; + } + catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-6-s.js b/test/suite/ch13/13.2/13.2-6-s.js index 5b6de1de98..dac7276774 100644 --- a/test/suite/ch13/13.2/13.2-6-s.js +++ b/test/suite/ch13/13.2/13.2-6-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-6-s.js - * @description StrictMode - writing a property named 'caller' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = new Function("'use strict';"); - try { - foo.caller = 41; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-6-s +description: > + StrictMode - writing a property named 'caller' of function objects + is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict';"); + try { + foo.caller = 41; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-7-s.js b/test/suite/ch13/13.2/13.2-7-s.js index 2b5fbb1858..c22b067169 100644 --- a/test/suite/ch13/13.2/13.2-7-s.js +++ b/test/suite/ch13/13.2/13.2-7-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-7-s.js - * @description StrictMode - enumerating over a function object looking for 'caller' fails outside of the function - * @onlyStrict - */ - - -function testcase() { - var foo = new Function("'use strict';"); - - for (var tempIndex in foo) { - if (tempIndex === "caller") { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-7-s +description: > + StrictMode - enumerating over a function object looking for + 'caller' fails outside of the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict';"); + + for (var tempIndex in foo) { + if (tempIndex === "caller") { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-8-s.js b/test/suite/ch13/13.2/13.2-8-s.js index 42bcc07d97..4cf836aa52 100644 --- a/test/suite/ch13/13.2/13.2-8-s.js +++ b/test/suite/ch13/13.2/13.2-8-s.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-8-s.js - * @description StrictMode - enumerating over a function object looking for 'caller' fails inside the function - * @onlyStrict - */ - - -function testcase() { - var foo = new Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"caller\") {return false;}}; return true;"); - return foo(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-8-s +description: > + StrictMode - enumerating over a function object looking for + 'caller' fails inside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = new Function("'use strict'; for (var tempIndex in this) {if (tempIndex===\"caller\") {return false;}}; return true;"); + return foo(); + } +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/13.2-9-s.js b/test/suite/ch13/13.2/13.2-9-s.js index fac6285e63..e53169be6a 100644 --- a/test/suite/ch13/13.2/13.2-9-s.js +++ b/test/suite/ch13/13.2/13.2-9-s.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch13/13.2/13.2-9-s.js - * @description StrictMode - reading a property named 'caller' of function objects is not allowed outside the function - * @onlyStrict - */ - - - -function testcase() { - var foo = Function("'use strict';"); - try { - var temp = foo.caller; - return false; - } - catch (e) { - return e instanceof TypeError; - } -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 13.2-9-s +description: > + StrictMode - reading a property named 'caller' of function objects + is not allowed outside the function +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = Function("'use strict';"); + try { + var temp = foo.caller; + return false; + } + catch (e) { + return e instanceof TypeError; + } +} +runTestCase(testcase); diff --git a/test/suite/ch13/13.2/S13.2.1_A1_T1.js b/test/suite/ch13/13.2/S13.2.1_A1_T1.js index 1295b6a489..5fb7a9a598 100644 --- a/test/suite/ch13/13.2/S13.2.1_A1_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The depth of nested function calls reaches 32 - * - * @path ch13/13.2/S13.2.1_A1_T1.js - * @description Creating function calls 32 elements depth - */ +/*--- +info: The depth of nested function calls reaches 32 +es5id: 13.2.1_A1_T1 +description: Creating function calls 32 elements depth +---*/ (function(){ (function(){ @@ -70,5 +69,4 @@ })() })() })() -})() - +})() diff --git a/test/suite/ch13/13.2/S13.2.1_A4_T1.js b/test/suite/ch13/13.2/S13.2.1_A4_T1.js index a2bce3580a..1a72e03812 100644 --- a/test/suite/ch13/13.2/S13.2.1_A4_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A4_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Objects as arguments are passed by reference - * - * @path ch13/13.2/S13.2.1_A4_T1.js - * @description Adding new number property to a function argument within the function body, - * where explicit argument is an object defined with "var __obj={}" - */ +/*--- +info: Objects as arguments are passed by reference +es5id: 13.2.1_A4_T1 +description: > + Adding new number property to a function argument within the + function body, where explicit argument is an object defined with + "var __obj={}" +---*/ function __func(__arg){ __arg.foo=7; @@ -24,4 +25,3 @@ if (__obj.foo !== 7) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A4_T2.js b/test/suite/ch13/13.2/S13.2.1_A4_T2.js index 682f57d081..71b7f40e28 100644 --- a/test/suite/ch13/13.2/S13.2.1_A4_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A4_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Objects as arguments are passed by reference - * - * @path ch13/13.2/S13.2.1_A4_T2.js - * @description Adding new string property to a function argument within the function body, - * where explicit argument is an object defined with "__obj={}" - */ +/*--- +info: Objects as arguments are passed by reference +es5id: 13.2.1_A4_T2 +description: > + Adding new string property to a function argument within the + function body, where explicit argument is an object defined with + "__obj={}" +---*/ function __func(__arg){ __arg.foo="whiskey gogo"; @@ -24,4 +25,3 @@ if (__obj.foo !== "whiskey gogo") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A4_T3.js b/test/suite/ch13/13.2/S13.2.1_A4_T3.js index 00ee68b102..43b96bf909 100644 --- a/test/suite/ch13/13.2/S13.2.1_A4_T3.js +++ b/test/suite/ch13/13.2/S13.2.1_A4_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Objects as arguments are passed by reference - * - * @path ch13/13.2/S13.2.1_A4_T3.js - * @description Adding new number property to a function argument within the function body, - * where array element "arguments[0]" is an object defined with "__obj={}" - */ +/*--- +info: Objects as arguments are passed by reference +es5id: 13.2.1_A4_T3 +description: > + Adding new number property to a function argument within the + function body, where array element "arguments[0]" is an object + defined with "__obj={}" +---*/ function __func(){ arguments[0]["PI"]=3.14; @@ -24,4 +25,3 @@ if (__obj.PI !== 3.14) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A4_T4.js b/test/suite/ch13/13.2/S13.2.1_A4_T4.js index a9a0261212..af31061ecd 100644 --- a/test/suite/ch13/13.2/S13.2.1_A4_T4.js +++ b/test/suite/ch13/13.2/S13.2.1_A4_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Objects as arguments are passed by reference - * - * @path ch13/13.2/S13.2.1_A4_T4.js - * @description Adding new number property to a function argument within the function body, - * where array element "arguments[0]" is an object defined with "var __obj={}" - */ +/*--- +info: Objects as arguments are passed by reference +es5id: 13.2.1_A4_T4 +description: > + Adding new number property to a function argument within the + function body, where array element "arguments[0]" is an object + defined with "var __obj={}" +---*/ function __func(){ arguments[0]["E"]=2.74; @@ -24,4 +25,3 @@ if (__obj.E !== 2.74) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A5_T1.js b/test/suite/ch13/13.2/S13.2.1_A5_T1.js index 81909da90b..b8abe035a1 100644 --- a/test/suite/ch13/13.2/S13.2.1_A5_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Closures are admitted - * - * @path ch13/13.2/S13.2.1_A5_T1.js - * @description Sorting with closure - */ +/*--- +info: Closures are admitted +es5id: 13.2.1_A5_T1 +description: Sorting with closure +---*/ var __arr = [4,3,2,1,4,3,2,1,4,3,2,1]; //Sort uses closure @@ -26,5 +25,4 @@ if (__arr.toString() !== [4,4,4,3,3,3,2,2,2,1,1,1].toString()) { } // -////////////////////////////////////////////////////////////////////////////// - +////////////////////////////////////////////////////////////////////////////// diff --git a/test/suite/ch13/13.2/S13.2.1_A5_T2.js b/test/suite/ch13/13.2/S13.2.1_A5_T2.js index e48402cd69..be5177144a 100644 --- a/test/suite/ch13/13.2/S13.2.1_A5_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A5_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Closures are admitted - * - * @path ch13/13.2/S13.2.1_A5_T2.js - * @description Returning a function that approximates the derivative of f - * using an interval of dx, which should be appropriately small - */ +/*--- +info: Closures are admitted +es5id: 13.2.1_A5_T2 +description: > + Returning a function that approximates the derivative of f using + an interval of dx, which should be appropriately small +---*/ // Return a function that approximates the derivative of f // using an interval of dx, which should be appropriately small. @@ -24,4 +24,3 @@ if (Math.abs(derivative(Math.sin, 0.0001)(0) - derivative(Math.sin, 0.0001)(2*Ma } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A6_T1.js b/test/suite/ch13/13.2/S13.2.1_A6_T1.js index a1d360b348..1afa267111 100644 --- a/test/suite/ch13/13.2/S13.2.1_A6_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Primitive types are passed by value - * - * @path ch13/13.2/S13.2.1_A6_T1.js - * @description Declaring a function with "function __func(arg1, arg2)" - */ +/*--- +info: Primitive types are passed by value +es5id: 13.2.1_A6_T1 +description: Declaring a function with "function __func(arg1, arg2)" +---*/ function __func(arg1, arg2){ arg1++; @@ -28,4 +27,3 @@ if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A6_T2.js b/test/suite/ch13/13.2/S13.2.1_A6_T2.js index f92bafaf28..a20aa33feb 100644 --- a/test/suite/ch13/13.2/S13.2.1_A6_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A6_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Primitive types are passed by value - * - * @path ch13/13.2/S13.2.1_A6_T2.js - * @description Declaring a function with "__func = function(arg1, arg2)" - */ +/*--- +info: Primitive types are passed by value +es5id: 13.2.1_A6_T2 +description: Declaring a function with "__func = function(arg1, arg2)" +---*/ __func = function(arg1, arg2){ arg1++; @@ -28,4 +27,3 @@ if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A7_T1.js b/test/suite/ch13/13.2/S13.2.1_A7_T1.js index 4e46fcafec..990422421a 100644 --- a/test/suite/ch13/13.2/S13.2.1_A7_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A7_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object F is called, the following steps are taken: - * 2. Evaluate F's FunctionBody; - * if Result.type is returned then Result.value is returned too - * - * @path ch13/13.2/S13.2.1_A7_T1.js - * @description Returning null. Declaring a function with "function __func()" - */ +/*--- +info: > + When the [[Call]] property for a Function object F is called, the following steps are taken: + 2. Evaluate F's FunctionBody; + if Result.type is returned then Result.value is returned too +es5id: 13.2.1_A7_T1 +description: Returning null. Declaring a function with "function __func()" +---*/ function __func(){ var x = null; @@ -24,4 +24,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A7_T2.js b/test/suite/ch13/13.2/S13.2.1_A7_T2.js index ae4fbb4061..4aeba30172 100644 --- a/test/suite/ch13/13.2/S13.2.1_A7_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A7_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object F is called, the following steps are taken: - * 2. Evaluate F's FunctionBody; - * if Result.type is returned then Result.value is returned too - * - * @path ch13/13.2/S13.2.1_A7_T2.js - * @description Returning null. Declaring a function with "var __func = function ()" - */ +/*--- +info: > + When the [[Call]] property for a Function object F is called, the following steps are taken: + 2. Evaluate F's FunctionBody; + if Result.type is returned then Result.value is returned too +es5id: 13.2.1_A7_T2 +description: > + Returning null. Declaring a function with "var __func = function + ()" +---*/ var __func = function (){ var x = null; @@ -24,4 +26,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A7_T3.js b/test/suite/ch13/13.2/S13.2.1_A7_T3.js index efbb8a04d1..7fc0140bff 100644 --- a/test/suite/ch13/13.2/S13.2.1_A7_T3.js +++ b/test/suite/ch13/13.2/S13.2.1_A7_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object F is called, the following steps are taken: - * 2. Evaluate F's FunctionBody; - * if Result.type is returned then Result.value is returned too - * - * @path ch13/13.2/S13.2.1_A7_T3.js - * @description Returning number. Declaring a function with "function __func()" - */ +/*--- +info: > + When the [[Call]] property for a Function object F is called, the following steps are taken: + 2. Evaluate F's FunctionBody; + if Result.type is returned then Result.value is returned too +es5id: 13.2.1_A7_T3 +description: Returning number. Declaring a function with "function __func()" +includes: [Test262Error.js] +---*/ function __func(){ x = 1; @@ -51,5 +52,3 @@ if (x !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.1_A7_T4.js b/test/suite/ch13/13.2/S13.2.1_A7_T4.js index 7461324edf..b73000b40f 100644 --- a/test/suite/ch13/13.2/S13.2.1_A7_T4.js +++ b/test/suite/ch13/13.2/S13.2.1_A7_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object F is called, the following steps are taken: - * 2. Evaluate F's FunctionBody; - * if Result.type is returned then Result.value is returned too - * - * @path ch13/13.2/S13.2.1_A7_T4.js - * @description Returning boolean. Declaring a function with "function __func()" - */ +/*--- +info: > + When the [[Call]] property for a Function object F is called, the following steps are taken: + 2. Evaluate F's FunctionBody; + if Result.type is returned then Result.value is returned too +es5id: 13.2.1_A7_T4 +description: Returning boolean. Declaring a function with "function __func()" +includes: [Test262Error.js] +---*/ function __func(){ var x = true; @@ -19,8 +20,8 @@ function __func(){ //CHECK# try { x=x; - $ERROR('#0: "x=x" lead to throwing exception'); -} catch (e) { + $ERROR('#0: "x=x" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // @@ -48,11 +49,9 @@ if (!(__x)) { //CHECK#3 try { x=x; - $ERROR('#3: "x=x" lead to throwing exception'); -} catch (e) { + $ERROR('#3: "x=x" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.1_A8_T1.js b/test/suite/ch13/13.2/S13.2.1_A8_T1.js index 2be9cb7288..c017150ab7 100644 --- a/test/suite/ch13/13.2/S13.2.1_A8_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A8_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object F is called, the following steps are taken: - * 2. Evaluate F's FunctionBody; - * if Result.type is thrown then Result.value is thrown too - * - * @path ch13/13.2/S13.2.1_A8_T1.js - * @description Throwing an exception within a function body. Declaring function with "function __func()" - */ +/*--- +info: > + When the [[Call]] property for a Function object F is called, the following steps are taken: + 2. Evaluate F's FunctionBody; + if Result.type is thrown then Result.value is thrown too +es5id: 13.2.1_A8_T1 +description: > + Throwing an exception within a function body. Declaring function + with "function __func()" +---*/ function __func(){ var x = 1; @@ -24,4 +26,3 @@ try{ $ERROR('#1: Exception === "Catch Me If You Can". Actual: exception ==='+e); } } - diff --git a/test/suite/ch13/13.2/S13.2.1_A8_T2.js b/test/suite/ch13/13.2/S13.2.1_A8_T2.js index c07582b280..bf399b50d6 100644 --- a/test/suite/ch13/13.2/S13.2.1_A8_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A8_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object F is called, the following steps are taken: - * 2. Evaluate F's FunctionBody; - * if Result.type is thrown then Result.value is thrown too - * - * @path ch13/13.2/S13.2.1_A8_T2.js - * @description Throwing an exception within a function body. Declaring function with "var __func = function (message)" - */ +/*--- +info: > + When the [[Call]] property for a Function object F is called, the following steps are taken: + 2. Evaluate F's FunctionBody; + if Result.type is thrown then Result.value is thrown too +es5id: 13.2.1_A8_T2 +description: > + Throwing an exception within a function body. Declaring function + with "var __func = function (message)" +---*/ var CATCH_ME_IF_YOU_CAN = true; @@ -26,4 +28,3 @@ try{ $ERROR('#1: Exception === true. Actual: exception ==='+e); } } - diff --git a/test/suite/ch13/13.2/S13.2.1_A9.1_T1.js b/test/suite/ch13/13.2/S13.2.1_A9.1_T1.js index 9b1dd7382d..7a5a472933 100644 --- a/test/suite/ch13/13.2/S13.2.1_A9.1_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A9.1_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object is called, - * the body is evaluated and if evaluation result has type "normal", then "undefined" is returned - * - * @path ch13/13.2/S13.2.1_A9.1_T1.js - * @description Declaring a function with "function __func()" and no "return" in the function body - */ +/*--- +info: > + When the [[Call]] property for a Function object is called, + the body is evaluated and if evaluation result has type "normal", then "undefined" is returned +es5id: 13.2.1_A9.1_T1 +description: > + Declaring a function with "function __func()" and no "return" in + the function body +---*/ var x; @@ -30,4 +32,3 @@ if (!x) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A9.1_T2.js b/test/suite/ch13/13.2/S13.2.1_A9.1_T2.js index 90057b04b0..a728fa7ed9 100644 --- a/test/suite/ch13/13.2/S13.2.1_A9.1_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A9.1_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object is called, - * the body is evaluated and if evaluation result has type "normal", then "undefined" is returned - * - * @path ch13/13.2/S13.2.1_A9.1_T2.js - * @description Declaring a function with "var __func = function()" and no "return" in the function body - */ +/*--- +info: > + When the [[Call]] property for a Function object is called, + the body is evaluated and if evaluation result has type "normal", then "undefined" is returned +es5id: 13.2.1_A9.1_T2 +description: > + Declaring a function with "var __func = function()" and no + "return" in the function body +---*/ var x; @@ -30,4 +32,3 @@ if (!x) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A9_T1.js b/test/suite/ch13/13.2/S13.2.1_A9_T1.js index 6332ef34e4..0b9a3cb3fe 100644 --- a/test/suite/ch13/13.2/S13.2.1_A9_T1.js +++ b/test/suite/ch13/13.2/S13.2.1_A9_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object is called, - * the body is evaluated and if evaluation result has type "return" its value is not defined, then "undefined" is returned - * - * @path ch13/13.2/S13.2.1_A9_T1.js - * @description Using "return" with no expression. Declaring a function with "function __func()" - */ +/*--- +info: > + When the [[Call]] property for a Function object is called, + the body is evaluated and if evaluation result has type "return" its value is not defined, then "undefined" is returned +es5id: 13.2.1_A9_T1 +description: > + Using "return" with no expression. Declaring a function with + "function __func()" +---*/ var x; @@ -31,4 +33,3 @@ if (x!==1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.1_A9_T2.js b/test/suite/ch13/13.2/S13.2.1_A9_T2.js index 75be8a19a9..774b835edd 100644 --- a/test/suite/ch13/13.2/S13.2.1_A9_T2.js +++ b/test/suite/ch13/13.2/S13.2.1_A9_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Call]] property for a Function object is called, - * the body is evaluated and if evaluation result has type "return" its value is not defined, then "undefined" is returned - * - * @path ch13/13.2/S13.2.1_A9_T2.js - * @description Using "return" with no expression. Declaring a function with "var __func = function()" - */ +/*--- +info: > + When the [[Call]] property for a Function object is called, + the body is evaluated and if evaluation result has type "return" its value is not defined, then "undefined" is returned +es5id: 13.2.1_A9_T2 +description: > + Using "return" with no expression. Declaring a function with "var + __func = function()" +---*/ var x; @@ -31,4 +33,3 @@ if (x!==1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A10.js b/test/suite/ch13/13.2/S13.2.2_A10.js index 25ba9d58df..4253d2c48d 100644 --- a/test/suite/ch13/13.2/S13.2.2_A10.js +++ b/test/suite/ch13/13.2/S13.2.2_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Calling a function as a constructor is possible as long as this.any_Function is declared - * - * @path ch13/13.2/S13.2.2_A10.js - * @description Calling a function as a constructor after it has been declared - */ +/*--- +info: > + Calling a function as a constructor is possible as long as + this.any_Function is declared +es5id: 13.2.2_A10 +description: Calling a function as a constructor after it has been declared +---*/ function FACTORY(){ this.id = 0; @@ -35,4 +36,3 @@ if (obj.id !== 5) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A11.js b/test/suite/ch13/13.2/S13.2.2_A11.js index 13f7f4e9b0..cb1c8fa9d4 100644 --- a/test/suite/ch13/13.2/S13.2.2_A11.js +++ b/test/suite/ch13/13.2/S13.2.2_A11.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Calling a function as a constructor is possible as long as this.any_Function is declared and called - * - * @path ch13/13.2/S13.2.2_A11.js - * @description Calling a function as a constructor after it has been declared with "function func()" - */ +/*--- +info: > + Calling a function as a constructor is possible as long as + this.any_Function is declared and called +es5id: 13.2.2_A11 +description: > + Calling a function as a constructor after it has been declared + with "function func()" +includes: [Test262Error.js] +---*/ function FACTORY(){ this.id = 0; @@ -22,11 +26,9 @@ function FACTORY(){ //CHECK#1 try { var obj = new FACTORY(); - $ERROR('#1: var obj = new FACTORY() lead to throwing exception'); -} catch (e) { + $ERROR('#1: var obj = new FACTORY() lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.2_A12.js b/test/suite/ch13/13.2/S13.2.2_A12.js index 52d4a95b6d..f68719f93e 100644 --- a/test/suite/ch13/13.2/S13.2.2_A12.js +++ b/test/suite/ch13/13.2/S13.2.2_A12.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Calling a function as a constructor is possible as long as this.any_Function is declared and called - * - * @path ch13/13.2/S13.2.2_A12.js - * @description Calling a function as a constructor after it has been declared with "function func()" - */ +/*--- +info: > + Calling a function as a constructor is possible as long as + this.any_Function is declared and called +es5id: 13.2.2_A12 +description: > + Calling a function as a constructor after it has been declared + with "function func()" +---*/ function FACTORY(){ this.id = 0; @@ -35,4 +38,3 @@ if (obj.id !== "id_string") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A13.js b/test/suite/ch13/13.2/S13.2.2_A13.js index 79801ac9ee..e65991ea11 100644 --- a/test/suite/ch13/13.2/S13.2.2_A13.js +++ b/test/suite/ch13/13.2/S13.2.2_A13.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Calling a function as a constructor is inadmissible as long as this.any_Function is declared by eval and called - * - * @path ch13/13.2/S13.2.2_A13.js - * @description Calling a function as a constructor after it has been declared by eval - */ +/*--- +info: > + Calling a function as a constructor is inadmissible as long as + this.any_Function is declared by eval and called +es5id: 13.2.2_A13 +description: > + Calling a function as a constructor after it has been declared by + eval +includes: [Test262Error.js] +---*/ function FACTORY(){ this.id = 0; @@ -20,10 +24,9 @@ function FACTORY(){ //CHECK#1 try { var obj = new FACTORY(); - $ERROR('#1: var obj = new FACTORY() lead to throwing exception'); -} catch (e) { + $ERROR('#1: var obj = new FACTORY() lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A14.js b/test/suite/ch13/13.2/S13.2.2_A14.js index 2db1005bc9..3e3836765f 100644 --- a/test/suite/ch13/13.2/S13.2.2_A14.js +++ b/test/suite/ch13/13.2/S13.2.2_A14.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Calling a function as a constructor is inadmissible as long as this.any_Function is declared by eval and called - * - * @path ch13/13.2/S13.2.2_A14.js - * @description Calling a function as a constructor after it has been declared by eval - * @noStrict - */ +/*--- +info: > + Calling a function as a constructor is inadmissible as long as + this.any_Function is declared by eval and called +es5id: 13.2.2_A14 +description: > + Calling a function as a constructor after it has been declared by + eval +flags: [noStrict] +---*/ function FACTORY(){ this.id = 0; @@ -26,4 +29,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A15_T1.js b/test/suite/ch13/13.2/S13.2.2_A15_T1.js index 6548618ebc..3a6195ca30 100644 --- a/test/suite/ch13/13.2/S13.2.2_A15_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A15_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called, - * and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy - * - * @path ch13/13.2/S13.2.2_A15_T1.js - * @description Function declared at the end of the program and "obj" property is declared with "var obj = {}" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called, + and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy +es5id: 13.2.2_A15_T1 +description: > + Function declared at the end of the program and "obj" property is + declared with "var obj = {}" +---*/ var __obj = new __FACTORY(); @@ -42,4 +44,3 @@ function __FACTORY(){ obj.slot = this; return obj; } - diff --git a/test/suite/ch13/13.2/S13.2.2_A15_T2.js b/test/suite/ch13/13.2/S13.2.2_A15_T2.js index 007474b4bd..94c9ad3e02 100644 --- a/test/suite/ch13/13.2/S13.2.2_A15_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A15_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called, - * and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy - * - * @path ch13/13.2/S13.2.2_A15_T2.js - * @description Function declared at the end of the program and "obj" property is declared with "obj = {}" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called, + and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy +es5id: 13.2.2_A15_T2 +description: > + Function declared at the end of the program and "obj" property is + declared with "obj = {}" +---*/ var __obj = new __FACTORY(); @@ -42,4 +44,3 @@ function __FACTORY(){ obj.slot = this; return obj; } - diff --git a/test/suite/ch13/13.2/S13.2.2_A15_T3.js b/test/suite/ch13/13.2/S13.2.2_A15_T3.js index c448df5527..f2ef353f4b 100644 --- a/test/suite/ch13/13.2/S13.2.2_A15_T3.js +++ b/test/suite/ch13/13.2/S13.2.2_A15_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called, - * and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy - * - * @path ch13/13.2/S13.2.2_A15_T3.js - * @description Function declared at the end of the program and "obj" property is declared with "var obj = {}" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called, + and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy +es5id: 13.2.2_A15_T3 +description: > + Function declared at the end of the program and "obj" property is + declared with "var obj = {}" +---*/ __FACTORY = function (){ this.prop = 1; @@ -42,4 +44,3 @@ if (__obj.slot.prop !==1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A15_T4.js b/test/suite/ch13/13.2/S13.2.2_A15_T4.js index 5667b9b52a..cba1f2d3dc 100644 --- a/test/suite/ch13/13.2/S13.2.2_A15_T4.js +++ b/test/suite/ch13/13.2/S13.2.2_A15_T4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called, - * and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy - * - * @path ch13/13.2/S13.2.2_A15_T4.js - * @description Function declared at the end of the program and "obj" property is declared with "obj = {}" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called, + and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy +es5id: 13.2.2_A15_T4 +description: > + Function declared at the end of the program and "obj" property is + declared with "obj = {}" +---*/ __FACTORY = function(){ this.prop = 1; @@ -42,5 +44,3 @@ if (__obj.slot.prop !==1) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.2_A16_T1.js b/test/suite/ch13/13.2/S13.2.2_A16_T1.js index ea40cfb09f..fa10c4eee8 100644 --- a/test/suite/ch13/13.2/S13.2.2_A16_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A16_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a new statement is admitted - * - * @path ch13/13.2/S13.2.2_A16_T1.js - * @description Using "is __obj = new function __func(){this.prop=1;}" as FunctionExpression - */ +/*--- +info: FunctionExpression within a new statement is admitted +es5id: 13.2.2_A16_T1 +description: > + Using "is __obj = new function __func(){this.prop=1;}" as + FunctionExpression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -33,4 +34,3 @@ if (typeof __func !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A16_T2.js b/test/suite/ch13/13.2/S13.2.2_A16_T2.js index 2af36ba445..e32aedf124 100644 --- a/test/suite/ch13/13.2/S13.2.2_A16_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A16_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a new statement is admitted - * - * @path ch13/13.2/S13.2.2_A16_T2.js - * @description Using "var __obj = new function __func(arg){this.prop=arg;}(5)" as FunctionExpression - */ +/*--- +info: FunctionExpression within a new statement is admitted +es5id: 13.2.2_A16_T2 +description: > + Using "var __obj = new function __func(arg){this.prop=arg;}(5)" as + FunctionExpression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -33,4 +34,3 @@ if (typeof __func !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A16_T3.js b/test/suite/ch13/13.2/S13.2.2_A16_T3.js index 8cff917f6e..7ea7e2b349 100644 --- a/test/suite/ch13/13.2/S13.2.2_A16_T3.js +++ b/test/suite/ch13/13.2/S13.2.2_A16_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression within a new statement is admitted - * - * @path ch13/13.2/S13.2.2_A16_T3.js - * @description Using "is __obj = new function __func(arg){this.prop=arg; return {feat: ++arg}}(5)" as FunctionExpression - */ +/*--- +info: FunctionExpression within a new statement is admitted +es5id: 13.2.2_A16_T3 +description: > + Using "is __obj = new function __func(arg){this.prop=arg; return + {feat: ++arg}}(5)" as FunctionExpression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -41,4 +42,3 @@ if (typeof __func !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A17_T2.js b/test/suite/ch13/13.2/S13.2.2_A17_T2.js index 105b762d75..950ee3dd83 100644 --- a/test/suite/ch13/13.2/S13.2.2_A17_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A17_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression containing "with" statement is admitted - * - * @path ch13/13.2/S13.2.2_A17_T2.js - * @description Throwing an exception within "with" statement - */ +/*--- +info: FunctionExpression containing "with" statement is admitted +es5id: 13.2.2_A17_T2 +description: Throwing an exception within "with" statement +---*/ this.p1="alert"; @@ -68,5 +67,3 @@ if (resukt !== "alert") { ////////////////////////////////////////////////////////////////////////////// var resukt; - - diff --git a/test/suite/ch13/13.2/S13.2.2_A17_T3.js b/test/suite/ch13/13.2/S13.2.2_A17_T3.js index 8d8eba5bde..24accb026c 100644 --- a/test/suite/ch13/13.2/S13.2.2_A17_T3.js +++ b/test/suite/ch13/13.2/S13.2.2_A17_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression containing "with" statement is admitted - * - * @path ch13/13.2/S13.2.2_A17_T3.js - * @description In the check 4 we populate field getRight in __obj object since var getRight declaration adds variable to function scope - * but getRight in statement resolves within with(__obj) scope and searchs getRight in __obj first - */ +/*--- +info: FunctionExpression containing "with" statement is admitted +es5id: 13.2.2_A17_T3 +description: > + In the check 4 we populate field getRight in __obj object since + var getRight declaration adds variable to function scope but + getRight in statement resolves within with(__obj) scope and + searchs getRight in __obj first +---*/ p1="alert"; @@ -64,5 +66,3 @@ if (resukt !== "w1") { ////////////////////////////////////////////////////////////////////////////// var resukt; - - diff --git a/test/suite/ch13/13.2/S13.2.2_A18_T1.js b/test/suite/ch13/13.2/S13.2.2_A18_T1.js index 327f816dd1..1c7b2f98fd 100644 --- a/test/suite/ch13/13.2/S13.2.2_A18_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A18_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using arguments object within a "with" Expression that is nested in a function is admitted - * - * @path ch13/13.2/S13.2.2_A18_T1.js - * @description Object is declared with "var __obj={callee:"a"}" - */ +/*--- +info: > + Using arguments object within a "with" Expression that is nested in a + function is admitted +es5id: 13.2.2_A18_T1 +description: "Object is declared with \"var __obj={callee:\"a\"}\"" +---*/ var callee=0, b; @@ -51,4 +52,3 @@ if (!(this.b)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A18_T2.js b/test/suite/ch13/13.2/S13.2.2_A18_T2.js index d586ca5f94..e923408c3c 100644 --- a/test/suite/ch13/13.2/S13.2.2_A18_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A18_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Using arguments object within a "with" Expression that is nested in a function is admitted - * - * @path ch13/13.2/S13.2.2_A18_T2.js - * @description Object is declared with "__obj={callee:"a"}" - */ +/*--- +info: > + Using arguments object within a "with" Expression that is nested in a + function is admitted +es5id: 13.2.2_A18_T2 +description: "Object is declared with \"__obj={callee:\"a\"}\"" +---*/ this.callee = 0; var b; @@ -54,4 +55,3 @@ if (!(this.b)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T1.js b/test/suite/ch13/13.2/S13.2.2_A19_T1.js index 5fdcaee5ac..714c0d55e6 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T1.js - * @description Function is declared in the global scope - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T1 +description: Function is declared in the global scope +---*/ var a = 1; @@ -26,4 +25,3 @@ if (result !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T2.js b/test/suite/ch13/13.2/S13.2.2_A19_T2.js index b36f457b8b..42beeafad2 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T2.js - * @description Function is declared in the object scope. Using "with" statement - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T2 +description: Function is declared in the object scope. Using "with" statement +---*/ var a = 1; @@ -24,4 +23,3 @@ if (result !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T3.js b/test/suite/ch13/13.2/S13.2.2_A19_T3.js index 3f6e112661..1a2c076781 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T3.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T3.js - * @description Function is declared in the object scope and then an exception is thrown - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T3 +description: > + Function is declared in the object scope and then an exception is + thrown +---*/ var a = 1; @@ -31,7 +32,3 @@ if (result !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T4.js b/test/suite/ch13/13.2/S13.2.2_A19_T4.js index 65f6e765ac..a3020aae54 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T4.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T4.js - * @description Function is declared in the hierarchical object scope and then an exception is thrown - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T4 +description: > + Function is declared in the hierarchical object scope and then an + exception is thrown +---*/ var a = 1; @@ -33,7 +34,3 @@ if (result !== 3) { } // ////////////////////////////////////////////////////////////////////////////// - - - - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T5.js b/test/suite/ch13/13.2/S13.2.2_A19_T5.js index f0614e1759..9b275ccdaa 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T5.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T5.js - * @description Function is declared in the object scope, then an exception is thrown and the object is deleted - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T5 +description: > + Function is declared in the object scope, then an exception is + thrown and the object is deleted +---*/ var a = 1; @@ -37,4 +38,3 @@ if (result !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T6.js b/test/suite/ch13/13.2/S13.2.2_A19_T6.js index b9fafb1f56..99da95ff30 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T6.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T6.js - * @description Function is declared in the "object->do-while" scope, then the object is deleted and another object with the same name is declared - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T6 +description: > + Function is declared in the "object->do-while" scope, then the + object is deleted and another object with the same name is declared +---*/ var a = 1; @@ -38,9 +39,3 @@ if (result !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - - - - - - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T7.js b/test/suite/ch13/13.2/S13.2.2_A19_T7.js index c83232d660..dbb588905b 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T7.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T7.js - * @description Function is declared in the object scope as a variable - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T7 +description: Function is declared in the object scope as a variable +---*/ var a = 1; @@ -51,4 +50,3 @@ if (this.__func === undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A19_T8.js b/test/suite/ch13/13.2/S13.2.2_A19_T8.js index 7db4affd8b..32ff0251a7 100644 --- a/test/suite/ch13/13.2/S13.2.2_A19_T8.js +++ b/test/suite/ch13/13.2/S13.2.2_A19_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function's scope chain is started when it is declared - * - * @path ch13/13.2/S13.2.2_A19_T8.js - * @description Function is declared multiply times - */ +/*--- +info: Function's scope chain is started when it is declared +es5id: 13.2.2_A19_T8 +description: Function is declared multiply times +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -71,4 +70,3 @@ with ({a:99,b:"c"}) // ////////////////////////////////////////////////////////////////////////////// } - diff --git a/test/suite/ch13/13.2/S13.2.2_A1_T1.js b/test/suite/ch13/13.2/S13.2.2_A1_T1.js index cb9a2dbd61..4abaf96d27 100644 --- a/test/suite/ch13/13.2/S13.2.2_A1_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since a function is an object, it might be set to [[Prototype]] property of a new created object through [[Construct]] property - * - * @path ch13/13.2/S13.2.2_A1_T1.js - * @description Declaring a function with "function __func()" - */ +/*--- +info: > + Since a function is an object, it might be set to [[Prototype]] property + of a new created object through [[Construct]] property +es5id: 13.2.2_A1_T1 +description: Declaring a function with "function __func()" +---*/ var __MONSTER="monster"; var __PREDATOR="predator"; @@ -41,4 +42,3 @@ if (__monster.type !==__MONSTER) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A1_T2.js b/test/suite/ch13/13.2/S13.2.2_A1_T2.js index dd907d790a..32c124b4d9 100644 --- a/test/suite/ch13/13.2/S13.2.2_A1_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since a function is an object, it might be set to [[Prototype]] property of a new created object through [[Construct]] property - * - * @path ch13/13.2/S13.2.2_A1_T2.js - * @description Declaring a function with "var __PROTO = function()" - */ +/*--- +info: > + Since a function is an object, it might be set to [[Prototype]] property + of a new created object through [[Construct]] property +es5id: 13.2.2_A1_T2 +description: Declaring a function with "var __PROTO = function()" +includes: [$FAIL.js] +---*/ var __MONSTER="monster"; var __PREDATOR="predator"; @@ -41,4 +43,3 @@ if (__monster.type !==__MONSTER) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A2.js b/test/suite/ch13/13.2/S13.2.2_A2.js index 3389a36d12..ac9d419f15 100644 --- a/test/suite/ch13/13.2/S13.2.2_A2.js +++ b/test/suite/ch13/13.2/S13.2.2_A2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since a function is an object, it might be set to [[Prototype]] property of a new created object through [[Construct]] property, - * but [[call]] property must fail with TypeError error - * - * @path ch13/13.2/S13.2.2_A2.js - * @description Trying to [[call]] this function - */ +/*--- +info: > + Since a function is an object, it might be set to [[Prototype]] property of a new created object through [[Construct]] property, + but [[call]] property must fail with TypeError error +es5id: 13.2.2_A2 +description: Trying to [[call]] this function +---*/ var __PLANT="flower"; var __ROSE="rose"; @@ -39,4 +39,3 @@ try{ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A3_T1.js b/test/suite/ch13/13.2/S13.2.2_A3_T1.js index a04721c810..4c25dfe125 100644 --- a/test/suite/ch13/13.2/S13.2.2_A3_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A3_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * It gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). - * If PROTO_VAL is not an object, sets the [[Prototype]] property of native ECMAScript object just created - * to the original Object prototype object as described in 15.2.3.1 - * - * @path ch13/13.2/S13.2.2_A3_T1.js - * @description Declaring a function with "function __FACTORY()" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + It gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). + If PROTO_VAL is not an object, sets the [[Prototype]] property of native ECMAScript object just created + to the original Object prototype object as described in 15.2.3.1 +es5id: 13.2.2_A3_T1 +description: Declaring a function with "function __FACTORY()" +---*/ function __FACTORY(){}; __FACTORY.prototype=1; @@ -32,4 +32,3 @@ if (!(Object.prototype.isPrototypeOf(__device))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A3_T2.js b/test/suite/ch13/13.2/S13.2.2_A3_T2.js index 613adbb9cf..35a6c97c8e 100644 --- a/test/suite/ch13/13.2/S13.2.2_A3_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A3_T2.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * It gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). - * If PROTO_VAL is not an object, sets the [[Prototype]] property of native ECMAScript object just created - * to the original Object prototype object as described in 15.2.3.1 - * - * @path ch13/13.2/S13.2.2_A3_T2.js - * @description Declaring a function with "var __FACTORY = function()" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + It gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). + If PROTO_VAL is not an object, sets the [[Prototype]] property of native ECMAScript object just created + to the original Object prototype object as described in 15.2.3.1 +es5id: 13.2.2_A3_T2 +description: Declaring a function with "var __FACTORY = function()" +---*/ var __FACTORY = function(){}; __FACTORY.prototype=1; @@ -32,4 +32,3 @@ if (!(Object.prototype.isPrototypeOf(__device))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A4_T1.js b/test/suite/ch13/13.2/S13.2.2_A4_T1.js index 5804b6c296..06ae3c81d3 100644 --- a/test/suite/ch13/13.2/S13.2.2_A4_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A4_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). - * If PROTO_VAL is an object, sets the [[Prototype]] property of native ECMAScript object just created - * to the PROTO_VAL - * - * @path ch13/13.2/S13.2.2_A4_T1.js - * @description Declaring a function with "function __FACTORY()" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). + If PROTO_VAL is an object, sets the [[Prototype]] property of native ECMAScript object just created + to the PROTO_VAL +es5id: 13.2.2_A4_T1 +description: Declaring a function with "function __FACTORY()" +---*/ var __CUBE="cube"; @@ -35,4 +35,3 @@ if (__device.printShape() !== __CUBE) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A4_T2.js b/test/suite/ch13/13.2/S13.2.2_A4_T2.js index 3560e058b5..678c08b0eb 100644 --- a/test/suite/ch13/13.2/S13.2.2_A4_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A4_T2.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). - * If PROTO_VAL is an object, sets the [[Prototype]] property of native ECMAScript object just created - * to the PROTO_VAL - * - * @path ch13/13.2/S13.2.2_A4_T2.js - * @description Declaring a function with "__FACTORY = function()" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL). + If PROTO_VAL is an object, sets the [[Prototype]] property of native ECMAScript object just created + to the PROTO_VAL +es5id: 13.2.2_A4_T2 +description: Declaring a function with "__FACTORY = function()" +---*/ __CUBE="cube"; @@ -35,4 +35,3 @@ if (__device.printShape() !== __CUBE) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A5_T1.js b/test/suite/ch13/13.2/S13.2.2_A5_T1.js index 03c552318c..5899ec92be 100644 --- a/test/suite/ch13/13.2/S13.2.2_A5_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A5_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing native ECMAScript object just created as the this value and - * providing the argument list passed into [[Construct]] as the argument values - * - * @path ch13/13.2/S13.2.2_A5_T1.js - * @description Declaring a function with "function __FACTORY(arg1, arg2)" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing native ECMAScript object just created as the this value and + providing the argument list passed into [[Construct]] as the argument values +es5id: 13.2.2_A5_T1 +description: Declaring a function with "function __FACTORY(arg1, arg2)" +---*/ __VOLUME=8; __RED="red"; @@ -77,4 +77,3 @@ if (__device.bottom !== __BOTTOM) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A5_T2.js b/test/suite/ch13/13.2/S13.2.2_A5_T2.js index d3cd773ab4..c73bab462b 100644 --- a/test/suite/ch13/13.2/S13.2.2_A5_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A5_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing native ECMAScript object just created as the this value and - * providing the argument list passed into [[Construct]] as the argument values - * - * @path ch13/13.2/S13.2.2_A5_T2.js - * @description Declaring a function with "__FACTORY = function(arg1, arg2)" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing native ECMAScript object just created as the this value and + providing the argument list passed into [[Construct]] as the argument values +es5id: 13.2.2_A5_T2 +description: Declaring a function with "__FACTORY = function(arg1, arg2)" +---*/ __VOLUME=8; __RED="red"; @@ -77,4 +77,3 @@ if (__device.bottom !== __BOTTOM) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A6_T1.js b/test/suite/ch13/13.2/S13.2.2_A6_T1.js index 82ef96dcee..128a071f1e 100644 --- a/test/suite/ch13/13.2/S13.2.2_A6_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A6_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is not Object then return passed as this into [[Call]] object - * - * @path ch13/13.2/S13.2.2_A6_T1.js - * @description Declaring a function with "__func = function(arg)" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is not Object then return passed as this into [[Call]] object +es5id: 13.2.2_A6_T1 +description: Declaring a function with "__func = function(arg)" +---*/ __FOO="fooValue"; __BAR="barValue"; @@ -38,4 +38,3 @@ if (__obj.bar!==undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A6_T2.js b/test/suite/ch13/13.2/S13.2.2_A6_T2.js index f428bcb15d..3817a68a47 100644 --- a/test/suite/ch13/13.2/S13.2.2_A6_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A6_T2.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is not Object then return passed as this into [[Call]] object - * - * @path ch13/13.2/S13.2.2_A6_T2.js - * @description Declaring a function with "function __func (arg)" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is not Object then return passed as this into [[Call]] object +es5id: 13.2.2_A6_T2 +description: Declaring a function with "function __func (arg)" +---*/ var __FOO="fooValue"; var __BAR="barValue"; @@ -38,4 +38,3 @@ if (__obj.bar!==undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A7_T1.js b/test/suite/ch13/13.2/S13.2.2_A7_T1.js index 02734e83ef..2561826f50 100644 --- a/test/suite/ch13/13.2/S13.2.2_A7_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A7_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is an Object then return this just as obtained object - * - * @path ch13/13.2/S13.2.2_A7_T1.js - * @description Declaring a function with "as __func = function(arg)" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is an Object then return this just as obtained object +es5id: 13.2.2_A7_T1 +description: Declaring a function with "as __func = function(arg)" +---*/ var __FRST="one"; var __SCND="two"; @@ -39,4 +39,3 @@ if (__obj__.second !== __SCND) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A7_T2.js b/test/suite/ch13/13.2/S13.2.2_A7_T2.js index 9fbebf72c2..80774ed54a 100644 --- a/test/suite/ch13/13.2/S13.2.2_A7_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A7_T2.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is an Object then return this just as obtained object - * - * @path ch13/13.2/S13.2.2_A7_T2.js - * @description Declaring a "function as function __func (arg)" - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is an Object then return this just as obtained object +es5id: 13.2.2_A7_T2 +description: Declaring a "function as function __func (arg)" +---*/ __FRST="one"; __SCND="two"; @@ -39,4 +39,3 @@ if (__obj__.second !== __SCND) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.2_A8_T1.js b/test/suite/ch13/13.2/S13.2.2_A8_T1.js index 640c120f84..7d85083004 100644 --- a/test/suite/ch13/13.2/S13.2.2_A8_T1.js +++ b/test/suite/ch13/13.2/S13.2.2_A8_T1.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is an Function then return this just as obtained function - * - * @path ch13/13.2/S13.2.2_A8_T1.js - * @description Creating a function whose prototype contains "return" followed by declaration of another function - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is an Function then return this just as obtained function +es5id: 13.2.2_A8_T1 +description: > + Creating a function whose prototype contains "return" followed by + declaration of another function +---*/ var __FRST="one"; var __SCND="two"; @@ -50,5 +52,3 @@ if (__instance(1)!== 2) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.2_A8_T2.js b/test/suite/ch13/13.2/S13.2.2_A8_T2.js index e7f454b8d3..07d8870876 100644 --- a/test/suite/ch13/13.2/S13.2.2_A8_T2.js +++ b/test/suite/ch13/13.2/S13.2.2_A8_T2.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is an Function then return this just as obtained function - * - * @path ch13/13.2/S13.2.2_A8_T2.js - * @description Creating a function whose prototype contains declaration of another function declared as a variable - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is an Function then return this just as obtained function +es5id: 13.2.2_A8_T2 +description: > + Creating a function whose prototype contains declaration of + another function declared as a variable +---*/ var __FRST="one"; var __SCND="two"; @@ -48,5 +50,3 @@ if (__instance("SAM")!== "SAMBA") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.2_A8_T3.js b/test/suite/ch13/13.2/S13.2.2_A8_T3.js index e5e05f4bd6..fd1ec6eb07 100644 --- a/test/suite/ch13/13.2/S13.2.2_A8_T3.js +++ b/test/suite/ch13/13.2/S13.2.2_A8_T3.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the [[Construct]] property for a Function object F is called: - * A new native ECMAScript object is created. - * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument - * list passed into [[Construct]] as the argument values. - * If Type( [[Call]] returned) is an Function then return this just as obtained function - * - * @path ch13/13.2/S13.2.2_A8_T3.js - * @description Creating a function whose prototype contains declaration of another function defined by using Function.call method - */ +/*--- +info: > + When the [[Construct]] property for a Function object F is called: + A new native ECMAScript object is created. + Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument + list passed into [[Construct]] as the argument values. + If Type( [[Call]] returned) is an Function then return this just as obtained function +es5id: 13.2.2_A8_T3 +description: > + Creating a function whose prototype contains declaration of + another function defined by using Function.call method +---*/ var __FRST="one"; var __SCND="two"; @@ -48,5 +50,3 @@ if (__instance(1)!== 2) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2.2_A9.js b/test/suite/ch13/13.2/S13.2.2_A9.js index 4e178109ca..6bbefa2b3b 100644 --- a/test/suite/ch13/13.2/S13.2.2_A9.js +++ b/test/suite/ch13/13.2/S13.2.2_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Calling a function as a constructor is inadmissible as long as this.any_Function is called before it is declared - * - * @path ch13/13.2/S13.2.2_A9.js - * @description Calling a function as a constructor - */ +/*--- +info: > + Calling a function as a constructor is inadmissible as long as + this.any_Function is called before it is declared +es5id: 13.2.2_A9 +description: Calling a function as a constructor +includes: [Test262Error.js] +---*/ function FACTORY(){ this.id = 0; @@ -22,10 +24,9 @@ function FACTORY(){ //CHECK#1 try { var obj = new FACTORY(); - $ERROR('#1: var obj = new FACTORY() lead to throwing exception'); -} catch (e) { + $ERROR('#1: var obj = new FACTORY() lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2.3_A1.js b/test/suite/ch13/13.2/S13.2.3_A1.js index bc6d70b902..6f9fd59923 100644 --- a/test/suite/ch13/13.2/S13.2.3_A1.js +++ b/test/suite/ch13/13.2/S13.2.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2.3_A1.js - * @description check that all poisoning use the [[ThrowTypeError]] - * function object. - * @onlyStrict - */ +/*--- +es5id: 13.2.3_A1 +description: > + check that all poisoning use the [[ThrowTypeError]] function + object. +flags: [onlyStrict] +---*/ "use strict"; var poison = Object.getOwnPropertyDescriptor(function() {}, 'caller').get; @@ -46,4 +47,3 @@ checkPoison((function() { return arguments; })(), 'caller'); checkPoison((function() { return arguments; })(), 'callee'); checkPoison((function() {}).bind(null), 'caller'); checkPoison((function() {}).bind(null), 'arguments'); - diff --git a/test/suite/ch13/13.2/S13.2_A1_T1.js b/test/suite/ch13/13.2/S13.2_A1_T1.js index 5f7d1b15a3..f916ff1eaf 100644 --- a/test/suite/ch13/13.2/S13.2_A1_T1.js +++ b/test/suite/ch13/13.2/S13.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A "prototype" property is automatically created for every function - * - * @path ch13/13.2/S13.2_A1_T1.js - * @description Using "function __func(){}" as a FunctionDeclaration - */ +/*--- +info: A "prototype" property is automatically created for every function +es5id: 13.2_A1_T1 +description: Using "function __func(){}" as a FunctionDeclaration +---*/ function __func(){}; @@ -17,4 +16,3 @@ if (__func.prototype === undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2_A1_T2.js b/test/suite/ch13/13.2/S13.2_A1_T2.js index b9d933a6d2..9236dd6609 100644 --- a/test/suite/ch13/13.2/S13.2_A1_T2.js +++ b/test/suite/ch13/13.2/S13.2_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A "prototype" property is automatically created for every function - * - * @path ch13/13.2/S13.2_A1_T2.js - * @description Using "var __func = function(){}" as a FunctionDeclaration - */ +/*--- +info: A "prototype" property is automatically created for every function +es5id: 13.2_A1_T2 +description: Using "var __func = function(){}" as a FunctionDeclaration +---*/ var __func = function(){}; @@ -17,4 +16,3 @@ if (__func.prototype === undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2_A2_T1.js b/test/suite/ch13/13.2/S13.2_A2_T1.js index b49ba19730..4f3f50e93e 100644 --- a/test/suite/ch13/13.2/S13.2_A2_T1.js +++ b/test/suite/ch13/13.2/S13.2_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Nested function are admitted - * - * @path ch13/13.2/S13.2_A2_T1.js - * @description Nesting level is two - */ +/*--- +info: Nested function are admitted +es5id: 13.2_A2_T1 +description: Nesting level is two +---*/ var __JEDI="jedi"; @@ -25,4 +24,3 @@ if (__FUNC()(__JEDI) !== __JEDI) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2_A2_T2.js b/test/suite/ch13/13.2/S13.2_A2_T2.js index 024a624faf..ba3021419c 100644 --- a/test/suite/ch13/13.2/S13.2_A2_T2.js +++ b/test/suite/ch13/13.2/S13.2_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Nested function are admitted - * - * @path ch13/13.2/S13.2_A2_T2.js - * @description Nesting level is three - */ +/*--- +info: Nested function are admitted +es5id: 13.2_A2_T2 +description: Nesting level is three +---*/ var __ROBOT="C3PO"; @@ -27,4 +26,3 @@ if (__FUNC()()(__ROBOT) !== __ROBOT) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch13/13.2/S13.2_A3.js b/test/suite/ch13/13.2/S13.2_A3.js index 3cd3c7032b..0b7686c6cd 100644 --- a/test/suite/ch13/13.2/S13.2_A3.js +++ b/test/suite/ch13/13.2/S13.2_A3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Function object(F) is constructed the length property of F is set to the number of formal properties specified in FormalParameterList - * - * @path ch13/13.2/S13.2_A3.js - * @description Creating functions with various FormalParameterList and checking their lengths - */ +/*--- +info: > + When Function object(F) is constructed the length property of F is set to + the number of formal properties specified in FormalParameterList +es5id: 13.2_A3 +description: > + Creating functions with various FormalParameterList and checking + their lengths +---*/ function __func(){}; @@ -27,5 +30,3 @@ if (__gunc.length !== 3) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch13/13.2/S13.2_A4_T1.js b/test/suite/ch13/13.2/S13.2_A4_T1.js index ef47b61a0a..8d2229f451 100644 --- a/test/suite/ch13/13.2/S13.2_A4_T1.js +++ b/test/suite/ch13/13.2/S13.2_A4_T1.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Function object(F) is constructed the following steps from 9 to 11 take place - * 9.Create a new object as would be constructed by the expression new Object(). - * 10. Set the constructor property of Result(9) to F. This property is given attributes { DontEnum }. - * 11. Set the "prototype" property of F to Result(9). - * - * @path ch13/13.2/S13.2_A4_T1.js - * @description Checking prototype, prototype.constructor properties and {DontEnum} property of a constructor. - * Using "function __func(){}" as a FunctionDeclaration - */ +/*--- +info: > + When Function object(F) is constructed the following steps from 9 to 11 take place + 9.Create a new object as would be constructed by the expression new Object(). + 10. Set the constructor property of Result(9) to F. This property is given attributes { DontEnum }. + 11. Set the "prototype" property of F to Result(9). +es5id: 13.2_A4_T1 +description: > + Checking prototype, prototype.constructor properties and + {DontEnum} property of a constructor. Using "function __func(){}" + as a FunctionDeclaration +---*/ function __func(){}; @@ -44,9 +46,3 @@ if (__constructor_was__enumed) { } // ////////////////////////////////////////////////////////////////////////////// - - - - - - diff --git a/test/suite/ch13/13.2/S13.2_A4_T2.js b/test/suite/ch13/13.2/S13.2_A4_T2.js index 2da55b7638..e432550763 100644 --- a/test/suite/ch13/13.2/S13.2_A4_T2.js +++ b/test/suite/ch13/13.2/S13.2_A4_T2.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Function object(F) is constructed the following steps from 9 to 11 take place - * 9.Create a new object as would be constructed by the expression new Object(). - * 10. Set the constructor property of Result(9) to F. This property is given attributes { DontEnum }. - * 11. Set the "prototype" property of F to Result(9). - * - * @path ch13/13.2/S13.2_A4_T2.js - * @description Checking prototype, prototype.constructor properties and {DontEnum} property of a constructor. - * Using "var __gunc = function(){}" as a FunctionDeclaration - */ +/*--- +info: > + When Function object(F) is constructed the following steps from 9 to 11 take place + 9.Create a new object as would be constructed by the expression new Object(). + 10. Set the constructor property of Result(9) to F. This property is given attributes { DontEnum }. + 11. Set the "prototype" property of F to Result(9). +es5id: 13.2_A4_T2 +description: > + Checking prototype, prototype.constructor properties and + {DontEnum} property of a constructor. Using "var __gunc = + function(){}" as a FunctionDeclaration +---*/ var __gunc = function(){}; @@ -44,9 +46,3 @@ if (__constructor_was__enumed) { } // ////////////////////////////////////////////////////////////////////////////// - - - - - - diff --git a/test/suite/ch13/13.2/S13.2_A5.js b/test/suite/ch13/13.2/S13.2_A5.js index 6d88fad8e1..14d0430044 100644 --- a/test/suite/ch13/13.2/S13.2_A5.js +++ b/test/suite/ch13/13.2/S13.2_A5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Function object(F) is constructed - * the [[Prototype]] property of F is set to the original Function prototype object as specified in 15.3.3.1 - * - * @path ch13/13.2/S13.2_A5.js - * @description Function.prototype.isPrototypeOf() is used - */ +/*--- +info: > + When Function object(F) is constructed + the [[Prototype]] property of F is set to the original Function prototype object as specified in 15.3.3.1 +es5id: 13.2_A5 +description: Function.prototype.isPrototypeOf() is used +---*/ function __func(){}; @@ -29,6 +29,3 @@ if (!(Function.prototype.isPrototypeOf(__gunc))) { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch13/13.2/S13.2_A6_T1.js b/test/suite/ch13/13.2/S13.2_A6_T1.js index 2fca01cc2f..64e9339f58 100644 --- a/test/suite/ch13/13.2/S13.2_A6_T1.js +++ b/test/suite/ch13/13.2/S13.2_A6_T1.js @@ -1,13 +1,11 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2_A6_T1.js - * @description check if "caller" poisoning poisons - * getOwnPropertyDescriptor too - * @onlyStrict - */ +/*--- +es5id: 13.2_A6_T1 +description: check if "caller" poisoning poisons getOwnPropertyDescriptor too +flags: [onlyStrict] +---*/ "use strict"; Object.getOwnPropertyDescriptor(function(){}, 'caller'); - diff --git a/test/suite/ch13/13.2/S13.2_A6_T2.js b/test/suite/ch13/13.2/S13.2_A6_T2.js index e8a3344620..b8ba86d729 100644 --- a/test/suite/ch13/13.2/S13.2_A6_T2.js +++ b/test/suite/ch13/13.2/S13.2_A6_T2.js @@ -1,13 +1,13 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2_A6_T2.js - * @description check if "arguments" poisoning poisons - * getOwnPropertyDescriptor too - * @onlyStrict - */ +/*--- +es5id: 13.2_A6_T2 +description: > + check if "arguments" poisoning poisons getOwnPropertyDescriptor + too +flags: [onlyStrict] +---*/ "use strict"; Object.getOwnPropertyDescriptor(function(){}, 'arguments'); - diff --git a/test/suite/ch13/13.2/S13.2_A7_T1.js b/test/suite/ch13/13.2/S13.2_A7_T1.js index d557bbd673..2bb78b7bc8 100644 --- a/test/suite/ch13/13.2/S13.2_A7_T1.js +++ b/test/suite/ch13/13.2/S13.2_A7_T1.js @@ -1,14 +1,11 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2_A7_T1.js - * @description check if "caller" poisoning poisons - * hasOwnProperty too - * @onlyStrict - */ +/*--- +es5id: 13.2_A7_T1 +description: check if "caller" poisoning poisons hasOwnProperty too +flags: [onlyStrict] +---*/ "use strict"; (function(){}).hasOwnProperty('caller'); - - diff --git a/test/suite/ch13/13.2/S13.2_A7_T2.js b/test/suite/ch13/13.2/S13.2_A7_T2.js index 82c03938ff..c015755c7c 100644 --- a/test/suite/ch13/13.2/S13.2_A7_T2.js +++ b/test/suite/ch13/13.2/S13.2_A7_T2.js @@ -1,14 +1,11 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2_A7_T2.js - * @description check if "arguments" poisoning poisons - * hasOwnProperty too - * @onlyStrict - */ +/*--- +es5id: 13.2_A7_T2 +description: check if "arguments" poisoning poisons hasOwnProperty too +flags: [onlyStrict] +---*/ "use strict"; (function(){}).hasOwnProperty('arguments'); - - diff --git a/test/suite/ch13/13.2/S13.2_A8_T1.js b/test/suite/ch13/13.2/S13.2_A8_T1.js index a68553e824..9209332612 100644 --- a/test/suite/ch13/13.2/S13.2_A8_T1.js +++ b/test/suite/ch13/13.2/S13.2_A8_T1.js @@ -1,14 +1,11 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2_A8_T1.js - * @description check if "caller" poisoning poisons - * "in" too - * @onlyStrict - */ +/*--- +es5id: 13.2_A8_T1 +description: check if "caller" poisoning poisons "in" too +flags: [onlyStrict] +---*/ "use strict"; 'caller' in function() {}; - - diff --git a/test/suite/ch13/13.2/S13.2_A8_T2.js b/test/suite/ch13/13.2/S13.2_A8_T2.js index 0d9eec7c5a..c9584a9ff7 100644 --- a/test/suite/ch13/13.2/S13.2_A8_T2.js +++ b/test/suite/ch13/13.2/S13.2_A8_T2.js @@ -1,14 +1,11 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch13/13.2/S13.2_A8_T2.js - * @description check if "arguments" poisoning poisons - * "in" too - * @onlyStrict - */ +/*--- +es5id: 13.2_A8_T2 +description: check if "arguments" poisoning poisons "in" too +flags: [onlyStrict] +---*/ "use strict"; 'arguments' in function() {}; - - diff --git a/test/suite/ch14/14.0/S14_A1.js b/test/suite/ch14/14.0/S14_A1.js index 302db12dda..2b0cf10d00 100644 --- a/test/suite/ch14/14.0/S14_A1.js +++ b/test/suite/ch14/14.0/S14_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionExpression must be localed in a reacheable fragment of the program - * - * @path ch14/14.0/S14_A1.js - * @description Declaring a function within an "if" Expression - */ +/*--- +info: FunctionExpression must be localed in a reacheable fragment of the program +es5id: 14_A1 +description: Declaring a function within an "if" Expression +---*/ var THERE = "I'm there"; var HERE = "I'm here"; @@ -32,4 +31,3 @@ if (__func() !== HERE) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch14/14.0/S14_A2.js b/test/suite/ch14/14.0/S14_A2.js index 758e6daf53..e52dda0b72 100644 --- a/test/suite/ch14/14.0/S14_A2.js +++ b/test/suite/ch14/14.0/S14_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * FunctionDeclaration cannot be localed inside an Expression - * - * @path ch14/14.0/S14_A2.js - * @description Declaring a function within an "if" Expression - */ +/*--- +info: FunctionDeclaration cannot be localed inside an Expression +es5id: 14_A2 +description: Declaring a function within an "if" Expression +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -28,4 +27,3 @@ if (function f(arg){ }; // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch14/14.0/S14_A3.js b/test/suite/ch14/14.0/S14_A3.js index d7dff69a6c..2ceb6b1832 100644 --- a/test/suite/ch14/14.0/S14_A3.js +++ b/test/suite/ch14/14.0/S14_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Global FunctionDeclaration cannot be defined within the body of another FunctionDeclaration - * - * @path ch14/14.0/S14_A3.js - * @description Declaring a function within the body of another function - */ +/*--- +info: > + Global FunctionDeclaration cannot be defined within the body of another + FunctionDeclaration +es5id: 14_A3 +description: Declaring a function within the body of another function +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +28,3 @@ if (typeof __gunc !== "undefined") { function __func(){ function __gunc(){return true}; } - diff --git a/test/suite/ch14/14.0/S14_A5_T1.js b/test/suite/ch14/14.0/S14_A5_T1.js index 4991471504..3a282b3286 100644 --- a/test/suite/ch14/14.0/S14_A5_T1.js +++ b/test/suite/ch14/14.0/S14_A5_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Identifer within a FunctionDeclaration can be written in both letters and unicode - * - * @path ch14/14.0/S14_A5_T1.js - * @description Declaring a function with "function __\u0066\u0075\u006e\u0063(){return "both"}" - */ +/*--- +info: > + The Identifer within a FunctionDeclaration can be written in both letters + and unicode +es5id: 14_A5_T1 +description: > + Declaring a function with "function + __\u0066\u0075\u006e\u0063(){return "both"}" +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -19,4 +22,3 @@ if (__func() !== "both") { function __func(){return "ascii"}; function \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"};//__func in unicode function __\u0066\u0075\u006e\u0063(){return "both"};//__func in unicode - diff --git a/test/suite/ch14/14.0/S14_A5_T2.js b/test/suite/ch14/14.0/S14_A5_T2.js index ee3c9d2a3c..e6aca67e40 100644 --- a/test/suite/ch14/14.0/S14_A5_T2.js +++ b/test/suite/ch14/14.0/S14_A5_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Identifer within a FunctionDeclaration can be written in both letters and unicode - * - * @path ch14/14.0/S14_A5_T2.js - * @description Declaring a function with "function \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"}" - */ +/*--- +info: > + The Identifer within a FunctionDeclaration can be written in both letters + and unicode +es5id: 14_A5_T2 +description: > + Declaring a function with "function + \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"}" +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +21,3 @@ if (__func() !== "unicode") { function __func(){return "ascii"}; function \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"};//__func in unicode - diff --git a/test/suite/ch14/14.1/14.1-1-s.js b/test/suite/ch14/14.1/14.1-1-s.js index 6b2b377b8d..fbf7b0874c 100644 --- a/test/suite/ch14/14.1/14.1-1-s.js +++ b/test/suite/ch14/14.1/14.1-1-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-1-s.js - * @description 'use strict' directive - correct usage - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return(this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-1-s +description: "'use strict' directive - correct usage" +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return(this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-10-s.js b/test/suite/ch14/14.1/14.1-10-s.js index 5badea52bf..144f531668 100644 --- a/test/suite/ch14/14.1/14.1-10-s.js +++ b/test/suite/ch14/14.1/14.1-10-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-10-s.js - * @description other directives - may follow 'use strict' directive - * @noStrict - */ - - -function testcase() { - - function foo() - { - "use strict"; - "bogus directive"; - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-10-s +description: other directives - may follow 'use strict' directive +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + "use strict"; + "bogus directive"; + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-11-s.js b/test/suite/ch14/14.1/14.1-11-s.js index bb5cbf79c9..c55e582489 100644 --- a/test/suite/ch14/14.1/14.1-11-s.js +++ b/test/suite/ch14/14.1/14.1-11-s.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-11-s.js - * @description comments may preceed 'use strict' directive - * @noStrict - */ - - -function testcase() { - - function foo() - { - // comment - /* comment */ "use strict"; - - return(this === undefined); - - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-11-s +description: comments may preceed 'use strict' directive +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + // comment + /* comment */ "use strict"; + + return(this === undefined); + + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-12-s.js b/test/suite/ch14/14.1/14.1-12-s.js index 4aa3fb1157..c5fc84f175 100644 --- a/test/suite/ch14/14.1/14.1-12-s.js +++ b/test/suite/ch14/14.1/14.1-12-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-12-s.js - * @description comments may follow 'use strict' directive - * @noStrict - */ - - -function testcase() { - - function foo() - { - "use strict"; /* comment */ // comment - - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-12-s +description: comments may follow 'use strict' directive +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + "use strict"; /* comment */ // comment + + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-13-s.js b/test/suite/ch14/14.1/14.1-13-s.js index ba3889681a..63165f94b0 100644 --- a/test/suite/ch14/14.1/14.1-13-s.js +++ b/test/suite/ch14/14.1/14.1-13-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-13-s.js - * @description semicolon insertion works for'use strict' directive - * @noStrict - */ - - -function testcase() { - - function foo() - { - "use strict" - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-13-s +description: semicolon insertion works for'use strict' directive +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + "use strict" + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-14-s.js b/test/suite/ch14/14.1/14.1-14-s.js index fd37bd4f8b..5f7ae4f42b 100644 --- a/test/suite/ch14/14.1/14.1-14-s.js +++ b/test/suite/ch14/14.1/14.1-14-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-14-s.js - * @description semicolon insertion may come before 'use strict' directive - * @noStrict - */ - - -function testcase() { - - function foo() - { - "another directive" - "use strict" ; - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-14-s +description: semicolon insertion may come before 'use strict' directive +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + "another directive" + "use strict" ; + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-15-s.js b/test/suite/ch14/14.1/14.1-15-s.js index 38325c4d46..15f0279c98 100644 --- a/test/suite/ch14/14.1/14.1-15-s.js +++ b/test/suite/ch14/14.1/14.1-15-s.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-15-s.js - * @description blank lines may come before 'use strict' directive - * @noStrict - */ - - -function testcase() { - - function foo() - { - - - - - - - "use strict" ; - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-15-s +description: blank lines may come before 'use strict' directive +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + + + + + + + "use strict" ; + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-16-s.js b/test/suite/ch14/14.1/14.1-16-s.js index e63ef40d08..7ff8e586cc 100644 --- a/test/suite/ch14/14.1/14.1-16-s.js +++ b/test/suite/ch14/14.1/14.1-16-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-16-s.js - * @description 'use strict' directive - not recognized if it follow an empty statement - * @noStrict - */ - - -function testcase() { - - function foo() - { - ; 'use strict'; - return (this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-16-s +description: > + 'use strict' directive - not recognized if it follow an empty + statement +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + ; 'use strict'; + return (this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-17-s.js b/test/suite/ch14/14.1/14.1-17-s.js index cfc21ff215..d295da7f56 100644 --- a/test/suite/ch14/14.1/14.1-17-s.js +++ b/test/suite/ch14/14.1/14.1-17-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-17-s.js - * @description 'use strict' directive - not recognized if it follow some other statment empty statement - * @noStrict - */ - -function testcase() { - - function foo() - { - var x; - 'use strict'; - return (this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-17-s +description: > + 'use strict' directive - not recognized if it follow some other + statment empty statement +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + var x; + 'use strict'; + return (this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-2-s.js b/test/suite/ch14/14.1/14.1-2-s.js index 9701c40206..acd4fe9984 100644 --- a/test/suite/ch14/14.1/14.1-2-s.js +++ b/test/suite/ch14/14.1/14.1-2-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-2-s.js - * @description "use strict" directive - correct usage double quotes - * @noStrict - */ - - -function testcase() { - - function foo() - { - "use strict"; - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-2-s +description: "\"use strict\" directive - correct usage double quotes" +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + "use strict"; + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-3-s.js b/test/suite/ch14/14.1/14.1-3-s.js index 90eb7767ae..8432308178 100644 --- a/test/suite/ch14/14.1/14.1-3-s.js +++ b/test/suite/ch14/14.1/14.1-3-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-3-s.js - * @description 'use strict' directive - not recognized if it contains extra whitespace - * @noStrict - */ - - -function testcase() { - - function foo() - { - ' use strict '; - return (this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-3-s +description: > + 'use strict' directive - not recognized if it contains extra + whitespace +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + ' use strict '; + return (this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-4-s.js b/test/suite/ch14/14.1/14.1-4-s.js index f53cd37fab..82dad1b16b 100644 --- a/test/suite/ch14/14.1/14.1-4-s.js +++ b/test/suite/ch14/14.1/14.1-4-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-4-s.js - * @description 'use strict' directive - not recognized if contains Line Continuation - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use str\ -ict'; - return (this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-4-s +description: > + 'use strict' directive - not recognized if contains Line + Continuation +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use str\ +ict'; + return (this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-4gs.js b/test/suite/ch14/14.1/14.1-4gs.js index 67456de53c..34a6bc1b67 100644 --- a/test/suite/ch14/14.1/14.1-4gs.js +++ b/test/suite/ch14/14.1/14.1-4gs.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-4gs.js - * @description StrictMode - a Use Strict Directive followed by a strict mode violation - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"use strict"; -throw NotEarlyError; -eval = 42; \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-4gs +description: > + StrictMode - a Use Strict Directive followed by a strict mode + violation +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +throw NotEarlyError; +eval = 42; diff --git a/test/suite/ch14/14.1/14.1-5-s.js b/test/suite/ch14/14.1/14.1-5-s.js index f0b40a12c4..110b495a72 100644 --- a/test/suite/ch14/14.1/14.1-5-s.js +++ b/test/suite/ch14/14.1/14.1-5-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-5-s.js - * @description 'use strict' directive - not recognized if contains a EscapeSequence - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use\u0020strict'; - return(this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-5-s +description: > + 'use strict' directive - not recognized if contains a + EscapeSequence +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use\u0020strict'; + return(this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-5gs.js b/test/suite/ch14/14.1/14.1-5gs.js index 9ce043a670..2ac4ac9c13 100644 --- a/test/suite/ch14/14.1/14.1-5gs.js +++ b/test/suite/ch14/14.1/14.1-5gs.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-5gs.js - * @description StrictMode - a Use Strict Directive embedded in a directive prologue followed by a strict mode violation - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ -"a"; -"use strict"; -"c"; -throw NotEarlyError; -eval = 42; \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-5gs +description: > + StrictMode - a Use Strict Directive embedded in a directive + prologue followed by a strict mode violation +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"a"; +"use strict"; +"c"; +throw NotEarlyError; +eval = 42; diff --git a/test/suite/ch14/14.1/14.1-6-s.js b/test/suite/ch14/14.1/14.1-6-s.js index c779da837f..438cf64092 100644 --- a/test/suite/ch14/14.1/14.1-6-s.js +++ b/test/suite/ch14/14.1/14.1-6-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-6-s.js - * @description 'use strict' directive - not recognized if contains a instead of a space - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - return (this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-6-s +description: > + 'use strict' directive - not recognized if contains a + instead of a space +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + return (this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-7-s.js b/test/suite/ch14/14.1/14.1-7-s.js index a54b90774f..152bda9a1c 100644 --- a/test/suite/ch14/14.1/14.1-7-s.js +++ b/test/suite/ch14/14.1/14.1-7-s.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-7-s.js - * @description 'use strict' directive - not recognized if upper case - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'Use Strict'; - return (this !== undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-7-s +description: "'use strict' directive - not recognized if upper case" +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'Use Strict'; + return (this !== undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-8-s.js b/test/suite/ch14/14.1/14.1-8-s.js index 446ab3a74c..88d725b374 100644 --- a/test/suite/ch14/14.1/14.1-8-s.js +++ b/test/suite/ch14/14.1/14.1-8-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-8-s.js - * @description 'use strict' directive - may follow other directives - * @noStrict - */ - - -function testcase() { - - function foo() - { - "bogus directive"; - "use strict"; - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-8-s +description: "'use strict' directive - may follow other directives" +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + "bogus directive"; + "use strict"; + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch14/14.1/14.1-9-s.js b/test/suite/ch14/14.1/14.1-9-s.js index 2efb4736ab..2ff11aa005 100644 --- a/test/suite/ch14/14.1/14.1-9-s.js +++ b/test/suite/ch14/14.1/14.1-9-s.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch14/14.1/14.1-9-s.js - * @description 'use strict' directive - may occur multiple times - * @noStrict - */ - - -function testcase() { - - function foo() - { - 'use strict'; - "use strict"; - return (this === undefined); - } - - return foo.call(undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 14.1-9-s +description: "'use strict' directive - may occur multiple times" +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() + { + 'use strict'; + "use strict"; + return (this === undefined); + } + + return foo.call(undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js b/test/suite/ch15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js index ecf045e3dc..93fc31ee42 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js - * @description Global.NaN is a data property with default attribute values (false) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'NaN'); - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.1.1-0 +description: Global.NaN is a data property with default attribute values (false) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'NaN'); + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A1.js index d09000a6ef..ee487c4f3a 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of NaN is NaN - * - * @path ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A1.js - * @description Use typeof, isNaN, isFinite - */ +/*--- +info: The initial value of NaN is NaN +es5id: 15.1.1.1_A1 +description: Use typeof, isNaN, isFinite +---*/ // CHECK#1 if (typeof(NaN) !== "number") { @@ -22,5 +21,3 @@ if (isNaN(NaN) !== true) { if (isFinite(NaN) !== false) { $ERROR('#3: NaN === Not-a-Finite. Actual: ' + (NaN)); } - - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.1.js index ee5fcdab90..bc23c3652e 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The NaN is DontDelete - * - * @path ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.1.js - * @description Use delete - * @noStrict - */ +/*--- +info: The NaN is DontDelete +es5id: 15.1.1.1_A3.1 +description: Use delete +flags: [noStrict] +---*/ // CHECK#1 if (delete NaN !== false) { $ERROR('#1: delete NaN === false. Actual: ' + (delete NaN)); } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.2.js b/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.2.js index e48814864a..9148a78eec 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.2.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The NaN is DontEnum - * - * @path ch15/15.1/15.1.1/15.1.1.1/S15.1.1.1_A3.2.js - * @description Use for-in statement - */ +/*--- +info: The NaN is DontEnum +es5id: 15.1.1.1_A3.2 +description: Use for-in statement +---*/ // CHECK#1 for (var prop in this) { @@ -14,4 +13,3 @@ for (var prop in this) { $ERROR('#1: The NaN is DontEnum'); } } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js b/test/suite/ch15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js index 53642a7d45..477631f27a 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js - * @description Global.Infinity is a data property with default attribute values (false) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity'); - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.1.2-0 +description: > + Global.Infinity is a data property with default attribute values + (false) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity'); + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A1.js index 96980d89a1..063168d55f 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Infinity is Number.POSITIVE_INFINITY - * - * @path ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A1.js - * @description Use typeof, isNaN, isFinite - */ +/*--- +info: The initial value of Infinity is Number.POSITIVE_INFINITY +es5id: 15.1.1.2_A1 +description: Use typeof, isNaN, isFinite +---*/ // CHECK#1 if (typeof(Infinity) !== "number") { @@ -28,4 +27,3 @@ if (isNaN(Infinity) !== false) { if (Infinity !== Number.POSITIVE_INFINITY) { $ERROR('#4: Infinity === Number.POSITIVE_INFINITY. Actual: ' + (Infinity)); } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A2_T2.js b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A2_T2.js index 2b38f5efaa..3f35df431e 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A2_T2.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A2_T2.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Infinity is not ReadOnly - * - * @path ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A2_T2.js - * @description Checking typeof Functions - */ +/*--- +info: The Infinity is not ReadOnly +es5id: 15.1.1.2_A2_T2 +description: Checking typeof Functions +---*/ // CHECK#1 var Finite = true; if (typeof(Finite) !== "boolean") { $ERROR('#1: Finite = true; typeof(NaN) === "boolean". Actual: ' + (typeof(NaN))); } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.1.js index f410349661..f55723df66 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Infinity is DontDelete - * - * @path ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.1.js - * @description Use delete - * @noStrict - */ +/*--- +info: The Infinity is DontDelete +es5id: 15.1.1.2_A3.1 +description: Use delete +flags: [noStrict] +---*/ // CHECK#1 if (delete Infinity !== false) { $ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity)); } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.2.js b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.2.js index 87f7af3c8c..18f7d83e37 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.2.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Infinity is DontEnum - * - * @path ch15/15.1/15.1.1/15.1.1.2/S15.1.1.2_A3.2.js - * @description Use for-in statement - */ +/*--- +info: The Infinity is DontEnum +es5id: 15.1.1.2_A3.2 +description: Use for-in statement +---*/ // CHECK#1 for (var prop in this) { @@ -14,4 +13,3 @@ for (var prop in this) { $ERROR('#1: The Infinity is DontEnum'); } } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js index 83929645eb..19dc4c81ff 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js - * @description Global.undefined is a data property with default attribute values (false) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'undefined'); - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.1.3-0 +description: > + Global.undefined is a data property with default attribute values + (false) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'undefined'); + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-1.js index b331589f0d..edffecc4ea 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-1.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-1.js - * @description undefined is not writable, should not throw in non-strict mode - * @noStrict - */ - -function testcase(){ - undefined = 5; - if(typeof undefined !== "undefined") return false; - - var nosuchproperty; - if(nosuchproperty !== undefined) return false; - - return true; -} - -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.1.3-1 +description: undefined is not writable, should not throw in non-strict mode +flags: [noStrict] +includes: [runTestCase.js] +---*/ + +function testcase(){ + undefined = 5; + if(typeof undefined !== "undefined") return false; + + var nosuchproperty; + if(nosuchproperty !== undefined) return false; + + return true; +} + +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-2.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-2.js index 9d7a614c4e..d1ed84364f 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-2.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-2.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-2.js - * @description undefined is not writable, should throw TypeError in strict mode - * @onlyStrict - */ - -function testcase(){ - "use strict"; - var global = fnGlobalObject(); - try{ - global["undefined"] = 5; // Should throw a TypeError as per 8.12.5 - } catch (ex) { - if(ex instanceof TypeError){ - return true; - } else { - return false; - } - } -} - -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.1.3-2 +description: undefined is not writable, should throw TypeError in strict mode +flags: [onlyStrict] +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase(){ + "use strict"; + var global = fnGlobalObject(); + try{ + global["undefined"] = 5; // Should throw a TypeError as per 8.12.5 + } catch (ex) { + if(ex instanceof TypeError){ + return true; + } else { + return false; + } + } +} + +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-3.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-3.js index b2dec459a1..cc55115cf5 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-3.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-3.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.1/15.1.1.3/15.1.1.3-3.js - * @description undefined is not writable, simple assignment should return the rval value (11.13.1-6) - */ - -function testcase(){ - var newProperty = undefined = 42; - return (newProperty === 42); -} - -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.1.3-3 +description: > + undefined is not writable, simple assignment should return the + rval value (11.13.1-6) +includes: [runTestCase.js] +---*/ + +function testcase(){ + var newProperty = undefined = 42; + return (newProperty === 42); +} + +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A1.js index e05a01784c..f953d11c36 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of undefined is undefined - * - * @path ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A1.js - * @description Use typeof, isNaN, isFinite - */ +/*--- +info: The initial value of undefined is undefined +es5id: 15.1.1.3_A1 +description: Use typeof, isNaN, isFinite +---*/ // CHECK#1 if (typeof(undefined) !== "undefined") { @@ -22,4 +21,3 @@ if (undefined !== void 0) { if (undefined !== eval("var x")) { $ERROR('#3: undefined === eval("var x"). Actual: ' + (undefined)); } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.1.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.1.js index 7a1657651c..57174a55d6 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.1.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The undefined is DontDelete - * - * @path ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.1.js - * @description Use delete - * @noStrict - */ +/*--- +info: The undefined is DontDelete +es5id: 15.1.1.3_A3.1 +description: Use delete +flags: [noStrict] +---*/ // CHECK#1 if (delete undefined !== false) { $ERROR('#1: delete undefined === false. Actual: ' + (delete undefined)); } - diff --git a/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.2.js b/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.2.js index f818b96db6..e1699de130 100644 --- a/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.2.js +++ b/test/suite/ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The undefined is DontEnum - * - * @path ch15/15.1/15.1.1/15.1.1.3/S15.1.1.3_A3.2.js - * @description Use for-in statement - */ +/*--- +info: The undefined is DontEnum +es5id: 15.1.1.3_A3.2 +description: Use for-in statement +---*/ // CHECK#1 for (prop in this) { @@ -14,4 +13,3 @@ for (prop in this) { $ERROR('#1: The undefined is DontEnum'); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T1.js index e335d2f73f..060086f0d6 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is not a string value, return x - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T1.js - * @description Checking all primitive - */ +/*--- +info: If x is not a string value, return x +es5id: 15.1.2.1_A1.1_T1 +description: Checking all primitive +---*/ //CHECK#1 var x = 1; @@ -32,5 +31,4 @@ if (eval(null) !== null) { //CHECK#5 if (eval(undefined) !== undefined) { $ERROR('#5: eval(undefined) === undefined. Actual: ' + (eval(undefined))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T2.js index 67dd83d3fa..fee3a9296f 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is not a string value, return x - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.1_T2.js - * @description Checking all object - */ +/*--- +info: If x is not a string value, return x +es5id: 15.1.2.1_A1.1_T2 +description: Checking all object +---*/ //CHECK#1 var x = {}; @@ -30,5 +29,4 @@ if (eval(x) !== x) { x = new String("1+1"); if (eval(x) !== x) { $ERROR('#4: x = new String("1"); eval(x) === x. Actual: ' + (eval(x))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.2_T1.js index 616755cdb1..9b05ffe2dd 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the eval function is called with some argument, then use a first argument - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A1.2_T1.js - * @description eval("x = 1", "x = 2"), x equal 1, not 2 - */ +/*--- +info: > + If the eval function is called with some argument, then use a first + argument +es5id: 15.1.2.1_A1.2_T1 +description: eval("x = 1", "x = 2"), x equal 1, not 2 +---*/ //CHECK#1 var x; @@ -14,4 +15,3 @@ eval("x = 1", "x = 2"); if (x !== 1) { $ERROR('#1: eval("x = 1", "x = 2"); x === 1. Actual: ' + (x)); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T1.js index b1a6a03d7b..e3a22608a9 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the parse fails, throw a SyntaxError exception (but see also clause 16) - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T1.js - * @description Checking if execution of "eval("x = 1; x\u000A++"), catch SyntaxError" passes - */ +/*--- +info: If the parse fails, throw a SyntaxError exception (but see also clause 16) +es5id: 15.1.2.1_A2_T1 +description: > + Checking if execution of "eval("x = 1; x\u000A++"), catch + SyntaxError" passes +---*/ //CHECK#1 var x; @@ -17,5 +18,4 @@ try { if ((e instanceof SyntaxError) !== true) { $ERROR('#1.2: eval("x = 1; x\\u000A++") must throw a SyntaxError. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T2.js index 176a93c260..1338b1f160 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T2.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the parse fails, throw a SyntaxError exception (but see also clause 16) - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A2_T2.js - * @description Checking if execution of "eval("x = 1; x\u000A++")" fails - * @negative - */ +/*--- +info: If the parse fails, throw a SyntaxError exception (but see also clause 16) +es5id: 15.1.2.1_A2_T2 +description: Checking if execution of "eval("x = 1; x\u000A++")" fails +flags: [negative] +---*/ //CHECK#1 var x; -eval("x = 1; x\u000A++"); - +eval("x = 1; x\u000A++"); diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T1.js index 5341f7ff0c..e805eb30a1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is a value V, - * then return the value V - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T1.js - * @description Expression statement. Eval return primitive value - */ +/*--- +info: > + If Result(3).type is normal and its completion value is a value V, + then return the value V +es5id: 15.1.2.1_A3.1_T1 +description: Expression statement. Eval return primitive value +---*/ var x; //CHECK#1 @@ -29,5 +29,4 @@ if (eval("'1'") !== '1') { x = 1; if (eval("++x") !== 2) { $ERROR('#4: x = 1; eval("++x") === 2. Actual: ' + (x)); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T2.js index cf91aa5787..0e370fc768 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is a value V, - * then return the value V - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.1_T2.js - * @description Expression statement. Eval return object value - */ +/*--- +info: > + If Result(3).type is normal and its completion value is a value V, + then return the value V +es5id: 15.1.2.1_A3.1_T2 +description: Expression statement. Eval return object value +---*/ //CHECK#1 var x = {}; @@ -20,6 +20,4 @@ if (eval("y = x") !== x) { //CHECK#2 if (eval("x") !== x) { $ERROR('#2: var x = {}; eval("x") === x. Actual: ' + (eval("x"))); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T1.js index 61d9099c9a..375ebff0cf 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T1.js - * @description Block statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T1 +description: Block statement +---*/ //CHECK#1 if (eval("{}") !== undefined) { $ERROR('#1: eval("{}") === undefined. Actual: ' + (eval("{}"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T2.js index c6893cefe3..2a5e301b3a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T2.js - * @description Var statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T2 +description: Var statement +---*/ //CHECK#1 if (eval("var x = 1") !== undefined) { $ERROR('#1: eval("var x = 1") === undefined. Actual: ' + (eval("var x = 1"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T3.js index 63a00ef515..018bd945e8 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T3.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T3.js - * @description Empty statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T3 +description: Empty statement +---*/ //CHECK#1 if (eval(";") !== undefined) { $ERROR('#1: eval(";") === undefined. Actual: ' + (eval(";"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T4.js index 4c71434951..94230f198b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T4.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T4.js - * @description If statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T4 +description: If statement +---*/ //CHECK#1 if (eval("if (false) ;") !== undefined) { $ERROR('#1: eval("if (false) ;") === undefined. Actual: ' + eval("if (false) ;")); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T5.js index 1cbae09f2f..ebe1f7a150 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T5.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T5.js - * @description Switch statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T5 +description: Switch statement +---*/ //CHECK#1 if (eval("switch(1){}") !== undefined) { $ERROR('#1: eval("switch(1){}") === undefined. Actual: ' + (eval("switch(1){}"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T6.js index 44843a8a53..120cdbf912 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T6.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T6.js - * @description do-while statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T6 +description: do-while statement +---*/ //CHECK#1 if (eval("do ; while(false)") !== undefined) { $ERROR('#1: eval("do ; while(false)") === undefined. Actual: ' + (eval("do ; while(false)"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T7.js index 22da19f08f..55b6c23c96 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T7.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T7.js - * @description do-while statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T7 +description: do-while statement +---*/ //CHECK#1 if (eval("while(false);") !== undefined) { $ERROR('#1: eval("while(false);") === undefined. Actual: ' + (eval("while(false);"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T8.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T8.js index 5f2acb2d79..d32fdff768 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T8.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T8.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is normal and its completion value is empty, - * then return the value undefined - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.2_T8.js - * @description for statement - */ +/*--- +info: > + If Result(3).type is normal and its completion value is empty, + then return the value undefined +es5id: 15.1.2.1_A3.2_T8 +description: for statement +---*/ //CHECK#1 if (eval("for(false;false;false);") !== undefined) { $ERROR('#1: eval("for(false;false;false);") === undefined. Actual: ' + (eval("for(false;false;false);"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T1.js index 04bf18be7f..c7e7ad7dd1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is not normal, then Result(3).type must be throw. - * Throw Result(3).value as an exception - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T1.js - * @description Continue statement - */ +/*--- +info: > + If Result(3).type is not normal, then Result(3).type must be throw. + Throw Result(3).value as an exception +es5id: 15.1.2.1_A3.3_T1 +description: Continue statement +---*/ //CHECK#1 try { @@ -31,5 +31,4 @@ try { if ((e instanceof SyntaxError) !== true) { $ERROR('#2.2: continue must throw SyntaxError. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T2.js index 1c1df21739..b58ee15cd1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is not normal, then Result(3).type must be throw. - * Throw Result(3).value as an exception - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T2.js - * @description Break statement - */ +/*--- +info: > + If Result(3).type is not normal, then Result(3).type must be throw. + Throw Result(3).value as an exception +es5id: 15.1.2.1_A3.3_T2 +description: Break statement +---*/ //CHECK#1 try { @@ -31,5 +31,4 @@ try { if ((e instanceof SyntaxError) !== true) { $ERROR('#2.2: break must throw SyntaxError. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T3.js index b8e7407237..82b06a6f07 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is not normal, then Result(3).type must be throw. - * Throw Result(3).value as an exception - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T3.js - * @description Return statement - */ +/*--- +info: > + If Result(3).type is not normal, then Result(3).type must be throw. + Throw Result(3).value as an exception +es5id: 15.1.2.1_A3.3_T3 +description: Return statement +---*/ //CHECK#1 try { @@ -30,5 +30,4 @@ try { if ((e instanceof SyntaxError) !== true) { $ERROR('#2.2: return must throw SyntaxError. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T4.js index 45037cfbb3..f91c90b0f9 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Result(3).type is not normal, then Result(3).type must be throw. - * Throw Result(3).value as an exception - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A3.3_T4.js - * @description Throw statement - */ +/*--- +info: > + If Result(3).type is not normal, then Result(3).type must be throw. + Throw Result(3).value as an exception +es5id: 15.1.2.1_A3.3_T4 +description: Throw statement +---*/ //CHECK#1 try { @@ -18,4 +18,3 @@ try { $ERROR('#1.2: throw 1 must throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.1.js index 17ae461296..a2c5c52f31 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of eval has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of eval has the attribute DontEnum +es5id: 15.1.2.1_A4.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (eval.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in eval){ if (result !== true) { $ERROR('#2: result = true; for (p in eval) { if (p === "length") result = false; }; result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.2.js index 3a79a7baa7..1ea8575466 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of eval has the attribute DontDelete - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of eval has the attribute DontDelete +es5id: 15.1.2.1_A4.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (eval.hasOwnProperty('length') !== true) { @@ -24,7 +24,3 @@ if (eval.hasOwnProperty('length') !== true) { if (eval.length === undefined) { $ERROR('#3: delete eval.length; eval.length !== undefined'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.3.js index 338a0982c2..1df06ecda9 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of eval has the attribute ReadOnly - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of eval has the attribute ReadOnly +es5id: 15.1.2.1_A4.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = eval.length; @@ -15,5 +14,3 @@ eval.length = Infinity; if (eval.length !== x) { $ERROR('#1: x = eval.length; eval.length = Infinity; eval.length === x. Actual: ' + (eval.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.4.js index bcae0bab0a..b7a690e454 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of eval is 1 - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.4.js - * @description eval.length === 1 - */ +/*--- +info: The length property of eval is 1 +es5id: 15.1.2.1_A4.4 +description: eval.length === 1 +---*/ //CHECK#1 if (eval.length !== 1) { $ERROR('#1: eval.length === 1. Actual: ' + (eval.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.5.js index b9fe428fc9..da88a7666a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The eval property has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The eval property has the attribute DontEnum +es5id: 15.1.2.1_A4.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('eval') !== false) { @@ -24,4 +23,3 @@ for (var p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "eval") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.6.js index 04e1ade0ac..c03b573d07 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The eval property has not prototype property - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.6.js - * @description Checking eval.prototype - */ +/*--- +info: The eval property has not prototype property +es5id: 15.1.2.1_A4.6 +description: Checking eval.prototype +---*/ //CHECK#1 if (eval.prototype !== undefined) { $ERROR('#1: eval.prototype === undefined. Actual: ' + (eval.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.7.js index 0a1fa011f0..130fe7c5d1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The eval property can't be used as constructor - * - * @path ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The eval property can't be used as constructor +es5id: 15.1.2.1_A4.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new eval() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/15.1.2.2-2-1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/15.1.2.2-2-1.js index cb072a69a6..c550d33816 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/15.1.2.2-2-1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/15.1.2.2-2-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.2/15.1.2.2/15.1.2.2-2-1.js - * @description pareseInt - 'S' is the empty string when inputString does not contain any such characters - */ - - -function testcase() { - return isNaN(parseInt("")) && parseInt("") !== parseInt(""); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.2.2-2-1 +description: > + pareseInt - 'S' is the empty string when inputString does not + contain any such characters +includes: [runTestCase.js] +---*/ + +function testcase() { + return isNaN(parseInt("")) && parseInt("") !== parseInt(""); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T1.js index 364172767c..d529674511 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T1.js - * @description Checking for boolean primitive - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T1 +description: Checking for boolean primitive +---*/ //CHECK#1 if (!(isNaN(parseInt(true)) && isNaN(parseInt("NaN")))) { @@ -17,4 +16,3 @@ if (!(isNaN(parseInt(true)) && isNaN(parseInt("NaN")))) { if (String(parseInt(false)) !== "NaN") { $ERROR('#2: String(parseInt(false)) === "NaN". Actual: ' + (String(parseInt(false)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T2.js index ff5199a07d..ae4b95b419 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T2.js - * @description Checking for number primitive - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T2 +description: Checking for number primitive +---*/ //CHECK#1 if (parseInt(-1) !== parseInt("-1")) { @@ -30,5 +29,4 @@ if (parseInt(-0) !== 0) { if (1 / parseInt(-0) !== Number.POSITIVE_INFINITY) { $ERROR('#4: parseInt(-0) === +0. Actual: ' + (parseInt(-0))); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T3.js index 8302d3919b..d3669e503d 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T3.js - * @description Checking for undefined and null - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T3 +description: Checking for undefined and null +---*/ //CHECK#1 if (!(isNaN(parseInt(undefined)) && isNaN(parseInt("NaN")))) { @@ -27,4 +26,3 @@ if (String(parseInt(undefined)) !== "NaN") { if (String(parseInt(null)) !== "NaN") { $ERROR('#4: String(parseInt(null)) === "NaN". Actual: ' + (String(parseInt(null)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T4.js index cb8513d087..0a54551ea0 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T4.js - * @description Checking for Boolean object - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T4 +description: Checking for Boolean object +---*/ //CHECK#1 if (!(isNaN(parseInt(new Boolean(true))) && isNaN(parseInt("NaN")))) { @@ -17,4 +16,3 @@ if (!(isNaN(parseInt(new Boolean(true))) && isNaN(parseInt("NaN")))) { if (String(parseInt(new Boolean(false))) !== "NaN") { $ERROR('#2: String(parseInt(new Boolean(false))) === "NaN". Actual: ' + (String(parseInt(new Boolean(false))))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T5.js index acf3ec1406..f88eb33dab 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T5.js - * @description Checking for Number object - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T5 +description: Checking for Number object +---*/ //CHECK#1 if (parseInt(new Number(-1)) !== parseInt("-1")) { @@ -22,4 +21,3 @@ if (String(parseInt(new Number(Infinity))) !== "NaN") { if (String(parseInt(new Number(NaN))) !== "NaN") { $ERROR('#3: String(parseInt(new Number(NaN))) === "NaN". Actual: ' + (String(parseInt(new Number(NaN))))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T6.js index 459b40fe41..ece2e17ac1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T6.js - * @description Checking for String object - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T6 +description: Checking for String object +---*/ //CHECK#1 if (parseInt(new String("-1")) !== parseInt("-1")) { @@ -27,4 +26,3 @@ if (String(parseInt(new String("NaN"))) !== "NaN") { if (String(parseInt(new String("false"))) !== "NaN") { $ERROR('#4: String(parseInt(new String("false"))) === "NaN". Actual: ' + (String(parseInt(new String("false"))))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T7.js index dee9254f2f..7b72549c0b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A1_T7.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.2_A1_T7 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseInt(object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T1.js index 94d69742cf..f7705d94bd 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T1.js - * @description StrWhiteSpaceChar :: TAB (U+0009) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T1 +description: "StrWhiteSpaceChar :: TAB (U+0009)" +---*/ //CHECK#1 if (parseInt("\u00091") !== parseInt("1")) { @@ -37,4 +36,3 @@ if (parseInt(" \u0009 \u0009-1") !== parseInt("-1")) { if (isNaN(parseInt("\u0009")) !== true) { $ERROR('#6: parseInt("\\u0009") === Not-a-Number. Actual: ' + (parseInt("\u0009"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T10.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T10.js index f674834439..cd678c1918 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T10.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T10.js - * @description StrWhiteSpaceChar :: USP - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T10 +description: "StrWhiteSpaceChar :: USP" +---*/ //CHECK# var count = 0; @@ -37,4 +36,3 @@ for (var index = 0; index < uspU.length; index++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T2.js index b7fcfe4dad..7e928a260f 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T2.js - * @description StrWhiteSpaceChar :: SP (U+0020) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T2 +description: "StrWhiteSpaceChar :: SP (U+0020)" +---*/ //CHECK#1 if (parseInt("\u00201") !== parseInt("1")) { @@ -37,4 +36,3 @@ if (parseInt(" \u0020 \u0020-1") !== parseInt("-1")) { if (isNaN(parseInt("\u0020")) !== true) { $ERROR('#6: parseInt("\\u0020") === Not-a-Number. Actual: ' + (parseInt("\u0020"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T3.js index 6cf28d093b..8101371445 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T3.js - * @description StrWhiteSpaceChar :: NBSB (U+00A0) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T3 +description: "StrWhiteSpaceChar :: NBSB (U+00A0)" +---*/ //CHECK#1 if (parseInt("\u00A01") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u00A0\u00A0-1") !== parseInt("-1")) { if (isNaN(parseInt("\u00A0")) !== true) { $ERROR('#3: parseInt("\\u00A0") === Not-a-Number. Actual: ' + (parseInt("\u00A0"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T4.js index af48d2f2dc..8f2503a876 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T4.js - * @description StrWhiteSpaceChar :: FF (U+000C) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T4 +description: "StrWhiteSpaceChar :: FF (U+000C)" +---*/ //CHECK#1 if (parseInt("\u000C1") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u000C\u000C-1") !== parseInt("-1")) { if (isNaN(parseInt("\u000C")) !== true) { $ERROR('#3: parseInt("\\u000C") === Not-a-Number. Actual: ' + (parseInt("\u000C"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T5.js index cf937d4692..3180d1d102 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T5.js - * @description StrWhiteSpaceChar :: VT (U+000B) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T5 +description: "StrWhiteSpaceChar :: VT (U+000B)" +---*/ //CHECK#1 if (parseInt("\u000B1") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u000B\u000B-1") !== parseInt("-1")) { if (isNaN(parseInt("\u000B")) !== true) { $ERROR('#3: parseInt("\\u000B") === Not-a-Number. Actual: ' + (parseInt("\u000B"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T6.js index 459fe4cbc3..1d21f55716 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T6.js - * @description StrWhiteSpaceChar :: CR (U+000D) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T6 +description: "StrWhiteSpaceChar :: CR (U+000D)" +---*/ //CHECK#1 if (parseInt("\u000D1") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u000D\u000D-1") !== parseInt("-1")) { if (isNaN(parseInt("\u000D")) !== true) { $ERROR('#3: parseInt("\\u000D") === Not-a-Number. Actual: ' + (parseInt("\u000D"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T7.js index fd49e2b860..c64781bc4b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T7.js - * @description StrWhiteSpaceChar :: LF (U+000A) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T7 +description: "StrWhiteSpaceChar :: LF (U+000A)" +---*/ //CHECK#1 if (parseInt("\u000A1") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u000A\u000A-1") !== parseInt("-1")) { if (isNaN(parseInt("\u000A")) !== true) { $ERROR('#3: parseInt("\\u000A") === Not-a-Number. Actual: ' + (parseInt("\u000A"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T8.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T8.js index 2ecc4d7b39..4510648431 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T8.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T8.js - * @description StrWhiteSpaceChar :: LS (U+2028) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T8 +description: "StrWhiteSpaceChar :: LS (U+2028)" +---*/ //CHECK#1 if (parseInt("\u20281") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u2028\u2028-1") !== parseInt("-1")) { if (isNaN(parseInt("\u2028")) !== true) { $ERROR('#3: parseInt("\\u2028") === Not-a-Number. Actual: ' + (parseInt("\u2028"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T9.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T9.js index c517c2e8b6..7a332f7d3a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T9.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T9.js - * @description StrWhiteSpaceChar :: PS (U+2029) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.2_A2_T9 +description: "StrWhiteSpaceChar :: PS (U+2029)" +---*/ //CHECK#1 if (parseInt("\u20291") !== parseInt("1")) { @@ -22,4 +21,3 @@ if (parseInt("\u2029\u2029-1") !== parseInt("-1")) { if (isNaN(parseInt("\u2029")) !== true) { $ERROR('#3: parseInt("\\u2029") === Not-a-Number. Actual: ' + (parseInt("\u2029"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T1.js index 91faff88de..be42ba08df 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T1.js - * @description Checking for boolean primitive - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T1 +description: Checking for boolean primitive +---*/ //CHECK#1 if (parseInt("11", false) !== parseInt("11", 10)) { @@ -17,4 +16,3 @@ if (parseInt("11", false) !== parseInt("11", 10)) { if (isNaN(parseInt("11", true)) !== true) { $ERROR('#2: parseInt("11", true) === Not-a-Number. Actual: ' + (parseInt("11", true))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T2.js index 3c3d3b1701..8707229d60 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T2.js - * @description Checking for string primitive - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T2 +description: Checking for string primitive +---*/ //CHECK#1 if (parseInt("11", "2") !== parseInt("11", 2)) { @@ -22,5 +21,3 @@ if (parseInt("11", "0") !== parseInt("11", 10)) { if (parseInt("11", "") !== parseInt("11", 10)) { $ERROR('#3: parseInt("11", "") === parseInt("11", 10). Actual: ' + (parseInt("11", ""))); } - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T3.js index ad0f45f11c..9c174478bb 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T3.js - * @description Checking for undefined and null - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T3 +description: Checking for undefined and null +---*/ //CHECK#1 if (parseInt("11", undefined) !== parseInt("11", 10)) { @@ -17,4 +16,3 @@ if (parseInt("11", undefined) !== parseInt("11", 10)) { if (parseInt("11", null) !== parseInt("11", 10)) { $ERROR('#2: parseInt("11", null) === parseInt("11", 10). Actual: ' + (parseInt("11", null))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T4.js index 32520b29df..3dd4d1151f 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T4.js - * @description Checking for Boolean object - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T4 +description: Checking for Boolean object +---*/ //CHECK#1 if (parseInt("11", new Boolean(false)) !== parseInt("11", false)) { @@ -17,4 +16,3 @@ if (parseInt("11", new Boolean(false)) !== parseInt("11", false)) { if (isNaN(parseInt("11", new Boolean(true))) !== true) { $ERROR('#2: parseInt("11", new Boolean(true)) === Not-a-Number. Actual: ' + (parseInt("11", new Boolean(true)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T5.js index cde9f4b122..69ba005475 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T5.js - * @description Checking for Number object - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T5 +description: Checking for Number object +---*/ //CHECK#1 if (parseInt("11", new Number(2)) !== parseInt("11", 2)) { @@ -17,4 +16,3 @@ if (parseInt("11", new Number(2)) !== parseInt("11", 2)) { if (parseInt("11", new Number(Infinity)) !== parseInt("11", Infinity)) { $ERROR('#2: parseInt("11", new Number(Infinity)) === parseInt("11", Infinity). Actual: ' + (parseInt("11", new Number(Infinity)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T6.js index e3d44183d4..4129b70c6b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T6.js - * @description Checking for String object - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T6 +description: Checking for String object +---*/ //CHECK#1 if (parseInt("11", new String("2")) !== parseInt("11", 2)) { @@ -17,4 +16,3 @@ if (parseInt("11", new String("2")) !== parseInt("11", 2)) { if (parseInt("11", new String("Infinity")) !== parseInt("11", Infinity)) { $ERROR('#2: parseInt("11", new String("Infinity")) === parseInt("11", Infinity). Actual: ' + (parseInt("11", new String("Infinity")))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T7.js index 76ab6e050f..94462c63c2 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToNumber - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.1_T7.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: Operator use ToNumber +es5id: 15.1.2.2_A3.1_T7 +description: If Type(value) is Object, evaluate ToPrimitive(value, Number) +---*/ //CHECK#1 var object = {valueOf: function() {return 2}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseInt("11", object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T1.js index 07b4b17e6c..2487c4ed9b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInt32 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T1.js - * @description If radix is NaN, +0, -0, +Infinity, -Infinity, return radix = +0 - */ +/*--- +info: Operator use ToInt32 +es5id: 15.1.2.2_A3.2_T1 +description: If radix is NaN, +0, -0, +Infinity, -Infinity, return radix = +0 +---*/ //CHECK#1 if (parseInt("11", NaN) !== parseInt("11", 10)) { @@ -32,4 +31,3 @@ if (parseInt("11", Number.POSITIVE_INFINITY) !== parseInt("11", 10)) { if (parseInt("11", Number.NEGATIVE_INFINITY) !== parseInt("11", 10)) { $ERROR('#5: parseInt("11", Number.NEGATIVE_INFINITY) === parseInt("11", 10). Actual: ' + (parseInt("11", Number.NEGATIVE_INFINITY))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T2.js index 9611147b20..58b872c042 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInt32 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T2.js - * @description ToInt32 use floor - */ +/*--- +info: Operator use ToInt32 +es5id: 15.1.2.2_A3.2_T2 +description: ToInt32 use floor +---*/ //CHECK#1 if (parseInt("11", 2.1) !== parseInt("11", 2)) { @@ -32,4 +31,3 @@ if (parseInt("11", 2.000000000001) !== parseInt("11", 2)) { if (parseInt("11", 2.999999999999) !== parseInt("11", 2)) { $ERROR('#5: parseInt("11", 2.999999999999) === parseInt("11", 2). Actual: ' + (parseInt("11", 2.999999999999))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T3.js index d06fc795f5..61118e5f79 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInt32 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A3.2_T3.js - * @description ToInt32 use modulo - */ +/*--- +info: Operator use ToInt32 +es5id: 15.1.2.2_A3.2_T3 +description: ToInt32 use modulo +---*/ //CHECK#1 if (parseInt("11", 4294967298) !== parseInt("11", 2)) { @@ -27,4 +26,3 @@ if (isNaN(parseInt("11", -2147483650)) !== true) { if (parseInt("11", -4294967294) !== parseInt("11", 2)) { $ERROR('#4: parseInt("11", -4294967294) === parseInt("11", 2). Actual: ' + (parseInt("11", -4294967294))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T1.js index 859c1c178d..9a59abe362 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If R = 0 or R = undefined, then R = 10 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T1.js - * @description R = 0 - */ +/*--- +info: If R = 0 or R = undefined, then R = 10 +es5id: 15.1.2.2_A4.1_T1 +description: R = 0 +---*/ //CHECK#0 if (parseInt("0", 0) !== parseInt("0", 10)) { @@ -71,5 +70,4 @@ if (parseInt("11", 0) !== parseInt("11", 10)) { //CHECK#12 if (parseInt("9999", 0) !== parseInt("9999", 10)) { $ERROR('#12: parseInt("9999", 0) === parseInt("9999", 10). Actual: ' + (parseInt("9999", 0))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T2.js index d7e82dcbc5..8a51daefa3 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If R = 0 or R = undefined, then R = 10 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.1_T2.js - * @description R = undefined - */ +/*--- +info: If R = 0 or R = undefined, then R = 10 +es5id: 15.1.2.2_A4.1_T2 +description: R = undefined +---*/ //CHECK#0 if (parseInt("0") !== parseInt("0", 10)) { @@ -71,5 +70,4 @@ if (parseInt("11") !== parseInt("11", 10)) { //CHECK#12 if (parseInt("9999") !== parseInt("9999", 10)) { $ERROR('#12: parseInt("9999") === parseInt("9999", 10). Actual: ' + (parseInt("9999"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T1.js index c7b353e5b6..eabf0ada79 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If R < 2 or R > 36, then return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T1.js - * @description R = 1 - */ +/*--- +info: If R < 2 or R > 36, then return NaN +es5id: 15.1.2.2_A4.2_T1 +description: R = 1 +---*/ //CHECK#0 if (isNaN(parseInt("0", 1)) !== true) { @@ -66,5 +65,4 @@ if (isNaN(parseInt("10", 1)) !== true) { //CHECK#11 if (isNaN(parseInt("11", 1)) !== true) { $ERROR('#11: parseInt("11", 1) === Not-a-Number. Actual: ' + (parseInt("11", 1))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T2.js index 55621e4b05..2456c39d9d 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If R < 2 or R > 36, then return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T2.js - * @description R = 37 - */ +/*--- +info: If R < 2 or R > 36, then return NaN +es5id: 15.1.2.2_A4.2_T2 +description: R = 37 +---*/ //CHECK#0 if (isNaN(parseInt("0", 37)) !== true) { @@ -66,5 +65,4 @@ if (isNaN(parseInt("10", 37)) !== true) { //CHECK#11 if (isNaN(parseInt("11", 37)) !== true) { $ERROR('#11: parseInt("11", 37) === Not-a-Number. Actual: ' + (parseInt("11", 37))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T3.js index 16d5544477..6982a69059 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If R < 2 or R > 36, then return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A4.2_T3.js - * @description Complex test - */ +/*--- +info: If R < 2 or R > 36, then return NaN +es5id: 15.1.2.2_A4.2_T3 +description: Complex test +---*/ //CHECK# var pow = 2; @@ -21,5 +20,4 @@ for (var i = 1; i < 32; i++) { } } pow = pow * 2; -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.1_T1.js index 541fdd355e..5aa8852cf3 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.1_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * parseInt is no longer allowed to treat a leading zero as indicating - * octal. "If radix is undefined or 0, it is assumed to be 10 except - * when the number begins with the character pairs 0x or 0X, in which - * case a radix of 16 is assumed." - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.1_T1.js - * @description Check if parseInt still accepts octal - */ +/*--- +info: > + parseInt is no longer allowed to treat a leading zero as indicating + octal. "If radix is undefined or 0, it is assumed to be 10 except + when the number begins with the character pairs 0x or 0X, in which + case a radix of 16 is assumed." +es5id: 15.1.2.2_A5.1_T1 +description: Check if parseInt still accepts octal +---*/ if (parseInt('010') !== 10) { $ERROR("parseInt should no longer accept octal"); diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T1.js index 7d6576d711..db97f55973 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the length of S is at least 2 and the first two characters of S - * are either 0x or 0X, then remove the first two characters from S and let R = 16 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T1.js - * @description : 0x - */ +/*--- +info: > + If the length of S is at least 2 and the first two characters of S + are either 0x or 0X, then remove the first two characters from S and let R = 16 +es5id: 15.1.2.2_A5.2_T1 +description: ": 0x" +---*/ //CHECK#0 if (parseInt("0x0", 0) !== parseInt("0", 16)) { @@ -97,5 +97,4 @@ if (parseInt("0xE", 0) !== parseInt("E", 16)) { //CHECK#ABCDEF if (parseInt("0xABCDEF", 0) !== parseInt("ABCDEF", 16)) { $ERROR('#ABCDEF: parseInt("0xABCDEF", 0) === parseInt("ABCDEF", 16). Actual: ' + (parseInt("0xABCDEF", 0))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T2.js index 9170b77962..145a3097cc 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the length of S is at least 2 and the first two characters of S - * are either 0x or 0X, then remove the first two characters from S and let R = 16 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A5.2_T2.js - * @description : 0X - */ +/*--- +info: > + If the length of S is at least 2 and the first two characters of S + are either 0x or 0X, then remove the first two characters from S and let R = 16 +es5id: 15.1.2.2_A5.2_T2 +description: ": 0X" +---*/ //CHECK#0 if (parseInt("0X0", 0) !== parseInt("0", 16)) { @@ -97,5 +97,4 @@ if (parseInt("0XE") !== parseInt("E", 16)) { //CHECK#ABCDEF if (parseInt("0XABCDEF") !== parseInt("ABCDEF", 16)) { $ERROR('#ABCDEF: parseInt("0XABCDEF") === parseInt("ABCDEF", 16). Actual: ' + (parseInt("0XABCDEF"))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T1.js index 2c2e96a5a4..7cc394b07b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T1.js @@ -1,19 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If S contains any character that is not a radix-R digit, - * then let Z be the substring of S consisting of all characters before - * the first such character; otherwise, let Z be S - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T1.js - * @description Complex test. R in [2, 36] - */ +/*--- +info: > + If S contains any character that is not a radix-R digit, + then let Z be the substring of S consisting of all characters before + the first such character; otherwise, let Z be S +es5id: 15.1.2.2_A6.1_T1 +description: Complex test. R in [2, 36] +---*/ //CHECK# for (var i = 2; i <= 36; i++) { if (parseInt("10$1", i) !== i) { $ERROR('#' + i +': i = ' + i + 'parseInt("10$1", i) === i. Actual: ' + (parseInt("10$1", i))); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T2.js index 0fcdb68370..9ddd980a21 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If S contains any character that is not a radix-R digit, - * then let Z be the substring of S consisting of all characters before - * the first such character; otherwise, let Z be S - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T2.js - * @description Complex test. Radix-R notation in [0..9, A-Z] - */ +/*--- +info: > + If S contains any character that is not a radix-R digit, + then let Z be the substring of S consisting of all characters before + the first such character; otherwise, let Z be S +es5id: 15.1.2.2_A6.1_T2 +description: Complex test. Radix-R notation in [0..9, A-Z] +---*/ //CHECK# var R_digit = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; @@ -16,5 +16,4 @@ for (var i = 2; i <= 36; i++) { if (parseInt(R_digit[i - 2] + "$", i) !== i - 1) { $ERROR('#' + i + ': '); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T3.js index d559d06757..6acd1901ee 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If S contains any character that is not a radix-R digit, - * then let Z be the substring of S consisting of all characters before - * the first such character; otherwise, let Z be S - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T3.js - * @description Complex test. Radix-R notation in [0..9, a-z] - */ +/*--- +info: > + If S contains any character that is not a radix-R digit, + then let Z be the substring of S consisting of all characters before + the first such character; otherwise, let Z be S +es5id: 15.1.2.2_A6.1_T3 +description: Complex test. Radix-R notation in [0..9, a-z] +---*/ //CHECK# var R_digit = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; @@ -16,5 +16,4 @@ for (var i = 2; i <= 36; i++) { if (parseInt(R_digit[i - 2] + "$", i) !== i - 1) { $ERROR('#' + i + ': '); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T4.js index 3b4dc78fa6..01fe772632 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If S contains any character that is not a radix-R digit, - * then let Z be the substring of S consisting of all characters before - * the first such character; otherwise, let Z be S - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T4.js - * @description Complex test. Radix-R notation in [0..9, A-Z] - */ +/*--- +info: > + If S contains any character that is not a radix-R digit, + then let Z be the substring of S consisting of all characters before + the first such character; otherwise, let Z be S +es5id: 15.1.2.2_A6.1_T4 +description: Complex test. Radix-R notation in [0..9, A-Z] +---*/ //CHECK# var R_digit = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; @@ -16,5 +16,4 @@ for (var i = 2; i <= 35; i++) { if (parseInt(R_digit[i - 2] + R_digit[i - 1], i) !== i - 1) { $ERROR('#' + i + ': '); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T5.js index 86f1fa4c7e..63971b57e3 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If S contains any character that is not a radix-R digit, - * then let Z be the substring of S consisting of all characters before - * the first such character; otherwise, let Z be S - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T5.js - * @description Complex test. Radix-R notation in [0..9, a-z] - */ +/*--- +info: > + If S contains any character that is not a radix-R digit, + then let Z be the substring of S consisting of all characters before + the first such character; otherwise, let Z be S +es5id: 15.1.2.2_A6.1_T5 +description: Complex test. Radix-R notation in [0..9, a-z] +---*/ //CHECK# var R_digit = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; @@ -16,5 +16,4 @@ for (var i = 2; i <= 35; i++) { if (parseInt(R_digit[i - 2] + R_digit[i - 1], i) !== i - 1) { $ERROR('#' + i + ': '); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T6.js index 228408b3b1..a5133bb482 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If S contains any character that is not a radix-R digit, - * then let Z be the substring of S consisting of all characters before - * the first such character; otherwise, let Z be S - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A6.1_T6.js - * @description Complex test. Radix-R notation in [0..9] - */ +/*--- +info: > + If S contains any character that is not a radix-R digit, + then let Z be the substring of S consisting of all characters before + the first such character; otherwise, let Z be S +es5id: 15.1.2.2_A6.1_T6 +description: Complex test. Radix-R notation in [0..9] +---*/ //CHECK#2 if (parseInt("0123456789", 2) !== 1) { @@ -53,5 +53,4 @@ if (parseInt("01234567890", 9) !== 6053444) { //CHECK#10 if (parseInt("01234567890", 10) !== Number(1234567890)) { $ERROR('#10: parseInt("01234567890", 10) === Number(1234567890). Actual: ' + (parseInt("01234567890", 10))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T1.js index f01d60582c..d14000321a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Z is empty, return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T1.js - * @description Complex test. R in [2, 36] - */ +/*--- +info: If Z is empty, return NaN +es5id: 15.1.2.2_A7.1_T1 +description: Complex test. R in [2, 36] +---*/ //CHECK# for (var i = 2; i <= 36; i++) { if (isNaN(parseInt("$string", i)) !== true) { $ERROR('#' + i + ': parseInt("$string", i) === Not-a-Number. Actual: ' + (parseInt("$string", i))); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T2.js index 459097ce47..fa89df158e 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If Z is empty, return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.1_T2.js - * @description x is not a radix-R digit - */ +/*--- +info: If Z is empty, return NaN +es5id: 15.1.2.2_A7.1_T2 +description: x is not a radix-R digit +---*/ //CHECK#1 if (isNaN(parseInt("$0x")) !== true) { @@ -31,5 +30,4 @@ if (isNaN(parseInt("")) !== true) { //CHECK#5 if (isNaN(parseInt(" ")) !== true) { $ERROR('#5: parseInt(" ") === Not-a-Number. Actual: ' + (parseInt(" "))); -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T1.js index 449f85a006..682049ffdd 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the mathematical integer value - * that is represented by Z in radix-R notation, using the - * letters A-Z and a-z for digits with values 10 through 35. - * Compute the number value for Result(16) - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T1.js - * @description Complex test. Check algorithm - */ +/*--- +info: > + Compute the mathematical integer value + that is represented by Z in radix-R notation, using the + letters A-Z and a-z for digits with values 10 through 35. + Compute the number value for Result(16) +es5id: 15.1.2.2_A7.2_T1 +description: Complex test. Check algorithm +---*/ //CHECK# var R_digit1 = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; @@ -33,5 +33,4 @@ for (var i = 2; i <= 36; i++) { $ERROR('#' + i + '.' + j + ' : '); } } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T2.js index b11d442931..3a71d53cc1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the mathematical integer value - * that is represented by Z in radix-R notation, using the - * letters A-Z and a-z for digits with values 10 through 35. - * Compute the number value for Result(16) - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T2.js - * @description Checking algorithm for R = 2 - */ +/*--- +info: > + Compute the mathematical integer value + that is represented by Z in radix-R notation, using the + letters A-Z and a-z for digits with values 10 through 35. + Compute the number value for Result(16) +es5id: 15.1.2.2_A7.2_T2 +description: Checking algorithm for R = 2 +---*/ //CHECK#1 if (parseInt("1", 2) !== 1) { @@ -110,4 +110,3 @@ if (parseInt("1111111111111111111", 2) !== 524287) { if (parseInt("11111111111111111111", 2) !== 1048575) { $ERROR('#20: parseInt("11111111111111111111", 2) === 1048575. Actual: ' + (parseInt("11111111111111111111", 2))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T3.js index 77529e11f4..90421e6802 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T3.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the mathematical integer value - * that is represented by Z in radix-R notation, using the - * letters A-Z and a-z for digits with values 10 through 35. - * Compute the number value for Result(16) - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.2_T3.js - * @description Checking algorithm for R = 16 - */ +/*--- +info: > + Compute the mathematical integer value + that is represented by Z in radix-R notation, using the + letters A-Z and a-z for digits with values 10 through 35. + Compute the number value for Result(16) +es5id: 15.1.2.2_A7.2_T3 +description: Checking algorithm for R = 16 +---*/ //CHECK#1 if (parseInt("0x1", 16) !== 1) { @@ -110,4 +110,3 @@ if (parseInt("0x1000000000000000000", 16) !== 4722366482869645213696) { if (parseInt("0x10000000000000000000", 16) !== 75557863725914323419136) { $ERROR('#20: parseInt("0x10000000000000000000", 16) === 75557863725914323419136. Actual: ' + (parseInt("0x10000000000000000000", 16))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T1.js index c9b796095f..e2c5cb4310 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return sign * Result(17) - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T1.js - * @description Complex test. Check algorithm - */ +/*--- +info: Return sign * Result(17) +es5id: 15.1.2.2_A7.3_T1 +description: Complex test. Check algorithm +---*/ //CHECK# var R_digit1 = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; @@ -35,5 +34,4 @@ for (var i = 2; i <= 36; i++) { $ERROR('#' + i + '.' + j + ' : '); } } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T2.js index de2b297e8f..18e0fc0cc8 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return sign * Result(17) - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T2.js - * @description Checking algorithm for R = 2 - */ +/*--- +info: Return sign * Result(17) +es5id: 15.1.2.2_A7.3_T2 +description: Checking algorithm for R = 2 +---*/ //CHECK#1 if (parseInt("-1", 2) !== -1) { @@ -107,4 +106,3 @@ if (parseInt("-1111111111111111111", 2) !== -524287) { if (parseInt("-11111111111111111111", 2) !== -1048575) { $ERROR('#20: parseInt("-11111111111111111111", 2) === -1048575. Actual: ' + (parseInt("-11111111111111111111", 2))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T3.js index aa4ee7ac30..8d58f859c4 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return sign * Result(17) - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A7.3_T3.js - * @description Checking algorithm for R = 10 - */ +/*--- +info: Return sign * Result(17) +es5id: 15.1.2.2_A7.3_T3 +description: Checking algorithm for R = 10 +---*/ //CHECK#1 if (parseInt("-1", 10) !== -1) { @@ -107,4 +106,3 @@ if (parseInt("-1000000000000000000", 10) !== -1000000000000000000) { if (parseInt("-10000000000000000000", 10) !== -10000000000000000000) { $ERROR('#20: parseInt("-10000000000000000000", 10) === -10000000000000000000. Actual: ' + (parseInt("-10000000000000000000", 10))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A8.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A8.js index 4176800b28..5aabbdedd8 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A8.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A8.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * parseInt may interpret only a leading portion of the string as - * a number value; it ignores any characters that cannot be interpreted as part - * of the notation of an decimal literal, and no indication is given that any such - * characters were ignored. - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A8.js - * @description Complex test without eval - */ +/*--- +info: > + parseInt may interpret only a leading portion of the string as + a number value; it ignores any characters that cannot be interpreted as part + of the notation of an decimal literal, and no indication is given that any such + characters were ignored. +es5id: 15.1.2.2_A8 +description: Complex test without eval +---*/ //CHECK var errorCount = 0; @@ -80,4 +80,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.1.js index 6b8d9fde08..a27d005178 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseInt has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of parseInt has the attribute DontEnum +es5id: 15.1.2.2_A9.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (parseInt.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (var p in parseInt){ if (result !== true) { $ERROR('#2: result = true; for (p in parseInt) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.2.js index 978e920b5c..f37f028ced 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseInt has the attribute DontDelete - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of parseInt has the attribute DontDelete +es5id: 15.1.2.2_A9.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (parseInt.hasOwnProperty('length') !== true) { @@ -25,4 +25,3 @@ if (parseInt.hasOwnProperty('length') !== true) { if (parseInt.length === undefined) { $ERROR('#3: delete parseInt.length; parseInt.length !== undefined'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.3.js index dc0a2c5221..e0bfc8072b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseInt has the attribute ReadOnly - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of parseInt has the attribute ReadOnly +es5id: 15.1.2.2_A9.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 x = parseInt.length; @@ -15,5 +14,3 @@ parseInt.length = Infinity; if (parseInt.length !== x) { $ERROR('#1: x = parseInt.length; parseInt.length = Infinity; parseInt.length === x. Actual: ' + (parseInt.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.4.js index f92a64bdb5..32e39a64cb 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseInt is 2 - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.4.js - * @description parseInt.length === 2 - */ +/*--- +info: The length property of parseInt is 2 +es5id: 15.1.2.2_A9.4 +description: parseInt.length === 2 +---*/ //CHECK#1 if (parseInt.length !== 2) { $ERROR('#1: parseInt.length === 2. Actual: ' + (parseInt.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.5.js index 18e6653a23..446d84d08c 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The parseInt property has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The parseInt property has the attribute DontEnum +es5id: 15.1.2.2_A9.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('parseInt') !== false) { @@ -24,4 +23,3 @@ for (var p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "parseInt") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.6.js index 8fa118ec4c..7b381e4758 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The parseInt property has not prototype property - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.6.js - * @description Checking parseInt.prototype - */ +/*--- +info: The parseInt property has not prototype property +es5id: 15.1.2.2_A9.6 +description: Checking parseInt.prototype +---*/ //CHECK#1 if (parseInt.prototype !== undefined) { $ERROR('#1: parseInt.prototype === undefined. Actual: ' + (parseInt.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.7.js index 992aa4e125..752f82ec7a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The parseInt property can't be used as constructor - * - * @path ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The parseInt property can't be used as constructor +es5id: 15.1.2.2_A9.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new parseInt() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/15.1.2.3-2-1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/15.1.2.3-2-1.js index 874d5c30fa..8d528b3048 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/15.1.2.3-2-1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/15.1.2.3-2-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.1/15.1.2/15.1.2.3/15.1.2.3-2-1.js - * @description pareseFloat - 'trimmedString' is the empty string when inputString does not contain any such characters - */ - - -function testcase() { - return isNaN(parseFloat("")) && parseFloat("") !== parseFloat(""); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.1.2.3-2-1 +description: > + pareseFloat - 'trimmedString' is the empty string when inputString + does not contain any such characters +includes: [runTestCase.js] +---*/ + +function testcase() { + return isNaN(parseFloat("")) && parseFloat("") !== parseFloat(""); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T1.js index fa0b4ae608..fc7ac7102e 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T1.js - * @description Checking for boolean primitive - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T1 +description: Checking for boolean primitive +---*/ //CHECK#1 if (!(isNaN(parseFloat(true)) && isNaN(parseFloat("NaN")))) { @@ -17,4 +16,3 @@ if (!(isNaN(parseFloat(true)) && isNaN(parseFloat("NaN")))) { if (String(parseFloat(false)) !== "NaN") { $ERROR('#2: String(parseFloat(false)) === "NaN". Actual: ' + (String(parseFloat(false)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T2.js index 02c7b2c9e9..007bff3896 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T2.js - * @description Checking for number primitive - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T2 +description: Checking for number primitive +---*/ //CHECK#1 if (parseFloat(-1.1) !== parseFloat("-1.1")) { @@ -35,5 +34,4 @@ if (parseFloat(-0) !== 0) { if (1 / parseFloat(-0) !== Number.POSITIVE_INFINITY) { $ERROR('#5: parseFloat(-0) === +0. Actual: ' + (parseFloat(-0))); } -} - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T3.js index ddbe261096..1a74bd1a91 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T3.js - * @description Checking for undefined and null - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T3 +description: Checking for undefined and null +---*/ //CHECK#1 if (!(isNaN(parseFloat(undefined)) && isNaN(parseFloat("NaN")))) { @@ -28,4 +27,3 @@ if (String(parseFloat(undefined)) !== "NaN") { if (String(parseFloat(null)) !== "NaN") { $ERROR('#4: String(parseFloat(null)) === "NaN". Actual: ' + (String(parseFloat(null)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T4.js index cf769c03e7..c06b07070a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T4.js - * @description Checking for Boolean object - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T4 +description: Checking for Boolean object +---*/ //CHECK#1 if (!(isNaN(parseFloat(new Boolean(true))) && isNaN(parseFloat("NaN")))) { @@ -17,4 +16,3 @@ if (!(isNaN(parseFloat(new Boolean(true))) && isNaN(parseFloat("NaN")))) { if (String(parseFloat(new Boolean(false))) !== "NaN") { $ERROR('#2: String(parseFloat(new Boolean(false))) === "NaN". Actual: ' + (String(parseFloat(new Boolean(false))))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T5.js index 36259b4fba..81b1237d57 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T5.js - * @description Checking for Number object - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T5 +description: Checking for Number object +---*/ //CHECK#1 if (parseFloat(new Number(-1.1)) !== parseFloat("-1.1")) { @@ -27,4 +26,3 @@ if (String(parseFloat(new Number(NaN))) !== "NaN") { if (parseFloat(new Number(.01e+2)) !== parseFloat(".01e+2")) { $ERROR('#4: parseFloat(new Number(.01e+2)) === parseFloat(".01e+2"). Actual: ' + (parseFloat(new Number(.01e+2)))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T6.js index f54bc62f12..fd948942bf 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T6.js - * @description Checking for String object - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T6 +description: Checking for String object +---*/ //CHECK#1 if (parseFloat(new String("-1.1")) !== parseFloat("-1.1")) { @@ -32,4 +31,3 @@ if (parseFloat(new String(".01e+2")) !== parseFloat(".01e+2")) { if (String(parseFloat(new String("false"))) !== "NaN") { $ERROR('#5: String(parseFloat(new String("false"))) === "NaN". Actual: ' + (String(parseFloat(new String("false"))))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T7.js index 8b383ea538..9cee05939f 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A1_T7.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator use ToString +es5id: 15.1.2.3_A1_T7 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return 1}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T1.js index fa5a600a9b..ef0038ba89 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T1.js - * @description StrWhiteSpaceChar :: TAB (U+0009) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T1 +description: "StrWhiteSpaceChar :: TAB (U+0009)" +---*/ //CHECK#1 if (parseFloat("\u00091.1") !== parseFloat("1.1")) { @@ -37,4 +36,3 @@ if (parseFloat(" \u0009 \u0009-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u0009")) !== true) { $ERROR('#6: parseFloat("\\u0009") === Not-a-Number. Actual: ' + (parseFloat("\u0009"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T10.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T10.js index 2cdb2a7547..5ffac8f0b1 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T10.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T10.js - * @description StrWhiteSpaceChar :: USP - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T10 +description: "StrWhiteSpaceChar :: USP" +---*/ //CHECK# var count = 0; @@ -36,4 +35,3 @@ for (var index = 0; index < uspU.length; index++) { if (errorCount > 0) { $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T2.js index 711bb6e79f..2d39f4b532 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T2.js - * @description StrWhiteSpaceChar :: SP (U+0020) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T2 +description: "StrWhiteSpaceChar :: SP (U+0020)" +---*/ //CHECK#1 if (parseFloat("\u00201.1") !== parseFloat("1.1")) { @@ -37,4 +36,3 @@ if (parseFloat(" \u0020 \u0020-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u0020")) !== true) { $ERROR('#6: parseFloat("\\u0020") === Not-a-Number. Actual: ' + (parseFloat("\u0020"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T3.js index 5d5e41f927..4c325f6ac0 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T3.js - * @description StrWhiteSpaceChar :: NBSB (U+00A0) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T3 +description: "StrWhiteSpaceChar :: NBSB (U+00A0)" +---*/ //CHECK#1 if (parseFloat("\u00A01.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u00A0\u00A0-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u00A0")) !== true) { $ERROR('#3: parseFloat("\\u00A0") === Not-a-Number. Actual: ' + (parseFloat("\u00A0"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T4.js index 1bf82ac840..2e926fa06d 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T4.js - * @description StrWhiteSpaceChar :: FF (U+000C) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T4 +description: "StrWhiteSpaceChar :: FF (U+000C)" +---*/ //CHECK#1 if (parseFloat("\u000C1.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u000C\u000C-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u000C")) !== true) { $ERROR('#3: parseFloat("\\u000C") === Not-a-Number. Actual: ' + (parseFloat("\u000C"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T5.js index ad1bf78780..5ee72d6eec 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T5.js - * @description StrWhiteSpaceChar :: VT (U+000B) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T5 +description: "StrWhiteSpaceChar :: VT (U+000B)" +---*/ //CHECK#1 if (parseFloat("\u000B1.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u000B\u000B-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u000B")) !== true) { $ERROR('#3: parseFloat("\\u000B") === Not-a-Number. Actual: ' + (parseFloat("\u000B"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T6.js index 6d2905d899..269a7d3489 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T6.js - * @description StrWhiteSpaceChar :: CR (U+000D) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T6 +description: "StrWhiteSpaceChar :: CR (U+000D)" +---*/ //CHECK#1 if (parseFloat("\u000D1.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u000D\u000D-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u000D")) !== true) { $ERROR('#3: parseFloat("\\u000D") === Not-a-Number. Actual: ' + (parseFloat("\u000D"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T7.js index d114913eb4..7646fbfbfe 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T7.js - * @description StrWhiteSpaceChar :: LF (U+000A) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T7 +description: "StrWhiteSpaceChar :: LF (U+000A)" +---*/ //CHECK#1 if (parseFloat("\u000A1.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u000A\u000A-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u000A")) !== true) { $ERROR('#3: parseFloat("\\u000A") === Not-a-Number. Actual: ' + (parseFloat("\u000A"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T8.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T8.js index f7f2576fe1..ebc7198d56 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T8.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T8.js - * @description StrWhiteSpaceChar :: LS (U+2028) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T8 +description: "StrWhiteSpaceChar :: LS (U+2028)" +---*/ //CHECK#1 if (parseFloat("\u20281.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u2028\u2028-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u2028")) !== true) { $ERROR('#3: parseFloat("\\u2028") === Not-a-Number. Actual: ' + (parseFloat("\u2028"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T9.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T9.js index 0c02520699..9973b3f16b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T9.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator remove leading StrWhiteSpaceChar - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T9.js - * @description StrWhiteSpaceChar :: PS (U+2029) - */ +/*--- +info: Operator remove leading StrWhiteSpaceChar +es5id: 15.1.2.3_A2_T9 +description: "StrWhiteSpaceChar :: PS (U+2029)" +---*/ //CHECK#1 if (parseFloat("\u20291.1") !== parseFloat("1.1")) { @@ -22,4 +21,3 @@ if (parseFloat("\u2029\u2029-1.1") !== parseFloat("-1.1")) { if (isNaN(parseFloat("\u2029")) !== true) { $ERROR('#3: parseFloat("\\u2029") === Not-a-Number. Actual: ' + (parseFloat("\u2029"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T1.js index 6d131659aa..594af67c5d 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a - * StrDecimalLiteral (see 9.3.1), return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T1.js - * @description parseFloat("some string") return NaN - */ +/*--- +info: > + If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a + StrDecimalLiteral (see 9.3.1), return NaN +es5id: 15.1.2.3_A3_T1 +description: parseFloat("some string") return NaN +---*/ //CHECK#1 if (isNaN(parseFloat("str")) !== true) { @@ -43,4 +43,3 @@ if (String(parseFloat("")) !== "NaN") { if (String(parseFloat("+")) !== "NaN") { $ERROR('#7: String(parseFloat("+")) === "NaN". Actual: ' + (String(parseFloat("+")))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T2.js index 8e550a0a71..4115548d18 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a - * StrDecimalLiteral (see 9.3.1), return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T2.js - * @description parseFloat("wrong number format with ExponentIndicator") return NaN - */ +/*--- +info: > + If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a + StrDecimalLiteral (see 9.3.1), return NaN +es5id: 15.1.2.3_A3_T2 +description: parseFloat("wrong number format with ExponentIndicator") return NaN +---*/ //CHECK#1 if (isNaN(parseFloat("e1")) !== true) { @@ -58,4 +58,3 @@ if (isNaN(parseFloat("-.e-1")) !== true) { if (isNaN(parseFloat(".e1")) !== true) { $ERROR('#10: parseFloat(".e1") === Not-a-Number. Actual: ' + (parseFloat(".e1"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T3.js index 51c7869f1c..667c5a8d63 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a - * StrDecimalLiteral (see 9.3.1), return NaN - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A3_T3.js - * @description parseFloat("wrong numbr format") return NaN - */ +/*--- +info: > + If neither Result(2) nor any prefix of Result(2) satisfies the syntax of a + StrDecimalLiteral (see 9.3.1), return NaN +es5id: 15.1.2.3_A3_T3 +description: parseFloat("wrong numbr format") return NaN +---*/ //CHECK#1 if (isNaN(parseFloat(".x")) !== true) { @@ -48,4 +48,3 @@ if (String(parseFloat("infinity")) !== "NaN") { if (String(parseFloat("A")) !== "NaN") { $ERROR('#8: String(parseFloat("A")) === "NaN". Actual: ' + (String(parseFloat("A")))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T1.js index ea696cec4c..b3cebf5177 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T1.js - * @description Some wrong number - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T1 +description: Some wrong number +---*/ //CHECK#1 if (parseFloat("0x") !== 0) { @@ -53,4 +53,3 @@ if (parseFloat("0.1.1") !== 0.1) { if (parseFloat("0. 1") !== 0) { $ERROR('#9: parseFloat("0. 1") === 0. Actual: ' + (parseFloat("0. 1"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T2.js index 40c18ff86d..d2d58bd959 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T2.js - * @description With ExponentIndicator - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T2 +description: With ExponentIndicator +---*/ //CHECK#1 if (parseFloat("1ex") !== 1) { @@ -33,4 +33,3 @@ if (parseFloat("1e-1x") !== 0.1) { if (parseFloat("0.1e-1x") !== 0.01) { $ERROR('#5: parseFloat("0.1e-1x") === 0.01. Actual: ' + (parseFloat("0.1e-1x"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T3.js index 76da0e47df..926479875d 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T3.js - * @description StrDecimalLiteral not contain HexIntegerLiteral - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T3 +description: StrDecimalLiteral not contain HexIntegerLiteral +---*/ //CHECK#0 if (parseFloat("0x0") !== 0) { @@ -88,4 +88,3 @@ if (parseFloat("0xE") !== 0) { if (parseFloat("0xF") !== 0) { $ERROR('#F: parseFloat("0xF") === 0. Actual: ' + (parseFloat("0xF"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T4.js index 4fef9fc077..d79122458a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T4.js - * @description "Infinity"+"some string" - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T4 +description: "\"Infinity\"+\"some string\"" +---*/ //CHECK#1 if (parseFloat("Infinity1") !== Number.POSITIVE_INFINITY) { @@ -23,4 +23,3 @@ if (parseFloat("Infinityx") !== Number.POSITIVE_INFINITY) { if (parseFloat("Infinity+1") !== Number.POSITIVE_INFINITY) { $ERROR('#3: parseFloat("Infinity+1") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat("Infinity+1"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T5.js index ecbddb4491..8a73c954eb 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T5.js - * @description Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T5 +description: Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt +---*/ //CHECK#1 if (parseFloat("-11.string") !== -11) { @@ -58,4 +58,3 @@ if (parseFloat("001.string") !== 1) { if (parseFloat("010.string") !== 10) { $ERROR('#10: parseFloat("010.string") === 10. Actual: ' + (parseFloat("010.string"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T6.js index 5272a62fbc..87fa2acf5d 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T6.js - * @description Checking . DecimalDigits ExponentPart_opt - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T6 +description: Checking . DecimalDigits ExponentPart_opt +---*/ //CHECK#1 if (parseFloat("+.1string") !== 0.1) { @@ -23,4 +23,3 @@ if (parseFloat(".01string") !== 0.01) { if (parseFloat("+.22e-1string") !== 0.022) { $ERROR('#3: parseFloat("+.22e-1string") === 0.022. Actual: ' + (parseFloat("+.22e-1string"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T7.js index 0f77778f9b..9711d2cd30 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Compute the longest prefix of Result(2), which might be Result(2) itself, - * which satisfies the syntax of a StrDecimalLiteral - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A4_T7.js - * @description Checking DecimalDigits ExponentPart_opt - */ +/*--- +info: > + Compute the longest prefix of Result(2), which might be Result(2) itself, + which satisfies the syntax of a StrDecimalLiteral +es5id: 15.1.2.3_A4_T7 +description: Checking DecimalDigits ExponentPart_opt +---*/ //CHECK#1 if (parseFloat("-11string") !== -11) { @@ -43,4 +43,3 @@ if (parseFloat("1e001string") !== 10) { if (parseFloat("010string") !== 10) { $ERROR('#7: parseFloat("010string") === 10. Actual: ' + (parseFloat("010string"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T1.js index 6ed8521aad..8363594638 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the number value for the MV of Result(4) - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T1.js - * @description Checking Infinity - */ +/*--- +info: Return the number value for the MV of Result(4) +es5id: 15.1.2.3_A5_T1 +description: Checking Infinity +---*/ //CHECK#1 if (parseFloat("Infinity") !== Number.POSITIVE_INFINITY) { @@ -22,4 +21,3 @@ if (parseFloat("+Infinity") !== Number.POSITIVE_INFINITY) { if (parseFloat("-Infinity") !== Number.NEGATIVE_INFINITY) { $ERROR('#3: parseFloat("-Infinity") === Number.NEGATIVE_INFINITY. Actual: ' + (parseFloat("-Infinity"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T2.js index b59fb7900a..8301087731 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the number value for the MV of Result(4) - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T2.js - * @description Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt - */ +/*--- +info: Return the number value for the MV of Result(4) +es5id: 15.1.2.3_A5_T2 +description: Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt +---*/ //CHECK#1 if (parseFloat("-11.") !== -11) { @@ -57,4 +56,3 @@ if (parseFloat("001.") !== 1) { if (parseFloat("010.") !== 10) { $ERROR('#10: parseFloat("010.") === 10. Actual: ' + (parseFloat("010."))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T3.js index b2a2097e9b..c9dbe5ef89 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the number value for the MV of Result(4) - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T3.js - * @description Checking . DecimalDigits ExponentPart_opt - */ +/*--- +info: Return the number value for the MV of Result(4) +es5id: 15.1.2.3_A5_T3 +description: Checking . DecimalDigits ExponentPart_opt +---*/ //CHECK#1 if (parseFloat("+.1") !== 0.1) { @@ -22,4 +21,3 @@ if (parseFloat(".01") !== 0.01) { if (parseFloat("+.22e-1") !== 0.022) { $ERROR('#3: parseFloat("+.22e-1") === 0.022. Actual: ' + (parseFloat("+.22e-1"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T4.js index d92e3bcb05..c6959a9b20 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Return the number value for the MV of Result(4) - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A5_T4.js - * @description Checking DecimalDigits ExponentPart_opt - */ +/*--- +info: Return the number value for the MV of Result(4) +es5id: 15.1.2.3_A5_T4 +description: Checking DecimalDigits ExponentPart_opt +---*/ //CHECK#1 if (parseFloat("-11") !== -11) { @@ -42,4 +41,3 @@ if (parseFloat("1e001") !== 10) { if (parseFloat("010") !== 10) { $ERROR('#7: parseFloat("010") === 10. Actual: ' + (parseFloat("010"))); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A6.js index 8c626a855f..a9983ac278 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * parseFloat may interpret only a leading portion of the string as - * a number value; it ignores any characters that cannot be interpreted as part - * of the notation of an decimal literal, and no indication is given that any such - * characters were ignored. - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A6.js - * @description Complex test without eval - */ +/*--- +info: > + parseFloat may interpret only a leading portion of the string as + a number value; it ignores any characters that cannot be interpreted as part + of the notation of an decimal literal, and no indication is given that any such + characters were ignored. +es5id: 15.1.2.3_A6 +description: Complex test without eval +---*/ //CHECK var errorCount = 0; @@ -78,4 +78,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.1.js index a63830dd24..2a008b774a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseFloat has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of parseFloat has the attribute DontEnum +es5id: 15.1.2.3_A7.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (parseFloat.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (var p in parseFloat){ if (result !== true) { $ERROR('#2: result = true; for (p in parseFloat) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.2.js index 84fa178c07..b21e19a826 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseFloat has the attribute DontDelete - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of parseFloat has the attribute DontDelete +es5id: 15.1.2.3_A7.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (parseFloat.hasOwnProperty('length') !== true) { @@ -25,4 +25,3 @@ if (parseFloat.hasOwnProperty('length') !== true) { if (parseFloat.length === undefined) { $ERROR('#3: delete parseFloat.length; parseFloat.length !== undefined'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.3.js index 28d1839ed6..b6faa93a3b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseFloat has the attribute ReadOnly - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of parseFloat has the attribute ReadOnly +es5id: 15.1.2.3_A7.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = parseFloat.length; @@ -15,5 +14,3 @@ parseFloat.length = Infinity; if (parseFloat.length !== x) { $ERROR('#1: x = parseFloat.length; parseFloat.length = Infinity; parseFloat.length === x. Actual: ' + (parseFloat.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.4.js index 085fac1a3d..1e86f34116 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of parseFloat is 1 - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.4.js - * @description parseFloat.length === 1 - */ +/*--- +info: The length property of parseFloat is 1 +es5id: 15.1.2.3_A7.4 +description: parseFloat.length === 1 +---*/ //CHECK#1 if (parseFloat.length !== 1) { $ERROR('#1: parseFloat.length === 1. Actual: ' + (parseFloat.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.5.js index abf91c709b..ba2133abbe 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The parseFloat property has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The parseFloat property has the attribute DontEnum +es5id: 15.1.2.3_A7.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('parseFloat') !== false) { @@ -24,4 +23,3 @@ for (var p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "parseFloat") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.6.js index 773ea4dfad..240cb2bc4b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The parseFloat property has not prototype property - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.6.js - * @description Checking parseFloat.prototype - */ +/*--- +info: The parseFloat property has not prototype property +es5id: 15.1.2.3_A7.6 +description: Checking parseFloat.prototype +---*/ //CHECK#1 if (parseFloat.prototype !== undefined) { $ERROR('#1: parseFloat.prototype === undefined. Actual: ' + (parseFloat.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.7.js index ffa1934e71..cac48ec041 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The parseFloat property can't be used as constructor - * - * @path ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The parseFloat property can't be used as constructor +es5id: 15.1.2.3_A7.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new parseFloat() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T1.js index 59cf248bc9..7280a328d4 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * isNaN applies ToNumber to its argument, then return true if the result is NaN, and otherwise return false - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T1.js - * @description Checking all primitive - */ +/*--- +info: > + isNaN applies ToNumber to its argument, then return true if the result is + NaN, and otherwise return false +es5id: 15.1.2.4_A1_T1 +description: Checking all primitive +---*/ // CHECK#1 if (!(isNaN(NaN) === true)) { @@ -67,8 +68,3 @@ if (isNaN(true) === true) { if (isNaN("1") === true) { $ERROR('#12: "1" !== Not-a-Number'); } - - - - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T2.js index c9e957fe04..34bb54409e 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * isNaN applies ToNumber to its argument, then return true if the result is NaN, and otherwise return false - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A1_T2.js - * @description Checking all object - */ +/*--- +info: > + isNaN applies ToNumber to its argument, then return true if the result is + NaN, and otherwise return false +es5id: 15.1.2.4_A1_T2 +description: Checking all object +---*/ // CHECK#1 if (!(isNaN({}) === true)) { @@ -37,8 +38,3 @@ if (!(isNaN(new Number(NaN)) === true)) { if (isNaN(new Boolean(true)) === true) { $ERROR('#6: new Boolean(true) !== Not-a-Number'); } - - - - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.1.js index 6b60993348..f79d203121 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isNaN has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of isNaN has the attribute DontEnum +es5id: 15.1.2.4_A2.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (isNaN.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in isNaN){ if (result !== true) { $ERROR('#2: result = true; for (p in isNaN) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.2.js index a2539fb9b8..a40d15462a 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isNaN has the attribute DontDelete - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of isNaN has the attribute DontDelete +es5id: 15.1.2.4_A2.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (isNaN.hasOwnProperty('length') !== true) { @@ -25,4 +25,3 @@ if (isNaN.hasOwnProperty('length') !== true) { if (isNaN.length === undefined) { $ERROR('#3: delete isNaN.length; isNaN.length !== undefined'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.3.js index 8daaa8964f..cd9ac4911e 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isNaN has the attribute ReadOnly - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of isNaN has the attribute ReadOnly +es5id: 15.1.2.4_A2.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 x = isNaN.length; @@ -15,5 +14,3 @@ isNaN.length = Infinity; if (isNaN.length !== x) { $ERROR('#1: x = isNaN.length; isNaN.length = Infinity; isNaN.length === x. Actual: ' + (isNaN.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.4.js index b8f6aedcfe..c485ce45cc 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isNaN is 1 - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.4.js - * @description isNaN.length === 1 - */ +/*--- +info: The length property of isNaN is 1 +es5id: 15.1.2.4_A2.4 +description: isNaN.length === 1 +---*/ //CHECK#1 if (isNaN.length !== 1) { $ERROR('#1: isNaN.length === 1. Actual: ' + (isNaN.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.5.js index bf9ae39373..dcccf83668 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The isNaN property has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The isNaN property has the attribute DontEnum +es5id: 15.1.2.4_A2.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('isNaN') !== false) { @@ -24,4 +23,3 @@ for (p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "isNaN") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.6.js index cad9bed136..9d1c5cfd39 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The isNaN property has not prototype property - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.6.js - * @description Checking isNaN.prototype - */ +/*--- +info: The isNaN property has not prototype property +es5id: 15.1.2.4_A2.6 +description: Checking isNaN.prototype +---*/ //CHECK#1 if (isNaN.prototype !== undefined) { $ERROR('#1: isNaN.prototype === undefined. Actual: ' + (isNaN.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.7.js index e6725cd020..fc634f7572 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The isNaN property can't be used as constructor - * - * @path ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The isNaN property can't be used as constructor +es5id: 15.1.2.4_A2.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new isNaN() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T1.js index 1e952b2185..c818bd1546 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * isFinite applies ToNumber to its argument, then return false if the result is NaN, +Infinity, -Infinity, and otherwise return true - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T1.js - * @description Checking all primitive - */ +/*--- +info: > + isFinite applies ToNumber to its argument, then return false if the + result is NaN, +Infinity, -Infinity, and otherwise return true +es5id: 15.1.2.5_A1_T1 +description: Checking all primitive +---*/ // CHECK#1 if (!(isFinite(NaN) === false)) { @@ -67,4 +68,3 @@ if (isFinite(false) === false) { if (isFinite("1") === false) { $ERROR('#12: "1" !== Not-a-Finite'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T2.js index 86ea9a37d0..607ad89aae 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * isFinite applies ToNumber to its argument, then return false if the result is NaN, +Infinity, -Infinity, and otherwise return true - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A1_T2.js - * @description Checking all object - */ +/*--- +info: > + isFinite applies ToNumber to its argument, then return false if the + result is NaN, +Infinity, -Infinity, and otherwise return true +es5id: 15.1.2.5_A1_T2 +description: Checking all object +---*/ // CHECK#1 if (!(isFinite({}) === false)) { @@ -37,4 +38,3 @@ if (!(isFinite(new Number(NaN)) === false)) { if (isFinite(new Boolean(true)) === false) { $ERROR('#6: new Boolean(true) !== Not-a-Finite'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.1.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.1.js index 0e1970eaa0..d682f7621b 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.1.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isFinite has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of isFinite has the attribute DontEnum +es5id: 15.1.2.5_A2.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (isFinite.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in isFinite){ if (result !== true) { $ERROR('#2: result = true; for (p in isFinite) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.2.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.2.js index 56d2c637aa..c8916b22c5 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.2.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isFinite has the attribute DontDelete - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of isFinite has the attribute DontDelete +es5id: 15.1.2.5_A2.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (isFinite.hasOwnProperty('length') !== true) { @@ -25,4 +25,3 @@ if (isFinite.hasOwnProperty('length') !== true) { if (isFinite.length === undefined) { $ERROR('#3: delete isFinite.length; isFinite.length !== undefined'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.3.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.3.js index af8441a36c..fd679488ce 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.3.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isFinite has the attribute ReadOnly - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of isFinite has the attribute ReadOnly +es5id: 15.1.2.5_A2.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 x = isFinite.length; @@ -15,5 +14,3 @@ isFinite.length = Infinity; if (isFinite.length !== x) { $ERROR('#1: x = isFinite.length; isFinite.length = Infinity; isFinite.length === x. Actual: ' + (isFinite.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.4.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.4.js index cba913c9a5..6af10f2a1f 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.4.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of isFinite is 1 - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.4.js - * @description isFinite.length === 1 - */ +/*--- +info: The length property of isFinite is 1 +es5id: 15.1.2.5_A2.4 +description: isFinite.length === 1 +---*/ //CHECK#1 if (isFinite.length !== 1) { $ERROR('#1: isFinite.length === 1. Actual: ' + (isFinite.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.5.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.5.js index b8599f2c3a..2a67381011 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.5.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The isFinite property has the attribute DontEnum - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The isFinite property has the attribute DontEnum +es5id: 15.1.2.5_A2.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('isFinite') !== false) { @@ -24,4 +23,3 @@ for (p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "isFinite") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.6.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.6.js index e9f6e408bd..71011f1dfe 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.6.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The isFinite property has not prototype property - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.6.js - * @description Checking isFinit.prototype - */ +/*--- +info: The isFinite property has not prototype property +es5id: 15.1.2.5_A2.6 +description: Checking isFinit.prototype +---*/ //CHECK#1 if (isFinite.prototype !== undefined) { $ERROR('#1: isFinite.prototype === undefined. Actual: ' + (isFinite.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.7.js b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.7.js index b388cd30f6..266d958898 100644 --- a/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.7.js +++ b/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The isFinite property can't be used as constructor - * - * @path ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The isFinite property can't be used as constructor +es5id: 15.1.2.5_A2.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new isFinite() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.10_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.10_T1.js index 98a7aa518d..d0fbba3ad1 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.10_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.10_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and string.charAt(k + 4) and - * string.charAt(k + 5) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.10_T1.js - * @description Complex tests - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and string.charAt(k + 4) and + string.charAt(k + 5) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.10_T1 +description: Complex tests +---*/ //CHECK var result = true; @@ -28,4 +28,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 110xxxxx (n = 2) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T1.js index cbf112db81..651ee79b99 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T1.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T1.js - * @description Complex tests, string.charAt(k + 4) and string.charAt(k + 5) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.11_T1 +description: > + Complex tests, string.charAt(k + 4) and string.charAt(k + 5) do + not represent hexadecimal digits +---*/ //CHECK var result = true; @@ -30,4 +31,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T2.js index 7fe1df5a98..2fc6e80c64 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.11_T2.js - * @description Complex tests, string.charAt(k + 7) and string.charAt(k + 8) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.11_T2 +description: > + Complex tests, string.charAt(k + 7) and string.charAt(k + 8) do + not represent hexadecimal digits +---*/ //CHECK var result = true; @@ -30,4 +31,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T1.js index a0ee74e2c4..971af19f8e 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T1.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) or (string.charAt(k + 10) and - * string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T1.js - * @description Complex tests, string.charAt(k + 4) and string.charAt(k + 5) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 11110xxx (n = 4) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) or (string.charAt(k + 10) and + string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.12_T1 +description: > + Complex tests, string.charAt(k + 4) and string.charAt(k + 5) do + not represent hexadecimal digits +---*/ //CHECK var result = true; @@ -31,4 +32,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T2.js index d75ba1898f..b0e3495094 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T2.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) or (string.charAt(k + 10) and - * string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T2.js - * @description Complex tests, string.charAt(k + 7) and string.charAt(k + 7) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 11110xxx (n = 4) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) or (string.charAt(k + 10) and + string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.12_T2 +description: > + Complex tests, string.charAt(k + 7) and string.charAt(k + 7) do + not represent hexadecimal digits +---*/ //CHECK var result = true; @@ -31,4 +32,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T3.js index 82dbe0b6ed..0b859725c7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T3.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) or (string.charAt(k + 10) and - * string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.12_T3.js - * @description Complex tests, string.charAt(k + 10) and string.charAt(k + 11) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 11110xxx (n = 4) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) or (string.charAt(k + 10) and + string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.12_T3 +description: > + Complex tests, string.charAt(k + 10) and string.charAt(k + 11) do + not represent hexadecimal digits +---*/ //CHECK var result = true; @@ -31,4 +32,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 10) and string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T1.js index ecb081845e..a1f9ec4868 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T1.js - * @description Complex tests. B = [0xC0 - 0xDF], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.13_T1 +description: Complex tests. B = [0xC0 - 0xDF], C = [0x00, 0x7F] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T2.js index aa8cb610f6..f257b6b9e1 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.13_T2.js - * @description Complex tests. B = [0xC0 - 0xDF], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.13_T2 +description: Complex tests. B = [0xC0 - 0xDF], C = [0xC0, 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T1.js index 968237727b..8357cea7f0 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T1.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.14_T1 +description: Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T2.js index 3539281f32..23c4d5f509 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T2.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.14_T2 +description: Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T3.js index 34c5f120b2..d69fdab9d9 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T3.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.14_T3 +description: Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T4.js index ebdf11c262..2946136d76 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.14_T4.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.14_T4 +description: Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T1.js index 089fe910a4..ad1febe2f7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T1.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.15_T1 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T2.js index 63e2f4eed5..401a388206 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T2.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.15_T2 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T3.js index 4abf777d95..84ba141934 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T3.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.15_T3 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T4.js index 433d324ef1..839911bfef 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T4.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.15_T4 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T5.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T5.js index 8c78da11d9..11dc028433 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T5.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T5.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.15_T5 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T6.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T6.js index 26672df4f2..50eaff52c0 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T6.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.15_T6.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.1_A1.15_T6 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.1_T1.js index e178a708dd..0dd267a99d 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) equal "%" and k + 2 >= string.length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.1_T1.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) equal "%" and k + 2 >= string.length, throw URIError +es5id: 15.1.3.1_A1.1_T1 +description: Complex tests +---*/ var result = true; @@ -53,7 +52,3 @@ try { if (result !== true) { $ERROR('#1: If string.charAt(k) equal "%" and k + 2 >= string.length, throw URIError'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T1.js index 4ede22c6ae..e6ccf035f3 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = string.charAt(k+1) + string.charAt(k+2) do not represent - * hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T1.js - * @description Complex tests - */ +/*--- +info: > + If B = string.charAt(k+1) + string.charAt(k+2) do not represent + hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.2_T1 +description: Complex tests +---*/ //CHECK var result = true; @@ -28,4 +28,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If string.charAt(k+1) does not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T2.js index 44f16f68ce..986b49c6e0 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = string.charAt(k+1) + string.charAt(k+2) do not represent - * hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.2_T2.js - * @description Complex tests - */ +/*--- +info: > + If B = string.charAt(k+1) + string.charAt(k+2) do not represent + hexadecimal digits, throw URIError +es5id: 15.1.3.1_A1.2_T2 +description: Complex tests +---*/ //CHECK var result = true; @@ -28,4 +28,3 @@ for (var indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If string.charAt(k+2) does not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T1.js index e441d4b93c..7125c02a75 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 10xxxxxx or B = 11111xxx, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T1.js - * @description Complex tests. B = 10xxxxxx -> B in [0x80 - 0xBF] - */ +/*--- +info: If B = 10xxxxxx or B = 11111xxx, throw URIError +es5id: 15.1.3.1_A1.3_T1 +description: Complex tests. B = 10xxxxxx -> B in [0x80 - 0xBF] +---*/ var errorCount = 0; var count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T2.js index 468df214f8..1a154784b7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 10xxxxxx or B = 11111xxx, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.3_T2.js - * @description Complex tests. B = 11111xxx -> B in [0xF8 - 0xFF] - */ +/*--- +info: If B = 10xxxxxx or B = 11111xxx, throw URIError +es5id: 15.1.3.1_A1.3_T2 +description: Complex tests. B = 11111xxx -> B in [0xF8 - 0xFF] +---*/ var errorCount = 0; var count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.4_T1.js index 5a2ca51c25..6a80cd17ab 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and (k + 2) + 3 >= length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.4_T1.js - * @description Complex tests. B = [0xC0 - 0xDF] - */ +/*--- +info: If B = 110xxxxx (n = 2) and (k + 2) + 3 >= length, throw URIError +es5id: 15.1.3.1_A1.4_T1 +description: Complex tests. B = [0xC0 - 0xDF] +---*/ var errorCount = 0; var count = 0; @@ -84,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.5_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.5_T1.js index e783882827..a8758ef18b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.5_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and (k + 2) + 6 >= length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.5_T1.js - * @description Complex tests. B = [0xE0 - 0xEF] - */ +/*--- +info: If B = 1110xxxx (n = 3) and (k + 2) + 6 >= length, throw URIError +es5id: 15.1.3.1_A1.5_T1 +description: Complex tests. B = [0xE0 - 0xEF] +---*/ var errorCount = 0; var count = 0; @@ -84,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.6_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.6_T1.js index 44f3ca8a83..3f8347af2d 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.6_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (k + 2) + 9 >= length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.6_T1.js - * @description Complex tests. B = [0xF0 - 0xF7] - */ +/*--- +info: If B = 11110xxx (n = 4) and (k + 2) + 9 >= length, throw URIError +es5id: 15.1.3.1_A1.6_T1 +description: Complex tests. B = [0xF0 - 0xF7] +---*/ var errorCount = 0; var count = 0; @@ -84,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.7_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.7_T1.js index 7d97e3992e..3d3b5035e1 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.7_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.7_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and string.charAt(k + 3) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.7_T1.js - * @description Complex tests. B = [0xC0 - 0xDF] - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and string.charAt(k + 3) not equal "%", throw + URIError +es5id: 15.1.3.1_A1.7_T1 +description: Complex tests. B = [0xC0 - 0xDF] +---*/ var errorCount = 0; var count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T1.js index 87fb7101e4..387cf52f70 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and string.charAt(k + 3), - * string.charAt(k + 6) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T1.js - * @description Complex tests. B = [0xE0 - 0xEF], - * string.charAt(k + 3) not equal "%" - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and string.charAt(k + 3), + string.charAt(k + 6) not equal "%", throw URIError +es5id: 15.1.3.1_A1.8_T1 +description: > + Complex tests. B = [0xE0 - 0xEF], string.charAt(k + 3) not equal + "%" +---*/ var errorCount = 0; var count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T2.js index 77f166a996..95e93cfcc9 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and string.charAt(k + 3), - * string.charAt(k + 6) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.8_T2.js - * @description Complex tests. B = [0xE0 - 0xEF], - * string.charAt(k + 6) not equal "%" - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and string.charAt(k + 3), + string.charAt(k + 6) not equal "%", throw URIError +es5id: 15.1.3.1_A1.8_T2 +description: > + Complex tests. B = [0xE0 - 0xEF], string.charAt(k + 6) not equal + "%" +---*/ var errorCount = 0; var count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T1.js index 65935775f1..31e5615798 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and string.charAt(k + 3), - * string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T1.js - * @description Complex tests. B = [0xF0 - 0x0F7], - * string.charAt(k + 3) not equal "%" - */ +/*--- +info: > + If B = 11110xxx (n = 4) and string.charAt(k + 3), + string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError +es5id: 15.1.3.1_A1.9_T1 +description: > + Complex tests. B = [0xF0 - 0x0F7], string.charAt(k + 3) not equal + "%" +---*/ var errorCount = 0; var count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T2.js index b63a049d61..2f19944845 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and string.charAt(k + 3), - * string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T2.js - * @description Complex tests. B = [0xF0 - 0x0F7], - * string.charAt(k + 6) not equal "%" - */ +/*--- +info: > + If B = 11110xxx (n = 4) and string.charAt(k + 3), + string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError +es5id: 15.1.3.1_A1.9_T2 +description: > + Complex tests. B = [0xF0 - 0x0F7], string.charAt(k + 6) not equal + "%" +---*/ var errorCount = 0; var count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T3.js index f353758c67..306d946d99 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and string.charAt(k + 3), - * string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A1.9_T3.js - * @description Complex tests. B = [0xF0 - 0x0F7], - * string.charAt(k + 9) not equal "%" - */ +/*--- +info: > + If B = 11110xxx (n = 4) and string.charAt(k + 3), + string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError +es5id: 15.1.3.1_A1.9_T3 +description: > + Complex tests. B = [0xF0 - 0x0F7], string.charAt(k + 9) not equal + "%" +---*/ var errorCount = 0; var count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.1_T1.js index 4c853985de..7f643eb763 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) not equal "%", return this char - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.1_T1.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) not equal "%", return this char +es5id: 15.1.3.1_A2.1_T1 +description: Complex tests +---*/ //CHECK var errorCount = 0; @@ -55,4 +54,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.2_T1.js index b9a08ea9e9..a2ef903f1e 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.2_T1.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 0xxxxxxxx ([0x00 - 0x7F]), without [uriReserved, #], return B1 - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.2_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: If B1 = 0xxxxxxxx ([0x00 - 0x7F]), without [uriReserved, #], return B1 +es5id: 15.1.3.1_A2.2_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ var errorCount = 0; var count = 0; @@ -83,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.3_T1.js index 980a061755..9cd0bef74e 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.3_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 110xxxxx ([0xC0 - 0xDF]), B2 = 10xxxxxx ([0x80 - 0xBF), without B1 = [0xC0, 0xC1], return UTF8(B1, B2) - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.3_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If B1 = 110xxxxx ([0xC0 - 0xDF]), B2 = 10xxxxxx ([0x80 - 0xBF), without + B1 = [0xC0, 0xC1], return UTF8(B1, B2) +es5id: 15.1.3.1_A2.3_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ var errorCount = 0; var count = 0; @@ -20,8 +22,8 @@ for (var indexB1 = 0xC2; indexB1 <= 0xDF; indexB1++) { var hexB2 = decimalToHexString(indexB2); var index = (indexB1 & 0x1F) * 0x40 + (indexB2 & 0x3F); try { - if (decodeURI("%" + hexB1.substring(2) + "%" + hexB2.substring(2)) === String.fromCharCode(index)) continue; - } catch (e) { + if (decodeURI("%" + hexB1.substring(2) + "%" + hexB2.substring(2)) === String.fromCharCode(index)) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -80,4 +82,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.4_T1.js index d544f41f32..094f598e01 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.4_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 1110xxxx ([0xE0 - 0xEF]), B2, B3 = 10xxxxxxx ([0x80 - 0xBF]), without [B1, B2] = [0xE0, 0x80 - 0x9F], [0xED, 0xA0 - 0xBF] (0xD800 - 0xDFFF), return UTF8(B1, B2, B3) - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.4_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If B1 = 1110xxxx ([0xE0 - 0xEF]), B2, B3 = 10xxxxxxx ([0x80 - 0xBF]), + without [B1, B2] = [0xE0, 0x80 - 0x9F], [0xED, 0xA0 - 0xBF] (0xD800 - + 0xDFFF), return UTF8(B1, B2, B3) +es5id: 15.1.3.1_A2.4_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ var errorCount = 0; var count = 0; @@ -24,8 +27,8 @@ for (var indexB1 = 0xE0; indexB1 <= 0xEF; indexB1++) { var hexB3 = decimalToHexString(indexB3); var index = (indexB1 & 0x0F) * 0x1000 + (indexB2 & 0x3F) * 0x40 + (indexB3 & 0x3F); try { - if (decodeURI("%" + hexB1.substring(2) + "%" + hexB2.substring(2) + "%" + hexB3.substring(2)) === String.fromCharCode(index)) continue; - } catch (e) { + if (decodeURI("%" + hexB1.substring(2) + "%" + hexB2.substring(2) + "%" + hexB3.substring(2)) === String.fromCharCode(index)) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -85,4 +88,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.5_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.5_T1.js index 0e1017501a..4710f65bdc 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.5_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.5_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 11110xxx ([0xF0 - 0x0F4]), B2, B3, B4 = 10xxxxxxx ([0x80 - 0xBF]), without [B1, B2] = [0xF0, 0x80 - 0x9F], [0xF4, 0x90 - 0xBF], return UTF8(B1, B2, B3, B4) - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A2.5_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If B1 = 11110xxx ([0xF0 - 0x0F4]), B2, B3, B4 = 10xxxxxxx ([0x80 - + 0xBF]), without [B1, B2] = [0xF0, 0x80 - 0x9F], [0xF4, 0x90 - 0xBF], + return UTF8(B1, B2, B3, B4) +es5id: 15.1.3.1_A2.5_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ var errorCount = 0; var count = 0; @@ -28,8 +31,8 @@ for (var indexB1 = 0xF0; indexB1 <= 0xF4; indexB1++) { var L = ((index - 0x10000) & 0x03FF) + 0xDC00; var H = (((index - 0x10000) >> 10) & 0x03FF) + 0xD800; try { - if (decodeURI("%" + hexB1.substring(3) + "%" + hexB2.substring(3) + "%" + hexB3.substring(3) + "%" + hexB4.substring(3)) === String.fromCharCode(H) + String.fromCharCode(L)) continue; - } catch (e) { + if (decodeURI("%" + hexB1.substring(3) + "%" + hexB2.substring(3) + "%" + hexB3.substring(3) + "%" + hexB4.substring(3)) === String.fromCharCode(H) + String.fromCharCode(L)) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -90,4 +93,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T1.js index d16f6dc455..a2ccfc4562 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let reservedURISet be a string containing one instance of each character valid - * in uriReserved plus "#" - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T1.js - * @description Checking all character in reservedURISet. HexDigit in [0..9, A..F] - */ +/*--- +info: > + Let reservedURISet be a string containing one instance of each character valid + in uriReserved plus "#" +es5id: 15.1.3.1_A3_T1 +description: Checking all character in reservedURISet. HexDigit in [0..9, A..F] +---*/ //CHECK#1 if (decodeURI("%3B") !== "%3B") { @@ -63,4 +63,3 @@ if (decodeURI("%2C") !== "%2C") { if (decodeURI("%23") !== "%23") { $ERROR('#11: decodeURI("%23") equal "%23", not "#"'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T2.js index d5f67c4109..f1c2381de2 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let reservedURISet be a string containing one instance of each character valid - * in uriReserved plus "#" - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T2.js - * @description Checking all character in reservedURISet. HexDigit in [0..9, a..f] - */ +/*--- +info: > + Let reservedURISet be a string containing one instance of each character valid + in uriReserved plus "#" +es5id: 15.1.3.1_A3_T2 +description: Checking all character in reservedURISet. HexDigit in [0..9, a..f] +---*/ //CHECK#1 if (decodeURI("%3b") !== "%3b") { @@ -63,4 +63,3 @@ if (decodeURI("%2c") !== "%2c") { if (decodeURI("%23") !== "%23") { $ERROR('#11: decodeURI("%23") equal "%23", not "#"'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T3.js index 56b135e9c0..13155b20e9 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let reservedURISet be a string containing one instance of each character valid - * in uriReserved plus "#" - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A3_T3.js - * @description Complex test - */ +/*--- +info: > + Let reservedURISet be a string containing one instance of each character valid + in uriReserved plus "#" +es5id: 15.1.3.1_A3_T3 +description: Complex test +---*/ //CHECK#1 if (decodeURI("%3B%2F%3F%3A%40%26%3D%2B%24%2C%23") !== "%3B%2F%3F%3A%40%26%3D%2B%24%2C%23") { @@ -18,4 +18,3 @@ if (decodeURI("%3B%2F%3F%3A%40%26%3D%2B%24%2C%23") !== "%3B%2F%3F%3A%40%26%3D%2B if (decodeURI("%3b%2f%3f%3a%40%26%3d%2b%24%2c%23") !== "%3b%2f%3f%3a%40%26%3d%2b%24%2c%23") { $ERROR('#2: decodeURI("%3b%2f%3f%3a%40%26%3d%2b%24%2c%23") equal "%3b%2f%3f%3a%40%26%3d%2b%24%2c%23", not ";/?:@&=+$,#" or "%3B%2F%3F%3A%40%26%3D%2B%24%2C%23"'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T1.js index bca314ec16..5fd65e132f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T1.js - * @description Checking ENGLISH ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.1_A4_T1 +description: Checking ENGLISH ALPHABET +---*/ //CHECK#1 if (decodeURI("http://unipro.ru/0123456789") !== "http://unipro.ru/0123456789") { @@ -22,4 +21,3 @@ if (decodeURI("%41%42%43%44%45%46%47%48%49%4A%4B%4C%4D%4E%4F%50%51%52%53%54%55%5 if (decodeURI("%61%62%63%64%65%66%67%68%69%6A%6B%6C%6D%6E%6F%70%71%72%73%74%75%76%77%78%79%7A") !== "abcdefghijklmnopqrstuvwxyz") { $ERROR('#3: abcdefghijklmnopqrstuvwxyz'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T2.js index 657bffd1eb..0a7f272c46 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T2.js - * @description Checking RUSSIAN ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.1_A4_T2 +description: Checking RUSSIAN ALPHABET +---*/ //CHECK#1 if (decodeURI("http://ru.wikipedia.org/wiki/%d0%ae%D0%bd%D0%B8%D0%BA%D0%BE%D0%B4") !== "http://ru.wikipedia.org/wiki/Юникод") { @@ -22,4 +21,3 @@ if (decodeURI("http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4 if (decodeURI("http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0") !== "http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода") { $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T3.js index f49675baa0..0b47260950 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T3.js - * @description Checking URL with Line Terminator - */ +/*--- +info: URI tests +es5id: 15.1.3.1_A4_T3 +description: Checking URL with Line Terminator +---*/ //CHECK#1 if (decodeURI("http://unipro.ru/%0Aabout") !== "http://unipro.ru/\nabout") { @@ -27,4 +26,3 @@ if (decodeURI("http://unipro.ru/%0Cabout") !== "http://unipro.ru/\fabout") { if (decodeURI("http://unipro.ru/%0Dabout") !== "http://unipro.ru/\rabout") { $ERROR('#4: http://unipro.ru/%0Dabout'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T4.js index a518358a27..d95a04f9f4 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A4_T4.js - * @description Test some url - */ +/*--- +info: URI tests +es5id: 15.1.3.1_A4_T4 +description: Test some url +---*/ //CHECK#1 if (decodeURI("") !== "") { @@ -27,4 +26,3 @@ if (decodeURI("http://www.google.ru/support/jobs/bin/static.py%3Fpage%3dwhy-ru.h if (decodeURI("http://en.wikipedia.org/wiki/UTF-8%23Description") !== "http://en.wikipedia.org/wiki/UTF-8%23Description") { $ERROR('%234: http://en.wikipedia.org/wiki/UTF-8%23Description'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.1.js index b338d7d7b2..c9a63ea615 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURI has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of decodeURI has the attribute DontEnum +es5id: 15.1.3.1_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (decodeURI.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in decodeURI){ if (result !== true) { $ERROR('#2: result = true; for (p in decodeURI) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.2.js index d8d1a5003e..cf06185cf8 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURI has the attribute DontDelete - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of decodeURI has the attribute DontDelete +es5id: 15.1.3.1_A5.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (decodeURI.hasOwnProperty('length') !== true) { @@ -25,7 +25,3 @@ if (decodeURI.hasOwnProperty('length') !== true) { if (decodeURI.length === undefined) { $ERROR('#3: delete decodeURI.length; decodeURI.length !== undefined'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.3.js index 02b7bf2216..6d3c425b58 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURI has the attribute ReadOnly - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of decodeURI has the attribute ReadOnly +es5id: 15.1.3.1_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = decodeURI.length; @@ -15,5 +14,3 @@ decodeURI.length = Infinity; if (decodeURI.length !== x) { $ERROR('#1: x = decodeURI.length; decodeURI.length = Infinity; decodeURI.length === x. Actual: ' + (decodeURI.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.4.js index 4b41d621e1..fb30642d68 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURI is 1 - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.4.js - * @description decodeURI.length === 1 - */ +/*--- +info: The length property of decodeURI is 1 +es5id: 15.1.3.1_A5.4 +description: decodeURI.length === 1 +---*/ //CHECK#1 if (decodeURI.length !== 1) { $ERROR('#1: decodeURI.length === 1. Actual: ' + (decodeURI.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.5.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.5.js index 3a61259378..5c958df3d5 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.5.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The decodeURI property has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The decodeURI property has the attribute DontEnum +es5id: 15.1.3.1_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('decodeURI') !== false) { @@ -24,4 +23,3 @@ for (p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "decodeURI") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.6.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.6.js index acab6ebddf..bafc5f6682 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.6.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The decodeURI property has not prototype property - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.6.js - * @description Checking decodeURI.prototype - */ +/*--- +info: The decodeURI property has not prototype property +es5id: 15.1.3.1_A5.6 +description: Checking decodeURI.prototype +---*/ //CHECK#1 if (decodeURI.prototype !== undefined) { $ERROR('#1: decodeURI.prototype === undefined. Actual: ' + (decodeURI.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.7.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.7.js index 59827e3328..7253d3d506 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.7.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The decodeURI property can't be used as constructor - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The decodeURI property can't be used as constructor +es5id: 15.1.3.1_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new decodeURI() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A6_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A6_T1.js index 8dbb7f65f6..37f9e60230 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A6_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A6_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator use ToString +es5id: 15.1.3.1_A6_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return "%5E"}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; decodeURI(object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.10_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.10_T1.js index 6d280887a0..e15e0340c7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.10_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.10_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and string.charAt(k + 4) and - * string.charAt(k + 5) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.10_T1.js - * @description Complex tests - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and string.charAt(k + 4) and + string.charAt(k + 5) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.10_T1 +description: Complex tests +---*/ //CHECK result = true; @@ -28,4 +28,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 110xxxxx (n = 2) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T1.js index 8844b2ac00..1f7ea3a0d8 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T1.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T1.js - * @description Complex tests, string.charAt(k + 4) and string.charAt(k + 5) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.11_T1 +description: > + Complex tests, string.charAt(k + 4) and string.charAt(k + 5) do + not represent hexadecimal digits +---*/ //CHECK result = true; @@ -30,4 +31,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T2.js index 51dcd44779..8df917c1e1 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.11_T2.js - * @description Complex tests, string.charAt(k + 7) and string.charAt(k + 8) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.11_T2 +description: > + Complex tests, string.charAt(k + 7) and string.charAt(k + 8) do + not represent hexadecimal digits +---*/ //CHECK result = true; @@ -30,4 +31,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T1.js index 59fe4f9908..0d95d9ab67 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T1.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) or (string.charAt(k + 10) and - * string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T1.js - * @description Complex tests, string.charAt(k + 4) and string.charAt(k + 5) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 11110xxx (n = 4) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) or (string.charAt(k + 10) and + string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.12_T1 +description: > + Complex tests, string.charAt(k + 4) and string.charAt(k + 5) do + not represent hexadecimal digits +---*/ //CHECK result = true; @@ -31,4 +32,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T2.js index 43b55955bc..ed6b8e5dcb 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T2.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) or (string.charAt(k + 10) and - * string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T2.js - * @description Complex tests, string.charAt(k + 7) and string.charAt(k + 7) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 11110xxx (n = 4) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) or (string.charAt(k + 10) and + string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.12_T2 +description: > + Complex tests, string.charAt(k + 7) and string.charAt(k + 7) do + not represent hexadecimal digits +---*/ //CHECK result = true; @@ -31,4 +32,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T3.js index daa1c2266b..151f98318e 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T3.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (string.charAt(k + 4) and - * string.charAt(k + 5)) or (string.charAt(k + 7) and - * string.charAt(k + 8)) or (string.charAt(k + 10) and - * string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.12_T3.js - * @description Complex tests, string.charAt(k + 10) and string.charAt(k + 11) - * do not represent hexadecimal digits - */ +/*--- +info: > + If B = 11110xxx (n = 4) and (string.charAt(k + 4) and + string.charAt(k + 5)) or (string.charAt(k + 7) and + string.charAt(k + 8)) or (string.charAt(k + 10) and + string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.12_T3 +description: > + Complex tests, string.charAt(k + 10) and string.charAt(k + 11) do + not represent hexadecimal digits +---*/ //CHECK result = true; @@ -31,4 +32,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 10) and string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T1.js index b3f0ed088f..751f1f2cef 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T1.js - * @description Complex tests. B = [0xC0 - 0xDF], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.13_T1 +description: Complex tests. B = [0xC0 - 0xDF], C = [0x00, 0x7F] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T2.js index 9f3158f679..226d598405 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.13_T2.js - * @description Complex tests. B = [0xC0 - 0xDF], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.13_T2 +description: Complex tests. B = [0xC0 - 0xDF], C = [0xC0, 0xFF] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T1.js index 72d11dd8aa..d30b3cf5b4 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T1.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.14_T1 +description: Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T2.js index d0b0d1ead3..9871a0413a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T2.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.14_T2 +description: Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T3.js index 66c09ebe87..55c371047a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T3.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.14_T3 +description: Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T4.js index 06fd0b7855..f5f2158f68 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.14_T4.js - * @description Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.14_T4 +description: Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T1.js index e3b3722cb0..8ed9dc82b9 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T1.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.15_T1 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T2.js index a40f698929..ad9bd8cc03 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T2.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.15_T2 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T3.js index 3c36c07ee0..3c9ddc8768 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T3.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.15_T3 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T4.js index c6943fa067..076c7e6617 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T4.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.15_T4 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T5.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T5.js index 5a1a8a9f16..d9b9d4e015 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T5.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T5.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.15_T5 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T6.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T6.js index 230bc010bc..049840ea8f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T6.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.15_T6.js - * @description Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] - */ +/*--- +info: > + If B = 11110xxx (n = 4) and C != 10xxxxxx (C - first of octets after B), + throw URIError +es5id: 15.1.3.2_A1.15_T6 +description: Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF] +---*/ errorCount = 0; count = 0; @@ -83,4 +84,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.1_T1.js index 1f6eb5851e..db898551f3 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) equal "%" and k + 2 >= string.length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.1_T1.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) equal "%" and k + 2 >= string.length, throw URIError +es5id: 15.1.3.2_A1.1_T1 +description: Complex tests +---*/ result = true; @@ -53,7 +52,3 @@ try { if (result !== true) { $ERROR('#1: If string.charAt(k) equal "%" and k + 2 >= string.length, throw URIError'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T1.js index 4348982ac8..53d5ddf68a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = string.charAt(k+1) + string.charAt(k+2) do not represent - * hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T1.js - * @description Complex tests - */ +/*--- +info: > + If B = string.charAt(k+1) + string.charAt(k+2) do not represent + hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.2_T1 +description: Complex tests +---*/ //CHECK result = true; @@ -28,4 +28,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If string.charAt(k+1) does not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T2.js index d71d3eff66..1601c7dae3 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = string.charAt(k+1) + string.charAt(k+2) do not represent - * hexadecimal digits, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.2_T2.js - * @description Complex tests - */ +/*--- +info: > + If B = string.charAt(k+1) + string.charAt(k+2) do not represent + hexadecimal digits, throw URIError +es5id: 15.1.3.2_A1.2_T2 +description: Complex tests +---*/ //CHECK result = true; @@ -28,4 +28,3 @@ for (indexI = 0; indexI < interval.length; indexI++) { if (result !== true) { $ERROR('#1: If string.charAt(k+2) does not represent hexadecimal digits, throw URIError'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T1.js index a6c192e679..edc1e58414 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 10xxxxxx or B = 11111xxx, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T1.js - * @description Complex tests. B = 10xxxxxx -> B in [0x80 - 0xBF] - */ +/*--- +info: If B = 10xxxxxx or B = 11111xxx, throw URIError +es5id: 15.1.3.2_A1.3_T1 +description: Complex tests. B = 10xxxxxx -> B in [0x80 - 0xBF] +---*/ errorCount = 0; count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T2.js index d76ba4ff90..0d4cd1d5fa 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 10xxxxxx or B = 11111xxx, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.3_T2.js - * @description Complex tests. B = 11111xxx -> B in [0xF8 - 0xFF] - */ +/*--- +info: If B = 10xxxxxx or B = 11111xxx, throw URIError +es5id: 15.1.3.2_A1.3_T2 +description: Complex tests. B = 11111xxx -> B in [0xF8 - 0xFF] +---*/ errorCount = 0; count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.4_T1.js index 43807fb328..94b23b6929 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and (k + 2) + 3 >= length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.4_T1.js - * @description Complex tests. B = [0xC0 - 0xDF] - */ +/*--- +info: If B = 110xxxxx (n = 2) and (k + 2) + 3 >= length, throw URIError +es5id: 15.1.3.2_A1.4_T1 +description: Complex tests. B = [0xC0 - 0xDF] +---*/ errorCount = 0; count = 0; @@ -84,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.5_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.5_T1.js index eb9e66c9f9..f5023dda34 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.5_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and (k + 2) + 6 >= length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.5_T1.js - * @description Complex tests. B = [0xE0 - 0xEF] - */ +/*--- +info: If B = 1110xxxx (n = 3) and (k + 2) + 6 >= length, throw URIError +es5id: 15.1.3.2_A1.5_T1 +description: Complex tests. B = [0xE0 - 0xEF] +---*/ errorCount = 0; count = 0; @@ -84,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.6_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.6_T1.js index 4fa82f01df..0154cea723 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.6_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and (k + 2) + 9 >= length, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.6_T1.js - * @description Complex tests. B = [0xF0 - 0xF7] - */ +/*--- +info: If B = 11110xxx (n = 4) and (k + 2) + 9 >= length, throw URIError +es5id: 15.1.3.2_A1.6_T1 +description: Complex tests. B = [0xF0 - 0xF7] +---*/ errorCount = 0; count = 0; @@ -84,4 +83,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.7_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.7_T1.js index 6bdc6474dd..dae5fba9a8 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.7_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.7_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 110xxxxx (n = 2) and string.charAt(k + 3) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.7_T1.js - * @description Complex tests. B = [0xC0 - 0xDF] - */ +/*--- +info: > + If B = 110xxxxx (n = 2) and string.charAt(k + 3) not equal "%", throw + URIError +es5id: 15.1.3.2_A1.7_T1 +description: Complex tests. B = [0xC0 - 0xDF] +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T1.js index 894e2c2036..fdc8ce9801 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and string.charAt(k + 3), - * string.charAt(k + 6) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T1.js - * @description Complex tests. B = [0xE0 - 0xEF], - * string.charAt(k + 3) not equal "%" - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and string.charAt(k + 3), + string.charAt(k + 6) not equal "%", throw URIError +es5id: 15.1.3.2_A1.8_T1 +description: > + Complex tests. B = [0xE0 - 0xEF], string.charAt(k + 3) not equal + "%" +---*/ errorCount = 0; count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T2.js index 25c00f8bf8..1e997861c4 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 1110xxxx (n = 3) and string.charAt(k + 3), - * string.charAt(k + 6) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.8_T2.js - * @description Complex tests. B = [0xE0 - 0xEF], - * string.charAt(k + 6) not equal "%" - */ +/*--- +info: > + If B = 1110xxxx (n = 3) and string.charAt(k + 3), + string.charAt(k + 6) not equal "%", throw URIError +es5id: 15.1.3.2_A1.8_T2 +description: > + Complex tests. B = [0xE0 - 0xEF], string.charAt(k + 6) not equal + "%" +---*/ errorCount = 0; count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T1.js index 6ca5accffe..4282492877 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and string.charAt(k + 3), - * string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T1.js - * @description Complex tests. B = [0xF0 - 0x0F7], - * string.charAt(k + 3) not equal "%" - */ +/*--- +info: > + If B = 11110xxx (n = 4) and string.charAt(k + 3), + string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError +es5id: 15.1.3.2_A1.9_T1 +description: > + Complex tests. B = [0xF0 - 0x0F7], string.charAt(k + 3) not equal + "%" +---*/ errorCount = 0; count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T2.js index 8e81de3e58..53fac33308 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and string.charAt(k + 3), - * string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T2.js - * @description Complex tests. B = [0xF0 - 0x0F7], - * string.charAt(k + 6) not equal "%" - */ +/*--- +info: > + If B = 11110xxx (n = 4) and string.charAt(k + 3), + string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError +es5id: 15.1.3.2_A1.9_T2 +description: > + Complex tests. B = [0xF0 - 0x0F7], string.charAt(k + 6) not equal + "%" +---*/ errorCount = 0; count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T3.js index 7904af5b19..705177c4e4 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B = 11110xxx (n = 4) and string.charAt(k + 3), - * string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A1.9_T3.js - * @description Complex tests. B = [0xF0 - 0x0F7], - * string.charAt(k + 9) not equal "%" - */ +/*--- +info: > + If B = 11110xxx (n = 4) and string.charAt(k + 3), + string.charAt(k + 6), string.charAt(k + 9) not equal "%", throw URIError +es5id: 15.1.3.2_A1.9_T3 +description: > + Complex tests. B = [0xF0 - 0x0F7], string.charAt(k + 9) not equal + "%" +---*/ errorCount = 0; count = 0; @@ -78,4 +79,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.1_T1.js index e2b5f31f8a..5271863d74 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) not equal "%", return this char - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.1_T1.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) not equal "%", return this char +es5id: 15.1.3.2_A2.1_T1 +description: Complex tests +---*/ //CHECK errorCount = 0; @@ -55,4 +54,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.2_T1.js index 8e7293f0b0..999cb5cf84 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.2_T1.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 0xxxxxxxx ([0x00 - 0x7F]), return B1 - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.2_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: If B1 = 0xxxxxxxx ([0x00 - 0x7F]), return B1 +es5id: 15.1.3.2_A2.2_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ errorCount = 0; count = 0; @@ -18,8 +18,8 @@ for (indexB1 = 0x00; indexB1 <= 0x7F; indexB1++) { var index = indexB1; try { hex = String.fromCharCode(index); - if (decodeURIComponent("%" + hexB1.substring(2)) === hex) continue; - } catch (e) { + if (decodeURIComponent("%" + hexB1.substring(2)) === hex) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -77,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.3_T1.js index b42a9eab60..ce63b88639 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.3_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 110xxxxx ([0xC0 - 0xDF]), B2 = 10xxxxxx ([0x80 - 0xBF), without B1 = [0xC0, 0xC1], return UTF8(B1, B2) - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.3_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If B1 = 110xxxxx ([0xC0 - 0xDF]), B2 = 10xxxxxx ([0x80 - 0xBF), without + B1 = [0xC0, 0xC1], return UTF8(B1, B2) +es5id: 15.1.3.2_A2.3_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ errorCount = 0; count = 0; @@ -20,8 +22,8 @@ for (indexB1 = 0xC2; indexB1 <= 0xDF; indexB1++) { var hexB2 = decimalToHexString(indexB2); var index = (indexB1 & 0x1F) * 0x40 + (indexB2 & 0x3F); try { - if (decodeURIComponent("%" + hexB1.substring(2) + "%" + hexB2.substring(2)) === String.fromCharCode(index)) continue; - } catch (e) { + if (decodeURIComponent("%" + hexB1.substring(2) + "%" + hexB2.substring(2)) === String.fromCharCode(index)) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -80,4 +82,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.4_T1.js index 6ca3dcf742..076d3a93fe 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.4_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 1110xxxx ([0xE0 - 0xEF]), B2, B3 = 10xxxxxxx ([0x80 - 0xBF]), without [B1, B2] = [0xE0, 0x80 - 0x9F], [0xED, 0xA0 - 0xBF] (0xD800 - 0xDFFF), return UTF8(B1, B2, B3) - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.4_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If B1 = 1110xxxx ([0xE0 - 0xEF]), B2, B3 = 10xxxxxxx ([0x80 - 0xBF]), + without [B1, B2] = [0xE0, 0x80 - 0x9F], [0xED, 0xA0 - 0xBF] (0xD800 - + 0xDFFF), return UTF8(B1, B2, B3) +es5id: 15.1.3.2_A2.4_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ errorCount = 0; count = 0; @@ -24,8 +27,8 @@ for (indexB1 = 0xE0; indexB1 <= 0xEF; indexB1++) { var hexB3 = decimalToHexString(indexB3); var index = (indexB1 & 0x0F) * 0x1000 + (indexB2 & 0x3F) * 0x40 + (indexB3 & 0x3F); try { - if (decodeURIComponent("%" + hexB1.substring(2) + "%" + hexB2.substring(2) + "%" + hexB3.substring(2)) === String.fromCharCode(index)) continue; - } catch (e) { + if (decodeURIComponent("%" + hexB1.substring(2) + "%" + hexB2.substring(2) + "%" + hexB3.substring(2)) === String.fromCharCode(index)) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -85,4 +88,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.5_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.5_T1.js index 49f4a6c815..9a5acf242d 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.5_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.5_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If B1 = 11110xxx ([0xF0 - 0x0F4]), B2, B3, B4 = 10xxxxxxx ([0x80 - 0xBF]), without [B1, B2] = [0xF0, 0x80 - 0x9F], [0xF4, 0x90 - 0xBF], return UTF8(B1, B2, B3, B4) - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A2.5_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If B1 = 11110xxx ([0xF0 - 0x0F4]), B2, B3, B4 = 10xxxxxxx ([0x80 - + 0xBF]), without [B1, B2] = [0xF0, 0x80 - 0x9F], [0xF4, 0x90 - 0xBF], + return UTF8(B1, B2, B3, B4) +es5id: 15.1.3.2_A2.5_T1 +description: Complex tests, use RFC 3629 +includes: [Test262Error.js] +---*/ errorCount = 0; count = 0; @@ -28,8 +31,8 @@ for (indexB1 = 0xF0; indexB1 <= 0xF4; indexB1++) { var L = ((index - 0x10000) & 0x03FF) + 0xDC00; var H = (((index - 0x10000) >> 10) & 0x03FF) + 0xD800; try { - if (decodeURIComponent("%" + hexB1.substring(3) + "%" + hexB2.substring(3) + "%" + hexB3.substring(3) + "%" + hexB4.substring(3)) === String.fromCharCode(H) + String.fromCharCode(L)) continue; - } catch (e) { + if (decodeURIComponent("%" + hexB1.substring(3) + "%" + hexB2.substring(3) + "%" + hexB3.substring(3) + "%" + hexB4.substring(3)) === String.fromCharCode(H) + String.fromCharCode(L)) continue; + } catch (e) { if (e instanceof Test262Error) throw e; } if (indexO === 0) { @@ -90,4 +93,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T1.js index d0650ae6ff..7f7cf3201e 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let reservedURIComponentSet be the empty string - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T1.js - * @description uriReserved and "#" not in reservedURIComponentSet. HexDigit in [0..9, A..F] - */ +/*--- +info: Let reservedURIComponentSet be the empty string +es5id: 15.1.3.2_A3_T1 +description: > + uriReserved and "#" not in reservedURIComponentSet. HexDigit in + [0..9, A..F] +---*/ //CHECK#1 if (decodeURIComponent("%3B") !== ";") { @@ -62,4 +63,3 @@ if (decodeURIComponent("%2C") !== ",") { if (decodeURIComponent("%23") !== "#") { $ERROR('#11: decodeURIComponent("%23") equal "#", not "%23"'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T2.js index 7afc7ffefa..94321d5291 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let reservedURIComponentSet be the empty string - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T2.js - * @description uriReserved and "#" not in reservedURIComponentSet. HexDigit in [0..9, a..f] - */ +/*--- +info: Let reservedURIComponentSet be the empty string +es5id: 15.1.3.2_A3_T2 +description: > + uriReserved and "#" not in reservedURIComponentSet. HexDigit in + [0..9, a..f] +---*/ //CHECK#1 if (decodeURIComponent("%3b") !== ";") { @@ -62,4 +63,3 @@ if (decodeURIComponent("%2c") !== ",") { if (decodeURIComponent("%23") !== "#") { $ERROR('#11: decodeURIComponent("%23") equal "#", not "%23"'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T3.js index ec0017497c..16477c5446 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let reservedURIComponentSet be the empty string - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A3_T3.js - * @description Complex test - */ +/*--- +info: Let reservedURIComponentSet be the empty string +es5id: 15.1.3.2_A3_T3 +description: Complex test +---*/ //CHECK#1 if (decodeURIComponent("%3B%2F%3F%3A%40%26%3D%2B%24%2C%23") !== ";/?:@&=+$,#") { @@ -17,4 +16,3 @@ if (decodeURIComponent("%3B%2F%3F%3A%40%26%3D%2B%24%2C%23") !== ";/?:@&=+$,#") { if (decodeURIComponent("%3b%2f%3f%3a%40%26%3d%2b%24%2c%23") !== ";/?:@&=+$,#") { $ERROR('#2: decodeURIComponent("%3b%2f%3f%3a%40%26%3d%2b%24%2c%23") equal ";/?:@&=+$,#" or "%3B%2F%3F%3A%40%26%3D%2B%24%2C%23", not "%3b%2f%3f%3a%40%26%3d%2b%24%2c%23"'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T1.js index 5ac99a2189..92a4051a8f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T1.js - * @description Checking ENGLISH ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.2_A4_T1 +description: Checking ENGLISH ALPHABET +---*/ //CHECK#1 if (decodeURIComponent("http://unipro.ru/0123456789") !== "http://unipro.ru/0123456789") { @@ -22,4 +21,3 @@ if (decodeURIComponent("%41%42%43%44%45%46%47%48%49%4A%4B%4C%4D%4E%4F%50%51%52%5 if (decodeURIComponent("%61%62%63%64%65%66%67%68%69%6A%6B%6C%6D%6E%6F%70%71%72%73%74%75%76%77%78%79%7A") !== "abcdefghijklmnopqrstuvwxyz") { $ERROR('#3: abcdefghijklmnopqrstuvwxyz'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T2.js index 369ad2bebc..f36889c1c6 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T2.js - * @description Checking RUSSIAN ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.2_A4_T2 +description: Checking RUSSIAN ALPHABET +---*/ //CHECK#1 if (decodeURIComponent("http://ru.wikipedia.org/wiki/%d0%ae%D0%bd%D0%B8%D0%BA%D0%BE%D0%B4") !== "http://ru.wikipedia.org/wiki/Юникод") { @@ -22,4 +21,3 @@ if (decodeURIComponent("http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0 if (decodeURIComponent("http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0") !== "http://ru.wikipedia.org/wiki/Юникод#Версии Юникода") { $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T3.js index 70498e119b..8e01d7049b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T3.js - * @description Checking URL with Line Terminator - */ +/*--- +info: URI tests +es5id: 15.1.3.2_A4_T3 +description: Checking URL with Line Terminator +---*/ //CHECK#1 if (decodeURIComponent("http://unipro.ru/%0Aabout") !== "http://unipro.ru/\nabout") { @@ -27,4 +26,3 @@ if (decodeURIComponent("http://unipro.ru/%0Cabout") !== "http://unipro.ru/\fabou if (decodeURIComponent("http://unipro.ru/%0Dabout") !== "http://unipro.ru/\rabout") { $ERROR('#4: http://unipro.ru/%0Dabout'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T4.js index 913036529c..1981622c96 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A4_T4.js - * @description Test some url - */ +/*--- +info: URI tests +es5id: 15.1.3.2_A4_T4 +description: Test some url +---*/ //CHECK#1 if (decodeURIComponent("") !== "") { @@ -27,4 +26,3 @@ if (decodeURIComponent("http:%2f%2Fwww.google.ru/support/jobs/bin/static.py%3Fpa if (decodeURIComponent("http:%2F%2Fen.wikipedia.org/wiki/UTF-8%23Description") !== "http://en.wikipedia.org/wiki/UTF-8#Description") { $ERROR('#4: http:%2F%2Fen.wikipedia.org/wiki/UTF-8%23Description'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.1.js index d698937778..b1080d82d7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURIComponent has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of decodeURIComponent has the attribute DontEnum +es5id: 15.1.3.2_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (decodeURIComponent.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in decodeURIComponent){ if (result !== true) { $ERROR('#2: result = true; for (p in decodeURIComponent) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js index 4f38892d1f..f048e015ed 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURIComponent has the attribute DontDelete - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of decodeURIComponent has the attribute DontDelete +es5id: 15.1.3.2_A5.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (decodeURIComponent.hasOwnProperty('length') !== true) { @@ -24,7 +24,3 @@ if (decodeURIComponent.hasOwnProperty('length') !== true) { if (decodeURIComponent.length === undefined) { $ERROR('#3: delete decodeURIComponent.length; decodeURIComponent.length !== undefined'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.3.js index 67b689a966..35ad49f824 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURIComponent has the attribute ReadOnly - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.3.js - * @description Checking if varying the length property fails - */ +/*--- +info: The length property of decodeURIComponent has the attribute ReadOnly +es5id: 15.1.3.2_A5.3 +description: Checking if varying the length property fails +---*/ //CHECK#1 x = decodeURIComponent.length; @@ -14,5 +13,3 @@ decodeURIComponent.length = Infinity; if (decodeURIComponent.length !== x) { $ERROR('#1: x = decodeURIComponent.length; decodeURIComponent.length = Infinity; decodeURIComponent.length === x. Actual: ' + (decodeURIComponent.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.4.js index 8cb62227ce..f1783b7eed 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of decodeURIComponent is 1 - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.4.js - * @description decodeURIComponent.length === 1 - */ +/*--- +info: The length property of decodeURIComponent is 1 +es5id: 15.1.3.2_A5.4 +description: decodeURIComponent.length === 1 +---*/ //CHECK#1 if (decodeURIComponent.length !== 1) { $ERROR('#1: decodeURIComponent.length === 1. Actual: ' + (decodeURIComponent.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.5.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.5.js index f8ae598e85..9daebefe7b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.5.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The decodeURIComponent property has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The decodeURIComponent property has the attribute DontEnum +es5id: 15.1.3.2_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('decodeURIComponent') !== false) { @@ -24,4 +23,3 @@ for (p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "decodeURIComponent") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.6.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.6.js index f5c9a36977..3ee72a6cdd 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.6.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The decodeURIComponent property has not prototype property - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.6.js - * @description Checking decodeURIComponent.prototype - */ +/*--- +info: The decodeURIComponent property has not prototype property +es5id: 15.1.3.2_A5.6 +description: Checking decodeURIComponent.prototype +---*/ //CHECK#1 if (decodeURIComponent.prototype !== undefined) { $ERROR('#1: decodeURIComponent.prototype === undefined. Actual: ' + (decodeURIComponent.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.7.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.7.js index 6078f8a505..79349059d7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.7.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The decodeURIComponent property can't be used as constructor - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The decodeURIComponent property can't be used as constructor +es5id: 15.1.3.2_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new decodeURIComponent() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A6_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A6_T1.js index 0919bc526d..a4371e54fc 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A6_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A6_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator use ToString +es5id: 15.1.3.2_A6_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return "%5E"}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; decodeURIComponent(object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T1.js index af8b2324b4..38133ffd39 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T1.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError +es5id: 15.1.3.3_A1.1_T1 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T2.js index 44409b2152..c890d30843 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.1_T2.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError +es5id: 15.1.3.3_A1.1_T2 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T1.js index 3bede687f2..82477655d1 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T1.js - * @description Complex tests - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw + URIError +es5id: 15.1.3.3_A1.2_T1 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T2.js index 3fd55dd3e1..14f08323b0 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.2_T2.js - * @description Complex tests - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw + URIError +es5id: 15.1.3.3_A1.2_T2 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.3_T1.js index bddb360d30..dd9be428fb 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.3_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) not in [0xDC00 - 0xDFFF], throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A1.3_T1.js - * @description Complex tests, string.charAt(k+1) in [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF] - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) not in + [0xDC00 - 0xDFFF], throw URIError +es5id: 15.1.3.3_A1.3_T1 +description: > + Complex tests, string.charAt(k+1) in [0x0000, 0xD7FF, 0xD800, + 0xDBFE, 0xDBFF, 0xE000, 0xFFFF] +---*/ chars = [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF]; errorCount = 0; @@ -83,4 +86,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.1_T1.js index 756d1be4db..d4a31a2141 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0x0000 - 0x007F]\[uriReserved, uriUnescaped, #], return 1 octet (00000000 0zzzzzzz -> 0zzzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.1_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0x0000 - 0x007F]\[uriReserved, uriUnescaped, #], + return 1 octet (00000000 0zzzzzzz -> 0zzzzzzz) +es5id: 15.1.3.3_A2.1_T1 +description: Complex tests, use RFC 3629 +---*/ uriReserved = [";", "/", "?", ":", "@", "&", "=", "+", "$", ","]; uriUnescaped = ["-", "_", ".", "!", "~", "*", "'", "(", ")", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; @@ -84,4 +85,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.2_T1.js index e303747f9a..d0992ac707 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0x0080 - 0x07FF], return 2 octets (00000yyy yyzzzzzz -> 110yyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.2_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0x0080 - 0x07FF], return 2 octets (00000yyy + yyzzzzzz -> 110yyyyy 10zzzzzz) +es5id: 15.1.3.3_A2.2_T1 +description: Complex tests, use RFC 3629 +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.3_T1.js index a09d045186..3132be8219 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0x0800 - 0xD7FF], return 3 octets (xxxxyyyy yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.3_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0x0800 - 0xD7FF], return 3 octets (xxxxyyyy + yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.3_A2.3_T1 +description: Complex tests, use RFC 3629 +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T1.js index caf5715020..c76b18eeb7 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> 11110www 10xxxxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T1.js - * @description Complex tests, use RFC 3629, string.charAt(k+1) in [0xDC00, 0xDDFF, 0xDFFF] - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in + [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> + 11110www 10xxxxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.3_A2.4_T1 +description: > + Complex tests, use RFC 3629, string.charAt(k+1) in [0xDC00, + 0xDDFF, 0xDFFF] +---*/ chars = [0xDC00, 0xDDFF, 0xDFFF]; errorCount = 0; @@ -86,4 +90,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T2.js index b5203cfbda..9de1a5639e 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> 11110www 10xxxxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.4_T2.js - * @description Complex tests, use RFC 3629, string.charAt(k) in [0xD800, 0xDBFF, 0xD9FF] - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in + [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> + 11110www 10xxxxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.3_A2.4_T2 +description: > + Complex tests, use RFC 3629, string.charAt(k) in [0xD800, 0xDBFF, + 0xD9FF] +---*/ chars = [0xD800, 0xDBFF, 0xD9FF]; errorCount = 0; @@ -86,4 +90,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.5_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.5_T1.js index 1fa4ebe3ca..4e19c58bb8 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.5_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xE000 - 0xFFFF], return 3 octets (xxxxyyyy yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A2.5_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0xE000 - 0xFFFF], return 3 octets (xxxxyyyy + yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.3_A2.5_T1 +description: Complex tests, use RFC 3629 +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.1_T1.js index 9ad30c0504..99ab41feaa 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURISet containing one instance of each character valid in uriReserved - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.1_T1.js - * @description Complex tests - */ +/*--- +info: > + unescapedURISet containing one instance of each character valid in + uriReserved +es5id: 15.1.3.3_A3.1_T1 +description: Complex tests +---*/ uriReserved = [";", "/", "?", ":", "@", "&", "=", "+", "$", ","]; for (indexC = 0; indexC < uriReserved.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < uriReserved.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T1.js index 10c22e0123..37ffc8c9ab 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURISet containing one instance of each character valid in uriUnescaped - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T1.js - * @description Complex tests, uriUnescaped :: uriAlpha - */ +/*--- +info: > + unescapedURISet containing one instance of each character valid in + uriUnescaped +es5id: 15.1.3.3_A3.2_T1 +description: "Complex tests, uriUnescaped :: uriAlpha" +---*/ uriAlpha = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; for (indexC = 0; indexC < uriAlpha.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < uriAlpha.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing ' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T2.js index a89aed7fba..f992feb638 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURISet containing one instance of each character valid in uriUnescaped - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T2.js - * @description Complex tests, uriUnescaped :: DecimalDigit - */ +/*--- +info: > + unescapedURISet containing one instance of each character valid in + uriUnescaped +es5id: 15.1.3.3_A3.2_T2 +description: "Complex tests, uriUnescaped :: DecimalDigit" +---*/ DecimalDigit = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; for (indexC = 0; indexC < DecimalDigit.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < DecimalDigit.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T3.js index a7c370ac1d..cb20b4549b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURISet containing one instance of each character valid in uriUnescaped - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.2_T3.js - * @description Complex tests, uriUnescaped :: uriMark - */ +/*--- +info: > + unescapedURISet containing one instance of each character valid in + uriUnescaped +es5id: 15.1.3.3_A3.2_T3 +description: "Complex tests, uriUnescaped :: uriMark" +---*/ uriMark = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; for (indexC = 0; indexC < uriMark.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < uriMark.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.3_T1.js index 37cda639f0..3ca1aeb0c0 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.3_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURISet containing "#" - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A3.3_T1.js - * @description encodeURI("#") === "#" - */ +/*--- +info: unescapedURISet containing "#" +es5id: 15.1.3.3_A3.3_T1 +description: encodeURI("#") === "#" +---*/ if (encodeURI("#") !== "#") { $ERROR('#1: unescapedURISet containing "#"'); -} - +} diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T1.js index c14c2a303e..8d7d500e7d 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T1.js - * @description Checking ENGLISH ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.3_A4_T1 +description: Checking ENGLISH ALPHABET +---*/ //CHECK#1 if (encodeURI("http://unipro.ru/0123456789") !== "http://unipro.ru/0123456789") { @@ -22,4 +21,3 @@ if (encodeURI("aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ") !== "aAbBc if (encodeURI("aA_bB-cC.dD!eE~fF*gG'hH(iI)jJ;kK/lL?mM:nN@oO&pP=qQ+rR$sS,tT9uU8vV7wW6xX5yY4zZ") !== "aA_bB-cC.dD!eE~fF*gG'hH(iI)jJ;kK/lL?mM:nN@oO&pP=qQ+rR$sS,tT9uU8vV7wW6xX5yY4zZ") { $ERROR('#3: '); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T2.js index ef5696f25e..04ebe87df0 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T2.js - * @description Checking RUSSIAN ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.3_A4_T2 +description: Checking RUSSIAN ALPHABET +---*/ //CHECK#1 if ((encodeURI("http://ru.wikipedia.org/wiki/Юникод") !== "http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4") && (encodeURI("http://ru.wikipedia.org/wiki/Юникод") !== "http://ru.wikipedia.org/wiki/" + "%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4".toLowerCase())) { @@ -22,4 +21,3 @@ if ((encodeURI("http://ru.wikipedia.org/wiki/Юникод#Ссылки") !== "ht if ((encodeURI("http://ru.wikipedia.org/wiki/Юникод#Версии Юникода") !== "http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0") && ((encodeURI("http://ru.wikipedia.org/wiki/Юникод#Версии Юникода") !== "http://ru.wikipedia.org/wiki/" + "%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0".toLowerCase()))) { $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод#Версии Юникода'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T3.js index 606df82f24..0f03bede9a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T3.js - * @description Checking URL with Line Terminator - */ +/*--- +info: URI tests +es5id: 15.1.3.3_A4_T3 +description: Checking URL with Line Terminator +---*/ //CHECK#1 if ((encodeURI("http://unipro.ru/\nabout") !== "http://unipro.ru/%0Aabout") && encodeURI("http://unipro.ru/\nabout") !== "http://unipro.ru/%0aabout") { @@ -27,4 +26,3 @@ if ((encodeURI("http://unipro.ru/\fabout") !== "http://unipro.ru/%0Cabout") && e if ((encodeURI("http://unipro.ru/\rabout") !== "http://unipro.ru/%0Dabout") && encodeURI("http://unipro.ru/\rabout") !== "http://unipro.ru/%0dabout") { $ERROR('#4: http://unipro.ru/\\rabout'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T4.js index bafaa396bb..045bc61e93 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A4_T4.js - * @description Test some url - */ +/*--- +info: URI tests +es5id: 15.1.3.3_A4_T4 +description: Test some url +---*/ //CHECK#1 if (encodeURI("") !== "") { @@ -27,4 +26,3 @@ if (encodeURI("http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html& if (encodeURI("http://en.wikipedia.org/wiki/UTF-8#Description") !== "http://en.wikipedia.org/wiki/UTF-8#Description") { $ERROR('#4: http://en.wikipedia.org/wiki/UTF-8#Description'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.1.js index f089aac019..fa18ced231 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURI has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of encodeURI has the attribute DontEnum +es5id: 15.1.3.3_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (encodeURI.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in encodeURI){ if (result !== true) { $ERROR('#2: result = true; for (p in encodeURI) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.2.js index ffbe0f37fd..7b451e8679 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURI has the attribute DontDelete - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of encodeURI has the attribute DontDelete +es5id: 15.1.3.3_A5.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (encodeURI.hasOwnProperty('length') !== true) { @@ -24,7 +24,3 @@ if (encodeURI.hasOwnProperty('length') !== true) { if (encodeURI.length === undefined) { $ERROR('#3: delete encodeURI.length; encodeURI.length !== undefined'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.3.js index 4aa01aaa4d..df99eece77 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURI has the attribute ReadOnly - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.3.js - * @description Checking if varying the length property fails - */ +/*--- +info: The length property of encodeURI has the attribute ReadOnly +es5id: 15.1.3.3_A5.3 +description: Checking if varying the length property fails +---*/ //CHECK#1 x = encodeURI.length; @@ -14,5 +13,3 @@ encodeURI.length = Infinity; if (encodeURI.length !== x) { $ERROR('#1: x = encodeURI.length; encodeURI.length = Infinity; encodeURI.length === x. Actual: ' + (encodeURI.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.4.js index 3a016ebf20..b64dfc3666 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURI is 1 - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.4.js - * @description encodeURI.length === 1 - */ +/*--- +info: The length property of encodeURI is 1 +es5id: 15.1.3.3_A5.4 +description: encodeURI.length === 1 +---*/ //CHECK#1 if (encodeURI.length !== 1) { $ERROR('#1: encodeURI.length === 1. Actual: ' + (encodeURI.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.5.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.5.js index 0bc0cf4d5d..702e9e12d3 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.5.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The encodeURI property has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The encodeURI property has the attribute DontEnum +es5id: 15.1.3.3_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('encodeURI') !== false) { @@ -24,4 +23,3 @@ for (p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "encodeURI") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.6.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.6.js index a7f5f28001..bce835cb29 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.6.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The encodeURI property has not prototype property - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.6.js - * @description Checking encodeURI.prototype - */ +/*--- +info: The encodeURI property has not prototype property +es5id: 15.1.3.3_A5.6 +description: Checking encodeURI.prototype +---*/ //CHECK#1 if (encodeURI.prototype !== undefined) { $ERROR('#1: encodeURI.prototype === undefined. Actual: ' + (encodeURI.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.7.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.7.js index 3509f476f5..1081f5b5f9 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.7.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The encodeURI property can't be used as constructor - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The encodeURI property can't be used as constructor +es5id: 15.1.3.3_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new encodeURI() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A6_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A6_T1.js index 1293d4df40..bf6c1942b1 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A6_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A6_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator use ToString +es5id: 15.1.3.3_A6_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return "^"}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURI(object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T1.js index 796172808f..df60d5e73f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T1.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError +es5id: 15.1.3.4_A1.1_T1 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T2.js index e2e3deed94..08d7bb5fcd 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.1_T2.js - * @description Complex tests - */ +/*--- +info: If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError +es5id: 15.1.3.4_A1.1_T2 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +75,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T1.js index 91271fa2c2..65ce6481ec 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T1.js - * @description Complex tests - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw + URIError +es5id: 15.1.3.4_A1.2_T1 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T2.js index 5f363bccaa..68d23f237b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.2_T2.js - * @description Complex tests - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.length = k + 1, throw + URIError +es5id: 15.1.3.4_A1.2_T2 +description: Complex tests +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.3_T1.js index 0a929379dc..1daa2aca5b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.3_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) not in [0xDC00 - 0xDFFF], throw URIError - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A1.3_T1.js - * @description Complex tests, string.charAt(k+1) in [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF] - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) not in + [0xDC00 - 0xDFFF], throw URIError +es5id: 15.1.3.4_A1.3_T1 +description: > + Complex tests, string.charAt(k+1) in [0x0000, 0xD7FF, 0xD800, + 0xDBFE, 0xDBFF, 0xE000, 0xFFFF] +---*/ chars = [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF]; errorCount = 0; @@ -83,4 +86,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.1_T1.js index 1920dd5f98..7bfd5d02a9 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0x0000 - 0x007F]\[uriUnescaped], return 1 octet (00000000 0zzzzzzz -> 0zzzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.1_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0x0000 - 0x007F]\[uriUnescaped], return 1 octet + (00000000 0zzzzzzz -> 0zzzzzzz) +es5id: 15.1.3.4_A2.1_T1 +description: Complex tests, use RFC 3629 +---*/ uriUnescaped = ["-", "_", ".", "!", "~", "*", "'", "(", ")", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; errorCount = 0; @@ -79,4 +80,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.2_T1.js index ea19909ea0..cfe740649a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0x0080 - 0x07FF], return 2 octets (00000yyy yyzzzzzz -> 110yyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.2_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0x0080 - 0x07FF], return 2 octets (00000yyy + yyzzzzzz -> 110yyyyy 10zzzzzz) +es5id: 15.1.3.4_A2.2_T1 +description: Complex tests, use RFC 3629 +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.3_T1.js index b8fa4b3eac..c4779335dc 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0x0800 - 0xD7FF], return 3 octets (xxxxyyyy yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.3_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0x0800 - 0xD7FF], return 3 octets (xxxxyyyy + yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.4_A2.3_T1 +description: Complex tests, use RFC 3629 +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T1.js index 418d227a34..e846a5fc79 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> 11110www 10xxxxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T1.js - * @description Complex tests, use RFC 3629, string.charAt(k+1) in [0xDC00, 0xDDFF, 0xDFFF] - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in + [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> + 11110www 10xxxxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.4_A2.4_T1 +description: > + Complex tests, use RFC 3629, string.charAt(k+1) in [0xDC00, + 0xDDFF, 0xDFFF] +---*/ chars = [0xDC00, 0xDDFF, 0xDFFF]; errorCount = 0; @@ -86,4 +90,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T2.js index 672437cec3..88e7214b38 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> 11110www 10xxxxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.4_T2.js - * @description Complex tests, use RFC 3629, string.charAt(k) in [0xD800, 0xDBFF, 0xD9FF] - */ +/*--- +info: > + If string.charAt(k) in [0xD800 - 0xDBFF] and string.charAt(k+1) in + [0xDC00 � 0xDFFF], return 4 octets (000wwwxx xxxxyyyy yyzzzzzz -> + 11110www 10xxxxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.4_A2.4_T2 +description: > + Complex tests, use RFC 3629, string.charAt(k) in [0xD800, 0xDBFF, + 0xD9FF] +---*/ chars = [0xD800, 0xDBFF, 0xD9FF]; errorCount = 0; @@ -86,4 +90,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.5_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.5_T1.js index 7a616a2ea2..5a2a00cf7b 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.5_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If string.charAt(k) in [0xE000 - 0xFFFF], return 3 octets (xxxxyyyy yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A2.5_T1.js - * @description Complex tests, use RFC 3629 - */ +/*--- +info: > + If string.charAt(k) in [0xE000 - 0xFFFF], return 3 octets (xxxxyyyy + yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz) +es5id: 15.1.3.4_A2.5_T1 +description: Complex tests, use RFC 3629 +---*/ errorCount = 0; count = 0; @@ -76,4 +77,3 @@ function decimalToHexString(n) { } return h; } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.1_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.1_T1.js index c6fbba03ad..27f275735a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.1_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURIComponentSet not containing uriReserved - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.1_T1.js - * @description Complex tests - */ +/*--- +info: unescapedURIComponentSet not containing uriReserved +es5id: 15.1.3.4_A3.1_T1 +description: Complex tests +---*/ uriReserved = ["%3B", "%2F", "%3F", "%3A", "%40", "%26", "%3D", "%2B", "%24", "%2C"]; uriReserved_ = [";", "/", "?", ":", "@", "&", "=", "+", "$", ","]; @@ -16,4 +15,3 @@ for (indexC = 0; indexC < 10; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURIComponentSet not containing' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T1.js index 5b9771bbe3..8eccff64ce 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURIComponentSet containing one instance of each character valid in uriUnescaped - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T1.js - * @description Complex tests, uriUnescaped :: uriAlpha - */ +/*--- +info: > + unescapedURIComponentSet containing one instance of each character valid + in uriUnescaped +es5id: 15.1.3.4_A3.2_T1 +description: "Complex tests, uriUnescaped :: uriAlpha" +---*/ uriAlpha = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; for (indexC = 0; indexC < uriAlpha.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < uriAlpha.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing ' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T2.js index 7181c2229a..1ab067d67f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURIComponentSet containing one instance of each character valid in uriUnescaped - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T2.js - * @description Complex tests, uriUnescaped :: DecimalDigit - */ +/*--- +info: > + unescapedURIComponentSet containing one instance of each character valid + in uriUnescaped +es5id: 15.1.3.4_A3.2_T2 +description: "Complex tests, uriUnescaped :: DecimalDigit" +---*/ DecimalDigit = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; for (indexC = 0; indexC < DecimalDigit.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < DecimalDigit.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T3.js index 627812016f..09496ce59f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURIComponentSet containing one instance of each character valid in uriUnescaped - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.2_T3.js - * @description Complex tests, uriUnescaped :: uriMark - */ +/*--- +info: > + unescapedURIComponentSet containing one instance of each character valid + in uriUnescaped +es5id: 15.1.3.4_A3.2_T3 +description: "Complex tests, uriUnescaped :: uriMark" +---*/ uriMark = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; for (indexC = 0; indexC < uriMark.length; indexC++) { @@ -15,4 +16,3 @@ for (indexC = 0; indexC < uriMark.length; indexC++) { $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.3_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.3_T1.js index 77511d2625..3d6b22e579 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.3_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.3_T1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * unescapedURIComponentSet not containing "#" - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A3.3_T1.js - * @description encodeURIComponent("#") === "%23" - */ +/*--- +info: unescapedURIComponentSet not containing "#" +es5id: 15.1.3.4_A3.3_T1 +description: encodeURIComponent("#") === "%23" +---*/ if (encodeURIComponent("#") !== "%23") { $ERROR('#1: unescapedURIComponentSet not containing "%23"'); -} - +} diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T1.js index 84e7e5b240..f3cbfce8e2 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T1.js - * @description Checking ENGLISH ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.4_A4_T1 +description: Checking ENGLISH ALPHABET +---*/ //CHECK#1 if (encodeURIComponent("http://unipro.ru/0123456789") !== "http%3A%2F%2Funipro.ru%2F0123456789") { @@ -22,4 +21,3 @@ if (encodeURIComponent("aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ") ! if (encodeURIComponent(";/?:@&=+$,") !== "%3B%2F%3F%3A%40%26%3D%2B%24%2C") { $ERROR('#3: '); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T2.js index 10c6e40b7f..3bffeb59d8 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T2.js - * @description Checking RUSSIAN ALPHABET - */ +/*--- +info: URI tests +es5id: 15.1.3.4_A4_T2 +description: Checking RUSSIAN ALPHABET +---*/ //CHECK#1 if ((encodeURIComponent("http://ru.wikipedia.org/wiki/Юникод") !== "http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4") && (encodeURIComponent("http://ru.wikipedia.org/wiki/Юникод") !== "http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F" + "%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4".toLowerCase())) { @@ -22,4 +21,3 @@ if ((encodeURIComponent("http://ru.wikipedia.org/wiki/Юникод#Ссылки" if ((encodeURIComponent("http://ru.wikipedia.org/wiki/Юникод#Версии Юникода") !== "http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0") && ((encodeURIComponent("http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода") !== "http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F" + "%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0".toLowerCase()))) { $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод#Версии Юникода'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T3.js index b89db588e0..4527d3e46a 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T3.js - * @description Checking URL with Line Terminator - */ +/*--- +info: URI tests +es5id: 15.1.3.4_A4_T3 +description: Checking URL with Line Terminator +---*/ //CHECK#1 if ((encodeURIComponent("http://unipro.ru/\nabout") !== "http%3A%2F%2Funipro.ru%2F%0Aabout") && encodeURIComponent("http://unipro.ru/\nabout") !== "http%3A%2F%2Funipro.ru%2F%0aabout") { @@ -27,4 +26,3 @@ if ((encodeURIComponent("http://unipro.ru/\fabout") !== "http%3A%2F%2Funipro.ru% if ((encodeURIComponent("http://unipro.ru/\rabout") !== "http%3A%2F%2Funipro.ru%2F%0Dabout") && encodeURIComponent("http://unipro.ru/\rabout") !== "http%3A%2F%2Funipro.ru%2F%0dabout") { $ERROR('#4: http://unipro.ru/\\rabout'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T4.js index 3cbb216833..4eac7a4b41 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * URI tests - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A4_T4.js - * @description Test some url - */ +/*--- +info: URI tests +es5id: 15.1.3.4_A4_T4 +description: Test some url +---*/ //CHECK#1 if (encodeURIComponent("") !== "") { @@ -27,4 +26,3 @@ if (encodeURIComponent("http://www.google.ru/support/jobs/bin/static.py?page=why if (encodeURIComponent("http://en.wikipedia.org/wiki/UTF-8#Description") !== "http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUTF-8%23Description") { $ERROR('#4: http://en.wikipedia.org/wiki/UTF-8#Description'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.1.js index 91efcb2bbb..d215a83cae 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURIComponent has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of encodeURIComponent has the attribute DontEnum +es5id: 15.1.3.4_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (encodeURIComponent.propertyIsEnumerable('length') !== false) { @@ -24,4 +23,3 @@ for (p in encodeURIComponent){ if (result !== true) { $ERROR('#2: result = true; for (p in encodeURIComponent) { if (p === "length") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.2.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.2.js index e90231832e..cb303eff7d 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.2.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURIComponent has the attribute DontDelete - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of encodeURIComponent has the attribute DontDelete +es5id: 15.1.3.4_A5.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (encodeURIComponent.hasOwnProperty('length') !== true) { @@ -24,7 +24,3 @@ if (encodeURIComponent.hasOwnProperty('length') !== true) { if (encodeURIComponent.length === undefined) { $ERROR('#3: delete encodeURIComponent.length; encodeURIComponent.length !== undefined'); } - - - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.3.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.3.js index be17a57f99..a81b11d493 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.3.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURIComponent has the attribute ReadOnly - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.3.js - * @description Checking if varying the length property fails - */ +/*--- +info: The length property of encodeURIComponent has the attribute ReadOnly +es5id: 15.1.3.4_A5.3 +description: Checking if varying the length property fails +---*/ //CHECK#1 x = encodeURIComponent.length; @@ -14,5 +13,3 @@ encodeURIComponent.length = Infinity; if (encodeURIComponent.length !== x) { $ERROR('#1: x = encodeURIComponent.length; encodeURIComponent.length = Infinity; encodeURIComponent.length === x. Actual: ' + (encodeURIComponent.length)); } - - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.4.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.4.js index bebeadbb58..63e135bc29 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.4.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of encodeURIComponent is 1 - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.4.js - * @description encodeURIComponent.length === 1 - */ +/*--- +info: The length property of encodeURIComponent is 1 +es5id: 15.1.3.4_A5.4 +description: encodeURIComponent.length === 1 +---*/ //CHECK#1 if (encodeURIComponent.length !== 1) { $ERROR('#1: encodeURIComponent.length === 1. Actual: ' + (encodeURIComponent.length)); -} - - +} diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.5.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.5.js index 67358f35b7..2665375d5f 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.5.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The encodeURIComponent property has the attribute DontEnum - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The encodeURIComponent property has the attribute DontEnum +es5id: 15.1.3.4_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (this.propertyIsEnumerable('encodeURIComponent') !== false) { @@ -24,4 +23,3 @@ for (p in this){ if (result !== true) { $ERROR('#2: result = true; for (p in this) { if (p === "encodeURIComponent") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.6.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.6.js index 8d5bce7c4f..484b6af899 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.6.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The encodeURIComponent property has not prototype property - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.6.js - * @description Checking encodeURIComponent.prototype - */ +/*--- +info: The encodeURIComponent property has not prototype property +es5id: 15.1.3.4_A5.6 +description: Checking encodeURIComponent.prototype +---*/ //CHECK#1 if (encodeURIComponent.prototype !== undefined) { $ERROR('#1: encodeURIComponent.prototype === undefined. Actual: ' + (encodeURIComponent.prototype)); } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.7.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.7.js index b762aae2d0..e69c0980dd 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.7.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The encodeURIComponent property can't be used as constructor - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The encodeURIComponent property can't be used as constructor +es5id: 15.1.3.4_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new encodeURIComponent() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A6_T1.js b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A6_T1.js index 695883985f..e8f84b6e2d 100644 --- a/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A6_T1.js +++ b/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString - * - * @path ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A6_T1.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: Operator use ToString +es5id: 15.1.3.4_A6_T1 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return "^"}}; @@ -76,4 +75,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURIComponent(object) throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.1/S15.1_A1_T1.js b/test/suite/ch15/15.1/S15.1_A1_T1.js index 366d283679..fa53b9b593 100644 --- a/test/suite/ch15/15.1/S15.1_A1_T1.js +++ b/test/suite/ch15/15.1/S15.1_A1_T1.js @@ -1,14 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The global object does not have a [[Construct]] property - * - * @path ch15/15.1/S15.1_A1_T1.js - * @description It is not possible to use the global object as a constructor - * with the new operator - * @negative - */ +/*--- +info: The global object does not have a [[Construct]] property +es5id: 15.1_A1_T1 +description: > + It is not possible to use the global object as a constructor with + the new operator +flags: [negative] +---*/ new this; - diff --git a/test/suite/ch15/15.1/S15.1_A1_T2.js b/test/suite/ch15/15.1/S15.1_A1_T2.js index 2dd5000419..353fc90c12 100644 --- a/test/suite/ch15/15.1/S15.1_A1_T2.js +++ b/test/suite/ch15/15.1/S15.1_A1_T2.js @@ -1,14 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The global object does not have a [[Construct]] property - * - * @path ch15/15.1/S15.1_A1_T2.js - * @description It is not possible to use the global object as a constructor - * with the new operator - * @negative - */ +/*--- +info: The global object does not have a [[Construct]] property +es5id: 15.1_A1_T2 +description: > + It is not possible to use the global object as a constructor with + the new operator +flags: [negative] +---*/ new this(); - diff --git a/test/suite/ch15/15.1/S15.1_A2_T1.js b/test/suite/ch15/15.1/S15.1_A2_T1.js index 308085a509..1325d56381 100644 --- a/test/suite/ch15/15.1/S15.1_A2_T1.js +++ b/test/suite/ch15/15.1/S15.1_A2_T1.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The global object does not have a [[Call]] property - * - * @path ch15/15.1/S15.1_A2_T1.js - * @description It is not possible to invoke the global object as a function - * @negative - */ +/*--- +info: The global object does not have a [[Call]] property +es5id: 15.1_A2_T1 +description: It is not possible to invoke the global object as a function +flags: [negative] +---*/ this(); - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T1.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T1.js index c629126d8d..f9c79821da 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T1.js - * @description Tested RegExp is "a**" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T1 +description: Tested RegExp is "a**" +---*/ //CHECK#1 try { @@ -16,4 +15,3 @@ try { $ERROR('#1.2: new RegExp("a**") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T10.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T10.js index 858f95ad4d..624547011a 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T10.js - * @description Tested RegExp is "++a" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T10 +description: Tested RegExp is "++a" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("++a") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T11.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T11.js index e3ebc5c11d..fc9c257903 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T11.js - * @description Tested RegExp is "?a" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T11 +description: Tested RegExp is "?a" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("?a") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T12.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T12.js index 02f80d6920..cfaa01bbfb 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T12.js - * @description Tested RegExp is "??a" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T12 +description: Tested RegExp is "??a" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("??a") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T13.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T13.js index e6c0f5f37f..44d78f511e 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T13.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T13.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T13.js - * @description Tested RegExp is "x{1}{1,}" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T13 +description: Tested RegExp is "x{1}{1,}" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("x{1}{1,}") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T14.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T14.js index d1bc8b0b2b..bd04b49807 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T14.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T14.js - * @description Tested RegExp is "x{1,2}{1}" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T14 +description: Tested RegExp is "x{1,2}{1}" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("x{1,2}{1}") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T15.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T15.js index 1912f46061..246027320f 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T15.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T15.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T15.js - * @description Tested RegExp is "x{1,}{1}" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T15 +description: Tested RegExp is "x{1,}{1}" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("x{1,}{1}") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T16.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T16.js index 70aea659da..0b27a88450 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T16.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T16.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T16.js - * @description Tested RegExp is "x{0,1}{1,}" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T16 +description: Tested RegExp is "x{0,1}{1,}" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("x{0,1}{1,}") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T2.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T2.js index 85d12c1920..d461df5c20 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T2.js - * @description Tested RegExp is "a***" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T2 +description: Tested RegExp is "a***" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("a***") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T3.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T3.js index eb39dde825..5d3eb8afa1 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T3.js - * @description Tested RegExp is "a++" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T3 +description: Tested RegExp is "a++" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("a++") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T4.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T4.js index b057a5a465..3be64a51cb 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T4.js - * @description Tested RegExp is "a+++" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T4 +description: Tested RegExp is "a+++" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("a+++") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T5.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T5.js index 1954fc1360..58130c947c 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T5.js - * @description Tested RegExp is "a???" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T5 +description: Tested RegExp is "a???" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("a???") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T6.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T6.js index 83ae8f1c46..68be6d283a 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T6.js - * @description Tested RegExp is "a????" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T6 +description: Tested RegExp is "a????" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("a????") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T7.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T7.js index affed4c572..adfd0967a5 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T7.js - * @description Tested RegExp is "*a" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T7 +description: Tested RegExp is "*a" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("*a") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T8.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T8.js index e2dc4af80d..1d3e53b57e 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T8.js - * @description Tested RegExp is "**a" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T8 +description: Tested RegExp is "**a" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("**a") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T9.js b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T9.js index 561c2a5e7a..91cbdc7f9b 100644 --- a/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.1/S15.10.1_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp syntax errors must be caught when matcher(s) compiles - * - * @path ch15/15.10/15.10.1/S15.10.1_A1_T9.js - * @description Tested RegExp is "+a" - */ +/*--- +info: RegExp syntax errors must be caught when matcher(s) compiles +es5id: 15.10.1_A1_T9 +description: Tested RegExp is "+a" +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new RegExp("+a") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.1_T1.js index d4cfc054da..150d042c6a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterEscape :: t evaluates by returning - * the character \u0009 - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.1_T1.js - * @description Use \t in RegExp and \u0009 in tested string - */ +/*--- +info: > + The production CharacterEscape :: t evaluates by returning + the character \u0009 +es5id: 15.10.2.10_A1.1_T1 +description: Use \t in RegExp and \u0009 in tested string +---*/ //CHECK#1 var arr = /\t/.exec("\u0009"); @@ -19,5 +19,4 @@ if ((arr === null) || (arr[0] !== "\u0009")) { var arr = /\t\t/.exec("a\u0009\u0009b"); if ((arr === null) || (arr[0] !== "\u0009\u0009")) { $ERROR('#2: var arr = /\\t\\t/.exec("a\\u0009\\u0009b"); arr[0] === "\\u0009\\u0009". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.2_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.2_T1.js index c0294ae785..a3d0b4d82b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.2_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterEscape :: n evaluates by returning - * the character \u000A - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.2_T1.js - * @description Use \n in RegExp and \u000A in tested string - */ +/*--- +info: > + The production CharacterEscape :: n evaluates by returning + the character \u000A +es5id: 15.10.2.10_A1.2_T1 +description: Use \n in RegExp and \u000A in tested string +---*/ //CHECK#1 var arr = /\n/.exec("\u000A"); @@ -19,5 +19,4 @@ if ((arr === null) || (arr[0] !== "\u000A")) { var arr = /\n\n/.exec("a\u000A\u000Ab"); if ((arr === null) || (arr[0] !== "\u000A\u000A")) { $ERROR('#2: var arr = /\\n\\n/.exec("a\\u000A\\u000Ab"); arr[0] === "\\u000A\\u000A". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.3_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.3_T1.js index c1d26f44d8..c804a2a832 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.3_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterEscape :: v evaluates by returning - * the character \u000B - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.3_T1.js - * @description Use \v in RegExp and \u000B in tested string - */ +/*--- +info: > + The production CharacterEscape :: v evaluates by returning + the character \u000B +es5id: 15.10.2.10_A1.3_T1 +description: Use \v in RegExp and \u000B in tested string +---*/ //CHECK#1 var arr = /\v/.exec("\u000B"); @@ -19,5 +19,4 @@ if ((arr === null) || (arr[0] !== "\u000B")) { var arr = /\v\v/.exec("a\u000B\u000Bb"); if ((arr === null) || (arr[0] !== "\u000B\u000B")) { $ERROR('#2: var arr = /\\v\\v/.exec("a\\u000B\\u000Bb"); arr[0] === "\\u000B\\u000B". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.4_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.4_T1.js index 4b3b0f1b20..93ee310278 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.4_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterEscape :: f evaluates by returning - * the character \u000C - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.4_T1.js - * @description Use \f in RegExp and \u000C in tested string - */ +/*--- +info: > + The production CharacterEscape :: f evaluates by returning + the character \u000C +es5id: 15.10.2.10_A1.4_T1 +description: Use \f in RegExp and \u000C in tested string +---*/ //CHECK#1 var arr = /\f/.exec("\u000C"); @@ -19,5 +19,4 @@ if ((arr === null) || (arr[0] !== "\u000C")) { var arr = /\f\f/.exec("a\u000C\u000Cb"); if ((arr === null) || (arr[0] !== "\u000C\u000C")) { $ERROR('#2: var arr = /\\f\\f/.exec("a\\u000C\\u000Cb"); arr[0] === "\\u000C\\u000C". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.5_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.5_T1.js index d69e424961..0e59c51e0e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.5_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.5_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterEscape :: r evaluates by returning - * the character \u000D - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A1.5_T1.js - * @description Use \r in RegExp and \u000D in tested string - */ +/*--- +info: > + The production CharacterEscape :: r evaluates by returning + the character \u000D +es5id: 15.10.2.10_A1.5_T1 +description: Use \r in RegExp and \u000D in tested string +---*/ //CHECK#1 var arr = /\r/.exec("\u000D"); @@ -19,5 +19,4 @@ if ((arr === null) || (arr[0] !== "\u000D")) { var arr = /\r\r/.exec("a\u000D\u000Db"); if ((arr === null) || (arr[0] !== "\u000D\u000D")) { $ERROR('#2: var arr = /\\r\\r/.exec("a\\u000D\\u000Db"); arr[0] === "\\u000D\\u000D". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T1.js index 623c912eaa..913c02266e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: c ControlLetter - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T1.js - * @description ControlLetter :: A - Z - */ +/*--- +info: "CharacterEscape :: c ControlLetter" +es5id: 15.10.2.10_A2.1_T1 +description: "ControlLetter :: A - Z" +---*/ //CHECK#0041-005A var result = true; @@ -20,5 +19,4 @@ for (alpha = 0x0041; alpha <= 0x005A; alpha++) { if (result !== true) { $ERROR('#1: CharacterEscape :: c A - Z'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T2.js index 2b6a3937b5..bd68e1e53b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: c ControlLetter - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T2.js - * @description ControlLetter :: a - z - */ +/*--- +info: "CharacterEscape :: c ControlLetter" +es5id: 15.10.2.10_A2.1_T2 +description: "ControlLetter :: a - z" +---*/ //CHECK#0061-007A var result = true; @@ -20,5 +19,4 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#1: CharacterEscape :: c a - z'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T3.js index bdf21e064c..47fb014e85 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: c ControlLetter - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A2.1_T3.js - * @description ControlLetter :: RUSSIAN ALPHABET is incorrect - */ +/*--- +info: "CharacterEscape :: c ControlLetter" +es5id: 15.10.2.10_A2.1_T3 +description: "ControlLetter :: RUSSIAN ALPHABET is incorrect" +---*/ //CHECK#0410-042F var result = true; @@ -34,5 +33,4 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet is incorrect'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T1.js index 2a431dc189..3a7049b724 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: HexEscapeSequence :: x HexDigit HexDigit - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T1.js - * @description Tested string include equal unicode symbols - */ +/*--- +info: "CharacterEscape :: HexEscapeSequence :: x HexDigit HexDigit" +es5id: 15.10.2.10_A3.1_T1 +description: Tested string include equal unicode symbols +---*/ //CHECK#0 var arr = /\x00/.exec("\u0000"); @@ -31,4 +30,3 @@ var arr = /\xFF/.exec("\u00FF"); if ((arr === null) || (arr[0] !== "\u00FF")) { $ERROR('#3: var arr = /\\xFF/.exec(\\u00FF); arr[0] === "\\u00FF". Actual. ' + (arr && arr[0])); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T2.js index 789ee29c1d..c8cbb0e967 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: HexEscapeSequence :: x HexDigit HexDigit - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A3.1_T2.js - * @description Checking ENGLISH CAPITAL ALPHABET and english small alphabet - */ +/*--- +info: "CharacterEscape :: HexEscapeSequence :: x HexDigit HexDigit" +es5id: 15.10.2.10_A3.1_T2 +description: Checking ENGLISH CAPITAL ALPHABET and english small alphabet +---*/ //CHECK#41-5A hex = ["\\x41", "\\x42", "\\x43", "\\x44", "\\x45", "\\x46", "\\x47", "\\x48", "\\x49", "\\x4A", "\\x4B", "\\x4C", "\\x4D", "\\x4E", "\\x4F", "\\x50", "\\x51", "\\x52", "\\x53", "\\x54", "\\x55", "\\x56", "\\x57", "\\x58", "\\x59", "\\x5A"]; @@ -36,5 +35,4 @@ for (index = 0; index < hex.length; index++) { if (result !== true) { $ERROR('#1: english small alphabet'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T1.js index 7da30da234..1c06437966 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T1.js - * @description RegExp and tested string include uncode symbols - */ +/*--- +info: > + CharacterEscape :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 15.10.2.10_A4.1_T1 +description: RegExp and tested string include uncode symbols +---*/ //CHECK#0 var arr = /\u0000/.exec("\u0000"); @@ -43,4 +44,3 @@ var arr = /\uFFFF/.exec("\uFFFF"); if ((arr === null) || (arr[0] !== "\uFFFF")) { $ERROR('#5: var arr = /\\uFFFF/.exec(\\uFFFF); arr[0] === "\\uFFFF". Actual. ' + (arr && arr[0])); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T2.js index 115b8d8416..3e87fe007b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T2.js - * @description Tested string include ENGLISH CAPITAL ALPHABET and english small alphabet - */ +/*--- +info: > + CharacterEscape :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 15.10.2.10_A4.1_T2 +description: > + Tested string include ENGLISH CAPITAL ALPHABET and english small + alphabet +---*/ //CHECK#41-5A hex = ["\\u0041", "\\u0042", "\\u0043", "\\u0044", "\\u0045", "\\u0046", "\\u0047", "\\u0048", "\\u0049", "\\u004A", "\\u004B", "\\u004C", "\\u004D", "\\u004E", "\\u004F", "\\u0050", "\\u0051", "\\u0052", "\\u0053", "\\u0054", "\\u0055", "\\u0056", "\\u0057", "\\u0058", "\\u0059", "\\u005A"]; @@ -36,5 +39,4 @@ for (index = 0; index < hex.length; index++) { if (result !== true) { $ERROR('#1: english small alphabet'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T3.js index 9904a34825..040417bf92 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit HexDigit - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A4.1_T3.js - * @description Tested string include RUSSIAN CAPITAL ALPHABET and russian small alphabet in unicode notation - */ +/*--- +info: > + CharacterEscape :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit + HexDigit +es5id: 15.10.2.10_A4.1_T3 +description: > + Tested string include RUSSIAN CAPITAL ALPHABET and russian small + alphabet in unicode notation +---*/ //CHECK#0410-042F, 0401 hex = ["\\u0410", "\\u0411", "\\u0412", "\\u0413", "\\u0414", "\\u0415", "\\u0416", "\\u0417", "\\u0418", "\\u0419", "\\u041A", "\\u041B", "\\u041C", "\\u041D", "\\u041E", "\\u041F", "\\u0420", "\\u0421", "\\u0422", "\\u0423", "\\u0424", "\\u0425", "\\u0426", "\\u0427", "\\u0428", "\\u0429", "\\u042A", "\\u042B", "\\u042C", "\\u042D", "\\u042E", "\\u042F", "\\u0401"]; @@ -37,4 +40,3 @@ for (index = 0; index < hex.length; index++) { if (result !== true) { $ERROR('#1: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A5.1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A5.1_T1.js index 16517f4aa0..1eba2d7ac1 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A5.1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A5.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * CharacterEscape :: IdentityEscapeSequence :: SourceCharacter but not IdentifierPart - * - * @path ch15/15.10/15.10.2/15.10.2.10/S15.10.2.10_A5.1_T1.js - * @description Tested string is "~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"' - */ +/*--- +info: > + CharacterEscape :: IdentityEscapeSequence :: SourceCharacter but not + IdentifierPart +es5id: 15.10.2.10_A5.1_T1 +description: "Tested string is \"~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"'" +---*/ //CHECK#1 var non_ident = "~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"'; @@ -18,5 +19,4 @@ do { if (non_ident.length !== k) { $ERROR('#1: IdentityEscapeSequence :: SourceCharacter but not IdentifierPart'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T1.js index 306eec0849..d60ab2f73b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T1.js - * @description DecimalEscape :: 0. If i is zero, return the EscapeValue consisting of a character (Unicodevalue0000) - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T1 +description: > + DecimalEscape :: 0. If i is zero, return the EscapeValue + consisting of a character (Unicodevalue0000) +---*/ //CHECK#1 var arr = /\0/.exec("\u0000"); @@ -19,4 +20,3 @@ var arr = (new RegExp("\\0")).exec("\u0000"); if ((arr === null) || (arr[0] !== "\u0000")) { $ERROR('#2: var arr = (new RegExp("\\0")).exec(\\u0000); arr[0] === "\\u0000". Actual. ' + (arr && arr[0])); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T4.js index fb1cb46761..2f001117fa 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T4.js - * @description DecimalIntegerLiteral is not 0 - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T4 +description: DecimalIntegerLiteral is not 0 +---*/ var arr = /(A)\1/.exec("AA"); @@ -18,5 +17,4 @@ if ((arr === null) || (arr[0] !== "AA")) { //CHECK#2 if ((arr === null) || (arr[1] !== "A")) { $ERROR('#2: var arr = (/(A)\\1/.exec("AA")); arr[1] === "A". Actual. ' + (arr && arr[1])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T5.js index d96e9f82b4..9dce0c92a6 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T5.js - * @description DecimalIntegerLiteral is not 0 - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T5 +description: DecimalIntegerLiteral is not 0 +---*/ var arr = /\1(A)/.exec("AA"); @@ -18,5 +17,4 @@ if ((arr === null) || (arr[0] !== "A")) { //CHECK#2 if ((arr === null) || (arr[1] !== "A")) { $ERROR('#2: var arr = (/\\1(A)/.exec("AA")); arr[1] === "A". Actual. ' + (arr && arr[1])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T6.js index 93fe35a09c..3992a6a23a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T6.js - * @description DecimalIntegerLiteral is not 0 - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T6 +description: DecimalIntegerLiteral is not 0 +---*/ var arr = /(A)\1(B)\2/.exec("AABB"); @@ -23,5 +22,4 @@ if ((arr === null) || (arr[1] !== "A")) { //CHECK#3 if ((arr === null) || (arr[2] !== "B")) { $ERROR('#3: var arr = /(A)\\1(B)\\2/.exec("AABB"); arr[2] === "B". Actual. ' + (arr && arr[2])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T7.js index 4adb97eada..9ed378dd83 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T7.js - * @description DecimalIntegerLiteral is not 0 - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T7 +description: DecimalIntegerLiteral is not 0 +---*/ var arr = /\1(A)(B)\2/.exec("ABB"); @@ -23,5 +22,4 @@ if ((arr === null) || (arr[1] !== "A")) { //CHECK#3 if ((arr === null) || (arr[2] !== "B")) { $ERROR('#3: var arr = /\\1(A)(B)\\2/.exec("ABB"); arr[2] === "B". Actual. ' + (arr && arr[2])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T8.js index d0915d52fe..c6aa5102ae 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T8.js - * @description DecimalIntegerLiteral is not 0 - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T8 +description: DecimalIntegerLiteral is not 0 +---*/ var arr = /((((((((((A))))))))))\1\2\3\4\5\6\7\8\9\10/.exec("AAAAAAAAAAA"); @@ -20,5 +19,4 @@ for (i = 1; i <= 10; i++) { if ((arr === null) || (arr[i] !== "A")) { $ERROR('#2: var arr = /((((((((((A))))))))))\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10/.exec("AAAAAAAAAAA"); arr[' + i + '] === "A". Actual. ' + (arr && arr[i])); } -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T9.js index b2dfb4ee3c..d728e82e12 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit] - * - * @path ch15/15.10/15.10.2/15.10.2.11/S15.10.2.11_A1_T9.js - * @description DecimalIntegerLiteral is not 0 - */ +/*--- +info: "DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]" +es5id: 15.10.2.11_A1_T9 +description: DecimalIntegerLiteral is not 0 +---*/ var arr = /((((((((((A))))))))))\10\9\8\7\6\5\4\3\2\1/.exec("AAAAAAAAAAA"); @@ -20,5 +19,4 @@ for (i = 1; i <= 10; i++) { if ((arr === null) || (arr[i] !== "A")) { $ERROR('#2: var arr = /((((((((((A))))))))))\\10\\9\\8\\7\\6\\5\\4\\3\\2\\1/.exec("AAAAAAAAAAA"); arr[' + i + '] === "A". Actual. ' + (arr && arr[i])); } -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T1.js index 482e089d5f..30eb0fe341 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: s evaluates by returning the set of characters - * containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T1.js - * @description WhiteSpace - */ +/*--- +info: > + The production CharacterClassEscape :: s evaluates by returning the set of characters + containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions +es5id: 15.10.2.12_A1_T1 +description: WhiteSpace +---*/ var i0 = ""; for (var j = 0; j < 1024; j++) @@ -526,4 +526,4 @@ if (i63.replace(/\s+/g, "") !== o63) { var i64 = String.fromCharCode(65279); if (i64.replace(/\s/g, "") !== "") { $ERROR("#64: Error matching character class \s for BOM (feff)"); -} \ No newline at end of file +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T2.js index 52716fa8ce..5fa2da7830 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: s evaluates by returning the set of characters - * containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T2.js - * @description LineTerminator - */ +/*--- +info: > + The production CharacterClassEscape :: s evaluates by returning the set of characters + containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions +es5id: 15.10.2.12_A1_T2 +description: LineTerminator +---*/ //CHECK#1 var arr = /\s/.exec("\u000A"); @@ -31,5 +31,4 @@ if ((arr === null) || (arr[0] !== "\u2028")) { var arr = /\s/.exec("\u2029"); if ((arr === null) || (arr[0] !== "\u2029")) { $ERROR('#4: var arr = /\\s/.exec("\\u2029"); arr[0] === "\\u2029". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T3.js index a33d7dfbca..23ec7e2a96 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: s evaluates by returning the set of characters - * containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T3.js - * @description ENGLISH ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: s evaluates by returning the set of characters + containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions +es5id: 15.10.2.12_A1_T3 +description: ENGLISH ALPHABET +---*/ var regexp_s = /\s/; @@ -33,5 +33,4 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#2: english small alphabet'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T4.js index 87c33c7c7b..8d2768dd3c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: s evaluates by returning the set of characters - * containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T4.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: s evaluates by returning the set of characters + containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions +es5id: 15.10.2.12_A1_T4 +description: RUSSIAN ALPHABET +---*/ var regexp_s = /\s/; @@ -34,4 +34,3 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T5.js index 4e08b1f65a..c648d997da 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T5.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: s evaluates by returning the set of characters - * containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T5.js - * @description Tested string is "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"' - */ +/*--- +info: > + The production CharacterClassEscape :: s evaluates by returning the set of characters + containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions +es5id: 15.10.2.12_A1_T5 +description: > + Tested string is + "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + + '"' +---*/ //CHECK#1 var non_s = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"'; @@ -25,5 +28,4 @@ while (regexp_s.exec(non_S) !== null) { if (non_S.length !== k) { $ERROR('#2: non-S'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T1.js index 36a45391b3..2381ef6d27 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: S evaluates by returning - * the set of all characters not included in the set returned by - * CharacterClassEscape :: s - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T1.js - * @description WhiteSpace - */ +/*--- +info: > + The production CharacterClassEscape :: S evaluates by returning + the set of all characters not included in the set returned by + CharacterClassEscape :: s +es5id: 15.10.2.12_A2_T1 +description: WhiteSpace +---*/ var i0 = ""; for (var j = 0; j < 1024; j++) @@ -527,4 +527,4 @@ if (i63.replace(/\S+/g, "") !== o63) { var i64 = String.fromCharCode(65279); if (i64.replace(/\S/g, "") === "") { $ERROR("#64: Error matching character class \S for BOM (feff)"); -} \ No newline at end of file +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T2.js index 2cc29e04c2..65c9eb98df 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: S evaluates by returning - * the set of all characters not included in the set returned by - * CharacterClassEscape :: s - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T2.js - * @description LineTerminator - */ +/*--- +info: > + The production CharacterClassEscape :: S evaluates by returning + the set of all characters not included in the set returned by + CharacterClassEscape :: s +es5id: 15.10.2.12_A2_T2 +description: LineTerminator +---*/ //CHECK#1 var arr = /\S/.exec("\u000A"); @@ -32,5 +32,4 @@ if (arr !== null) { var arr = /\S/.exec("\u2029"); if (arr !== null) { $ERROR('#4: var arr = /\\S/.exec("\\u2029"); arr[0] === "\\u2029". Actual. ' + (arr && arr[0])); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T3.js index 66a831f10b..8bca9ad226 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: S evaluates by returning - * the set of all characters not included in the set returned by - * CharacterClassEscape :: s - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T3.js - * @description ENGLISH ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: S evaluates by returning + the set of all characters not included in the set returned by + CharacterClassEscape :: s +es5id: 15.10.2.12_A2_T3 +description: ENGLISH ALPHABET +---*/ var regexp_S = /\S/; @@ -38,5 +38,4 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#2: english small alphabet'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T4.js index 56d511ec6d..d3683d8f37 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: S evaluates by returning - * the set of all characters not included in the set returned by - * CharacterClassEscape :: s - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T4.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: S evaluates by returning + the set of all characters not included in the set returned by + CharacterClassEscape :: s +es5id: 15.10.2.12_A2_T4 +description: RUSSIAN ALPHABET +---*/ var regexp_S = /\S/; @@ -39,4 +39,3 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T5.js index 7dbcfcb1ac..6e41fe0b75 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T5.js @@ -1,14 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: S evaluates by returning - * the set of all characters not included in the set returned by - * CharacterClassEscape :: s - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T5.js - * @description Tested string is "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"' - */ +/*--- +info: > + The production CharacterClassEscape :: S evaluates by returning + the set of all characters not included in the set returned by + CharacterClassEscape :: s +es5id: 15.10.2.12_A2_T5 +description: > + Tested string is + "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + + '"' +---*/ //CHECK#1 var non_s = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"'; @@ -27,4 +30,3 @@ var non_S = '\f\n\r\t\v '; if (/\S/.exec(non_S) !== null) { $ERROR('#2: non-S'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T1.js index df3a3e82a1..0e9dcf9bd4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: - * a - z, A - Z, 0 - 9, _ - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T1.js - * @description A - Z - */ +/*--- +info: > + The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: + a - z, A - Z, 0 - 9, _ +es5id: 15.10.2.12_A3_T1 +description: A - Z +---*/ var i0 = ""; for (var j = 0; j < 256; j++) @@ -2056,4 +2056,3 @@ var o255 = i255; if (i255.replace(/\w+/g, "") !== o255) { $ERROR("#255: Error matching character class \w between character ff00 and ffff"); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T2.js index 5a1f80a840..c41b26fa35 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: - * a - z, A - Z, 0 - 9, _ - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T2.js - * @description a - z - */ +/*--- +info: > + The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: + a - z, A - Z, 0 - 9, _ +es5id: 15.10.2.12_A3_T2 +description: a - z +---*/ var regexp_w = /\w/; @@ -24,4 +24,3 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#1: a - z'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T3.js index 1b5833ff47..173a15a130 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: - * a - z, A - Z, 0 - 9, _ - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T3.js - * @description 0 - 9, _ - */ +/*--- +info: > + The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: + a - z, A - Z, 0 - 9, _ +es5id: 15.10.2.12_A3_T3 +description: 0 - 9, _ +---*/ var regexp_w = /\w/; @@ -35,4 +35,3 @@ if ((arr === null) || (arr[0] !== "\u005F")) { if (regexp_w.exec(" ") !== null) { $ERROR('#3: '); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T4.js index cf22559032..cb08d27474 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: - * a - z, A - Z, 0 - 9, _ - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T4.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: + a - z, A - Z, 0 - 9, _ +es5id: 15.10.2.12_A3_T4 +description: RUSSIAN ALPHABET +---*/ var regexp_w = /\w/; @@ -34,4 +34,3 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T5.js index 3efca98cf8..b02a6e8935 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: - * a - z, A - Z, 0 - 9, _ - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A3_T5.js - * @description non-w - */ +/*--- +info: > + The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters: + a - z, A - Z, 0 - 9, _ +es5id: 15.10.2.12_A3_T5 +description: non-w +---*/ //CHECK#1 var non_w = "\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; @@ -25,5 +25,4 @@ while (regexp_w.exec(non_W) !== null) { if (non_W.length !== k) { $ERROR('#2: non-W'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T1.js index 97b79fe369..5459ded332 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: W evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: w - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T1.js - * @description A - Z - */ +/*--- +info: > + The production CharacterClassEscape :: W evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: w +es5id: 15.10.2.12_A4_T1 +description: A - Z +---*/ var i0 = ""; for (var j = 0; j < 1024; j++) @@ -520,4 +520,3 @@ var o63 = ""; if (i63.replace(/\W+/g, "") !== o63) { $ERROR("#63: Error matching character class \W between character fc00 and ffff"); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T2.js index 7fc4278b61..b6bfb4912d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: W evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: w - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T2.js - * @description a - z - */ +/*--- +info: > + The production CharacterClassEscape :: W evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: w +es5id: 15.10.2.12_A4_T2 +description: a - z +---*/ var regexp_W = /\W/; @@ -22,4 +22,3 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#1: a - z'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T3.js index 22cbf5336b..b8683be875 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: W evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: w - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T3.js - * @description 0 - 9 - */ +/*--- +info: > + The production CharacterClassEscape :: W evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: w +es5id: 15.10.2.12_A4_T3 +description: 0 - 9 +---*/ var regexp_W = /\W/; @@ -33,4 +33,3 @@ var arr = regexp_W.exec(" "); if ((arr === null) || (arr[0] !== "\u0020")) { $ERROR('#2: '); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T4.js index e5657b9683..70a84fb95a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: W evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: w - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T4.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: W evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: w +es5id: 15.10.2.12_A4_T4 +description: RUSSIAN ALPHABET +---*/ var regexp_W = /\W/; @@ -38,4 +38,3 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T5.js index 3e01ed72ce..00575c903c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: W evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: w - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A4_T5.js - * @description non-w - */ +/*--- +info: > + The production CharacterClassEscape :: W evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: w +es5id: 15.10.2.12_A4_T5 +description: non-w +---*/ //CHECK#1 var non_w = "\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; @@ -26,4 +26,3 @@ var non_W = "_0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; if (/\W/.exec(non_W) !== null) { $ERROR('#2: non-W'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T1.js index e1602190ea..c57cf25404 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: d evaluates by returning the ten-element set of characters containing the characters 0 through 9 inclusive - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T1.js - * @description 0 - 9 - */ +/*--- +info: > + The production CharacterClassEscape :: d evaluates by returning the + ten-element set of characters containing the characters 0 through 9 + inclusive +es5id: 15.10.2.12_A5_T1 +description: 0 - 9 +---*/ var i0 = ""; for (var j = 0; j < 1024; j++) @@ -519,4 +521,3 @@ var o63 = i63; if (i63.replace(/\d+/g, "") !== o63) { $ERROR("#63: Error matching character class \d between character fc00 and ffff"); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T2.js index 8aa5fd99ba..e14c9cdd0a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: d evaluates by returning the ten-element set of characters containing the characters 0 through 9 inclusive - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T2.js - * @description ENGLISH ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: d evaluates by returning the + ten-element set of characters containing the characters 0 through 9 + inclusive +es5id: 15.10.2.12_A5_T2 +description: ENGLISH ALPHABET +---*/ var regexp_d = /\d/; @@ -32,5 +34,4 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#2: english small alphabet'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T3.js index 9222667933..aab3328192 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: d evaluates by returning the ten-element set of characters containing the characters 0 through 9 inclusive - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T3.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: d evaluates by returning the + ten-element set of characters containing the characters 0 through 9 + inclusive +es5id: 15.10.2.12_A5_T3 +description: RUSSIAN ALPHABET +---*/ var regexp_d = /\d/; @@ -33,4 +35,3 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T4.js index d8795cfb91..7eeedf84de 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: d evaluates by returning the ten-element set of characters containing the characters 0 through 9 inclusive - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A5_T4.js - * @description non-d - */ +/*--- +info: > + The production CharacterClassEscape :: d evaluates by returning the + ten-element set of characters containing the characters 0 through 9 + inclusive +es5id: 15.10.2.12_A5_T4 +description: non-d +---*/ //CHECK#1 var non_d = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; @@ -24,5 +26,4 @@ while (regexp_d.exec(non_D) !== null) { if (non_D.length !== k) { $ERROR('#2: non-D'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T1.js index 0cf2a5a047..a24cbc4387 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: D evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: d - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T1.js - * @description 0 - 9 - */ +/*--- +info: > + The production CharacterClassEscape :: D evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: d +es5id: 15.10.2.12_A6_T1 +description: 0 - 9 +---*/ var i0 = ""; for (var j = 0; j < 1024; j++) @@ -520,4 +520,3 @@ var o63 = ""; if (i63.replace(/\D+/g, "") !== o63) { $ERROR("#63: Error matching character class \D between character fc00 and ffff"); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T2.js index 320ec141f1..ca9dfb3bfa 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: D evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: d - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T2.js - * @description ENGLISH ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: D evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: d +es5id: 15.10.2.12_A6_T2 +description: ENGLISH ALPHABET +---*/ var regexp_D = /\D/; @@ -37,5 +37,4 @@ for (alpha = 0x0061; alpha <= 0x007A; alpha++) { if (result !== true) { $ERROR('#2: english small alphabet'); -} - +} diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T3.js index 1edcdce38f..ac580798a8 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: D evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: d - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T3.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: D evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: d +es5id: 15.10.2.12_A6_T3 +description: RUSSIAN ALPHABET +---*/ var regexp_D = /\D/; @@ -38,4 +38,3 @@ for (alpha = 0x0430; alpha <= 0x044F; alpha++) { if (result !== true) { $ERROR('#2: russian small alphabet'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T4.js index 662ce119db..8f8a021c29 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClassEscape :: D evaluates by returning the set of all characters not - * included in the set returned by CharacterClassEscape :: d - * - * @path ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A6_T4.js - * @description RUSSIAN ALPHABET - */ +/*--- +info: > + The production CharacterClassEscape :: D evaluates by returning the set of all characters not + included in the set returned by CharacterClassEscape :: d +es5id: 15.10.2.12_A6_T4 +description: RUSSIAN ALPHABET +---*/ //CHECK#1 var non_d = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; @@ -26,4 +26,3 @@ var non_d = '0123456789'; if (/\D/.exec(non_d) !== null) { $ERROR('#2: non-d'); } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T1.js index a3f4f44576..24782cf801 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T1.js - * @description Execute /[]a/.test("\0a\0a") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T1 +description: Execute /[]a/.test("\0a\0a") and check results +---*/ __executed = /[]a/.test("\0a\0a");; @@ -14,5 +16,3 @@ __executed = /[]a/.test("\0a\0a");; if (__executed) { $ERROR('#1: /[]a/.test("\\0a\\0a") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T10.js index 5e36a443b4..12237f8df4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T10.js - * @description Execute /[a-c\d]+/.exec("\n\n\abc324234\n") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T10 +description: Execute /[a-c\d]+/.exec("\n\n\abc324234\n") and check results +---*/ __executed = /[a-c\d]+/.exec("\n\n\abc324234\n"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-c\\d]+/.exec("\\n\\n\\abc324234\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T11.js index 70e8feac4e..0ad657e5bf 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T11.js - * @description Execute /ab[.]?c/.exec("abc") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T11 +description: Execute /ab[.]?c/.exec("abc") and check results +---*/ __executed = /ab[.]?c/.exec("abc"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /ab[.]?c/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T12.js index 770542b6f0..8f08fcf3a7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T12.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T12.js - * @description Execute /a[b]c/.exec("abc") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T12 +description: Execute /a[b]c/.exec("abc") and check results +---*/ __executed = /a[b]c/.exec("abc"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[b]c/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T13.js index 74ffd0d46c..418de781ce 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T13.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T13.js - * @description Execute /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T13 +description: > + Execute /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g") and + check results +---*/ __executed = /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g"); @@ -35,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-z][^1-9][a-z]/.exec("a1b b2c c3d def f4g"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T14.js index 3fbf7affbc..ec439b375a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T14.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T14.js - * @description Execute /[*&$]{3}/.exec("123*&$abc") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T14 +description: Execute /[*&$]{3}/.exec("123*&$abc") and check results +---*/ __executed = /[*&$]{3}/.exec("123*&$abc"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[*&$]{3}/.exec("123*&$abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T15.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T15.js index a80ce39bff..eb4e910cae 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T15.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T15.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T15.js - * @description Execute /[\d][\n][^\d]/.exec("line1\nline2") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T15 +description: Execute /[\d][\n][^\d]/.exec("line1\nline2") and check results +---*/ __executed = /[\d][\n][^\d]/.exec("line1\nline2"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[\\d][\\n][^\\d]/.exec("line1\\nline2"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T16.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T16.js index ea5be63bec..50e0f6238e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T16.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T16.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T16.js - * @description Execute /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T16 +description: > + Execute /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2") and + check results +---*/ __executed = /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2"); @@ -35,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[\\d][\\12-\\14]{1,}[^\\d]/.exec("line1\\n\\n\\n\\n\\nline2"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T17.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T17.js index 28256c88b1..dabde7674c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T17.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T17.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T17.js - * @description Execute /[]/.exec("a[b\n[]\tc]d") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T17 +description: Execute /[]/.exec("a[b\n[]\tc]d") and check results +---*/ __executed = /[]/.exec("a[b\n[]\tc]d"); @@ -14,5 +16,3 @@ __executed = /[]/.exec("a[b\n[]\tc]d"); if (__executed !== null) { $ERROR('#1: /[]/.exec("a[b\\n[]\\tc]d") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T2.js index b02086b99c..286c160284 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T2.js - * @description Execute /a[]/.test("\0a\0a") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T2 +description: Execute /a[]/.test("\0a\0a") and check results +---*/ __executed = /a[]/.test("\0a\0a");; @@ -14,5 +16,3 @@ __executed = /a[]/.test("\0a\0a");; if (__executed) { $ERROR('#1: /a[]/.test("\\0a\\0a") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T3.js index f1198a3a76..cde0b392dc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T3.js - * @description Execute /q[ax-zb](?=\s+)/.exec("qYqy ") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T3 +description: Execute /q[ax-zb](?=\s+)/.exec("qYqy ") and check results +---*/ __executed = /q[ax-zb](?=\s+)/.exec("qYqy "); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /q[ax-zb](?=\\s+)/.exec("qYqy "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T4.js index a4cb361f8b..004ad26b73 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T4.js - * @description Execute /q[ax-zb](?=\s+)/.exec("tqaqy ") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T4 +description: Execute /q[ax-zb](?=\s+)/.exec("tqaqy ") and check results +---*/ __executed = /q[ax-zb](?=\s+)/.exec("tqaqy "); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /q[ax-zb](?=\\s+)/.exec("tqaqy "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T5.js index b8e2aa9a08..a6ce2cf512 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T5.js - * @description Execute /q[ax-zb](?=\s+)/.exec("tqa\t qy ") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T5 +description: Execute /q[ax-zb](?=\s+)/.exec("tqa\t qy ") and check results +---*/ __executed = /q[ax-zb](?=\s+)/.exec("tqa\t qy "); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /q[ax-zb](?=\\s+)/.exec("tqa\\t qy "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T6.js index d84a74b333..d1c5bd2a58 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T6.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T6.js - * @description Execute /ab[ercst]de/.exec("abcde") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T6 +description: Execute /ab[ercst]de/.exec("abcde") and check results +---*/ __executed = /ab[ercst]de/.exec("abcde"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /ab[ercst]de/.exec("abcde"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T7.js index e6c7a5d7ed..4026fe5e85 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T7.js - * @description Execute /ab[erst]de/.test("abcde") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T7 +description: Execute /ab[erst]de/.test("abcde") and check results +---*/ __executed = /ab[erst]de/.test("abcde"); @@ -14,5 +16,3 @@ __executed = /ab[erst]de/.test("abcde"); if (__executed) { $ERROR('#1: /ab[erst]de/.test("abcde") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T8.js index d69ffefb42..782f9fd91d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T8.js - * @description Execute /[d-h]+/.exec("abcdefghijkl") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T8 +description: Execute /[d-h]+/.exec("abcdefghijkl") and check results +---*/ __executed = /[d-h]+/.exec("abcdefghijkl"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[d-h]+/.exec("abcdefghijkl"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T9.js index d95321ce36..28d6ddd93f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean false - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A1_T9.js - * @description Execute /[1234567].{2}/.exec("abc6defghijkl") and check results - */ +/*--- +info: > + The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] + evaluates by evaluating ClassRanges to obtain a CharSet and returning + that CharSet and the boolean false +es5id: 15.10.2.13_A1_T9 +description: Execute /[1234567].{2}/.exec("abc6defghijkl") and check results +---*/ __executed = /[1234567].{2}/.exec("abc6defghijkl"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[1234567].{2}/.exec("abc6defghijkl"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T1.js index 8410e4d46d..333197526f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T1.js - * @description Execute /[^]a/m.exec("a\naba") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T1 +description: Execute /[^]a/m.exec("a\naba") and check results +---*/ __executed = /[^]a/m.exec("a\naba"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^]a/m.exec("a\\naba"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T2.js index 12c45c0735..6476fc8ba3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T2.js - * @description Execute /a[^]/.exec(" a\t\n") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T2 +description: Execute /a[^]/.exec(" a\t\n") and check results +---*/ __executed = /a[^]/.exec(" a\t\n"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[^]/.exec(" a\\t\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T3.js index 2b6bc76e4a..480a726e45 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T3.js - * @description Execute /a[^b-z]\s+/.exec("ab an az aY n") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T3 +description: Execute /a[^b-z]\s+/.exec("ab an az aY n") and check results +---*/ __executed = /a[^b-z]\s+/.exec("ab an az aY n"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[^b-z]\\s+/.exec("ab an az aY n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T4.js index c6690db5da..0d809e98a5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T4.js - * @description Execute /[^\b]+/g.exec("easy\bto\u0008ride") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T4 +description: Execute /[^\b]+/g.exec("easy\bto\u0008ride") and check results +---*/ __executed = /[^\b]+/g.exec("easy\bto\u0008ride"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^\\b]+/g.exec("easy\\bto\\u0008ride"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T5.js index 97ba1ad324..7b556e55d5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T5.js - * @description Execute /a[^1-9]c/.exec("abc") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T5 +description: Execute /a[^1-9]c/.exec("abc") and check results +---*/ __executed = /a[^1-9]c/.exec("abc"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[^1-9]c/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T6.js index f964ffbf00..fe7f6dab25 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T6.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T6.js - * @description Execute /a[^b]c/.test("abc") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T6 +description: Execute /a[^b]c/.test("abc") and check results +---*/ __executed = /a[^b]c/.test("abc"); @@ -14,5 +16,3 @@ __executed = /a[^b]c/.test("abc"); if (__executed) { $ERROR('#1: /a[^b]c/.test("abc") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T7.js index 56cd92bd35..9a18c2b122 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T7.js - * @description Execute /[^a-z]{4}/.exec("abc#$%def%&*@ghi") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T7 +description: Execute /[^a-z]{4}/.exec("abc#$%def%&*@ghi") and check results +---*/ __executed = /[^a-z]{4}/.exec("abc#$%def%&*@ghi"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^a-z]{4}/.exec("abc#$%def%&*@ghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T8.js index 04e53653ca..ee9fa19b0c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production CharacterClass :: [ ^ ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and the boolean true - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A2_T8.js - * @description Execute /[^]/.exec("abc#$%def%&*@ghi") and check results - */ +/*--- +info: > + The production CharacterClass :: [ ^ ClassRanges ] evaluates by + evaluating ClassRanges to obtain a CharSet and returning that CharSet + and the boolean true +es5id: 15.10.2.13_A2_T8 +description: Execute /[^]/.exec("abc#$%def%&*@ghi") and check results +---*/ __executed = /[^]/.exec("abc#$%def%&*@ghi"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^]/.exec("abc#$%def%&*@ghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T1.js index 392445023a..4afb44a2fc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Inside a CharacterClass, \b means the backspace character - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T1.js - * @description Execute /.[\b]./.exec("abc\bdef") and check results - */ +/*--- +info: Inside a CharacterClass, \b means the backspace character +es5id: 15.10.2.13_A3_T1 +description: Execute /.[\b]./.exec("abc\bdef") and check results +---*/ __executed = /.[\b]./.exec("abc\bdef"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /.[\\b]./.exec("abc\\bdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T2.js index f1bd6b63f4..922f7e5211 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Inside a CharacterClass, \b means the backspace character - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T2.js - * @description Execute /c[\b]{3}d/.exec("abc\b\b\bdef") and check results - */ +/*--- +info: Inside a CharacterClass, \b means the backspace character +es5id: 15.10.2.13_A3_T2 +description: Execute /c[\b]{3}d/.exec("abc\b\b\bdef") and check results +---*/ __executed = /c[\b]{3}d/.exec("abc\b\b\bdef"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /c[\\b]{3}d/.exec("abc\\b\\b\\bdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T3.js index a4e4864c09..30df11f3d3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Inside a CharacterClass, \b means the backspace character - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T3.js - * @description Execute /[^\[\b\]]+/.exec("abc\bdef") and check results - */ +/*--- +info: Inside a CharacterClass, \b means the backspace character +es5id: 15.10.2.13_A3_T3 +description: Execute /[^\[\b\]]+/.exec("abc\bdef") and check results +---*/ __executed = /[^\[\b\]]+/.exec("abc\bdef"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^\\[\\b\\]]+/.exec("abc\\bdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T4.js index d97e00f46d..7507b3828a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Inside a CharacterClass, \b means the backspace character - * - * @path ch15/15.10/15.10.2/15.10.2.13/S15.10.2.13_A3_T4.js - * @description Execute /[^\[\b\]]+/.exec("abcdef") and check results - */ +/*--- +info: Inside a CharacterClass, \b means the backspace character +es5id: 15.10.2.13_A3_T4 +description: Execute /[^\[\b\]]+/.exec("abcdef") and check results +---*/ __executed = /[^\[\b\]]+/.exec("abcdef"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^\\[\\b\\]]+/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-1.js index a026545e15..a04d5d06bf 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.2/15.10.2.15-3-1.js - * @description Pattern - SyntaxError was thrown when 'A' does not contain exactly one character (15.10.2.5 step 3) - */ - - -function testcase() { - try { - var regExp = new RegExp("^[/w-c]$"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.2.15-3-1 +description: > + Pattern - SyntaxError was thrown when 'A' does not contain exactly + one character (15.10.2.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExp = new RegExp("^[/w-c]$"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-2.js index 826529727e..2f9bf20367 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15-3-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.2/15.10.2.15-3-2.js - * @description Pattern - SyntaxError was thrown when 'B' does not contain exactly one character (15.10.2.5 step 3) - */ - - -function testcase() { - try { - var regExp = new RegExp("^[a-/w]$"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.2.15-3-2 +description: > + Pattern - SyntaxError was thrown when 'B' does not contain exactly + one character (15.10.2.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExp = new RegExp("^[a-/w]$"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15-6-1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15-6-1.js index 67b1d1a3f1..f39db7b770 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15-6-1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15-6-1.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.2/15.10.2.15-6-1.js - * @description Pattern - SyntaxError was thrown when one character in CharSet 'A' greater than one character in CharSet 'B' (15.10.2.15 CharacterRange step 6) - */ - - -function testcase() { - try { - var regExp = new RegExp("^[z-a]$"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.2.15-6-1 +description: > + Pattern - SyntaxError was thrown when one character in CharSet 'A' + greater than one character in CharSet 'B' (15.10.2.15 + CharacterRange step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExp = new RegExp("^[z-a]$"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T1.js index 445093b5d0..eea878027f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T1.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T1.js - * @description Checking if execution of "/[b-ac-e]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T1 +description: > + Checking if execution of "/[b-ac-e]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-ac-e]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T10.js index 020749a9f3..1aecb00328 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T10.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T10.js - * @description Checking if execution of "/[\10b-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T10 +description: > + Checking if execution of "/[\10b-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\10b-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T11.js index b88af78e7d..beec600293 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T11.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T11.js - * @description Checking if execution of "/[\bd-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T11 +description: > + Checking if execution of "/[\bd-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\bd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T12.js index c81f72ad5d..45defcedab 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T12.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T12.js - * @description Checking if execution of "/[\Bd-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T12 +description: > + Checking if execution of "/[\Bd-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\Bd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T13.js index b0406f7527..c3118a67e6 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T13.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T13.js - * @description Checking if execution of "/[\td-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T13 +description: > + Checking if execution of "/[\td-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\td-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T14.js index cfb4eadc72..a0a5486e8f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T14.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T14.js - * @description Checking if execution of "/[\nd-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T14 +description: > + Checking if execution of "/[\nd-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\nd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T15.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T15.js index 17ff0ace0a..eb66be0d65 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T15.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T15.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T15.js - * @description Checking if execution of "/[\vd-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T15 +description: > + Checking if execution of "/[\vd-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\vd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T16.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T16.js index 2cede536f7..52d25e7d1c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T16.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T16.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T16.js - * @description Checking if execution of "/[\fd-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T16 +description: > + Checking if execution of "/[\fd-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\fd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T17.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T17.js index d2e265c993..6467b1d2cd 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T17.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T17.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T17.js - * @description Checking if execution of "/[\rd-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T17 +description: > + Checking if execution of "/[\rd-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\rd-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T18.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T18.js index f340674541..cde13e9e87 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T18.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T18.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T18.js - * @description Checking if execution of "/[\c0001d-G]/.exec("1")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T18 +description: > + Checking if execution of "/[\c0001d-G]/.exec("1")" leads to + throwing the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\c0001d-G]/.exec("1") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T19.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T19.js index bd569e65bd..049fa65297 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T19.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T19.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T19.js - * @description Checking if execution of "/[\x0061d-G]/.exec("1")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T19 +description: > + Checking if execution of "/[\x0061d-G]/.exec("1")" leads to + throwing the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\x0061d-G]/.exec("1") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T2.js index 7047103bb8..df9b21bd8e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T2.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T2.js - * @description Checking if execution of "/[a-dc-b]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T2 +description: > + Checking if execution of "/[a-dc-b]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[a-dc-b]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T20.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T20.js index 74043d31b7..25d45c7436 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T20.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T20.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T20.js - * @description Checking if execution of "/[\u0061d-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T20 +description: > + Checking if execution of "/[\u0061d-G]/.exec("a")" leads to + throwing the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\u0061d-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T21.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T21.js index 8483934845..07d47f3dcb 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T21.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T21.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T21.js - * @description Checking if execution of "/[\ad-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T21 +description: > + Checking if execution of "/[\ad-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\ad-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T22.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T22.js index aabbacb17b..8d456186f7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T22.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T22.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T22.js - * @description Checking if execution of "/[c-eb-a]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T22 +description: > + Checking if execution of "/[c-eb-a]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[c-eb-a]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T23.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T23.js index 0cd3f8f7e9..38091420e2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T23.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T23.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T23.js - * @description Checking if execution of "/[b-G\d]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T23 +description: > + Checking if execution of "/[b-G\d]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\d]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T24.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T24.js index d5744bab28..800a255bb3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T24.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T24.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T24.js - * @description Checking if execution of "/[b-G\D]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T24 +description: > + Checking if execution of "/[b-G\D]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\D]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T25.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T25.js index 2fc86dcbfb..4f270fd053 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T25.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T25.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T25.js - * @description Checking if execution of "/[b-G\s]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T25 +description: > + Checking if execution of "/[b-G\s]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\s]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T26.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T26.js index fecf0d82a9..13d00b55b8 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T26.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T26.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T26.js - * @description Checking if execution of "/[b-G\S]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T26 +description: > + Checking if execution of "/[b-G\S]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\S]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T27.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T27.js index 961466cfbc..72cd64f628 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T27.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T27.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T27.js - * @description Checking if execution of "/[b-G\w]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T27 +description: > + Checking if execution of "/[b-G\w]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\w]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T28.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T28.js index c4227e1a06..896abe7106 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T28.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T28.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T28.js - * @description Checking if execution of "/[b-G\W]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T28 +description: > + Checking if execution of "/[b-G\W]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\W]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T29.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T29.js index 651f6eed32..619d2aed0d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T29.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T29.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T29.js - * @description Checking if execution of "/[b-G\0]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T29 +description: > + Checking if execution of "/[b-G\0]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\0]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T3.js index be3e83de91..27c2f4892b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T3.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T3.js - * @description Checking if execution of "/[\db-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T3 +description: > + Checking if execution of "/[\db-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\db-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T30.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T30.js index b70c335db0..570f0caf60 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T30.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T30.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T30.js - * @description Checking if execution of "/[b-G\10]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T30 +description: > + Checking if execution of "/[b-G\10]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[b-G\\10]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T31.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T31.js index 4b6a854415..5c1c1ed5c4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T31.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T31.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T31.js - * @description Checking if execution of "/[d-G\b]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T31 +description: > + Checking if execution of "/[d-G\b]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\b]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T32.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T32.js index 35db57aacd..842277bc65 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T32.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T32.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T32.js - * @description Checking if execution of "/[d-G\B]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T32 +description: > + Checking if execution of "/[d-G\B]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\B]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T33.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T33.js index 77f12e3141..b28acc4ece 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T33.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T33.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T33.js - * @description Checking if execution of "/[d-G\t]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T33 +description: > + Checking if execution of "/[d-G\t]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\t]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T34.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T34.js index 6f1bf0aa58..4649349cf2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T34.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T34.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T34.js - * @description Checking if execution of "/[d-G\n]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T34 +description: > + Checking if execution of "/[d-G\n]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\n]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T35.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T35.js index e4bcc9a9ad..0de467bf68 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T35.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T35.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T35.js - * @description Checking if execution of "/[d-G\v]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T35 +description: > + Checking if execution of "/[d-G\v]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\v]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T36.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T36.js index eaa9b66cd9..8002df6451 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T36.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T36.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T36.js - * @description Checking if execution of "/[d-G\f]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T36 +description: > + Checking if execution of "/[d-G\f]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\f]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T37.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T37.js index 49b37df665..2275d015b2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T37.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T37.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T37.js - * @description Checking if execution of "/[d-G\r]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T37 +description: > + Checking if execution of "/[d-G\r]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\r]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T38.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T38.js index 43f5dbf928..002ec67d9e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T38.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T38.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T38.js - * @description Checking if execution of "/[d-G\c0001]/.exec("1")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T38 +description: > + Checking if execution of "/[d-G\c0001]/.exec("1")" leads to + throwing the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\c0001]/.exec("1") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T39.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T39.js index bbd17f8d67..91ec4830cc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T39.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T39.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T39.js - * @description Checking if execution of "/[d-G\x0061]/.exec("1")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T39 +description: > + Checking if execution of "/[d-G\x0061]/.exec("1")" leads to + throwing the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\x0061]/.exec("1") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T4.js index 5a9c458f49..9550aa77b5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T4.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T4.js - * @description Checking if execution of "/[\Db-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T4 +description: > + Checking if execution of "/[\Db-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\Db-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T40.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T40.js index 061268c94d..53b94cef04 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T40.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T40.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T40.js - * @description Checking if execution of "/[d-G\u0061]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T40 +description: > + Checking if execution of "/[d-G\u0061]/.exec("a")" leads to + throwing the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\u0061]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T41.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T41.js index 3dc4f10c44..53a1cd17b2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T41.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T41.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T41.js - * @description Checking if execution of "/[d-G\a]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T41 +description: > + Checking if execution of "/[d-G\a]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[d-G\\a]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T5.js index a17b0abc8b..c7231cff53 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T5.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T5.js - * @description Checking if execution of "/[\sb-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T5 +description: > + Checking if execution of "/[\sb-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\sb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T6.js index 6a20c51d68..41590e4f71 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T6.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T6.js - * @description Checking if execution of "/[\Sb-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T6 +description: > + Checking if execution of "/[\Sb-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\Sb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T7.js index cee8100a6e..fe0c0de442 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T7.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T7.js - * @description Checking if execution of "/[\wb-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T7 +description: > + Checking if execution of "/[\wb-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\wb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T8.js index 2f45104d6e..53453b3dbb 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T8.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T8.js - * @description Checking if execution of "/[\Wb-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T8 +description: > + Checking if execution of "/[\Wb-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\Wb-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T9.js index e4d64bfc82..3ebe54723d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T9.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The internal helper function CharacterRange takes two CharSet parameters A and B and performs the - * following: - * If A does not contain exactly one character or B does not contain exactly one character then throw - * a SyntaxError exception - * - * @path ch15/15.10/15.10.2/15.10.2.15/S15.10.2.15_A1_T9.js - * @description Checking if execution of "/[\0b-G]/.exec("a")" leads to throwing the correct exception - */ +/*--- +info: > + The internal helper function CharacterRange takes two CharSet parameters A and B and performs the + following: + If A does not contain exactly one character or B does not contain exactly one character then throw + a SyntaxError exception +es5id: 15.10.2.15_A1_T9 +description: > + Checking if execution of "/[\0b-G]/.exec("a")" leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -19,4 +21,3 @@ try { $ERROR('#1.2: /[\\0b-G]/.exec("a") throw SyntaxError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.2-1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.2-1.js index c296eeace8..60b69de9a5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.2-1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.2-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.2/15.10.2.2-1.js - * @description Pattern - SyntaxError was thrown when compile a pattern - */ - - -function testcase() { - try { - var regExp = new RegExp("\\"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.2.2-1 +description: Pattern - SyntaxError was thrown when compile a pattern +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExp = new RegExp("\\"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T1.js index a40126f916..2a2ae4b59d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T1.js - * @description Execute /a|ab/.exec("abc") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T1 +description: Execute /a|ab/.exec("abc") and check results +---*/ __executed = /a|ab/.exec("abc"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a|ab/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T10.js index adec51a488..8c4bec63da 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T10.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T10.js - * @description Execute /(?:ab|cd)+|ef/i.exec("AEKeFCDab") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T10 +description: "Execute /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\") and check results" +---*/ __executed = /(?:ab|cd)+|ef/i.exec("AEKeFCDab"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?:ab|cd)+|ef/i.exec("AEKeFCDab"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T11.js index c1146e5c29..8291fb1c30 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T11.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T11.js - * @description Execute /11111|111/.exec("1111111111111111") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T11 +description: Execute /11111|111/.exec("1111111111111111") and check results +---*/ __executed = /11111|111/.exec("1111111111111111"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /11111|111/.exec("1111111111111111"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T12.js index 6668f36834..ac663fa69e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T12.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T12.js - * @description Execute /xyz|.../.exec("abc") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T12 +description: Execute /xyz|.../.exec("abc") and check results +---*/ __executed = /xyz|.../.exec("abc"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /xyz|.../.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T13.js index 5b3c051838..be914010a9 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T13.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T13.js - * @description Execute /(.)..|abc/.exec("abc") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T13 +description: Execute /(.)..|abc/.exec("abc") and check results +---*/ __executed = /(.)..|abc/.exec("abc"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(.)..|abc/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T14.js index ea2cd7cd6e..3661d1dca0 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T14.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T14.js - * @description Execute /.+: gr(a|e)y/.exec("color: grey") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T14 +description: "Execute /.+: gr(a|e)y/.exec(\"color: grey\") and check results" +---*/ __executed = /.+: gr(a|e)y/.exec("color: grey"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T15.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T15.js index a0e4b85165..59028e3cc0 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T15.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T15.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T15.js - * @description Execute /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T15 +description: > + Execute /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob") and check + results +---*/ __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob"); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec("Hi Bob"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T16.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T16.js index 0f4cef5f07..45e8ad227d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T16.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T16.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T16.js - * @description Execute /()|/.exec("") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T16 +description: Execute /()|/.exec("") and check results +---*/ __executed = /()|/.exec(""); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /()|/.exec(""); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T17.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T17.js index bf6313a96c..6cad95cf1e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T17.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T17.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T17.js - * @description Execute /|()/.exec("") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T17 +description: Execute /|()/.exec("") and check results +---*/ __executed = /|()/.exec(""); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /|()/.exec(""); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T2.js index b07cdbab54..cc374cdb03 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T2.js - * @description Execute /((a)|(ab))((c)|(bc))/.exec("abc") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T2 +description: Execute /((a)|(ab))((c)|(bc))/.exec("abc") and check results +---*/ __executed = /((a)|(ab))((c)|(bc))/.exec("abc"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /((a)|(ab))((c)|(bc))/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T3.js index a534fd3928..3c2bfe58cb 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T3.js - * @description Execute /\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T3 +description: > + Execute /\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12") and + check results +---*/ __executed = /\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12"); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and of course repeat 12"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T4.js index 87579047db..3d7b4bcb42 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T4.js - * @description Execute /\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T4 +description: > + Execute /\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat + 12") and check results +---*/ __executed = /\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12"); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{3}|[a-z]{4}/.exec("2, 12 and 234 AND of course repeat 12"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T5.js index e9ffabc48d..9ff57118ec 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T5.js - * @description Execute /\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T5 +description: > + Execute /\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1") and check + results +---*/ __executed = /\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1"); @@ -16,5 +18,3 @@ __executed = /\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1"); if (__executed) { $ERROR('#1: /\\d{3}|[a-z]{4}/.test("2, 12 and 23 AND 0.00.1") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T6.js index d80ed9a977..486b1c2f94 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T6.js - * @description Execute /ab|cd|ef/i.exec("AEKFCD") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T6 +description: Execute /ab|cd|ef/i.exec("AEKFCD") and check results +---*/ __executed = /ab|cd|ef/i.exec("AEKFCD"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /ab|cd|ef/i.exec("AEKFCD"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T7.js index e35fe0c43b..fe1fd889c3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T7.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T7.js - * @description Execute /ab|cd|ef/.test("AEKFCD") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T7 +description: Execute /ab|cd|ef/.test("AEKFCD") and check results +---*/ __executed = /ab|cd|ef/.test("AEKFCD"); @@ -16,5 +16,3 @@ __executed = /ab|cd|ef/.test("AEKFCD"); if (__executed) { $ERROR('#1: /ab|cd|ef/.test("AEKFCD") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T8.js index 5f63747202..5da7369f0c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T8.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T8.js - * @description Execute /(?:ab|cd)+|ef/i.exec("AEKFCD") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T8 +description: "Execute /(?:ab|cd)+|ef/i.exec(\"AEKFCD\") and check results" +---*/ __executed = /(?:ab|cd)+|ef/i.exec("AEKFCD"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCD"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T9.js index 4226e80b55..59b9cd3a8e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T9.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The | regular expression operator separates two alternatives. - * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). - * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) - * - * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T9.js - * @description Execute /(?:ab|cd)+|ef/i.exec("AEKFCDab") and check results - */ +/*--- +info: > + The | regular expression operator separates two alternatives. + The pattern first tries to match the left Alternative (followed by the sequel of the regular expression). + If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression) +es5id: 15.10.2.3_A1_T9 +description: "Execute /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\") and check results" +---*/ __executed = /(?:ab|cd)+|ef/i.exec("AEKFCDab"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?:ab|cd)+|ef/i.exec("AEKFCDab"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.5-3-1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.5-3-1.js index a044aa8749..66aff23314 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.5-3-1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.5-3-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.2/15.10.2.5-3-1.js - * @description Term - SyntaxError was thrown when max is finite and less than min (15.10.2.5 step 3) - */ - - -function testcase() { - try { - var regExp = new RegExp("0{2,1}"); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.2.5-3-1 +description: > + Term - SyntaxError was thrown when max is finite and less than min + (15.10.2.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExp = new RegExp("0{2,1}"); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T1.js index d24918c11a..eb95880df3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An Atom followed by a Quantifier is repeated the number of times specified by the Quantifier - * - * @path ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T1.js - * @description Execute /a[a-z]{2,4}/.exec("abcdefghi") and check results - */ +/*--- +info: > + An Atom followed by a Quantifier is repeated the number of times + specified by the Quantifier +es5id: 15.10.2.5_A1_T1 +description: Execute /a[a-z]{2,4}/.exec("abcdefghi") and check results +---*/ __executed = /a[a-z]{2,4}/.exec("abcdefghi"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[a-z]{2,4}/.exec("abcdefghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T2.js index dae4cdb506..0a08201ce4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An Atom followed by a Quantifier is repeated the number of times specified by the Quantifier - * - * @path ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T2.js - * @description Execute /a[a-z]{2,4}?/.exec("abcdefghi") and check results - */ +/*--- +info: > + An Atom followed by a Quantifier is repeated the number of times + specified by the Quantifier +es5id: 15.10.2.5_A1_T2 +description: Execute /a[a-z]{2,4}?/.exec("abcdefghi") and check results +---*/ __executed = /a[a-z]{2,4}?/.exec("abcdefghi"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[a-z]{2,4}?/.exec("abcdefghi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T3.js index 8a20e0dc5d..6d62ec395c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An Atom followed by a Quantifier is repeated the number of times specified by the Quantifier - * - * @path ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T3.js - * @description Execute /(aa|aabaac|ba|b|c)* /.exec("aabaac") and check results - */ +/*--- +info: > + An Atom followed by a Quantifier is repeated the number of times + specified by the Quantifier +es5id: 15.10.2.5_A1_T3 +description: Execute /(aa|aabaac|ba|b|c)* /.exec("aabaac") and check results +---*/ __executed = /(aa|aabaac|ba|b|c)*/.exec("aabaac"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(aa|aabaac|ba|b|c)*/.exec("aabaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T4.js index 53587b7123..9188e82124 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An Atom followed by a Quantifier is repeated the number of times specified by the Quantifier - * - * @path ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T4.js - * @description Execute /(z)((a+)?(b+)?(c))* /.exec("zaacbbbcac") and check results - */ +/*--- +info: > + An Atom followed by a Quantifier is repeated the number of times + specified by the Quantifier +es5id: 15.10.2.5_A1_T4 +description: Execute /(z)((a+)?(b+)?(c))* /.exec("zaacbbbcac") and check results +---*/ __executed = /(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(z)((a+)?(b+)?(c))*/.exec("zaacbbbcac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T5.js index ec2622b75c..b92cf4415c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An Atom followed by a Quantifier is repeated the number of times specified by the Quantifier - * - * @path ch15/15.10/15.10.2/15.10.2.5/S15.10.2.5_A1_T5.js - * @description Execute /(a*)b\1+/.exec("baaaac") and check results - */ +/*--- +info: > + An Atom followed by a Quantifier is repeated the number of times + specified by the Quantifier +es5id: 15.10.2.5_A1_T5 +description: Execute /(a*)b\1+/.exec("baaaac") and check results +---*/ __executed = /(a*)b\1+/.exec("baaaac"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(a*)b\\1+/.exec("baaaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T1.js index a08a925477..17ead8e0a8 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: $ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T1.js - * @description Execute /s$/.test("pairs\nmakes\tdouble") and check results - */ +/*--- +info: > + The production Assertion :: $ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A1_T1 +description: Execute /s$/.test("pairs\nmakes\tdouble") and check results +---*/ __executed = /s$/.test("pairs\nmakes\tdouble"); @@ -14,5 +15,3 @@ __executed = /s$/.test("pairs\nmakes\tdouble"); if (__executed) { $ERROR('#1: /s$/.test("pairs\\nmakes\\tdouble") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T2.js index e45809bb7f..fb549670b7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: $ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T2.js - * @description Execute /e$/.exec("pairs\nmakes\tdouble") and check results - */ +/*--- +info: > + The production Assertion :: $ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A1_T2 +description: Execute /e$/.exec("pairs\nmakes\tdouble") and check results +---*/ __executed = /e$/.exec("pairs\nmakes\tdouble"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /e$/.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T3.js index e5c73e365f..8dacddfb21 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: $ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T3.js - * @description Execute /s$/m.exec("pairs\nmakes\tdouble") and check results - */ +/*--- +info: > + The production Assertion :: $ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A1_T3 +description: Execute /s$/m.exec("pairs\nmakes\tdouble") and check results +---*/ __executed = /s$/m.exec("pairs\nmakes\tdouble"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /s$/m.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T4.js index dedbb27c1d..51f6f3cf8e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: $ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T4.js - * @description Execute /[^e]$/mg.exec("pairs\nmakes\tdouble") and check results - */ +/*--- +info: > + The production Assertion :: $ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A1_T4 +description: Execute /[^e]$/mg.exec("pairs\nmakes\tdouble") and check results +---*/ __executed = /[^e]$/mg.exec("pairs\nmakes\tdouble"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^e]$/mg.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T5.js index bf38830cd4..ca5f469c9d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: $ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A1_T5.js - * @description Execute /es$/mg.exec("pairs\nmakes\tdoubl\u0065s") and check results - */ +/*--- +info: > + The production Assertion :: $ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A1_T5 +description: > + Execute /es$/mg.exec("pairs\nmakes\tdoubl\u0065s") and check + results +---*/ __executed = /es$/mg.exec("pairs\nmakes\tdoubl\u0065s"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /es$/mg.exec("pairs\\nmakes\\tdoubl\\u0065s"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T1.js index 918559b1ce..0cd5bbe033 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T1.js - * @description Execute /^m/.test("pairs\nmakes\tdouble") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T1 +description: Execute /^m/.test("pairs\nmakes\tdouble") and check results +---*/ __executed = /^m/.test("pairs\nmakes\tdouble"); @@ -14,5 +15,3 @@ __executed = /^m/.test("pairs\nmakes\tdouble"); if (__executed) { $ERROR('#1: /^m/.test("pairs\\nmakes\\tdouble") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T10.js index 298258b4af..5dac7f3dfa 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T10.js - * @description Execute /^\d+/m.exec("abc\n123xyz") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T10 +description: Execute /^\d+/m.exec("abc\n123xyz") and check results +---*/ __executed = /^\d+/m.exec("abc\n123xyz"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^\\d+/m.exec("abc\\n123xyz"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T2.js index 8fb843ec3d..ccb819c4c5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T2.js - * @description Execute /^m/m.exec("pairs\nmakes\tdouble") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T2 +description: Execute /^m/m.exec("pairs\nmakes\tdouble") and check results +---*/ __executed = /^m/m.exec("pairs\nmakes\tdouble"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^m/m.exec("pairs\\nmakes\\tdouble"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T3.js index 144dd942ad..7a318f7a85 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T3.js - * @description Execute /^p[a-z]/.exec("pairs\nmakes\tdouble\npesos") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T3 +description: > + Execute /^p[a-z]/.exec("pairs\nmakes\tdouble\npesos") and check + results +---*/ __executed = /^p[a-z]/.exec("pairs\nmakes\tdouble\npesos"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^p[a-z]/.exec("pairs\\nmakes\\tdouble\\npesos"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T4.js index b1fd56e2ac..033311fb15 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T4.js - * @description Execute /^p[a-z]/m.exec("pairs\nmakes\tdouble\npesos") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T4 +description: > + Execute /^p[a-z]/m.exec("pairs\nmakes\tdouble\npesos") and check + results +---*/ __executed = /^p[b-z]/m.exec("pairs\nmakes\tdouble\npesos"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^p[b-z]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T5.js index 322a2dd54b..d8827307d0 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T5.js - * @description Execute /^[^p]/m.exec("pairs\nmakes\tdouble\npesos") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T5 +description: > + Execute /^[^p]/m.exec("pairs\nmakes\tdouble\npesos") and check + results +---*/ __executed = /^[^p]/m.exec("pairs\nmakes\tdouble\npesos"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^[^p]/m.exec("pairs\\nmakes\\tdouble\\npesos"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T6.js index 4c702c9f2c..baf08df153 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T6.js - * @description Execute /^ab/.exec("abcde") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T6 +description: Execute /^ab/.exec("abcde") and check results +---*/ __executed = /^ab/.exec("abcde"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^ab/.exec("abcde"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T7.js index aa76aaa6e4..69e63ecb42 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T7.js - * @description Execute /^..^e/.test("ab\ncde") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T7 +description: Execute /^..^e/.test("ab\ncde") and check results +---*/ __executed = /^..^e/.test("ab\ncde"); @@ -14,5 +15,3 @@ __executed = /^..^e/.test("ab\ncde"); if (__executed) { $ERROR('#1: /^..^e/.test("ab\\ncde") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T8.js index 9017acdf62..4420684bdf 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T8.js - * @description Execute /^xxx/.test("yyyyy") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T8 +description: Execute /^xxx/.test("yyyyy") and check results +---*/ __executed = /^xxx/.test("yyyyy"); @@ -14,5 +15,3 @@ __executed = /^xxx/.test("yyyyy"); if (__executed) { $ERROR('#1: /^xxx/.test("yyyyy") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T9.js index f6d678ab92..c1550f80f0 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: ^ evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A2_T9.js - * @description Execute /^\^+/.exec("^^^x") and check results - */ +/*--- +info: > + The production Assertion :: ^ evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A2_T9 +description: Execute /^\^+/.exec("^^^x") and check results +---*/ __executed = /^\^+/.exec("^^^x"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^\\^+/.exec("^^^x"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T1.js index 9192879435..f32f5edbb3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T1.js - * @description Execute /\bp/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T1 +description: > + Execute /\bp/.exec("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /\bp/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\bp/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T10.js index 9fd41c9cd5..dc21f3aa2b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T10.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T10.js - * @description Execute /\brobot\b/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T10 +description: > + Execute /\brobot\b/.exec("pilot\nsoviet robot\topenoffice") and + check results +---*/ __executed = /\brobot\b/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\brobot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T11.js index dac31e0880..cfcf9d5986 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T11.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T11.js - * @description Execute /\b\w{5}\b/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T11 +description: > + Execute /\b\w{5}\b/.exec("pilot\nsoviet robot\topenoffice") and + check results +---*/ __executed = /\b\w{5}\b/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\b\\w{5}\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T12.js index 5d37ef9491..738714d082 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T12.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T12.js - * @description Execute /\bop/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T12 +description: > + Execute /\bop/.exec("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /\bop/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\bop/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T13.js index 9efc67dbce..9973d5adf5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T13.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T13.js - * @description Execute /op\b/.test("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T13 +description: > + Execute /op\b/.test("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /op\b/.test("pilot\nsoviet robot\topenoffice"); @@ -14,5 +17,3 @@ __executed = /op\b/.test("pilot\nsoviet robot\topenoffice"); if (__executed) { $ERROR('#1: /op\\b/.test("pilot\\nsoviet robot\\topenoffice") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T14.js index 78d5b00fd1..75175ee987 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T14.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T14.js - * @description Execute /e\b/.exec("pilot\nsoviet robot\topenoffic\u0065") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T14 +description: > + Execute /e\b/.exec("pilot\nsoviet robot\topenoffic\u0065") and + check results +---*/ __executed = /e\b/.exec("pilot\nsoviet robot\topenoffic\u0065"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /e\\b/.exec("pilot\\nsoviet robot\\topenoffic\\u0065"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T15.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T15.js index ffdbd71bcd..a614384226 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T15.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T15.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T15.js - * @description Execute /\be/.test("pilot\nsoviet robot\topenoffic\u0065") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T15 +description: > + Execute /\be/.test("pilot\nsoviet robot\topenoffic\u0065") and + check results +---*/ __executed = /\be/.test("pilot\nsoviet robot\topenoffic\u0065"); @@ -14,5 +17,3 @@ __executed = /\be/.test("pilot\nsoviet robot\topenoffic\u0065"); if (__executed) { $ERROR('#1: /\\be/.test("pilot\\nsoviet robot\\topenoffic\\u0065") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T2.js index 9e823cf24e..b4c2ac07ad 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T2.js - * @description Execute /ot\b/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T2 +description: > + Execute /ot\b/.exec("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /ot\b/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /ot\\b/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T3.js index 97a2ba9d1a..81c31a8c42 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T3.js - * @description Execute /\bot/.test("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T3 +description: > + Execute /\bot/.test("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /\bot/.test("pilot\nsoviet robot\topenoffice"); @@ -14,5 +17,3 @@ __executed = /\bot/.test("pilot\nsoviet robot\topenoffice"); if (__executed) { $ERROR('#1: /\\bot/.test("pilot\\nsoviet robot\\topenoffice") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T4.js index 7e45b6c68b..75700c2356 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T4.js - * @description Execute /\bso/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T4 +description: > + Execute /\bso/.exec("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /\bso/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\bso/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T5.js index 3ec5ab4e08..2f2b4cd458 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T5.js - * @description Execute /so\b/.test("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T5 +description: > + Execute /so\b/.test("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /so\b/.test("pilot\nsoviet robot\topenoffice"); @@ -14,5 +17,3 @@ __executed = /so\b/.test("pilot\nsoviet robot\topenoffice"); if (__executed) { $ERROR('#1: /so\\b/.test("pilot\\nsoviet robot\\topenoffice") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T6.js index e1e7ba3ab0..26a49ab79c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T6.js - * @description Execute /[^o]t\b/.exec("pilOt\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T6 +description: > + Execute /[^o]t\b/.exec("pilOt\nsoviet robot\topenoffice") and + check results +---*/ __executed = /[^o]t\b/.exec("pilOt\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^o]t\\b/.exec("pilOt\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T7.js index 4c6970b3f8..491223e765 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T7.js - * @description Execute /[^o]t\b/i.exec("pilOt\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T7 +description: > + Execute /[^o]t\b/i.exec("pilOt\nsoviet robot\topenoffice") and + check results +---*/ __executed = /[^o]t\b/i.exec("pilOt\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^o]t\\b/i.exec("pilOt\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T8.js index 6791577576..0ab60189be 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T8.js - * @description Execute /\bro/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T8 +description: > + Execute /\bro/.exec("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /\bro/.exec("pilot\nsoviet robot\topenoffice"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\bro/.exec("pilot\\nsoviet robot\\topenoffice"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T9.js index 191a424879..3428294075 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \b evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A3_T9.js - * @description Execute /r\b/.exec("pilot\nsoviet robot\topenoffice") and check results - */ +/*--- +info: > + The production Assertion :: \b evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A3_T9 +description: > + Execute /r\b/.exec("pilot\nsoviet robot\topenoffice") and check + results +---*/ __executed = /r\b/.test("pilot\nsoviet robot\topenoffice"); @@ -14,5 +17,3 @@ __executed = /r\b/.test("pilot\nsoviet robot\topenoffice"); if (__executed) { $ERROR('#1: /r\\b/.test("pilot\\nsoviet robot\\topenoffice") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T1.js index b1d4a2325e..f8116e1a94 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T1.js - * @description Execute /\Bevil\B/.exec("devils arise\tfor\nevil") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T1 +description: > + Execute /\Bevil\B/.exec("devils arise\tfor\nevil") and check + results +---*/ __executed = /\Bevil\B/.exec("devils arise\tfor\nevil"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\Bevil\\B/.exec("devils arise\\tfor\\nevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T2.js index d28b7cac47..faab780dff 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T2.js - * @description Execute /[f-z]e\B/.exec("devils arise\tfor\nevil") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T2 +description: > + Execute /[f-z]e\B/.exec("devils arise\tfor\nevil") and check + results +---*/ __executed = /[f-z]e\B/.exec("devils arise\tfor\nrevil"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[f-z]e\\B/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T3.js index 3bb63efe4c..46ab7a7a0e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T3.js - * @description Execute /\Bo\B/.exec("devils arise\tfor\nevil") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T3 +description: Execute /\Bo\B/.exec("devils arise\tfor\nevil") and check results +---*/ __executed = /\Bo\B/i.exec("devils arise\tfOr\nrevil"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\Bo\\B/i.exec("devils arise\\tfOr\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T4.js index 60965fe6c4..18cb1c6ee2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T4.js - * @description Execute /\B\w\B/.exec("devils arise\tfor\nevil") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T4 +description: Execute /\B\w\B/.exec("devils arise\tfor\nevil") and check results +---*/ __executed = /\B\w\B/.exec("devils arise\tfor\nrevil"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\B\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T5.js index 1e0863c4c3..2fa820127a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T5.js - * @description Execute /\w\B/.exec("devils arise\tfor\nevil") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T5 +description: Execute /\w\B/.exec("devils arise\tfor\nevil") and check results +---*/ __executed = /\w\B/.exec("devils arise\tfor\nrevil"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\w\\B/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T6.js index c6a63358aa..7a6d46c490 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T6.js - * @description Execute /\B\w/.exec("devils arise\tfor\nevil") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T6 +description: Execute /\B\w/.exec("devils arise\tfor\nevil") and check results +---*/ __executed = /\B\w/.exec("devils arise\tfor\nrevil"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\B\\w/.exec("devils arise\\tfor\\nrevil"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T7.js index b60057fbed..67ff6272e7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T7.js - * @description Execute /\B\[^z]{4}\B/.test("devil arise\tforzzx\nevils") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T7 +description: > + Execute /\B\[^z]{4}\B/.test("devil arise\tforzzx\nevils") and + check results +---*/ __executed = /\B\[^z]{4}\B/.test("devil arise\tforzzx\nevils"); @@ -14,5 +17,3 @@ __executed = /\B\[^z]{4}\B/.test("devil arise\tforzzx\nevils"); if (__executed) { $ERROR('#1: /\\B\\[^z]{4}\\B/.test("devil arise\\tforzzx\\nevils") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T8.js index c19aad65b3..3cd61a05b4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Assertion :: \B evaluates by returning an internal AssertionTester closure that takes a State argument x and performs the ... - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A4_T8.js - * @description Execute /\B\w{4}\B/.exec("devil arise\tforzzx\nevils") and check results - */ +/*--- +info: > + The production Assertion :: \B evaluates by returning an internal + AssertionTester closure that takes a State argument x and performs the ... +es5id: 15.10.2.6_A4_T8 +description: > + Execute /\B\w{4}\B/.exec("devil arise\tforzzx\nevils") and check + results +---*/ __executed = /\B\w{4}\B/.exec("devil arise\tforzzx\nevils"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\B\\w{4}\\B/.exec("devil arise\\tforzzx\\nevils"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T1.js index f8fb83ed35..5f9398de46 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since assertion evaluating do not change endIndex repetition of assertion does the same result - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T1.js - * @description Execute /^^^^^^^robot$$$$/.exec("robot") and check results - */ +/*--- +info: > + Since assertion evaluating do not change endIndex repetition of assertion + does the same result +es5id: 15.10.2.6_A5_T1 +description: Execute /^^^^^^^robot$$$$/.exec("robot") and check results +---*/ __executed = /^^^^^^^robot$$$$/.exec("robot"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^^^^^^^robot$$$$/.exec("robot"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T2.js index e63b1666fe..3ad2fa64a7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since assertion evaluating do not change endIndex repetition of assertion does the same result - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A5_T2.js - * @description Execute /\B\B\B\B\B\Bbot\b\b\b\b\b\b\b/.exec("robot wall-e") and check results - */ +/*--- +info: > + Since assertion evaluating do not change endIndex repetition of assertion + does the same result +es5id: 15.10.2.6_A5_T2 +description: > + Execute /\B\B\B\B\B\Bbot\b\b\b\b\b\b\b/.exec("robot wall-e") and + check results +---*/ __executed = /\B\B\B\B\B\Bbot\b\b\b\b\b\b\b/.exec("robot wall-e"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec("robot wall-e"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T1.js index 688884379e..8542758ec3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assertions in combination - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T1.js - * @description while asterix is non greedy it is run till the end because of dollar assertion - */ +/*--- +info: Assertions in combination +es5id: 15.10.2.6_A6_T1 +description: > + while asterix is non greedy it is run till the end because of + dollar assertion +---*/ __executed = /^.*?$/.exec("Hello World"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^.*?$/.exec("Hello World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T2.js index a1e4818c9c..15699ce151 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assertions in combination - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T2.js - * @description Execute /^.*?/.exec("Hello World") and check results - */ +/*--- +info: Assertions in combination +es5id: 15.10.2.6_A6_T2 +description: Execute /^.*?/.exec("Hello World") and check results +---*/ __executed = /^.*?/.exec("Hello World"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^.*?/.exec("Hello World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T3.js index 8a1f3ad38a..9d03c1cb0b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assertions in combination - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T3.js - * @description while asterix is non greedy it is run till matches end or colon - */ +/*--- +info: Assertions in combination +es5id: 15.10.2.6_A6_T3 +description: while asterix is non greedy it is run till matches end or colon +---*/ __executed = /^.*?(:|$)/.exec("Hello: World"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^.*?(:|$)/.exec("Hello: World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T4.js index 08cd42f785..30a86d07cc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assertions in combination - * - * @path ch15/15.10/15.10.2/15.10.2.6/S15.10.2.6_A6_T4.js - * @description Execute /^.*(:|$)/.exec("Hello: World") and check results - */ +/*--- +info: Assertions in combination +es5id: 15.10.2.6_A6_T4 +description: "Execute /^.*(:|$)/.exec(\"Hello: World\") and check results" +---*/ __executed = /^.*(:|$)/.exec("Hello: World"); @@ -35,5 +34,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^.*(:|$)/.exec("Hello: World"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T1.js index 2fefde618e..cdba16ac03 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T1.js - * @description Execute /\d{2,4}/.exec("the answer is 42") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T1 +description: Execute /\d{2,4}/.exec("the answer is 42") and check results +---*/ __executed = /\d{2,4}/.exec("the answer is 42"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T10.js index d141f3d65e..52f181c767 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T10.js - * @description Execute /b{0,93}c/.exec("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T10 +description: Execute /b{0,93}c/.exec("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T11.js index 2470bcfc7c..507e1debf4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T11.js - * @description Execute /bx{0,93}c/.exec("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T11 +description: Execute /bx{0,93}c/.exec("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T12.js index c61c55d35f..f94f083411 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T12.js - * @description Execute /.{0,93}/.exec("weirwerdf") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T12 +description: Execute /.{0,93}/.exec("weirwerdf") and check results +---*/ __executed = /.{0,93}/.exec("weirwerdf"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /.{0,93}/.exec("weirwerdf"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T2.js index b61f802eba..350a1a2097 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T2.js - * @description Execute /\d{2,4}/.test("the 7 movie") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T2 +description: Execute /\d{2,4}/.test("the 7 movie") and check results +---*/ __executed = /\d{2,4}/.test("the 7 movie"); @@ -14,5 +15,3 @@ __executed = /\d{2,4}/.test("the 7 movie"); if (__executed) { $ERROR('#1: /\\d{2,4}/.test("the 7 movie") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T3.js index 83ffab217b..d33d91928a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T3.js - * @description Execute /\d{2,4}/.exec("the 20000 Leagues Under the Sea book") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T3 +description: > + Execute /\d{2,4}/.exec("the 20000 Leagues Under the Sea book") and + check results +---*/ __executed = /\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T4.js index 8ae84c992e..88f51ddf11 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T4.js - * @description Execute /\d{2,4}/.exec("the Fahrenheit 451 book") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T4 +description: Execute /\d{2,4}/.exec("the Fahrenheit 451 book") and check results +---*/ __executed = /\d{2,4}/.exec("the Fahrenheit 451 book"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T5.js index 25d5d368bb..b5d694783d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T5.js - * @description Execute /\d{2,4}/.exec("the 1984 novel") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T5 +description: Execute /\d{2,4}/.exec("the 1984 novel") and check results +---*/ __executed = /\d{2,4}/.exec("the 1984 novel"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T6.js index bacc091422..f7c3aadb5d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T6.js - * @description Execute /\d{2,4}/.exec("0a0\u0031\u0031b") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T6 +description: Execute /\d{2,4}/.exec("0a0\u0031\u0031b") and check results +---*/ __executed = /\d{2,4}/.exec("0a0\u0031\u0031b"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T7.js index 239d624fae..5c30f5fd95 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T7.js - * @description Execute /\d{2,4}/.exec("0a0\u0031\u003122b") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T7 +description: Execute /\d{2,4}/.exec("0a0\u0031\u003122b") and check results +---*/ __executed = /\d{2,4}/.exec("0a0\u0031\u003122b"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T8.js index 5b9d406e7b..fe8f75ce04 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T8.js - * @description Execute /b{2,3}c/.exec("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T8 +description: Execute /b{2,3}c/.exec("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T9.js index 14a6bba247..7119a2916b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ... - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A1_T9.js - * @description Execute /b{42,93}c/.exec("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } + evaluates as ... +es5id: 15.10.2.7_A1_T9 +description: Execute /b{42,93}c/.exec("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{42,93}c/.test("aaabbbbcccddeeeefffff"); @@ -14,5 +15,3 @@ __executed = /b{42,93}c/.test("aaabbbbcccddeeeefffff"); if (__executed) { $ERROR('#1: /b{42,93}c/.test("aaabbbbcccddeeeefffff") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T1.js index 0758297ca8..42c1352c6c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * i) The production QuantifierPrefix :: { DecimalDigits } evaluates... - * ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T1.js - * @description Execute /\w{3}\d?/.exec("CE\uFFFFL\uFFDDbox127") and check results - */ +/*--- +info: > + i) The production QuantifierPrefix :: { DecimalDigits } evaluates... + ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 +es5id: 15.10.2.7_A2_T1 +description: Execute /\w{3}\d?/.exec("CE\uFFFFL\uFFDDbox127") and check results +---*/ __executed = /\w{3}\d?/.exec("CE\uFFFFL\uFFDDbox127"); @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T2.js index 0bd93de401..2e54cb1b6b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * i) The production QuantifierPrefix :: { DecimalDigits } evaluates... - * ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T2.js - * @description Execute /\w{3}\d?/.exec("CELL\uFFDDbox127") and check results - */ +/*--- +info: > + i) The production QuantifierPrefix :: { DecimalDigits } evaluates... + ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 +es5id: 15.10.2.7_A2_T2 +description: Execute /\w{3}\d?/.exec("CELL\uFFDDbox127") and check results +---*/ __executed = /\w{3}\d?/.exec("CELL\uFFDDbox127"); @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T3.js index ea5542af22..b9372159f1 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * i) The production QuantifierPrefix :: { DecimalDigits } evaluates... - * ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T3.js - * @description Execute /b{2}c/.exec("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + i) The production QuantifierPrefix :: { DecimalDigits } evaluates... + ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 +es5id: 15.10.2.7_A2_T3 +description: Execute /b{2}c/.exec("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T4.js index 9f70d35739..b0efa95109 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * i) The production QuantifierPrefix :: { DecimalDigits } evaluates... - * ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A2_T4.js - * @description Execute /b{8}c/.test("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + i) The production QuantifierPrefix :: { DecimalDigits } evaluates... + ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 +es5id: 15.10.2.7_A2_T4 +description: Execute /b{8}c/.test("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{8}/.test("aaabbbbcccddeeeefffff"); @@ -15,5 +15,3 @@ __executed = /b{8}/.test("aaabbbbcccddeeeefffff"); if (__executed) { $ERROR('#1: /b{8}/.test("aaabbbbcccddeeeefffff") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T1.js index 2b252a2c41..50cabdd202 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T1.js - * @description Execute /\s+java\s+/.exec("language java\n") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T1 +description: Execute /\s+java\s+/.exec("language java\n") and check results +---*/ __executed = /\s+java\s+/.exec("language java\n"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T10.js index 94d161b679..b4c86fec91 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T10.js - * @description Execute /o+/.test("abcdefg") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T10 +description: Execute /o+/.test("abcdefg") and check results +---*/ __executed = /o+/.test("abcdefg"); @@ -14,5 +15,3 @@ __executed = /o+/.test("abcdefg"); if (__executed) { $ERROR('#1: /o+/.test("abcdefg") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T11.js index 24eeaf9624..1a9c47c3d2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T11.js - * @description Execute /d+/.exec("abcdefg") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T11 +description: Execute /d+/.exec("abcdefg") and check results +---*/ __executed = /d+/.exec("abcdefg"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /d+/.exec("abcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T12.js index 761c499134..88e65f3ff7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T12.js - * @description Execute /(b+)(b+)(b+)/.exec("abbbbbbbc") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T12 +description: Execute /(b+)(b+)(b+)/.exec("abbbbbbbc") and check results +---*/ __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T13.js index 70f8e1afad..91569e9dcc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T13.js - * @description Execute /(b+)(b*)/.exec("abbbbbbbc") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T13 +description: Execute /(b+)(b*)/.exec("abbbbbbbc") and check results +---*/ __executed = /(b+)(b*)/.exec("abbbbbbbc"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T14.js index d1e713f9a5..7fef3c72ae 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T14.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T14.js - * @description Execute /b*b+/.exec("abbbbbbbc") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T14 +description: Execute /b*b+/.exec("abbbbbbbc") and check results +---*/ __executed = /b*b+/.exec("abbbbbbbc"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /b*b+/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T2.js index 648531c41a..0955ff27d1 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T2.js - * @description Execute /\s+java\s+/.exec("\t java object") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T2 +description: Execute /\s+java\s+/.exec("\t java object") and check results +---*/ __executed = /\s+java\s+/.exec("\t java object"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T3.js index 149f3c98ec..dbc7c31a3a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T3.js - * @description Execute /\s+java\s+/.test("\t javax package") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T3 +description: Execute /\s+java\s+/.test("\t javax package") and check results +---*/ __executed = /\s+java\s+/.test("\t javax package"); @@ -14,5 +15,3 @@ __executed = /\s+java\s+/.test("\t javax package"); if (__executed) { $ERROR('#1: /\\s+java\\s+/.test("\\t javax package") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T4.js index 1d566b277c..3f94d71c07 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T4.js - * @description Execute /\s+java\s+/.test("java\n\nobject") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T4 +description: Execute /\s+java\s+/.test("java\n\nobject") and check results +---*/ __executed = /\s+java\s+/.test("java\n\nobject"); @@ -14,5 +15,3 @@ __executed = /\s+java\s+/.test("java\n\nobject"); if (__executed) { $ERROR('#1: /\\s+java\\s+/.test("java\\n\\nobject") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T5.js index 0fb67ae6a5..752553c28d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T5.js - * @description Execute /[a-z]+\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T5 +description: > + Execute /[a-z]+\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0") and check + results +---*/ __executed = /[a-z]+\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T6.js index f7811bf4a5..017a373c02 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T6.js - * @description Execute /[a-z]+\d+/.exec("__abc123.0") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T6 +description: Execute /[a-z]+\d+/.exec("__abc123.0") and check results +---*/ __executed = /[a-z]+\d+/.exec("__abc123.0"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T7.js index 50df9d4c83..cdaf8cc502 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T7.js - * @description Execute /[a-z]+(\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T7 +description: > + Execute /[a-z]+(\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0") and + check results +---*/ __executed = /[a-z]+(\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T8.js index f958378580..ec5ee34d3e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T8.js - * @description Execute /[a-z]+(\d+)/.exec("__abc123.0") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T8 +description: Execute /[a-z]+(\d+)/.exec("__abc123.0") and check results +---*/ __executed = /[a-z]+(\d+)/.exec("__abc123.0"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T9.js index 2c83119319..87a243536a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A3_T9.js - * @description Execute /d+/.exec("abcdddddefg") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: + evaluates by returning the two + results 1 and \infty +es5id: 15.10.2.7_A3_T9 +description: Execute /d+/.exec("abcdddddefg") and check results +---*/ __executed = /d+/.exec("abcdddddefg"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /d+/.exec("abcdddddefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T1.js index a0d48de9a2..d9cfe263c5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T1.js - * @description Execute /[^"]* /.exec('"beast"-nickname') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T1 +description: Execute /[^"]* /.exec('"beast"-nickname') and check results +---*/ __executed = /[^"]*/.exec('"beast"-nickname'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T10.js index c39a925133..1f1d3272a3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T10.js - * @description Execute /d* /.exec('abcddddefg') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T10 +description: Execute /d* /.exec('abcddddefg') and check results +---*/ __executed = /d*/.exec('abcddddefg'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /d*/.exec(\'abcddddefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T11.js index 3c17990db2..fdad531ae6 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T11.js - * @description Execute /cd* /.exec('abcddddefg') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T11 +description: Execute /cd* /.exec('abcddddefg') and check results +---*/ __executed = /cd*/.exec('abcddddefg'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /cd*/.exec(\'abcddddefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T12.js index a8401083e1..21e5c63d14 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T12.js - * @description Execute /cx*d/.exec('abcdefg') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T12 +description: Execute /cx*d/.exec('abcdefg') and check results +---*/ __executed = /cx*d/.exec('abcdefg'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /cx*d/.exec(\'abcdefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T13.js index b0d1f28e07..2e626d0c5f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T13.js - * @description Execute /(x*)(x+)/.exec('xxxxxxx') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T13 +description: Execute /(x*)(x+)/.exec('xxxxxxx') and check results +---*/ __executed = /(x*)(x+)/.exec('xxxxxxx'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T14.js index ad6b7d77e2..c36d646585 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T14.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T14.js - * @description Execute /(\d*)(\d+)/.exec('1234567890') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T14 +description: Execute /(\d*)(\d+)/.exec('1234567890') and check results +---*/ __executed = /(\d*)(\d+)/.exec('1234567890'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T15.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T15.js index 362003a821..324f5c4e4f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T15.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T15.js - * @description Execute /(\d*)\d(\d+)/.exec('1234567890') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T15 +description: Execute /(\d*)\d(\d+)/.exec('1234567890') and check results +---*/ __executed = /(\d*)\d(\d+)/.exec('1234567890'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T16.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T16.js index a2e4c965be..dc8f7796ae 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T16.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T16.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T16.js - * @description Execute /(x+)(x*)/.exec('xxxxxxx') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T16 +description: Execute /(x+)(x*)/.exec('xxxxxxx') and check results +---*/ __executed = /(x+)(x*)/.exec('xxxxxxx'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T17.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T17.js index 5e8861610a..da6630c701 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T17.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T17.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T17.js - * @description Execute /x*y+$/.exec('xxxxxxyyyyyy') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T17 +description: Execute /x*y+$/.exec('xxxxxxyyyyyy') and check results +---*/ __executed = /x*y+$/.exec('xxxxxxyyyyyy'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T18.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T18.js index 330315ad38..05c647502f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T18.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T18.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T18.js - * @description Execute /[\d]*[\s]*bc./.exec('abcdef') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T18 +description: Execute /[\d]*[\s]*bc./.exec('abcdef') and check results +---*/ __executed = /[\d]*[\s]*bc./.exec('abcdef'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T19.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T19.js index 0818eca6b1..40c0c4bcbb 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T19.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T19.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T19.js - * @description Execute /bc..[\d]*[\s]* /.exec('abcdef') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T19 +description: Execute /bc..[\d]*[\s]* /.exec('abcdef') and check results +---*/ __executed = /bc..[\d]*[\s]*/.exec('abcdef'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T2.js index 146fc23f9d..e847eca103 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T2.js - * @description Execute /[^"]* /.exec('alice said: "don\'t"') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T2 +description: "Execute /[^\"]* /.exec('alice said: \"don\\'t\"') and check results" +---*/ __executed = /[^"]*/.exec('alice said: "don\'t"'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T20.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T20.js index 11b5462c72..3607e64b45 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T20.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T20.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T20.js - * @description Execute /.* /.exec('a1b2c3') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T20 +description: Execute /.* /.exec('a1b2c3') and check results +---*/ __executed = /.*/.exec('a1b2c3'); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /.*/.exec(\'a1b2c3\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T21.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T21.js index 84bf97034e..b916777574 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T21.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T21.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T21.js - * @description Execute /[xyz]*1/.test('a0.b2.c3') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T21 +description: Execute /[xyz]*1/.test('a0.b2.c3') and check results +---*/ __executed = /[xyz]*1/.test('a0.b2.c3'); @@ -14,5 +15,3 @@ __executed = /[xyz]*1/.test('a0.b2.c3'); if (__executed) { $ERROR('#1: /[xyz]*1/.test(\'a0.b2.c3\') === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T3.js index 6d7ffaf717..a09fff6800 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T3.js - * @description Execute /[^"]* /.exec("before\'i\'start") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T3 +description: Execute /[^"]* /.exec("before\'i\'start") and check results +---*/ __executed = /[^"]*/.exec("before\'i\'start"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^"]*/.exec("before\'i\'start"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T4.js index 4f4ca9ef5d..a575d37bec 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T4.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T4.js - * @description Execute /[^"]* /.exec('alice \"sweep\": "don\'t"') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T4 +description: > + Execute /[^"]* /.exec('alice \"sweep\": "don\'t"') and check + results +---*/ __executed = /[^"]*/.exec('alice \"sweep\": "don\'t"'); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T5.js index 61420275b1..1d64ffcdba 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T5.js - * @description Execute /[^"]* /.exec('alice \u0022sweep\u0022: "don\'t"') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T5 +description: > + Execute /[^"]* /.exec('alice \u0022sweep\u0022: "don\'t"') and + check results +---*/ __executed = /[^"]*/.exec('alice \u0022sweep\u0022: "don\'t"'); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T6.js index 362dbdd628..6b289bacd0 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T6.js - * @description Execute /["'][^"']*["']/.exec('alice \u0022sweep\u0022: "don\'t"') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T6 +description: > + Execute /["'][^"']*["']/.exec('alice \u0022sweep\u0022: "don\'t"') + and check results +---*/ __executed = /["'][^"']*["']/.exec('alice \u0022sweep\u0022: "don\'t"'); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T7.js index 8fc87a83f2..744e52443c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T7.js - * @description Execute /["'][^"']*["']/.exec('alice cries out: \'don\'t\'') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T7 +description: > + Execute /["'][^"']*["']/.exec('alice cries out: \'don\'t\'') and + check results +---*/ __executed = /["'][^"']*["']/.exec('alice cries out: \'don\'t\''); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T8.js index 840c044e02..da77b60774 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T8.js - * @description Execute /["'][^"']*["']/.test('alice cries out: don\'t') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T8 +description: > + Execute /["'][^"']*["']/.test('alice cries out: don\'t') and check + results +---*/ __executed = /["'][^"']*["']/.test('alice cries out: don\'t'); @@ -14,5 +17,3 @@ __executed = /["'][^"']*["']/.test('alice cries out: don\'t'); if (__executed) { $ERROR('#1: /["\'][^"\']*["\']/.test(\'alice cries out: don\'t\') === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T9.js index 836f76f8bf..e620f7e330 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A4_T9.js - * @description Execute /["'][^"']*["']/.exec('alice cries out:\"\"') and check results - */ +/*--- +info: > + The production QuantifierPrefix :: * evaluates by returning the two + results 0 and \infty +es5id: 15.10.2.7_A4_T9 +description: > + Execute /["'][^"']*["']/.exec('alice cries out:\"\"') and check + results +---*/ __executed = /["'][^"']*["']/.exec('alice cries out:\"\"'); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T1.js index 035a62b278..e142989dda 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T1.js - * @description Execute /java(script)?/.exec("state: javascript is extension of ecma script") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T1 +description: > + Execute /java(script)?/.exec("state: javascript is extension of + ecma script") and check results +---*/ __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T10.js index 23224d09cd..fbc774d2b5 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T10.js - * @description Execute /ab?c?d?x?y?z/.exec("123az789") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T10 +description: Execute /ab?c?d?x?y?z/.exec("123az789") and check results +---*/ __executed = /ab?c?d?x?y?z/.exec("123az789"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T11.js index f9396a6a30..8d24959a52 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T11.js - * @description Execute /\??\??\??\??\??/.exec("?????") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T11 +description: Execute /\??\??\??\??\??/.exec("?????") and check results +---*/ __executed = /\??\??\??\??\??/.exec("?????"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T12.js index db97a462ff..5c17119cbd 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T12.js - * @description Execute /.?.?.?.?.?.?.?/.exec("test") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T12 +description: Execute /.?.?.?.?.?.?.?/.exec("test") and check results +---*/ __executed = /.?.?.?.?.?.?.?/.exec("test"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T2.js index c30a69199b..e508cf9b62 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T2.js - * @description Execute /java(script)?/.exec("state: java and javascript are vastly different") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T2 +description: > + Execute /java(script)?/.exec("state: java and javascript are + vastly different") and check results +---*/ __executed = /java(script)?/.exec("state: java and javascript are vastly different"); @@ -35,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T3.js index 3e84feb226..e85f5de691 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T3.js - * @description Execute /java(script)?/.test("state: both Java and JavaScript used in web development") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T3 +description: > + Execute /java(script)?/.test("state: both Java and JavaScript used + in web development") and check results +---*/ __executed = /java(script)?/.test("state: both Java and JavaScript used in web development"); @@ -14,5 +17,3 @@ __executed = /java(script)?/.test("state: both Java and JavaScript used in web d if (__executed) { $ERROR('#1: /java(script)?/.test("state: both Java and JavaScript used in web development") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T4.js index 0f418f37c7..a33639554f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T4.js - * @description Execute /cd?e/.exec("abcdef") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T4 +description: Execute /cd?e/.exec("abcdef") and check results +---*/ __executed = /cd?e/.exec("abcdef"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /cd?e/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T5.js index 78736fba7e..779d4bd5a7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T5.js - * @description Execute /cdx?e/.exec("abcdef") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T5 +description: Execute /cdx?e/.exec("abcdef") and check results +---*/ __executed = /cdx?e/.exec("abcdef"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /cdx?e/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T6.js index 5d50c362f7..53c039398f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T6.js - * @description Execute /o?pqrst/.exec("pqrstuvw") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T6 +description: Execute /o?pqrst/.exec("pqrstuvw") and check results +---*/ __executed = /o?pqrst/.exec("pqrstuvw"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /o?pqrst/.exec("pqrstuvw"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T7.js index 5714b2e76d..d316028aca 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T7.js - * @description Execute /x?y?z?/.exec("abcd") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T7 +description: Execute /x?y?z?/.exec("abcd") and check results +---*/ __executed = /x?y?z?/.exec("abcd"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /x?y?z?/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T8.js index e50dc61798..89dff64a6d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T8.js - * @description Execute /x?ay?bz?c/.exec("abcd") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T8 +description: Execute /x?ay?bz?c/.exec("abcd") and check results +---*/ __executed = /x?ay?bz?c/.exec("abcd"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /x?ay?bz?c/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T9.js index 2f6b84ea88..380eec02db 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1 - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A5_T9.js - * @description Execute /b?b?b?b/.exec("abbbbc") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: ? evaluates by returning the two + results 0 and 1 +es5id: 15.10.2.7_A5_T9 +description: Execute /b?b?b?b/.exec("abbbbc") and check results +---*/ __executed = /b?b?b?b/.exec("abbbbc"); @@ -35,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /b?b?b?b/.exec("abbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T1.js index 02646ecafa..9b23ffe388 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: - * i) Let i be the MV of DecimalDigits - * ii) Return the two results i and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T1.js - * @description Execute /b{2,}c/.exec("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: + i) Let i be the MV of DecimalDigits + ii) Return the two results i and \infty +es5id: 15.10.2.7_A6_T1 +description: Execute /b{2,}c/.exec("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T2.js index bf2d2e8ded..da9446325d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: - * i) Let i be the MV of DecimalDigits - * ii) Return the two results i and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T2.js - * @description Execute /b{8,}c/.test("aaabbbbcccddeeeefffff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: + i) Let i be the MV of DecimalDigits + ii) Return the two results i and \infty +es5id: 15.10.2.7_A6_T2 +description: Execute /b{8,}c/.test("aaabbbbcccddeeeefffff") and check results +---*/ __executed = /b{8,}c/.test("aaabbbbcccddeeeefffff"); @@ -16,5 +16,3 @@ __executed = /b{8,}c/.test("aaabbbbcccddeeeefffff"); if (__executed) { $ERROR('#1: /b{8,}c/.test("aaabbbbcccddeeeefffff") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T3.js index 99966c7656..ced08302a7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: - * i) Let i be the MV of DecimalDigits - * ii) Return the two results i and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T3.js - * @description Execute /\d{1,}/.exec("wqe456646dsff") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: + i) Let i be the MV of DecimalDigits + ii) Return the two results i and \infty +es5id: 15.10.2.7_A6_T3 +description: Execute /\d{1,}/.exec("wqe456646dsff") and check results +---*/ __executed = /\d{1,}/.exec("wqe456646dsff"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T4.js index 0d8a9ae566..02146a58f2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: - * i) Let i be the MV of DecimalDigits - * ii) Return the two results i and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T4.js - * @description Execute /(123){1,}/.exec("123123") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: + i) Let i be the MV of DecimalDigits + ii) Return the two results i and \infty +es5id: 15.10.2.7_A6_T4 +description: Execute /(123){1,}/.exec("123123") and check results +---*/ __executed = /(123){1,}/.exec("123123"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(123){1,}/.exec("123123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T5.js index 5143089435..4d16821617 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: - * i) Let i be the MV of DecimalDigits - * ii) Return the two results i and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T5.js - * @description Execute /(123){1,}x\1/.exec("123123x123") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: + i) Let i be the MV of DecimalDigits + ii) Return the two results i and \infty +es5id: 15.10.2.7_A6_T5 +description: Execute /(123){1,}x\1/.exec("123123x123") and check results +---*/ __executed = /(123){1,}x\1/.exec("123123x123"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T6.js index cdc5ba6cdb..1b060b4d58 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: - * i) Let i be the MV of DecimalDigits - * ii) Return the two results i and \infty - * - * @path ch15/15.10/15.10.2/15.10.2.7/S15.10.2.7_A6_T6.js - * @description Execute /x{1,2}x{1,}/.exec("xxxxxxx") and check results - */ +/*--- +info: > + The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: + i) Let i be the MV of DecimalDigits + ii) Return the two results i and \infty +es5id: 15.10.2.7_A6_T6 +description: Execute /x{1,2}x{1,}/.exec("xxxxxxx") and check results +---*/ __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T1.js index 8765743cea..1e2da7f494 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?= Disjunction ) specifies a zero-width positive lookahead. - * In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. - * If Disjunction can match at the current position in several ways, only the first one is tried - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T1.js - * @description Execute /(?=(a+))/.exec("baaabac") and check results - */ +/*--- +info: > + The form (?= Disjunction ) specifies a zero-width positive lookahead. + In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. + If Disjunction can match at the current position in several ways, only the first one is tried +es5id: 15.10.2.8_A1_T1 +description: Execute /(?=(a+))/.exec("baaabac") and check results +---*/ __executed = /(?=(a+))/.exec("baaabac"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?=(a+))/.exec("baaabac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T2.js index f38bd22730..ddd4f33c31 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?= Disjunction ) specifies a zero-width positive lookahead. - * In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. - * If Disjunction can match at the current position in several ways, only the first one is tried - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T2.js - * @description Execute /(?=(a+))a*b\1/.exec("baaabac") and check results - */ +/*--- +info: > + The form (?= Disjunction ) specifies a zero-width positive lookahead. + In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. + If Disjunction can match at the current position in several ways, only the first one is tried +es5id: 15.10.2.8_A1_T2 +description: Execute /(?=(a+))a*b\1/.exec("baaabac") and check results +---*/ __executed = /(?=(a+))a*b\1/.exec("baaabac"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?=(a+))a*b\\1/.exec("baaabac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T3.js index d379104299..cae90378e9 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?= Disjunction ) specifies a zero-width positive lookahead. - * In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. - * If Disjunction can match at the current position in several ways, only the first one is tried - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T3.js - * @description Execute /[Jj]ava([Ss]cript)?(?=\:)/.exec("just Javascript: the way af jedi") and check results - */ +/*--- +info: > + The form (?= Disjunction ) specifies a zero-width positive lookahead. + In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. + If Disjunction can match at the current position in several ways, only the first one is tried +es5id: 15.10.2.8_A1_T3 +description: > + Execute /[Jj]ava([Ss]cript)?(?=\:)/.exec("just Javascript: the way + af jedi") and check results +---*/ __executed = /[Jj]ava([Ss]cript)?(?=\:)/.exec("just Javascript: the way af jedi"); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("just Javascript: the way af jedi"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T4.js index 76f486db68..ee9d8e3234 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?= Disjunction ) specifies a zero-width positive lookahead. - * In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. - * If Disjunction can match at the current position in several ways, only the first one is tried - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T4.js - * @description Execute /[Jj]ava([Ss]cript)?(?=\:)/.exec("taste of java: the cookbook ") and check results - */ +/*--- +info: > + The form (?= Disjunction ) specifies a zero-width positive lookahead. + In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. + If Disjunction can match at the current position in several ways, only the first one is tried +es5id: 15.10.2.8_A1_T4 +description: > + Execute /[Jj]ava([Ss]cript)?(?=\:)/.exec("taste of java: the + cookbook ") and check results +---*/ __executed = /[Jj]ava([Ss]cript)?(?=\:)/.exec("taste of java: the cookbook "); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec("taste of java: the cookbook "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T5.js index b4608e6e0b..d1561407fa 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?= Disjunction ) specifies a zero-width positive lookahead. - * In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. - * If Disjunction can match at the current position in several ways, only the first one is tried - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A1_T5.js - * @description Execute /[Jj]ava([Ss]cript)?(?=\:)/.test("rhino is JavaScript engine") and check results - */ +/*--- +info: > + The form (?= Disjunction ) specifies a zero-width positive lookahead. + In order for it to succeed, the pattern inside Disjunction must match at the current position, but the current position is not advanced before matching the sequel. + If Disjunction can match at the current position in several ways, only the first one is tried +es5id: 15.10.2.8_A1_T5 +description: > + Execute /[Jj]ava([Ss]cript)?(?=\:)/.test("rhino is JavaScript + engine") and check results +---*/ __executed = /[Jj]ava([Ss]cript)?(?=\:)/.test("rhino is JavaScript engine"); @@ -16,5 +18,3 @@ __executed = /[Jj]ava([Ss]cript)?(?=\:)/.test("rhino is JavaScript engine"); if (__executed) { $ERROR('#1: /[Jj]ava([Ss]cript)?(?=\\:)/.test("rhino is JavaScript engine") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T1.js index a080c09335..c370d1445f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T1.js - * @description Execute /(.*?)a(?!(a+)b\2c)\2(.*)/.exec("baaabaac") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T1 +description: > + Execute /(.*?)a(?!(a+)b\2c)\2(.*)/.exec("baaabaac") and check + results +---*/ __executed = /(.*?)a(?!(a+)b\2c)\2(.*)/.exec("baaabaac"); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec("baaabaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T10.js index 0929bb895c..8fa1bd3419 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T10.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T10.js - * @description Execute /(?!a|b)|c/.exec("bc") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T10 +description: Execute /(?!a|b)|c/.exec("bc") and check results +---*/ __executed = /(?!a|b)|c/.exec("bc"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?!a|b)|c/.exec("bc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T11.js index 636355d9ab..21333eccf3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T11.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T11.js - * @description Execute /(?!a|b)|c/.exec("d") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T11 +description: Execute /(?!a|b)|c/.exec("d") and check results +---*/ __executed = /(?!a|b)|c/.exec("d"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?!a|b)|c/.exec("d"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T2.js index 887d7a9995..57e84f6356 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T2.js - * @description Execute /Java(?!Script)([A-Z]\w*)/.exec("using of JavaBeans technology") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T2 +description: > + Execute /Java(?!Script)([A-Z]\w*)/.exec("using of JavaBeans + technology") and check results +---*/ __executed = /Java(?!Script)([A-Z]\w*)/.exec("using of JavaBeans technology"); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("using of JavaBeans technology"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T3.js index 9e0624e310..610c321de6 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T3.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T3.js - * @description Execute /Java(?!Script)([A-Z]\w*)/.test("using of Java language") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T3 +description: > + Execute /Java(?!Script)([A-Z]\w*)/.test("using of Java language") + and check results +---*/ __executed = /Java(?!Script)([A-Z]\w*)/.test("using of Java language"); @@ -16,5 +18,3 @@ __executed = /Java(?!Script)([A-Z]\w*)/.test("using of Java language"); if (__executed) { $ERROR('#1: /Java(?!Script)([A-Z]\\w*)/.test("using of Java language") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T4.js index 317169ec94..3e87468232 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T4.js - * @description Execute /Java(?!Script)([A-Z]\w*)/.test("i'm a JavaScripter ") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T4 +description: > + Execute /Java(?!Script)([A-Z]\w*)/.test("i'm a JavaScripter ") and + check results +---*/ __executed = /Java(?!Script)([A-Z]\w*)/.test("i'm a JavaScripter "); @@ -16,5 +18,3 @@ __executed = /Java(?!Script)([A-Z]\w*)/.test("i'm a JavaScripter "); if (__executed) { $ERROR('#1: /Java(?!Script)([A-Z]\\w*)/.test("i\'m a JavaScripter ") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T5.js index 39b842b00f..99df77fdc7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T5.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T5.js - * @description Execute /Java(?!Script)([A-Z]\w*)/.exec("JavaScr oops ipt ") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T5 +description: > + Execute /Java(?!Script)([A-Z]\w*)/.exec("JavaScr oops ipt ") and + check results +---*/ __executed = /Java(?!Script)([A-Z]\w*)/.exec("JavaScr oops ipt "); @@ -37,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /Java(?!Script)([A-Z]\\w*)/.exec("JavaScr oops ipt "); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T6.js index ab3efd17d4..33b63c2ddc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T6.js - * @description Execute /(\.(?!com|org)|\/)/.exec("ah.info") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T6 +description: Execute /(\.(?!com|org)|\/)/.exec("ah.info") and check results +---*/ __executed = /(\.(?!com|org)|\/)/.exec("ah.info"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(\\.(?!com|org)|\\/)/.exec("ah.info"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T7.js index 0e27662385..f2d39f968d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T7.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T7.js - * @description Execute /(\.(?!com|org)|\/)/.exec("ah/info") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T7 +description: Execute /(\.(?!com|org)|\/)/.exec("ah/info") and check results +---*/ __executed = /(\.(?!com|org)|\/)/.exec("ah/info"); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(\\.(?!com|org)|\\/)/.exec("ah/info"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T8.js index 317da7d47e..8ae49d8c2d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T8.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T8.js - * @description Execute /(\.(?!com|org)|\/)/.test("ah.com") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T8 +description: Execute /(\.(?!com|org)|\/)/.test("ah.com") and check results +---*/ __executed = /(\.(?!com|org)|\/)/.test("ah.com"); @@ -16,5 +16,3 @@ __executed = /(\.(?!com|org)|\/)/.test("ah.com"); if (__executed) { $ERROR('#1: /(\\.(?!com|org)|\\/)/.test("ah.com") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T9.js index 008d4ccbec..72d7d76ef7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T9.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The form (?! Disjunction ) specifies a zero-width negative lookahead. - * In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. - * The current position is not advanced before matching the sequel - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A2_T9.js - * @description Execute /(?!a|b)|c/.exec("") and check results - */ +/*--- +info: > + The form (?! Disjunction ) specifies a zero-width negative lookahead. + In order for it to succeed, the pattern inside Disjunction must fail to match at the current position. + The current position is not advanced before matching the sequel +es5id: 15.10.2.8_A2_T9 +description: Execute /(?!a|b)|c/.exec("") and check results +---*/ __executed = /(?!a|b)|c/.exec(""); @@ -37,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(?!a|b)|c/.exec(""); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T1.js index 9e6e4edd28..97a9942f9b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T1.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T1.js - * @description Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.exec("Learning javaScript is funny, really") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T1 +description: > + Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.exec("Learning + javaScript is funny, really") and check results +---*/ __executed = /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.exec("Learning javaScript is funny, really"); @@ -38,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Learning javaScript is funny, really"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T10.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T10.js index b09dcdd4a7..7d0642d207 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T10.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T10.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T10.js - * @description Execute /(\d{3})(\d{3})\1\2/.exec("123456123456") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T10 +description: Execute /(\d{3})(\d{3})\1\2/.exec("123456123456") and check results +---*/ __executed = /(\d{3})(\d{3})\1\2/.exec("123456123456"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(\\d{3})(\\d{3})\\1\\2/.exec("123456123456"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T11.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T11.js index 7aa61c013e..44f8e655ae 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T11.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T11.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T11.js - * @description Execute /a(..(..)..)/.exec("abcdefgh") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T11 +description: Execute /a(..(..)..)/.exec("abcdefgh") and check results +---*/ __executed = /a(..(..)..)/.exec("abcdefgh"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a(..(..)..)/.exec("abcdefgh"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T12.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T12.js index cf8b9fc1c6..cefb40f490 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T12.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T12.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T12.js - * @description Execute /(a(b(c)))(d(e(f)))/.exec("xabcdefg") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T12 +description: Execute /(a(b(c)))(d(e(f)))/.exec("xabcdefg") and check results +---*/ __executed = /(a(b(c)))(d(e(f)))/.exec("xabcdefg"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(a(b(c)))(d(e(f)))/.exec("xabcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T13.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T13.js index a2ab53fbe2..b3e10f2dc2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T13.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T13.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T13.js - * @description Execute /(a(b(c)))(d(e(f)))\2\5/.exec("xabcdefbcefg") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T13 +description: > + Execute /(a(b(c)))(d(e(f)))\2\5/.exec("xabcdefbcefg") and check + results +---*/ __executed = /(a(b(c)))(d(e(f)))\2\5/.exec("xabcdefbcefg"); @@ -38,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(a(b(c)))(d(e(f)))\\2\\5/.exec("xabcdefbcefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T14.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T14.js index d6d74fa6f1..a784be96de 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T14.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T14.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T14.js - * @description Execute /a(.?)b\1c\1d\1/.exec("abcd") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T14 +description: Execute /a(.?)b\1c\1d\1/.exec("abcd") and check results +---*/ __executed = /a(.?)b\1c\1d\1/.exec("abcd"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a(.?)b\\1c\\1d\\1/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T15.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T15.js index 93c4542873..32e87a6011 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T15.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T15.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T15.js - * @description see bug http:bugzilla.mozilla.org/show_bug.cgi?id=119909 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T15 +description: "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=119909" +---*/ __strOriginal = "hello"; __openParen = '('; @@ -56,5 +56,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T16.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T16.js index 750b6d1514..bb1be79519 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T16.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T16.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T16.js - * @description see bug http:bugzilla.mozilla.org/show_bug.cgi?id=119909 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T16 +description: "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=119909" +---*/ __strOriginal = "hello"; __openParen = '(?:'; @@ -54,5 +54,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T17.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T17.js index be44301210..3774a1f805 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T17.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T17.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T17.js - * @description see bug http:bugzilla.mozilla.org/show_bug.cgi?id=169497 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T17 +description: "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=169497" +---*/ __body=""; __body += '\n'; @@ -49,5 +49,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /((.*\\n?)*?)<\\/body>/i.exec(__html); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T18.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T18.js index 976bf0b86d..2d272f686c 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T18.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T18.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T18.js - * @description see bug http:bugzilla.mozilla.org/show_bug.cgi?id=169534 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T18 +description: "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=169534" +---*/ __replaced = "To sign up click |here|https:www.xxxx.org/subscribe.htm|".replace(/(\|)([\w\x81-\xff ]*)(\|)([\/a-z][\w:\/\.]*\.[a-z]{3,4})(\|)/ig, '$2'); @@ -19,5 +19,3 @@ __expected = 'To sign up click here$2\'); __replaced === ' + __expected + '. Actual: ' + __replaced); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T19.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T19.js index 99502fcd34..65aece70fd 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T19.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T19.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T19.js - * @description Execute /([\S]+([ \t]+[\S]+)*)[ \t]*=[ \t]*[\S]+/.exec("Course_Creator = Test") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T19 +description: > + Execute /([\S]+([ \t]+[\S]+)*)[ \t]*=[ + \t]*[\S]+/.exec("Course_Creator = Test") and check results +---*/ __executed = /([\S]+([ \t]+[\S]+)*)[ \t]*=[ \t]*[\S]+/.exec("Course_Creator = Test"); @@ -38,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec("Course_Creator = Test"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T2.js index 9583bbe347..1e3abe738f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T2.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T2.js - * @description Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.exec("Developing with Java is fun, try it") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T2 +description: > + Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.exec("Developing + with Java is fun, try it") and check results +---*/ __executed = /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.exec("Developing with Java is fun, try it"); @@ -38,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec("Developing with Java is fun, try it"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T20.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T20.js index 3a64abf763..75c1d0934d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T20.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T20.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T20.js - * @description Execute /^(A)?(A.*)$/.exec("AAA") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T20 +description: Execute /^(A)?(A.*)$/.exec("AAA") and check results +---*/ __executed = /^(A)?(A.*)$/.exec("AAA"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^(A)?(A.*)$/.exec("AAA"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T21.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T21.js index 08de79e152..3458e60a11 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T21.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T21.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T21.js - * @description Execute /^(A)?(A.*)$/.exec("AA") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T21 +description: Execute /^(A)?(A.*)$/.exec("AA") and check results +---*/ __executed = /^(A)?(A.*)$/.exec("AA"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^(A)?(A.*)$/.exec("AA"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T22.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T22.js index 2bfc065c08..ba2b351ba7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T22.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T22.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T22.js - * @description Execute /^(A)?(A.*)$/.exec("A") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T22 +description: Execute /^(A)?(A.*)$/.exec("A") and check results +---*/ __executed = /^(A)?(A.*)$/.exec("A"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /^(A)?(A.*)$/.exec("A"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T23.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T23.js index bb8144f699..a3ca149c1a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T23.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T23.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T23.js - * @description Execute /(A)?(A.*)/.exec("zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T23 +description: > + Execute /(A)?(A.*)/.exec("zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs") and + check results +---*/ __string = "zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs"; @@ -40,5 +42,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "zxcasd;fl\\\ ^AAAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T24.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T24.js index 62ff1f2a25..bd6e615b14 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T24.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T24.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T24.js - * @description Execute /(A)?(A.*)/.exec("zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T24 +description: > + Execute /(A)?(A.*)/.exec("zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs") and + check results +---*/ __string = "zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs"; @@ -40,5 +42,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "zxcasd;fl\\\ ^AAaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T25.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T25.js index f8883bc510..aacb911e62 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T25.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T25.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T25.js - * @description Execute /(A)?(A.*)/.exec("zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T25 +description: > + Execute /(A)?(A.*)/.exec("zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs") and + check results +---*/ __string = "zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs"; @@ -40,5 +42,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "zxcasd;fl\\\ ^AaaAAaaaf;lrlrzs"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T26.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T26.js index 9f0953534b..ae21a62124 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T26.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T26.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T26.js - * @description Execute /(a)?a/.exec("a") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T26 +description: Execute /(a)?a/.exec("a") and check results +---*/ __string = "a"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "a"; __executed = /(a)?a/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T27.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T27.js index 033d917213..5d1e4c56b9 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T27.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T27.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T27.js - * @description Execute /a|(b)/.exec("a") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T27 +description: Execute /a|(b)/.exec("a") and check results +---*/ __string = "a"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "a"; __executed = /a|(b)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T28.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T28.js index 304e053e39..d9e5ec1be8 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T28.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T28.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T28.js - * @description Execute /(a)?(a)/.exec("a") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T28 +description: Execute /(a)?(a)/.exec("a") and check results +---*/ __string = "a"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "a"; __executed = /(a)?(a)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T29.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T29.js index a17dc6b8be..85d4bf0aa6 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T29.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T29.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T29.js - * @description See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T29 +description: "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353" +---*/ __string = "a"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "a"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T3.js index 2ad172e728..216ddcb3b3 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T3.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T3.js - * @description Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing with JavaScript is dangerous, do not try it without assistance") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T3 +description: > + Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing + with JavaScript is dangerous, do not try it without assistance") + and check results +---*/ __executed = /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing with JavaScript is dangerous, do not try it without assistance"); @@ -17,5 +20,3 @@ __executed = /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing with JavaScr if (__executed) { $ERROR('#1: /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.test("Developing with JavaScript is dangerous, do not try it without assistance") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T30.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T30.js index 1b0c17a0ef..0baaa0fd2d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T30.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T30.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T30.js - * @description See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T30 +description: "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353" +---*/ __string = "ab"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "ab"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T31.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T31.js index f19455475f..ac3c2fa85e 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T31.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T31.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T31.js - * @description See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T31 +description: "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353" +---*/ __string = "abc"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "abc"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T32.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T32.js index 76d781afb9..f41ca50dbd 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T32.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T32.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T32.js - * @description See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T32 +description: "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353" +---*/ __string = "www.netscape.com"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "www.netscape.com"; __executed = /^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T33.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T33.js index bcbab6c9c7..0dca05a041 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T33.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T33.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T33.js - * @description See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353 - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T33 +description: "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353" +---*/ __string = "www.netscape.com"; @@ -40,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "www.netscape.com"; __executed = /^(([a-z]+)*([a-z])\\.)+[a-z]{2,}$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T4.js index 88634c5e3c..d9405aac10 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T4.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T4.js - * @description Execute /(abc)/.exec("abc") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T4 +description: Execute /(abc)/.exec("abc") and check results +---*/ __executed = /(abc)/.exec("abc"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(abc)/.exec("abc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T5.js index 4335f42874..1089e3d1b7 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T5.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T5.js - * @description Execute /a(bc)d(ef)g/.exec("abcdefg") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T5 +description: Execute /a(bc)d(ef)g/.exec("abcdefg") and check results +---*/ __executed = /a(bc)d(ef)g/.exec("abcdefg"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a(bc)d(ef)g/.exec("abcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T6.js index 51554db84b..34cb99fdd2 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T6.js - * @description Execute /(.{3})(.{4})/.exec("abcdefgh") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T6 +description: Execute /(.{3})(.{4})/.exec("abcdefgh") and check results +---*/ __executed = /(.{3})(.{4})/.exec("abcdefgh"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(.{3})(.{4})/.exec("abcdefgh"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T7.js index 9617ff958a..dfc4137148 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T7.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T7.js - * @description Execute /(aa)bcd\1/.exec("aabcdaabcd") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T7 +description: Execute /(aa)bcd\1/.exec("aabcdaabcd") and check results +---*/ __executed = /(aa)bcd\1/.exec("aabcdaabcd"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(aa)bcd\\1/.exec("aabcdaabcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T8.js index 5b3fa90507..97e83d4c4f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T8.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T8.js - * @description Execute /(aa).+\1/.exec("aabcdaabcd") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T8 +description: Execute /(aa).+\1/.exec("aabcdaabcd") and check results +---*/ __executed = /(aa).+\1/.exec("aabcdaabcd"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(aa).+\\1/.exec("aabcdaabcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T9.js index d8d5dbce67..c30bc57398 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T9.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. - * The result can be used either in a backreference (\ followed by a nonzero decimal number), - * referenced in a replace string, - * or returned as part of an array from the regular expression matching function - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A3_T9.js - * @description Execute /(.{2}).+\1/.exec("aabcdaabcd") and check results - */ +/*--- +info: > + Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. + The result can be used either in a backreference (\ followed by a nonzero decimal number), + referenced in a replace string, + or returned as part of an array from the regular expression matching function +es5id: 15.10.2.8_A3_T9 +description: Execute /(.{2}).+\1/.exec("aabcdaabcd") and check results +---*/ __executed = /(.{2}).+\1/.exec("aabcdaabcd"); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(.{2}).+\\1/.exec("aabcdaabcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T1.js index 7e3fd984c5..09328ff646 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T1.js - * @description Execute /ab.de/.exec("abcde") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T1 +description: Execute /ab.de/.exec("abcde") and check results +---*/ __string = "abcde"; __executed = /ab.de/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "abcde"; __executed = /ab.de/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T2.js index ccddfc3445..e3e8fd60dc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T2.js - * @description Execute /.+/.exec("line 1\nline 2") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T2 +description: Execute /.+/.exec("line 1\nline 2") and check results +---*/ __string = "line 1\nline 2"; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "line 1\nline 2"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T3.js index cd72ad8dad..59f9eb3b6d 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T3.js - * @description Execute /.*a.* /.exec("this is a test") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T3 +description: Execute /.*a.* /.exec("this is a test") and check results +---*/ __string = "this is a test"; __executed = /.*a.*/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "this is a test"; __executed = /.*a.*/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T4.js index 63f02fd4a0..bbb6bf6132 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T4.js - * @description Execute /.+/.exec("this is a *&^%$# test") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T4 +description: Execute /.+/.exec("this is a *&^%$# test") and check results +---*/ __string = "this is a *&^%$# test"; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "this is a *&^%$# test"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T5.js index eafdb66f66..33e6611680 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T5.js - * @description Execute /.+/.exec("....") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T5 +description: Execute /.+/.exec("....") and check results +---*/ __string = "...."; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "...."; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T6.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T6.js index fac61d3a74..739724aa56 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T6.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T6.js - * @description Execute /.+/.exec("abcdefghijklmnopqrstuvwxyz") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T6 +description: Execute /.+/.exec("abcdefghijklmnopqrstuvwxyz") and check results +---*/ __string = "abcdefghijklmnopqrstuvwxyz"; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "abcdefghijklmnopqrstuvwxyz"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T7.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T7.js index 73c2343ba6..569080ffdc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T7.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T7.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T7.js - * @description Execute /.+/.exec("ABCDEFGHIJKLMNOPQRSTUVWXYZ") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T7 +description: Execute /.+/.exec("ABCDEFGHIJKLMNOPQRSTUVWXYZ") and check results +---*/ __string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T8.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T8.js index 5b1fec20d4..3f7ab99a20 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T8.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T8.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T8.js - * @description Execute /.+/.exec("`1234567890-=~!@#$%^&*()_+") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T8 +description: Execute /.+/.exec("`1234567890-=~!@#$%^&*()_+") and check results +---*/ __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "`1234567890-=~!@#$%^&*()_+"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T9.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T9.js index f34f43ad8a..8b9071576b 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T9.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T9.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The production Atom :: . evaluates as follows: - * i) Let A be the set of all characters except the four line terminator characters , , , or - * ii) Call CharacterSetMatcher(A, false) and return its Matcher result - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A4_T9.js - * @description Execute /.+/.exec("|\\[{]};:\"\',<>.?/") and check results - */ +/*--- +info: > + The production Atom :: . evaluates as follows: + i) Let A be the set of all characters except the four line terminator characters , , , or + ii) Call CharacterSetMatcher(A, false) and return its Matcher result +es5id: 15.10.2.8_A4_T9 +description: "Execute /.+/.exec(\"|\\\\[{]};:\\\"\\',<>.?/\") and check results" +---*/ __string = "|\\[{]};:\"\',<>.?/"; __executed = /.+/.exec(__string); @@ -38,5 +38,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "|\\[{]};:\"\',<>.?/"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T1.js index e3ca1fdcd3..ef2dfda9f4 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In case-insignificant matches all characters are implicitly converted to upper case immediately before they are compared - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T1.js - * @description Execute /[a-z]+/ig.exec("ABC def ghi") and check results - */ +/*--- +info: > + In case-insignificant matches all characters are implicitly converted to + upper case immediately before they are compared +es5id: 15.10.2.8_A5_T1 +description: Execute /[a-z]+/ig.exec("ABC def ghi") and check results +---*/ __string = "ABC def ghi"; __executed = /[a-z]+/ig.exec(__string); @@ -36,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "ABC def ghi"; __executed = /[a-z]+/ig.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T2.js index 383fc84765..ffcca31e8f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * In case-insignificant matches all characters are implicitly converted to upper case immediately before they are compared - * - * @path ch15/15.10/15.10.2/15.10.2.8/S15.10.2.8_A5_T2.js - * @description Execute /[a-z]+/.exec("ABC def ghi") and check results - */ +/*--- +info: > + In case-insignificant matches all characters are implicitly converted to + upper case immediately before they are compared +es5id: 15.10.2.8_A5_T2 +description: Execute /[a-z]+/.exec("ABC def ghi") and check results +---*/ __string = "ABC def ghi"; __executed = /[a-z]+/.exec(__string); @@ -36,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __string = "ABC def ghi"; __executed = /[a-z]+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T1.js b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T1.js index 6889325667..d2e2de9a9f 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An escape sequence of the form \ followed by a nonzero decimal number n matches the result of the nth set of capturing parentheses (see 15.10.2.11) - * - * @path ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T1.js - * @description Execute /\b(\w+) \1\b/.exec("do you listen the the band") and check results - */ +/*--- +info: > + An escape sequence of the form \ followed by a nonzero decimal number n + matches the result of the nth set of capturing parentheses (see + 15.10.2.11) +es5id: 15.10.2.9_A1_T1 +description: > + Execute /\b(\w+) \1\b/.exec("do you listen the the band") and + check results +---*/ __executed = /\b(\w+) \1\b/.exec("do you listen the the band"); @@ -35,5 +39,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\b(\\w+) \\1\\b/.exec("do you listen the the band"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T2.js b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T2.js index 663096734e..4469f13cfc 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T2.js @@ -1,12 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An escape sequence of the form \ followed by a nonzero decimal number n matches the result of the nth set of capturing parentheses (see 15.10.2.11) - * - * @path ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T2.js - * @description Execute /([xu]\d{2}([A-H]{2})?)\1/.exec("x09x12x01x01u00FFu00FFx04x04x23") and check results - */ +/*--- +info: > + An escape sequence of the form \ followed by a nonzero decimal number n + matches the result of the nth set of capturing parentheses (see + 15.10.2.11) +es5id: 15.10.2.9_A1_T2 +description: > + Execute + /([xu]\d{2}([A-H]{2})?)\1/.exec("x09x12x01x01u00FFu00FFx04x04x23") + and check results +---*/ __executed = /([xu]\d{2}([A-H]{2})?)\1/.exec("x09x12x01x01u00FFu00FFx04x04x23"); @@ -35,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x01u00FFu00FFx04x04x23"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T3.js b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T3.js index 83349b41d2..9cdc9bef24 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T3.js @@ -1,12 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An escape sequence of the form \ followed by a nonzero decimal number n matches the result of the nth set of capturing parentheses (see 15.10.2.11) - * - * @path ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T3.js - * @description Execute /([xu]\d{2}([A-H]{2})?)\1/.exec("x09x12x01x05u00FFu00FFx04x04x23") and check results - */ +/*--- +info: > + An escape sequence of the form \ followed by a nonzero decimal number n + matches the result of the nth set of capturing parentheses (see + 15.10.2.11) +es5id: 15.10.2.9_A1_T3 +description: > + Execute + /([xu]\d{2}([A-H]{2})?)\1/.exec("x09x12x01x05u00FFu00FFx04x04x23") + and check results +---*/ __executed = /([xu]\d{2}([A-H]{2})?)\1/.exec("x09x12x01x05u00FFu00FFx04x04x23"); @@ -35,5 +40,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec("x09x12x01x05u00FFu00FFx04x04x23"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T4.js b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T4.js index a0d5c88559..0dfaf8ec32 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T4.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An escape sequence of the form \ followed by a nonzero decimal number n matches the result of the nth set of capturing parentheses (see 15.10.2.11) - * - * @path ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T4.js - * @description Execute /\b(\w+) \2\b/.test("do you listen the the band") and check results - */ +/*--- +info: > + An escape sequence of the form \ followed by a nonzero decimal number n + matches the result of the nth set of capturing parentheses (see + 15.10.2.11) +es5id: 15.10.2.9_A1_T4 +description: > + Execute /\b(\w+) \2\b/.test("do you listen the the band") and + check results +---*/ __executed = /\b(\w+) \2\b/.test("do you listen the the band"); @@ -14,5 +18,3 @@ __executed = /\b(\w+) \2\b/.test("do you listen the the band"); if (__executed) { $ERROR('#1: /\\b(\\w+) \\2\\b/.test("do you listen the the band") === false'); } - - diff --git a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T5.js b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T5.js index 074fb95bb0..517cefe63a 100644 --- a/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * An escape sequence of the form \ followed by a nonzero decimal number n matches the result of the nth set of capturing parentheses (see 15.10.2.11) - * - * @path ch15/15.10/15.10.2/15.10.2.9/S15.10.2.9_A1_T5.js - * @description Execute /(a*)b\1+/.exec("baaac") and check results - */ +/*--- +info: > + An escape sequence of the form \ followed by a nonzero decimal number n + matches the result of the nth set of capturing parentheses (see + 15.10.2.11) +es5id: 15.10.2.9_A1_T5 +description: Execute /(a*)b\1+/.exec("baaac") and check results +---*/ __executed = /(a*)b\1+/.exec("baaac"); @@ -35,5 +37,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(a*)b\\1+/.exec("baaac"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.2/S15.10.2_A1_T1.js b/test/suite/ch15/15.10/15.10.2/S15.10.2_A1_T1.js index 9ba10e4b5d..1d40d2b62e 100644 --- a/test/suite/ch15/15.10/15.10.2/S15.10.2_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.2/S15.10.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * XML Shallow Parsing with Regular Expressions - * - * @path ch15/15.10/15.10.2/S15.10.2_A1_T1.js - * @description See bug http://bugzilla.mozilla.org/show_bug.cgi?id=103087 - */ +/*--- +info: XML Shallow Parsing with Regular Expressions +es5id: 15.10.2_A1_T1 +description: "See bug http://bugzilla.mozilla.org/show_bug.cgi?id=103087" +---*/ // REX/Javascript 1.0 // Robert D. Cameron "REX: XML Shallow Parsing with Regular Expressions", @@ -85,5 +84,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T1.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T1.js index de92630d40..1147f515fa 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then return R unchanged - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A1_T1.js - * @description R is /x/i and instance is RegExp(R) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is undefined, then return R unchanged +es5id: 15.10.3.1_A1_T1 +description: R is /x/i and instance is RegExp(R) +---*/ __re = /x/i; __instance = RegExp(__re); @@ -16,5 +17,3 @@ __re.indicator = 1; if (__instance.indicator !== 1) { $ERROR('#1: __re = /x/i; __instance = RegExp(__re); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); } - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T2.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T2.js index 243ba2b5b0..a04a724624 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then return R unchanged - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A1_T2.js - * @description R is new RegExp and instance is RegExp(R, function(){}()) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is undefined, then return R unchanged +es5id: 15.10.3.1_A1_T2 +description: R is new RegExp and instance is RegExp(R, function(){}()) +---*/ __re = new RegExp; __instance = RegExp(__re, function(){}()); @@ -16,4 +17,3 @@ __re.indicator = 1; if (__instance.indicator !== 1) { $ERROR('#1: __re = new RegExp; __instance = RegExp(__re, function(){}()); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); } - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T3.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T3.js index c61b7d4665..e5251131e6 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then return R unchanged - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A1_T3.js - * @description R is new RegExp() and instance is RegExp(R, x), where x is undefined variable - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is undefined, then return R unchanged +es5id: 15.10.3.1_A1_T3 +description: > + R is new RegExp() and instance is RegExp(R, x), where x is + undefined variable +---*/ __re = new RegExp(); __instance = RegExp(__re, x); @@ -18,4 +21,3 @@ if (__instance.indicator !== 1) { } var x; - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T4.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T4.js index 3e2ccd992c..b7673072d2 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then return R unchanged - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A1_T4.js - * @description R is new RegExp() and instance is RegExp(R, void 0) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is undefined, then return R unchanged +es5id: 15.10.3.1_A1_T4 +description: R is new RegExp() and instance is RegExp(R, void 0) +---*/ __re = RegExp(); __instance = RegExp(__re, void 0); @@ -16,5 +17,3 @@ __re.indicator = 1; if (__instance.indicator !== 1) { $ERROR('#1: __re = RegExp(); __instance = RegExp(__re, void 0); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); } - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T5.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T5.js index c22e2831a6..7935c75595 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then return R unchanged - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A1_T5.js - * @description R is /\b/m and instance is RegExp(R, undefined) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is undefined, then return R unchanged +es5id: 15.10.3.1_A1_T5 +description: R is /\b/m and instance is RegExp(R, undefined) +---*/ __re = /\b/m; __instance = RegExp(__re, undefined); @@ -16,5 +17,3 @@ __re.indicator = 1; if (__instance.indicator !== 1) { $ERROR('#1: __re = /\\b/m; __instance = RegExp(__re, undefined); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator)); } - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T1.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T1.js index 6178e68344..e200ecaa1e 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then - * call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A2_T1.js - * @description Checking if using "1" as flags leads to throwing the correct exception - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then + call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor +es5id: 15.10.3.1_A2_T1 +description: > + Checking if using "1" as flags leads to throwing the correct + exception +---*/ //CHECK#1 try { @@ -17,5 +19,3 @@ try { $ERROR('#1.2: RegExp(new RegExp("\\d"), "1")) throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T2.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T2.js index 6ff5511246..df35130d21 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then - * call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A2_T2.js - * @description Checking if using dafined variable "x = 1" as flags leads to throwing the correct exception - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then + call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor +es5id: 15.10.3.1_A2_T2 +description: > + Checking if using dafined variable "x = 1" as flags leads to + throwing the correct exception +---*/ var x = 1; @@ -19,5 +21,3 @@ try { $ERROR('#1.2: var x = 1; RegExp(/[a-b]?/, x) throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T1.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T1.js index 6c40db0759..be42524e2a 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern and flags are defined, then - * call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A3_T1.js - * @description R is "d+" and instance is RegExp(R,"i") - */ +/*--- +info: > + If pattern and flags are defined, then + call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor +es5id: 15.10.3.1_A3_T1 +description: R is "d+" and instance is RegExp(R,"i") +---*/ __re = "d+"; __instance = RegExp(__re, "i"); @@ -21,5 +21,3 @@ if (__instance.constructor !== RegExp) { if (__instance.source !== __re) { $ERROR('#2: __re = "d+"; __instance = RegExp(__re, "i"); __instance.source === __re. Actual: '+ (__instance.source)); } - - diff --git a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T2.js b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T2.js index 97330e7a60..52a34a2664 100644 --- a/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A3_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern and flags are defined, then - * call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor - * - * @path ch15/15.10/15.10.3/S15.10.3.1_A3_T2.js - * @description R is {toString:function(){return "[a-c]*";}} and instance is RegExp(R,"gm") - */ +/*--- +info: > + If pattern and flags are defined, then + call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor +es5id: 15.10.3.1_A3_T2 +description: > + R is {toString:function(){return "[a-c]*";}} and instance is + RegExp(R,"gm") +---*/ __instance = RegExp({toString:function(){return "[a-c]*";}}, "gm"); @@ -20,5 +22,3 @@ if (__instance.constructor !== RegExp) { if (__instance.source !== "[a-c]*") { $ERROR('#2: __instance = RegExp({toString:function(){return "[a-c]*";}}, "gm"); __instance.source === "[a-c]*". Actual: '+ (__instance.source)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-1.js b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-1.js index c032e39dd8..aa4ec81a0c 100644 --- a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-1.js +++ b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-1.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-1.js - * @description RegExp - the thrown error is TypeError instead of RegExpError when pattern is an object whose [[Class]] property is 'RegExp' and flags is not undefined - */ - - -function testcase() { - var regObj = new RegExp(); - try { - var regExpObj = new RegExp(regObj, true); - - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.4.1-1 +description: > + RegExp - the thrown error is TypeError instead of RegExpError when + pattern is an object whose [[Class]] property is 'RegExp' and + flags is not undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + try { + var regExpObj = new RegExp(regObj, true); + + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-2.js b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-2.js index 679a37af15..82b8ef017b 100644 --- a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-2.js +++ b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-2.js - * @description RegExp - the thrown error is SyntaxError instead of RegExpError when the characters of 'P' do not have the syntactic form Pattern - */ - - -function testcase() { - try { - var regExpObj = new RegExp('\\'); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.4.1-2 +description: > + RegExp - the thrown error is SyntaxError instead of RegExpError + when the characters of 'P' do not have the syntactic form Pattern +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExpObj = new RegExp('\\'); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-3.js b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-3.js index f300a4c6a5..168a71de6c 100644 --- a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-3.js +++ b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-3.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-3.js - * @description RegExp - the thrown error is SyntaxError instead of RegExpError when 'F' contains any character other than 'g', 'i', or 'm' - */ - - -function testcase() { - try { - var regExpObj = new RegExp('abc', 'a'); - - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.4.1-3 +description: > + RegExp - the thrown error is SyntaxError instead of RegExpError + when 'F' contains any character other than 'g', 'i', or 'm' +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExpObj = new RegExp('abc', 'a'); + + return false; + } catch (e) { + return e instanceof SyntaxError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-4.js b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-4.js index 3638bf46de..094a1ea7f8 100644 --- a/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-4.js +++ b/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-4.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-4.js - * @description RegExp - the SyntaxError is not thrown when flags is 'gim' - */ - - -function testcase() { - try { - var regExpObj = new RegExp('abc', 'gim'); - - return true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.4.1-4 +description: RegExp - the SyntaxError is not thrown when flags is 'gim' +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var regExpObj = new RegExp('abc', 'gim'); + + return true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T1.js index 27df5176d8..c1dc806220 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be - * the pattern used to construct R and let F be the flags used to construct R - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A1_T1.js - * @description Pattern is /./i and RegExp is new RegExp(pattern) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be + the pattern used to construct R and let F be the flags used to construct R +es5id: 15.10.4.1_A1_T1 +description: Pattern is /./i and RegExp is new RegExp(pattern) +---*/ __pattern = /./i; __re = new RegExp(__pattern); @@ -31,4 +31,3 @@ if (__re.global !== __pattern.global) { if (__re.ignoreCase !== __pattern.ignoreCase) { $ERROR('#4: __pattern = /./i; __re = new RegExp(__pattern); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); } - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T2.js index c884417e39..2aa9063e46 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be - * the pattern used to construct R and let F be the flags used to construct R - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A1_T2.js - * @description Pattern is /\t/m and RegExp is new RegExp(pattern,x), where x is undefined variable - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be + the pattern used to construct R and let F be the flags used to construct R +es5id: 15.10.4.1_A1_T2 +description: > + Pattern is /\t/m and RegExp is new RegExp(pattern,x), where x is + undefined variable +---*/ __pattern = /\t/m; __re = new RegExp(__pattern, x); @@ -33,4 +35,3 @@ if (__re.ignoreCase !== __pattern.ignoreCase) { } var x; - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T3.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T3.js index 1152a2dc2c..12ff9987b6 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be - * the pattern used to construct R and let F be the flags used to construct R - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A1_T3.js - * @description Pattern is /[a-b]/g and RegExp is new RegExp(pattern,void 0) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be + the pattern used to construct R and let F be the flags used to construct R +es5id: 15.10.4.1_A1_T3 +description: Pattern is /[a-b]/g and RegExp is new RegExp(pattern,void 0) +---*/ __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); @@ -31,6 +31,3 @@ if (__re.global !== __pattern.global) { if (__re.ignoreCase !== __pattern.ignoreCase) { $ERROR('#4: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); } - - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T4.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T4.js index d65e854a23..441eb2305a 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be - * the pattern used to construct R and let F be the flags used to construct R - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A1_T4.js - * @description Pattern is new RegExp and RegExp is new RegExp(pattern,undefined) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be + the pattern used to construct R and let F be the flags used to construct R +es5id: 15.10.4.1_A1_T4 +description: Pattern is new RegExp and RegExp is new RegExp(pattern,undefined) +---*/ __pattern = new RegExp; __re = new RegExp(__pattern, undefined); @@ -31,5 +31,3 @@ if (__re.global !== __pattern.global) { if (__re.ignoreCase !== __pattern.ignoreCase) { $ERROR('#4: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T5.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T5.js index 22cf93f82f..bd02056d27 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A1_T5.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be - * the pattern used to construct R and let F be the flags used to construct R - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A1_T5.js - * @description Pattern is RegExp("1?","mig") and RegExp is new RegExp(pattern,(function(){})()) - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be + the pattern used to construct R and let F be the flags used to construct R +es5id: 15.10.4.1_A1_T5 +description: > + Pattern is RegExp("1?","mig") and RegExp is new + RegExp(pattern,(function(){})()) +---*/ __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); @@ -31,6 +33,3 @@ if (__re.global !== __pattern.global) { if (__re.ignoreCase !== __pattern.ignoreCase) { $ERROR('#4: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); } - - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T1.js index 8d1ccd51ec..6272ef38f9 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is not undefined, then throw a TypeError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A2_T1.js - * @description Checking if execution of "new RegExp(pattern, "i")", where the pattern is "/\u0042/i", fails - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is not undefined, then throw a TypeError exception +es5id: 15.10.4.1_A2_T1 +description: > + Checking if execution of "new RegExp(pattern, "i")", where the + pattern is "/\u0042/i", fails +---*/ //CHECK#1 try { @@ -16,5 +19,3 @@ try { $ERROR('#1.2: new RegExp(/\\u0042/i, "i") throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T2.js index d75b937112..432bb0d7b0 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pattern is an object R whose [[Class]] property is "RegExp" and flags is not undefined, then throw a TypeError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A2_T2.js - * @description Checking if execution of "new RegExp(pattern, {})", where the pattern is "/1?1/mig", fails - */ +/*--- +info: > + If pattern is an object R whose [[Class]] property is "RegExp" and flags + is not undefined, then throw a TypeError exception +es5id: 15.10.4.1_A2_T2 +description: > + Checking if execution of "new RegExp(pattern, {})", where the + pattern is "/1?1/mig", fails +---*/ //CHECK#1 try { @@ -16,5 +19,3 @@ try { $ERROR('#1.2: new RegExp(/1?1/mig, {}) throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T1.js index ccdf9419ac..30c14b3836 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be the empty string if pattern is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A3_T1.js - * @description RegExp is new RegExp - */ +/*--- +info: let P be the empty string if pattern is undefined +es5id: 15.10.4.1_A3_T1 +description: RegExp is new RegExp +---*/ __re = new RegExp; @@ -24,6 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T2.js index 2a5825ee1c..e32724d7f9 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be the empty string if pattern is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A3_T2.js - * @description RegExp is new RegExp(void 0) - */ +/*--- +info: let P be the empty string if pattern is undefined +es5id: 15.10.4.1_A3_T2 +description: RegExp is new RegExp(void 0) +---*/ __re = new RegExp(void 0); @@ -24,5 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp(void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T3.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T3.js index 73303a77e8..5c47c6477b 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be the empty string if pattern is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A3_T3.js - * @description RegExp is new RegExp(x), where x is undefined variable - */ +/*--- +info: let P be the empty string if pattern is undefined +es5id: 15.10.4.1_A3_T3 +description: RegExp is new RegExp(x), where x is undefined variable +---*/ __re = new RegExp(x); @@ -26,5 +25,3 @@ if (__re.ignoreCase !== false) { } var x; - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T4.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T4.js index b3fdb9569b..efc3467506 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be the empty string if pattern is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A3_T4.js - * @description RegExp is new RegExp(undefined) - */ +/*--- +info: let P be the empty string if pattern is undefined +es5id: 15.10.4.1_A3_T4 +description: RegExp is new RegExp(undefined) +---*/ __re = new RegExp(undefined); @@ -24,4 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp(undefined); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T5.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T5.js index f8772d9332..10c62a2d6f 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T5.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A3_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be the empty string if pattern is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A3_T5.js - * @description RegExp is new RegExp((function(){})()) - */ +/*--- +info: let P be the empty string if pattern is undefined +es5id: 15.10.4.1_A3_T5 +description: RegExp is new RegExp((function(){})()) +---*/ __re = new RegExp((function(){})()); @@ -24,5 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp((function(){})()); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T1.js index 180f279143..4069835f8d 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let F be the empty string if flags is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A4_T1.js - * @description RegExp is new RegExp(undefined) - */ +/*--- +info: let F be the empty string if flags is undefined +es5id: 15.10.4.1_A4_T1 +description: RegExp is new RegExp(undefined) +---*/ __re = new RegExp(null, void 0); @@ -29,6 +28,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp(null, void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T2.js index f12dd1f980..5bf7bad568 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let F be the empty string if flags is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A4_T2.js - * @description RegExp is new RegExp(undefined,undefined) - */ +/*--- +info: let F be the empty string if flags is undefined +es5id: 15.10.4.1_A4_T2 +description: RegExp is new RegExp(undefined,undefined) +---*/ __re = new RegExp(undefined, undefined); @@ -24,5 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp(undefined, undefined); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T3.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T3.js index 450b10affd..1cf0633764 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T3.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let F be the empty string if flags is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A4_T3.js - * @description Use undefined properties of object as flags of RegExp - */ +/*--- +info: let F be the empty string if flags is undefined +es5id: 15.10.4.1_A4_T3 +description: Use undefined properties of object as flags of RegExp +---*/ __re = new RegExp({}.p, {}.q); @@ -24,5 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp({}.p, {}.q); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T4.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T4.js index 708757be57..6b7833dd62 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T4.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let F be the empty string if flags is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A4_T4.js - * @description RegExp is new RegExp(null,void 0) - */ +/*--- +info: let F be the empty string if flags is undefined +es5id: 15.10.4.1_A4_T4 +description: RegExp is new RegExp(null,void 0) +---*/ __re = new RegExp(null, void 0); @@ -29,5 +28,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp(null, void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T5.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T5.js index ef04ca60ef..b88cee7b9f 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T5.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A4_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let F be the empty string if flags is undefined - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A4_T5.js - * @description RegExp is new RegExp("",(function(){})()) - */ +/*--- +info: let F be the empty string if flags is undefined +es5id: 15.10.4.1_A4_T5 +description: RegExp is new RegExp("",(function(){})()) +---*/ __re = new RegExp("", (function(){})()); @@ -24,4 +23,3 @@ if (__re.global !== false) { if (__re.ignoreCase !== false) { $ERROR('#4: __re = new RegExp("", (function(){})()); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase)); } - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T1.js index 83601d375c..e8ab80b4ef 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T1.js - * @description Checking if using "ii" as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T1 +description: Checking if using "ii" as F leads to throwing the correct exception +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp(undefined,"ii") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T2.js index eadec7f4d4..6e0d79277b 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T2.js - * @description Checking if using "migg" as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T2 +description: > + Checking if using "migg" as F leads to throwing the correct + exception +---*/ //CHECK#1 try { @@ -16,5 +19,3 @@ try { $ERROR('#1.2: new RegExp(null,"migg") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T3.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T3.js index c328654405..67168f801a 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T3.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T3.js - * @description Checking by using eval, try to use eval("\"migg\"") as F - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T3 +description: Checking by using eval, try to use eval("\"migg\"") as F +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("",eval("\\"migr\\"")) throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T4.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T4.js index 01176ab3a3..0b1fe8b31c 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T4.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T4.js - * @description Checking if using "z" as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T4 +description: Checking if using "z" as F leads to throwing the correct exception +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("a|b","z") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T6.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T6.js index 6d472996ac..7c77d4c298 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T6.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T6.js - * @description Checking if using "null" as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T6 +description: > + Checking if using "null" as F leads to throwing the correct + exception +---*/ //CHECK#1 try { @@ -16,5 +19,3 @@ try { $ERROR('#1.2: new RegExp(".",null) throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T7.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T7.js index 2e1d7c66b8..e915537a10 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T7.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T7.js - * @description Checking if using 1.0 as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T7 +description: Checking if using 1.0 as F leads to throwing the correct exception +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("^",1.0) throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T8.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T8.js index 810e16806f..d9913604f2 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T8.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T8.js - * @description Checking if using "true" as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T8 +description: > + Checking if using "true" as F leads to throwing the correct + exception +---*/ //CHECK#1 try { @@ -16,5 +19,3 @@ try { $ERROR('#1.2: new RegExp("|",true) throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T9.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T9.js index e9d9eb60de..7e26959015 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T9.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A5_T9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If F contains any character other than 'g', 'i', or 'm', or if it contains the same one more than once, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A5_T9.js - * @description Checking if using "{toString:function(){}}" as F leads to throwing the correct exception - */ +/*--- +info: > + If F contains any character other than 'g', 'i', or 'm', or if it + contains the same one more than once, then throw a SyntaxError exception +es5id: 15.10.4.1_A5_T9 +description: > + Checking if using "{toString:function(){}}" as F leads to throwing + the correct exception +---*/ //CHECK#1 try { @@ -16,5 +19,3 @@ try { $ERROR('#1.2: new RegExp("$sup",{toString:function(){}}) throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A6_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A6_T1.js index be360d42f5..db54a6d4cf 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A6_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A6_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "RegExp" - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A6_T1.js - * @description Checking [[Class]] property of the newly constructed object - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "RegExp" +es5id: 15.10.4.1_A6_T1 +description: Checking [[Class]] property of the newly constructed object +---*/ __re = new RegExp; __re.toString = Object.prototype.toString; @@ -15,5 +14,3 @@ __re.toString = Object.prototype.toString; if (__re.toString() !== "[object "+"RegExp"+"]") { $ERROR('#1: __re = new RegExp; __re.toString = Object.prototype.toString; __re.toString() === "[object "+"RegExp"+"]". Actual: ' + (__re.toString())); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T1.js index efed4fdb9c..db646bc9b5 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object is set to the original RegExp prototype object, the one that is the initial value of RegExp.prototype - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A7_T1.js - * @description Add new property to [[Prototype]] of REgExp and check this property of the newly constructed object - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object is set to the + original RegExp prototype object, the one that is the initial value of + RegExp.prototype +es5id: 15.10.4.1_A7_T1 +description: > + Add new property to [[Prototype]] of REgExp and check this + property of the newly constructed object +---*/ __re = new RegExp; RegExp.prototype.indicator = 1; @@ -15,5 +19,3 @@ RegExp.prototype.indicator = 1; if (__re.indicator !== 1) { $ERROR('#1: __re = new RegExp; RegExp.prototype.indicator = 1; __re.indicator === 1. Actual: ' + (__re.indicator)); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T2.js index d042a7b8e3..4ebf95a4ef 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A7_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object is set to the original RegExp prototype object, the one that is the initial value of RegExp.prototype - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A7_T2.js - * @description Checking [[Prototype]] property of the newly constructed object - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object is set to the + original RegExp prototype object, the one that is the initial value of + RegExp.prototype +es5id: 15.10.4.1_A7_T2 +description: Checking [[Prototype]] property of the newly constructed object +---*/ __re = new RegExp(); @@ -14,5 +16,3 @@ __re = new RegExp(); if (RegExp.prototype.isPrototypeOf(__re) !== true) { $ERROR('#1: __re = new RegExp(); RegExp.prototype.isPrototypeOf(__re) === true. Actual: ' + (RegExp.prototype.isPrototypeOf(__re))); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T1.js index f2fd70c425..f3db101c2d 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T1.js - * @description Pattern is "a|b" and flags is "i" - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T1 +description: Pattern is "a|b" and flags is "i" +---*/ __re = new RegExp("a|b","i"); @@ -34,5 +33,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp("a|b","i"); typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T10.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T10.js index 62eeb2a6ed..d9fd657b1b 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T10.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T10.js - * @description Pattern is true and flags is "m" - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T10 +description: Pattern is true and flags is "m" +---*/ __re = new RegExp(true,"m"); @@ -34,5 +33,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp(true,"m"); typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T11.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T11.js index 7301cbc1db..ec2c00ea0c 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T11.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T11.js - * @description Checking by using eval, pattern is Math and flags is eval("\"g\"") - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T11 +description: Checking by using eval, pattern is Math and flags is eval("\"g\"") +---*/ __re = new RegExp(Math,eval("\"g\"")); @@ -34,5 +33,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp(Math,eval("\\"g\\"")); typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T12.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T12.js index c078177879..988bd7c402 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T12.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T12.js - * @description Pattern is "\u0042" and flags is {toString:void 0, valueOf:function(){throw "invalof";} } - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T12 +description: > + Pattern is "\u0042" and flags is {toString:void 0, + valueOf:function(){throw "invalof";} } +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("\\u0042", {toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T13.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T13.js index cf901852d6..e69d236f2a 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T13.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T13.js - * @description Pattern is "1" and flags is {toString:function(){throw "intostr";} } - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T13 +description: > + Pattern is "1" and flags is {toString:function(){throw "intostr";} + } +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("1", {toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T2.js index f6db4abd17..92a831c660 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T2.js - * @description Pattern is function(){return "a|b|[]";}() and flags is "ig" - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T2 +description: Pattern is function(){return "a|b|[]";}() and flags is "ig" +---*/ __re = new RegExp(function(){return "a|b|[]";}(),"ig"); @@ -34,5 +33,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp(function(){return "a|b|[]"; typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T3.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T3.js index 722dfe59ae..6829076f7e 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T3.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T3.js - * @description Pattern is {toString:function(){return "[0-9]";}} and flags is (function(){return "m";})() - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T3 +description: > + Pattern is {toString:function(){return "[0-9]";}} and flags is + (function(){return "m";})() +---*/ __re = new RegExp({toString:function(){return "[0-9]";}}, (function(){return "m";})()); @@ -34,5 +35,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp({toString:function(){return "[0-9]"; typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T4.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T4.js index 1b2e108919..9d198173cd 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T4.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T4.js - * @description Pattern is {toString:void 0,valueOf:function(){return "[z-z]";}} and flags is {toString:void 0,valueOf:function(){return "mig";}} - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T4 +description: > + Pattern is {toString:void 0,valueOf:function(){return "[z-z]";}} + and flags is {toString:void 0,valueOf:function(){return "mig";}} +---*/ __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]";}}, {toString:void 0,valueOf:function(){return "mig";}}); @@ -34,5 +35,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp({toString:void 0,valueOf:function(){return "[z-z]"; typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T5.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T5.js index 47e8425901..85603d8f79 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T5.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T5.js - * @description Pattern is new Object("abc{1}") and flags is {toString:function(){return "";}} - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T5 +description: > + Pattern is new Object("abc{1}") and flags is + {toString:function(){return "";}} +---*/ __re = new RegExp(new Object("abc{1}"), {toString:function(){return "";}}); @@ -34,5 +35,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp(new Object("abc{1}"), {toString:function(){return ""; typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T6.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T6.js index 3cec72fbcc..63d049009c 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T6.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T6.js - * @description Pattern is {toString:function(){throw "intostr";} } and flags is "i" - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T6 +description: > + Pattern is {toString:function(){throw "intostr";} } and flags is + "i" +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp({toString:function(){throw "intostr";}}, "i") throw "intostr". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T7.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T7.js index f68c0d54f6..a28ed37aeb 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T7.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T7.js - * @description Pattern is {toString:void 0, valueOf:function(){throw "invalof";} } and flags is "i" - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T7 +description: > + Pattern is {toString:void 0, valueOf:function(){throw "invalof";} + } and flags is "i" +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T8.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T8.js index bddac87b60..7e9cea428e 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T8.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T8.js - * @description Pattern is {toString:function(){throw "intostr";} } and flags is "error" - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T8 +description: > + Pattern is {toString:function(){throw "intostr";} } and flags is + "error" +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T9.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T9.js index 991118a4a4..43686f1c6d 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T9.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A8_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * let P be ToString(pattern) and let F be ToString(flags) - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A8_T9.js - * @description Pattern is 1 and flags is new Object("gi") - */ +/*--- +info: let P be ToString(pattern) and let F be ToString(flags) +es5id: 15.10.4.1_A8_T9 +description: Pattern is 1 and flags is new Object("gi") +---*/ __re = new RegExp(1, new Object("gi")); @@ -34,5 +33,3 @@ if (__re.lastIndex !== 0) { if (typeof __re.source === "undefined") { $ERROR('#5: __re = new RegExp(1, new Object("gi")); typeof __re.source !== "undefined"'); } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T1.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T1.js index 92f5f8115e..f43e09a3ab 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T1.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If P's characters do not have the form Pattern, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A9_T1.js - * @description Pattern is "??" - */ +/*--- +info: > + If P's characters do not have the form Pattern, then throw a SyntaxError + exception +es5id: 15.10.4.1_A9_T1 +description: Pattern is "??" +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("??") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T2.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T2.js index 978bfba3d7..dc1179bfae 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T2.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If P's characters do not have the form Pattern, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A9_T2.js - * @description Pattern is "[{-z]" - */ +/*--- +info: > + If P's characters do not have the form Pattern, then throw a SyntaxError + exception +es5id: 15.10.4.1_A9_T2 +description: Pattern is "[{-z]" +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("[{-z]") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T3.js b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T3.js index 685c0639e9..f83f644a4b 100644 --- a/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T3.js +++ b/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A9_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If P's characters do not have the form Pattern, then throw a SyntaxError exception - * - * @path ch15/15.10/15.10.4/S15.10.4.1_A9_T3.js - * @description Pattern is "[a--z]" - */ +/*--- +info: > + If P's characters do not have the form Pattern, then throw a SyntaxError + exception +es5id: 15.10.4.1_A9_T3 +description: Pattern is "[a--z]" +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A1.js b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A1.js index f646a39c00..3b3136cfbd 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A1.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A1.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp has property prototype - * - * @path ch15/15.10/15.10.5/S15.10.5.1_A1.js - * @description Checking RegExp.prototype property - */ +/*--- +info: The RegExp has property prototype +es5id: 15.10.5.1_A1 +description: Checking RegExp.prototype property +---*/ //CHECK#1 if (RegExp.hasOwnProperty('prototype') !== true) { $ERROR('#1: RegExp.hasOwnProperty(\'prototype\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A2.js b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A2.js index 81df593912..606af7905c 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A2.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype property has the attribute DontEnum - * - * @path ch15/15.10/15.10.5/S15.10.5.1_A2.js - * @description Checking if enumerating the RegExp.prototype property fails - */ +/*--- +info: The RegExp.prototype property has the attribute DontEnum +es5id: 15.10.5.1_A2 +description: Checking if enumerating the RegExp.prototype property fails +---*/ //CHECK#0 if (RegExp.hasOwnProperty('prototype') !== true) { @@ -27,5 +26,3 @@ for (p in RegExp){ if (count !== 0) { $ERROR('#2: count=0; for (p in RegExp){ if (p==="prototype") count++; } count === 0. Actual: ' + (count)); } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A3.js b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A3.js index da1e324701..18754cad96 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A3.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A3.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype property has the attribute DontDelete - * - * @path ch15/15.10/15.10.5/S15.10.5.1_A3.js - * @description Checking if deleting the RegExp.prototype property fails - */ +/*--- +info: The RegExp.prototype property has the attribute DontDelete +es5id: 15.10.5.1_A3 +description: Checking if deleting the RegExp.prototype property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (RegExp.hasOwnProperty('prototype') !== true) { @@ -22,5 +22,3 @@ if (delete RegExp.prototype !== false) { if (RegExp.hasOwnProperty('prototype') !== true) { $ERROR('#2: delete RegExp.prototype; RegExp.hasOwnProperty(\'prototype\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A4.js b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A4.js index a1d9df93ac..e545aadcb5 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A4.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5.1_A4.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.5/S15.10.5.1_A4.js - * @description Checking if varying the RegExp.prototype property fails - */ +/*--- +info: The RegExp.prototype property has the attribute ReadOnly +es5id: 15.10.5.1_A4 +description: Checking if varying the RegExp.prototype property fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.hasOwnProperty('prototype') !== true) { @@ -21,5 +21,3 @@ RegExp.prototype = function(){return "shifted";}; if (RegExp.prototype !== __obj) { $ERROR('#2: __obj = RegExp.prototype; RegExp.prototype = function(){return "shifted";}; RegExp.prototype === __obj. Actual: ' + (RegExp.prototype)); } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5_A1.js b/test/suite/ch15/15.10/15.10.5/S15.10.5_A1.js index 5e1baa28db..d048f8985a 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5_A1.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5_A1.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp constructor has length property whose value is 2 - * - * @path ch15/15.10/15.10.5/S15.10.5_A1.js - * @description Checking RegExp.length property - */ +/*--- +info: RegExp constructor has length property whose value is 2 +es5id: 15.10.5_A1 +description: Checking RegExp.length property +---*/ - //CHECK#1 +//CHECK#1 if (RegExp.length !== 2) { $ERROR('#1: RegExp.length === 2. Actual: ' + (RegExp.length)); } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T1.js b/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T1.js index 78ffce644a..8c36bfdc0d 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the RegExp constructor is the Function prototype object - * - * @path ch15/15.10/15.10.5/S15.10.5_A2_T1.js - * @description Checking Function.prototype.isPrototypeOf(RegExp) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the RegExp + constructor is the Function prototype object +es5id: 15.10.5_A2_T1 +description: Checking Function.prototype.isPrototypeOf(RegExp) +---*/ - //CHECK#1 +//CHECK#1 if (Function.prototype.isPrototypeOf(RegExp) !== true) { $ERROR('#1: Function.prototype.isPrototypeOf(RegExp) === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T2.js b/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T2.js index f07b34b75a..4fdec524fb 100644 --- a/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.5/S15.10.5_A2_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the RegExp constructor is the Function prototype object - * - * @path ch15/15.10/15.10.5/S15.10.5_A2_T2.js - * @description Add new property to Function.prototype and then check this property of RegExp - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the RegExp + constructor is the Function prototype object +es5id: 15.10.5_A2_T2 +description: > + Add new property to Function.prototype and then check this + property of RegExp +---*/ Function.prototype.indicator = 1; @@ -14,5 +17,3 @@ Function.prototype.indicator = 1; if (RegExp.indicator !== 1) { $ERROR('#1: Function.prototype.indicator = 1; RegExp.indicator === 1. Actual: ' + (RegExp.indicator)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/15.10.6.2-9-e-1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/15.10.6.2-9-e-1.js index 4827489884..3ecbe53dd3 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/15.10.6.2-9-e-1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/15.10.6.2-9-e-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.6/15.10.6.2/15.10.6.2-9-e-1.js - * @description RegExp.prototype.exec - the removed step 9.e won't affected current algorithm - */ - - -function testcase() { - var str = "Hello World!"; - var regObj = new RegExp("World"); - var result = false; - result = regObj.exec(str).toString() === "World"; - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.6.2-9-e-1 +description: > + RegExp.prototype.exec - the removed step 9.e won't affected + current algorithm +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = "Hello World!"; + var regObj = new RegExp("World"); + var result = false; + result = regObj.exec(str).toString() === "World"; + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A10.js index 622178b19e..7f505b03d6 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A10.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.exec.length property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A10.js - * @description Checking if varying the RegExp.prototype.exec.length property fails - */ +/*--- +info: The RegExp.prototype.exec.length property has the attribute ReadOnly +es5id: 15.10.6.2_A10 +description: Checking if varying the RegExp.prototype.exec.length property fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { @@ -21,4 +21,3 @@ RegExp.prototype.exec.length = function(){return "shifted";}; if (RegExp.prototype.exec.length !== __obj) { $ERROR('#2: __obj = RegExp.prototype.exec.length; RegExp.prototype.exec.length = function(){return "shifted";}; RegExp.prototype.exec.length === __obj. Actual: ' + (RegExp.prototype.exec.length)); } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A11.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A11.js index cd7ac8ea6b..b3052f3d18 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A11.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A11.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the exec method is 1 - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A11.js - * @description Checking RegExp.prototype.exec.length - */ +/*--- +info: The length property of the exec method is 1 +es5id: 15.10.6.2_A11 +description: Checking RegExp.prototype.exec.length +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.prototype.exec.hasOwnProperty("length") !== true) { @@ -17,5 +17,3 @@ if (RegExp.prototype.exec.hasOwnProperty("length") !== true) { if (RegExp.prototype.exec.length !== 1) { $ERROR('#2: RegExp.prototype.exec.length === 1. Actual: ' + (RegExp.prototype.exec.length)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A12.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A12.js index d4177de6ab..38276478fb 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A12.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A12.js @@ -1,12 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * regExp exec() acts like regExp.exec('undefined') (step 2) - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A12.js - * @description Checking RegExp.prototype.exec - */ +/*--- +info: regExp exec() acts like regExp.exec('undefined') (step 2) +es5id: 15.10.6.2_A12 +description: Checking RegExp.prototype.exec +includes: [$FAIL.js] +---*/ (/foo/).test('xfoox'); var match = new RegExp('(.|\r|\n)*','').exec()[0]; @@ -16,4 +16,3 @@ if (match === 'xfoox') { if (match !== 'undefined') { $FAIL('#2: regExp.exec() must coerce absent first arg to "undefined"'); } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T1.js index 3820639df4..d55d32158a 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T1.js - * @description String is "123" and RegExp is /1|12/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T1 +description: String is "123" and RegExp is /1|12/ +---*/ __executed = /1|12/.exec("123"); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /1|12/.exec("123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T10.js index 9110c8a26f..d556ba2297 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T10.js - * @description String is 1.01 and RegExp is /1|12/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T10 +description: String is 1.01 and RegExp is /1|12/ +---*/ __executed = /1|12/.exec(1.01); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /1|12/.exec(1.01); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T11.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T11.js index 312afbd527..61f3a4f06b 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T11.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T11.js - * @description String is new Number(1.012) and RegExp is /2|12/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T11 +description: String is new Number(1.012) and RegExp is /2|12/ +---*/ __executed = /2|12/.exec(new Number(1.012)); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /2|12/.exec(new Number(1.012)); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T12.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T12.js index fe8ec74b99..a0c26035ca 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T12.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T12.js - * @description String is {toString:function(){return Math.PI;}} and RegExp is /\.14/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T12 +description: > + String is {toString:function(){return Math.PI;}} and RegExp is + /\.14/ +---*/ __executed = /\.14/.exec({toString:function(){return Math.PI}}); @@ -41,5 +43,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /\\.14/.exec({toString:function(){return Math.PI}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T13.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T13.js index bb068edaa3..037aef18ca 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T13.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T13.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T13.js - * @description String is true and RegExp is /t[a-b|q-s]/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T13 +description: String is true and RegExp is /t[a-b|q-s]/ +---*/ __executed = /t[a-b|q-s]/.exec(true); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /t[a-b|q-s]/.exec(true); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T14.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T14.js index c631d5e40c..19248da736 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T14.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T14.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T14.js - * @description String is new Boolean and RegExp is /AL|se/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T14 +description: String is new Boolean and RegExp is /AL|se/ +---*/ __executed = /AL|se/.exec(new Boolean); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /AL|se/.exec(new Boolean); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T15.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T15.js index 7bed7f1063..cd9f348ea9 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T15.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T15.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T15.js - * @description String is {toString:function(){return false;}} and RegExp is /LS/i - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T15 +description: "String is {toString:function(){return false;}} and RegExp is /LS/i" +---*/ __executed = /LS/i.exec({toString:function(){return false}}); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /LS/i.exec({toString:function(){return false}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T16.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T16.js index 4431507ee4..0f72bb36bc 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T16.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T16.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T16.js - * @description RegExp is /undefined/ and call exec() without arguments - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T16 +description: RegExp is /undefined/ and call exec() without arguments +---*/ __re = /undefined/.exec()[0]; if (__re !== "undefined") { $ERROR('#1: /undefined/.exec()[0] === "undefined". Actual: ' + (__re)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T17.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T17.js index b66df5954f..2f1ccbb258 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T17.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T17.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T17.js - * @description String is null and RegExp is /ll|l/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T17 +description: String is null and RegExp is /ll|l/ +---*/ __executed = /ll|l/.exec(null); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /ll|l/.exec(null); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T18.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T18.js index b1d5bdaf1b..011edd6777 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T18.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T18.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T18.js - * @description String is undefined and RegExp is /nd|ne/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T18 +description: String is undefined and RegExp is /nd|ne/ +---*/ __executed = /nd|ne/.exec(undefined); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /nd|ne/.exec(undefined); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T19.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T19.js index bf58519230..ebd89b1f76 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T19.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T19.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T19.js - * @description String is void 0 and RegExp is /e{1}/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T19 +description: String is void 0 and RegExp is /e{1}/ +---*/ __executed = /e{1}/.exec(void 0); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /e{1}/.exec(void 0); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T2.js index d910dcfc8f..e3bf673caf 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T2.js - * @description String is new String("123") and RegExp is /((1)|(12))((3)|(23))/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T2 +description: String is new String("123") and RegExp is /((1)|(12))((3)|(23))/ +---*/ with(/((1)|(12))((3)|(23))/){ __executed = exec(new String("123")); @@ -43,5 +43,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: with(/((1)|(12))((3)|(23))/){__executed = exec(new String("123"));} __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T20.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T20.js index c60a6b0485..c116d57c32 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T20.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T20.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T20.js - * @description String is x and RegExp is /[a-f]d/, where x is undefined variable - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T20 +description: String is x and RegExp is /[a-f]d/, where x is undefined variable +---*/ __executed = /[a-f]d/.exec(x); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } var x; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T21.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T21.js index 2ce0455932..995b234404 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T21.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T21.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T21.js - * @description String is function(){}() and RegExp is /[a-z]n/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T21 +description: String is function(){}() and RegExp is /[a-z]n/ +---*/ __executed = /[a-z]n/.exec(function(){}()); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /[a-z]n/.exec(function(){}()); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T3.js index c2a05cc09a..b48e4c974e 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T3.js - * @description String is new Object("abcdefghi") and RegExp is /a[a-z]{2,4}/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T3 +description: String is new Object("abcdefghi") and RegExp is /a[a-z]{2,4}/ +---*/ __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); @@ -41,5 +41,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[a-z]{2,4}/.exec(new Object("abcdefghi")); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T4.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T4.js index 07468985e5..1a301acd08 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T4.js - * @description String is {toString:function(){return "abcdefghi";}} and RegExp is /a[a-z]{2,4}?/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T4 +description: > + String is {toString:function(){return "abcdefghi";}} and RegExp is + /a[a-z]{2,4}?/ +---*/ __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); @@ -41,5 +43,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return "abcdefghi"}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T5.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T5.js index 0efb7b256e..77c7397f44 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T5.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T5.js - * @description String is {toString:function(){return {};}, valueOf:function(){return "aabaac";}} and RegExp is /(aa|aabaac|ba|b|c)* / - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T5 +description: > + String is {toString:function(){return {};}, + valueOf:function(){return "aabaac";}} and RegExp is + /(aa|aabaac|ba|b|c)* / +---*/ __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); @@ -41,5 +44,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return "aabaac";}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T6.js index 2444d74bcb..679679fcab 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T6.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T6.js - * @description String is (function(){return "zaacbbbcac"})() and RegExp is /(z)((a+)?(b+)?(c))* / - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T6 +description: > + String is (function(){return "zaacbbbcac"})() and RegExp is + /(z)((a+)?(b+)?(c))* / +---*/ __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); @@ -41,5 +43,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#4: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return "zaacbbbcac"})()); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T7.js index 7dbbb81e02..a2b472ee05 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T7.js - * @description String is {toString:function(){throw "intostr";}} and RegExp is /[a-z]/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T7 +description: > + String is {toString:function(){throw "intostr";}} and RegExp is + /[a-z]/ +---*/ //CHECK#1 try { @@ -17,5 +19,3 @@ try { $ERROR('#1.2: /[a-z]/.exec({toString:function(){throw "intostr"}}) throw "intostr". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T8.js index 7d52b7a714..caa1852cd8 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T8.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T8.js - * @description String is {toString:void 0, valueOf:function(){throw "invalof";}} and RegExp is /[a-z]/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T8 +description: > + String is {toString:void 0, valueOf:function(){throw "invalof";}} + and RegExp is /[a-z]/ +---*/ //CHECK#1 try { @@ -17,5 +19,3 @@ try { $ERROR('#1.2: /[a-z]/.exec({toString:void 0, valueOf:function(){throw "invalof"}}) throw "invalof". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T9.js index f1dd9d5d61..0024b34f66 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and - * returns an Array object containing the results of the match, or null if the string did not match - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A1_T9.js - * @description String is undefined variable and RegExp is /1|12/ - */ +/*--- +info: > + RegExp.prototype.exec(string) Performs a regular expression match of ToString(string) against the regular expression and + returns an Array object containing the results of the match, or null if the string did not match +es5id: 15.10.6.2_A1_T9 +description: String is undefined variable and RegExp is /1|12/ +---*/ var __string; @@ -18,4 +18,3 @@ if (__re.exec(__string) !== null) { } function __string(){}; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T1.js index ef0e75779d..0536c9d4b4 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T1.js - * @description The internal [[Class]] property is "Object" - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T1 +description: The internal [[Class]] property is "Object" +---*/ __instance = new Object; @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = new Object; __instance.exec = RegExp.prototype.exec. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T10.js index eb3c0d3025..5d05444475 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T10.js - * @description The tested object is undefined - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T10 +description: The tested object is undefined +---*/ exec = RegExp.prototype.exec; @@ -18,5 +19,3 @@ try { $ERROR('#1.2: exec = RegExp.prototype.exec; exec("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T2.js index 3ad0c6a369..6e26a74d68 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T2.js - * @description The tested object is Math - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T2 +description: The tested object is Math +---*/ __instance = Math; @@ -21,5 +22,3 @@ try { $ERROR('#1.2: __instance = Math; __instance.exec = RegExp.prototype.exec; with(__instance) exec("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T3.js index d95f43afa1..70b8f34abd 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T3.js - * @description The tested object is function object - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T3 +description: The tested object is function object +---*/ __instance.exec = RegExp.prototype.exec; @@ -21,4 +22,3 @@ try { } function __instance(){}; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T4.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T4.js index 54732989f7..ec202ebfa6 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T4.js - * @description The tested object is new String("[a-b]") - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T4 +description: The tested object is new String("[a-b]") +---*/ __instance = new String("[a-b]"); @@ -22,5 +23,3 @@ with(__instance){ } } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T5.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T5.js index 1fe90d769e..c31cde3302 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T5.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T5.js - * @description The tested object is new Boolean(false) - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T5 +description: The tested object is new Boolean(false) +---*/ __instance = new Boolean(false); @@ -22,5 +23,3 @@ with(__instance) { } } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T6.js index 7ecc6c9efa..6d5e776995 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T6.js - * @description The tested object is new Number(1.0) - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T6 +description: The tested object is new Number(1.0) +---*/ __instance = new Number(1.0); @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; __instance["exec"]("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T7.js index 1c698ff1d1..fb9474c482 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T7.js - * @description The tested object is false - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T7 +description: The tested object is false +---*/ __instance = false; @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = false; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T8.js index f95548b61f..1440c7d02a 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T8.js - * @description The tested object is "." - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T8 +description: The tested object is "." +---*/ __instance = "."; @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = "."; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T9.js index ea43ba4dbc..fd474480c3 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A2_T9.js - * @description The tested object is 1.0 - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.2_A2_T9 +description: The tested object is 1.0 +---*/ __instance = 1.0; @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; __instance.exec("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T1.js index 2425d09414..9a8c89bfb0 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T1.js - * @description RegExp is /(?:ab|cd)\d?/g and tested string is "ab cd2 ab34 cd" - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T1 +description: "RegExp is /(?:ab|cd)\\d?/g and tested string is \"ab cd2 ab34 cd\"" +---*/ __re = /(?:ab|cd)\d?/g; @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#2: __executed = /(?:ab|cd)\\d?/g.exec("ab cd2 ab34 cd"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T2.js index 65ba482a65..54cbbaf7cb 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T2.js - * @description RegExp is /[Nn]evermore/g and tested string is very long string - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T2 +description: RegExp is /[Nn]evermore/g and tested string is very long string +---*/ __the__raven = " Once upon a midnight dreary, while I pondered weak and weary," + "Over many a quaint and curious volume of forgotten lore," + @@ -152,5 +152,3 @@ do{ if (__matched !== NEVERMORE) { $ERROR('#1: __re = /[Nn]evermore/g; __executed = __re.exec(__the__raven)'+__matched); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T3.js index d7dab0af96..eb8977eeb8 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T3.js - * @description RegExp is /[Nn]?evermore/g and tested string is very long string - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T3 +description: RegExp is /[Nn]?evermore/g and tested string is very long string +---*/ __the__raven = " Once upon a midnight dreary, while I pondered weak and weary," + "Over many a quaint and curious volume of forgotten lore," + @@ -152,5 +152,3 @@ do{ if (__matched !== NEVERMORE_AND_EVERMORE) { $ERROR('#1: __re = /[Nn]?evermore/g; __executed = __re.exec(__the__raven)'+__matched); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T4.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T4.js index 72cac2ed5f..2bbfaae4a0 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T4.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T4.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T4.js - * @description RegExp is /([Nn]?ever|([Nn]othing\s{1,}))more/g and tested string is very long string - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T4 +description: > + RegExp is /([Nn]?ever|([Nn]othing\s{1,}))more/g and tested string + is very long string +---*/ __the__raven = " Once upon a midnight dreary, while I pondered weak and weary," + "Over many a quaint and curious volume of forgotten lore," + @@ -152,5 +154,3 @@ do{ if (__matched !== ALL_THE_HOPELESS_MORE) { $ERROR('#1: __re = /([Nn]?ever|([Nn]othing\\s{1,}))more/g; __executed = __re.exec(__the__raven)'+__matched); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T5.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T5.js index 1625679e0c..37e186e06d 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T5.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T5.js - * @description RegExp is /\d+/g and tested string is "123 456 789" - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T5 +description: RegExp is /\d+/g and tested string is "123 456 789" +---*/ __re = /\d+/g; @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#2: __executed = /\\d+/g.exec("123 456 789"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T6.js index 3ab41a91c7..9f9b5d28ca 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T6.js - * @description RegExp is /(\d+)/g and tested string is "123 456 789" - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T6 +description: RegExp is /(\d+)/g and tested string is "123 456 789" +---*/ __re = /(\d+)/g; @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#2: __executed = /(\\d+)/g.exec("123 456 789"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T7.js index 1160c0ac0c..6d87fe4a25 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T7.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true and lastIndex not changed manually, - * next exec calling start to match from position where current match finished - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A3_T7.js - * @description RegExp is /\d+/ and tested string is "123 456 789" - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true and lastIndex not changed manually, + next exec calling start to match from position where current match finished +es5id: 15.10.6.2_A3_T7 +description: RegExp is /\d+/ and tested string is "123 456 789" +---*/ __re = /\d+/; @@ -36,5 +36,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#2: __executed = /\\d+/.exec("123 456 789"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T1.js index 56d1f7e626..fe7d185134 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T1.js - * @description Call first exec, then set re.lastIndex = 12 and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T1 +description: Call first exec, then set re.lastIndex = 12 and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +68,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = 12; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T10.js index 0d880dd0fc..3955d80055 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T10.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T10.js - * @description Call first exec, then set re.lastIndex = {valueOf:function(){return 12;}} and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T10 +description: > + Call first exec, then set re.lastIndex = + {valueOf:function(){return 12;}} and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -70,5 +72,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T11.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T11.js index 3a8a07ceac..8b53d2a934 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T11.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T11.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T11.js - * @description Call first exec, then set re.lastIndex = {valueOf:function(){throw "intoint";}} and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T11 +description: > + Call first exec, then set re.lastIndex = {valueOf:function(){throw + "intoint";}} and again call exec +includes: [$FAIL.js] +---*/ __re = /(?:ab|cd)\d?/g; @@ -51,5 +54,3 @@ try { $ERROR('#5.2: __obj = {valueOf:function(){throw "intoint";}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42") throw "intoint". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T12.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T12.js index 44ae47514a..6082037cc2 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T12.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T12.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T12.js - * @description Call first exec, then set re.lastIndex = {toString:function(){return 12;},valueOf:function(){return {};}} and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T12 +description: > + Call first exec, then set re.lastIndex = + {toString:function(){return 12;},valueOf:function(){return {};}} + and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -70,5 +73,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T2.js index 485c6e7fa2..5d5d969598 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T2.js - * @description Call first exec, then set re.lastIndex = undefined and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T2 +description: > + Call first exec, then set re.lastIndex = undefined and again call + exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +70,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = undefined; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T3.js index 07daf65eaf..6fac016946 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T3.js - * @description Call first exec, then set re.lastIndex = void 0 and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T3 +description: Call first exec, then set re.lastIndex = void 0 and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +68,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = void 0; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T4.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T4.js index cfdb7a7bda..d29b13f1f1 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T4.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T4.js - * @description Call first exec, then set re.lastIndex = null and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T4 +description: Call first exec, then set re.lastIndex = null and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +68,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = null; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T5.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T5.js index da1c8bc047..121a7832fa 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T5.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T5.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T5.js - * @description Call first exec, then set re.lastIndex = x and again call exec, where x is undefined variable - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T5 +description: > + Call first exec, then set re.lastIndex = x and again call exec, + where x is undefined variable +---*/ __re = /(?:ab|cd)\d?/g; @@ -70,4 +72,3 @@ for(var index=0; index<__expected.length; index++) { } var x; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T6.js index 482bb420fc..a91c4f9553 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T6.js - * @description Call first exec, then set re.lastIndex = false and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T6 +description: Call first exec, then set re.lastIndex = false and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +68,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = false; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T7.js index 3d08c90980..31ecbbaab8 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T7.js - * @description Call first exec, then set re.lastIndex = Math.NaN and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T7 +description: > + Call first exec, then set re.lastIndex = Math.NaN and again call + exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +70,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; re.lastIndex = Math.NaN; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T8.js index 7d79fd9394..11c74aa0f9 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T8.js - * @description Call first exec, then set re.lastIndex = "12" and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T8 +description: Call first exec, then set re.lastIndex = "12" and again call exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +68,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g; __re.lastIndex = "12"; __executed = __re.exec("aacd2233ab12nm444ab42");__executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T9.js index 3a001d425d..fb17b83afb 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * If global is true next exec calling start to match from lastIndex position - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A4_T9.js - * @description Call first exec, then set re.lastIndex = "eleven" and again call exec - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + If global is true next exec calling start to match from lastIndex position +es5id: 15.10.6.2_A4_T9 +description: > + Call first exec, then set re.lastIndex = "eleven" and again call + exec +---*/ __re = /(?:ab|cd)\d?/g; @@ -68,5 +70,3 @@ for(var index=0; index<__expected.length; index++) { $ERROR('#8: __re = /(?:ab|cd)\\d?/g;__re.lastIndex = "eleven"; __executed = __re.exec("aacd2233ab12nm444ab42"); __executed = __re.exec("aacd2233ab12nm444ab42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T1.js index 36a518f16b..9a9ed7e2d7 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * Let global is true and let I = If ToInteger(lastIndex). - * Then if I<0 orI>length then set lastIndex to 0 and return null - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T1.js - * @description First call /(?:ab|cd)\d?/g.exec("aac1dz2233a1bz12nm444ab42"), and then First call /(?:ab|cd)\d?/g.exec("aacd22") - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + Let global is true and let I = If ToInteger(lastIndex). + Then if I<0 orI>length then set lastIndex to 0 and return null +es5id: 15.10.6.2_A5_T1 +description: > + First call /(?:ab|cd)\d?/g.exec("aac1dz2233a1bz12nm444ab42"), and + then First call /(?:ab|cd)\d?/g.exec("aacd22") +---*/ __re = /(?:ab|cd)\d?/g; __executed = __re.exec("aac1dz2233a1bz12nm444ab42"); @@ -50,5 +52,3 @@ if (__executed) { if (__re.lastIndex !== 0) { $ERROR('#6: __re = /(?:ab|cd)\\d?/g; __executed = __re.exec("aacd22"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T2.js index 8de8ba885b..3ed1d5f746 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * Let global is true and let I = If ToInteger(lastIndex). - * Then if I<0 orI>length then set lastIndex to 0 and return null - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T2.js - * @description Set lastIndex to 100 and call /(?:ab|cd)\d?/g.exec("aacd22 ") - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + Let global is true and let I = If ToInteger(lastIndex). + Then if I<0 orI>length then set lastIndex to 0 and return null +es5id: 15.10.6.2_A5_T2 +description: "Set lastIndex to 100 and call /(?:ab|cd)\\d?/g.exec(\"aacd22 \")" +---*/ __re = /(?:ab|cd)\d?/g; __re.lastIndex=100; @@ -23,5 +23,3 @@ if (__executed) { if (__re.lastIndex !== 0) { $ERROR('#2: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=100; __executed = __re.exec("aacd22 "); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T3.js index 7e2d766267..80cf9c3951 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec behavior depends on global property. - * Let global is true and let I = If ToInteger(lastIndex). - * Then if I<0 orI>length then set lastIndex to 0 and return null - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T3.js - * @description Set lastIndex to -1 and call /(?:ab|cd)\d?/g.exec("aacd22 ") - */ +/*--- +info: > + RegExp.prototype.exec behavior depends on global property. + Let global is true and let I = If ToInteger(lastIndex). + Then if I<0 orI>length then set lastIndex to 0 and return null +es5id: 15.10.6.2_A5_T3 +description: "Set lastIndex to -1 and call /(?:ab|cd)\\d?/g.exec(\"aacd22 \")" +---*/ __re = /(?:ab|cd)\d?/g; __re.lastIndex=-1; @@ -36,5 +36,3 @@ if (__executed) { if (__re.lastIndex !== 0) { $ERROR('#4: __re = /(?:ab|cd)\\d?/g; __re.lastIndex=-1; __executed = __re.test("aacd22 "); __re.lastIndex=-100; __executed = __re.test("aacd22 "); __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A6.js index 5e71a618cb..fa3d18871d 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec has not prototype property - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A6.js - * @description Checking RegExp.prototype.exec.prototype - */ +/*--- +info: RegExp.prototype.exec has not prototype property +es5id: 15.10.6.2_A6 +description: Checking RegExp.prototype.exec.prototype +---*/ //CHECK#1 if (RegExp.prototype.exec.prototype !== undefined) { $ERROR('#1: RegExp.prototype.exec.prototype === undefined. Actual: ' + (RegExp.prototype.exec.prototype)); } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A7.js index 7285a2ab1b..3e252361cc 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.exec can't be used as constructor - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A7.js - * @description Checking if creating the RegExp.prototype.exec object fails - */ +/*--- +info: RegExp.prototype.exec can't be used as constructor +es5id: 15.10.6.2_A7 +description: Checking if creating the RegExp.prototype.exec object fails +---*/ __FACTORY = RegExp.prototype.exec; @@ -18,4 +17,3 @@ try { $ERROR('#1.2: __FACTORY = RegExp.prototype.exec throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A8.js index ffe5d7b019..d0598dc0cf 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.exec.length property has the attribute DontEnum - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A8.js - * @description Checking if enumerating the RegExp.prototype.exec.length property fails - */ +/*--- +info: The RegExp.prototype.exec.length property has the attribute DontEnum +es5id: 15.10.6.2_A8 +description: > + Checking if enumerating the RegExp.prototype.exec.length property + fails +---*/ //CHECK#0 if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { @@ -28,5 +29,3 @@ for (p in RegExp.prototype.exec){ if (count !== 0) { $ERROR('#2: count = 0; for (p in RegExp.prototype.exec){ if (p==="length") count++; } count === 0. Actual: ' + (count)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A9.js index 1e67a21253..0dd0ff35b2 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.exec.length property has the attribute DontDelete - * - * @path ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A9.js - * @description Checking if deleting the RegExp.prototype.exec.length property fails - */ +/*--- +info: The RegExp.prototype.exec.length property has the attribute DontDelete +es5id: 15.10.6.2_A9 +description: > + Checking if deleting the RegExp.prototype.exec.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#0 if ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) { @@ -22,5 +24,3 @@ if (delete RegExp.prototype.exec.length !== false) { if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { $ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A10.js index ada503cda7..da01317a69 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A10.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.test.length property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A10.js - * @description Checking if varying the RegExp.prototype.test.length property fails - */ +/*--- +info: The RegExp.prototype.test.length property has the attribute ReadOnly +es5id: 15.10.6.3_A10 +description: Checking if varying the RegExp.prototype.test.length property fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.prototype.test.hasOwnProperty('length') !== true) { @@ -21,5 +21,3 @@ RegExp.prototype.test.length = function(){return "shifted";}; if (RegExp.prototype.test.length !== __obj) { $ERROR('#2: __obj = RegExp.prototype.test.length; RegExp.prototype.test.length = function(){return "shifted";}; RegExp.prototype.test.length === __obj. Actual: ' + (RegExp.prototype.test.length)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A11.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A11.js index faefeada39..3e1ce9f1b0 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A11.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A11.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the test method is 1 - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A11.js - * @description Checking RegExp.prototype.test.length - */ +/*--- +info: The length property of the test method is 1 +es5id: 15.10.6.3_A11 +description: Checking RegExp.prototype.test.length +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.prototype.test.hasOwnProperty("length") !== true) { @@ -17,5 +17,3 @@ if (RegExp.prototype.test.hasOwnProperty("length") !== true) { if (RegExp.prototype.test.length !== 1) { $ERROR('#2: RegExp.prototype.test.length === 1. Actual: ' + (RegExp.prototype.test.length)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T1.js index bb51ec13fd..72b6822d38 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T1.js - * @description RegExp is /1|12/ and tested string is "123" - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T1 +description: RegExp is /1|12/ and tested string is "123" +---*/ var __string = "123"; __re = /1|12/; @@ -15,5 +14,3 @@ __re = /1|12/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = "123";__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T10.js index b2817a2973..24d36e4b6c 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T10.js - * @description RegExp is /1|12/ and tested string is 1.01 - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T10 +description: RegExp is /1|12/ and tested string is 1.01 +---*/ var __string = 1.01; __re = /1|12/; @@ -15,5 +14,3 @@ __re = /1|12/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = 1.01;__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T11.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T11.js index 2687e40cb9..da005e97aa 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T11.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T11.js - * @description RegExp is /2|12/ and tested string is new Number(1.012) - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T11 +description: RegExp is /2|12/ and tested string is new Number(1.012) +---*/ var __string = new Number(1.012); __re = /2|12/; @@ -15,5 +14,3 @@ __re = /2|12/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = new Number(1.012); __re = /2|12/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T12.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T12.js index 95ff76d742..c4a4e72e3a 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T12.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T12.js - * @description RegExp is /\.14/ and tested string is {toString:function(){return Math.PI;}} - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T12 +description: > + RegExp is /\.14/ and tested string is {toString:function(){return + Math.PI;}} +---*/ var __string = {toString:function(){return Math.PI;}}; __re = /\.14/; @@ -15,5 +16,3 @@ __re = /\.14/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = {toString:function(){return Math.PI;}}; __re = /\\.14/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T13.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T13.js index b489ac423b..5a2dd89940 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T13.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T13.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T13.js - * @description RegExp is /t[a-b|q-s]/ and tested string is true - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T13 +description: RegExp is /t[a-b|q-s]/ and tested string is true +---*/ var __string = true; __re = /t[a-b|q-s]/; @@ -15,5 +14,3 @@ __re = /t[a-b|q-s]/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = true;__re = /t[a-b|q-s]/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T14.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T14.js index 7d92aae10e..834bb463cc 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T14.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T14.js - * @description RegExp is /AL|se/ and tested string is new Boolean - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T14 +description: RegExp is /AL|se/ and tested string is new Boolean +---*/ var __string = new Boolean; __re = /AL|se/; @@ -15,5 +14,3 @@ __re = /AL|se/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = new Boolean;__re = /AL|se/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T15.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T15.js index d5fa26f762..8f41f9805a 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T15.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T15.js - * @description RegExp is /LS/i and tested string is {toString:function(){return false;}} - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T15 +description: > + RegExp is /LS/i and tested string is {toString:function(){return + false;}} +---*/ var __string = {toString:function(){return false;}}; __re = /LS/i; @@ -15,5 +16,3 @@ __re = /LS/i; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = {toString:function(){return false;}}; __re = /LS/i; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T16.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T16.js index 7dedbf60eb..fb0b222325 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T16.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T16.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T16.js - * @description RegExp is /undefined/ and call test() without arguments - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T16 +description: RegExp is /undefined/ and call test() without arguments +---*/ __re = /undefined/; @@ -14,5 +13,3 @@ __re = /undefined/; if (__re.test() !== (__re.exec() !== null)) { $ERROR('#0: __re = /undefined/; __re.test() === (__re.exec() !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T17.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T17.js index 0e4bab34c3..fcdc6968d0 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T17.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T17.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T17.js - * @description RegExp is /ll|l/ and tested string is null - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T17 +description: RegExp is /ll|l/ and tested string is null +---*/ __re = /ll|l/; @@ -14,5 +13,3 @@ __re = /ll|l/; if (__re.test(null) !== (__re.exec(null) !== null)) { $ERROR('#0: __re = /ll|l/; __re.test(null) === (__re.exec(null) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T18.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T18.js index 7931a811c5..5ec840f275 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T18.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T18.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T18.js - * @description RegExp is /nd|ne/ and tested string is undefined - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T18 +description: RegExp is /nd|ne/ and tested string is undefined +---*/ __re = /nd|ne/; @@ -14,5 +13,3 @@ __re = /nd|ne/; if (__re.test(undefined) !== (__re.exec(undefined) !== null)) { $ERROR('#0: __re = /nd|ne/; __re.test(undefined) === (__re.exec(undefined) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T19.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T19.js index 8621eff941..cd56e027dc 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T19.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T19.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T19.js - * @description RegExp is /e{1}/ and tested string is void 0 - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T19 +description: RegExp is /e{1}/ and tested string is void 0 +---*/ __re = /e{1}/; @@ -14,5 +13,3 @@ __re = /e{1}/; if (__re.test(void 0) !== (__re.exec(void 0) !== null)) { $ERROR('#0: __re = /e{1}/; __re.test(void 0) === (__re.exec(void 0) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T2.js index f171f2300b..59c27284f8 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T2.js - * @description RegExp is /((1)|(12))((3)|(23))/ and tested string is new String("123") - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T2 +description: > + RegExp is /((1)|(12))((3)|(23))/ and tested string is new + String("123") +---*/ var __string = new String("123"); __re = /((1)|(12))((3)|(23))/; @@ -15,5 +16,3 @@ __re = /((1)|(12))((3)|(23))/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = new String("123"); __re = /((1)|(12))((3)|(23))/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T20.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T20.js index 9548d0c379..da868bcfe0 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T20.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T20.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T20.js - * @description RegExp is /[a-f]d/ and tested string is x, where x is undefined - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T20 +description: RegExp is /[a-f]d/ and tested string is x, where x is undefined +---*/ __re = /[a-f]d/; @@ -16,4 +15,3 @@ if (__re.test(x) !== (__re.exec(x) !== null)) { } var x; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T21.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T21.js index 7d881ac7a0..3913a2d6ad 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T21.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T21.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T21.js - * @description RegExp is /[a-z]n/ and tested string is x, where x is function(){}() - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T21 +description: > + RegExp is /[a-z]n/ and tested string is x, where x is + function(){}() +---*/ __re = /[a-z]n/; @@ -14,5 +15,3 @@ __re = /[a-z]n/; if (__re.test(function(){}()) !== (__re.exec(function(){}()) !== null)) { $ERROR('#0: __re = /[a-z]n/; __re.test(function(){}()) === (__re.exec(function(){}()) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T3.js index e4e2d476fd..051d15b445 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T3.js - * @description RegExp is /a[a-z]{2,4}/ and tested string is new Object("abcdefghi") - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T3 +description: > + RegExp is /a[a-z]{2,4}/ and tested string is new + Object("abcdefghi") +---*/ var __string = new Object("abcdefghi"); __re = /a[a-z]{2,4}/; @@ -15,5 +16,3 @@ __re = /a[a-z]{2,4}/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = new Object("abcdefghi"); __re = /a[a-z]{2,4}/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T4.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T4.js index 6bb802c1db..0c46f490f5 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T4.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T4.js - * @description RegExp is /a[a-z]{2,4}?/ and tested string is {toString:function(){return "abcdefghi";}} - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T4 +description: > + RegExp is /a[a-z]{2,4}?/ and tested string is + {toString:function(){return "abcdefghi";}} +---*/ var __string = {toString:function(){return "abcdefghi";}}; __re = /a[a-z]{2,4}?/; @@ -15,5 +16,3 @@ __re = /a[a-z]{2,4}?/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = {toString:function(){return "abcdefghi";}}; __re = /a[a-z]{2,4}?/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T5.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T5.js index 40987cabf4..962ed1da05 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T5.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T5.js - * @description RegExp is /(aa|aabaac|ba|b|c)* / and tested string is {toString:function(){return {};}, valueOf:function(){return "aabaac";}} - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T5 +description: > + RegExp is /(aa|aabaac|ba|b|c)* / and tested string is + {toString:function(){return {};}, valueOf:function(){return + "aabaac";}} +---*/ var __string = {toString:function(){return {};}, valueOf:function(){return "aabaac";}}; __re = /(aa|aabaac|ba|b|c)*/; @@ -15,5 +17,3 @@ __re = /(aa|aabaac|ba|b|c)*/; if (__re.test(__string) !== (__re.exec(__string) !== null)) { $ERROR('#0: var __string = {toString:function(){return {};}, valueOf:function(){return "aabaac";}}; __re = /(aa|aabaac|ba|b|c)*/; __re.test(__string) === (__re.exec(__string) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T6.js index 67c631529d..015a3fb26c 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T6.js - * @description RegExp is /(z)((a+)?(b+)?(c))* / and tested string is (function(){return "zaacbbbcac"})() - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T6 +description: > + RegExp is /(z)((a+)?(b+)?(c))* / and tested string is + (function(){return "zaacbbbcac"})() +---*/ __re = /(z)((a+)?(b+)?(c))*/; @@ -14,5 +15,3 @@ __re = /(z)((a+)?(b+)?(c))*/; if (__re.test((function(){return "zaacbbbcac"})()) !== (__re.exec((function(){return "zaacbbbcac"})()) !== null)) { $ERROR('#0: __re = /(z)((a+)?(b+)?(c))*/; __re.test((function(){return "zaacbbbcac"})()) === (__re.exec((function(){return "zaacbbbcac"})()) !== null)'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T7.js index 2f58c4a4ff..b51f07c96d 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T7.js - * @description RegExp is /[a-z]/ and tested string is {toString:function(){throw "intostr";}} - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T7 +description: > + RegExp is /[a-z]/ and tested string is {toString:function(){throw + "intostr";}} +---*/ //CHECK#1 try { @@ -16,5 +17,3 @@ try { $ERROR('#1.2: /[a-z]/.test({toString:function(){throw "intostr";}}) throw "intostr". Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T8.js index c26af12731..3380f6b60b 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T8.js - * @description RegExp is /[a-z]/ and tested string is {toString:void 0, valueOf:function(){throw "invalof";}} - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T8 +description: > + RegExp is /[a-z]/ and tested string is {toString:void 0, + valueOf:function(){throw "invalof";}} +---*/ //CHECK#1 try { @@ -16,4 +17,3 @@ try { $ERROR('#1.2: /[a-z]/.test({toString:void 0, valueOf:function(){throw "invalof";}}) throw "invalof". Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T9.js index f4c2b14944..30073f11bd 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Equivalent to the expression RegExp.prototype.exec(string) != null - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A1_T9.js - * @description RegExp is /1|12/ and tested string is function object - */ +/*--- +info: Equivalent to the expression RegExp.prototype.exec(string) != null +es5id: 15.10.6.3_A1_T9 +description: RegExp is /1|12/ and tested string is function object +---*/ var __string; __re = /1|12/; @@ -17,4 +16,3 @@ if (__re.test(__string) !== (__re.exec(__string) !== null)) { } function __string(){}; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T1.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T1.js index a439f4d8b8..9b5f5f8f03 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T1.js - * @description The tested object is new Object - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T1 +description: The tested object is new Object +---*/ __instance = new Object; @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = new Object; __instance.test = RegExp.prototype.test. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T10.js index 460a9300f7..822222d098 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T10.js - * @description The tested object is undefined - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T10 +description: The tested object is undefined +---*/ test = RegExp.prototype.test; @@ -18,4 +19,3 @@ try { $ERROR('#1.2: test = RegExp.prototype.test; test("message to investigate"). Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T2.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T2.js index 818fac34f8..86ae89485f 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T2.js - * @description The tested object is Math - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T2 +description: The tested object is Math +---*/ __instance = Math; @@ -21,6 +22,3 @@ try { $ERROR('#1.2: __instance = Math; __instance.test = RegExp.prototype.test; with(__instance) test("message to investigate"). Actual: ' + (e)); } } - - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T3.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T3.js index 022921d035..87ed6c152f 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T3.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T3.js - * @description The tested object is function object - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T3 +description: The tested object is function object +---*/ __instance.test = RegExp.prototype.test; @@ -21,4 +22,3 @@ try { } function __instance(){}; - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T4.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T4.js index 1c6a3b6a1d..4d07f8074e 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T4.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T4.js - * @description The tested object is new String("[a-b]") - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T4 +description: The tested object is new String("[a-b]") +---*/ __instance = new String("[a-b]"); @@ -22,5 +23,3 @@ with(__instance){ } } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T5.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T5.js index 7b36fed26b..ad4bef3d3b 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T5.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T5.js - * @description The tested object is new Boolean(false) - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T5 +description: The tested object is new Boolean(false) +---*/ __instance = new Boolean(false); @@ -22,4 +23,3 @@ with(__instance) { } } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T6.js index a7f773750a..978e28cfe7 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T6.js - * @description The tested object is new Number(1.0) - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T6 +description: The tested object is new Number(1.0) +---*/ __instance = new Number(1.0); @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = new Number(1.0); __instance.test = RegExp.prototype.test; __instance["test"]("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T7.js index 053c11c7e5..b0ac6f83a0 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T7.js - * @description The tested object is false - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T7 +description: The tested object is false +---*/ __instance = false; @@ -20,6 +21,3 @@ try { $ERROR('#1.2: __instance = false; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); } } - - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T8.js index 67dbbf1cfb..37675d1de7 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T8.js - * @description The tested object is "." - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T8 +description: The tested object is "." +---*/ __instance = "."; @@ -20,4 +21,3 @@ try { $ERROR('#1.2: __instance = "."; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T9.js index 754f0c5368..fa7fc7fd9e 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A TypeError exception is thrown if the this value is not an object for which the value of the internal [[Class]] property is "RegExp" - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A2_T9.js - * @description The tested object is 1.0 - */ +/*--- +info: > + A TypeError exception is thrown if the this value is not an object for + which the value of the internal [[Class]] property is "RegExp" +es5id: 15.10.6.3_A2_T9 +description: The tested object is 1.0 +---*/ __instance = 1.0; @@ -20,5 +21,3 @@ try { $ERROR('#1.2: __instance = 1.0; Object.prototype.test = RegExp.prototype.test; __instance.test("message to investigate"). Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A6.js index 5634afb38f..6e8f7ee3c8 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A6.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.test has not prototype property - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A6.js - * @description Checking RegExp.prototype.test.prototype - */ +/*--- +info: RegExp.prototype.test has not prototype property +es5id: 15.10.6.3_A6 +description: Checking RegExp.prototype.test.prototype +---*/ //CHECK#1 if (RegExp.prototype.test.prototype !== undefined) { $ERROR('#1: RegExp.prototype.test.prototype === undefined. Actual: ' + (RegExp.prototype.test.prototype)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A7.js index dbbc5a3055..793bb1be9f 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.test can't be used as constructor - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A7.js - * @description Checking if creating the RegExp.prototype.test object fails - */ +/*--- +info: RegExp.prototype.test can't be used as constructor +es5id: 15.10.6.3_A7 +description: Checking if creating the RegExp.prototype.test object fails +---*/ __FACTORY = RegExp.prototype.test; @@ -18,4 +17,3 @@ try { $ERROR('#1.2: __FACTORY = RegExp.prototype.test throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A8.js index 39e2f2fa77..ecfa88749a 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.test.length property has the attribute DontEnum - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A8.js - * @description Checking if enumerating the RegExp.prototype.test.length property fails - */ +/*--- +info: The RegExp.prototype.test.length property has the attribute DontEnum +es5id: 15.10.6.3_A8 +description: > + Checking if enumerating the RegExp.prototype.test.length property + fails +---*/ //CHECK#0 if (RegExp.prototype.test.hasOwnProperty('length') !== true) { @@ -28,5 +29,3 @@ for (p in RegExp.prototype.test){ if (count !== 0) { $ERROR('#2: count = 0; for (p in RegExp.prototype.test){ if (p==="length") count++; } count === 0. Actual: ' + (count)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A9.js index f5a6aa7b99..2b647b2a9c 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.test.length property has the attribute DontDelete - * - * @path ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A9.js - * @description Checking if deleting RegExp.prototype.test.length property fails - */ +/*--- +info: The RegExp.prototype.test.length property has the attribute DontDelete +es5id: 15.10.6.3_A9 +description: Checking if deleting RegExp.prototype.test.length property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) { @@ -22,5 +22,3 @@ if (delete RegExp.prototype.exec.length !== false) { if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { $ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A10.js b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A10.js index 59c73b9c4b..6902ee5e36 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A10.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.toString.length property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A10.js - * @description Checking if varying the RegExp.prototype.toString.length property fails - */ +/*--- +info: The RegExp.prototype.toString.length property has the attribute ReadOnly +es5id: 15.10.6.4_A10 +description: > + Checking if varying the RegExp.prototype.toString.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { @@ -21,5 +23,3 @@ RegExp.prototype.toString.length = function(){return "shifted";}; if (RegExp.prototype.toString.length !== __obj) { $ERROR('#2: __obj = RegExp.prototype.toString.length; RegExp.prototype.toString.length = function(){return "shifted";}; RegExp.prototype.toString.length === __obj. Actual: ' + (RegExp.prototype.toString.length)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A11.js b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A11.js index 23f54b523c..dbd81d881d 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A11.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A11.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toString method is 1 - * - * @path ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A11.js - * @description Checking RegExp.prototype.toString.length - */ +/*--- +info: The length property of the toString method is 1 +es5id: 15.10.6.4_A11 +description: Checking RegExp.prototype.toString.length +includes: [$FAIL.js] +---*/ //CHECK#1 if (RegExp.prototype.toString.hasOwnProperty("length") !== true) { @@ -17,5 +17,3 @@ if (RegExp.prototype.toString.hasOwnProperty("length") !== true) { if (RegExp.prototype.toString.length !== 0) { $ERROR('#2: RegExp.prototype.toString.length === 0. Actual: ' + (RegExp.prototype.toString.length)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A6.js index 66acbd26e3..13cc68d813 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A6.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.toString has not prototype property - * - * @path ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A6.js - * @description Checking RegExp.prototype.toString.prototype - */ +/*--- +info: RegExp.prototype.toString has not prototype property +es5id: 15.10.6.4_A6 +description: Checking RegExp.prototype.toString.prototype +---*/ //CHECK#1 if (RegExp.prototype.toString.prototype !== undefined) { $ERROR('#1: RegExp.prototype.toString.prototype === undefined. Actual: ' + (RegExp.prototype.toString.prototype)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A7.js b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A7.js index cc3296e3c3..f70e8a1d4b 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A7.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp.prototype.toString can't be used as constructor - * - * @path ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A7.js - * @description Checking if creating the RegExp.prototype.toString object fails - */ +/*--- +info: RegExp.prototype.toString can't be used as constructor +es5id: 15.10.6.4_A7 +description: Checking if creating the RegExp.prototype.toString object fails +---*/ __FACTORY = RegExp.prototype.toString; @@ -18,4 +17,3 @@ try { $ERROR('#1.2: __FACTORY = RegExp.prototype.toString throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A8.js b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A8.js index ae1eed75e1..75ad301542 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A8.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.toString.length property has the attribute DontEnum - * - * @path ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A8.js - * @description Checking if enumerating the RegExp.prototype.toString.length property fails - */ +/*--- +info: The RegExp.prototype.toString.length property has the attribute DontEnum +es5id: 15.10.6.4_A8 +description: > + Checking if enumerating the RegExp.prototype.toString.length + property fails +---*/ //CHECK#0 if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { @@ -28,5 +29,3 @@ for (p in RegExp.prototype.toString){ if (count !== 0) { $ERROR('#2: count = 0; for (p in RegExp.prototype.toString){ if (p==="length") count++; } count === 0. Actual: ' + (count)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A9.js b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A9.js index 677fd21aa4..9fcc3a5c49 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A9.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp.prototype.toString.length property has the attribute DontDelete - * - * @path ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A9.js - * @description Checking if deleting the RegExp.prototype.toString.length property fails - */ +/*--- +info: The RegExp.prototype.toString.length property has the attribute DontDelete +es5id: 15.10.6.4_A9 +description: > + Checking if deleting the RegExp.prototype.toString.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#0 if ((RegExp.prototype.toString.hasOwnProperty('length') !== true)) { @@ -22,5 +24,3 @@ if (delete RegExp.prototype.toString.length !== false) { if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { $ERROR('#2: delete RegExp.prototype.toString.length; RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/15.10.6.js b/test/suite/ch15/15.10/15.10.6/15.10.6.js index 0f8543e4b4..bdf799db4f 100644 --- a/test/suite/ch15/15.10/15.10.6/15.10.6.js +++ b/test/suite/ch15/15.10/15.10.6/15.10.6.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.6/15.10.6.js - * @description RegExp.prototype is itself a RegExp - */ - - -function testcase() { - var s = Object.prototype.toString.call(RegExp.prototype); - return s === '[object RegExp]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.6 +description: RegExp.prototype is itself a RegExp +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = Object.prototype.toString.call(RegExp.prototype); + return s === '[object RegExp]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T1.js b/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T1.js index 5363d1890a..20881636c6 100644 --- a/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of RegExp.prototype.constructor is the built-in RegExp constructor - * - * @path ch15/15.10/15.10.6/S15.10.6.1_A1_T1.js - * @description Compare RegExp.prototype.constructor with RegExp - */ +/*--- +info: > + The initial value of RegExp.prototype.constructor is the built-in RegExp + constructor +es5id: 15.10.6.1_A1_T1 +description: Compare RegExp.prototype.constructor with RegExp +---*/ //CHECK#1 if (RegExp.prototype.constructor !== RegExp) { $ERROR('#1: RegExp.prototype.constructor === RegExp. Actual: ' + (RegExp.prototype.constructor)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T2.js b/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T2.js index 28384a3e84..56b76e45c4 100644 --- a/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.6/S15.10.6.1_A1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of RegExp.prototype.constructor is the built-in RegExp constructor - * - * @path ch15/15.10/15.10.6/S15.10.6.1_A1_T2.js - * @description Compare instance.constructor !== RegExp, where instance is new RegExp.prototype.constructor - */ +/*--- +info: > + The initial value of RegExp.prototype.constructor is the built-in RegExp + constructor +es5id: 15.10.6.1_A1_T2 +description: > + Compare instance.constructor !== RegExp, where instance is new + RegExp.prototype.constructor +---*/ __FACTORY = RegExp.prototype.constructor; @@ -21,5 +24,3 @@ if ((__instance instanceof RegExp) !== true) { if (__instance.constructor !== RegExp) { $ERROR('#2: __FACTORY = RegExp.prototype.constructor; __instance = new __FACTORY; __instance.constructor === RegExp. Actual: ' + (__instance.constructor)); } - - diff --git a/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T1.js b/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T1.js index aec954bef4..f8710daf7a 100644 --- a/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the RegExp prototype object is the Object prototype - * - * @path ch15/15.10/15.10.6/S15.10.6_A1_T1.js - * @description Checking Object.prototype.isPrototypeOf(RegExp.prototype) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the RegExp prototype + object is the Object prototype +es5id: 15.10.6_A1_T1 +description: Checking Object.prototype.isPrototypeOf(RegExp.prototype) +---*/ //CHECK#1 if (Object.prototype.isPrototypeOf(RegExp.prototype) !== true) { $ERROR('#1: Object.prototype.isPrototypeOf(RegExp.prototype) === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T2.js b/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T2.js index c937bdbf51..b8aa24aac3 100644 --- a/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.6/S15.10.6_A1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the RegExp prototype object is the Object prototype - * - * @path ch15/15.10/15.10.6/S15.10.6_A1_T2.js - * @description Add new property to Object.prototype and check it of RegExp.prototype - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the RegExp prototype + object is the Object prototype +es5id: 15.10.6_A1_T2 +description: > + Add new property to Object.prototype and check it of + RegExp.prototype +---*/ Object.prototype.indicator = 1; @@ -14,5 +17,3 @@ Object.prototype.indicator = 1; if (RegExp.prototype.indicator !== 1) { $ERROR('#1: Object.prototype.indicator = 1; RegExp.prototype.indicator === 1. Actual: ' + (RegExp.prototype.indicator)); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js b/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js index 6d5d532ac4..532d6b9b47 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js - * @description RegExp.prototype.source is of type String - */ - - -function testcase() { - return (typeof(RegExp.prototype.source)) === 'string'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.1-1 +description: RegExp.prototype.source is of type String +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof(RegExp.prototype.source)) === 'string'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js b/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js index c3203d3b44..c51672f800 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js - * @description RegExp.prototype.source is a data property with default attribute values (false) - */ - - -function testcase() { - var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source'); - - if (d.writable === false && - d.enumerable === false && - d.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.1-2 +description: > + RegExp.prototype.source is a data property with default attribute + values (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source'); + + if (d.writable === false && + d.enumerable === false && + d.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A10.js b/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A10.js index 346a6b7c70..f174cd6ac4 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A10.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A10.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance source property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A10.js - * @description Checking if varying the source property fails - */ +/*--- +info: The RegExp instance source property has the attribute ReadOnly +es5id: 15.10.7.1_A10 +description: Checking if varying the source property fails +includes: [$FAIL.js] +---*/ __re = /./; @@ -23,5 +23,3 @@ __re.source = "shifted"; if (__re.source !== __obj) { $ERROR('#2: __re = /./; __obj = __re.source; __re.source = "shifted"; __re.source === __obj. Actual: ' + (__re.source)); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A8.js b/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A8.js index 56a8b048d3..149693e347 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A8.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance source property has the attribute DontEnum - * - * @path ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A8.js - * @description Checking if enumerating the source property of RegExp instance fails - */ +/*--- +info: The RegExp instance source property has the attribute DontEnum +es5id: 15.10.7.1_A8 +description: > + Checking if enumerating the source property of RegExp instance + fails +includes: [$FAIL.js] +---*/ __re = new RegExp("[1-2]","i"); @@ -28,6 +30,4 @@ for (p in __re){ if (count !== 0) { $ERROR('#2: count = 0; __re = new RegExp("[1-2]","i"); for (p in __re){ if (p==="source") count++; } count === 0. Actual: ' + (count)); -} - - +} diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A9.js b/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A9.js index 086a413363..22d70e2aba 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A9.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance source property has the attribute DontDelete - * - * @path ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A9.js - * @description Checking if deleting the source property fails - */ +/*--- +info: The RegExp instance source property has the attribute DontDelete +es5id: 15.10.7.1_A9 +description: Checking if deleting the source property fails +includes: [$FAIL.js] +---*/ __re = new RegExp; @@ -24,5 +24,3 @@ if ((delete __re.source) !== false) { if (__re.hasOwnProperty('source') !== true) { $ERROR('#2: __re = new RegExp;delete __re.source === true; __re.hasOwnProperty(\'source\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js b/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js index 16051f71d7..b5b837c66b 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js - * @description RegExp.prototype.global is of type Boolean - */ - - -function testcase() { - return (typeof(RegExp.prototype.global)) === 'boolean'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.2-1 +description: RegExp.prototype.global is of type Boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof(RegExp.prototype.global)) === 'boolean'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js b/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js index e0855df0d8..9d14ce8bc8 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js - * @description RegExp.prototype.global is a data property with default attribute values (false) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.2-2 +description: > + RegExp.prototype.global is a data property with default attribute + values (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A10.js b/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A10.js index 22ffb66ffa..afa6a60c2c 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A10.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A10.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance global property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A10.js - * @description Checking if varying the global property fails - */ +/*--- +info: The RegExp instance global property has the attribute ReadOnly +es5id: 15.10.7.2_A10 +description: Checking if varying the global property fails +includes: [$FAIL.js] +---*/ __re = /^|^/; @@ -23,5 +23,3 @@ __re.global = "shifted"; if (__re.global !== __obj) { $ERROR('#2: __re = /^|^/; __obj = __re.global; __re.global = "shifted"; __re.global === __obj. Actual: ' + (__re.global)); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A8.js b/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A8.js index 0c08304aa9..3061d40075 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A8.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance global property has the attribute DontEnum - * - * @path ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A8.js - * @description Checking if enumerating the global property of RegExp instance fails - */ +/*--- +info: The RegExp instance global property has the attribute DontEnum +es5id: 15.10.7.2_A8 +description: > + Checking if enumerating the global property of RegExp instance + fails +includes: [$FAIL.js] +---*/ __re = new RegExp("[o-o]","m"); @@ -28,6 +30,4 @@ for (p in __re){ if (count !== 0) { $ERROR('#2: count = 0; __re = new RegExp("[o-o]","m"); for (p in __re){ if (p==="global") count++; } count === 0. Actual: ' + (count)); -} - - +} diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A9.js b/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A9.js index 91ad471d62..9601d8715a 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A9.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance global property has the attribute DontDelete - * - * @path ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A9.js - * @description Checking if deleting the global property fails - */ +/*--- +info: The RegExp instance global property has the attribute DontDelete +es5id: 15.10.7.2_A9 +description: Checking if deleting the global property fails +includes: [$FAIL.js] +---*/ __re = new RegExp; @@ -24,5 +24,3 @@ if ((delete __re.global) !== false) { if (__re.hasOwnProperty('global') !== true) { $ERROR('#2: __re = new RegExp;delete __re.global === true; __re.hasOwnProperty(\'global\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js b/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js index daf56877d3..4e71e6f7dc 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js - * @description RegExp.prototype.ignoreCase is of type Boolean - */ - - -function testcase() { - return (typeof(RegExp.prototype.ignoreCase)) === 'boolean'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.3-1 +description: RegExp.prototype.ignoreCase is of type Boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof(RegExp.prototype.ignoreCase)) === 'boolean'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js b/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js index 7bf678bfbf..ebc125de24 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js - * @description RegExp.prototype.ignoreCase is a data property with default attribute values (false) - */ - - -function testcase() { - var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase'); - - if (d.writable === false && - d.enumerable === false && - d.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.3-2 +description: > + RegExp.prototype.ignoreCase is a data property with default + attribute values (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase'); + + if (d.writable === false && + d.enumerable === false && + d.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js b/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js index da394d9ffd..0da4368385 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance ignoreCase property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js - * @description Checking if varying the ignoreCase property fails - */ +/*--- +info: The RegExp instance ignoreCase property has the attribute ReadOnly +es5id: 15.10.7.3_A10 +description: Checking if varying the ignoreCase property fails +includes: [$FAIL.js] +---*/ __re = /a|b|c/; @@ -23,5 +23,3 @@ __re.ignoreCase = "shifted"; if (__re.ignoreCase !== __obj) { $ERROR('#2: __re = /a|b|c/; __obj = __re.ignoreCase; __re.ignoreCase = "shifted"; __re.ignoreCase === __obj. Actual: ' + (__re.ignoreCase)); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A8.js b/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A8.js index be28f31972..121f3bbace 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A8.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance ignoreCase property has the attribute DontEnum - * - * @path ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A8.js - * @description Checking if enumerating the ignoreCase property of RegExp instance fails - */ +/*--- +info: The RegExp instance ignoreCase property has the attribute DontEnum +es5id: 15.10.7.3_A8 +description: > + Checking if enumerating the ignoreCase property of RegExp instance + fails +includes: [$FAIL.js] +---*/ __re = new RegExp("[|||||||]",""); @@ -28,5 +30,4 @@ for (p in __re){ if (count !== 0) { $ERROR('#2: count = 0; __re = new RegExp("[|||||||]",""); for (p in __re){ if (p==="ignoreCase") count++; } count === 0. Actual: ' + (count)); -} - +} diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A9.js b/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A9.js index 28f85198d3..1364f69629 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A9.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance ignoreCase property has the attribute DontDelete - * - * @path ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A9.js - * @description Checking if deleting the ignoreCase property fails - */ +/*--- +info: The RegExp instance ignoreCase property has the attribute DontDelete +es5id: 15.10.7.3_A9 +description: Checking if deleting the ignoreCase property fails +includes: [$FAIL.js] +---*/ __re = new RegExp; @@ -24,7 +24,3 @@ if ((delete __re.ignoreCase) !== false) { if (__re.hasOwnProperty('ignoreCase') !== true) { $ERROR('#2: __re = new RegExp;delete __re.ignoreCase === true; __re.hasOwnProperty(\'ignoreCase\') === true'); } - - - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js b/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js index b55fdc5834..8fe735687e 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js - * @description RegExp.prototype.multiline is of type Boolean - */ - - -function testcase() { - return (typeof(RegExp.prototype.multiline)) === 'boolean'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.4-1 +description: RegExp.prototype.multiline is of type Boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof(RegExp.prototype.multiline)) === 'boolean'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js b/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js index 7c34aa1d7c..6df1859d65 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js - * @description RegExp.prototype.multiline is a data property with default attribute values (false) - */ - - -function testcase() { - var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline'); - - if (d.writable === false && - d.enumerable === false && - d.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.4-2 +description: > + RegExp.prototype.multiline is a data property with default + attribute values (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline'); + + if (d.writable === false && + d.enumerable === false && + d.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A10.js b/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A10.js index 51b4435da5..bd811c9eb2 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A10.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A10.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance multiline property has the attribute ReadOnly - * - * @path ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A10.js - * @description Checking if varying the multiline property fails - */ +/*--- +info: The RegExp instance multiline property has the attribute ReadOnly +es5id: 15.10.7.4_A10 +description: Checking if varying the multiline property fails +includes: [$FAIL.js] +---*/ __re = /\n/; @@ -23,5 +23,3 @@ __re.multiline = "shifted"; if (__re.multiline !== __obj) { $ERROR('#2: __re = /\\n/; __obj = __re.multiline; __re.multiline = "shifted"; __re.multiline === __obj. Actual: ' + (__re.multiline)); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A8.js b/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A8.js index f3301c89ce..9484802702 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A8.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance multiline property has the attribute DontEnum - * - * @path ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A8.js - * @description Checking if enumerating the multiline property of RegExp instance fails - */ +/*--- +info: The RegExp instance multiline property has the attribute DontEnum +es5id: 15.10.7.4_A8 +description: > + Checking if enumerating the multiline property of RegExp instance + fails +includes: [$FAIL.js] +---*/ __re = new RegExp("[\u0041-\u0049]"); @@ -28,5 +30,4 @@ for (p in __re){ if (count !== 0) { $ERROR('#2: count = 0; __re = new RegExp("[\\u0041-\\u0049]"); for (p in __re){ if (p==="multiline") count++; } count === 0. Actual: ' + (count)); -} - +} diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A9.js b/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A9.js index 13a045a06e..1593447d28 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A9.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance multiline property has the attribute DontDelete - * - * @path ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A9.js - * @description Checking if deleting the multiline property fails - */ +/*--- +info: The RegExp instance multiline property has the attribute DontDelete +es5id: 15.10.7.4_A9 +description: Checking if deleting the multiline property fails +includes: [$FAIL.js] +---*/ __re = new RegExp; @@ -24,5 +24,3 @@ if ((delete __re.multiline) !== false) { if (__re.hasOwnProperty('multiline') !== true) { $ERROR('#2: __re = new RegExp;delete __re.multiline === true; __re.hasOwnProperty(\'multiline\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js b/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js index 0d00243cca..a7f61f0ed4 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js - * @description RegExp.prototype.lastIndex is of type Number - */ - - -function testcase() { - return (typeof(RegExp.prototype.lastIndex)) === 'number'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.5-1 +description: RegExp.prototype.lastIndex is of type Number +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof(RegExp.prototype.lastIndex)) === 'number'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js b/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js index e7c88868e0..46011c9744 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js - * @description RegExp.prototype.lastIndex is a data property with specified attribute values - */ - - -function testcase() { - var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex'); - - if (d.writable === true && - d.enumerable === false && - d.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.10.7.5-2 +description: > + RegExp.prototype.lastIndex is a data property with specified + attribute values +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex'); + + if (d.writable === true && + d.enumerable === false && + d.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A8.js b/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A8.js index c2213511bf..b7356b7b08 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A8.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance lastIndex property has the attribute DontEnum - * - * @path ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A8.js - * @description Checking if enumerating the lastIndex property of RegExp instance fails - */ +/*--- +info: The RegExp instance lastIndex property has the attribute DontEnum +es5id: 15.10.7.5_A8 +description: > + Checking if enumerating the lastIndex property of RegExp instance + fails +includes: [$FAIL.js] +---*/ __re = new RegExp("A?B"); @@ -28,5 +30,4 @@ for (p in __re){ if (count !== 0) { $ERROR('#2: count = 0; __re = new RegExp("A?B"); for (p in __re){ if (p==="lastIndex") count++; } count === 0. Actual: ' + (count)); -} - +} diff --git a/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A9.js b/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A9.js index 0150240ced..ff3d073147 100644 --- a/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A9.js +++ b/test/suite/ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A9.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The RegExp instance lastIndex property has the attribute DontDelete - * - * @path ch15/15.10/15.10.7/15.10.7.5/S15.10.7.5_A9.js - * @description Checking if deleting the lastIndex property fails - */ +/*--- +info: The RegExp instance lastIndex property has the attribute DontDelete +es5id: 15.10.7.5_A9 +description: Checking if deleting the lastIndex property fails +includes: [$FAIL.js] +---*/ __re = new RegExp; @@ -24,5 +24,3 @@ if ((delete __re.lastIndex) !== false) { if (__re.hasOwnProperty('lastIndex') !== true) { $ERROR('#2: __re = new RegExp;delete __re.lastIndex === true; __re.hasOwnProperty(\'lastIndex\') === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T1.js b/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T1.js index 7153f569f3..0dcc029ca3 100644 --- a/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T1.js +++ b/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp instance has not [[call]] property - * - * @path ch15/15.10/15.10.7/S15.10.7_A1_T1.js - * @description Checking if call of RegExp instance fails - */ +/*--- +info: RegExp instance has not [[call]] property +es5id: 15.10.7_A1_T1 +description: Checking if call of RegExp instance fails +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: /[^a]*/() throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T2.js b/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T2.js index 29b687f5c0..53e96adcb7 100644 --- a/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T2.js +++ b/test/suite/ch15/15.10/15.10.7/S15.10.7_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp instance has not [[call]] property - * - * @path ch15/15.10/15.10.7/S15.10.7_A1_T2.js - * @description Checking if call of RegExp("a|b","g")() fails - */ +/*--- +info: RegExp instance has not [[call]] property +es5id: 15.10.7_A1_T2 +description: Checking if call of RegExp("a|b","g")() fails +---*/ //CHECK#1 try { @@ -16,6 +15,3 @@ try { $ERROR('#1.2: RegExp("a|b","g")() throw TypeError. Actual: ' + (e)); } } - - - diff --git a/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T1.js b/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T1.js index 357fd953f9..69a53abd16 100644 --- a/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T1.js +++ b/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp instance has not [[construct]] property - * - * @path ch15/15.10/15.10.7/S15.10.7_A2_T1.js - * @description Checking if creating new RegExp instance fails - */ +/*--- +info: RegExp instance has not [[construct]] property +es5id: 15.10.7_A2_T1 +description: Checking if creating new RegExp instance fails +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new /z/() throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T2.js b/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T2.js index fd7df65125..25b0470181 100644 --- a/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T2.js +++ b/test/suite/ch15/15.10/15.10.7/S15.10.7_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp instance has not [[construct]] property - * - * @path ch15/15.10/15.10.7/S15.10.7_A2_T2.js - * @description Checking if creating "new RegExp" instance fails - */ +/*--- +info: RegExp instance has not [[construct]] property +es5id: 15.10.7_A2_T2 +description: Checking if creating "new RegExp" instance fails +---*/ //CHECK#1 try { @@ -16,5 +15,3 @@ try { $ERROR('#1.2: new new RegExp throw TypeError. Actual: ' + (e)); } } - - diff --git a/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T1.js b/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T1.js index 25ce3575f1..b1e1a03b1b 100644 --- a/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T1.js +++ b/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp instance type is RegExp - * - * @path ch15/15.10/15.10.7/S15.10.7_A3_T1.js - * @description Checking type of RegExp instance with operators typeof, instanceof and check it constructor. - * RegExp instance is /[^a]* / - */ +/*--- +info: RegExp instance type is RegExp +es5id: 15.10.7_A3_T1 +description: > + Checking type of RegExp instance with operators typeof, instanceof + and check it constructor. RegExp instance is /[^a]* / +---*/ __re = /[^a]*/; @@ -25,5 +25,3 @@ if (__re.constructor !== RegExp) { if ((__re instanceof RegExp) !== true) { $ERROR('#3: __re = /[^a]*/; (__re instanceof RegExp) === true'); } - - diff --git a/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T2.js b/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T2.js index 5b1d51d09e..aab382482a 100644 --- a/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T2.js +++ b/test/suite/ch15/15.10/15.10.7/S15.10.7_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * RegExp instance type is RegExp - * - * @path ch15/15.10/15.10.7/S15.10.7_A3_T2.js - * @description Checking type of RegExp instance with operators typeof, instanceof and check it constructor. - * RegExp instance is new RegExp - */ +/*--- +info: RegExp instance type is RegExp +es5id: 15.10.7_A3_T2 +description: > + Checking type of RegExp instance with operators typeof, instanceof + and check it constructor. RegExp instance is new RegExp +---*/ __re = new RegExp; @@ -25,5 +25,3 @@ if (__re.constructor !== RegExp) { if ((__re instanceof RegExp) !== true) { $ERROR('#3: __re = new RegExp; (__re instanceof RegExp) === true'); } - - diff --git a/test/suite/ch15/15.11/15.11-1.js b/test/suite/ch15/15.11/15.11-1.js index cb91a2eee1..1774cef783 100644 --- a/test/suite/ch15/15.11/15.11-1.js +++ b/test/suite/ch15/15.11/15.11-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11-1.js - * @description Error - ConversionError has been removed from IE9 standard mode - */ - - -function testcase() { - return typeof ConversionError === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11-1 +description: Error - ConversionError has been removed from IE9 standard mode +includes: [runTestCase.js] +---*/ + +function testcase() { + return typeof ConversionError === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11-2.js b/test/suite/ch15/15.11/15.11-2.js index 26368d242d..65098b32bf 100644 --- a/test/suite/ch15/15.11/15.11-2.js +++ b/test/suite/ch15/15.11/15.11-2.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11-2.js - * @description Error - RegExpError has been removed from IE9 standard mode - */ - - -function testcase() { - return typeof RegExpError === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11-2 +description: Error - RegExpError has been removed from IE9 standard mode +includes: [runTestCase.js] +---*/ + +function testcase() { + return typeof RegExpError === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A1_T1.js b/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A1_T1.js index d39a290494..cd8654c3e1 100644 --- a/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A1_T1.js +++ b/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument "message" is not undefined, the message property of the newly constructed object is - * set to ToString(message) - * - * @path ch15/15.11/15.11.1/S15.11.1.1_A1_T1.js - * @description Checking message property of different error objects - */ +/*--- +info: > + If the argument "message" is not undefined, the message property of the newly constructed object is + set to ToString(message) +es5id: 15.11.1.1_A1_T1 +description: Checking message property of different error objects +---*/ function otherScope(msg) { @@ -49,4 +49,3 @@ if(err4.message!=="msg4"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A2_T1.js b/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A2_T1.js index b681dc8d65..bd54e8dd61 100644 --- a/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A2_T1.js +++ b/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object is set to the original Error prototype - * object, the one that is the initial value of Error.prototype (15.11.3.1) - * - * @path ch15/15.11/15.11.1/S15.11.1.1_A2_T1.js - * @description Checking prototype of the newly constructed Error object - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object is set to the original Error prototype + object, the one that is the initial value of Error.prototype (15.11.3.1) +es5id: 15.11.1.1_A2_T1 +description: Checking prototype of the newly constructed Error object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -17,4 +17,3 @@ if(!Error.prototype.isPrototypeOf(err1)){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A3_T1.js b/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A3_T1.js index b9bf2cc7ab..6add7727bf 100644 --- a/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A3_T1.js +++ b/test/suite/ch15/15.11/15.11.1/S15.11.1.1_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "Error" - * - * @path ch15/15.11/15.11.1/S15.11.1.1_A3_T1.js - * @description Checking Class of the newly constructed Error object using toSting() function - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "Error" +es5id: 15.11.1.1_A3_T1 +description: > + Checking Class of the newly constructed Error object using + toSting() function +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -17,4 +18,3 @@ if(err1.toString()!=='[object '+ 'Error' +']'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.1/S15.11.1_A1_T1.js b/test/suite/ch15/15.11/15.11.1/S15.11.1_A1_T1.js index edc20a3a84..8db698b0e6 100644 --- a/test/suite/ch15/15.11/15.11.1/S15.11.1_A1_T1.js +++ b/test/suite/ch15/15.11/15.11.1/S15.11.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The function call Error(...) is equivalent to the object creation expression new - * Error(...) with the same arguments - * - * @path ch15/15.11/15.11.1/S15.11.1_A1_T1.js - * @description Checking constructor of the newly constructed Error object - */ +/*--- +info: > + The function call Error(...) is equivalent to the object creation expression new + Error(...) with the same arguments +es5id: 15.11.1_A1_T1 +description: Checking constructor of the newly constructed Error object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +18,3 @@ if(err1.constructor!==Error){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A1_T1.js b/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A1_T1.js index 4fe9dc58f8..b6b13b64b5 100644 --- a/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A1_T1.js +++ b/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument "message" is not undefined, the message property of the newly constructed object is - * set to ToString(message) - * - * @path ch15/15.11/15.11.2/S15.11.2.1_A1_T1.js - * @description Checking message property of different error objects - */ +/*--- +info: > + If the argument "message" is not undefined, the message property of the newly constructed object is + set to ToString(message) +es5id: 15.11.2.1_A1_T1 +description: Checking message property of different error objects +---*/ function otherScope(msg) { @@ -49,4 +49,3 @@ if(err4.message!=="msg4"){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A2_T1.js b/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A2_T1.js index f574d222a8..18ce62fa7a 100644 --- a/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A2_T1.js +++ b/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object is set to the original Error prototype - * object, the one that is the initial value of Error.prototype (15.11.3.1) - * - * @path ch15/15.11/15.11.2/S15.11.2.1_A2_T1.js - * @description Checking prototype of the newly constructed Error object - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object is set to the original Error prototype + object, the one that is the initial value of Error.prototype (15.11.3.1) +es5id: 15.11.2.1_A2_T1 +description: Checking prototype of the newly constructed Error object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -17,4 +17,3 @@ if(!Error.prototype.isPrototypeOf(err1)){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A3_T1.js b/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A3_T1.js index 22cd7eac0b..8c653807ff 100644 --- a/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A3_T1.js +++ b/test/suite/ch15/15.11/15.11.2/S15.11.2.1_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "Error" - * - * @path ch15/15.11/15.11.2/S15.11.2.1_A3_T1.js - * @description Checking Class of the newly constructed Error object using toSting() function - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "Error" +es5id: 15.11.2.1_A3_T1 +description: > + Checking Class of the newly constructed Error object using + toSting() function +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -17,4 +18,3 @@ if(err1.toString()!=='[object '+ 'Error' +']'){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A1_T1.js b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A1_T1.js index 12bfdf2b6b..ecf6a6e088 100644 --- a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A1_T1.js +++ b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Error.prototype property has the attributes {DontDelete} - * - * @path ch15/15.11/15.11.3/S15.11.3.1_A1_T1.js - * @description Checking if deleting the Error.prototype property fails - */ +/*--- +info: Error.prototype property has the attributes {DontDelete} +es5id: 15.11.3.1_A1_T1 +description: Checking if deleting the Error.prototype property fails +---*/ var proto=Error.prototype; ////////////////////////////////////////////////////////////////////////////// @@ -24,4 +23,3 @@ if(Error.prototype!==proto){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A2_T1.js b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A2_T1.js index a50147e8ed..137c0c639e 100644 --- a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A2_T1.js +++ b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Error.prototype property has the attributes {DontEnum} - * - * @path ch15/15.11/15.11.3/S15.11.3.1_A2_T1.js - * @description Checking if enumerating the Error.prototype property fails - */ +/*--- +info: Error.prototype property has the attributes {DontEnum} +es5id: 15.11.3.1_A2_T1 +description: Checking if enumerating the Error.prototype property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -39,4 +38,3 @@ if (cout !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A3_T1.js b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A3_T1.js index 4229efe59c..b758aa0566 100644 --- a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A3_T1.js +++ b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Error.prototype property has the attributes {ReadOnly} - * - * @path ch15/15.11/15.11.3/S15.11.3.1_A3_T1.js - * @description Checking if varying the Error.prototype property fails - */ +/*--- +info: Error.prototype property has the attributes {ReadOnly} +es5id: 15.11.3.1_A3_T1 +description: Checking if varying the Error.prototype property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -38,4 +37,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A4_T1.js b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A4_T1.js index 55469a9925..1770637cea 100644 --- a/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A4_T1.js +++ b/test/suite/ch15/15.11/15.11.3/S15.11.3.1_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Error has property prototype - * - * @path ch15/15.11/15.11.3/S15.11.3.1_A4_T1.js - * @description Checking Error.hasOwnProperty('prototype') - */ +/*--- +info: The Error has property prototype +es5id: 15.11.3.1_A4_T1 +description: Checking Error.hasOwnProperty('prototype') +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (!(Error.hasOwnProperty('prototype'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.3/S15.11.3_A1_T1.js b/test/suite/ch15/15.11/15.11.3/S15.11.3_A1_T1.js index 75e8bfd447..d1be741382 100644 --- a/test/suite/ch15/15.11/15.11.3/S15.11.3_A1_T1.js +++ b/test/suite/ch15/15.11/15.11.3/S15.11.3_A1_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Error constructor is the Function prototype object(15.3.4) - * - * @path ch15/15.11/15.11.3/S15.11.3_A1_T1.js - * @description Checking prototype of constructor of the newly constructed Error object - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Error constructor + is the Function prototype object(15.3.4) +es5id: 15.11.3_A1_T1 +description: > + Checking prototype of constructor of the newly constructed Error + object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -24,4 +27,3 @@ if(!Function.prototype.isPrototypeOf(Error.constructor)){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.3/S15.11.3_A2_T1.js b/test/suite/ch15/15.11/15.11.3/S15.11.3_A2_T1.js index 4cc976bfd9..41e8e6b761 100644 --- a/test/suite/ch15/15.11/15.11.3/S15.11.3_A2_T1.js +++ b/test/suite/ch15/15.11/15.11.3/S15.11.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property value is 1 - * - * @path ch15/15.11/15.11.3/S15.11.3_A2_T1.js - * @description Checking length property - */ +/*--- +info: The length property value is 1 +es5id: 15.11.3_A2_T1 +description: Checking length property +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -24,4 +23,3 @@ if(Error.constructor.length!==1){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.2/15.11.4.2-1.js b/test/suite/ch15/15.11/15.11.4/15.11.4.2/15.11.4.2-1.js index 2dc2b04b10..4ba6c86467 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.2/15.11.4.2-1.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.2/15.11.4.2-1.js @@ -1,22 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.2/15.11.4.2-1.js - * @description Error.prototype.name is not enumerable. - */ - - - - -function testcase() { - for (var i in Error.prototype) { - if (i==="name") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.2-1 +description: Error.prototype.name is not enumerable. +includes: [runTestCase.js] +---*/ + +function testcase() { + for (var i in Error.prototype) { + if (i==="name") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.3/15.11.4.3-1.js b/test/suite/ch15/15.11/15.11.4/15.11.4.3/15.11.4.3-1.js index 74ce0ce0fb..13dd877568 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.3/15.11.4.3-1.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.3/15.11.4.3-1.js @@ -1,22 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.3/15.11.4.3-1.js - * @description Error.prototype.message is not enumerable. - */ - - - - -function testcase() { - for (var i in Error.prototype) { - if (i==="message") { - return false; - } - } - return true; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.3-1 +description: Error.prototype.message is not enumerable. +includes: [runTestCase.js] +---*/ + +function testcase() { + for (var i in Error.prototype) { + if (i==="message") { + return false; + } + } + return true; +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js index d897e52e52..28dd5f029a 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js @@ -1,17 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js - * @description Error.prototype.toString return the result of concatenating 'name', ':', a single space character, and 'msg' when 'name' and 'msg' are non-empty string - */ - - -function testcase() { - var errObj = new Error("ErrorMessage"); - errObj.name = "ErrorName"; - return errObj.toString() === "ErrorName: ErrorMessage"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.4-10-1 +description: > + Error.prototype.toString return the result of concatenating + 'name', ':', a single space character, and 'msg' when 'name' and + 'msg' are non-empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error("ErrorMessage"); + errObj.name = "ErrorName"; + return errObj.toString() === "ErrorName: ErrorMessage"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js index 6156ad2c37..8c99b57db6 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js - * @description Error.prototype.toString - 'Error' is returned when 'name' is absent and empty string is returned when 'msg' is undefined - */ - - -function testcase() { - var errObj = new Error(); - return errObj.toString() === "Error"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.4-6-1 +description: > + Error.prototype.toString - 'Error' is returned when 'name' is + absent and empty string is returned when 'msg' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error(); + return errObj.toString() === "Error"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js index b3f85693a5..6d43219cca 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js - * @description Error.prototype.toString - 'Error' is returned when 'name' is absent and value of 'msg' is returned when 'msg' is non-empty string - */ - - -function testcase() { - var errObj = new Error("ErrorMessage"); - return errObj.toString() === "Error: ErrorMessage"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.4-6-2 +description: > + Error.prototype.toString - 'Error' is returned when 'name' is + absent and value of 'msg' is returned when 'msg' is non-empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error("ErrorMessage"); + return errObj.toString() === "Error: ErrorMessage"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js index 8541ba36c2..8e1f8603c1 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js - * @description Error.prototype.toString return the value of 'msg' when 'name' is empty string and 'msg' isn't undefined - */ - - -function testcase() { - var errObj = new Error("ErrorMessage"); - errObj.name = ""; - return errObj.toString() === "ErrorMessage"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.4-8-1 +description: > + Error.prototype.toString return the value of 'msg' when 'name' is + empty string and 'msg' isn't undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error("ErrorMessage"); + errObj.name = ""; + return errObj.toString() === "ErrorMessage"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js index 627e83e59c..cc7b930104 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js - * @description Error.prototype.toString return empty string when 'name' is empty string and 'msg' is undefined - */ - - -function testcase() { - var errObj = new Error(); - errObj.name = ""; - return errObj.toString() === ""; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.4-8-2 +description: > + Error.prototype.toString return empty string when 'name' is empty + string and 'msg' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error(); + errObj.name = ""; + return errObj.toString() === ""; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js index fda516b62b..39f49f5643 100644 --- a/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js +++ b/test/suite/ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js - * @description Error.prototype.toString return 'name' when 'name' is non-empty string and 'msg' is empty string - */ - - -function testcase() { - var errObj = new Error(); - errObj.name = "ErrorName"; - return errObj.toString() === "ErrorName"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.11.4.4-9-1 +description: > + Error.prototype.toString return 'name' when 'name' is non-empty + string and 'msg' is empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error(); + errObj.name = "ErrorName"; + return errObj.toString() === "ErrorName"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T1.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T1.js index 7cd2f6c02e..0b51b5b9f2 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T1.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Error.prototype.constructor is the built-in Error constructor - * - * @path ch15/15.11/15.11.4/S15.11.4.1_A1_T1.js - * @description Checking Error.prototype.constructor - */ +/*--- +info: > + The initial value of Error.prototype.constructor is the built-in Error + constructor +es5id: 15.11.4.1_A1_T1 +description: Checking Error.prototype.constructor +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (Error.prototype.constructor !== Error) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T2.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T2.js index 9954e3f87e..c041d4dd84 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T2.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.1_A1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Error.prototype.constructor is the built-in Error constructor - * - * @path ch15/15.11/15.11.4/S15.11.4.1_A1_T2.js - * @description Checking if creating "new Error.prototype.constructor" passes and checking its properties - */ +/*--- +info: > + The initial value of Error.prototype.constructor is the built-in Error + constructor +es5id: 15.11.4.1_A1_T2 +description: > + Checking if creating "new Error.prototype.constructor" passes and + checking its properties +---*/ constr = Error.prototype.constructor; @@ -53,4 +56,3 @@ if (err.valueOf().toString() !== to_string_result) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A1.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A1.js index 5a93eb4565..9f9acadf05 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A1.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Error.prototype has name property - * - * @path ch15/15.11/15.11.4/S15.11.4.2_A1.js - * @description Checking Error.prototype.name - */ +/*--- +info: The Error.prototype has name property +es5id: 15.11.4.2_A1 +description: Checking Error.prototype.name +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -15,4 +14,3 @@ if (!Error.prototype.hasOwnProperty('name')) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A2.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A2.js index 66eab2c827..05f044cc7d 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A2.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.2_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Error.prototype.name is "Error" - * - * @path ch15/15.11/15.11.4/S15.11.4.2_A2.js - * @description Checking value of Error.prototype.name - */ +/*--- +info: The initial value of Error.prototype.name is "Error" +es5id: 15.11.4.2_A2 +description: Checking value of Error.prototype.name +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -15,4 +14,3 @@ if (Error.prototype.name!=="Error") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A1.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A1.js index dc51512fd9..14517881b4 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A1.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Error.prototype has message property - * - * @path ch15/15.11/15.11.4/S15.11.4.3_A1.js - * @description Checking Error.prototype.message - */ +/*--- +info: The Error.prototype has message property +es5id: 15.11.4.3_A1 +description: Checking Error.prototype.message +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -15,4 +14,3 @@ if (!Error.prototype.hasOwnProperty('message')) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A2.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A2.js index 48ada9c30f..f309f74698 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A2.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.3_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Error.prototype.message is "" - * - * @path ch15/15.11/15.11.4/S15.11.4.3_A2.js - * @description Checking value of Error.prototype.message - */ +/*--- +info: The initial value of Error.prototype.message is "" +es5id: 15.11.4.3_A2 +description: Checking value of Error.prototype.message +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -15,4 +14,3 @@ if (typeof Error.prototype.message !== "string") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A1.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A1.js index b0ff332314..bcd99d2f71 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A1.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Error.prototype has toString property - * - * @path ch15/15.11/15.11.4/S15.11.4.4_A1.js - * @description Checking Error.prototype.toString - */ +/*--- +info: The Error.prototype has toString property +es5id: 15.11.4.4_A1 +description: Checking Error.prototype.toString +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -15,4 +14,3 @@ if (!Error.prototype.hasOwnProperty('toString')) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A2.js b/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A2.js index 297a97b8fe..35ce0d95ec 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A2.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4.4_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Error.prototype.toString returns an implementation defined string - * - * @path ch15/15.11/15.11.4/S15.11.4.4_A2.js - * @description Checking if call of Error.prototype.toSting() fails - */ +/*--- +info: The Error.prototype.toString returns an implementation defined string +es5id: 15.11.4.4_A2 +description: Checking if call of Error.prototype.toSting() fails +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -22,4 +21,3 @@ if (toStr===undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4_A1.js b/test/suite/ch15/15.11/15.11.4/S15.11.4_A1.js index 9bbd6a9e85..acf1780784 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4_A1.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Error prototype object is the Object prototype - * object(15.2.3.1) - * - * @path ch15/15.11/15.11.4/S15.11.4_A1.js - * @description Get Error.prototype and compare with Object.prototype - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Error prototype object is the Object prototype + object(15.2.3.1) +es5id: 15.11.4_A1 +description: Get Error.prototype and compare with Object.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK#1 @@ -16,4 +16,3 @@ if (!Object.prototype.isPrototypeOf(Error.prototype)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4_A2.js b/test/suite/ch15/15.11/15.11.4/S15.11.4_A2.js index ec39fe60d5..85eecb41ea 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4_A2.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Class]] property of Error prototype object is "Error" - * - * @path ch15/15.11/15.11.4/S15.11.4_A2.js - * @description Getting the value of the internal [[Class]] property using Error.prototype.toString() function - */ +/*--- +info: > + The value of the internal [[Class]] property of Error prototype object is + "Error" +es5id: 15.11.4_A2 +description: > + Getting the value of the internal [[Class]] property using + Error.prototype.toString() function +---*/ Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); @@ -18,4 +21,3 @@ if (__tostr !== "[object Error]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4_A3.js b/test/suite/ch15/15.11/15.11.4/S15.11.4_A3.js index 6b39d0bcaa..dc5554e20a 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4_A3.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4_A3.js @@ -1,21 +1,22 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since Error prototype object is not function it has not [[call]] method - * - * @path ch15/15.11/15.11.4/S15.11.4_A3.js - * @description Checking if call of Error prototype as a function fails - */ +/*--- +info: Since Error prototype object is not function it has not [[call]] method +es5id: 15.11.4_A3 +description: Checking if call of Error prototype as a function fails +includes: + - $FAIL.js + - Test262Error.js +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 try { Error.prototype(); - $FAIL('#1: "Error.prototype()" lead to throwing exception'); -} catch (e) { + $FAIL('#1: "Error.prototype()" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.11/15.11.4/S15.11.4_A4.js b/test/suite/ch15/15.11/15.11.4/S15.11.4_A4.js index 2b9dd3ce97..28c206df61 100644 --- a/test/suite/ch15/15.11/15.11.4/S15.11.4_A4.js +++ b/test/suite/ch15/15.11/15.11.4/S15.11.4_A4.js @@ -1,21 +1,22 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since Error prototype object is not function it has not [[create]] method - * - * @path ch15/15.11/15.11.4/S15.11.4_A4.js - * @description Checking if creating "new Error.prototype" fails - */ +/*--- +info: Since Error prototype object is not function it has not [[create]] method +es5id: 15.11.4_A4 +description: Checking if creating "new Error.prototype" fails +includes: + - $FAIL.js + - Test262Error.js +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 try { __instance = new Object.prototype; - $FAIL('#1: "__instance = new Object.prototype" lead to throwing exception'); -} catch (e) { + $FAIL('#1: "__instance = new Object.prototype" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.12/15.12-0-1.js b/test/suite/ch15/15.12/15.12-0-1.js index 558ac4ac3d..e0e19d8ee9 100644 --- a/test/suite/ch15/15.12/15.12-0-1.js +++ b/test/suite/ch15/15.12/15.12-0-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object. - * 4.2 calls out JSON as one of the built-in objects. - * - * @path ch15/15.12/15.12-0-1.js - * @description JSON must be a built-in object - */ - - -function testcase() { - var o = JSON; - if (typeof(o) === "object") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object. + 4.2 calls out JSON as one of the built-in objects. +es5id: 15.12-0-1 +description: JSON must be a built-in object +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = JSON; + if (typeof(o) === "object") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12-0-2.js b/test/suite/ch15/15.12/15.12-0-2.js index 97b8d45776..23a3f133af 100644 --- a/test/suite/ch15/15.12/15.12-0-2.js +++ b/test/suite/ch15/15.12/15.12-0-2.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object, and must not support [[Construct]]. - * step 4 in 11.2.2 should throw a TypeError exception. - * - * @path ch15/15.12/15.12-0-2.js - * @description JSON must not support the [[Construct]] method - */ - - -function testcase() { - var o = JSON; - - try { - var j = new JSON(); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object, and must not support [[Construct]]. + step 4 in 11.2.2 should throw a TypeError exception. +es5id: 15.12-0-2 +description: JSON must not support the [[Construct]] method +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = JSON; + + try { + var j = new JSON(); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12-0-3.js b/test/suite/ch15/15.12/15.12-0-3.js index f1e291387d..3336d7569f 100644 --- a/test/suite/ch15/15.12/15.12-0-3.js +++ b/test/suite/ch15/15.12/15.12-0-3.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object, and must not support [[Call]]. - * step 5 in 11.2.3 should throw a TypeError exception. - * - * @path ch15/15.12/15.12-0-3.js - * @description JSON must not support the [[Call]] method - */ - - -function testcase() { - var o = JSON; - - try { - var j = JSON(); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object, and must not support [[Call]]. + step 5 in 11.2.3 should throw a TypeError exception. +es5id: 15.12-0-3 +description: JSON must not support the [[Call]] method +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = JSON; + + try { + var j = JSON(); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12-0-4.js b/test/suite/ch15/15.12/15.12-0-4.js index fc0516c823..738086da04 100644 --- a/test/suite/ch15/15.12/15.12-0-4.js +++ b/test/suite/ch15/15.12/15.12-0-4.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The last paragraph in section 15 says "every other property described - * in this section has the attribute {... [[Enumerable]] : false ...} - * unless otherwise specified. This default applies to the properties on - * JSON, and we should not be able to enumerate them. - * - * @path ch15/15.12/15.12-0-4.js - * @description JSON object's properties must be non enumerable - */ - - -function testcase() { - var o = JSON; - var i = 0; - for (var p in o) { - i++; - } - - if (i === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The last paragraph in section 15 says "every other property described + in this section has the attribute {... [[Enumerable]] : false ...} + unless otherwise specified. This default applies to the properties on + JSON, and we should not be able to enumerate them. +es5id: 15.12-0-4 +description: JSON object's properties must be non enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = JSON; + var i = 0; + for (var p in o) { + i++; + } + + if (i === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js index 1e9ba28fd0..4b67ef9b27 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js - * @description The JSON lexical grammar treats whitespace as a token seperator - */ - - -function testcase() { - - try { - JSON.parse('12\t\r\n 34'); // should produce a syntax error as whitespace results in two tokens - } - catch (e) { - if (e.name === 'SyntaxError') return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-1 +description: The JSON lexical grammar treats whitespace as a token seperator +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('12\t\r\n 34'); // should produce a syntax error as whitespace results in two tokens + } + catch (e) { + if (e.name === 'SyntaxError') return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js index a34bb3375e..c188678613 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js - * @description is not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - JSON.parse('\u000b1234'); // should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-2 +description: > + is not valid JSON whitespace as specified by the production + JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('\u000b1234'); // should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js index 727099e4c2..2ddb26d3ff 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js - * @description is not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - JSON.parse('\u000c1234'); // should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-3 +description: > + is not valid JSON whitespace as specified by the production + JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('\u000c1234'); // should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js index 15a533e8ed..616eff1418 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js - * @description is not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - JSON.parse('\u00a01234'); // should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-4 +description: > + is not valid JSON whitespace as specified by the production + JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('\u00a01234'); // should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js index 7d306f87df..dcc7548497 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js - * @description is not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - JSON.parse('\u200b1234'); // should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-5 +description: > + is not valid JSON whitespace as specified by the + production JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('\u200b1234'); // should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js index 9505cdb1a8..c0953e142f 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js - * @description is not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - JSON.parse('\ufeff1234'); // should produce a syntax error a - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-6 +description: > + is not valid JSON whitespace as specified by the production + JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('\ufeff1234'); // should produce a syntax error a + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js index 7d33a040fd..180295e0f7 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js - * @description other category z spaces are not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - // the following should produce a syntax error - JSON.parse('\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u30001234'); - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-7 +description: > + other category z spaces are not valid JSON whitespace as specified + by the production JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + // the following should produce a syntax error + JSON.parse('\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u30001234'); + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js index 503e664d79..28f25671d4 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js - * @description U+2028 and U+2029 are not valid JSON whitespace as specified by the production JSONWhitespace. - */ - - -function testcase() { - - try { - JSON.parse('\u2028\u20291234'); // should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-8 +description: > + U+2028 and U+2029 are not valid JSON whitespace as specified by + the production JSONWhitespace. +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.parse('\u2028\u20291234'); // should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js index 93f4a377e6..c823a2e6fc 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js - * @description Whitespace characters can appear before/after any JSONtoken - */ - - -function testcase() { - - JSON.parse('\t\r \n{\t\r \n'+ - '"property"\t\r \n:\t\r \n{\t\r \n}\t\r \n,\t\r \n' + - '"prop2"\t\r \n:\t\r \n'+ - '[\t\r \ntrue\t\r \n,\t\r \nnull\t\r \n,123.456\t\r \n]'+ - '\t\r \n}\t\r \n'); // should JOSN parse without error - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-0-9 +description: Whitespace characters can appear before/after any JSONtoken +includes: [runTestCase.js] +---*/ + +function testcase() { + + JSON.parse('\t\r \n{\t\r \n'+ + '"property"\t\r \n:\t\r \n{\t\r \n}\t\r \n,\t\r \n' + + '"prop2"\t\r \n:\t\r \n'+ + '[\t\r \ntrue\t\r \n,\t\r \nnull\t\r \n,123.456\t\r \n]'+ + '\t\r \n}\t\r \n'); // should JOSN parse without error + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js index 3c82d72a9a..cc3f638ae1 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js - * @description The JSON lexical grammar treats as a whitespace character - */ - - -function testcase() { - if (JSON.parse('\t1234')!==1234) return false; // should be ignored - try { - JSON.parse('12\t34'); // should produce a syntax error as whitespace results in two tokens - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g1-1 +description: The JSON lexical grammar treats as a whitespace character +includes: [runTestCase.js] +---*/ + +function testcase() { + if (JSON.parse('\t1234')!==1234) return false; // should be ignored + try { + JSON.parse('12\t34'); // should produce a syntax error as whitespace results in two tokens + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js index db92744673..50ce5c116b 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js - * @description The JSON lexical grammar treats as a whitespace character - */ - - -function testcase() { - if (JSON.parse('\r1234')!==1234) return false; // should be ignored - try { - JSON.parse('12\r34'); // should produce a syntax error as whitespace results in two tokens - } - catch (e) { - if (e.name === 'SyntaxError') return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g1-2 +description: The JSON lexical grammar treats as a whitespace character +includes: [runTestCase.js] +---*/ + +function testcase() { + if (JSON.parse('\r1234')!==1234) return false; // should be ignored + try { + JSON.parse('12\r34'); // should produce a syntax error as whitespace results in two tokens + } + catch (e) { + if (e.name === 'SyntaxError') return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js index 478c5159b5..ef3a8a6ada 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js - * @description The JSON lexical grammar treats as a whitespace character - */ - - -function testcase() { - if (JSON.parse('\n1234')!==1234) return false; // should be ignored - try { - JSON.parse('12\n34'); // should produce a syntax error as whitespace results in two tokens - } - catch (e) { - if (e.name === 'SyntaxError') return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g1-3 +description: The JSON lexical grammar treats as a whitespace character +includes: [runTestCase.js] +---*/ + +function testcase() { + if (JSON.parse('\n1234')!==1234) return false; // should be ignored + try { + JSON.parse('12\n34'); // should produce a syntax error as whitespace results in two tokens + } + catch (e) { + if (e.name === 'SyntaxError') return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js index 846f737433..87630c8890 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js - * @description The JSON lexical grammar treats as a whitespace character - */ - - -function testcase() { - if (JSON.parse(' 1234')!=1234) return false; // should be ignored - try { - JSON.parse('12 34'); // should produce a syntax error as whitespace results in two tokens - } - catch (e) { - if (e.name === 'SyntaxError') return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g1-4 +description: The JSON lexical grammar treats as a whitespace character +includes: [runTestCase.js] +---*/ + +function testcase() { + if (JSON.parse(' 1234')!=1234) return false; // should be ignored + try { + JSON.parse('12 34'); // should produce a syntax error as whitespace results in two tokens + } + catch (e) { + if (e.name === 'SyntaxError') return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js index fb659899fc..e00ee4ffac 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js - * @description JSONStrings can be written using double quotes - */ - - -function testcase() { - return JSON.parse('"abc"')==="abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g2-1 +description: JSONStrings can be written using double quotes +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"abc"')==="abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js index 92f5a6bb1a..2b5a190ce3 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js - * @description A JSONString may not be delimited by single quotes - */ -function testcase() { - try { - if (JSON.parse("'abc'") ==='abc') return false; - } - catch (e) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g2-2 +description: A JSONString may not be delimited by single quotes +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + if (JSON.parse("'abc'") ==='abc') return false; + } + catch (e) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js index 999874409d..13ccf1bba0 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js - * @description A JSONString may not be delimited by Uncode escaped quotes - */ -function testcase() { - try { - if (JSON.parse("\\u0022abc\\u0022") ==='abc') return false; - } - catch (e) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g2-3 +description: A JSONString may not be delimited by Uncode escaped quotes +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + if (JSON.parse("\\u0022abc\\u0022") ==='abc') return false; + } + catch (e) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js index d4de78be9e..1efe942523 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js - * @description A JSONString must both begin and end with double quotes - */ -function testcase() { - try { - if (JSON.parse('"ab'+"c'") ==='abc') return false; - } - catch (e) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g2-4 +description: A JSONString must both begin and end with double quotes +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + if (JSON.parse('"ab'+"c'") ==='abc') return false; + } + catch (e) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js index 2426de9b5c..3340a8494f 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js - * @description A JSONStrings can contain no JSONStringCharacters (Empty JSONStrings) - */ - - -function testcase() { - return JSON.parse('""')===""; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g2-5 +description: > + A JSONStrings can contain no JSONStringCharacters (Empty + JSONStrings) +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('""')===""; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js index f1dfd81c93..1b8e01db72 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js - * @description The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0000 thru U+0007 - */ - - -function testcase() { - try { - JSON.parse('"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"'); // invalid string characters should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g4-1 +description: > + The JSON lexical grammar does not allow a JSONStringCharacter to + be any of the Unicode characters U+0000 thru U+0007 +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.parse('"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"'); // invalid string characters should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js index e1a6db9b68..b0736c6cea 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js - * @description The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0008 thru U+000F - */ - - -function testcase() { - try { - JSON.parse('"\u0008\u0009\u000a\u000b\u000c\u000d\u000e\u000f"'); // invalid string characters should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g4-2 +description: > + The JSON lexical grammar does not allow a JSONStringCharacter to + be any of the Unicode characters U+0008 thru U+000F +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.parse('"\u0008\u0009\u000a\u000b\u000c\u000d\u000e\u000f"'); // invalid string characters should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js index dd06226bb0..00021cf954 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js - * @description The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0010 thru U+0017 - */ - - -function testcase() { - try { - JSON.parse('"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"'); // invalid string characters should produce a syntax error - } - catch (e) { - return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g4-3 +description: > + The JSON lexical grammar does not allow a JSONStringCharacter to + be any of the Unicode characters U+0010 thru U+0017 +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.parse('"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"'); // invalid string characters should produce a syntax error + } + catch (e) { + return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js index f5f48409c3..edc32c0f41 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js - * @description The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0018 thru U+001F - */ - - -function testcase() { - try { - JSON.parse('"\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f"'); // invalid string characters should produce a syntax error - } - catch (e) { - if (e.name === 'SyntaxError') return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g4-4 +description: > + The JSON lexical grammar does not allow a JSONStringCharacter to + be any of the Unicode characters U+0018 thru U+001F +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.parse('"\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f"'); // invalid string characters should produce a syntax error + } + catch (e) { + if (e.name === 'SyntaxError') return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js index 4450bfd326..ba4a67bf40 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js @@ -1,14 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js - * @description The JSON lexical grammar allows Unicode escape sequences in a JSONString - */ -function testcase() { - return JSON.parse('"\\u0058"')==='X'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g5-1 +description: > + The JSON lexical grammar allows Unicode escape sequences in a + JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\u0058"')==='X'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js index 0b1838b4c5..6803f6e35c 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js - * @description A JSONStringCharacter UnicodeEscape may not have fewer than 4 hex characters - */ -function testcase() { - try { - JSON.parse('"\\u005"') - } - catch (e) { - return e.name==='SyntaxError' - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g5-2 +description: > + A JSONStringCharacter UnicodeEscape may not have fewer than 4 hex + characters +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.parse('"\\u005"') + } + catch (e) { + return e.name==='SyntaxError' + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js index 34e9479d8d..b14dc7b499 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js - * @description A JSONStringCharacter UnicodeEscape may not include any non=hex characters - */ -function testcase() { - try { - JSON.parse('"\\u0X50"') - } - catch (e) { - return e.name==='SyntaxError' - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g5-3 +description: > + A JSONStringCharacter UnicodeEscape may not include any non=hex + characters +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.parse('"\\u0X50"') + } + catch (e) { + return e.name==='SyntaxError' + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js index 70c91c101a..4cad956806 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js - * @description The JSON lexical grammer allows '/' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\/"')==='/'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-1 +description: > + The JSON lexical grammer allows '/' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\/"')==='/'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js index 9b2c93bc09..24da4ba120 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js - * @description The JSON lexical grammer allows '' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\\\"')==='\\'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-2 +description: > + The JSON lexical grammer allows '' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\\\"')==='\\'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js index 0f3b38930d..a6e2e55cf2 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js - * @description The JSON lexical grammer allows 'b' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\b"')==='\b'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-3 +description: > + The JSON lexical grammer allows 'b' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\b"')==='\b'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js index 8a9f169ff4..4cfea5ceda 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js - * @description The JSON lexical grammer allows 'f' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\f"')==='\f'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-4 +description: > + The JSON lexical grammer allows 'f' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\f"')==='\f'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js index e63743ad6d..f7035a117b 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js - * @description The JSON lexical grammer allows 'n' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\n"')==='\n'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-5 +description: > + The JSON lexical grammer allows 'n' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\n"')==='\n'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js index 7f1c517776..2018496bc5 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js - * @description The JSON lexical grammer allows 'r' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\r"')==='\r'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-6 +description: > + The JSON lexical grammer allows 'r' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\r"')==='\r'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js index ed95c0f7b5..f047bf096d 100644 --- a/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js +++ b/test/suite/ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js - * @description The JSON lexical grammer allows 't' as a JSONEscapeCharacter after '' in a JSONString - */ - - -function testcase() { - return JSON.parse('"\\t"')==='\t'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.1.1-g6-7 +description: > + The JSON lexical grammer allows 't' as a JSONEscapeCharacter after + '' in a JSONString +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.parse('"\\t"')==='\t'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-0-1.js b/test/suite/ch15/15.12/15.12.2/15.12.2-0-1.js index 54867640d9..b95bdd326e 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-0-1.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-0-1.js @@ -1,32 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object. - * - * Section 15 says that every built-in Function object described in this - * section � whether as a constructor, an ordinary function, or both � has - * a length property whose value is an integer. Unless otherwise specified, - * this value is equal to the largest number of named arguments shown in - * the section headings for the function description, including optional - * parameters. - * - * This default applies to JSON.parse, and it must exist as a function - * taking 2 parameters. - * - * @path ch15/15.12/15.12.2/15.12.2-0-1.js - * @description JSON.parse must exist as a function - */ - - -function testcase() { - var f = JSON.parse; - - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object. + Section 15 says that every built-in Function object described in this + section � whether as a constructor, an ordinary function, or both � has + a length property whose value is an integer. Unless otherwise specified, + this value is equal to the largest number of named arguments shown in + the section headings for the function description, including optional + parameters. + This default applies to JSON.parse, and it must exist as a function + taking 2 parameters. +es5id: 15.12.2-0-1 +description: JSON.parse must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = JSON.parse; + + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-0-2.js b/test/suite/ch15/15.12/15.12.2/15.12.2-0-2.js index 7bd3aa176b..70fe0d4892 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-0-2.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-0-2.js @@ -1,32 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object. - * - * Section 15 says that every built-in Function object described in this - * section � whether as a constructor, an ordinary function, or both � has - * a length property whose value is an integer. Unless otherwise specified, - * this value is equal to the largest number of named arguments shown in - * the section headings for the function description, including optional - * parameters. - * - * This default applies to JSON.parse, and it must exist as a function - * taking 2 parameters. - * - * @path ch15/15.12/15.12.2/15.12.2-0-2.js - * @description JSON.parse must exist as a function taking 2 parameters - */ - - -function testcase() { - var f = JSON.parse; - - if (typeof(f) === "function" && f.length === 2) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object. + Section 15 says that every built-in Function object described in this + section � whether as a constructor, an ordinary function, or both � has + a length property whose value is an integer. Unless otherwise specified, + this value is equal to the largest number of named arguments shown in + the section headings for the function description, including optional + parameters. + This default applies to JSON.parse, and it must exist as a function + taking 2 parameters. +es5id: 15.12.2-0-2 +description: JSON.parse must exist as a function taking 2 parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = JSON.parse; + + if (typeof(f) === "function" && f.length === 2) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-0-3.js b/test/suite/ch15/15.12/15.12.2/15.12.2-0-3.js index 8e4741b6ea..a26722f0d2 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-0-3.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-0-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The initial value of [[Configurable]] on JSON is true. This means we - * should be able to delete (8.6.2.5) the stringify and parse properties. - * - * @path ch15/15.12/15.12.2/15.12.2-0-3.js - * @description JSON.parse must be deletable (configurable) - */ - - -function testcase() { - var o = JSON; - var desc = Object.getOwnPropertyDescriptor(o, "parse"); - return desc.configurable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The initial value of [[Configurable]] on JSON is true. This means we + should be able to delete (8.6.2.5) the stringify and parse properties. +es5id: 15.12.2-0-3 +description: JSON.parse must be deletable (configurable) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = JSON; + var desc = Object.getOwnPropertyDescriptor(o, "parse"); + return desc.configurable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-1.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-1.js index 0945ddd7de..e3b001f8dc 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-1.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-1.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-1.js - * @description JSON.parse - parsing an object where property name is a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ ' + nullChars[index] + ' : "John" } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-1 +description: > + JSON.parse - parsing an object where property name is a null + character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ ' + nullChars[index] + ' : "John" } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-10.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-10.js index c08b6b35c6..c954f6ddd6 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-10.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-10.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-10.js - * @description JSON.parse - parsing an object where property value middles with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ "name" : ' + "Jo" + nullChars[index] + "hn" + ' } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-10 +description: > + JSON.parse - parsing an object where property value middles with a + null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ "name" : ' + "Jo" + nullChars[index] + "hn" + ' } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-2.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-2.js index dd4807aa5b..d18c957fb2 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-2.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-2.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-2.js - * @description JSON.parse - parsing an object where property name starts with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ ' + nullChars[index] + "name" + ' : "John" } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-2 +description: > + JSON.parse - parsing an object where property name starts with a + null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ ' + nullChars[index] + "name" + ' : "John" } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-3.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-3.js index c5416123d0..f76881db6a 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-3.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-3.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-3.js - * @description JSON.parse - parsing an object where property name ends with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{' + "name" + nullChars[index] + ' : "John" } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-3 +description: > + JSON.parse - parsing an object where property name ends with a + null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{' + "name" + nullChars[index] + ' : "John" } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-4.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-4.js index 6a53e470fa..662669028a 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-4.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-4.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-4.js - * @description JSON.parse - parsing an object where property name starts and ends with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{' + nullChars[index] + "name" + nullChars[index] + ' : "John" } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-4 +description: > + JSON.parse - parsing an object where property name starts and ends + with a null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{' + nullChars[index] + "name" + nullChars[index] + ' : "John" } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-5.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-5.js index cd0a5c43b6..a062ec2563 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-5.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-5.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-5.js - * @description JSON.parse - parsing an object where property name middles with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ ' + "na" + nullChars[index] + "me" + ' : "John" } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-5 +description: > + JSON.parse - parsing an object where property name middles with a + null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ ' + "na" + nullChars[index] + "me" + ' : "John" } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-6.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-6.js index 59b719ef9e..5197109651 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-6.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-6.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-6.js - * @description JSON.parse - parsing an object where property value is a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ "name" : ' + nullChars[index] + ' } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-6 +description: > + JSON.parse - parsing an object where property value is a null + character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ "name" : ' + nullChars[index] + ' } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-7.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-7.js index 855733a1d7..4318ad6fff 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-7.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-7.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-7.js - * @description JSON.parse - parsing an object where property value starts with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + ' } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-7 +description: > + JSON.parse - parsing an object where property value starts with a + null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + ' } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-8.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-8.js index a184949592..5f57d0c147 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-8.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-8.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-8.js - * @description JSON.parse - parsing an object where property value ends with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ "name" : ' + "John" + nullChars[index] + ' } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-8 +description: > + JSON.parse - parsing an object where property value ends with a + null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ "name" : ' + "John" + nullChars[index] + ' } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/15.12.2-2-9.js b/test/suite/ch15/15.12/15.12.2/15.12.2-2-9.js index 424d2e17f9..f49db3dd0f 100644 --- a/test/suite/ch15/15.12/15.12.2/15.12.2-2-9.js +++ b/test/suite/ch15/15.12/15.12.2/15.12.2-2-9.js @@ -1,60 +1,63 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.2/15.12.2-2-9.js - * @description JSON.parse - parsing an object where property value starts and ends with a null character - */ - - -function testcase() { - - var result = true; - - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; - - for (var index in nullChars) { - try { - var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + nullChars[index] + ' } '); - result = (result && false); - } catch (e) { - result = (result && (e instanceof SyntaxError)); - } - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.2-2-9 +description: > + JSON.parse - parsing an object where property value starts and + ends with a null character +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var nullChars = new Array(); + nullChars[0] = '\"\u0000\"'; + nullChars[1] = '\"\u0001\"'; + nullChars[2] = '\"\u0002\"'; + nullChars[3] = '\"\u0003\"'; + nullChars[4] = '\"\u0004\"'; + nullChars[5] = '\"\u0005\"'; + nullChars[6] = '\"\u0006\"'; + nullChars[7] = '\"\u0007\"'; + nullChars[8] = '\"\u0008\"'; + nullChars[9] = '\"\u0009\"'; + nullChars[10] = '\"\u000A\"'; + nullChars[11] = '\"\u000B\"'; + nullChars[12] = '\"\u000C\"'; + nullChars[13] = '\"\u000D\"'; + nullChars[14] = '\"\u000E\"'; + nullChars[15] = '\"\u000F\"'; + nullChars[16] = '\"\u0010\"'; + nullChars[17] = '\"\u0011\"'; + nullChars[18] = '\"\u0012\"'; + nullChars[19] = '\"\u0013\"'; + nullChars[20] = '\"\u0014\"'; + nullChars[21] = '\"\u0015\"'; + nullChars[22] = '\"\u0016\"'; + nullChars[23] = '\"\u0017\"'; + nullChars[24] = '\"\u0018\"'; + nullChars[25] = '\"\u0019\"'; + nullChars[26] = '\"\u001A\"'; + nullChars[27] = '\"\u001B\"'; + nullChars[28] = '\"\u001C\"'; + nullChars[29] = '\"\u001D\"'; + nullChars[30] = '\"\u001E\"'; + nullChars[31] = '\"\u001F\"'; + + for (var index in nullChars) { + try { + var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + nullChars[index] + ' } '); + result = (result && false); + } catch (e) { + result = (result && (e instanceof SyntaxError)); + } + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.2/S15.12.2_A1.js b/test/suite/ch15/15.12/15.12.2/S15.12.2_A1.js index eeb59283a9..6f195217cd 100644 --- a/test/suite/ch15/15.12/15.12.2/S15.12.2_A1.js +++ b/test/suite/ch15/15.12/15.12.2/S15.12.2_A1.js @@ -1,12 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * JSON.parse must create a property with the given property name - * - * @path ch15/15.12/15.12.2/S15.12.2_A1.js - * @description Tests that JSON.parse treats "__proto__" as a regular property name - */ +/*--- +info: JSON.parse must create a property with the given property name +es5id: 15.12.2_A1 +description: Tests that JSON.parse treats "__proto__" as a regular property name +includes: [$FAIL.js] +---*/ var x = JSON.parse('{"__proto__":[]}'); if (Object.getPrototypeOf(x) !== Object.prototype) { @@ -15,4 +15,3 @@ if (Object.getPrototypeOf(x) !== Object.prototype) { if (!Array.isArray(x.__proto__)) { $FAIL('#2: JSON.parse did not set "__proto__" as a regular property'); } - diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-0-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-0-1.js index 4f9216a9ad..ab81153c26 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-0-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-0-1.js @@ -1,32 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object. - * - * Section 15 says that every built-in Function object described in this - * section � whether as a constructor, an ordinary function, or both � has - * a length property whose value is an integer. Unless otherwise specified, - * this value is equal to the largest number of named arguments shown in - * the section headings for the function description, including optional - * parameters. - * - * This default applies to JSON.stringify, and it must exist as a function - * taking 3 parameters. - * - * @path ch15/15.12/15.12.3/15.12.3-0-1.js - * @description JSON.stringify must exist as be a function - */ - - -function testcase() { - var f = JSON.stringify; - - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object. + Section 15 says that every built-in Function object described in this + section � whether as a constructor, an ordinary function, or both � has + a length property whose value is an integer. Unless otherwise specified, + this value is equal to the largest number of named arguments shown in + the section headings for the function description, including optional + parameters. + This default applies to JSON.stringify, and it must exist as a function + taking 3 parameters. +es5id: 15.12.3-0-1 +description: JSON.stringify must exist as be a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = JSON.stringify; + + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-0-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3-0-2.js index c728f269fd..02205e139f 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-0-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-0-2.js @@ -1,32 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The name JSON must be bound to an object. - * - * Section 15 says that every built-in Function object described in this - * section � whether as a constructor, an ordinary function, or both � has - * a length property whose value is an integer. Unless otherwise specified, - * this value is equal to the largest number of named arguments shown in - * the section headings for the function description, including optional - * parameters. - * - * This default applies to JSON.stringify, and it must exist as a function - * taking 3 parameters. - * - * @path ch15/15.12/15.12.3/15.12.3-0-2.js - * @description JSON.stringify must exist as be a function taking 3 parameters - */ - - -function testcase() { - var f = JSON.stringify; - - if (typeof(f) === "function" && f.length === 3) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The name JSON must be bound to an object. + Section 15 says that every built-in Function object described in this + section � whether as a constructor, an ordinary function, or both � has + a length property whose value is an integer. Unless otherwise specified, + this value is equal to the largest number of named arguments shown in + the section headings for the function description, including optional + parameters. + This default applies to JSON.stringify, and it must exist as a function + taking 3 parameters. +es5id: 15.12.3-0-2 +description: JSON.stringify must exist as be a function taking 3 parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = JSON.stringify; + + if (typeof(f) === "function" && f.length === 3) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-0-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3-0-3.js index 39d5cf59d4..8e94840fa7 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-0-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-0-3.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * This test should be run without any built-ins being added/augmented. - * The initial value of [[Configurable]] on JSON is true. This means we - * should be able to delete (8.6.2.5) the stringify and parse properties. - * - * @path ch15/15.12/15.12.3/15.12.3-0-3.js - * @description JSON.stringify must be deletable (configurable) - */ - - -function testcase() { - var o = JSON; - var desc = Object.getOwnPropertyDescriptor(o, "stringify"); - if (desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + This test should be run without any built-ins being added/augmented. + The initial value of [[Configurable]] on JSON is true. This means we + should be able to delete (8.6.2.5) the stringify and parse properties. +es5id: 15.12.3-0-3 +description: JSON.stringify must be deletable (configurable) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = JSON; + var desc = Object.getOwnPropertyDescriptor(o, "stringify"); + if (desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-1.js index 813b7fb379..83bc3a48b3 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-1.js - * @description JSON.stringify(undefined) returns undefined - */ - - -function testcase() { - return JSON.stringify(undefined) === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-1 +description: JSON.stringify(undefined) returns undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(undefined) === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-10.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-10.js index 32e885fb6c..c9bc4cba84 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-10.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-10.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-10.js - * @description A JSON.stringify replacer function applied to a top level scalar value can return undefined. - */ - - -function testcase() { - return JSON.stringify(42, function(k, v) { return undefined }) === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-10 +description: > + A JSON.stringify replacer function applied to a top level scalar + value can return undefined. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(42, function(k, v) { return undefined }) === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-11.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-11.js index e40181e457..b93bc6ec05 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-11.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-11.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-11.js - * @description A JSON.stringify replacer function applied to a top level Object can return undefined. - */ - - -function testcase() { - return JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-11 +description: > + A JSON.stringify replacer function applied to a top level Object + can return undefined. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-12.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-12.js index dd294997b7..11650e7838 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-12.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-12.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-12.js - * @description A JSON.stringify replacer function applied to a top level scalar can return an Array. - */ - - -function testcase() { - return JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-12 +description: > + A JSON.stringify replacer function applied to a top level scalar + can return an Array. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-13.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-13.js index dc94752231..59d3c90d42 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-13.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-13.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-13.js - * @description A JSON.stringify replacer function applied to a top level scalar can return an Object. - */ - - -function testcase() { - return JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{"forty":2}'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-13 +description: > + A JSON.stringify replacer function applied to a top level scalar + can return an Object. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{"forty":2}'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-14.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-14.js index a503662644..ccc241d5a3 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-14.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-14.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-14.js - * @description Applying JSON.stringify to a function returns undefined. - */ - - -function testcase() { - return JSON.stringify(function() {}) === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-14 +description: Applying JSON.stringify to a function returns undefined. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(function() {}) === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-15.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-15.js index efd20c865c..8c33c7d314 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-15.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-15.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-15.js - * @description Applying JSON.stringify with a replacer function to a function returns the replacer value. - */ - - -function testcase() { - return JSON.stringify(function() {}, function(k,v) {return 99}) === '99'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-15 +description: > + Applying JSON.stringify with a replacer function to a function + returns the replacer value. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(function() {}, function(k,v) {return 99}) === '99'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-16.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-16.js index a5adee4754..3cffa8ce97 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-16.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-16.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-16.js - * @description JSON.stringify - stringifying an object where property name is the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-16 +description: > + JSON.stringify - stringifying an object where property name is the + union of all null character (The abstract operation Quote(value) + step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-17.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-17.js index 703dd0b6f8..fa7542ef3c 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-17.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-17.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-17.js - * @description JSON.stringify - stringifying an object where property name starts with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-17 +description: > + JSON.stringify - stringifying an object where property name starts + with the union of all null character (The abstract operation + Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname": "John" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-18.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-18.js index af3f8f1995..aace676bbb 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-18.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-18.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-18.js - * @description JSON.stringify - stringifying an object where property name ends with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "name\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-18 +description: > + JSON.stringify - stringifying an object where property name ends + with the union of all null character (The abstract operation + Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "name\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-19.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-19.js index fb0378b62c..7e5fe5eb55 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-19.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-19.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-19.js - * @description JSON.stringify - stringifying an object where property name starts and ends with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-19 +description: > + JSON.stringify - stringifying an object where property name starts + and ends with the union of all null character (The abstract + operation Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-2.js index a3c3d602c4..171d15292f 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-2.js - * @description A JSON.stringify replacer function works is applied to a top level undefined value. - */ - - -function testcase() { - return JSON.stringify(undefined, function(k, v) { return "replacement" }) === '"replacement"'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-2 +description: > + A JSON.stringify replacer function works is applied to a top level + undefined value. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(undefined, function(k, v) { return "replacement" }) === '"replacement"'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-20.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-20.js index 28b656cda0..ba6b51e3c1 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-20.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-20.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-20.js - * @description JSON.stringify - stringifying an object where property name middles with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "na\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fme": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-20 +description: > + JSON.stringify - stringifying an object where property name + middles with the union of all null character (The abstract + operation Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "na\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fme": "John" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-21.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-21.js index 60df392dd8..ee8e763fba 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-21.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-21.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-21.js - * @description JSON.stringify - stringifying an object where property value is the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-21 +description: > + JSON.stringify - stringifying an object where property value is + the union of all null character (The abstract operation + Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-22.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-22.js index baa8fbc36c..b13a4d5058 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-22.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-22.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-22.js - * @description JSON.stringify - stringifying an object where property value starts with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-22 +description: > + JSON.stringify - stringifying an object where property value + starts with the union of all null character (The abstract + operation Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-23.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-23.js index 0670562a59..457d455760 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-23.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-23.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-23.js - * @description JSON.stringify - stringifying an object where property value ends with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "name": "John\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-23 +description: > + JSON.stringify - stringifying an object where property value ends + with the union of all null character (The abstract operation + Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "name": "John\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-24.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-24.js index eb55b2ce22..5c17614316 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-24.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-24.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-24.js - * @description JSON.stringify - stringifying an object where property value starts and ends with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-24 +description: > + JSON.stringify - stringifying an object where property value + starts and ends with the union of all null character (The abstract + operation Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-25.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-25.js index cdcb163fcf..fb33f93c60 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-25.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-25.js @@ -1,57 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-25.js - * @description JSON.stringify - stringifying an object where property value middles with the union of all null character (The abstract operation Quote(value) step 2.c) - */ - - -function testcase() { - - var result = true; - - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; - - for (var index in expectedNullChars) { - - var str = JSON.stringify({ "name": "Jo\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fhn" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); - } - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-25 +description: > + JSON.stringify - stringifying an object where property value + middles with the union of all null character (The abstract + operation Quote(value) step 2.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + + var expectedNullChars = new Array(); + expectedNullChars[0] = "\\u0000"; + expectedNullChars[1] = "\\u0001"; + expectedNullChars[2] = "\\u0002"; + expectedNullChars[3] = "\\u0003"; + expectedNullChars[4] = "\\u0004"; + expectedNullChars[5] = "\\u0005"; + expectedNullChars[6] = "\\u0006"; + expectedNullChars[7] = "\\u0007"; + expectedNullChars[8] = "\\b"; + expectedNullChars[9] = "\\t"; + expectedNullChars[10] = "\\n"; + expectedNullChars[11] = "\\u000b"; + expectedNullChars[12] = "\\f"; + expectedNullChars[13] = "\\r"; + expectedNullChars[14] = "\\u000e"; + expectedNullChars[15] = "\\u000f"; + expectedNullChars[16] = "\\u0010"; + expectedNullChars[17] = "\\u0011"; + expectedNullChars[18] = "\\u0012"; + expectedNullChars[19] = "\\u0013"; + expectedNullChars[20] = "\\u0014"; + expectedNullChars[21] = "\\u0015"; + expectedNullChars[22] = "\\u0016"; + expectedNullChars[23] = "\\u0017"; + expectedNullChars[24] = "\\u0018"; + expectedNullChars[25] = "\\u0019"; + expectedNullChars[26] = "\\u001a"; + expectedNullChars[27] = "\\u001b"; + expectedNullChars[28] = "\\u001c"; + expectedNullChars[29] = "\\u001d"; + expectedNullChars[30] = "\\u001e"; + expectedNullChars[31] = "\\u001f"; + + for (var index in expectedNullChars) { + + var str = JSON.stringify({ "name": "Jo\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fhn" }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); + } + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-26.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-26.js index 36c5c306b3..01dd9bb85f 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-26.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-26.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-26.js - * @description JSON.stringify - the last element of the concatenation is ']' (The abstract operation JA(value) step 10.b.iii) - */ - - -function testcase() { - var arrObj = []; - arrObj[0] = "a"; - arrObj[1] = "b"; - arrObj[2] = "c"; - - var jsonText = JSON.stringify(arrObj, undefined, "").toString(); - return jsonText.charAt(jsonText.length - 1) === "]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-26 +description: > + JSON.stringify - the last element of the concatenation is ']' (The + abstract operation JA(value) step 10.b.iii) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + arrObj[0] = "a"; + arrObj[1] = "b"; + arrObj[2] = "c"; + + var jsonText = JSON.stringify(arrObj, undefined, "").toString(); + return jsonText.charAt(jsonText.length - 1) === "]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-3.js index 4d5b2c2d3c..309e281785 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-3.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-3.js - * @description A JSON.stringify correctly works on top level string values. - */ - - -function testcase() { - return JSON.stringify("a string") === '"a string"'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-3 +description: A JSON.stringify correctly works on top level string values. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify("a string") === '"a string"'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-4.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-4.js index 676a7bd13b..68332a92f2 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-4.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-4.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-4.js - * @description JSON.stringify correctly works on top level Number values. - */ - - -function testcase() { - return JSON.stringify(123) === '123'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-4 +description: JSON.stringify correctly works on top level Number values. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(123) === '123'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-5.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-5.js index 405e521386..afc6d3c632 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-5.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-5.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-5.js - * @description JSON.stringify correctly works on top level Boolean values. - */ - - -function testcase() { - return JSON.stringify(true) === 'true'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-5 +description: JSON.stringify correctly works on top level Boolean values. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(true) === 'true'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-6.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-6.js index 04fa3c79c4..6bb3f73a45 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-6.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-6.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-6.js - * @description JSON.stringify correctly works on top level null values. - */ - - -function testcase() { - return JSON.stringify(null) === 'null'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-6 +description: JSON.stringify correctly works on top level null values. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(null) === 'null'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-7.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-7.js index 4cdeafa3b8..ab8da40028 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-7.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-7.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-7.js - * @description JSON.stringify correctly works on top level Number objects. - */ - - -function testcase() { - return JSON.stringify(new Number(42)) === '42'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-7 +description: JSON.stringify correctly works on top level Number objects. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(new Number(42)) === '42'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-8.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-8.js index 898549693f..97b729019f 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-8.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-8.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-8.js - * @description JSON.stringify correctly works on top level String objects. - */ - - -function testcase() { - return JSON.stringify(new String('wrappered')) === '"wrappered"'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-8 +description: JSON.stringify correctly works on top level String objects. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(new String('wrappered')) === '"wrappered"'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-11-9.js b/test/suite/ch15/15.12/15.12.3/15.12.3-11-9.js index db0c543c20..e9e384330b 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-11-9.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-11-9.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-11-9.js - * @description JSON.stringify correctly works on top level Boolean objects. - */ - - -function testcase() { - return JSON.stringify(new Boolean(false)) === 'false'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-11-9 +description: JSON.stringify correctly works on top level Boolean objects. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify(new Boolean(false)) === 'false'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-4-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-4-1.js index 8fab146604..f9add173da 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-4-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-4-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-4-1.js - * @description JSON.stringify ignores replacer aruguments that are not functions or arrays.. - */ - - -function testcase() { - try { - return JSON.stringify([42],{})=== '[42]'; - } - catch (e) {return false} - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-4-1 +description: > + JSON.stringify ignores replacer aruguments that are not functions + or arrays.. +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + return JSON.stringify([42],{})=== '[42]'; + } + catch (e) {return false} + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-5-a-i-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-5-a-i-1.js index a350ffabb6..4344e0395b 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-5-a-i-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-5-a-i-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-5-a-i-1.js - * @description JSON.stringify converts Number wrapper object space aruguments to Number values - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, new Number(5))=== JSON.stringify(obj,null, 5); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-5-a-i-1 +description: > + JSON.stringify converts Number wrapper object space aruguments to + Number values +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, new Number(5))=== JSON.stringify(obj,null, 5); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-5-b-i-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-5-b-i-1.js index 803d08f9d7..384bf2680a 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-5-b-i-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-5-b-i-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-5-b-i-1.js - * @description JSON.stringify converts String wrapper object space aruguments to String values - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, new String('xxx'))=== JSON.stringify(obj,null, 'xxx'); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-5-b-i-1 +description: > + JSON.stringify converts String wrapper object space aruguments to + String values +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, new String('xxx'))=== JSON.stringify(obj,null, 'xxx'); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-1.js index 60bcfda5f3..d75e10b9b7 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-6-a-1.js - * @description JSON.stringify treats numeric space arguments greater than 10 the same as a space argument of 10. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, 10)=== JSON.stringify(obj,null, 100); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-6-a-1 +description: > + JSON.stringify treats numeric space arguments greater than 10 the + same as a space argument of 10. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, 10)=== JSON.stringify(obj,null, 100); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-2.js index 42a149b418..d58844395c 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-6-a-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-6-a-2.js - * @description JSON.stringify truccates non-integer numeric space arguments to their integer part. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, 5.99999)=== JSON.stringify(obj,null, 5); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-6-a-2 +description: > + JSON.stringify truccates non-integer numeric space arguments to + their integer part. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, 5.99999)=== JSON.stringify(obj,null, 5); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-1.js index 7b07d84428..efd80b82e9 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-6-b-1.js - * @description JSON.stringify treats numeric space arguments less than 1 (0.999999)the same as emptry string space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, 0.999999)=== JSON.stringify(obj); /* emptry string should be same as no space arg */ - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-6-b-1 +description: > + JSON.stringify treats numeric space arguments less than 1 + (0.999999)the same as emptry string space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, 0.999999)=== JSON.stringify(obj); /* emptry string should be same as no space arg */ + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-2.js index 0e0404ac73..01ed9435c3 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-6-b-2.js - * @description JSON.stringify treats numeric space arguments less than 1 (0)the same as emptry string space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, 0)=== JSON.stringify(obj); /* emptry string should be same as no space arg */ - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-6-b-2 +description: > + JSON.stringify treats numeric space arguments less than 1 (0)the + same as emptry string space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, 0)=== JSON.stringify(obj); /* emptry string should be same as no space arg */ + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-3.js index 2d0f5c1b44..af27e88b21 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-6-b-3.js - * @description JSON.stringify treats numeric space arguments less than 1 (-5) the same as emptry string space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, -5)=== JSON.stringify(obj); /* emptry string should be same as no space arg */ - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-6-b-3 +description: > + JSON.stringify treats numeric space arguments less than 1 (-5) the + same as emptry string space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, -5)=== JSON.stringify(obj); /* emptry string should be same as no space arg */ + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-4.js b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-4.js index e08dd093cc..fdd6d4e48a 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-4.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-6-b-4.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-6-b-4.js - * @description JSON.stringify treats numeric space arguments (in the range 1..10) is equivalent to a string of spaces of that length. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - var fiveSpaces = ' '; - // '12345' - return JSON.stringify(obj,null, 5)=== JSON.stringify(obj, null, fiveSpaces); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-6-b-4 +description: > + JSON.stringify treats numeric space arguments (in the range 1..10) + is equivalent to a string of spaces of that length. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + var fiveSpaces = ' '; + // '12345' + return JSON.stringify(obj,null, 5)=== JSON.stringify(obj, null, fiveSpaces); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-7-a-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-7-a-1.js index 7ef1492b20..b7ff493591 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-7-a-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-7-a-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-7-a-1.js - * @description JSON.stringify only uses the first 10 characters of a string space arguments. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj,null, '0123456789xxxxxxxxx')=== JSON.stringify(obj,null, '0123456789'); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-7-a-1 +description: > + JSON.stringify only uses the first 10 characters of a string space + arguments. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj,null, '0123456789xxxxxxxxx')=== JSON.stringify(obj,null, '0123456789'); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-1.js index aee8ced9ce..22f8052507 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-8-a-1.js - * @description JSON.stringify treats an empty string space argument the same as a missing space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj)=== JSON.stringify(obj,null, ''); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-8-a-1 +description: > + JSON.stringify treats an empty string space argument the same as a + missing space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj)=== JSON.stringify(obj,null, ''); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-2.js index 7e2bd348c8..d18f915bf5 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-8-a-2.js - * @description JSON.stringify treats an Boolean space argument the same as a missing space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj)=== JSON.stringify(obj,null, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-8-a-2 +description: > + JSON.stringify treats an Boolean space argument the same as a + missing space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj)=== JSON.stringify(obj,null, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-3.js index cf53e02b5b..8c7e29ae1d 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-8-a-3.js - * @description JSON.stringify treats an null space argument the same as a missing space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj)=== JSON.stringify(obj,null, null); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-8-a-3 +description: > + JSON.stringify treats an null space argument the same as a missing + space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj)=== JSON.stringify(obj,null, null); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-4.js b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-4.js index 65ebadfc81..2c7666f60b 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-4.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-4.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-8-a-4.js - * @description JSON.stringify treats an Boolean wrapper space argument the same as a missing space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj)=== JSON.stringify(obj,null, new Boolean(true)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-8-a-4 +description: > + JSON.stringify treats an Boolean wrapper space argument the same + as a missing space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj)=== JSON.stringify(obj,null, new Boolean(true)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-5.js b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-5.js index 3b92557ce0..4bc8bccccd 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-5.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3-8-a-5.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3-8-a-5.js - * @description JSON.stringify treats non-Number or String object space arguments the same as a missing space argument. - */ - - -function testcase() { - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - return JSON.stringify(obj)=== JSON.stringify(obj,null, obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3-8-a-5 +description: > + JSON.stringify treats non-Number or String object space arguments + the same as a missing space argument. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; + return JSON.stringify(obj)=== JSON.stringify(obj,null, obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-1.js index 0a5a9761e9..ec210b7c4c 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_2-2-b-i-1.js - * @description JSON.stringify converts string wrapper objects returned from a toJSON call to literal strings. - */ - - -function testcase() { - var obj = { - prop:42, - toJSON: function () {return 'fortytwo objects'} - }; - return JSON.stringify([obj]) === '["fortytwo objects"]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_2-2-b-i-1 +description: > + JSON.stringify converts string wrapper objects returned from a + toJSON call to literal strings. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + prop:42, + toJSON: function () {return 'fortytwo objects'} + }; + return JSON.stringify([obj]) === '["fortytwo objects"]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-2.js index e75171469f..76ec673a7b 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_2-2-b-i-2.js - * @description JSON.stringify converts Number wrapper objects returned from a toJSON call to literal Number. - */ - - -function testcase() { - var obj = { - prop:42, - toJSON: function () {return new Number(42)} - }; - return JSON.stringify([obj]) === '[42]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_2-2-b-i-2 +description: > + JSON.stringify converts Number wrapper objects returned from a + toJSON call to literal Number. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + prop:42, + toJSON: function () {return new Number(42)} + }; + return JSON.stringify([obj]) === '[42]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-3.js index 8481272951..5a2eb85e53 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_2-2-b-i-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_2-2-b-i-3.js - * @description JSON.stringify converts Boolean wrapper objects returned from a toJSON call to literal Boolean values. - */ - - -function testcase() { - var obj = { - prop:42, - toJSON: function () {return new Boolean(true)} - }; - return JSON.stringify([obj]) === '[true]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_2-2-b-i-3 +description: > + JSON.stringify converts Boolean wrapper objects returned from a + toJSON call to literal Boolean values. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + prop:42, + toJSON: function () {return new Boolean(true)} + }; + return JSON.stringify([obj]) === '[true]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-1.js index a1e71cd737..9bc9ecd89e 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_2-3-a-1.js - * @description JSON.stringify converts string wrapper objects returned from replacer functions to literal strings. - */ - - -function testcase() { - return JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '["fortytwo"]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_2-3-a-1 +description: > + JSON.stringify converts string wrapper objects returned from + replacer functions to literal strings. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '["fortytwo"]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-2.js index 679c252a93..378a5db6c4 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_2-3-a-2.js - * @description JSON.stringify converts Number wrapper objects returned from replacer functions to literal numbers. - */ - - -function testcase() { - return JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_2-3-a-2 +description: > + JSON.stringify converts Number wrapper objects returned from + replacer functions to literal numbers. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-3.js index 6124fcd92b..61997a0475 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_2-3-a-3.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_2-3-a-3.js - * @description JSON.stringify converts Boolean wrapper objects returned from replacer functions to literal numbers. - */ - - -function testcase() { - return JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]'; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_2-3-a-3 +description: > + JSON.stringify converts Boolean wrapper objects returned from + replacer functions to literal numbers. +includes: [runTestCase.js] +---*/ + +function testcase() { + return JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]'; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-1.js b/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-1.js index cbab742f7a..48f9fee0c9 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-1.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_4-1-1.js - * @description JSON.stringify a circular object throws a error - */ - - -function testcase() { - var obj = {}; - obj.prop = obj; - try { - JSON.stringify(obj); - return false; // should not reach here - } - catch (e) {return true} - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_4-1-1 +description: JSON.stringify a circular object throws a error +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + obj.prop = obj; + try { + JSON.stringify(obj); + return false; // should not reach here + } + catch (e) {return true} + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-2.js b/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-2.js index a8157f6fe0..45567bf10a 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-2.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_4-1-2.js - * @description JSON.stringify a circular object throws a TypeError - */ - - -function testcase() { - var obj = {}; - obj.prop = obj; - try { - JSON.stringify(obj); - return false; // should not reach here - } - catch (e) {return e.name==='TypeError'} - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_4-1-2 +description: JSON.stringify a circular object throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + obj.prop = obj; + try { + JSON.stringify(obj); + return false; // should not reach here + } + catch (e) {return e.name==='TypeError'} + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-3.js b/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-3.js index 6a66e87aa3..767de08c7e 100644 --- a/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-3.js +++ b/test/suite/ch15/15.12/15.12.3/15.12.3_4-1-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.12/15.12.3/15.12.3_4-1-3.js - * @description JSON.stringify a indirectly circular object throws a error - */ - - -function testcase() { - var obj = {p1: {p2: {}}}; - obj.p1.p2.prop = obj; - try { - JSON.stringify(obj); - return false; // should not reach here - } - catch (e) {return true} - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.12.3_4-1-3 +description: JSON.stringify a indirectly circular object throws a error +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {p1: {p2: {}}}; + obj.p1.p2.prop = obj; + try { + JSON.stringify(obj); + return false; // should not reach here + } + catch (e) {return true} + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T1.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T1.js index e1600158ca..50a893912d 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object(value) is called and the value is null, undefined or not supplied, - * create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A1_T1.js - * @description Creating Object(null) and checking its properties - */ +/*--- +info: > + When the Object(value) is called and the value is null, undefined or not supplied, + create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) +es5id: 15.2.1.1_A1_T1 +description: Creating Object(null) and checking its properties +---*/ var __obj = Object(null); @@ -32,4 +32,3 @@ if (__obj.toLocaleString() !== n__obj.toLocaleString()) { if (typeof __obj !== typeof n__obj) { $ERROR('#5'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T2.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T2.js index 0f3c001421..755726a758 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T2.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object(value) is called and the value is null, undefined or not supplied, - * create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A1_T2.js - * @description Creating Object(void 0) and checking its properties - */ +/*--- +info: > + When the Object(value) is called and the value is null, undefined or not supplied, + create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) +es5id: 15.2.1.1_A1_T2 +description: Creating Object(void 0) and checking its properties +---*/ //var y= void 0; @@ -35,4 +35,3 @@ if (__obj.toLocaleString() !== n__obj.toLocaleString()) { if (typeof __obj !== typeof n__obj) { $ERROR('#5'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T3.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T3.js index a9189377fb..7d8b05244c 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T3.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object(value) is called and the value is null, undefined or not supplied, - * create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A1_T3.js - * @description Creating Object() and checking its properties - */ +/*--- +info: > + When the Object(value) is called and the value is null, undefined or not supplied, + create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) +es5id: 15.2.1.1_A1_T3 +description: Creating Object() and checking its properties +---*/ var __obj = Object(); @@ -32,4 +32,3 @@ if (__obj.toLocaleString() !== n__obj.toLocaleString()) { if (typeof __obj !== typeof n__obj) { $ERROR('#5'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T4.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T4.js index aa4aafc1b0..df58529ff5 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T4.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object(value) is called and the value is null, undefined or not supplied, - * create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A1_T4.js - * @description Creating Object(undefined) and checking its properties - */ +/*--- +info: > + When the Object(value) is called and the value is null, undefined or not supplied, + create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) +es5id: 15.2.1.1_A1_T4 +description: Creating Object(undefined) and checking its properties +---*/ var __obj = Object(undefined); @@ -32,4 +32,3 @@ if (__obj.toLocaleString() !== n__obj.toLocaleString()) { if (typeof __obj !== typeof n__obj) { $ERROR('#5'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T5.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T5.js index dc083d0ba7..5d7e00a78a 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T5.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object(value) is called and the value is null, undefined or not supplied, - * create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A1_T5.js - * @description Creating Object(x) and checking its properties - */ +/*--- +info: > + When the Object(value) is called and the value is null, undefined or not supplied, + create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1) +es5id: 15.2.1.1_A1_T5 +description: Creating Object(x) and checking its properties +---*/ var __obj = Object(x); @@ -34,4 +34,3 @@ if (typeof __obj !== typeof n__obj) { } var x; - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T1.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T1.js index a3a93e7b2a..264667eb69 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T1.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T1.js - * @description Calling Object function with boolean argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T1 +description: Calling Object function with boolean argument value +includes: [$FAIL.js] +---*/ var bool = true; @@ -32,4 +33,3 @@ if (!obj) { if (obj === true) { $ERROR('#5: Object(true) returns ToObject(true)'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T10.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T10.js index 8ac9aa497e..5358af05e1 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T10.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T10.js - * @description Calling Object function with array of numbers as argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T10 +description: Calling Object function with array of numbers as argument value +---*/ var arr = [1,2,3]; @@ -24,7 +24,3 @@ arr.push(4); if ((n_obj !== arr)||(n_obj[3]!==4)) { $ERROR('#2: Object([1,2,3]) returns ToObject([1,2,3])'); } - - - - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T11.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T11.js index c7f605bb00..333c85b621 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T11.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T11.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T11.js - * @description Calling Object function with function declaration as argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T11 +description: Calling Object function with function declaration as argument value +---*/ //CHECK#1 if (typeof func !== 'undefined') { @@ -25,5 +25,3 @@ if ((n_obj.constructor !== Function)||(n_obj()!==1)) { if (typeof func !== 'undefined') { $ERROR('#3: function expression can\'t be declarated'); } - - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T12.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T12.js index e151c6b0bc..0d338f1a28 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T12.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T12.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T12.js - * @description Calling Object function with numeric expression as argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T12 +description: Calling Object function with numeric expression as argument value +---*/ var obj = Object(1.1*([].length+{q:1}["q"])); @@ -26,4 +26,3 @@ if ((obj != 1.1)||(obj === 1.1)) { $ERROR('#4: Object(expression) returns ToObject(expression)'); } // - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T13.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T13.js index 19ffdbe7df..1644049c7d 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T13.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T13.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T13.js - * @description Calling Object function with boolean expression as argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T13 +description: Calling Object function with boolean expression as argument value +---*/ var obj = Object((1===1)&&(!false)); @@ -30,4 +30,3 @@ if (!(obj)) { if (obj===true) { $ERROR('#3: Object(expression) returns ToObject(expression)'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T14.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T14.js index 559c8ea5b9..30d7ee5a9b 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T14.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T14.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T14.js - * @description Calling Object function with sum of empty string and a number as argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T14 +description: > + Calling Object function with sum of empty string and a number as + argument value +---*/ var obj = Object(""+1); @@ -25,4 +27,3 @@ if (typeof obj !== "object") { if ((obj != "1")||(obj === "1")) { $ERROR('#4: Object(expression) returns ToObject(expression)'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T2.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T2.js index ab02565a20..9adf56ae7b 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T2.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T2.js - * @description Calling Object function with number argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T2 +description: Calling Object function with number argument value +---*/ var num = 1.1; @@ -33,4 +33,3 @@ if ((obj != 1.1)||(obj === 1.1)) { $ERROR('#4: Object(1.1) returns ToObject(1.1)'); } // - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T3.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T3.js index 019ac0f7f4..a948c1e7b9 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T3.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T3.js - * @description Calling Object function with string argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T3 +description: Calling Object function with string argument value +---*/ var str = 'Luke Skywalker'; @@ -32,4 +32,3 @@ if (typeof obj !== "object") { if ((obj != "Luke Skywalker")||(obj === "Luke Skywalker")) { $ERROR('#4: Object("Luke Skywalker") returns ToObject("Luke Skywalker")'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T4.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T4.js index 68d45f46d2..b47a34ad99 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T4.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T4.js - * @description Calling Object function with object argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T4 +description: Calling Object function with object argument value +includes: [$FAIL.js] +---*/ var obj = {flag:true}; @@ -22,5 +23,3 @@ var n_obj = Object(obj); if ((n_obj !== obj)||(!(n_obj['flag']))) { $ERROR('#2: Object({flag:true}) returns ToObject({flag:true})'); } - - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T5.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T5.js index bc23aa00ad..18984ffbd1 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T5.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T5.js - * @description Calling Object function with NaN argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T5 +description: Calling Object function with NaN argument value +---*/ var num = NaN; @@ -28,4 +28,3 @@ if (typeof obj!=="object") { $ERROR('#2: Object(NaN) returns ToObject(NaN)'); } // - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T6.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T6.js index c4d11409aa..1a3911a750 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T6.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T6.js - * @description Calling Object function with Infinity argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T6 +description: Calling Object function with Infinity argument value +---*/ var num = Infinity; @@ -32,5 +32,3 @@ if (typeof obj!=="object") { if ((obj != Infinity)||(obj === Infinity)) { $ERROR('#4: Object(Infinity) returns ToObject(Infinity)'); } - - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T7.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T7.js index f5947948bc..5f292ee212 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T7.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T7.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T7.js - * @description Calling Object function with empty string argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T7 +description: Calling Object function with empty string argument value +includes: [$FAIL.js] +---*/ var str = ''; @@ -32,4 +33,3 @@ if (typeof obj !== "object") { if ((obj != "")||(obj === "")) { $ERROR('#4: Object("") returns ToObject("")'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T8.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T8.js index fbd9419ba6..afaf733bd0 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T8.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T8.js - * @description Calling Object function with function variable argument value - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T8 +description: Calling Object function with function variable argument value +---*/ var func = function(){return 1;}; @@ -22,5 +22,3 @@ var n_obj = Object(func); if ((n_obj !== func)||(n_obj()!==1)) { $ERROR('#2: Object(function) returns function'); } - - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T9.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T9.js index f8e0020fe9..14154f46b2 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T9.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A2_T9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object function is called with one argument value, - * and the value neither is null nor undefined, and is supplied, return ToObject(value) - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A2_T9.js - * @description Calling Object function with function argument value. The function is declared - */ +/*--- +info: > + When the Object function is called with one argument value, + and the value neither is null nor undefined, and is supplied, return ToObject(value) +es5id: 15.2.1.1_A2_T9 +description: > + Calling Object function with function argument value. The function + is declared +---*/ //CHECK#1 if (typeof func !== 'function') { @@ -22,5 +24,3 @@ if ((n_obj !== func)||(n_obj()!==1)) { } function func(){return 1;}; - - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T1.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T1.js index d3f235bb0d..d34d8a62f9 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T1.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since calling Object as a function is identical to calling a function, list of arguments bracketing is allowed - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A3_T1.js - * @description Creating an object with "Object(1,2,3)" - */ +/*--- +info: > + Since calling Object as a function is identical to calling a function, + list of arguments bracketing is allowed +es5id: 15.2.1.1_A3_T1 +description: Creating an object with "Object(1,2,3)" +---*/ var obj = Object(1,2,3); @@ -24,4 +25,3 @@ if (typeof obj !== "object") { if ((obj != 1)||(obj === 1)) { $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T2.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T2.js index 7f6468dc82..b4b131e055 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T2.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since calling Object as a function is identical to calling a function, list of arguments bracketing is allowed - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A3_T2.js - * @description Creating an object with "Object(null,2,3)" - */ +/*--- +info: > + Since calling Object as a function is identical to calling a function, + list of arguments bracketing is allowed +es5id: 15.2.1.1_A3_T2 +description: Creating an object with "Object(null,2,3)" +---*/ var obj = Object(null,2,3); @@ -19,4 +20,3 @@ if (obj.constructor !== Object) { if (typeof obj !== "object") { $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } - diff --git a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T3.js b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T3.js index 5766eecc37..4d460aaf5e 100644 --- a/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T3.js +++ b/test/suite/ch15/15.2/15.2.1/S15.2.1.1_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since calling Object as a function is identical to calling a function, list of arguments bracketing is allowed - * - * @path ch15/15.2/15.2.1/S15.2.1.1_A3_T3.js - * @description Creating an object with "Object((null,2,3),1,2)" - */ +/*--- +info: > + Since calling Object as a function is identical to calling a function, + list of arguments bracketing is allowed +es5id: 15.2.1.1_A3_T3 +description: Creating an object with "Object((null,2,3),1,2)" +---*/ var obj = Object((null,2,3),1,2); @@ -24,4 +25,3 @@ if (typeof obj !== "object") { if ((obj != 3)||(obj === 3)) { $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T1.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T1.js index 56010d9160..38356c2a01 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T1.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with no arguments the following steps are taken: - * (The argument value was not supplied or its type was Null or Undefined.) - * i) Create a new native ECMAScript object. - * ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. - * iii) The [[Class]] property of the newly constructed object is set to "Object". - * iv) The newly constructed object has no [[Value]] property. - * v) Return the newly created native object - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A1_T1.js - * @description Creating new Object() and checking its properties - */ +/*--- +info: > + When the Object constructor is called with no arguments the following steps are taken: + (The argument value was not supplied or its type was Null or Undefined.) + i) Create a new native ECMAScript object. + ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. + iii) The [[Class]] property of the newly constructed object is set to "Object". + iv) The newly constructed object has no [[Value]] property. + v) Return the newly created native object +es5id: 15.2.2.1_A1_T1 +description: Creating new Object() and checking its properties +---*/ var obj = new Object(); @@ -41,5 +41,3 @@ if (obj.toString() !== to_string_result) { if (obj.valueOf().toString() !== to_string_result.toString()) { $ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.'); } - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T2.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T2.js index ad4af73a86..836880f742 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T2.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T2.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with no arguments the following steps are taken: - * (The argument value was not supplied or its type was Null or Undefined.) - * i) Create a new native ECMAScript object. - * ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. - * iii) The [[Class]] property of the newly constructed object is set to "Object". - * iv) The newly constructed object has no [[Value]] property. - * v) Return the newly created native object - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A1_T2.js - * @description Creating new Object(void 0) and checking its properties - */ +/*--- +info: > + When the Object constructor is called with no arguments the following steps are taken: + (The argument value was not supplied or its type was Null or Undefined.) + i) Create a new native ECMAScript object. + ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. + iii) The [[Class]] property of the newly constructed object is set to "Object". + iv) The newly constructed object has no [[Value]] property. + v) Return the newly created native object +es5id: 15.2.2.1_A1_T2 +description: Creating new Object(void 0) and checking its properties +---*/ //var foo = void 0; var obj = new Object(void 0); @@ -42,5 +42,3 @@ if (obj.toString() !== to_string_result) { if (obj.valueOf().toString() !== to_string_result.toString()) { $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); } - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T3.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T3.js index 1379071204..6677aebc90 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T3.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T3.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with no arguments the following steps are taken: - * (The argument value was not supplied or its type was Null or Undefined.) - * i) Create a new native ECMAScript object. - * ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. - * iii) The [[Class]] property of the newly constructed object is set to "Object". - * iv) The newly constructed object has no [[Value]] property. - * v) Return the newly created native object - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A1_T3.js - * @description Creating new Object(null) and checking its properties - */ +/*--- +info: > + When the Object constructor is called with no arguments the following steps are taken: + (The argument value was not supplied or its type was Null or Undefined.) + i) Create a new native ECMAScript object. + ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. + iii) The [[Class]] property of the newly constructed object is set to "Object". + iv) The newly constructed object has no [[Value]] property. + v) Return the newly created native object +es5id: 15.2.2.1_A1_T3 +description: Creating new Object(null) and checking its properties +---*/ var obj = new Object(null); @@ -41,5 +41,3 @@ if (obj.toString() !== to_string_result) { if (obj.valueOf().toString() !== to_string_result.toString()) { $ERROR('#4: when new Object(null) calls the newly constructed object has no [[Value]] property.'); } - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T4.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T4.js index b8af18c920..9d42776957 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T4.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T4.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with no arguments the following steps are taken: - * (The argument value was not supplied or its type was Null or Undefined.) - * i) Create a new native ECMAScript object. - * ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. - * iii) The [[Class]] property of the newly constructed object is set to "Object". - * iv) The newly constructed object has no [[Value]] property. - * v) Return the newly created native object - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A1_T4.js - * @description Creating new Object(undefined) and checking its properties - */ +/*--- +info: > + When the Object constructor is called with no arguments the following steps are taken: + (The argument value was not supplied or its type was Null or Undefined.) + i) Create a new native ECMAScript object. + ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. + iii) The [[Class]] property of the newly constructed object is set to "Object". + iv) The newly constructed object has no [[Value]] property. + v) Return the newly created native object +es5id: 15.2.2.1_A1_T4 +description: Creating new Object(undefined) and checking its properties +---*/ var obj = new Object(undefined); @@ -41,5 +41,3 @@ if (obj.toString() !== to_string_result) { if (obj.valueOf().toString() !== to_string_result.toString()) { $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.'); } - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T5.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T5.js index ced23c45ef..bf9ef60154 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T5.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A1_T5.js @@ -1,18 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with no arguments the following steps are taken: - * (The argument value was not supplied or its type was Null or Undefined.) - * i) Create a new native ECMAScript object. - * ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. - * iii) The [[Class]] property of the newly constructed object is set to "Object". - * iv) The newly constructed object has no [[Value]] property. - * v) Return the newly created native object - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A1_T5.js - * @description Creating new Object(x), where x is "undefined", and checking it properties - */ +/*--- +info: > + When the Object constructor is called with no arguments the following steps are taken: + (The argument value was not supplied or its type was Null or Undefined.) + i) Create a new native ECMAScript object. + ii) The [[Prototype]] property of the newly constructed object is set to the Object prototype object. + iii) The [[Class]] property of the newly constructed object is set to "Object". + iv) The newly constructed object has no [[Value]] property. + v) Return the newly created native object +es5id: 15.2.2.1_A1_T5 +description: > + Creating new Object(x), where x is "undefined", and checking it + properties +---*/ var obj = new Object(x); @@ -43,5 +45,3 @@ if (obj.valueOf().toString() !== to_string_result.toString()) { } var x; - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T1.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T1.js index 1c6b7a408d..7342f19305 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T1.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T1.js - * @description The value is Object - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T1 +description: The value is Object +---*/ var obj = {prop:1}; @@ -22,4 +22,3 @@ if (n_obj !== obj) { if (n_obj['prop'] !== 1) { $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T2.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T2.js index 0a5e9aaee7..7d5ff9d29e 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T2.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T2.js - * @description The value is a function variable - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T2 +description: The value is a function variable +---*/ var func = function(){return 1;}; @@ -23,4 +23,3 @@ if (n_obj() !== 1) { $ERROR('When the Object constructor is called and if the value is an Object simply value returns'); } // - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T3.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T3.js index 95fb8bb5de..583abf2053 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T3.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T3.js - * @description The value is an array - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T3 +description: The value is an array +---*/ var arr = [1,2,3]; @@ -24,4 +24,3 @@ if (n_obj !== arr) { if (n_obj[3] !== 4) { $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T4.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T4.js index 8a80c52465..bffb5ac4eb 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T4.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T4.js - * @description The value is "this" - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T4 +description: The value is "this" +---*/ var x=1; @@ -24,4 +24,3 @@ if (n_obj !== obj) { if (n_obj['x'] !== 1) { $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js index 08e181ca71..f4daa6b692 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T5.js - * @description The value is a Date object - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T5 +description: The value is a Date object +---*/ var obj = new Date(1978,3); @@ -22,4 +22,3 @@ if (n_obj !== obj) { if ((n_obj.getFullYear() !== 1978)||(n_obj.getMonth() !== 3)) { $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T6.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T6.js index 511d634dea..bf2c36cc05 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T6.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T6.js - * @description The value is a declared function - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T6 +description: The value is a declared function +---*/ var n_obj = new Object(func); @@ -22,4 +22,3 @@ if (n_obj() !== 1) { } function func(){return 1;}; - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T7.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T7.js index 7eca9ee887..ac8fdadb27 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T7.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A2_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the value is a native ECMAScript object, do not create a new object but simply return value - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A2_T7.js - * @description The value is a function declaration - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the value is a native ECMAScript object, do not create a new object but simply return value +es5id: 15.2.2.1_A2_T7 +description: The value is a function declaration +---*/ //CHECK#0 if (typeof func !== 'undefined') { @@ -30,5 +30,3 @@ if (n_obj() !== 1) { if (typeof func !== 'undefined') { $ERROR('#3: function expression can\'t be declarated'); } - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T1.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T1.js index bff76869fd..539b6a23b4 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T1.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is String, return ToObject(string) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A3_T1.js - * @description Argument value is a nonempty string - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is String, return ToObject(string) +es5id: 15.2.2.1_A3_T1 +description: Argument value is a nonempty string +includes: [$FAIL.js] +---*/ var str = 'Obi-Wan Kenobi'; @@ -38,5 +39,3 @@ if ( n_obj != str) { if ( n_obj === str) { $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)'); } - - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T2.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T2.js index 5eaabce76e..4bc8a9f6bb 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T2.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is String, return ToObject(string) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A3_T2.js - * @description Argument value is an empty string - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is String, return ToObject(string) +es5id: 15.2.2.1_A3_T2 +description: Argument value is an empty string +includes: [$FAIL.js] +---*/ var str = ''; @@ -37,4 +38,3 @@ if ( n_obj != str) { if ( n_obj === str) { $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T3.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T3.js index 35252975d7..b53cc50531 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T3.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is String, return ToObject(string) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A3_T3.js - * @description Argument value is sum of empty string and number - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is String, return ToObject(string) +es5id: 15.2.2.1_A3_T3 +description: Argument value is sum of empty string and number +---*/ var n_obj = new Object(""+1); @@ -30,4 +30,3 @@ if ( n_obj != "1") { if ( n_obj === "1") { $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T1.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T1.js index 5e74f7e7ca..e48a9632c5 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T1.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Boolean, return ToObject(boolean) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A4_T1.js - * @description Argument value is "true" - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Boolean, return ToObject(boolean) +es5id: 15.2.2.1_A4_T1 +description: Argument value is "true" +includes: [$FAIL.js] +---*/ var bool = true; @@ -37,4 +38,3 @@ if ( n_obj != bool) { if ( n_obj === bool) { $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T2.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T2.js index 61fd00c950..28099bf271 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T2.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Boolean, return ToObject(boolean) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A4_T2.js - * @description Argument value is "false" - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Boolean, return ToObject(boolean) +es5id: 15.2.2.1_A4_T2 +description: Argument value is "false" +includes: [$FAIL.js] +---*/ var bool = false; @@ -37,4 +38,3 @@ if ( n_obj != bool) { if ( n_obj === bool) { $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T3.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T3.js index 4695170da7..798278b548 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T3.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Boolean, return ToObject(boolean) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A4_T3.js - * @description Argument value is boolean expression - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Boolean, return ToObject(boolean) +es5id: 15.2.2.1_A4_T3 +description: Argument value is boolean expression +---*/ var n_obj = new Object((1===1)&&!(false)); @@ -30,4 +30,3 @@ if ( n_obj != true) { if ( n_obj === true) { $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T1.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T1.js index 05ca359574..a74bb7ef1f 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T1.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Number, return ToObject(number) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A5_T1.js - * @description Argument value is any number - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Number, return ToObject(number) +es5id: 15.2.2.1_A5_T1 +description: Argument value is any number +includes: [$FAIL.js] +---*/ var num = 1.0; @@ -37,4 +38,3 @@ if ( n_obj != num) { if ( n_obj === num) { $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T2.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T2.js index 6a72708c55..4e29079df4 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T2.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Number, return ToObject(number) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A5_T2.js - * @description Argument value is NaN - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Number, return ToObject(number) +es5id: 15.2.2.1_A5_T2 +description: Argument value is NaN +includes: [$FAIL.js] +---*/ var num = NaN; @@ -27,4 +28,3 @@ if (n_obj.constructor !== Number) { if (typeof n_obj !== 'object') { $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T3.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T3.js index dc99dbd32a..13b996c583 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T3.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Number, return ToObject(number) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A5_T3.js - * @description Argument value is Infinity - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Number, return ToObject(number) +es5id: 15.2.2.1_A5_T3 +description: Argument value is Infinity +includes: [$FAIL.js] +---*/ var num = Infinity; @@ -37,4 +38,3 @@ if ( n_obj != num) { if ( n_obj === num) { $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T4.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T4.js index 8a34a2f087..c6c89c820f 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T4.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A5_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Object constructor is called with one argument value and - * the type of value is Number, return ToObject(number) - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A5_T4.js - * @description Argument value is numeric expression - */ +/*--- +info: > + When the Object constructor is called with one argument value and + the type of value is Number, return ToObject(number) +es5id: 15.2.2.1_A5_T4 +description: Argument value is numeric expression +---*/ var n_obj = new Object( 2*([].length + {q:1}["q"])); @@ -30,4 +30,3 @@ if ( n_obj != 2) { if ( n_obj === 2) { $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T1.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T1.js index 7fd7a4fbe2..e56d9e2cff 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T1.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since calling Object as a function is identical to calling a function, list of arguments bracketing is allowed - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A6_T1.js - * @description Creating an object with "new Object(1,2,3)" - */ +/*--- +info: > + Since calling Object as a function is identical to calling a function, + list of arguments bracketing is allowed +es5id: 15.2.2.1_A6_T1 +description: Creating an object with "new Object(1,2,3)" +---*/ var obj = new Object(1,2,3); @@ -24,4 +25,3 @@ if (typeof obj !== "object") { if ((obj != 1)||(obj === 1)) { $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T2.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T2.js index cb38920248..c87d6f1c41 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T2.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since calling Object as a function is identical to calling a function, list of arguments bracketing is allowed - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A6_T2.js - * @description Creating an object with "new Object(null,2,3)" - */ +/*--- +info: > + Since calling Object as a function is identical to calling a function, + list of arguments bracketing is allowed +es5id: 15.2.2.1_A6_T2 +description: Creating an object with "new Object(null,2,3)" +---*/ var obj = new Object(null,2,3); @@ -19,4 +20,3 @@ if (obj.constructor !== Object) { if (typeof obj !== "object") { $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } - diff --git a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T3.js b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T3.js index 1c20cd4d28..ae5f7156f7 100644 --- a/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T3.js +++ b/test/suite/ch15/15.2/15.2.2/S15.2.2.1_A6_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since calling Object as a function is identical to calling a function, list of arguments bracketing is allowed - * - * @path ch15/15.2/15.2.2/S15.2.2.1_A6_T3.js - * @description Creating an object with "new Object((null,2,3),2,3)" - */ +/*--- +info: > + Since calling Object as a function is identical to calling a function, + list of arguments bracketing is allowed +es5id: 15.2.2.1_A6_T3 +description: Creating an object with "new Object((null,2,3),2,3)" +---*/ var obj = new Object((null,2,3),1,2); @@ -24,4 +25,3 @@ if (typeof obj !== "object") { if ((obj != 3)||(obj === 3)) { $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); } - diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.1/15.2.3.1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.1/15.2.3.1.js index 9c5a887003..f93be5fc92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.1/15.2.3.1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.1/15.2.3.1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.1/15.2.3.1.js - * @description Object.prototype is a data property with default attribute values (false) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, 'prototype'); - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.1 +description: > + Object.prototype is a data property with default attribute values + (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, 'prototype'); + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A1.js index 8bcab15297..b13d2ed1a3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A1.js - * @description Checking if varying "Object.prototype" property fails - */ +/*--- +info: The Object.prototype property has the attribute ReadOnly +es5id: 15.2.3.1_A1 +description: Checking if varying "Object.prototype" property fails +---*/ var obj = Object.prototype; Object.prototype = function(){return "shifted";}; @@ -23,4 +22,3 @@ try { } catch (e) { ; } - diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A2.js index b7d9b42d95..28a9d43b32 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype property has the attribute DontEnum - * - * @path ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A2.js - * @description Checking if enumerating "Object.prototype" property fails - */ +/*--- +info: The Object.prototype property has the attribute DontEnum +es5id: 15.2.3.1_A2 +description: Checking if enumerating "Object.prototype" property fails +---*/ // CHECK#1 if (Object.propertyIsEnumerable('prototype')) { @@ -23,4 +22,3 @@ for (p in Object){ if (cout !== 0) { $ERROR('#2: the Object.prototype property has the attributes DontEnum'); } - diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js index bcccb67ef2..876b524d3e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** -* @path ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js -* @name: S15.2.3.1_A3; -* @section: 15.2.3.1, 15.2.4; -* @assertion: The Object.prototype property has the attribute DontDelete; -* @description: Checking if deleting "Object.prototype" property fails; -* @noStrict -*/ +/*--- +es5id: 15.2.3.1_A3 +name: S15.2.3.1_A3; +section: 15.2.3.1, 15.2.4; +assertion: The Object.prototype property has the attribute DontDelete; +description: Checking if deleting "Object.prototype" property fails; +flags: [noStrict] +---*/ delete Object.prototype; @@ -16,4 +16,3 @@ delete Object.prototype; if (!(Object.hasOwnProperty('prototype'))) { $ERROR('#2: the Object.prototype property has the attributes DontDelete.'); } - diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js index 0018ee6b89..b3eec00b52 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js - * @description Object.preventExtensions must exist as a function - */ - - -function testcase() { - var f = Object.preventExtensions; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-0-1 +description: Object.preventExtensions must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.preventExtensions; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js index 94f9f66ef2..16a724cb0d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js - * @description Object.preventExtensions must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.preventExtensions.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-0-2 +description: > + Object.preventExtensions must exist as a function taking 1 + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.preventExtensions.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js index aeb1d4276e..96fa087ce0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js - * @description Object.preventExtensions throws TypeError if 'O' is undefined - */ - - -function testcase() { - try { - Object.preventExtensions(undefined); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-1-1 +description: Object.preventExtensions throws TypeError if 'O' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.preventExtensions(undefined); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js index baa4d2e195..21e22d208a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js - * @description Object.preventExtensions throws TypeError if 'O' is null - */ - - -function testcase() { - try { - Object.preventExtensions(null); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-1-2 +description: Object.preventExtensions throws TypeError if 'O' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.preventExtensions(null); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js index da445a1b7b..861adb31ba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js - * @description Object.preventExtensions throws TypeError if 'O' is a boolean primitive value - */ - - -function testcase() { - try { - Object.preventExtensions(true); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-1-3 +description: > + Object.preventExtensions throws TypeError if 'O' is a boolean + primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.preventExtensions(true); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js index a56a22a9c9..480de023c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js - * @description Object.preventExtensions throws TypeError if 'O' is a string primitive value - */ - - -function testcase() { - try { - Object.preventExtensions("abc"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-1-4 +description: > + Object.preventExtensions throws TypeError if 'O' is a string + primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.preventExtensions("abc"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js index 7b64dd588e..2a5cde4557 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js - * @description Object.preventExtensions throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.preventExtensions(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-1 +description: > + Object.preventExtensions throws TypeError if type of first param + is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.preventExtensions(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2-1.js index 45293a09b9..81c63e2190 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2-1.js - * @description Object.preventExtensions - repeated calls to preventExtensions have no side effects - */ - - -function testcase() { - var obj = {}; - var testResult1 = true; - var testResult2 = true; - - var preCheck = Object.isExtensible(obj); - - Object.preventExtensions(obj); - testResult1 = Object.isExtensible(obj); - Object.preventExtensions(obj); - testResult2 = Object.isExtensible(obj); - - return preCheck && !testResult1 && !testResult2; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-2-1 +description: > + Object.preventExtensions - repeated calls to preventExtensions + have no side effects +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var testResult1 = true; + var testResult2 = true; + + var preCheck = Object.isExtensible(obj); + + Object.preventExtensions(obj); + testResult1 = Object.isExtensible(obj); + Object.preventExtensions(obj); + testResult2 = Object.isExtensible(obj); + + return preCheck && !testResult1 && !testResult2; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js index 0ac2ca6aa4..0ca1aecca9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js @@ -1,23 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The effect of preventExtentions must be testable by calling isExtensible - * - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js - * @description Object.preventExtensions returns its arguments after setting its extensible property to false - */ - - -function testcase() { - var o = {}; - var o2 = undefined; - - o2 = Object.preventExtensions(o); - if (o2 === o && Object.isExtensible(o2) === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: The effect of preventExtentions must be testable by calling isExtensible +es5id: 15.2.3.10-2 +description: > + Object.preventExtensions returns its arguments after setting its + extensible property to false +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + var o2 = undefined; + + o2 = Object.preventExtensions(o); + if (o2 === o && Object.isExtensible(o2) === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-1.js index bf4f4e544a..9f44d6316d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-1.js - * @description Object.preventExtensions - Object.isExtensible(arg) returns false if arg is the returned object - */ - - -function testcase() { - var obj = {}; - var preCheck = Object.isExtensible(obj); - Object.preventExtensions(obj); - - return preCheck && !Object.isExtensible(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-1 +description: > + Object.preventExtensions - Object.isExtensible(arg) returns false + if arg is the returned object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var preCheck = Object.isExtensible(obj); + Object.preventExtensions(obj); + + return preCheck && !Object.isExtensible(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-10.js index dbcbede7be..9e56f02a56 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-10.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-10.js - * @description Object.preventExtensions - indexed properties cannot be added into an Error object - */ - - -function testcase() { - var errObj = new Error(); - var preCheck = Object.isExtensible(errObj); - Object.preventExtensions(errObj); - - errObj[0] = 12; - return preCheck && !errObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-10 +description: > + Object.preventExtensions - indexed properties cannot be added into + an Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error(); + var preCheck = Object.isExtensible(errObj); + Object.preventExtensions(errObj); + + errObj[0] = 12; + return preCheck && !errObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-11.js index 596c46ade5..780c547be3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-11.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-11.js - * @description Object.preventExtensions - indexed properties cannot be added into an Arguments object - */ - - -function testcase() { - var argObj; - (function () { - argObj = arguments; - }()); - var preCheck = Object.isExtensible(argObj); - Object.preventExtensions(argObj); - - argObj[0] = 12; - return preCheck && !argObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-11 +description: > + Object.preventExtensions - indexed properties cannot be added into + an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj; + (function () { + argObj = arguments; + }()); + var preCheck = Object.isExtensible(argObj); + Object.preventExtensions(argObj); + + argObj[0] = 12; + return preCheck && !argObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-12.js index b37ef87620..bf3268456f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-12.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-12.js - * @description Object.preventExtensions - named properties cannot be added into the returned object - */ - - -function testcase() { - var obj = {}; - var preCheck = Object.isExtensible(obj); - Object.preventExtensions(obj); - - obj.exName = 2; - return preCheck && !Object.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-12 +description: > + Object.preventExtensions - named properties cannot be added into + the returned object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var preCheck = Object.isExtensible(obj); + Object.preventExtensions(obj); + + obj.exName = 2; + return preCheck && !Object.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-13.js index 1a486dfe7a..1a0b1e3976 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-13.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-13.js - * @description Object.preventExtensions - named properties cannot be added into a Function object - */ - - -function testcase() { - var funObj = function () { }; - var preCheck = Object.isExtensible(funObj); - Object.preventExtensions(funObj); - - funObj.exName = 2; - return preCheck && !funObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-13 +description: > + Object.preventExtensions - named properties cannot be added into a + Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { }; + var preCheck = Object.isExtensible(funObj); + Object.preventExtensions(funObj); + + funObj.exName = 2; + return preCheck && !funObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-14.js index 841b559aaf..476646d0d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-14.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-14.js - * @description Object.preventExtensions - named properties cannot be added into an Array object - */ - - -function testcase() { - var arrObj = []; - var preCheck = Object.isExtensible(arrObj); - Object.preventExtensions(arrObj); - - arrObj.exName = 2; - return preCheck && !arrObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-14 +description: > + Object.preventExtensions - named properties cannot be added into + an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + var preCheck = Object.isExtensible(arrObj); + Object.preventExtensions(arrObj); + + arrObj.exName = 2; + return preCheck && !arrObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-15.js index 5a9394c851..ec4966171d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-15.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-15.js - * @description Object.preventExtensions - named properties cannot be added into a String object - */ - - -function testcase() { - var strObj = new String("bbq"); - var preCheck = Object.isExtensible(strObj); - Object.preventExtensions(strObj); - - strObj.exName = 2; - return preCheck && !strObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-15 +description: > + Object.preventExtensions - named properties cannot be added into a + String object +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String("bbq"); + var preCheck = Object.isExtensible(strObj); + Object.preventExtensions(strObj); + + strObj.exName = 2; + return preCheck && !strObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-16.js index 0def556967..76d90d83e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-16.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-16.js - * @description Object.preventExtensions - named properties cannot be added into a Boolean object - */ - - -function testcase() { - var boolObj = new Boolean(true); - var preCheck = Object.isExtensible(boolObj); - Object.preventExtensions(boolObj); - - boolObj.exName = 2; - return preCheck && !boolObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-16 +description: > + Object.preventExtensions - named properties cannot be added into a + Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + var boolObj = new Boolean(true); + var preCheck = Object.isExtensible(boolObj); + Object.preventExtensions(boolObj); + + boolObj.exName = 2; + return preCheck && !boolObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-17.js index 4f80ac8238..744029b067 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-17.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-17.js - * @description Object.preventExtensions - named properties cannot be added into a Number object - */ - - -function testcase() { - var numObj = new Number(123); - var preCheck = Object.isExtensible(numObj); - Object.preventExtensions(numObj); - - numObj.exName = 2; - return preCheck && !numObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-17 +description: > + Object.preventExtensions - named properties cannot be added into a + Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + var numObj = new Number(123); + var preCheck = Object.isExtensible(numObj); + Object.preventExtensions(numObj); + + numObj.exName = 2; + return preCheck && !numObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-18.js index 868c8ba358..ab84b3fb9b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-18.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-18.js - * @description Object.preventExtensions - named properties cannot be added into a Date object - */ - - -function testcase() { - var dateObj = new Date(); - var preCheck = Object.isExtensible(dateObj); - Object.preventExtensions(dateObj); - - dateObj.exName = 2; - return preCheck && !dateObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-18 +description: > + Object.preventExtensions - named properties cannot be added into a + Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateObj = new Date(); + var preCheck = Object.isExtensible(dateObj); + Object.preventExtensions(dateObj); + + dateObj.exName = 2; + return preCheck && !dateObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-19.js index 84ea46999b..b338400010 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-19.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-19.js - * @description Object.preventExtensions - named properties cannot be added into a RegExp object - */ - - -function testcase() { - var regObj = new RegExp(); - var preCheck = Object.isExtensible(regObj); - Object.preventExtensions(regObj); - - regObj.exName = 2; - return preCheck && !regObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-19 +description: > + Object.preventExtensions - named properties cannot be added into a + RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + var preCheck = Object.isExtensible(regObj); + Object.preventExtensions(regObj); + + regObj.exName = 2; + return preCheck && !regObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-2.js index 738374dc47..02657fad47 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-2.js - * @description Object.preventExtensions - indexed properties cannot be added into the returned object - */ - - -function testcase() { - - var obj = {}; - var preCheck = Object.isExtensible(obj); - Object.preventExtensions(obj); - - obj[0] = 12; - return preCheck && !obj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-2 +description: > + Object.preventExtensions - indexed properties cannot be added into + the returned object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var preCheck = Object.isExtensible(obj); + Object.preventExtensions(obj); + + obj[0] = 12; + return preCheck && !obj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-20.js index e9abef7c11..2bcf5101ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-20.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-20.js - * @description Object.preventExtensions - named properties cannot be added into an Error object - */ - - -function testcase() { - var errObj = new Error(); - var preCheck = Object.isExtensible(errObj); - Object.preventExtensions(errObj); - - errObj.exName = 2; - return preCheck && !errObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-20 +description: > + Object.preventExtensions - named properties cannot be added into + an Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error(); + var preCheck = Object.isExtensible(errObj); + Object.preventExtensions(errObj); + + errObj.exName = 2; + return preCheck && !errObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-21.js index c01bca2c84..b5a887b769 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-21.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-21.js - * @description Object.preventExtensions - named properties cannot be added into an Arguments object - */ - - -function testcase() { - var argObj; - (function () { - argObj = arguments; - }()); - var preCheck = Object.isExtensible(argObj); - Object.preventExtensions(argObj); - - argObj.exName = 2; - return preCheck && !argObj.hasOwnProperty("exName"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-21 +description: > + Object.preventExtensions - named properties cannot be added into + an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj; + (function () { + argObj = arguments; + }()); + var preCheck = Object.isExtensible(argObj); + Object.preventExtensions(argObj); + + argObj.exName = 2; + return preCheck && !argObj.hasOwnProperty("exName"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-22.js index b97de09155..636209f959 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-22.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-22.js - * @description Object.preventExtensions - properties can still be deleted after extensions have been prevented - */ - - -function testcase() { - var obj = { prop: 12 }; - var preCheck = Object.isExtensible(obj); - Object.preventExtensions(obj); - - delete obj.prop; - - return preCheck && !obj.hasOwnProperty("prop"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-22 +description: > + Object.preventExtensions - properties can still be deleted after + extensions have been prevented +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: 12 }; + var preCheck = Object.isExtensible(obj); + Object.preventExtensions(obj); + + delete obj.prop; + + return preCheck && !obj.hasOwnProperty("prop"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-23.js index 52d35b192f..cb3a866cb6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-23.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-23.js - * @description Object.preventExtensions - properties can still be reassigned after extensions have been prevented - */ - - -function testcase() { - var obj = { prop: 12 }; - var preCheck = Object.isExtensible(obj); - Object.preventExtensions(obj); - - obj.prop = -1; - - return preCheck && obj.prop === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-23 +description: > + Object.preventExtensions - properties can still be reassigned + after extensions have been prevented +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: 12 }; + var preCheck = Object.isExtensible(obj); + Object.preventExtensions(obj); + + obj.prop = -1; + + return preCheck && obj.prop === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-24.js index da1f635cb3..63e96914ab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-24.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-24.js - * @description Object.preventExtensions - [[Extensible]]: false on a prototype doesn't prevent adding properties to an instance that inherits from that prototype - */ - - -function testcase() { - var proto = {}; - var preCheck = Object.isExtensible(proto); - Object.preventExtensions(proto); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - - child.prop = 10; - - return preCheck && child.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-24 +description: > + Object.preventExtensions - [[Extensible]]: false on a prototype + doesn't prevent adding properties to an instance that inherits + from that prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + var preCheck = Object.isExtensible(proto); + Object.preventExtensions(proto); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + + child.prop = 10; + + return preCheck && child.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-3.js index 99dd62c56a..fcab172d07 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-3.js - * @description Object.preventExtensions - indexed properties cannot be added into a Function object - */ - - -function testcase() { - var funObj = function () { }; - var preCheck = Object.isExtensible(funObj); - Object.preventExtensions(funObj); - - funObj[0] = 12; - return preCheck && !funObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-3 +description: > + Object.preventExtensions - indexed properties cannot be added into + a Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { }; + var preCheck = Object.isExtensible(funObj); + Object.preventExtensions(funObj); + + funObj[0] = 12; + return preCheck && !funObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-4.js index 8eae2c7c1b..37f460b2f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-4.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-4.js - * @description Object.preventExtensions - indexed properties cannot be added into an Array object - */ - - -function testcase() { - var arrObj = []; - var preCheck = Object.isExtensible(arrObj); - Object.preventExtensions(arrObj); - - arrObj[0] = 12; - return preCheck && !arrObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-4 +description: > + Object.preventExtensions - indexed properties cannot be added into + an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + var preCheck = Object.isExtensible(arrObj); + Object.preventExtensions(arrObj); + + arrObj[0] = 12; + return preCheck && !arrObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5-1.js index fc6361bf3f..7e4eb889d8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5-1.js - * @description Object.preventExtensions - indexed properties cannot be added into a String object - */ - - -function testcase() { - var strObj = new String("bbq"); - var preCheck = Object.isExtensible(strObj); - Object.preventExtensions(strObj); - - strObj[10] = 12; - return preCheck && !strObj.hasOwnProperty("10"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-5-1 +description: > + Object.preventExtensions - indexed properties cannot be added into + a String object +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String("bbq"); + var preCheck = Object.isExtensible(strObj); + Object.preventExtensions(strObj); + + strObj[10] = 12; + return preCheck && !strObj.hasOwnProperty("10"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5.js index a07b18feef..340ecfc1be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5.js - * @description Object.preventExtensions - indexed properties cannot be added into a String object - */ - - -function testcase() { - var strObj = new String(); - var preCheck = Object.isExtensible(strObj); - Object.preventExtensions(strObj); - try { - Object.defineProperty(strObj, "0", { value: "c" }); - return false; - } catch (e) { - return e instanceof TypeError && preCheck && - !strObj.hasOwnProperty("0") && typeof strObj[0] === "undefined"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-5 +description: > + Object.preventExtensions - indexed properties cannot be added into + a String object +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String(); + var preCheck = Object.isExtensible(strObj); + Object.preventExtensions(strObj); + try { + Object.defineProperty(strObj, "0", { value: "c" }); + return false; + } catch (e) { + return e instanceof TypeError && preCheck && + !strObj.hasOwnProperty("0") && typeof strObj[0] === "undefined"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-6.js index 63e15e5317..fa0376fb7c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-6.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-6.js - * @description Object.preventExtensions - indexed properties cannot be added into a Boolean object - */ - - -function testcase() { - var boolObj = new Boolean(true); - var preCheck = Object.isExtensible(boolObj); - Object.preventExtensions(boolObj); - - boolObj[0] = 12; - return preCheck && !boolObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-6 +description: > + Object.preventExtensions - indexed properties cannot be added into + a Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + var boolObj = new Boolean(true); + var preCheck = Object.isExtensible(boolObj); + Object.preventExtensions(boolObj); + + boolObj[0] = 12; + return preCheck && !boolObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-7.js index b23297487e..3fe5982511 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-7.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-7.js - * @description Object.preventExtensions - indexed properties cannot be added into a Number object - */ - - -function testcase() { - var numObj = new Number(123); - var preCheck = Object.isExtensible(numObj); - Object.preventExtensions(numObj); - - numObj[0] = 12; - return preCheck && !numObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-7 +description: > + Object.preventExtensions - indexed properties cannot be added into + a Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + var numObj = new Number(123); + var preCheck = Object.isExtensible(numObj); + Object.preventExtensions(numObj); + + numObj[0] = 12; + return preCheck && !numObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-8.js index 4fb83988a7..361996981e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-8.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-8.js - * @description Object.preventExtensions - indexed properties cannot be added into a Date object - */ - - -function testcase() { - var dateObj = new Date(); - var preCheck = Object.isExtensible(dateObj); - Object.preventExtensions(dateObj); - - dateObj[0] = 12; - return preCheck && !dateObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-8 +description: > + Object.preventExtensions - indexed properties cannot be added into + a Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateObj = new Date(); + var preCheck = Object.isExtensible(dateObj); + Object.preventExtensions(dateObj); + + dateObj[0] = 12; + return preCheck && !dateObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-9.js index e433b4182f..c13e065a22 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-9.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-9.js - * @description Object.preventExtensions - indexed properties cannot be added into a RegExp object - */ - - -function testcase() { - var regObj = new RegExp(); - var preCheck = Object.isExtensible(regObj); - Object.preventExtensions(regObj); - - regObj[0] = 12; - return preCheck && !regObj.hasOwnProperty("0"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.10-3-9 +description: > + Object.preventExtensions - indexed properties cannot be added into + a RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + var preCheck = Object.isExtensible(regObj); + Object.preventExtensions(regObj); + + regObj[0] = 12; + return preCheck && !regObj.hasOwnProperty("0"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js index c6a58865ea..2df5a12930 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js - * @description Object.isSealed must exist as a function - */ - - -function testcase() { - var f = Object.isSealed; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-0-1 +description: Object.isSealed must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.isSealed; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js index f9ee123a6c..676b20f6c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js - * @description Object.isSealed must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.isSealed.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-0-2 +description: Object.isSealed must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.isSealed.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js index 0df7b44214..59d4830b0a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js - * @description Object.isSealed throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.isSealed(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-1 +description: > + Object.isSealed throws TypeError if type of first param is not + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isSealed(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js index 1cab51634f..0172abc957 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js - * @description Object.isSealed returns false for all built-in objects (Global) - */ - - -function testcase() { - // in non-strict mode, 'this' is bound to the global object. - var b = Object.isSealed(this); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-1 +description: Object.isSealed returns false for all built-in objects (Global) +includes: [runTestCase.js] +---*/ + +function testcase() { + // in non-strict mode, 'this' is bound to the global object. + var b = Object.isSealed(this); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js index bf9505f150..ec212ae968 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js - * @description Object.isSealed returns false for all built-in objects (Boolean) - */ - - -function testcase() { - var b = Object.isSealed(Boolean); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-10 +description: Object.isSealed returns false for all built-in objects (Boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Boolean); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js index f59e38033a..c585a2b172 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js - * @description Object.isSealed returns false for all built-in objects (Boolean.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Boolean.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-11 +description: > + Object.isSealed returns false for all built-in objects + (Boolean.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Boolean.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js index 387abd9cb0..b8f2631fe8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js - * @description Object.isSealed returns false for all built-in objects (Number) - */ - - -function testcase() { - var b = Object.isSealed(Number); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-12 +description: Object.isSealed returns false for all built-in objects (Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Number); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js index 34ac27b05b..e0db7b5a9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js - * @description Object.isSealed returns false for all built-in objects (Number.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Number.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-13 +description: > + Object.isSealed returns false for all built-in objects + (Number.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Number.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js index 7f2af07710..13d9e89c1d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js - * @description Object.isSealed returns false for all built-in objects (Math) - */ - - -function testcase() { - var b = Object.isSealed(Math); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-14 +description: Object.isSealed returns false for all built-in objects (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Math); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js index aa6edf99be..f80f0741ab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js - * @description Object.isSealed returns false for all built-in objects (Date) - */ - - -function testcase() { - var b = Object.isSealed(Date); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-15 +description: Object.isSealed returns false for all built-in objects (Date) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Date); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js index 2a69cd4527..a8b00cf081 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js - * @description Object.isSealed returns false for all built-in objects (Date.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Date.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-16 +description: > + Object.isSealed returns false for all built-in objects + (Date.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Date.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js index 4c1ee1de46..e69e2699de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js - * @description Object.isSealed returns false for all built-in objects (RegExp) - */ - - -function testcase() { - var b = Object.isSealed(RegExp); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-17 +description: Object.isSealed returns false for all built-in objects (RegExp) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(RegExp); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js index b9674eb0b6..92acf28143 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js - * @description Object.isSealed returns false for all built-in objects (RegExp.prototype) - */ - - -function testcase() { - var b = Object.isSealed(RegExp.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-18 +description: > + Object.isSealed returns false for all built-in objects + (RegExp.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(RegExp.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js index 1b3d5b5453..366dc334fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js - * @description Object.isSealed returns false for all built-in objects (Error) - */ - - -function testcase() { - var b = Object.isSealed(Error); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-19 +description: Object.isSealed returns false for all built-in objects (Error) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Error); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js index ae248b344f..f3508a9665 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js - * @description Object.isSealed returns false for all built-in objects (Object) - */ - - -function testcase() { - var b = Object.isSealed(Object); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-2 +description: Object.isSealed returns false for all built-in objects (Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Object); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js index 03f9f8dd80..69595c2da6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js - * @description Object.isSealed returns false for all built-in objects (Error.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Error.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-20 +description: > + Object.isSealed returns false for all built-in objects + (Error.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Error.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js index abf27edbd2..e86c37c31b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js - * @description Object.isSealed returns false for all built-in objects (EvalError) - */ - - -function testcase() { - var b = Object.isSealed(EvalError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-21 +description: Object.isSealed returns false for all built-in objects (EvalError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(EvalError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js index c9410e4435..eb931ae870 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js - * @description Object.isSealed returns false for all built-in objects (RangeError) - */ - - -function testcase() { - var b = Object.isSealed(RangeError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-22 +description: Object.isSealed returns false for all built-in objects (RangeError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(RangeError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js index 770249e494..21d2bd8e92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js - * @description Object.isSealed returns false for all built-in objects (ReferenceError) - */ - - -function testcase() { - var b = Object.isSealed(ReferenceError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-23 +description: > + Object.isSealed returns false for all built-in objects + (ReferenceError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(ReferenceError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js index 20d1afef19..dbfda202d6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js - * @description Object.isSealed returns false for all built-in objects (SyntaxError) - */ - - -function testcase() { - var b = Object.isSealed(SyntaxError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-24 +description: > + Object.isSealed returns false for all built-in objects + (SyntaxError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(SyntaxError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js index 4fe323e39d..dfe6b10f1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js - * @description Object.isSealed returns false for all built-in objects (TypeError) - */ - - -function testcase() { - var b = Object.isSealed(TypeError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-25 +description: Object.isSealed returns false for all built-in objects (TypeError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(TypeError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js index 97853c21d0..cf941cf621 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js - * @description Object.isSealed returns false for all built-in objects (URIError) - */ - - -function testcase() { - var b = Object.isSealed(URIError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-26 +description: Object.isSealed returns false for all built-in objects (URIError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(URIError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js index 33dbc58d63..bbfcf8bf45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js - * @description Object.isSealed returns false for all built-in objects (JSON) - */ - - -function testcase() { - var b = Object.isSealed(JSON); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-27 +description: Object.isSealed returns false for all built-in objects (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(JSON); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js index 73cc9daa3f..05d8e877b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js - * @description Object.isSealed returns false for all built-in objects (Object.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Object.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-3 +description: > + Object.isSealed returns false for all built-in objects + (Object.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Object.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js index 4b772d480d..0bed01a192 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js - * @description Object.isSealed returns false for all built-in objects (Function) - */ - - -function testcase() { - var b = Object.isSealed(Function); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-4 +description: Object.isSealed returns false for all built-in objects (Function) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Function); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js index 857d1ecaa6..4c13b900c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js - * @description Object.isSealed returns false for all built-in objects (Function.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Function.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-5 +description: > + Object.isSealed returns false for all built-in objects + (Function.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Function.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js index 636520d06d..36d4c1edfc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js - * @description Object.isSealed returns false for all built-in objects (Array) - */ - - -function testcase() { - var b = Object.isSealed(Array); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-6 +description: Object.isSealed returns false for all built-in objects (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Array); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js index ccfec17543..535041b68f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js - * @description Object.isSealed returns false for all built-in objects (Array.prototype) - */ - - -function testcase() { - var b = Object.isSealed(Array.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-7 +description: > + Object.isSealed returns false for all built-in objects + (Array.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(Array.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js index 25bfcaf5d8..7387d2e316 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js - * @description Object.isSealed returns false for all built-in objects (String) - */ - - -function testcase() { - var b = Object.isSealed(String); - if (b === false) { - return true; - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-8 +description: Object.isSealed returns false for all built-in objects (String) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(String); + if (b === false) { + return true; + } +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js index cebe4c529c..88d24e71b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js - * @description Object.isSealed returns false for all built-in objects (String.prototype) - */ - - -function testcase() { - var b = Object.isSealed(String.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.11-4-9 +description: > + Object.isSealed returns false for all built-in objects + (String.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isSealed(String.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js index 912e74e99c..15da403f6a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js - * @description Object.isFrozen must exist as a function - */ - - -function testcase() { - var f = Object.isFrozen; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-0-1 +description: Object.isFrozen must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.isFrozen; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js index c8d712b8cb..9d6d0bfa0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js - * @description Object.isFrozen must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.isFrozen.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-0-2 +description: Object.isFrozen must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.isFrozen.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js index 4fabb1a91f..eb487d61d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js - * @description Object.isFrozen - TypeError is thrown when the first param 'O' is undefined - */ - - -function testcase() { - try { - Object.isFrozen(undefined); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-1 +description: > + Object.isFrozen - TypeError is thrown when the first param 'O' is + undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isFrozen(undefined); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js index 4942dfd260..018df97e23 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js - * @description Object.isFrozen - TypeError is thrown when the first param 'O' is null - */ - - -function testcase() { - try { - Object.isFrozen(null); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-2 +description: > + Object.isFrozen - TypeError is thrown when the first param 'O' is + null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isFrozen(null); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js index 28cf8a4a78..8aa8f4b162 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js - * @description Object.isFrozen - TypeError is thrown when the first param 'O' is a boolean - */ - - -function testcase() { - try { - Object.isFrozen(true); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-3 +description: > + Object.isFrozen - TypeError is thrown when the first param 'O' is + a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isFrozen(true); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js index f0c379686a..10daea66c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js - * @description Object.isFrozen - TypeError is thrown when the first param 'O' is a string - */ - - -function testcase() { - try { - Object.isFrozen("abc"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-4 +description: > + Object.isFrozen - TypeError is thrown when the first param 'O' is + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isFrozen("abc"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-5.js index 85d67a4f34..8acf7cd5cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-5.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-5.js - * @description Object.isFrozen applies to dense array - */ - - -function testcase() { - var obj = Object.freeze([0, 1, 2]); - return Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-5 +description: Object.isFrozen applies to dense array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = Object.freeze([0, 1, 2]); + return Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-6.js index 9117551825..671b6af935 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-6.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-6.js - * @description Object.isFrozen applies to sparse array - */ - - -function testcase() { - var sparseArr = [0, 1]; - sparseArr[10000] = 10000; - - sparseArr = Object.freeze(sparseArr); - return Object.isFrozen(sparseArr); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-6 +description: Object.isFrozen applies to sparse array +includes: [runTestCase.js] +---*/ + +function testcase() { + var sparseArr = [0, 1]; + sparseArr[10000] = 10000; + + sparseArr = Object.freeze(sparseArr); + return Object.isFrozen(sparseArr); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-7.js index 90ca4a7ecc..8fa8eced92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-7.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-7.js - * @description Object.isFrozen applies to non-array object which contains index named properties - */ - - -function testcase() { - var obj = Object.freeze({ 0: 0, 1: 1, 1000: 1000 }); - return Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1-7 +description: > + Object.isFrozen applies to non-array object which contains index + named properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = Object.freeze({ 0: 0, 1: 1, 1000: 1000 }); + return Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js index 8cefa768eb..d5d8613d5e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js - * @description Object.isFrozen throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.isFrozen(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-1 +description: > + Object.isFrozen throws TypeError if type of first param is not + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isFrozen(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1.js index b44df06560..5bd28b4c28 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1.js - * @description Object.isFrozen - inherited data property is not considered into the for each loop - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "Father", { - value: 10, - writable: false, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.preventExtensions(child); - - return Object.isFrozen(child); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-1 +description: > + Object.isFrozen - inherited data property is not considered into + the for each loop +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "Father", { + value: 10, + writable: false, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.preventExtensions(child); + + return Object.isFrozen(child); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2.js index 55d256e9d1..92132def5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2.js - * @description Object.isFrozen - inherited accessor property is not considered into the for each loop - */ - - -function testcase() { - - var proto = {}; - - function get_func() { - return 10; - } - function set_func() { } - - Object.defineProperty(proto, "Father", { - get: get_func, - set: set_func, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.preventExtensions(child); - - return Object.isFrozen(child); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-2 +description: > + Object.isFrozen - inherited accessor property is not considered + into the for each loop +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + function get_func() { + return 10; + } + function set_func() { } + + Object.defineProperty(proto, "Father", { + get: get_func, + set: set_func, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.preventExtensions(child); + + return Object.isFrozen(child); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-1.js index 6dab6318f3..bf6b42da6a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-1.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-1.js - * @description Object.isFrozen - 'P' is own data property - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 12, - writable: true, - configurable: false - }); - - Object.preventExtensions(obj); - - return !Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-1 +description: Object.isFrozen - 'P' is own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 12, + writable: true, + configurable: false + }); + + Object.preventExtensions(obj); + + return !Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-11.js index bb31a7f1fd..26f1eb6e8c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-11.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-11.js - * @description Object.isFrozen - 'O' is the Arguments object - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - Object.preventExtensions(arg); - return !Object.isFrozen(arg); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-11 +description: Object.isFrozen - 'O' is the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + Object.preventExtensions(arg); + return !Object.isFrozen(arg); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-12.js index fbe9f67064..26089e6229 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-12.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-12.js - * @description Object.isFrozen - 'O' is a String object - */ - - -function testcase() { - - var obj = new String("abc"); - - obj.len = 100; - - Object.preventExtensions(obj); - - return !Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-12 +description: Object.isFrozen - 'O' is a String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new String("abc"); + + obj.len = 100; + + Object.preventExtensions(obj); + + return !Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-13.js index 3d6fbefea4..473834b577 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-13.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-13.js - * @description Object.isFrozen - 'O' is a Function object - */ - - -function testcase() { - - var obj = function () { }; - - Object.defineProperty(obj, "property", { - value: 12, - writable: true, - configurable: false - }); - - Object.preventExtensions(obj); - - return !Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-13 +description: Object.isFrozen - 'O' is a Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function () { }; + + Object.defineProperty(obj, "property", { + value: 12, + writable: true, + configurable: false + }); + + Object.preventExtensions(obj); + + return !Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-14.js index 6c0d93a159..07069f5b6d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-14.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-14.js - * @description Object.isFrozen - 'O' is an Array object - */ - - -function testcase() { - - var obj = [2]; - obj.len = 200; - - Object.preventExtensions(obj); - - return !Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-14 +description: Object.isFrozen - 'O' is an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = [2]; + obj.len = 200; + + Object.preventExtensions(obj); + + return !Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-2.js index 578340ea98..c9d9e23508 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-2.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-2.js - * @description Object.isFrozen - 'P' is own data property that overrides an inherited data property - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "foo", { - value: 9, - writable: false, - configurable: false - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - Object.defineProperty(child, "foo", { - value: 12, - writable: true, - configurable: false - }); - - Object.preventExtensions(child); - return !Object.isFrozen(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-2 +description: > + Object.isFrozen - 'P' is own data property that overrides an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "foo", { + value: 9, + writable: false, + configurable: false + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + Object.defineProperty(child, "foo", { + value: 12, + writable: true, + configurable: false + }); + + Object.preventExtensions(child); + return !Object.isFrozen(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-3.js index e44df47321..eb97c22552 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-3.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-3.js - * @description Object.isFrozen - 'P' is own data property that overrides an inherited accessor property - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 9; - }, - configurable: false - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - - Object.defineProperty(child, "foo", { - value: 12, - configurable: true - }); - - Object.preventExtensions(child); - return !Object.isFrozen(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-3 +description: > + Object.isFrozen - 'P' is own data property that overrides an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 9; + }, + configurable: false + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + + Object.defineProperty(child, "foo", { + value: 12, + configurable: true + }); + + Object.preventExtensions(child); + return !Object.isFrozen(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-4.js index add9d32e7a..bfe5678684 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-4.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-4.js - * @description Object.isFrozen - 'P' is own accessor property - */ - - -function testcase() { - - var obj = {}; - Object.defineProperty(obj, "foo", { - get: function () { - return 9; - }, - configurable: true - }); - - Object.preventExtensions(obj); - return !Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-4 +description: Object.isFrozen - 'P' is own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + Object.defineProperty(obj, "foo", { + get: function () { + return 9; + }, + configurable: true + }); + + Object.preventExtensions(obj); + return !Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-5.js index 3f98198458..0d92cda834 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-5.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-5.js - * @description Object.isFrozen - 'P' is own accessor property that overrides an inherited data property - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "foo", { - value: 12, - configurable: false - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - Object.defineProperty(child, "foo", { - get: function () { - return 9; - }, - configurable: true - }); - - Object.preventExtensions(child); - return !Object.isFrozen(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-5 +description: > + Object.isFrozen - 'P' is own accessor property that overrides an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "foo", { + value: 12, + configurable: false + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + Object.defineProperty(child, "foo", { + get: function () { + return 9; + }, + configurable: true + }); + + Object.preventExtensions(child); + return !Object.isFrozen(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-6.js index 9cb1c9c95d..78d649bd5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-6.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-6.js - * @description Object.isFrozen - 'P' is own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 12; - }, - configurable: false - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - - Object.defineProperty(child, "foo", { - get: function () { - return 9; - }, - configurable: true - }); - - Object.preventExtensions(child); - return !Object.isFrozen(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-6 +description: > + Object.isFrozen - 'P' is own accessor property that overrides an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 12; + }, + configurable: false + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + + Object.defineProperty(child, "foo", { + get: function () { + return 9; + }, + configurable: true + }); + + Object.preventExtensions(child); + return !Object.isFrozen(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-7.js index 03d5c55abb..1d495145cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-7.js - * @description Object.isFrozen - 'P' is own accessor property without a get function - */ - - -function testcase() { - - var obj = {}; - Object.defineProperty(obj, "foo", { - set: function () { }, - configurable: true - }); - - Object.preventExtensions(obj); - return !Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-7 +description: > + Object.isFrozen - 'P' is own accessor property without a get + function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + Object.defineProperty(obj, "foo", { + set: function () { }, + configurable: true + }); + + Object.preventExtensions(obj); + return !Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-8.js index 9d99bf5c54..b604e25c6f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-8.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-8.js - * @description Object.isFrozen - 'P' is own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 9; - }, - configurable: false - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - Object.defineProperty(child, "foo", { - set: function () { }, - configurable: true - }); - - Object.preventExtensions(child); - return !Object.isFrozen(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-a-8 +description: > + Object.isFrozen - 'P' is own accessor property without a get + function that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 9; + }, + configurable: false + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + Object.defineProperty(child, "foo", { + set: function () { }, + configurable: true + }); + + Object.preventExtensions(child); + return !Object.isFrozen(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-b-i-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-b-i-1.js index 9eda988f2e..8fc20dfe93 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-b-i-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-b-i-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-b-i-1.js - * @description Object.isFrozen returns false if 'O' contains own writable data property - */ - - -function testcase() { - - var obj = {}; - Object.defineProperty(obj, "foo", { - value: 20, - writable: true, - configurable: false - }); - Object.preventExtensions(obj); - return !Object.isFrozen(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-b-i-1 +description: > + Object.isFrozen returns false if 'O' contains own writable data + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + Object.defineProperty(obj, "foo", { + value: 20, + writable: true, + configurable: false + }); + Object.preventExtensions(obj); + return !Object.isFrozen(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-1.js index 3db731b6af..73b1c265f5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-1.js - * @description Object.isFrozen returns false if 'O' contains own configurable data property - */ - - -function testcase() { - - var obj = {}; - Object.defineProperty(obj, "foo", { - value: 20, - writable: false, - configurable: true - }); - - Object.preventExtensions(obj); - return !Object.isFrozen(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-c-1 +description: > + Object.isFrozen returns false if 'O' contains own configurable + data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + Object.defineProperty(obj, "foo", { + value: 20, + writable: false, + configurable: true + }); + + Object.preventExtensions(obj); + return !Object.isFrozen(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-2.js index cd0facb65a..7ea5e01d22 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-2.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-2.js - * @description Object.isFrozen returns false if 'O' contains own configurable accessor property - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - function set_func() { } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - configurable: true - }); - - Object.preventExtensions(obj); - return !Object.isFrozen(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-2-c-2 +description: > + Object.isFrozen returns false if 'O' contains own configurable + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + function set_func() { } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + configurable: true + }); + + Object.preventExtensions(obj); + return !Object.isFrozen(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js index f52be604e3..90971e105b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js - * @description Object.isFrozen returns false for all built-in objects (Global) - */ - - -function testcase() { - // in non-strict mode, 'this' is bound to the global object. - var b = Object.isFrozen(this); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-1 +description: Object.isFrozen returns false for all built-in objects (Global) +includes: [runTestCase.js] +---*/ + +function testcase() { + // in non-strict mode, 'this' is bound to the global object. + var b = Object.isFrozen(this); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js index 4777048b29..33a8760566 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js - * @description Object.isFrozen returns false for all built-in objects (Boolean) - */ - - -function testcase() { - var b = Object.isFrozen(Boolean); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-10 +description: Object.isFrozen returns false for all built-in objects (Boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Boolean); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js index 840cb0203d..beef545961 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js - * @description Object.isFrozen returns false for all built-in objects (Boolean.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Boolean.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-11 +description: > + Object.isFrozen returns false for all built-in objects + (Boolean.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Boolean.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js index ae18072e99..28d496b7c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js - * @description Object.isFrozen returns false for all built-in objects (Number) - */ - - -function testcase() { - var b = Object.isFrozen(Number); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-12 +description: Object.isFrozen returns false for all built-in objects (Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Number); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js index 1858cbf3f7..1fe2e9be7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js - * @description Object.isFrozen returns false for all built-in objects (Number.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Number.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-13 +description: > + Object.isFrozen returns false for all built-in objects + (Number.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Number.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js index a94e893f99..fabcfdff6e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js - * @description Object.isFrozen returns false for all built-in objects (Math) - */ - - -function testcase() { - var b = Object.isFrozen(Math); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-14 +description: Object.isFrozen returns false for all built-in objects (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Math); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js index c384a71873..1ade91214d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js - * @description Object.isFrozen returns false for all built-in objects (Date) - */ - - -function testcase() { - var b = Object.isFrozen(Date); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-15 +description: Object.isFrozen returns false for all built-in objects (Date) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Date); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js index 7b8a271981..cc0772e9be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js - * @description Object.isFrozen returns false for all built-in objects (Date.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Date.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-16 +description: > + Object.isFrozen returns false for all built-in objects + (Date.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Date.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js index 791df22b24..8d3e5431b6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js - * @description Object.isFrozen returns false for all built-in objects (RegExp) - */ - - -function testcase() { - var b = Object.isFrozen(RegExp); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-17 +description: Object.isFrozen returns false for all built-in objects (RegExp) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(RegExp); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js index 88969f6b6f..3d9410c0ec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js - * @description Object.isFrozen returns false for all built-in objects (RegExp.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(RegExp.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-18 +description: > + Object.isFrozen returns false for all built-in objects + (RegExp.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(RegExp.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js index 2f81fdc376..c6a1aa74a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js - * @description Object.isFrozen returns false for all built-in objects (Error) - */ - - -function testcase() { - var b = Object.isFrozen(Error); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-19 +description: Object.isFrozen returns false for all built-in objects (Error) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Error); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js index 0cdefefb8d..e51a85752e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js - * @description Object.isFrozen returns false for all built-in objects (Object) - */ - - -function testcase() { - var b = Object.isFrozen(Object); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-2 +description: Object.isFrozen returns false for all built-in objects (Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Object); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js index 124a6b3558..0239c53cd2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js - * @description Object.isFrozen returns false for all built-in objects (Error.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Error.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-20 +description: > + Object.isFrozen returns false for all built-in objects + (Error.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Error.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js index 260edaac4f..68ff77c1bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js - * @description Object.isFrozen returns false for all built-in objects (EvalError) - */ - - -function testcase() { - var b = Object.isFrozen(EvalError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-21 +description: Object.isFrozen returns false for all built-in objects (EvalError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(EvalError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js index 138d117af2..8ba4f9e33f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js - * @description Object.isFrozen returns false for all built-in objects (RangeError) - */ - - -function testcase() { - var b = Object.isFrozen(RangeError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-22 +description: Object.isFrozen returns false for all built-in objects (RangeError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(RangeError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js index c17addab70..e320a27b00 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js - * @description Object.isFrozen returns false for all built-in objects (ReferenceError) - */ - - -function testcase() { - var b = Object.isFrozen(ReferenceError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-23 +description: > + Object.isFrozen returns false for all built-in objects + (ReferenceError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(ReferenceError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js index ac633899a0..32f49d73f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js - * @description Object.isFrozen returns false for all built-in objects (SyntaxError) - */ - - -function testcase() { - var b = Object.isFrozen(SyntaxError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-24 +description: > + Object.isFrozen returns false for all built-in objects + (SyntaxError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(SyntaxError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js index 5d5fa4459f..57345c8fad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js - * @description Object.isFrozen returns false for all built-in objects (TypeError) - */ - - -function testcase() { - var b = Object.isFrozen(TypeError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-25 +description: Object.isFrozen returns false for all built-in objects (TypeError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(TypeError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js index a8a9cc765c..699abeb299 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js - * @description Object.isFrozen returns false for all built-in objects (URIError) - */ - - -function testcase() { - var b = Object.isFrozen(URIError); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-26 +description: Object.isFrozen returns false for all built-in objects (URIError) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(URIError); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js index f1f8d0b38c..30c9e34300 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js - * @description Object.isFrozen returns false for all built-in objects (JSON) - */ - - -function testcase() { - var b = Object.isFrozen(JSON); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-27 +description: Object.isFrozen returns false for all built-in objects (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(JSON); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28.js index 227ec8ddd2..12c7f77e45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28.js - * @description Object.isFrozen returns true when all own properties of 'O' are not writable and not configurable, and 'O' is not extensible - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo1", { - value: 20, - writable: false, - enumerable: false, - configurable: false - }); - - - function get_func() { - return 10; - } - function set_func() { } - - Object.defineProperty(obj, "foo2", { - get: get_func, - set: set_func, - configurable: false - }); - - Object.preventExtensions(obj); - return Object.isFrozen(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-28 +description: > + Object.isFrozen returns true when all own properties of 'O' are + not writable and not configurable, and 'O' is not extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo1", { + value: 20, + writable: false, + enumerable: false, + configurable: false + }); + + + function get_func() { + return 10; + } + function set_func() { } + + Object.defineProperty(obj, "foo2", { + get: get_func, + set: set_func, + configurable: false + }); + + Object.preventExtensions(obj); + return Object.isFrozen(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js index d6ea70c336..ba420e3fbc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js - * @description Object.isFrozen returns false for all built-in objects (Object.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Object.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-3 +description: > + Object.isFrozen returns false for all built-in objects + (Object.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Object.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js index 9ce20b282c..b249a04d43 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js - * @description Object.isFrozen returns false for all built-in objects (Function) - */ - - -function testcase() { - var b = Object.isFrozen(Function); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-4 +description: Object.isFrozen returns false for all built-in objects (Function) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Function); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js index 38e1909423..0bb674cd26 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js - * @description Object.isFrozen returns false for all built-in objects (Function.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Function.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-5 +description: > + Object.isFrozen returns false for all built-in objects + (Function.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Function.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js index 92b12f752c..a1ee2189c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js - * @description Object.isFrozen returns false for all built-in objects (Array) - */ - - -function testcase() { - var b = Object.isFrozen(Array); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-6 +description: Object.isFrozen returns false for all built-in objects (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Array); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js index aefa2a2733..b7560b9252 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js - * @description Object.isFrozen returns false for all built-in objects (Array.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(Array.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-7 +description: > + Object.isFrozen returns false for all built-in objects + (Array.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(Array.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js index 13f2839c02..a9565d209e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js - * @description Object.isFrozen returns false for all built-in objects (String) - */ - - -function testcase() { - var b = Object.isFrozen(String); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-8 +description: Object.isFrozen returns false for all built-in objects (String) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(String); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js index ea08b11eb5..3fc1961e47 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js - * @description Object.isFrozen returns false for all built-in objects (String.prototype) - */ - - -function testcase() { - var b = Object.isFrozen(String.prototype); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-3-9 +description: > + Object.isFrozen returns false for all built-in objects + (String.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Object.isFrozen(String.prototype); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-4-1.js index 7e1adf2fcf..77c22fcb33 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-4-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-4-1.js - * @description Object.isFrozen returns false if extensible is true - */ - - -function testcase() { - return !Object.isFrozen({}); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.12-4-1 +description: Object.isFrozen returns false if extensible is true +includes: [runTestCase.js] +---*/ + +function testcase() { + return !Object.isFrozen({}); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js index a1b8af495e..44f8869c41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js - * @description Object.isExtensible must exist as a function - */ - - -function testcase() { - var f = Object.isExtensible ; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-0-1 +description: Object.isExtensible must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.isExtensible ; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js index 188f3637aa..e1a8648a85 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js - * @description Object.isExtensible must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.isExtensible.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-0-2 +description: Object.isExtensible must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.isExtensible.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js index 580a74bc31..d2b1d42666 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * A newly created object using the Object contructor has its [[Extensible]] - * property set to true by default (15.2.2.1, step 8). - * - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js - * @description Object.isExtensible is true for objects created using the Object constructor - */ - - -function testcase() { - var o = new Object(); - - if (Object.isExtensible(o) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + A newly created object using the Object contructor has its [[Extensible]] + property set to true by default (15.2.2.1, step 8). +es5id: 15.2.3.13-0-3 +description: > + Object.isExtensible is true for objects created using the Object + constructor +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = new Object(); + + if (Object.isExtensible(o) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js index 2f56bab0d2..d2e08fd877 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js - * @description Object.isExtensible throws TypeError if 'O' is undefined - */ - - -function testcase() { - - try { - Object.isExtensible(undefined); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-1-1 +description: Object.isExtensible throws TypeError if 'O' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.isExtensible(undefined); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js index bcd5f71093..fa3ae98f2a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js - * @description Object.isExtensible throws TypeError if 'O' is null - */ - - -function testcase() { - - try { - Object.isExtensible(null); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-1-2 +description: Object.isExtensible throws TypeError if 'O' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.isExtensible(null); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js index b1dbdac423..9316d317c8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js - * @description Object.isExtensible throws TypeError if 'O' is a boolean - */ - - -function testcase() { - - try { - Object.isExtensible(true); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-1-3 +description: Object.isExtensible throws TypeError if 'O' is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.isExtensible(true); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js index a631c7f67f..92ec1162be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js - * @description Object.isExtensible throws TypeError if 'O' is a string - */ - - -function testcase() { - - try { - Object.isExtensible("abc"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-1-4 +description: Object.isExtensible throws TypeError if 'O' is a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.isExtensible("abc"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js index 40b06312a0..fa43536bec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js - * @description Object.isExtensible throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.isExtensible(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-1 +description: > + Object.isExtensible throws TypeError if type of first param is not + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.isExtensible(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js index db28c866a2..f8b10b8cc9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js - * @description Object.isExtensible returns true for all built-in objects (Global) - */ - -global = this; -function testcase() { - // in non-strict mode, 'this' is bound to the global object. - var e = Object.isExtensible(this); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-1 +description: Object.isExtensible returns true for all built-in objects (Global) +includes: [runTestCase.js] +---*/ + +global = this; +function testcase() { + // in non-strict mode, 'this' is bound to the global object. + var e = Object.isExtensible(this); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js index be96e68f7e..87b449522a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js - * @description Object.isExtensible returns true for all built-in objects (RegExp) - */ - - -function testcase() { - var e = Object.isExtensible(RegExp); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-10 +description: Object.isExtensible returns true for all built-in objects (RegExp) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(RegExp); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js index 02e67cabe2..ed81b43878 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js - * @description Object.isExtensible returns true for all built-in objects (Error) - */ - - -function testcase() { - var e = Object.isExtensible(Error); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-11 +description: Object.isExtensible returns true for all built-in objects (Error) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Error); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js index 03fe353833..ee2e3a601c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js - * @description Object.isExtensible returns true for all built-in objects (JSON) - */ - - -function testcase() { - var e = Object.isExtensible(JSON); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-12 +description: Object.isExtensible returns true for all built-in objects (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(JSON); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js index 48199f682f..8ebeea0593 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js - * @description Object.isExtensible returns true for all built-in objects (Function.constructor) - */ - - -function testcase() { - var e = Object.isExtensible(Function.constructor); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-13 +description: > + Object.isExtensible returns true for all built-in objects + (Function.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Function.constructor); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js index ce00b68936..99cef849d7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js - * @description Object.isExtensible returns true for all built-in objects (Function.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(Function.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-14 +description: > + Object.isExtensible returns true for all built-in objects + (Function.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Function.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js index dffd187d24..52cfcdb87f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js - * @description Object.isExtensible returns true for all built-in objects (Array.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(Array.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-15 +description: > + Object.isExtensible returns true for all built-in objects + (Array.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Array.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js index 787f80d9f7..7ad63e6624 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js - * @description Object.isExtensible returns true for all built-in objects (String.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(String.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-16 +description: > + Object.isExtensible returns true for all built-in objects + (String.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(String.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js index b08e5b31d8..d3cbe33268 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js - * @description Object.isExtensible returns true for all built-in objects (Boolean.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(Boolean.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-17 +description: > + Object.isExtensible returns true for all built-in objects + (Boolean.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Boolean.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js index eba3315479..3e40da46f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js - * @description Object.isExtensible returns true for all built-in objects (Number.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(Number.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-18 +description: > + Object.isExtensible returns true for all built-in objects + (Number.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Number.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js index 1d03541fa3..974e2b790a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js - * @description Object.isExtensible returns true for all built-in objects (Date.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(Date.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-19 +description: > + Object.isExtensible returns true for all built-in objects + (Date.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Date.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js index bb7295b87e..966dd81a23 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js - * @description Object.isExtensible returns true for all built-in objects (Object) - */ - - -function testcase() { - var o = {}; - var e = Object.isExtensible(o); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-2 +description: Object.isExtensible returns true for all built-in objects (Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + var e = Object.isExtensible(o); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js index 6c927bbf3d..40f34d5154 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js - * @description Object.isExtensible returns true for all built-in objects (RegExp.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(RegExp.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-20 +description: > + Object.isExtensible returns true for all built-in objects + (RegExp.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(RegExp.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js index 4d136e7454..fc4544f701 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Function.constructor - * Function.prototype - * Array.prototype - * String.prototype - * Boolean.prototype - * Number.prototype - * Date.prototype - * RegExp.prototype - * Error.prototype - * - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js - * @description Object.isExtensible returns true for all built-in objects (Error.prototype) - */ - - -function testcase() { - var e = Object.isExtensible(Error.prototype); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Function.constructor + Function.prototype + Array.prototype + String.prototype + Boolean.prototype + Number.prototype + Date.prototype + RegExp.prototype + Error.prototype +es5id: 15.2.3.13-2-21 +description: > + Object.isExtensible returns true for all built-in objects + (Error.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Error.prototype); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-22.js index 924b3537ff..9d1fb6ef31 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-22.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-22.js - * @description Object.isExtensible returns true if 'O' is extensible - */ - - -function testcase() { - - var obj = {}; - return Object.isExtensible(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-22 +description: Object.isExtensible returns true if 'O' is extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + return Object.isExtensible(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-23.js index 1b58c388f9..e6be643aaf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-23.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-23.js - * @description Object.isExtensible returns false if 'O' is not extensible - */ - - -function testcase() { - - var obj = {}; - Object.preventExtensions(obj); - return !Object.isExtensible(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-23 +description: Object.isExtensible returns false if 'O' is not extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + Object.preventExtensions(obj); + return !Object.isExtensible(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-24.js index 02c0673c98..2c2b820953 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-24.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-24.js - * @description Object.isExtensible returns true if O is extensible and has a prototype that is extensible - */ - - -function testcase() { - - var proto = {}; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var obj = new ConstructFun(); - - return Object.isExtensible(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-24 +description: > + Object.isExtensible returns true if O is extensible and has a + prototype that is extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var obj = new ConstructFun(); + + return Object.isExtensible(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-25.js index bc53a5a829..4cd5a90be6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-25.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-25.js - * @description Object.isExtensible returns true if O is extensible and has a prototype that is not extensible - */ - - -function testcase() { - - var proto = {}; - Object.preventExtensions(proto); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var obj = new ConstructFun(); - - return Object.isExtensible(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-25 +description: > + Object.isExtensible returns true if O is extensible and has a + prototype that is not extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.preventExtensions(proto); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var obj = new ConstructFun(); + + return Object.isExtensible(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-26.js index a1f3cec592..da10f15667 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-26.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-26.js - * @description Object.isExtensible returns false if O is not extensible and has a prototype that is extensible - */ - - -function testcase() { - - var proto = {}; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - - Object.preventExtensions(obj); - - return !Object.isExtensible(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-26 +description: > + Object.isExtensible returns false if O is not extensible and has a + prototype that is extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + + Object.preventExtensions(obj); + + return !Object.isExtensible(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-27.js index baad65259d..aeca6b4ac2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-27.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-27.js - * @description Object.isExtensible returns false if O is not extensible and has a prototype that is not extensible - */ - - -function testcase() { - - var proto = {}; - Object.preventExtensions(proto); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var obj = new ConstructFun(); - Object.preventExtensions(obj); - - return !Object.isExtensible(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-27 +description: > + Object.isExtensible returns false if O is not extensible and has a + prototype that is not extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.preventExtensions(proto); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var obj = new ConstructFun(); + Object.preventExtensions(obj); + + return !Object.isExtensible(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-29.js index 1c9d43da47..078e50a7f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-29.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-29.js - * @description Object.isExtensible returns true for the global object - */ - - -function testcase() { - - return Object.isExtensible(fnGlobalObject()); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-29 +description: Object.isExtensible returns true for the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + return Object.isExtensible(fnGlobalObject()); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js index c7bfad6943..4b71cbde58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js - * @description Object.isExtensible returns true for all built-in objects (Function) - */ - - -function testcase() { - function foo() {} - - var e = Object.isExtensible(foo); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-3 +description: > + Object.isExtensible returns true for all built-in objects + (Function) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() {} + + var e = Object.isExtensible(foo); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js index ac43ea3d9f..f668712a13 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js - * @description Object.isExtensible returns true for all built-in objects (Array) - */ - - -function testcase() { - var e = Object.isExtensible(Array); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-4 +description: Object.isExtensible returns true for all built-in objects (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Array); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js index 0ea55b88a0..22c507c8df 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js - * @description Object.isExtensible returns true for all built-in objects (String) - */ - - -function testcase() { - var e = Object.isExtensible(String); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-5 +description: Object.isExtensible returns true for all built-in objects (String) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(String); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js index affa220752..5fe983b992 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js - * @description Object.isExtensible returns true for all built-in objects (Boolean) - */ - - -function testcase() { - var e = Object.isExtensible(Boolean); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-6 +description: Object.isExtensible returns true for all built-in objects (Boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Boolean); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js index 17f6d8b5e9..b63398f90a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js - * @description Object.isExtensible returns true for all built-in objects (Number) - */ - - -function testcase() { - var e = Object.isExtensible(Number); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-7 +description: Object.isExtensible returns true for all built-in objects (Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Number); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js index 551f0bc443..078cd018c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js - * @description Object.isExtensible returns true for all built-in objects (Math) - */ - - -function testcase() { - var e = Object.isExtensible(Math); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-8 +description: Object.isExtensible returns true for all built-in objects (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Math); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js index bb85ed6bbd..c959e61f21 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js - * @description Object.isExtensible returns true for all built-in objects (Date) - */ - - -function testcase() { - var e = Object.isExtensible(Date); - if (e === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.13-2-9 +description: Object.isExtensible returns true for all built-in objects (Date) +includes: [runTestCase.js] +---*/ + +function testcase() { + var e = Object.isExtensible(Date); + if (e === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js index 05491bd71c..55ee2477a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js - * @description Object.keys must exist as a function - */ - - -function testcase() { - var f = Object.keys; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-0-1 +description: Object.keys must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.keys; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js index 6ddc02a0fc..7509f8003d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js - * @description Object.keys must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.keys.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-0-2 +description: Object.keys must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.keys.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js index 68d0af18c0..0bb775e506 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js - * @description Object.keys throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.keys(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-1-1 +description: Object.keys throws TypeError if type of first param is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js index 7dce96b701..dee6257973 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js - * @description Object.keys throws TypeError if type of first param is not Object (boolean) - */ - - -function testcase() { - try { - Object.keys(true); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-1-2 +description: > + Object.keys throws TypeError if type of first param is not Object + (boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(true); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js index 191a34d431..33a1eedfbc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js - * @description Object.keys throws TypeError if type of first param is not Object (string) - */ - - -function testcase() { - try { - Object.keys('abc'); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-1-3 +description: > + Object.keys throws TypeError if type of first param is not Object + (string) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys('abc'); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js index 49a5c500bc..72d98165c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js - * @description Object.keys throws TypeError if type of first param is not Object (null) - */ - - -function testcase() { - try { - Object.keys(null); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-1-4 +description: > + Object.keys throws TypeError if type of first param is not Object + (null) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(null); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js index 9bc567b4b0..d119f22839 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js - * @description Object.keys throws TypeError if type of first param is not Object (undefined) - */ - - -function testcase() { - try { - Object.keys(undefined); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-1-5 +description: > + Object.keys throws TypeError if type of first param is not Object + (undefined) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.keys(undefined); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js index 9f4bd02b07..75086cf4c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js - * @description Object.keys returns the standard built-in Array - */ - - -function testcase() { - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - if (Array.isArray(a) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-1 +description: Object.keys returns the standard built-in Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Array.isArray(a) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js index 2169d1d48e..31fb7c1e82 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js - * @description Object.keys returns the standard built-in Array (check [[Class]] - */ - - -function testcase() { - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - var s = Object.prototype.toString.call(a); - if (s === '[object Array]') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-2 +description: Object.keys returns the standard built-in Array (check [[Class]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + var s = Object.prototype.toString.call(a); + if (s === '[object Array]') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js index 0dfbe1a7aa..e285432965 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js - * @description Object.keys returns the standard built-in Array (Array overridden) - */ - - -function testcase() { - function Array() { } - - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - - var s = Object.prototype.toString.call(a); - if (s === '[object Array]') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-3 +description: Object.keys returns the standard built-in Array (Array overridden) +includes: [runTestCase.js] +---*/ + +function testcase() { + function Array() { } + + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + + var s = Object.prototype.toString.call(a); + if (s === '[object Array]') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js index 9ce80ed944..48d2dc3262 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js - * @description Object.keys returns the standard built-in Array that is extensible - */ - - -function testcase() { - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - if (Object.isExtensible(a) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-4 +description: Object.keys returns the standard built-in Array that is extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Object.isExtensible(a) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js index 0469d5a97a..4555fadc11 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js - * @description Object.keys returns the standard built-in Array that is not sealed - */ - - -function testcase() { - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - if (Object.isSealed(a) === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-5 +description: Object.keys returns the standard built-in Array that is not sealed +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Object.isSealed(a) === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js index 196835023e..14b6fc3231 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js - * @description Object.keys returns the standard built-in Array that is not frozen - */ - - -function testcase() { - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - if (Object.isFrozen(a) === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-6 +description: Object.keys returns the standard built-in Array that is not frozen +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (Object.isFrozen(a) === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js index e8611c9ee8..237b8a82ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js - * @description Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable data or accessor properties - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop1", { - value: 1001, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "prop2", { - get: function () { - return 1002; - }, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - return arr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-7 +description: > + Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable + data or accessor properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop1", { + value: 1001, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "prop2", { + get: function () { + return 1002; + }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js index f104f7ed4d..5119463684 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js - * @description Object.keys - 'n' is the correct value when enumerable properties exist in 'O' - */ - - -function testcase() { - var obj = { - prop1: 1001, - prop2: function () { - return 1002; - } - }; - - Object.defineProperty(obj, "prop3", { - value: 1003, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "prop4", { - get: function () { - return 1004; - }, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - return (arr.length === 2) && (arr[0] === "prop1") && (arr[1] === "prop2"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-2-8 +description: > + Object.keys - 'n' is the correct value when enumerable properties + exist in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + prop1: 1001, + prop2: function () { + return 1002; + } + }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + get: function () { + return 1004; + }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + return (arr.length === 2) && (arr[0] === "prop1") && (arr[1] === "prop2"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js index 760e7edfd2..e2d5951cc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js - * @description Object.keys returns the standard built-in Array containing own enumerable properties - */ - - -function testcase() { - var o = { x: 1, y: 2}; - - var a = Object.keys(o); - if (a.length === 2 && - a[0] === 'x' && - a[1] === 'y') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-1 +description: > + Object.keys returns the standard built-in Array containing own + enumerable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = { x: 1, y: 2}; + + var a = Object.keys(o); + if (a.length === 2 && + a[0] === 'x' && + a[1] === 'y') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js index f22b320bba..e97aa5ff39 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js - * @description Object.keys returns the standard built-in Array containing own enumerable properties (function) - */ - - -function testcase() { - function foo() {} - foo.x = 1; - - var a = Object.keys(foo); - if (a.length === 1 && - a[0] === 'x') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-2 +description: > + Object.keys returns the standard built-in Array containing own + enumerable properties (function) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() {} + foo.x = 1; + + var a = Object.keys(foo); + if (a.length === 1 && + a[0] === 'x') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js index e12f7b0224..ffcbb13c1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js - * @description Object.keys returns the standard built-in Array containing own enumerable properties (array) - */ - - -function testcase() { - var o = [1, 2]; - var a = Object.keys(o); - if (a.length === 2 && - a[0] === '0' && - a[1] === '1') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-3 +description: > + Object.keys returns the standard built-in Array containing own + enumerable properties (array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = [1, 2]; + var a = Object.keys(o); + if (a.length === 2 && + a[0] === '0' && + a[1] === '1') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js index d998bb0ef7..778d03a503 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js - * @description Object.keys of an arguments object returns the indices of the given arguments - */ -function testcase() { - function testArgs2(x, y, z) { - // Properties of the arguments object are enumerable. - var a = Object.keys(arguments); - if (a.length === 2 && a[0] in arguments && a[1] in arguments) - return true; - } - function testArgs3(x, y, z) { - // Properties of the arguments object are enumerable. - var a = Object.keys(arguments); - if (a.length === 3 && a[0] in arguments && a[1] in arguments && a[2] in arguments) - return true; - } - function testArgs4(x, y, z) { - // Properties of the arguments object are enumerable. - var a = Object.keys(arguments); - if (a.length === 4 && a[0] in arguments && a[1] in arguments && a[2] in arguments && a[3] in arguments) - return true; - } - return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-4 +description: > + Object.keys of an arguments object returns the indices of the + given arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + function testArgs2(x, y, z) { + // Properties of the arguments object are enumerable. + var a = Object.keys(arguments); + if (a.length === 2 && a[0] in arguments && a[1] in arguments) + return true; + } + function testArgs3(x, y, z) { + // Properties of the arguments object are enumerable. + var a = Object.keys(arguments); + if (a.length === 3 && a[0] in arguments && a[1] in arguments && a[2] in arguments) + return true; + } + function testArgs4(x, y, z) { + // Properties of the arguments object are enumerable. + var a = Object.keys(arguments); + if (a.length === 4 && a[0] in arguments && a[1] in arguments && a[2] in arguments && a[3] in arguments) + return true; + } + return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js index 1f2c71d549..3527e8a8f5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js @@ -1,21 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js - * @description Object.keys must return a fresh array on each invocation - */ - - -function testcase() { - var literal = {a: 1}; - var keysBefore = Object.keys(literal); - if (keysBefore[0] != 'a') return false; - keysBefore[0] = 'x'; - var keysAfter = Object.keys(literal); - return (keysBefore[0] == 'x') && (keysAfter[0] == 'a'); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-5 +description: Object.keys must return a fresh array on each invocation +includes: [runTestCase.js] +---*/ + +function testcase() { + var literal = {a: 1}; + var keysBefore = Object.keys(literal); + if (keysBefore[0] != 'a') return false; + keysBefore[0] = 'x'; + var keysAfter = Object.keys(literal); + return (keysBefore[0] == 'x') && (keysAfter[0] == 'a'); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js index 0e4044f5d2..a428719413 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js - * @description Object.keys - returns the standard built-in Array (instanceof Array) - */ - - -function testcase() { - var obj = {}; - - var arr = Object.keys(obj); - - return arr instanceof Array; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-6 +description: > + Object.keys - returns the standard built-in Array (instanceof + Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var arr = Object.keys(obj); + + return arr instanceof Array; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js index 8236ae44e2..4c0a998b4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js - * @description Object.keys - length of the returned array equals the number of own enumerable properties of 'O' - */ - - -function testcase() { - var obj = { prop1: 1001, prop2: 1002 }; - - Object.defineProperty(obj, "prop3", { - value: 1003, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "prop4", { - get: function () { - return 1003; - }, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - return arr.length === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-3-7 +description: > + Object.keys - length of the returned array equals the number of + own enumerable properties of 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001, prop2: 1002 }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + get: function () { + return 1003; + }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.length === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js index 3deffaea32..efc4c895d8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js - * @description Object.keys - elements of the returned array start from index 0 - */ - - -function testcase() { - var obj = { prop1: 1001, prop2: 1002 }; - - Object.defineProperty(obj, "prop3", { - value: 1003, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "prop4", { - get: function () { - return 1003; - }, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - return arr.hasOwnProperty(0) && arr[0] === "prop1"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-4-1 +description: Object.keys - elements of the returned array start from index 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001, prop2: 1002 }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + get: function () { + return 1003; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop1"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js index cb754c44bd..64221a1b88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js - * @description Object.keys - own enumerable data property of 'O' is defined in returned array - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "prop", { - value: 1003, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - return arr.hasOwnProperty(0) && arr[0] === "prop"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-1 +description: > + Object.keys - own enumerable data property of 'O' is defined in + returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "prop", { + value: 1003, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js index d8a381d479..142845c6c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js - * @description Object.keys - inherted enumerable accessor property that is over-ridden by non-enumerable own accessor property is not defined in returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { }, - enumerable: true, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - get: function () { }, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "prop") { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-10 +description: > + Object.keys - inherted enumerable accessor property that is + over-ridden by non-enumerable own accessor property is not defined + in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { }, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js index 54b407eb47..3a9a18ebdf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js - * @description Object.keys - own enumerable indexed data property of dense array 'O' is defined in returned array - */ - - -function testcase() { - var obj = [1, 2, 3, 4, 5]; - - var arr = Object.keys(obj); - - var initValue = 0; - for (var p in arr) { - if (arr.hasOwnProperty(p)) { - if (arr[p] !== initValue.toString()) { - return false; - } - initValue++; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-11 +description: > + Object.keys - own enumerable indexed data property of dense array + 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [1, 2, 3, 4, 5]; + + var arr = Object.keys(obj); + + var initValue = 0; + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] !== initValue.toString()) { + return false; + } + initValue++; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js index 104d6c3c88..5c114f1612 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js - * @description Object.keys - own enumerable indexed accessor property of dense array 'O' is defined in returned array - */ - - -function testcase() { - var obj = [2, 3, 4, 5]; - - Object.defineProperty(obj, "prop", { - get: function () { - return 6; - }, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr.hasOwnProperty(p)) { - if (arr[p] === "prop") { - return true; - } - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-12 +description: > + Object.keys - own enumerable indexed accessor property of dense + array 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [2, 3, 4, 5]; + + Object.defineProperty(obj, "prop", { + get: function () { + return 6; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] === "prop") { + return true; + } + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js index 4d723e82d8..7ff4ddc17c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js - * @description Object.keys - own enumerable indexed data property of sparse array 'O' is defined in returned array - */ - - -function testcase() { - var obj = [1, , 3, , 5]; - - Object.defineProperty(obj, 5, { - value: 7, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, 10000, { - value: "ElementWithLargeIndex", - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - var index; - var initValue = 0; - for (index = 0; index < 3; index++) { - if (arr[index] !== initValue.toString()) { - return false; - } - initValue += 2; - } - - if (arr.length !== 4 || arr[3] !== "10000") { - return false; - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-13 +description: > + Object.keys - own enumerable indexed data property of sparse array + 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [1, , 3, , 5]; + + Object.defineProperty(obj, 5, { + value: 7, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, 10000, { + value: "ElementWithLargeIndex", + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + var index; + var initValue = 0; + for (index = 0; index < 3; index++) { + if (arr[index] !== initValue.toString()) { + return false; + } + initValue += 2; + } + + if (arr.length !== 4 || arr[3] !== "10000") { + return false; + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js index cb42e6a3a0..4f195f1ce1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js - * @description Object.keys - own enumerable indexed accessor property of sparse array 'O' is defined in returned array - */ - - -function testcase() { - var obj = [1, , 3, , 5]; - - Object.defineProperty(obj, "10000", { - get: function () { - return "ElementWithLargeIndex"; - }, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "10000") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-14 +description: > + Object.keys - own enumerable indexed accessor property of sparse + array 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = [1, , 3, , 5]; + + Object.defineProperty(obj, "10000", { + get: function () { + return "ElementWithLargeIndex"; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "10000") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js index b167504392..8ecba84a00 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js - * @description Object.keys - own enumerable indexed data property of String object 'O' is defined in returned array - */ - - -function testcase() { - var obj = new String("xyz"); - obj[-20] = -20; - obj[20] = 20; - - Object.defineProperty(obj, "prop", { - value: 1003, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var i = 0; i < arr.length; i++) { - if (!obj.hasOwnProperty(arr[i])) { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-15 +description: > + Object.keys - own enumerable indexed data property of String + object 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new String("xyz"); + obj[-20] = -20; + obj[20] = 20; + + Object.defineProperty(obj, "prop", { + value: 1003, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var i = 0; i < arr.length; i++) { + if (!obj.hasOwnProperty(arr[i])) { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js index 835398932a..69a46bb9ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js - * @description Object.keys - own enumerable indexed accessor property of String object 'O' is defined in returned array - */ - - -function testcase() { - var obj = new String("xyz"); - obj[-20] = -20; - obj[20] = 20; - - Object.defineProperty(obj, "prop1", { - get: function () { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(obj, "prop2", { - get: function () { }, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var i = 0; i < arr.length; i++) { - if (!obj.hasOwnProperty(arr[i])) { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-16 +description: > + Object.keys - own enumerable indexed accessor property of String + object 'O' is defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new String("xyz"); + obj[-20] = -20; + obj[20] = 20; + + Object.defineProperty(obj, "prop1", { + get: function () { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(obj, "prop2", { + get: function () { }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var i = 0; i < arr.length; i++) { + if (!obj.hasOwnProperty(arr[i])) { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js index 52a0f0be72..5b980270e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js - * @description Object.keys - own enumerable accessor property of 'O' is defined in returned array - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "prop", { - get: function () { - return 1003; - }, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - return arr.hasOwnProperty(0) && arr[0] === "prop"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-2 +description: > + Object.keys - own enumerable accessor property of 'O' is defined + in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "prop", { + get: function () { + return 1003; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js index b04517d1bc..43e48e3143 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js - * @description Object.keys - non-enumerable own data property of 'O' is not defined in returned array - */ - - -function testcase() { - var obj = { prop1: 1001, prop2: 1002 }; - - Object.defineProperty(obj, "prop3", { - value: 1003, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "prop4", { - value: 1004, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr.hasOwnProperty(p)) { - if (arr[p] === "prop4") { - return false; - } - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-3 +description: > + Object.keys - non-enumerable own data property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001, prop2: 1002 }; + + Object.defineProperty(obj, "prop3", { + value: 1003, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "prop4", { + value: 1004, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] === "prop4") { + return false; + } + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js index 6f343ed6af..1a06a92783 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js - * @description Object.keys - non-enumerable own accessor property of 'O' is not defined in returned array - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop1", { - get: function () { }, - enumerable: true, - configurable: true - }); - Object.defineProperty(obj, "prop2", { - get: function () { }, - enumerable: false, - configurable: true - }); - Object.defineProperty(obj, "prop3", { - get: function () { }, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr.hasOwnProperty(p)) { - if (arr[p] === "prop2") { - return false; - } - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-4 +description: > + Object.keys - non-enumerable own accessor property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop1", { + get: function () { }, + enumerable: true, + configurable: true + }); + Object.defineProperty(obj, "prop2", { + get: function () { }, + enumerable: false, + configurable: true + }); + Object.defineProperty(obj, "prop3", { + get: function () { }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr.hasOwnProperty(p)) { + if (arr[p] === "prop2") { + return false; + } + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js index 1eca1c7516..16c7a560b5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js - * @description Object.keys - inherited enumerable data property of 'O' is not defined in returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "inheritedProp", { - value: 1003, - enumerable: true, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - obj.prop = 1004; - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "inheritedProp") { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-5 +description: > + Object.keys - inherited enumerable data property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "inheritedProp", { + value: 1003, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + obj.prop = 1004; + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "inheritedProp") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js index 246248fd97..a1c8a4f491 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js - * @description Object.keys - inherited enumerable accessor property of 'O' is not defined in returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "inheritedProp", { - get: function () { - return 1003; - }, - enumerable: true, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - get: function () { - return 1004; - }, - enumerable: true, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "inheritedProp") { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-6 +description: > + Object.keys - inherited enumerable accessor property of 'O' is not + defined in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "inheritedProp", { + get: function () { + return 1003; + }, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { + return 1004; + }, + enumerable: true, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "inheritedProp") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js index 09ccb04b10..1b278d58c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js - * @description Object.keys - inherted enumerable data property that is over-ridden by non-enumerable own data property is not defined in returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - value: 1003, - enumerable: true, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - value: 1004, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "prop") { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-7 +description: > + Object.keys - inherted enumerable data property that is + over-ridden by non-enumerable own data property is not defined in + returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 1003, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + value: 1004, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js index 30fa15d773..747f037a5a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js - * @description Object.keys - inherted enumerable data property that is over-ridden by non-enumerable own accessor property is not defined in returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - value: 1003, - enumerable: true, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - get: function () { }, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "prop") { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-8 +description: > + Object.keys - inherted enumerable data property that is + over-ridden by non-enumerable own accessor property is not defined + in returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 1003, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { }, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js index 081de43cd1..0018c492aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js - * @description Object.keys - inherted enumerable accessor property that is over-ridden by non-enumerable own data property is not defined in returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { }, - enumerable: true, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - value: 1003, - enumerable: false, - configurable: true - }); - - var arr = Object.keys(obj); - - for (var p in arr) { - if (arr[p] === "prop") { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-9 +description: > + Object.keys - inherted enumerable accessor property that is + over-ridden by non-enumerable own data property is not defined in + returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { }, + enumerable: true, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + value: 1003, + enumerable: false, + configurable: true + }); + + var arr = Object.keys(obj); + + for (var p in arr) { + if (arr[p] === "prop") { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js index 139a9203ba..7d080cb4b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js - * @description Object.keys - 'value' attribute of element in returned array is correct. - */ - - -function testcase() { - var obj = { prop1: 1 }; - - var array = Object.keys(obj); - - var desc = Object.getOwnPropertyDescriptor(array, "0"); - - return desc.hasOwnProperty("value") && desc.value === "prop1"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-a-1 +description: > + Object.keys - 'value' attribute of element in returned array is + correct. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1 }; + + var array = Object.keys(obj); + + var desc = Object.getOwnPropertyDescriptor(array, "0"); + + return desc.hasOwnProperty("value") && desc.value === "prop1"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js index 071b05f96c..6ecdc948dd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js - * @description Object.keys - 'writable' attribute of element of returned array is correct - */ - - -function testcase() { - var obj = { prop1: 100 }; - - var array = Object.keys(obj); - - try { - array[0] = "isWritable"; - - var desc = Object.getOwnPropertyDescriptor(array, "0"); - - return array[0] === "isWritable" && desc.hasOwnProperty("writable") && desc.writable === true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-a-2 +description: > + Object.keys - 'writable' attribute of element of returned array is + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100 }; + + var array = Object.keys(obj); + + try { + array[0] = "isWritable"; + + var desc = Object.getOwnPropertyDescriptor(array, "0"); + + return array[0] === "isWritable" && desc.hasOwnProperty("writable") && desc.writable === true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js index 19ce2c0507..c4c01ccc9c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js - * @description Object.keys - 'enumerable' attribute of element of returned array is correct - */ - - -function testcase() { - var obj = { prop1: 100 }; - - var array = Object.keys(obj); - var desc = Object.getOwnPropertyDescriptor(array, "0"); - var result = false; - for (var index in array) { - if (obj.hasOwnProperty(array[index]) && array[index] === "prop1") { - result = true; - } - } - - return result && desc.hasOwnProperty("enumerable") && desc.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-a-3 +description: > + Object.keys - 'enumerable' attribute of element of returned array + is correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100 }; + + var array = Object.keys(obj); + var desc = Object.getOwnPropertyDescriptor(array, "0"); + var result = false; + for (var index in array) { + if (obj.hasOwnProperty(array[index]) && array[index] === "prop1") { + result = true; + } + } + + return result && desc.hasOwnProperty("enumerable") && desc.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js index 03d4fc1529..d754ca73cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js - * @description Object.keys - Verify that 'configurable' attribute of element of returned array is correct - */ - - -function testcase() { - var obj = { prop1: 100 }; - - var array = Object.keys(obj); - var desc = Object.getOwnPropertyDescriptor(array, "0"); - - delete array[0]; - - return typeof array[0] === "undefined" && desc.hasOwnProperty("configurable") && desc.configurable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-a-4 +description: > + Object.keys - Verify that 'configurable' attribute of element of + returned array is correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100 }; + + var array = Object.keys(obj); + var desc = Object.getOwnPropertyDescriptor(array, "0"); + + delete array[0]; + + return typeof array[0] === "undefined" && desc.hasOwnProperty("configurable") && desc.configurable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js index 44815b55c3..78959428e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js - * @description Object.keys - Verify that 'index' of returned array is ascend by 1 - */ - - -function testcase() { - var obj = { prop1: 100, prop2: 200, prop3: 300 }; - - var array = Object.keys(obj); - - var idx = 0; - for (var index in array) { - if (array.hasOwnProperty(index)) { - if (index !== idx.toString()) { - return false; - } - idx++; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-5-b-1 +description: Object.keys - Verify that 'index' of returned array is ascend by 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 100, prop2: 200, prop3: 300 }; + + var array = Object.keys(obj); + + var idx = 0; + for (var index in array) { + if (array.hasOwnProperty(index)) { + if (index !== idx.toString()) { + return false; + } + idx++; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js index 75c37fc011..831e364d73 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js - * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (dense array) - */ - - -function testcase() { - var denseArray = [1, 2, 3]; - - var tempArray = []; - for (var p in denseArray) { - if (denseArray.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var returnedArray = Object.keys(denseArray); - - for (var index in returnedArray) { - if (tempArray[index] !== returnedArray[index]) { - return false; - } - } - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-6-1 +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (dense array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var denseArray = [1, 2, 3]; + + var tempArray = []; + for (var p in denseArray) { + if (denseArray.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(denseArray); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js index 677f978a29..b9b759f170 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js - * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (sparse array) - */ - - -function testcase() { - var sparseArray = [1, 2, , 4, , 6]; - - var tempArray = []; - for (var p in sparseArray) { - if (sparseArray.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var returnedArray = Object.keys(sparseArray); - - for (var index in returnedArray) { - if (tempArray[index] !== returnedArray[index]) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-6-2 +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (sparse array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var sparseArray = [1, 2, , 4, , 6]; + + var tempArray = []; + for (var p in sparseArray) { + if (sparseArray.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(sparseArray); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js index 6fd0b455f2..d637f8ec1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js - * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (String object) - */ - - -function testcase() { - var str = new String("abc"); - - var tempArray = []; - for (var p in str) { - if (str.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var returnedArray = Object.keys(str); - - for (var index in returnedArray) { - if (tempArray[index] !== returnedArray[index]) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-6-3 +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (String object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = new String("abc"); + + var tempArray = []; + for (var p in str) { + if (str.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(str); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js index a3bb0aee04..f8288fe187 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js - * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (Arguments object) - */ - - -function testcase() { - var func = function (a, b, c) { - return arguments; - }; - - var args = func(1, "b", false); - - var tempArray = []; - for (var p in args) { - if (args.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var returnedArray = Object.keys(args); - - for (var index in returnedArray) { - if (tempArray[index] !== returnedArray[index]) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-6-4 +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (Arguments object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (a, b, c) { + return arguments; + }; + + var args = func(1, "b", false); + + var tempArray = []; + for (var p in args) { + if (args.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(args); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js index a6b4551870..e945136fe3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js - * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (any other built-in object) - */ - - -function testcase() { - var obj = new Date(); - obj.prop1 = 100; - obj.prop2 = "prop2"; - - var tempArray = []; - for (var p in obj) { - if (obj.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var returnedArray = Object.keys(obj); - - for (var index in returnedArray) { - if (tempArray[index] !== returnedArray[index]) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-6-5 +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (any other built-in object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Date(); + obj.prop1 = 100; + obj.prop2 = "prop2"; + + var tempArray = []; + for (var p in obj) { + if (obj.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(obj); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js index e292e02744..34023ba133 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js - * @description Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (global Object) - */ - - -function testcase() { - var obj = fnGlobalObject(); - - var tempArray = []; - for (var p in obj) { - if (obj.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var returnedArray = Object.keys(obj); - - for (var index in returnedArray) { - if (tempArray[index] !== returnedArray[index]) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.14-6-6 +description: > + Object.keys - the order of elements in returned array is the same + with the order of properties in 'O' (global Object) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + + var tempArray = []; + for (var p in obj) { + if (obj.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var returnedArray = Object.keys(obj); + + for (var index in returnedArray) { + if (tempArray[index] !== returnedArray[index]) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js index 52e1580f5b..a4642dbf2c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js - * @description Object.getPrototypeOf must exist as a function - */ - - -function testcase() { - if (typeof(Object.getPrototypeOf) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-0-1 +description: Object.getPrototypeOf must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + if (typeof(Object.getPrototypeOf) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js index 0960dc5b0e..20fa903eeb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js - * @description Object.getPrototypeOf must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.getPrototypeOf.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-0-2 +description: Object.getPrototypeOf must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js index 3d25c17497..7052dc4fa7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js - * @description Object.getPrototypeOf must take 1 parameter - */ - - -function testcase() { - try - { - Object.getPrototypeOf(); - } - catch(e) - { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-0-3 +description: Object.getPrototypeOf must take 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + Object.getPrototypeOf(); + } + catch(e) + { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-2.js index a2fa479a4c..f43eba8c85 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-2.js - * @description Object.getPrototypeOf throws TypeError if 'O' is null - */ - - -function testcase() { - try { - Object.getPrototypeOf(null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-1-2 +description: Object.getPrototypeOf throws TypeError if 'O' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getPrototypeOf(null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js index 5bd6905649..3e1d7cee71 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js - * @description Object.getPrototypeOf throws TypeError if 'O' is a boolean - */ - - -function testcase() { - try { - Object.getPrototypeOf(true); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-1-3 +description: Object.getPrototypeOf throws TypeError if 'O' is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getPrototypeOf(true); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js index 5d2197310e..747e26450e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js - * @description Object.getPrototypeOf throws TypeError if 'O' is a string - */ - - -function testcase() { - try { - Object.getPrototypeOf("abc"); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-1-4 +description: Object.getPrototypeOf throws TypeError if 'O' is a string +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getPrototypeOf("abc"); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js index 43a84f3673..c5a56bf96f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js - * @description Object.getPrototypeOf throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.getPrototypeOf(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-1 +description: > + Object.getPrototypeOf throws TypeError if type of first param is + not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getPrototypeOf(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js index 5a5d728c4b..5281da8442 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Boolean) - */ - - -function testcase() { - if (Object.getPrototypeOf(Boolean) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-1 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Boolean) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js index 221af2b74e..69ca369d1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (RegExp) - */ - - -function testcase() { - if (Object.getPrototypeOf(RegExp) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-10 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (RegExp) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(RegExp) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js index 6c47f148ab..5be31ff052 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Error) - */ - - -function testcase() { - if (Object.getPrototypeOf(Error) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-11 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Error) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Error) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js index 2741f80583..78776ab2ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (EvalError) - */ - - -function testcase() { - if (Object.getPrototypeOf(EvalError) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-12 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (EvalError) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(EvalError) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js index 03cb7d27f5..7026c49610 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (RangeError) - */ - - -function testcase() { - if (Object.getPrototypeOf(RangeError) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-13 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (RangeError) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(RangeError) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js index ba6db15e98..beb50836c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (ReferenceError) - */ - - -function testcase() { - if (Object.getPrototypeOf(ReferenceError) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-14 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (ReferenceError) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(ReferenceError) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js index 73fdd9cc9d..376230d5f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (SyntaxError) - */ - - -function testcase() { - if (Object.getPrototypeOf(SyntaxError) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-15 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (SyntaxError) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(SyntaxError) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js index b46a180495..bd0afb4b8c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (TypeError) - */ - - -function testcase() { - if (Object.getPrototypeOf(TypeError) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-16 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (TypeError) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(TypeError) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js index e174c8fb02..aa24d91361 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (URIError) - */ - - -function testcase() { - if (Object.getPrototypeOf(URIError) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-17 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (URIError) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(URIError) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js index c34eaa0af0..3e4800c56b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (JSON) - */ - - -function testcase() { - if (Object.getPrototypeOf(JSON) === Object.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-18 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(JSON) === Object.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-19.js index 274955da5b..14321e56a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-19.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-19.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Object object) - */ - - -function testcase() { - var obj = {}; - - return Object.getPrototypeOf(obj) === Object.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-19 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Object object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + return Object.getPrototypeOf(obj) === Object.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js index 78c1db5787..a5d123e4da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Let 'x' be the return value from getPrototypeOf when called on d. - * Then, x.isPrototypeOf(d) must be true. - * - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (custom object) - */ - - -function testcase() { - function base() {} - - function derived() {} - derived.prototype = new base(); - - var d = new derived(); - var x = Object.getPrototypeOf(d); - if (x.isPrototypeOf(d) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Let 'x' be the return value from getPrototypeOf when called on d. + Then, x.isPrototypeOf(d) must be true. +es5id: 15.2.3.2-2-2 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (custom object) +includes: [runTestCase.js] +---*/ + +function testcase() { + function base() {} + + function derived() {} + derived.prototype = new base(); + + var d = new derived(); + var x = Object.getPrototypeOf(d); + if (x.isPrototypeOf(d) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-20.js index 55cc72f5c6..bf1ee8185d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-20.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-20.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Function Object) - */ - - -function testcase() { - var obj = function (a, b) { - return a + b; - }; - - return Object.getPrototypeOf(obj) === Function.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-20 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Function Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = function (a, b) { + return a + b; + }; + + return Object.getPrototypeOf(obj) === Function.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-21.js index 28bf12a255..38aa7381b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-21.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-21.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Array object) - */ - - -function testcase() { - var arr = [1, 2, 3]; - - return Object.getPrototypeOf(arr) === Array.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-21 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Array object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [1, 2, 3]; + + return Object.getPrototypeOf(arr) === Array.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-22.js index 474e0174d6..b49f821e4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-22.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-22.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (String object) - */ - - -function testcase() { - var obj = new String("abc"); - - return Object.getPrototypeOf(obj) === String.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-22 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (String object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new String("abc"); + + return Object.getPrototypeOf(obj) === String.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-23.js index c3304b5c7a..73d7442a5a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-23.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-23.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Boolean object) - */ - - -function testcase() { - var obj = new Boolean(true); - - return Object.getPrototypeOf(obj) === Boolean.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-23 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Boolean object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Boolean(true); + + return Object.getPrototypeOf(obj) === Boolean.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-24.js index bd0727fdf5..9deb8b4943 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-24.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-24.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Number object) - */ - - -function testcase() { - var obj = new Number(-3); - - return Object.getPrototypeOf(obj) === Number.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-24 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Number object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Number(-3); + + return Object.getPrototypeOf(obj) === Number.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-25.js index 3234d31718..62e593063a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-25.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-25.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Date object) - */ - - -function testcase() { - var obj = new Date(); - - return Object.getPrototypeOf(obj) === Date.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-25 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Date object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Date(); + + return Object.getPrototypeOf(obj) === Date.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-26.js index d7addbbac5..4cd21f2972 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-26.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-26.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (RegExp object) - */ - - -function testcase() { - var obj = new RegExp(); - - return Object.getPrototypeOf(obj) === RegExp.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-26 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (RegExp object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new RegExp(); + + return Object.getPrototypeOf(obj) === RegExp.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-27.js index ab3a4649f2..404d34f002 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-27.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-27.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Error object) - */ - - -function testcase() { - var obj = new Error(); - - return Object.getPrototypeOf(obj) === Error.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-27 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Error object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Error(); + + return Object.getPrototypeOf(obj) === Error.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-28.js index 2ccc4da7b3..12f40fdb9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-28.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-28.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (the Arguments object) - */ - - -function testcase() { - function fun() { - return arguments; - } - var obj = fun(1, true, 3); - - return Object.getPrototypeOf(obj) === Object.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-28 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (the Arguments object) +includes: [runTestCase.js] +---*/ + +function testcase() { + function fun() { + return arguments; + } + var obj = fun(1, true, 3); + + return Object.getPrototypeOf(obj) === Object.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js index d4adaa6cea..5d49d76849 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Object) - */ - - -function testcase() { - if (Object.getPrototypeOf(Object) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-3 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Object) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-30.js index 6d51ad723d..52b258262c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-30.js @@ -1,17 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-30.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (the global object) - */ - - -function testcase() { - var proto = Object.getPrototypeOf(fnGlobalObject()); - - return proto.isPrototypeOf(fnGlobalObject()) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-30 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (the global object) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var proto = Object.getPrototypeOf(fnGlobalObject()); + + return proto.isPrototypeOf(fnGlobalObject()) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-31.js index ee294d6e30..e5c288fb63 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-31.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-31.js - * @description Object.getPrototypeOf returns null - */ - - -function testcase() { - - return (Object.getPrototypeOf(Object.prototype) === null); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-31 +description: Object.getPrototypeOf returns null +includes: [runTestCase.js] +---*/ + +function testcase() { + + return (Object.getPrototypeOf(Object.prototype) === null); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js index 9f14966865..4756b7b09f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Function) - */ - - -function testcase() { - if (Object.getPrototypeOf(Function) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-4 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Function) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Function) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js index 2246b94190..c2605f1718 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Array) - */ - - -function testcase() { - if (Object.getPrototypeOf(Array) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-5 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Array) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js index 79ceb6104c..a660776d2b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (String) - */ - - -function testcase() { - if (Object.getPrototypeOf(String) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-6 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (String) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(String) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js index b8649548dc..31cdcdcbdc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Number) - */ - - -function testcase() { - if (Object.getPrototypeOf(Number) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-7 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Number) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js index ca185b18a1..1127f86e73 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Math) - */ - - -function testcase() { - if (Object.getPrototypeOf(Math) === Object.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-8 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Math) === Object.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js index 8516d6c6fa..b584716a15 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js - * @description Object.getPrototypeOf returns the [[Prototype]] of its parameter (Date) - */ - - -function testcase() { - if (Object.getPrototypeOf(Date) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.2-2-9 +description: > + Object.getPrototypeOf returns the [[Prototype]] of its parameter + (Date) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getPrototypeOf(Date) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js index 0e98d85afa..5fe38bf391 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js - * @description Object.getOwnPropertyDescriptor must exist as a function - */ - - -function testcase() { - if (typeof(Object.getOwnPropertyDescriptor) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-0-1 +description: Object.getOwnPropertyDescriptor must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + if (typeof(Object.getOwnPropertyDescriptor) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js index 2c317afb49..e63e8ad232 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js - * @description Object.getOwnPropertyDescriptor must exist as a function taking 2 parameters - */ - - -function testcase() { - if (Object.getOwnPropertyDescriptor.length === 2) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-0-2 +description: > + Object.getOwnPropertyDescriptor must exist as a function taking 2 + parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getOwnPropertyDescriptor.length === 2) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js index 45672991ec..379fdf9fec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js - * @description Object.getOwnPropertyDescriptor - TypeError is thrown when first param is undefined - */ - - -function testcase() { - try { - Object.getOwnPropertyDescriptor(undefined, "foo"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-1-1 +description: > + Object.getOwnPropertyDescriptor - TypeError is thrown when first + param is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyDescriptor(undefined, "foo"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js index d0ca60bd3a..e14a5856bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js - * @description Object.getOwnPropertyDescriptor - TypeError is thrown when first param is null - */ - - -function testcase() { - try { - Object.getOwnPropertyDescriptor(null, "foo"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-1-2 +description: > + Object.getOwnPropertyDescriptor - TypeError is thrown when first + param is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyDescriptor(null, "foo"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js index 49d65de1fa..3929540223 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js - * @description Object.getOwnPropertyDescriptor - TypeError is thrown when first param is a boolean - */ - - -function testcase() { - try { - Object.getOwnPropertyDescriptor(true, "foo"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-1-3 +description: > + Object.getOwnPropertyDescriptor - TypeError is thrown when first + param is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyDescriptor(true, "foo"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js index 28436e369d..c1943dd090 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js - * @description Object.getOwnPropertyDescriptor - TypeError is thrown when first param is a number - */ - - -function testcase() { - try { - Object.getOwnPropertyDescriptor(-2, "foo"); - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-1-4 +description: > + Object.getOwnPropertyDescriptor - TypeError is thrown when first + param is a number +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyDescriptor(-2, "foo"); + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js index bcf05c73a3..89a2375a9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js - * @description Object.getOwnPropertyDescriptor throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.getOwnPropertyDescriptor(0, "foo"); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-1 +description: > + Object.getOwnPropertyDescriptor throws TypeError if type of first + param is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyDescriptor(0, "foo"); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js index fb621c4d98..ad983fa19f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js - * @description Object.getOwnPropertyDescriptor returns undefined for undefined property name - */ - - -function testcase() { - var o = {}; - var desc = Object.getOwnPropertyDescriptor(o, undefined); - if (desc === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-1 +description: > + Object.getOwnPropertyDescriptor returns undefined for undefined + property name +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + var desc = Object.getOwnPropertyDescriptor(o, undefined); + if (desc === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js index 6cf0684d06..4000fcecdd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is -0) - */ - - -function testcase() { - var obj = { "0": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, -0); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-10 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "0": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, -0); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js index 0512ee893f..c7469b4f65 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is positive number) - */ - - -function testcase() { - var obj = { "30": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 30); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-11 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "30": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 30); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js index e616c40890..ea476e1cad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is negative number) - */ - - -function testcase() { - var obj = { "-20": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, -20); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-12 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "-20": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, -20); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js index 8035cfe780..1817c788fe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is Infinity) - */ - - -function testcase() { - var obj = { "Infinity": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, Infinity); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-13 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "Infinity": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, Infinity); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js index bf08382fb2..dcc445e664 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is +Infinity) - */ - - -function testcase() { - var obj = { "Infinity": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, +Infinity); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-14 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is +Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "Infinity": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, +Infinity); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js index b799c4d49d..1b997f174c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is -Infinity) - */ - - -function testcase() { - var obj = { "-Infinity": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, -Infinity); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-15 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "-Infinity": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, -Infinity); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js index 652e2cb446..a7d90c2154 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 20 zeros)) - */ - - -function testcase() { - var obj = { "100000000000000000000": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-16 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1(following 20 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "100000000000000000000": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js index 9f75579833..427ddd378d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 21 zeros)) - */ - - -function testcase() { - var obj = { "1e+21": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1000000000000000000000); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-17 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1(following 21 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e+21": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1000000000000000000000); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js index 64720ecbdb..87d449dffa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 22 zeros)) - */ - - -function testcase() { - var obj = { "1e+22": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 10000000000000000000000); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-18 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1(following 22 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e+22": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 10000000000000000000000); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js index 99dc205411..c5340c425f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e+20) - */ - - -function testcase() { - var obj = { "100000000000000000000": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1e+20); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-19 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e+20) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "100000000000000000000": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1e+20); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js index d11a6f0e98..d1b3a4e78c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js - * @description Object.getOwnPropertyDescriptor returns undefined for null property name - */ - - -function testcase() { - var o = {}; - var desc = Object.getOwnPropertyDescriptor(o, null); - if (desc === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-2 +description: > + Object.getOwnPropertyDescriptor returns undefined for null + property name +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + var desc = Object.getOwnPropertyDescriptor(o, null); + if (desc === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js index 4c06979cf0..84b8ab139d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to string (value is 1e+21) - */ - - -function testcase() { - var obj = { "1e+21": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1e+21); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-20 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to string (value is 1e+21) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e+21": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1e+21); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js index 841c567b57..d3c182c4e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e+22) - */ - - -function testcase() { - var obj = { "1e+22": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1e+22); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-21 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e+22) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e+22": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1e+22); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js index 985ee2a953..f29c810b98 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.000001) - */ - - -function testcase() { - var obj = { "0.000001": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 0.000001); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-22 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0.000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "0.000001": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 0.000001); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js index ab948760cf..18481ea990 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.0000001) - */ - - -function testcase() { - var obj = { "1e-7": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 0.0000001); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-23 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0.0000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e-7": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 0.0000001); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js index 8923f7a12b..7b8050da89 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.00000001) - */ - - -function testcase() { - var obj = { "1e-8": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 0.00000001); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-24 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0.00000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e-8": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 0.00000001); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js index b9785d643a..ebbf3ef136 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-7) - */ - - -function testcase() { - var obj = { "1e-7": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1e-7); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-25 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e-7) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1e-7": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1e-7); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js index 568be47ee7..dd8f7de527 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-6) - */ - - -function testcase() { - var obj = { "0.000001": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1e-6); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-26 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e-6) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "0.000001": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1e-6); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js index 5877e9120b..82aa632ef0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-5) - */ - - -function testcase() { - var obj = { "0.00001": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1e-5); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-27 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 1e-5) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "0.00001": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1e-5); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js index 0a52795c37..117f3c1fba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is an integer that converts to a string (value is 123) - */ - - -function testcase() { - var obj = { "123": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 123); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-28 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an integer that + converts to a string (value is 123) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "123": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 123); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js index a74f37b86e..2661296709 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a decimal that converts to a string (value is 123.456) - */ - - -function testcase() { - var obj = { "123.456": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 123.456); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-29 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a decimal that + converts to a string (value is 123.456) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "123.456": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 123.456); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js index 9f4bb30b77..65807fc742 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is undefined - */ - - -function testcase() { - var obj = { "undefined": 1 }; - - var desc1 = Object.getOwnPropertyDescriptor(obj, undefined); - var desc2 = Object.getOwnPropertyDescriptor(obj, "undefined"); - - return desc1.value === 1 && desc2.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-3 +description: Object.getOwnPropertyDescriptor - argument 'P' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "undefined": 1 }; + + var desc1 = Object.getOwnPropertyDescriptor(obj, undefined); + var desc2 = Object.getOwnPropertyDescriptor(obj, "undefined"); + + return desc1.value === 1 && desc2.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30.js index 9980ea8871..395128ccf3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 100000000000000000000.123) - */ - - -function testcase() { - var obj = { "100000000000000000000": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000.123); - - return typeof desc !== "undefined" && desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-30 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 100000000000000000000.123) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "100000000000000000000": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000.123); + + return typeof desc !== "undefined" && desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js index 1d3a077919..af4852f459 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 123.1234567) - */ - - -function testcase() { - var obj = { "123.1234567": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 123.1234567); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-31 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 123.1234567) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "123.1234567": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 123.1234567); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js index 503ea09307..657944cae0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is applied to an empty string - */ - - -function testcase() { - var obj = { "": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, ""); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-32 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to an + empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, ""); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js index e247a43649..4610a7a280 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'AB - * \cd' - */ - - -function testcase() { - var obj = { "AB\n\\cd": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, "AB\n\\cd"); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-33 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string 'AB \cd' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "AB\n\\cd": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, "AB\n\\cd"); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js index 6a874cbe08..8a7a659836 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'undefined' - */ - - -function testcase() { - var obj = { "undefined": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, "undefined"); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-34 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string 'undefined' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "undefined": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, "undefined"); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js index 7caf165b2e..005a71093e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'null' - */ - - -function testcase() { - var obj = { "null": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, "null"); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-35 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string 'null' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "null": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, "null"); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js index 874abd29bd..0450a464d3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is applied to string '123���¦�cd' - */ - - -function testcase() { - var obj = { "123���¦�cd": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, "123���¦�cd"); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-36 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string '123���¦�cd' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "123���¦�cd": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, "123���¦�cd"); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js index be35999d35..11aaad7160 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is applied to string '1' - */ - - -function testcase() { - var obj = { "1": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 1); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-37 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is applied to + string '1' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 1); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js index de3daeff90..0ed945a3b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is an array that converts to a string - */ - - -function testcase() { - var obj = { "1": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, [1]); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-38 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an array that + converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, [1]); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js index 640d447b1e..330775bf4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a String Object that converts to a string - */ - - -function testcase() { - var obj = { "Hello": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, new String("Hello")); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-39 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a String Object + that converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "Hello": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, new String("Hello")); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js index 9690880083..30f47cd9f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is null that converts to string 'null' - */ - - -function testcase() { - var obj = { "null": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, null); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-4 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is null that + converts to string 'null' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "null": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, null); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js index b3cd4dca7f..2970763d71 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a Boolean Object that converts to a string - */ - - -function testcase() { - var obj = { "true": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, new Boolean(true)); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-40 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a Boolean Object + that converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "true": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, new Boolean(true)); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js index 801638df34..39756df6ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a Number Object that converts to a string - */ - - -function testcase() { - var obj = { "123": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, new Number(123)); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-41 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a Number Object + that converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "123": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, new Number(123)); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js index de1cf20232..d3194dea26 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own toString method - */ - - -function testcase() { - var obj = { "abc": 1 }; - - var ownProp = { - toString: function () { - return "abc"; - } - }; - - var desc = Object.getOwnPropertyDescriptor(obj, ownProp); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-42 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object which + has an own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "abc": 1 }; + + var ownProp = { + toString: function () { + return "abc"; + } + }; + + var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js index ca0d2aaee5..ddef5b78a9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own valueOf method - */ - - -function testcase() { - var obj = { "[object Object]": 1, "abc" : 2 }; - - var ownProp = { - valueOf: function () { - return "abc"; - } - }; - - var desc = Object.getOwnPropertyDescriptor(obj, ownProp); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-43 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object which + has an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "[object Object]": 1, "abc" : 2 }; + + var ownProp = { + valueOf: function () { + return "abc"; + } + }; + + var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js index 1430f5dfb8..405ff86e67 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is an object that has an own toString method that returns an object and toValue method that returns a primitive value - */ - - -function testcase() { - var obj = { "abc": 1 }; - var valueOfAccessed = false; - var toStringAccessed = false; - - var ownProp = { - toString: function () { - toStringAccessed = true; - return {}; - }, - valueOf: function () { - valueOfAccessed = true; - return "abc"; - } - }; - - var desc = Object.getOwnPropertyDescriptor(obj, ownProp); - - return desc.value === 1 && valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-44 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object that + has an own toString method that returns an object and toValue + method that returns a primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "abc": 1 }; + var valueOfAccessed = false; + var toStringAccessed = false; + + var ownProp = { + toString: function () { + toStringAccessed = true; + return {}; + }, + valueOf: function () { + valueOfAccessed = true; + return "abc"; + } + }; + + var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + + return desc.value === 1 && valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js index ee887d33fd..83185528de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own toString and valueOf method - */ - - -function testcase() { - var obj = { "bbq": 1, "abc": 2 }; - var valueOfAccessed = false; - - var ownProp = { - toString: function () { - return "bbq"; - }, - valueOf: function () { - valueOfAccessed = true; - return "abc"; - } - }; - - var desc = Object.getOwnPropertyDescriptor(obj, ownProp); - - return desc.value === 1 && !valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-45 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is an object which + has an own toString and valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "bbq": 1, "abc": 2 }; + var valueOfAccessed = false; + + var ownProp = { + toString: function () { + return "bbq"; + }, + valueOf: function () { + valueOfAccessed = true; + return "abc"; + } + }; + + var desc = Object.getOwnPropertyDescriptor(obj, ownProp); + + return desc.value === 1 && !valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js index b6eb5f64db..1750a27279 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js - * @description Object.getOwnPropertyDescriptor - TypeError exception was thrown when 'P' is an object that both toString and valueOf wouldn't return primitive value - */ - - -function testcase() { - var obj = { "1": 1 }; - var toStringAccessed = false; - var valueOfAccessed = false; - - var ownProp = { - toString: function () { - toStringAccessed = true; - return [1]; - }, - valueOf: function () { - valueOfAccessed = true; - return [1]; - } - }; - - try { - Object.getOwnPropertyDescriptor(obj, ownProp); - return false; - } catch (e) { - return toStringAccessed && valueOfAccessed && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-46 +description: > + Object.getOwnPropertyDescriptor - TypeError exception was thrown + when 'P' is an object that both toString and valueOf wouldn't + return primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "1": 1 }; + var toStringAccessed = false; + var valueOfAccessed = false; + + var ownProp = { + toString: function () { + toStringAccessed = true; + return [1]; + }, + valueOf: function () { + valueOfAccessed = true; + return [1]; + } + }; + + try { + Object.getOwnPropertyDescriptor(obj, ownProp); + return false; + } catch (e) { + return toStringAccessed && valueOfAccessed && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js index 2428abae1b..bece99aeb8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js - * @description Object.getOwnPropertyDescriptor - uses inherited toString method when 'P' is an object with an own valueOf and inherited toString methods - */ - - -function testcase() { - var proto = {}; - var valueOfAccessed = false; - var toStringAccessed = false; - - proto.toString = function () { - toStringAccessed = true; - return "test"; - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.valueOf = function () { - valueOfAccessed = true; - return "10"; - }; - var obj = { "10": "length1", "test": "length2" }; - var desc = Object.getOwnPropertyDescriptor(obj, child); - - return desc.value === "length2" && toStringAccessed && !valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-47 +description: > + Object.getOwnPropertyDescriptor - uses inherited toString method + when 'P' is an object with an own valueOf and inherited toString + methods +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + var valueOfAccessed = false; + var toStringAccessed = false; + + proto.toString = function () { + toStringAccessed = true; + return "test"; + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.valueOf = function () { + valueOfAccessed = true; + return "10"; + }; + var obj = { "10": "length1", "test": "length2" }; + var desc = Object.getOwnPropertyDescriptor(obj, child); + + return desc.value === "length2" && toStringAccessed && !valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js index 87742841e8..01c2d8134e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose value is false - */ - - -function testcase() { - var obj = { "false": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, false); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-5 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose + value is false +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "false": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, false); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js index 25604a243c..369bf0dfa7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose value is true - */ - - -function testcase() { - var obj = { "true": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, true); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-6 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose + value is true +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "true": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, true); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js index eb27dda50a..8da7d1a010 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is NaN) - */ - - -function testcase() { - var obj = { "NaN": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, NaN); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-7 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "NaN": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, NaN); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js index 60f5ff25db..0c57b0c97e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0) - */ - - -function testcase() { - var obj = { "0": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, 0); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-8 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "0": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, 0); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js index d12b8e2ede..4fe661759d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js - * @description Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is +0) - */ - - -function testcase() { - var obj = { "0": 1 }; - - var desc = Object.getOwnPropertyDescriptor(obj, +0); - - return desc.value === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-2-9 +description: > + Object.getOwnPropertyDescriptor - argument 'P' is a number that + converts to a string (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "0": 1 }; + + var desc = Object.getOwnPropertyDescriptor(obj, +0); + + return desc.value === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js index a10a10a538..3f17c0fdf6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js - * @description Object.getOwnPropertyDescriptor - 'P' is own data property - */ - - -function testcase() { - - var obj = { - property: "ownDataProperty" - }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.value === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-1 +description: Object.getOwnPropertyDescriptor - 'P' is own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { + property: "ownDataProperty" + }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.value === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js index 4068ab06d7..6becdd7485 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js - * @description Object.getOwnPropertyDescriptor - 'P' is not an existing property - */ - - -function testcase() { - - var obj = { - property: "ownDataProperty" - }; - - var desc = Object.getOwnPropertyDescriptor(obj, "propertyNonExist"); - - return typeof desc === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-10 +description: Object.getOwnPropertyDescriptor - 'P' is not an existing property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { + property: "ownDataProperty" + }; + + var desc = Object.getOwnPropertyDescriptor(obj, "propertyNonExist"); + + return typeof desc === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js index dd626f7e47..c075fa7686 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js - * @description Object.getOwnPropertyDescriptor applied to the Arguments object which implements its own property get method - */ - - -function testcase() { - - var arg = (function () { - return arguments; - }("ownProperty", true)); - - var desc = Object.getOwnPropertyDescriptor(arg, "0"); - - return desc.value === "ownProperty" && desc.writable === true && desc.enumerable === true && desc.configurable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-13 +description: > + Object.getOwnPropertyDescriptor applied to the Arguments object + which implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg = (function () { + return arguments; + }("ownProperty", true)); + + var desc = Object.getOwnPropertyDescriptor(arg, "0"); + + return desc.value === "ownProperty" && desc.writable === true && desc.enumerable === true && desc.configurable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-14.js index 02cbf85b93..8852aece7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-14.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-14.js - * @description Object.getOwnPropertyDescriptor applied to a String object which implements its own property get method - */ - - -function testcase() { - - var str = new String("123"); - - var desc = Object.getOwnPropertyDescriptor(str, "2"); - - return desc.value === "3"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-14 +description: > + Object.getOwnPropertyDescriptor applied to a String object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = new String("123"); + + var desc = Object.getOwnPropertyDescriptor(str, "2"); + + return desc.value === "3"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js index 3ee5b76f0f..1c8de7bba8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js - * @description Object.getOwnPropertyDescriptor applied to a Function object which implements its own property get method - */ - - -function testcase() { - - var obj = function (a, b) { - return a + b; - }; - obj[1] = "ownProperty"; - - var desc = Object.getOwnPropertyDescriptor(obj, "1"); - - return desc.value === "ownProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-15 +description: > + Object.getOwnPropertyDescriptor applied to a Function object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function (a, b) { + return a + b; + }; + obj[1] = "ownProperty"; + + var desc = Object.getOwnPropertyDescriptor(obj, "1"); + + return desc.value === "ownProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js index 04bc6f3c65..ef7ebaf503 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js - * @description Object.getOwnPropertyDescriptor - 'P' is inherited data property - */ - - -function testcase() { - - var proto = { - property: "inheritedDataProperty" - }; - - var Con = function () { }; - Con.ptototype = proto; - - var child = new Con(); - - var desc = Object.getOwnPropertyDescriptor(child, "property"); - - return typeof desc === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-2 +description: Object.getOwnPropertyDescriptor - 'P' is inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + property: "inheritedDataProperty" + }; + + var Con = function () { }; + Con.ptototype = proto; + + var child = new Con(); + + var desc = Object.getOwnPropertyDescriptor(child, "property"); + + return typeof desc === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js index 8199158866..ae1318b2a3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js - * @description Object.getOwnPropertyDescriptor - 'P' is own data property that overrides an inherited data property - */ - - -function testcase() { - - var proto = { - property: "inheritedDataProperty" - }; - - var Con = function () { }; - Con.ptototype = proto; - - var child = new Con(); - child.property = "ownDataProperty"; - - var desc = Object.getOwnPropertyDescriptor(child, "property"); - - return desc.value === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-3 +description: > + Object.getOwnPropertyDescriptor - 'P' is own data property that + overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + property: "inheritedDataProperty" + }; + + var Con = function () { }; + Con.ptototype = proto; + + var child = new Con(); + child.property = "ownDataProperty"; + + var desc = Object.getOwnPropertyDescriptor(child, "property"); + + return desc.value === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js index d010403040..9ddb13f3a0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js - * @description Object.getOwnPropertyDescriptor - 'P' is own data property that overrides an inherited accessor property - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "property", { - get: function () { - return "inheritedDataProperty"; - }, - configurable: true - }); - - var Con = function () { }; - Con.ptototype = proto; - - var child = new Con(); - Object.defineProperty(child, "property", { - value: "ownDataProperty", - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(child, "property"); - - return desc.value === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-4 +description: > + Object.getOwnPropertyDescriptor - 'P' is own data property that + overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "property", { + get: function () { + return "inheritedDataProperty"; + }, + configurable: true + }); + + var Con = function () { }; + Con.ptototype = proto; + + var child = new Con(); + Object.defineProperty(child, "property", { + value: "ownDataProperty", + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(child, "property"); + + return desc.value === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js index 27e53a1f3d..752ceacef2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js - * @description Object.getOwnPropertyDescriptor - 'P' is own accessor property - */ - - -function testcase() { - - var obj = {}; - var fun = function () { - return "ownAccessorProperty"; - }; - Object.defineProperty(obj, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.get === fun; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-5 +description: Object.getOwnPropertyDescriptor - 'P' is own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var fun = function () { + return "ownAccessorProperty"; + }; + Object.defineProperty(obj, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.get === fun; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js index 3fc884bd0d..07890882c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js - * @description Object.getOwnPropertyDescriptor - 'P' is inherited accessor property - */ - - -function testcase() { - - var proto = {}; - var fun = function () { - return "ownAccessorProperty"; - }; - Object.defineProperty(proto, "property", { - get: fun, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - var desc = Object.getOwnPropertyDescriptor(child, "property"); - - return typeof desc === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-6 +description: > + Object.getOwnPropertyDescriptor - 'P' is inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + var fun = function () { + return "ownAccessorProperty"; + }; + Object.defineProperty(proto, "property", { + get: fun, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + var desc = Object.getOwnPropertyDescriptor(child, "property"); + + return typeof desc === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js index 1837b9e94e..d5905e5fc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js - * @description Object.getOwnPropertyDescriptor - 'P' is own accessor property that overrides an inherited data property - */ - - -function testcase() { - - var proto = { - property: "inheritedDataProperty" - }; - - var Con = function () { }; - Con.ptototype = proto; - - var child = new Con(); - var fun = function () { - return "ownAccessorProperty"; - }; - Object.defineProperty(child, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(child, "property"); - - return desc.get === fun; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-7 +description: > + Object.getOwnPropertyDescriptor - 'P' is own accessor property + that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + property: "inheritedDataProperty" + }; + + var Con = function () { }; + Con.ptototype = proto; + + var child = new Con(); + var fun = function () { + return "ownAccessorProperty"; + }; + Object.defineProperty(child, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(child, "property"); + + return desc.get === fun; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js index 4703cf90f0..8cd29395db 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js - * @description Object.getOwnPropertyDescriptor - 'P' is own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "property", { - get: function () { - return "inheritedAccessorProperty"; - }, - configurable: true - }); - - var Con = function () { }; - Con.ptototype = proto; - - var child = new Con(); - var fun = function () { - return "ownAccessorProperty"; - }; - Object.defineProperty(child, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(child, "property"); - - return desc.get === fun; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-8 +description: > + Object.getOwnPropertyDescriptor - 'P' is own accessor property + that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "property", { + get: function () { + return "inheritedAccessorProperty"; + }, + configurable: true + }); + + var Con = function () { }; + Con.ptototype = proto; + + var child = new Con(); + var fun = function () { + return "ownAccessorProperty"; + }; + Object.defineProperty(child, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(child, "property"); + + return desc.get === fun; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js index 539c6ce4d8..98a1fc9e8a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js - * @description Object.getOwnPropertyDescriptor - 'P' is own accessor property without a get function - */ - - -function testcase() { - - var obj = {}; - var fun = function () { }; - Object.defineProperty(obj, "property", { - set: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.set === fun; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-3-9 +description: > + Object.getOwnPropertyDescriptor - 'P' is own accessor property + without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var fun = function () { }; + Object.defineProperty(obj, "property", { + set: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.set === fun; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js index 8398cfaa9d..62a9a18a3c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js - * @description Object.getOwnPropertyDescriptor returns an object representing a data desc for valid data valued properties - */ - - -function testcase() { - var o = {}; - o["foo"] = 101; - - var desc = Object.getOwnPropertyDescriptor(o, "foo"); - if (desc.value === 101 && - desc.enumerable === true && - desc.writable === true && - desc.configurable === true && - !desc.hasOwnProperty("get") && - !desc.hasOwnProperty("set")) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-1 +description: > + Object.getOwnPropertyDescriptor returns an object representing a + data desc for valid data valued properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + o["foo"] = 101; + + var desc = Object.getOwnPropertyDescriptor(o, "foo"); + if (desc.value === 101 && + desc.enumerable === true && + desc.writable === true && + desc.configurable === true && + !desc.hasOwnProperty("get") && + !desc.hasOwnProperty("set")) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js index fba5053078..6e5409b0e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.decodeURIComponent) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "decodeURIComponent"); - if (desc.value === global.decodeURIComponent && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-10 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.decodeURIComponent) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "decodeURIComponent"); + if (desc.value === global.decodeURIComponent && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js index 5a01c8f9bb..520557023c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.atan2) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "atan2"); - if (desc.value === Math.atan2 && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-100 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.atan2) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "atan2"); + if (desc.value === Math.atan2 && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js index c56a59603c..77fc7f8a7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.ceil) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "ceil"); - if (desc.value === Math.ceil && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-101 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.ceil) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "ceil"); + if (desc.value === Math.ceil && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js index 231baf3bf7..b7b8190022 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.cos) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "cos"); - if (desc.value === Math.cos && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-102 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.cos) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "cos"); + if (desc.value === Math.cos && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js index 037426b595..e1820462a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.exp) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "exp"); - if (desc.value === Math.exp && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-103 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.exp) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "exp"); + if (desc.value === Math.exp && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js index 74699a54e8..1a7aa2ad54 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.floor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "floor"); - if (desc.value === Math.floor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-104 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.floor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "floor"); + if (desc.value === Math.floor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js index 0ad153fec3..67bffe6884 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.log) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "log"); - if (desc.value === Math.log && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-105 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.log) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "log"); + if (desc.value === Math.log && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js index 2a2a15a35d..148f9a7b04 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.max) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "max"); - if (desc.value === Math.max && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-106 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.max) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "max"); + if (desc.value === Math.max && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js index 0f7c1205cf..7ff6490b8a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.min) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "min"); - if (desc.value === Math.min && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-107 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.min) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "min"); + if (desc.value === Math.min && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js index 8c944cdacd..8590aca5e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.pow) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "pow"); - if (desc.value === Math.pow && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-108 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.pow) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "pow"); + if (desc.value === Math.pow && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js index 413710aaac..4648fb77a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.random) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "random"); - if (desc.value === Math.random && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-109 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.random) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "random"); + if (desc.value === Math.random && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js index 361325ca42..97f580076e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.encodeURIComponent) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "encodeURIComponent"); - if (desc.value === global.encodeURIComponent && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-11 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.encodeURIComponent) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "encodeURIComponent"); + if (desc.value === global.encodeURIComponent && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js index adb28cfa32..da7ccd33ee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.round) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "round"); - if (desc.value === Math.round && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-110 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.round) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "round"); + if (desc.value === Math.round && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js index 0e0d035a17..f1687d9fa2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.sin) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "sin"); - if (desc.value === Math.sin && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-111 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.sin) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "sin"); + if (desc.value === Math.sin && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js index e3326f72dd..45e04fdbd8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.sqrt) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "sqrt"); - if (desc.value === Math.sqrt && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-112 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.sqrt) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "sqrt"); + if (desc.value === Math.sqrt && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js index e5d81563cc..6a5c0cc50c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.tan) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "tan"); - if (desc.value === Math.tan && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-113 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.tan) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "tan"); + if (desc.value === Math.tan && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js index f7e3795adf..cdae569a66 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.parse) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date, "parse"); - if (desc.value === Date.parse && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-114 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.parse) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date, "parse"); + if (desc.value === Date.parse && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js index b4504523a9..8c6ff2979c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.UTC) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date, "UTC"); - if (desc.value === Date.UTC && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-115 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.UTC) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date, "UTC"); + if (desc.value === Date.UTC && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js index adbceea986..bffd898a31 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "constructor"); - if (desc.value === Date.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-116 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "constructor"); + if (desc.value === Date.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js index a7284c86cb..13741d61fe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getTime) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTime"); - if (desc.value === Date.prototype.getTime && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-117 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getTime) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTime"); + if (desc.value === Date.prototype.getTime && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js index 6ce64ab644..1593beb37b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getTimezoneOffset) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTimezoneOffset"); - if (desc.value === Date.prototype.getTimezoneOffset && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-118 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getTimezoneOffset) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTimezoneOffset"); + if (desc.value === Date.prototype.getTimezoneOffset && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js index d410847033..cfc4d20edd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getFullYear) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getFullYear"); - if (desc.value === Date.prototype.getFullYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-120 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getFullYear) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getFullYear"); + if (desc.value === Date.prototype.getFullYear && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js index 6104802948..c9c6322b72 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMonth) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMonth"); - if (desc.value === Date.prototype.getMonth && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-121 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getMonth) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMonth"); + if (desc.value === Date.prototype.getMonth && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js index ed5d7b2c67..704b0b84e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getDate) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDate"); - if (desc.value === Date.prototype.getDate && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-122 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getDate) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDate"); + if (desc.value === Date.prototype.getDate && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js index 8629000b08..8f2d307287 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getDay) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDay"); - if (desc.value === Date.prototype.getDay && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-123 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getDay) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDay"); + if (desc.value === Date.prototype.getDay && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js index ca806f89de..6e156eabbf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getHours) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getHours"); - if (desc.value === Date.prototype.getHours && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-124 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getHours) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getHours"); + if (desc.value === Date.prototype.getHours && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js index 42afd43cd8..4469f3fae6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMinutes) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMinutes"); - if (desc.value === Date.prototype.getMinutes && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-125 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getMinutes) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMinutes"); + if (desc.value === Date.prototype.getMinutes && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js index 4809e2e5c1..61ea23c37d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getSeconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getSeconds"); - if (desc.value === Date.prototype.getSeconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-126 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getSeconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getSeconds"); + if (desc.value === Date.prototype.getSeconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js index 2c61b997a0..27aa44bb0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMilliseconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMilliseconds"); - if (desc.value === Date.prototype.getMilliseconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-127 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getMilliseconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMilliseconds"); + if (desc.value === Date.prototype.getMilliseconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js index a67692e441..33fb0bab62 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCFullYear) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCFullYear"); - if (desc.value === Date.prototype.getUTCFullYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-128 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCFullYear) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCFullYear"); + if (desc.value === Date.prototype.getUTCFullYear && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js index 69f98f88ef..0af2527c99 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMonth) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMonth"); - if (desc.value === Date.prototype.getUTCMonth && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-129 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCMonth) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMonth"); + if (desc.value === Date.prototype.getUTCMonth && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js index 70b05d952d..4204ee570b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCDate) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDate"); - if (desc.value === Date.prototype.getUTCDate && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-130 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCDate) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDate"); + if (desc.value === Date.prototype.getUTCDate && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js index 4bd3592f31..2de806064c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCDay) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDay"); - if (desc.value === Date.prototype.getUTCDay && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-131 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCDay) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDay"); + if (desc.value === Date.prototype.getUTCDay && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js index da55c4aa52..4036920af7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCHours) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCHours"); - if (desc.value === Date.prototype.getUTCHours && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-132 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCHours) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCHours"); + if (desc.value === Date.prototype.getUTCHours && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js index 5f1b961a04..931f913207 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMinutes) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMinutes"); - if (desc.value === Date.prototype.getUTCMinutes && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-133 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCMinutes) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMinutes"); + if (desc.value === Date.prototype.getUTCMinutes && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js index f892aac1c4..7738bbef5d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCSeconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCSeconds"); - if (desc.value === Date.prototype.getUTCSeconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-134 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCSeconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCSeconds"); + if (desc.value === Date.prototype.getUTCSeconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js index 33d686bb2b..aacc15a675 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMilliseconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMilliseconds"); - if (desc.value === Date.prototype.getUTCMilliseconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-135 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.getUTCMilliseconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMilliseconds"); + if (desc.value === Date.prototype.getUTCMilliseconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js index 69f130c851..07e80dfe98 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setTime) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setTime"); - if (desc.value === Date.prototype.setTime && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-136 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setTime) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setTime"); + if (desc.value === Date.prototype.setTime && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js index f53971a8eb..2d1841d032 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setFullYear) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setFullYear"); - if (desc.value === Date.prototype.setFullYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-138 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setFullYear) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setFullYear"); + if (desc.value === Date.prototype.setFullYear && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js index 80b43fa723..7792e51a2f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMonth) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMonth"); - if (desc.value === Date.prototype.setMonth && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-139 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setMonth) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMonth"); + if (desc.value === Date.prototype.setMonth && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js index bdc8ef957c..fbf85925ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getPrototypeOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf"); - if (desc.value === Object.getPrototypeOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-14 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.getPrototypeOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf"); + if (desc.value === Object.getPrototypeOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js index 5136cf6e1a..a782c864ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setDate) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setDate"); - if (desc.value === Date.prototype.setDate && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-140 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setDate) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setDate"); + if (desc.value === Date.prototype.setDate && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js index c8d9529d7c..c2c955c7fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setHours) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setHours"); - if (desc.value === Date.prototype.setHours && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-141 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setHours) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setHours"); + if (desc.value === Date.prototype.setHours && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js index 0743743fbb..305de87cb2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMinutes) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMinutes"); - if (desc.value === Date.prototype.setMinutes && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-142 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setMinutes) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMinutes"); + if (desc.value === Date.prototype.setMinutes && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js index 1e6121ea05..2c593a2762 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setSeconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setSeconds"); - if (desc.value === Date.prototype.setSeconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-143 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setSeconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setSeconds"); + if (desc.value === Date.prototype.setSeconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js index 7bb4cbe17f..3a67fd745b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMilliseconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMilliseconds"); - if (desc.value === Date.prototype.setMilliseconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-144 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setMilliseconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMilliseconds"); + if (desc.value === Date.prototype.setMilliseconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js index 0201d81c6c..ba5999d353 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCFullYear) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCFullYear"); - if (desc.value === Date.prototype.setUTCFullYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-145 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCFullYear) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCFullYear"); + if (desc.value === Date.prototype.setUTCFullYear && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js index 3750693a21..b5aea59cea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMonth) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMonth"); - if (desc.value === Date.prototype.setUTCMonth && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-146 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCMonth) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMonth"); + if (desc.value === Date.prototype.setUTCMonth && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js index e6120eb7d4..9fd43a60d5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCDate) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCDate"); - if (desc.value === Date.prototype.setUTCDate && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-147 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCDate) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCDate"); + if (desc.value === Date.prototype.setUTCDate && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js index 5dc720b755..fe09c4b9ab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCHours) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCHours"); - if (desc.value === Date.prototype.setUTCHours && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-148 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCHours) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCHours"); + if (desc.value === Date.prototype.setUTCHours && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js index 2151f25000..74e63151ac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMinutes) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMinutes"); - if (desc.value === Date.prototype.setUTCMinutes && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-149 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCMinutes) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMinutes"); + if (desc.value === Date.prototype.setUTCMinutes && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js index 2287a65ab0..f1c1c8a754 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getOwnPropertyDescriptor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor"); - if (desc.value === Object.getOwnPropertyDescriptor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-15 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.getOwnPropertyDescriptor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor"); + if (desc.value === Object.getOwnPropertyDescriptor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js index 914f992f03..ada091164c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCSeconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCSeconds"); - if (desc.value === Date.prototype.setUTCSeconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-150 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCSeconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCSeconds"); + if (desc.value === Date.prototype.setUTCSeconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js index 24d3adc1be..9f489aec96 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMilliseconds) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMilliseconds"); - if (desc.value === Date.prototype.setUTCMilliseconds && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-151 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.setUTCMilliseconds) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMilliseconds"); + if (desc.value === Date.prototype.setUTCMilliseconds && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js index 869e5acb01..5db20207b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleString"); - if (desc.value === Date.prototype.toLocaleString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-152 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toLocaleString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleString"); + if (desc.value === Date.prototype.toLocaleString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js index 051037cf7b..c21271a51d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toString"); - if (desc.value === Date.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-153 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toString"); + if (desc.value === Date.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js index 3ab333b7f8..9bc48759bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toUTCString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toUTCString"); - if (desc.value === Date.prototype.toUTCString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-154 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toUTCString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toUTCString"); + if (desc.value === Date.prototype.toUTCString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js index cf2090aa45..d213848171 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toTimeString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toTimeString"); - if (desc.value === Date.prototype.toTimeString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-156 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toTimeString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toTimeString"); + if (desc.value === Date.prototype.toTimeString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js index cb71ec841b..7f98fca06b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toDateString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toDateString"); - if (desc.value === Date.prototype.toDateString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-157 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toDateString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toDateString"); + if (desc.value === Date.prototype.toDateString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js index 8d4130dda9..5a19da3839 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleDateString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleDateString"); - if (desc.value === Date.prototype.toLocaleDateString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-158 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toLocaleDateString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleDateString"); + if (desc.value === Date.prototype.toLocaleDateString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js index 1774cd06f2..64759fdf2c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleTimeString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleTimeString"); - if (desc.value === Date.prototype.toLocaleTimeString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-159 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toLocaleTimeString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleTimeString"); + if (desc.value === Date.prototype.toLocaleTimeString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js index bee18c4360..7957f62f06 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getOwnPropertyNames) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames"); - if (desc.value === Object.getOwnPropertyNames && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-16 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.getOwnPropertyNames) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames"); + if (desc.value === Object.getOwnPropertyNames && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js index 66aa290ae5..4f26229944 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.valueOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "valueOf"); - if (desc.value === Date.prototype.valueOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-160 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "valueOf"); + if (desc.value === Date.prototype.valueOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js index 1753888c1c..7dac4e0857 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toISOString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString"); - if (desc.value === Date.prototype.toISOString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-161 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toISOString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString"); + if (desc.value === Date.prototype.toISOString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js index 5997e43198..9c9af31ca7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toJSON) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON"); - if (desc.value === Date.prototype.toJSON && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-162 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Date.prototype.toJSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON"); + if (desc.value === Date.prototype.toJSON && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js index cb5cf9cde9..530735ad84 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "constructor"); - if (desc.value === RegExp.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-163 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "constructor"); + if (desc.value === RegExp.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js index def342d43c..1bc2280169 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.exec) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "exec"); - if (desc.value === RegExp.prototype.exec && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-165 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.exec) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "exec"); + if (desc.value === RegExp.prototype.exec && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js index 71b2f614e6..7afbd498fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.test) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "test"); - if (desc.value === RegExp.prototype.test && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-166 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.test) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "test"); + if (desc.value === RegExp.prototype.test && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js index 5804dbc65a..4125a6dce5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "toString"); - if (desc.value === RegExp.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-167 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RegExp.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "toString"); + if (desc.value === RegExp.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js index 0c762967fb..59af0b4157 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Error.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Error.prototype, "constructor"); - if (desc.value === Error.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-168 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Error.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Error.prototype, "constructor"); + if (desc.value === Error.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js index 3814cdc4fa..0c989ca701 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Error.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Error.prototype, "toString"); - if (desc.value === Error.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-169 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Error.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Error.prototype, "toString"); + if (desc.value === Error.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js index da331ff96e..5bd8cac99e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.create) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "create"); - if (desc.value === Object.create && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-17 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "create"); + if (desc.value === Object.create && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js index b5287f0a9a..a77a8545cd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (EvalError.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(EvalError.prototype, "constructor"); - if (desc.value === EvalError.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-170 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (EvalError.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(EvalError.prototype, "constructor"); + if (desc.value === EvalError.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js index 32aaf397e9..a947f5dd08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RangeError.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RangeError.prototype, "constructor"); - if (desc.value === RangeError.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-171 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (RangeError.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RangeError.prototype, "constructor"); + if (desc.value === RangeError.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js index b102aaab87..c727343317 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (ReferenceError.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(ReferenceError.prototype, "constructor"); - if (desc.value === ReferenceError.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-172 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (ReferenceError.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(ReferenceError.prototype, "constructor"); + if (desc.value === ReferenceError.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js index 71759654bb..3e5fc530b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (SyntaxError.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(SyntaxError.prototype, "constructor"); - if (desc.value === SyntaxError.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-173 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (SyntaxError.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(SyntaxError.prototype, "constructor"); + if (desc.value === SyntaxError.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js index 6026b00c7a..29905b1956 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (TypeError.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(TypeError.prototype, "constructor"); - if (desc.value === TypeError.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-174 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (TypeError.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(TypeError.prototype, "constructor"); + if (desc.value === TypeError.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js index 20dec3447e..a957fa9459 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (URIError.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(URIError.prototype, "constructor"); - if (desc.value === URIError.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-175 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (URIError.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(URIError.prototype, "constructor"); + if (desc.value === URIError.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js index da2d77e4c0..a6e4b83b93 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (JSON.stringify) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(JSON, "stringify"); - if (desc.value === JSON.stringify && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-176 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (JSON.stringify) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(JSON, "stringify"); + if (desc.value === JSON.stringify && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js index 85020b029b..1303fa42d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (JSON.parse) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(JSON, "parse"); - if (desc.value === JSON.parse && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-177 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (JSON.parse) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(JSON, "parse"); + if (desc.value === JSON.parse && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js index 92b6534347..83f11dd501 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.NaN) - */ - - -function testcase() { - // in non-strict mode, 'this' is bound to the global object. - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "NaN"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-178 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Global.NaN) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + // in non-strict mode, 'this' is bound to the global object. + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "NaN"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js index 15b4386e98..4e70ca5d54 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.Infinity) - */ - - -function testcase() { - // in non-strict mode, 'this' is bound to the global object. - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "Infinity"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-179 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Global.Infinity) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + // in non-strict mode, 'this' is bound to the global object. + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "Infinity"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js index 83bedcf81b..0f216419ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.defineProperty) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty"); - if (desc.value === Object.defineProperty && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-18 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.defineProperty) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty"); + if (desc.value === Object.defineProperty && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js index af88996f5c..638079426e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.undefined) - */ - - -function testcase() { - // in non-strict mode, 'this' is bound to the global object. - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "undefined"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-180 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Global.undefined) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + // in non-strict mode, 'this' is bound to the global object. + var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "undefined"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js index 59fc6b96f2..25e56f196b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Object.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-182 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Object.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183.js index 393351600c..80f7a6cf30 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183.js - * @description Object.getOwnPropertyDescriptor returns undefined for non-existent property (arguments_1) on built-in object (Function) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function, "arguments_1"); - - if (desc === undefined) - return true; - else - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-183 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + property (arguments_1) on built-in object (Function) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function, "arguments_1"); + + if (desc === undefined) + return true; + else + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184.js index bacda16a2d..41d2a3c9c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184.js - * @description Object.getOwnPropertyDescriptor returns undefined for non-existent property (caller) on built-in object (Math) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "caller"); - - if (desc === undefined) - return true; - else - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-184 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + property (caller) on built-in object (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "caller"); + + if (desc === undefined) + return true; + else + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js index 069fce14ca..3df787e0d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-185 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Function.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js index f5bde9083b..2e99c0b754 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function.length) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function, "length"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-186 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Function.length) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function, "length"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js index 973f446248..da1b05695b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function (instance).length) - */ - - -function testcase() { - var f = Function('return 42;'); - - var desc = Object.getOwnPropertyDescriptor(f, "length"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-187 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Function (instance).length) +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Function('return 42;'); + + var desc = Object.getOwnPropertyDescriptor(f, "length"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js index f68671ea6e..15f125ccae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js - * @description Object.getOwnPropertyDescriptor returns undefined for non-existent properties on built-ins (Function (instance).name) - */ - - -function testcase() { - var f = Function('return 42;'); - var desc = Object.getOwnPropertyDescriptor(f, "functionNameHopefullyDoesNotExist"); - return desc === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-188 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + properties on built-ins (Function (instance).name) +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Function('return 42;'); + var desc = Object.getOwnPropertyDescriptor(f, "functionNameHopefullyDoesNotExist"); + return desc === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js index 2d6cb2eaf1..9af0600cc3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Array.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-189 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Array.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js index 3cdeb71af6..a21a0b1bff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.defineProperties) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties"); - if (desc.value === Object.defineProperties && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-19 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.defineProperties) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties"); + if (desc.value === Object.defineProperties && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js index efb4893f7f..016999c283 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-190 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (String.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js index ba4702589d..57c4faa1f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String.length) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String, "length"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-191 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (String.length) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String, "length"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js index fb120d2bda..c77eb01fd5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String (instance).length) - */ - - -function testcase() { - var s = new String("abc"); - var desc = Object.getOwnPropertyDescriptor(s, "length"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-192 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (String (instance).length) +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("abc"); + var desc = Object.getOwnPropertyDescriptor(s, "length"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js index ab6b993a3c..41d6795b32 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Boolean.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Boolean, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-193 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Boolean.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Boolean, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js index edb3e4bfdb..a5cd5bb8c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Boolean.length) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Boolean, "length"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-194 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Boolean.length) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Boolean, "length"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js index 70e836e201..8d82b1c7ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-195 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js index bac9317e3f..3f881407fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.MAX_VALUE) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "MAX_VALUE"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-196 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.MAX_VALUE) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "MAX_VALUE"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js index f99cd2904b..f71be62e36 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.MIN_VALUE) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "MIN_VALUE"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-197 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.MIN_VALUE) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "MIN_VALUE"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js index 6b2b838f52..b0c612c9e6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.NaN) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "NaN"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-198 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "NaN"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js index 0e21ff80e9..f3795d8896 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.NEGATIVE_INFINITY) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "NEGATIVE_INFINITY"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-199 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.NEGATIVE_INFINITY) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "NEGATIVE_INFINITY"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js index 67e85d0a6f..ad10c8acc2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js - * @description Object.getOwnPropertyDescriptor returns undefined for non-existent properties - */ - - -function testcase() { - var o = {}; - - var desc = Object.getOwnPropertyDescriptor(o, "foo"); - if (desc === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-2 +description: > + Object.getOwnPropertyDescriptor returns undefined for non-existent + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + var desc = Object.getOwnPropertyDescriptor(o, "foo"); + if (desc === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js index 14b51387c7..18976d10ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.seal) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "seal"); - if (desc.value === Object.seal && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-20 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.seal) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "seal"); + if (desc.value === Object.seal && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js index c9854d54a6..0e87789276 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.POSITIVE_INFINITY) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "POSITIVE_INFINITY"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-200 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.POSITIVE_INFINITY) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "POSITIVE_INFINITY"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js index 97910f48fd..a42debf857 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.length) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number, "length"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-201 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Number.length) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number, "length"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js index 91e5e0ac96..a44510c08c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.E) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "E"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-202 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.E) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "E"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js index 60cf6e5528..f15d97482d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LN10) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "LN10"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-203 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LN10) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "LN10"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js index ef4bd29394..3cf1df3cbd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LN2) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "LN2"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-204 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LN2) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "LN2"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js index 80892253d3..19263ac3fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LOG2E) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "LOG2E"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-205 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LOG2E) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "LOG2E"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js index 01c6ad2c25..d657ae0291 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LOG10E) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "LOG10E"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-206 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.LOG10E) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "LOG10E"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js index e8f042b858..5b28619394 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.PI) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "PI"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-207 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.PI) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "PI"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js index a27109c436..b0b8a2090a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.SQRT1_2) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "SQRT1_2"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-208 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.SQRT1_2) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "SQRT1_2"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js index 5b7163e008..2d4cb2e59d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.SQRT2) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "SQRT2"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-209 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Math.SQRT2) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "SQRT2"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js index 2d2022c892..a74eb3bc63 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.freeze) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "freeze"); - if (desc.value === Object.freeze && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-21 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.freeze) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "freeze"); + if (desc.value === Object.freeze && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js index 610997aa7a..3e53b624d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Date.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-210 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Date.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js index 510a955436..49ef318381 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-211 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RegExp.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js index 937e90fa17..23675eb088 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.source) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "source"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-212 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RegExp.prototype.source) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "source"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js index a90517b660..b2602753f9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.global) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-213 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RegExp.prototype.global) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js index 9808f7f87b..fd61133fe2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.ignoreCase) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-214 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RegExp.prototype.ignoreCase) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js index 5a53c0e09a..144f8c8043 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.multiline) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-215 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RegExp.prototype.multiline) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js index 7e94fe5688..1a1ff06060 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Error.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Error, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-216 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (Error.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Error, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js index 9fc072808b..3b506c7943 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (EvalError.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(EvalError, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-217 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (EvalError.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(EvalError, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js index 16047d9d73..f61921d669 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RangeError.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RangeError, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-218 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (RangeError.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(RangeError, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js index dc0f295637..1b6fdd60f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (ReferenceError.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(ReferenceError, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-219 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (ReferenceError.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(ReferenceError, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js index 67d4557d22..629991639a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.preventExtensions) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions"); - if (desc.value === Object.preventExtensions && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-22 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.preventExtensions) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions"); + if (desc.value === Object.preventExtensions && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js index aa62bba978..392055361d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (SyntaxError.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(SyntaxError, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-220 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (SyntaxError.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(SyntaxError, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js index b1584381fa..3db358ada1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (TypeError.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(TypeError, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-221 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (TypeError.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(TypeError, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js index 523dda0744..9727630bef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js - * @description Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (URIError.prototype) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(URIError, "prototype"); - - if (desc.writable === false && - desc.enumerable === false && - desc.configurable === false && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-222 +description: > + Object.getOwnPropertyDescriptor returns data desc (all false) for + properties on built-ins (URIError.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(URIError, "prototype"); + + if (desc.writable === false && + desc.enumerable === false && + desc.configurable === false && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js index 2721117a43..c53707fa33 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js - * @description Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'value' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.value === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-223 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'value' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.value === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js index 5f47b06a9c..e3b983f142 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js - * @description Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'writable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - try { - desc.value = "overwriteDataProperty"; - return desc.value === "overwriteDataProperty"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-224 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'writable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + try { + desc.value = "overwriteDataProperty"; + return desc.value === "overwriteDataProperty"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js index 7e12f1f4db..cea3069b2d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js - * @description Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'enumerable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - var accessed = false; - - for (var prop in desc) { - if (prop === "value") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-225 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'enumerable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + var accessed = false; + + for (var prop in desc) { + if (prop === "value") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js index 6eb5b2edae..54c67b0de5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js - * @description Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'configurable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - var propDefined = "value" in desc; - - try { - delete desc.value; - var propDeleted = "value" in desc; - - return propDefined && !propDeleted; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-226 +description: > + Object.getOwnPropertyDescriptor - ensure that 'value' property of + returned object is data property with correct 'configurable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + var propDefined = "value" in desc; + + try { + delete desc.value; + var propDeleted = "value" in desc; + + return propDefined && !propDeleted; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js index 09fa0be242..c41485a6de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js - * @description Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'value' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.writable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-227 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'value' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.writable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js index 501d7e22f2..dd9e75e157 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js - * @description Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'writable' attribute - */ -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - try { - desc.writable = "overwriteDataProperty"; - return desc.writable === "overwriteDataProperty"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-228 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'writable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + try { + desc.writable = "overwriteDataProperty"; + return desc.writable === "overwriteDataProperty"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js index e2ab0d79ab..7687fe5870 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js - * @description Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'enumerable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - var accessed = false; - - for (var props in desc) { - if (props === "writable") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-229 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'enumerable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + var accessed = false; + + for (var props in desc) { + if (props === "writable") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js index af70e6a225..2235c567e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isSealed) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "isSealed"); - if (desc.value === Object.isSealed && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-23 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.isSealed) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "isSealed"); + if (desc.value === Object.isSealed && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js index 3b4c65749c..f0b24d7b18 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js - * @description Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'configurable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - var propDefined = ("writable" in desc); - - try { - delete desc.writable; - var propDeleted = "writable" in desc; - - return propDefined && !propDeleted; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-230 +description: > + Object.getOwnPropertyDescriptor - ensure that 'writable' property + of returned object is data property with correct 'configurable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + var propDefined = ("writable" in desc); + + try { + delete desc.writable; + var propDeleted = "writable" in desc; + + return propDefined && !propDeleted; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js index ea52d5879b..18b6fd1435 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js - * @description Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'value' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-231 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct 'value' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js index 61a0895fdd..33f852383a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js - * @description Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'writable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - try { - desc.enumerable = "overwriteDataProperty"; - return desc.enumerable === "overwriteDataProperty"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-232 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct + 'writable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + try { + desc.enumerable = "overwriteDataProperty"; + return desc.enumerable === "overwriteDataProperty"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js index 1f38286d9a..e1dbb17fe5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js - * @description Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'enumerable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - var accessed = false; - - for (var props in desc) { - if (props === "enumerable") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-233 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct + 'enumerable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + var accessed = false; + + for (var props in desc) { + if (props === "enumerable") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js index c496889bb6..ebc90d6ead 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js - * @description Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'configurable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - var propDefined = "enumerable" in desc; - - try { - delete desc.enumerable; - var propDeleted = "enumerable" in desc; - - return propDefined && !propDeleted; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-234 +description: > + Object.getOwnPropertyDescriptor - ensure that 'enumerable' + property of returned object is data property with correct + 'configurable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + var propDefined = "enumerable" in desc; + + try { + delete desc.enumerable; + var propDeleted = "enumerable" in desc; + + return propDefined && !propDeleted; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js index d4c1a45a95..3482929905 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js - * @description Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'value' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.configurable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-235 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct 'value' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.configurable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js index 8158a8c3d3..6a79ce2342 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js - * @description Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'writable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - try { - desc.writable = "overwriteDataProperty"; - return desc.writable === "overwriteDataProperty"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-236 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct + 'writable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + try { + desc.writable = "overwriteDataProperty"; + return desc.writable === "overwriteDataProperty"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js index 7a310c9abb..49dd6b1e78 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js - * @description Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'enumerable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - var accessed = false; - - for (var prop in desc) { - if (prop === "configurable") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-237 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct + 'enumerable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + var accessed = false; + + for (var prop in desc) { + if (prop === "configurable") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js index 268870f761..3e25183db1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js - * @description Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'configurable' attribute - */ - - -function testcase() { - var obj = { "property": "ownDataProperty" }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - var propDefined = "configurable" in desc; - - try { - delete desc.configurable; - var propDeleted = "configurable" in desc; - - return propDefined && !propDeleted; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-238 +description: > + Object.getOwnPropertyDescriptor - ensure that 'configurable' + property of returned object is data property with correct + 'configurable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": "ownDataProperty" }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + var propDefined = "configurable" in desc; + + try { + delete desc.configurable; + var propDeleted = "configurable" in desc; + + return propDefined && !propDeleted; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js index 55ff355e6c..2b19db8442 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js - * @description Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'value' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownDataProperty"; - }; - Object.defineProperty(obj, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.get === fun; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-239 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'value' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownDataProperty"; + }; + Object.defineProperty(obj, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.get === fun; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js index 043aa1dd84..c1613010b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isFrozen) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen"); - if (desc.value === Object.isFrozen && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-24 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.isFrozen) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen"); + if (desc.value === Object.isFrozen && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js index 299b940373..8b8e1e6d2b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js - * @description Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'writable' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownGetProperty"; - }; - Object.defineProperty(obj, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - try { - desc.get = "overwriteGetProperty"; - return desc.get === "overwriteGetProperty"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-240 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'writable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownGetProperty"; + }; + Object.defineProperty(obj, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + try { + desc.get = "overwriteGetProperty"; + return desc.get === "overwriteGetProperty"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js index ed2552ba0a..528b04a397 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js - * @description Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'enumerable' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownDataProperty"; - }; - Object.defineProperty(obj, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - var accessed = false; - - for (var prop in desc) { - if (prop === "get") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-241 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'enumerable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownDataProperty"; + }; + Object.defineProperty(obj, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + var accessed = false; + + for (var prop in desc) { + if (prop === "get") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js index f792dec2e4..128e6042d6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js - * @description Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'configurable' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownDataProperty"; - }; - Object.defineProperty(obj, "property", { - get: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - var propDefined = "get" in desc; - - try { - delete desc.get; - var propDeleted = "get" in desc; - - return propDefined && !propDeleted; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-242 +description: > + Object.getOwnPropertyDescriptor - ensure that 'get' property of + returned object is data property with correct 'configurable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownDataProperty"; + }; + Object.defineProperty(obj, "property", { + get: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + var propDefined = "get" in desc; + + try { + delete desc.get; + var propDeleted = "get" in desc; + + return propDefined && !propDeleted; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js index 3ae7533382..c01ef4fba0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js - * @description Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'value' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownSetProperty"; - }; - Object.defineProperty(obj, "property", { - set: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc.set === fun; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-243 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'value' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownSetProperty"; + }; + Object.defineProperty(obj, "property", { + set: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc.set === fun; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js index ddf9e98344..0be7568ce6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js - * @description Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'writable' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownSetProperty"; - }; - Object.defineProperty(obj, "property", { - set: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - try { - desc.set = "overwriteSetProperty"; - return desc.set === "overwriteSetProperty"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-244 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'writable' attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownSetProperty"; + }; + Object.defineProperty(obj, "property", { + set: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + try { + desc.set = "overwriteSetProperty"; + return desc.set === "overwriteSetProperty"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js index 58636233f6..c12ef71c92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js - * @description Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'enumerable' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownSetProperty"; - }; - Object.defineProperty(obj, "property", { - set: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - var accessed = false; - - for (var prop in desc) { - if (prop === "set") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-245 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'enumerable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownSetProperty"; + }; + Object.defineProperty(obj, "property", { + set: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + var accessed = false; + + for (var prop in desc) { + if (prop === "set") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js index d64c42c40b..603bb97c72 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js - * @description Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'configurable' attribute - */ - - -function testcase() { - var obj = {}; - var fun = function () { - return "ownSetProperty"; - }; - Object.defineProperty(obj, "property", { - set: fun, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - var propDefined = "set" in desc; - - try { - delete desc.set; - var propDeleted = "set" in desc; - - return propDefined && !propDeleted; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-246 +description: > + Object.getOwnPropertyDescriptor - ensure that 'set' property of + returned object is data property with correct 'configurable' + attribute +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var fun = function () { + return "ownSetProperty"; + }; + Object.defineProperty(obj, "property", { + set: fun, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + var propDefined = "set" in desc; + + try { + delete desc.set; + var propDeleted = "set" in desc; + + return propDefined && !propDeleted; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js index dc93e8dde4..b53b467c37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js - * @description Object.getOwnPropertyDescriptor - returned value is an instance of object - */ - - -function testcase() { - var obj = { "property": 100 }; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return desc instanceof Object; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-247 +description: > + Object.getOwnPropertyDescriptor - returned value is an instance of + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "property": 100 }; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return desc instanceof Object; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js index 6257adbd32..c4b4e05304 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js - * @description Object.getOwnPropertyDescriptor - returned object contains the property 'value' if the value of property 'value' is not explicitly specified when defined by Object.defineProperty - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "property", { - writable: true, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return "value" in desc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-248 +description: > + Object.getOwnPropertyDescriptor - returned object contains the + property 'value' if the value of property 'value' is not + explicitly specified when defined by Object.defineProperty +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "property", { + writable: true, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return "value" in desc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js index ef013f414e..877756f41f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js - * @description Object.getOwnPropertyDescriptor - returned object contains the property 'set' if the value of property 'set' is not explicitly specified when defined by Object.defineProperty. - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "property", { - get: function () { }, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return "set" in desc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-249 +description: > + Object.getOwnPropertyDescriptor - returned object contains the + property 'set' if the value of property 'set' is not explicitly + specified when defined by Object.defineProperty. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "property", { + get: function () { }, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return "set" in desc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js index ed54baa3ee..f045e1df53 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isExtensible) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible"); - if (desc.value === Object.isExtensible && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-25 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.isExtensible) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible"); + if (desc.value === Object.isExtensible && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js index 8a6cdbf873..13f3138dde 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js - * @description Object.getOwnPropertyDescriptor - returned object contains the property 'get' if the value of property 'get' is not explicitly specified when defined by Object.defineProperty. - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "property", { - set: function () {}, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - - return "get" in desc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-250 +description: > + Object.getOwnPropertyDescriptor - returned object contains the + property 'get' if the value of property 'get' is not explicitly + specified when defined by Object.defineProperty. +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "property", { + set: function () {}, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + + return "get" in desc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js index f2cf7912d7..9b6dc4fce4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.keys) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "keys"); - if (desc.value === Object.keys && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-26 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.keys) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "keys"); + if (desc.value === Object.keys && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js index 0adaeeb613..ae0feae7c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor"); - if (desc.value === Object.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-27 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor"); + if (desc.value === Object.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js index 06c7ec8743..b110a0231a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toString"); - if (desc.value === Object.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-28 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toString"); + if (desc.value === Object.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js index 990a852fd8..45e7372aad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.valueOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "valueOf"); - if (desc.value === Object.prototype.valueOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-29 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "valueOf"); + if (desc.value === Object.prototype.valueOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js index ad8e9c0193..71b4cbf7ce 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js - * @description Object.getOwnPropertyDescriptor returns an object representing an accessor desc for valid accessor properties - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = function () { return 1; } - var d = { get: getter }; - - Object.defineProperty(o, "foo", d); - - var desc = Object.getOwnPropertyDescriptor(o, "foo"); - if (desc.get === getter && - desc.set === undefined && - desc.enumerable === false && - desc.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-3 +description: > + Object.getOwnPropertyDescriptor returns an object representing an + accessor desc for valid accessor properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = function () { return 1; } + var d = { get: getter }; + + Object.defineProperty(o, "foo", d); + + var desc = Object.getOwnPropertyDescriptor(o, "foo"); + if (desc.get === getter && + desc.set === undefined && + desc.enumerable === false && + desc.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js index f4795e2ae1..df2eeae8c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.isPrototypeOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "isPrototypeOf"); - if (desc.value === Object.prototype.isPrototypeOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-30 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.isPrototypeOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "isPrototypeOf"); + if (desc.value === Object.prototype.isPrototypeOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js index 56830b62a1..b8a95357a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.hasOwnProperty) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "hasOwnProperty"); - if (desc.value === Object.prototype.hasOwnProperty && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-31 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.hasOwnProperty) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "hasOwnProperty"); + if (desc.value === Object.prototype.hasOwnProperty && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js index 412910300c..55712d5f76 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.propertyIsEnumerable) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "propertyIsEnumerable"); - if (desc.value === Object.prototype.propertyIsEnumerable && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-32 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.propertyIsEnumerable) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "propertyIsEnumerable"); + if (desc.value === Object.prototype.propertyIsEnumerable && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js index c122b45c37..a24ca4b46d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.toLocaleString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toLocaleString"); - if (desc.value === Object.prototype.toLocaleString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-33 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Object.prototype.toLocaleString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toLocaleString"); + if (desc.value === Object.prototype.toLocaleString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js index 155c150d5c..5adcece768 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function.prototype, "constructor"); - if (desc.value === Function.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-34 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function.prototype, "constructor"); + if (desc.value === Function.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js index 319376d53c..aefda2c813 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); - if (desc.value === Function.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-35 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); + if (desc.value === Function.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js index e8df9e6e64..9c25af9e1a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.apply) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function.prototype, "apply"); - if (desc.value === Function.prototype.apply && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-36 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.apply) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function.prototype, "apply"); + if (desc.value === Function.prototype.apply && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js index f6330a4ca6..23584c0413 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.call) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function.prototype, "call"); - if (desc.value === Function.prototype.call && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-37 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.call) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function.prototype, "call"); + if (desc.value === Function.prototype.call && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js index 702da92185..16fb30d66f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.bind) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind"); - if (desc.value === Function.prototype.bind && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-38 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind"); + if (desc.value === Function.prototype.bind && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js index ad42d3a3b4..af47449332 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "constructor"); - if (desc.value === Array.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-39 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "constructor"); + if (desc.value === Array.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js index d0526e482b..7b9edecfca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.eval) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "eval"); - if (desc.value === global.eval && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-4 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.eval) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "eval"); + if (desc.value === global.eval && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js index 99d7a880b5..3bd725a26c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.concat) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "concat"); - if (desc.value === Array.prototype.concat && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-40 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.concat) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "concat"); + if (desc.value === Array.prototype.concat && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js index e53738ed3c..85df752b7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.join) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "join"); - if (desc.value === Array.prototype.join && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-41 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.join) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "join"); + if (desc.value === Array.prototype.join && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js index 5da001d78a..d8a6c5c659 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reverse) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reverse"); - if (desc.value === Array.prototype.reverse && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-42 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.reverse) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reverse"); + if (desc.value === Array.prototype.reverse && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js index 9bef18be95..dde4813d3c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.slice) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "slice"); - if (desc.value === Array.prototype.slice && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-43 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.slice) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "slice"); + if (desc.value === Array.prototype.slice && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js index 5851791d4e..576b6e8e49 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.sort) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "sort"); - if (desc.value === Array.prototype.sort && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-44 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.sort) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "sort"); + if (desc.value === Array.prototype.sort && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js index bb31d63b71..6c0868e067 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toString"); - if (desc.value === Array.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-45 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toString"); + if (desc.value === Array.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js index cfa4a14dc2..155f3e881b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.push) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "push"); - if (desc.value === Array.prototype.push && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-46 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.push) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "push"); + if (desc.value === Array.prototype.push && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js index fc48061470..07ed1b0fb4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.pop) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "pop"); - if (desc.value === Array.prototype.pop && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-47 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.pop) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "pop"); + if (desc.value === Array.prototype.pop && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js index d6f6e80742..613c1b6e77 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.shift) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "shift"); - if (desc.value === Array.prototype.shift && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-48 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.shift) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "shift"); + if (desc.value === Array.prototype.shift && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js index 79c96545c8..ceb9dbc808 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.unshift) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "unshift"); - if (desc.value === Array.prototype.unshift && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-49 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.unshift) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "unshift"); + if (desc.value === Array.prototype.unshift && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js index ce8e102a00..b268d762ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.parseInt) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "parseInt"); - if (desc.value === global.parseInt && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-5 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.parseInt) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "parseInt"); + if (desc.value === global.parseInt && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js index e07a10ae61..4c7bea2b08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.splice) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "splice"); - if (desc.value === Array.prototype.splice && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-50 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.splice) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "splice"); + if (desc.value === Array.prototype.splice && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js index 883b13cbd9..821fbdc2ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.toLocaleString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toLocaleString"); - if (desc.value === Array.prototype.toLocaleString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-51 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.toLocaleString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toLocaleString"); + if (desc.value === Array.prototype.toLocaleString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js index c5bf6318fb..4430a1a95e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.indexOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf"); - if (desc.value === Array.prototype.indexOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-52 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.indexOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf"); + if (desc.value === Array.prototype.indexOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js index d410f3c519..eb81fdfc8f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.lastIndexOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf"); - if (desc.value === Array.prototype.lastIndexOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-53 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.lastIndexOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf"); + if (desc.value === Array.prototype.lastIndexOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js index 57c34af71b..fae02474b0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.every) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every"); - if (desc.value === Array.prototype.every && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-54 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.every) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every"); + if (desc.value === Array.prototype.every && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js index 544cb33324..1dc850b10f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.some) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some"); - if (desc.value === Array.prototype.some && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-55 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.some) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some"); + if (desc.value === Array.prototype.some && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js index b21caca522..51392d68da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.forEach) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach"); - if (desc.value === Array.prototype.forEach && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-56 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.forEach) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach"); + if (desc.value === Array.prototype.forEach && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js index f067208b5f..27dc092bcb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.map) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map"); - if (desc.value === Array.prototype.map && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-57 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.map) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map"); + if (desc.value === Array.prototype.map && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js index 5b2db2cb71..e6a306c070 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.filter) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter"); - if (desc.value === Array.prototype.filter && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-58 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.filter) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter"); + if (desc.value === Array.prototype.filter && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js index be10d32eb6..235f657a52 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reduce) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); - if (desc.value === Array.prototype.reduce && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-59 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.reduce) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); + if (desc.value === Array.prototype.reduce && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js index 84f8111126..0951418b9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.parseFloat) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "parseFloat"); - if (desc.value === global.parseFloat && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-6 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.parseFloat) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "parseFloat"); + if (desc.value === global.parseFloat && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js index 47cf5192ee..382cfdb7b8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reduceRight) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight"); - if (desc.value === Array.prototype.reduceRight && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-60 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Array.prototype.reduceRight) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight"); + if (desc.value === Array.prototype.reduceRight && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js index b0cf0c7400..d49fb7bee6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.fromCharCode) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String, "fromCharCode"); - if (desc.value === String.fromCharCode && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-61 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.fromCharCode) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String, "fromCharCode"); + if (desc.value === String.fromCharCode && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js index a908db2737..2041b16298 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "constructor"); - if (desc.value === String.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-62 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "constructor"); + if (desc.value === String.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js index 26da43a493..44b6fc209d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.charAt) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "charAt"); - if (desc.value === String.prototype.charAt && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-63 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.charAt) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "charAt"); + if (desc.value === String.prototype.charAt && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js index 05a6ba6707..0e47085a92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.charCodeAt) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "charCodeAt"); - if (desc.value === String.prototype.charCodeAt && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-64 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.charCodeAt) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "charCodeAt"); + if (desc.value === String.prototype.charCodeAt && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js index d569aaf488..45bcbe333b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.concat) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "concat"); - if (desc.value === String.prototype.concat && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-65 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.concat) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "concat"); + if (desc.value === String.prototype.concat && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js index 9491205b2c..cfdf6518e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.indexOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "indexOf"); - if (desc.value === String.prototype.indexOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-66 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.indexOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "indexOf"); + if (desc.value === String.prototype.indexOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js index 8fa3c12dcb..50cc16fc28 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.lastIndexOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "lastIndexOf"); - if (desc.value === String.prototype.lastIndexOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-67 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.lastIndexOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "lastIndexOf"); + if (desc.value === String.prototype.lastIndexOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js index 457f0ac84d..567bc1bc8e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.match) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); - if (desc.value === String.prototype.match && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-68 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.match) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); + if (desc.value === String.prototype.match && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js index 6e8eaa3fb8..690d63ef2a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.replace) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "replace"); - if (desc.value === String.prototype.replace && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-69 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.replace) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "replace"); + if (desc.value === String.prototype.replace && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js index 73d430e21a..153c98bb6f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.isNaN) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "isNaN"); - if (desc.value === global.isNaN && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-7 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.isNaN) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "isNaN"); + if (desc.value === global.isNaN && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js index 12e6aff97f..ecc7fc9255 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.search) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "search"); - if (desc.value === String.prototype.search && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-70 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.search) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "search"); + if (desc.value === String.prototype.search && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js index ce1a61fa4c..0d6d6cef2f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.slice) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "slice"); - if (desc.value === String.prototype.slice && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-71 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.slice) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "slice"); + if (desc.value === String.prototype.slice && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js index 9ce23e85d1..587c24c08b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.split) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "split"); - if (desc.value === String.prototype.split && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-72 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.split) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "split"); + if (desc.value === String.prototype.split && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js index aeac26f130..48ff60434f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substring) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "substring"); - if (desc.value === String.prototype.substring && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-73 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.substring) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "substring"); + if (desc.value === String.prototype.substring && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js index 989e91f652..79c7bde28d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLowerCase) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLowerCase"); - if (desc.value === String.prototype.toLowerCase && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-75 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toLowerCase) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLowerCase"); + if (desc.value === String.prototype.toLowerCase && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js index 590c5988af..2d16ac31aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "toString"); - if (desc.value === String.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-76 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "toString"); + if (desc.value === String.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js index 00d7401fa5..3e0dc66bd8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toUpperCase) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "toUpperCase"); - if (desc.value === String.prototype.toUpperCase && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-77 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toUpperCase) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "toUpperCase"); + if (desc.value === String.prototype.toUpperCase && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js index 3b534ba9f2..65dbd7d50e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.valueOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "valueOf"); - if (desc.value === String.prototype.valueOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-78 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "valueOf"); + if (desc.value === String.prototype.valueOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js index aa02707ec2..1f26cca001 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLocaleLowerCase) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleLowerCase"); - if (desc.value === String.prototype.toLocaleLowerCase && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-79 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toLocaleLowerCase) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleLowerCase"); + if (desc.value === String.prototype.toLocaleLowerCase && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js index b44c9a2419..2eb24ad542 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.isFinite) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "isFinite"); - if (desc.value === global.isFinite && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-8 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.isFinite) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "isFinite"); + if (desc.value === global.isFinite && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js index 43389a4613..0e1f999f3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLocaleUpperCase) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleUpperCase"); - if (desc.value === String.prototype.toLocaleUpperCase && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-80 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.toLocaleUpperCase) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleUpperCase"); + if (desc.value === String.prototype.toLocaleUpperCase && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js index e83d305415..9c2a76e427 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.localeCompare) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "localeCompare"); - if (desc.value === String.prototype.localeCompare && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-81 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.localeCompare) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "localeCompare"); + if (desc.value === String.prototype.localeCompare && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js index ac2ca01184..fac29f2737 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.trim) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim"); - if (desc.value === String.prototype.trim && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-82 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (String.prototype.trim) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim"); + if (desc.value === String.prototype.trim && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js index cd9a503c38..c3fab702b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "constructor"); - if (desc.value === Boolean.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-84 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Boolean.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "constructor"); + if (desc.value === Boolean.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js index f296299387..1a50a396f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "toString"); - if (desc.value === Boolean.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-85 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Boolean.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "toString"); + if (desc.value === Boolean.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js index 5357b46464..395e5d53b0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.valueOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "valueOf"); - if (desc.value === Boolean.prototype.valueOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-86 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Boolean.prototype.valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "valueOf"); + if (desc.value === Boolean.prototype.valueOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js index c5bc879453..e9d1e3499c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.constructor) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "constructor"); - if (desc.value === Number.prototype.constructor && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-88 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.constructor) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "constructor"); + if (desc.value === Number.prototype.constructor && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js index 1cff28ecb9..8ef3396881 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toString"); - if (desc.value === Number.prototype.toString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-89 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toString"); + if (desc.value === Number.prototype.toString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js index 2f57361e1d..ccab0ab497 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.decodeURI) - */ - - -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "decodeURI"); - if (desc.value === global.decodeURI && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-9 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Global.decodeURI) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var global = fnGlobalObject(); + var desc = Object.getOwnPropertyDescriptor(global, "decodeURI"); + if (desc.value === global.decodeURI && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js index 15f66c6fad..caf9b3bb3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toLocaleString) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toLocaleString"); - if (desc.value === Number.prototype.toLocaleString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-90 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toLocaleString) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toLocaleString"); + if (desc.value === Number.prototype.toLocaleString && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js index 05bc0e995b..304860b303 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toFixed) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toFixed"); - if (desc.value === Number.prototype.toFixed && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-91 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toFixed) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toFixed"); + if (desc.value === Number.prototype.toFixed && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js index 682cef8751..37e8d3e148 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toExponential) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toExponential"); - if (desc.value === Number.prototype.toExponential && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-92 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toExponential) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toExponential"); + if (desc.value === Number.prototype.toExponential && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js index eb8dc281f8..2649dd849b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toPrecision) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toPrecision"); - if (desc.value === Number.prototype.toPrecision && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-93 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.toPrecision) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toPrecision"); + if (desc.value === Number.prototype.toPrecision && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js index 87158de924..90f910f686 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.valueOf) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Number.prototype, "valueOf"); - if (desc.value === Number.prototype.valueOf && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-94 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Number.prototype.valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Number.prototype, "valueOf"); + if (desc.value === Number.prototype.valueOf && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js index f51feb9c87..2d35a92b4f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.abs) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "abs"); - if (desc.value === Math.abs && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-96 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.abs) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "abs"); + if (desc.value === Math.abs && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js index 06e3eb9f1a..afe53ad62b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.acos) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "acos"); - if (desc.value === Math.acos && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-97 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.acos) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "acos"); + if (desc.value === Math.acos && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js index 41267fb1f7..e7489a7ac5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.asin) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "asin"); - if (desc.value === Math.asin && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-98 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.asin) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "asin"); + if (desc.value === Math.asin && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js index 88bdc41bbd..11cf3bb53d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js - * @description Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.atan) - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Math, "atan"); - if (desc.value === Math.atan && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.3-4-99 +description: > + Object.getOwnPropertyDescriptor returns data desc for functions on + built-ins (Math.atan) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Math, "atan"); + if (desc.value === Math.atan && + desc.writable === true && + desc.enumerable === false && + desc.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js index 1282232542..047361a315 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js - * @description Object.getOwnPropertyNames must exist as a function - */ - - -function testcase() { - if (typeof(Object.getOwnPropertyNames) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-0-1 +description: Object.getOwnPropertyNames must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + if (typeof(Object.getOwnPropertyNames) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js index 8c4a69c23d..0fa7c77adf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js - * @description Object.getOwnPropertyNames must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.getOwnPropertyNames.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-0-2 +description: > + Object.getOwnPropertyNames must exist as a function taking 1 + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.getOwnPropertyNames.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js index 4e7ffe5bb6..4aac076ffc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js - * @description Object.getOwnPropertyNames throws TypeError if 'O' is undefined - */ - - -function testcase() { - try { - Object.getOwnPropertyNames(undefined); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-1-2 +description: Object.getOwnPropertyNames throws TypeError if 'O' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyNames(undefined); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js index 24f774da12..6b9267ebf3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js - * @description Object.getOwnPropertyNames throws TypeError if 'O' is null - */ - - -function testcase() { - try { - Object.getOwnPropertyNames(null); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-1-3 +description: Object.getOwnPropertyNames throws TypeError if 'O' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyNames(null); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js index a3c9f97810..ece9b230fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js - * @description Object.getOwnPropertyNames throws TypeError if 'O' is a boolean - */ - - -function testcase() { - try { - Object.getOwnPropertyNames(true); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-1-4 +description: Object.getOwnPropertyNames throws TypeError if 'O' is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyNames(true); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js index 4e5d6c2312..9dd7d265ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js - * @description Object.getOwnPropertyNames throws TypeError if 'O' is a string - */ - - -function testcase() { - try { - Object.getOwnPropertyNames("abc"); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-1-5 +description: Object.getOwnPropertyNames throws TypeError if 'O' is a string +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyNames("abc"); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js index cd7acab930..96cf9c8b61 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js - * @description Object.getOwnPropertyNames throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.getOwnPropertyNames(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-1 +description: > + Object.getOwnPropertyNames throws TypeError if type of first param + is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.getOwnPropertyNames(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js index fc3a6f1c3a..b15c8dcfec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js - * @description Object.getOwnPropertyNames - returned array is an array according to Array.isArray - */ - - -function testcase() { - - var obj = {}; - var result = Object.getOwnPropertyNames(obj); - - return Array.isArray(result); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-2-1 +description: > + Object.getOwnPropertyNames - returned array is an array according + to Array.isArray +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var result = Object.getOwnPropertyNames(obj); + + return Array.isArray(result); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js index 3be99ea27d..070c395097 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js - * @description Object.getOwnPropertyNames - returned array is an instance of Array - */ - - -function testcase() { - var obj = {}; - var result = Object.getOwnPropertyNames(obj); - - return result instanceof Array; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-2-2 +description: Object.getOwnPropertyNames - returned array is an instance of Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var result = Object.getOwnPropertyNames(obj); + + return result instanceof Array; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js index 450b4bc28b..74fe6f5825 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js - * @description Object.getOwnPropertyNames - length of returned array is initialized to 0 - */ - - -function testcase() { - - var obj = {}; - var result = Object.getOwnPropertyNames(obj); - - return result.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-2-3 +description: > + Object.getOwnPropertyNames - length of returned array is + initialized to 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var result = Object.getOwnPropertyNames(obj); + + return result.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js index 310376bc33..2efbafeddc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js - * @description Object.getOwnPropertyNames - returned array is the standard built-in constructor - */ - - -function testcase() { - var oldArray = Array; - Array = function () { - throw new Error("invoke customer defined Array!"); - }; - - var obj = {}; - try { - var result = Object.getOwnPropertyNames(obj); - return Object.prototype.toString.call(result) === "[object Array]"; - } catch (ex) { - return false; - } finally { - Array = oldArray; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-2-4 +description: > + Object.getOwnPropertyNames - returned array is the standard + built-in constructor +includes: [runTestCase.js] +---*/ + +function testcase() { + var oldArray = Array; + Array = function () { + throw new Error("invoke customer defined Array!"); + }; + + var obj = {}; + try { + var result = Object.getOwnPropertyNames(obj); + return Object.prototype.toString.call(result) === "[object Array]"; + } catch (ex) { + return false; + } finally { + Array = oldArray; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js index 4048d201b1..9802ae0e64 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js - * @description Object.getOwnPropertyNames - elements of the returned array start from index 0 - */ - - -function testcase() { - var obj = { prop1: 1001 }; - - var arr = Object.getOwnPropertyNames(obj); - - return arr.hasOwnProperty(0) && arr[0] === "prop1"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-3-1 +description: > + Object.getOwnPropertyNames - elements of the returned array start + from index 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop1: 1001 }; + + var arr = Object.getOwnPropertyNames(obj); + + return arr.hasOwnProperty(0) && arr[0] === "prop1"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1.js index 536b2c5350..d47f39bf4c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1.js - * @description Object.getOwnPropertyNames returns array of property names (Global) - */ - - -function testcase() { - var result = Object.getOwnPropertyNames(fnGlobalObject()); - var expResult = ["NaN", "Infinity", "undefined", "eval", "parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "Array", "String", "Boolean", "Number", "Date", "Date", "RegExp", "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "JSON"]; - - var result1 = {}; - for (var p in result) { - result1[result[p]] = true; - } - - for (var p1 in expResult) { - if (!result1[expResult[p1]]) { - return false; - } - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-1 +description: Object.getOwnPropertyNames returns array of property names (Global) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var result = Object.getOwnPropertyNames(fnGlobalObject()); + var expResult = ["NaN", "Infinity", "undefined", "eval", "parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "Array", "String", "Boolean", "Number", "Date", "Date", "RegExp", "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "JSON"]; + + var result1 = {}; + for (var p in result) { + result1[result[p]] = true; + } + + for (var p1 in expResult) { + if (!result1[expResult[p1]]) { + return false; + } + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js index 2b2f46434b..0e3f677773 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js - * @description Object.getOwnPropertyNames returns array of property names (Object) - */ - - -function testcase() { - var result = Object.getOwnPropertyNames(Object); - var expResult = ["getPrototypeOf", "getOwnPropertyDescriptor", "getOwnPropertyNames", "create", "defineProperty", "defineProperties", "seal", "freeze", "preventExtensions", "isSealed", "isFrozen", "isExtensible", "keys", "prototype", "length"]; - var found; - - return arrayContains(result, expResult); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-2 +description: Object.getOwnPropertyNames returns array of property names (Object) +includes: + - runTestCase.js + - arrayContains.js +---*/ + +function testcase() { + var result = Object.getOwnPropertyNames(Object); + var expResult = ["getPrototypeOf", "getOwnPropertyDescriptor", "getOwnPropertyNames", "create", "defineProperty", "defineProperties", "seal", "freeze", "preventExtensions", "isSealed", "isFrozen", "isExtensible", "keys", "prototype", "length"]; + var found; + + return arrayContains(result, expResult); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js index dc5eb35e00..e94459ddee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js - * @description Object.getOwnPropertyNames - inherited data properties are not pushed into the returned array - */ - - -function testcase() { - - var proto = { "parent": "parent" }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - var result = Object.getOwnPropertyNames(child); - - for (var p in result) { - if (result[p] === "parent") { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-36 +description: > + Object.getOwnPropertyNames - inherited data properties are not + pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { "parent": "parent" }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + var result = Object.getOwnPropertyNames(child); + + for (var p in result) { + if (result[p] === "parent") { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js index 9c29b6daa3..0513d34c8f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js - * @description Object.getOwnPropertyNames - inherited accessor properties are not pushed into the returned array - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "parent", { - get: function () { - return "parent"; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - var result = Object.getOwnPropertyNames(child); - - for (var p in result) { - if (result[p] === "parent") { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-37 +description: > + Object.getOwnPropertyNames - inherited accessor properties are not + pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "parent", { + get: function () { + return "parent"; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + var result = Object.getOwnPropertyNames(child); + + for (var p in result) { + if (result[p] === "parent") { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js index 314850f2c3..8e7f91620a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js - * @description Object.getOwnPropertyNames - own data properties are pushed into the returned array - */ - - -function testcase() { - - var obj = { "a": "a" }; - - var result = Object.getOwnPropertyNames(obj); - - return result[0] === "a"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-38 +description: > + Object.getOwnPropertyNames - own data properties are pushed into + the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { "a": "a" }; + + var result = Object.getOwnPropertyNames(obj); + + return result[0] === "a"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js index 5e780f6e14..b264854cea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js - * @description Object.getOwnPropertyNames - own accessor properties are pushed into the returned array - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "a", { - get: function () { - return "a"; - }, - configurable: true - }); - - var result = Object.getOwnPropertyNames(obj); - - return result[0] === "a"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-39 +description: > + Object.getOwnPropertyNames - own accessor properties are pushed + into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "a", { + get: function () { + return "a"; + }, + configurable: true + }); + + var result = Object.getOwnPropertyNames(obj); + + return result[0] === "a"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js index 4d5d9d051d..82afbe6a00 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js - * @description Object.getOwnPropertyNames - inherited data property of String object 'O' is not pushed into the returned array - */ - - -function testcase() { - try { - var str = new String("abc"); - - String.prototype.protoProperty = "protoString"; - - var result = Object.getOwnPropertyNames(str); - - for (var p in result) { - if (result[p] === "protoProperty") { - return false; - } - } - - return true; - } finally { - delete String.prototype.protoProperty; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-40 +description: > + Object.getOwnPropertyNames - inherited data property of String + object 'O' is not pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var str = new String("abc"); + + String.prototype.protoProperty = "protoString"; + + var result = Object.getOwnPropertyNames(str); + + for (var p in result) { + if (result[p] === "protoProperty") { + return false; + } + } + + return true; + } finally { + delete String.prototype.protoProperty; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js index 8e230ca06b..004b1b9d9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js - * @description Object.getOwnPropertyNames - inherited accessor property of String object 'O' is not pushed into the returned array - */ - - -function testcase() { - try { - var str = new String("abc"); - - Object.defineProperty(String.prototype, "protoProperty", { - get: function () { - return "protoString"; - }, - configurable: true - }); - - var result = Object.getOwnPropertyNames(str); - - for (var p in result) { - if (result[p] === "protoProperty") { - return false; - } - } - return true; - } finally { - delete String.prototype.protoProperty; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-41 +description: > + Object.getOwnPropertyNames - inherited accessor property of String + object 'O' is not pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var str = new String("abc"); + + Object.defineProperty(String.prototype, "protoProperty", { + get: function () { + return "protoString"; + }, + configurable: true + }); + + var result = Object.getOwnPropertyNames(str); + + for (var p in result) { + if (result[p] === "protoProperty") { + return false; + } + } + return true; + } finally { + delete String.prototype.protoProperty; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js index 0eeb9a8113..a0e87b2947 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js - * @description Object.getOwnPropertyNames - own data property of String object 'O' is pushed into the returned array - */ - - -function testcase() { - var str = new String("abc"); - - Object.defineProperty(str, "ownProperty", { - value: "ownString", - configurable: true - }); - - var result = Object.getOwnPropertyNames(str); - - for (var p in result) { - if (result[p] === "ownProperty") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-42 +description: > + Object.getOwnPropertyNames - own data property of String object + 'O' is pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = new String("abc"); + + Object.defineProperty(str, "ownProperty", { + value: "ownString", + configurable: true + }); + + var result = Object.getOwnPropertyNames(str); + + for (var p in result) { + if (result[p] === "ownProperty") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js index fd34f1ae91..91e42290d7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js - * @description Object.getOwnPropertyNames - own accessor property of String object 'O' is pushed into the returned array - */ - - -function testcase() { - var str = new String("abc"); - - Object.defineProperty(str, "ownProperty", { - get: function () { - return "ownString"; - }, - configurable: true - }); - - var result = Object.getOwnPropertyNames(str); - - for (var p in result) { - if (result[p] === "ownProperty") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-43 +description: > + Object.getOwnPropertyNames - own accessor property of String + object 'O' is pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = new String("abc"); + + Object.defineProperty(str, "ownProperty", { + get: function () { + return "ownString"; + }, + configurable: true + }); + + var result = Object.getOwnPropertyNames(str); + + for (var p in result) { + if (result[p] === "ownProperty") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js index 752465bb9b..232015fb12 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js - * @description Object.getOwnPropertyNames - own index properties of String object are pushed into the returned Array - */ - - -function testcase() { - - var str = new String("abc"); - str[5] = "de"; - - var expResult = ["0", "1", "2", "length", "5"]; - - var result = Object.getOwnPropertyNames(str); - - return compareArray(expResult, result); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-44 +description: > + Object.getOwnPropertyNames - own index properties of String object + are pushed into the returned Array +includes: + - runTestCase.js + - compareArray.js +---*/ + +function testcase() { + + var str = new String("abc"); + str[5] = "de"; + + var expResult = ["0", "1", "2", "length", "5"]; + + var result = Object.getOwnPropertyNames(str); + + return compareArray(expResult, result); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js index ca5c1234e5..06bb452b47 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js - * @description Object.getOwnPropertyNames - inherited data property of Array object 'O' is not pushed into the returned array. - */ - - -function testcase() { - try { - var arr = [0, 1, 2]; - - Array.prototype.protoProperty = "protoArray"; - - var result = Object.getOwnPropertyNames(arr); - - for (var p in result) { - if (result[p] === "protoProperty") { - return false; - } - } - return true; - } finally { - delete Array.prototype.protoProperty; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-45 +description: > + Object.getOwnPropertyNames - inherited data property of Array + object 'O' is not pushed into the returned array. +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var arr = [0, 1, 2]; + + Array.prototype.protoProperty = "protoArray"; + + var result = Object.getOwnPropertyNames(arr); + + for (var p in result) { + if (result[p] === "protoProperty") { + return false; + } + } + return true; + } finally { + delete Array.prototype.protoProperty; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js index fdb7d79a16..efc47da516 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js - * @description Object.getOwnPropertyNames - inherited accessor property of Array object 'O' is not pushed into the returned array. - */ - - -function testcase() { - try { - var arr = [0, 1, 2]; - - Object.defineProperty(Array.prototype, "protoProperty", { - get: function () { - return "protoArray"; - }, - configurable: true - }); - - var result = Object.getOwnPropertyNames(arr); - - for (var p in result) { - if (result[p] === "protoProperty") { - return false; - } - } - return true; - } finally { - delete Array.prototype.protoProperty; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-46 +description: > + Object.getOwnPropertyNames - inherited accessor property of Array + object 'O' is not pushed into the returned array. +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var arr = [0, 1, 2]; + + Object.defineProperty(Array.prototype, "protoProperty", { + get: function () { + return "protoArray"; + }, + configurable: true + }); + + var result = Object.getOwnPropertyNames(arr); + + for (var p in result) { + if (result[p] === "protoProperty") { + return false; + } + } + return true; + } finally { + delete Array.prototype.protoProperty; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js index d40936ea30..9b499c694e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js - * @description Object.getOwnPropertyNames - own data property of Array object 'O' is pushed into the returned array - */ - - -function testcase() { - var arr = [0, 1, 2]; - arr.ownProperty = "ownArray"; - - var result = Object.getOwnPropertyNames(arr); - - for (var p in result) { - if (result[p] === "ownProperty") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-47 +description: > + Object.getOwnPropertyNames - own data property of Array object 'O' + is pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [0, 1, 2]; + arr.ownProperty = "ownArray"; + + var result = Object.getOwnPropertyNames(arr); + + for (var p in result) { + if (result[p] === "ownProperty") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js index 280eae9fa1..dc54b8b09d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js - * @description Object.getOwnPropertyNames - own accessor property of Array object 'O' is pushed into the returned array. - */ - - -function testcase() { - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "ownProperty", { - get: function () { - return "ownArray"; - }, - configurable: true - }); - - var result = Object.getOwnPropertyNames(arr); - - for (var p in result) { - if (result[p] === "ownProperty") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-48 +description: > + Object.getOwnPropertyNames - own accessor property of Array object + 'O' is pushed into the returned array. +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "ownProperty", { + get: function () { + return "ownArray"; + }, + configurable: true + }); + + var result = Object.getOwnPropertyNames(arr); + + for (var p in result) { + if (result[p] === "ownProperty") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js index 6a8055cc08..5e5a6fc546 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js - * @description Object.getOwnPropertyNames - own index properties of Array objcect are pushed into the returned Array - */ - - -function testcase() { - var arr = [0, 1, 2]; - - var expResult = ["0", "1", "2", "length"]; - - var result = Object.getOwnPropertyNames(arr); - - return compareArray(expResult, result); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-49 +description: > + Object.getOwnPropertyNames - own index properties of Array objcect + are pushed into the returned Array +includes: + - runTestCase.js + - compareArray.js +---*/ + +function testcase() { + var arr = [0, 1, 2]; + + var expResult = ["0", "1", "2", "length"]; + + var result = Object.getOwnPropertyNames(arr); + + return compareArray(expResult, result); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js index ae52bd7938..62365293a6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js - * @description Object.getOwnPropertyNames - non-enumerable own property of 'O' is pushed into the returned Array - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "nonEnumerableProp", { - value: 10, - enumerable: false, - configurable: true - }); - - var result = Object.getOwnPropertyNames(obj); - - return result[0] === "nonEnumerableProp"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-50 +description: > + Object.getOwnPropertyNames - non-enumerable own property of 'O' is + pushed into the returned Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "nonEnumerableProp", { + value: 10, + enumerable: false, + configurable: true + }); + + var result = Object.getOwnPropertyNames(obj); + + return result[0] === "nonEnumerableProp"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js index a5555e9778..8e819f3f70 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js - * @description Object.getOwnPropertyNames - descriptor of resultant array is all true - */ - - -function testcase() { - var obj = new Object(); - obj.x = 1; - obj.y = 2; - var result = Object.getOwnPropertyNames(obj); - var desc = Object.getOwnPropertyDescriptor(result,"0"); - if (desc.enumerable === true && - desc.configurable === true && - desc.writable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-b-1 +description: > + Object.getOwnPropertyNames - descriptor of resultant array is all + true +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Object(); + obj.x = 1; + obj.y = 2; + var result = Object.getOwnPropertyNames(obj); + var desc = Object.getOwnPropertyDescriptor(result,"0"); + if (desc.enumerable === true && + desc.configurable === true && + desc.writable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js index b7de129c13..e8257e71e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js @@ -1,42 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js - * @description Object.getOwnPropertyNames - all own properties are pushed into the returned array - */ - - -function testcase() { - var obj = { "a": "a" }; - - Object.defineProperty(obj, "b", { - get: function () { - return "b"; - }, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "c", { - get: function () { - return "c"; - }, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "d", { - value: "d", - enumerable: false, - configurable: true - }); - - var result = Object.getOwnPropertyNames(obj); - var expResult = ["a", "b", "c", "d"]; - - return compareArray(expResult, result); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-b-2 +description: > + Object.getOwnPropertyNames - all own properties are pushed into + the returned array +includes: + - runTestCase.js + - compareArray.js +---*/ + +function testcase() { + var obj = { "a": "a" }; + + Object.defineProperty(obj, "b", { + get: function () { + return "b"; + }, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "c", { + get: function () { + return "c"; + }, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "d", { + value: "d", + enumerable: false, + configurable: true + }); + + var result = Object.getOwnPropertyNames(obj); + var expResult = ["a", "b", "c", "d"]; + + return compareArray(expResult, result); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js index b8d7574c46..9d2e853ee2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js - * @description Object.getOwnPropertyNames - own property named empty('') is pushed into the returned array - */ - - -function testcase() { - var obj = { "": "empty" }; - - var result = Object.getOwnPropertyNames(obj); - - for (var p in result) { - if (result[p] === "") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-b-3 +description: > + Object.getOwnPropertyNames - own property named empty('') is + pushed into the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "": "empty" }; + + var result = Object.getOwnPropertyNames(obj); + + for (var p in result) { + if (result[p] === "") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js index 0f97dc8afb..82e7b882cb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js - * @description Object.getOwnPropertyNames - elements of the returned array are writable - */ - - -function testcase() { - var obj = { "a": "a" }; - - var result = Object.getOwnPropertyNames(obj); - - try { - var beforeOverride = (result[0] === "a"); - result[0] = "b"; - var afterOverride = (result[0] === "b"); - - return beforeOverride && afterOverride; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-b-4 +description: > + Object.getOwnPropertyNames - elements of the returned array are + writable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "a": "a" }; + + var result = Object.getOwnPropertyNames(obj); + + try { + var beforeOverride = (result[0] === "a"); + result[0] = "b"; + var afterOverride = (result[0] === "b"); + + return beforeOverride && afterOverride; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js index b39ebac3a5..3264f29014 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js - * @description Object.getOwnPropertyNames - elements of the returned array are enumerable - */ - - -function testcase() { - var obj = { "a": "a" }; - - var result = Object.getOwnPropertyNames(obj); - - for (var p in result) { - if (result[p] === "a") { - return true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-b-5 +description: > + Object.getOwnPropertyNames - elements of the returned array are + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "a": "a" }; + + var result = Object.getOwnPropertyNames(obj); + + for (var p in result) { + if (result[p] === "a") { + return true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js index 1dfcdd7e13..6e9dca89d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js - * @description Object.getOwnPropertyNames - elements of the returned array are configurable - */ - - -function testcase() { - var obj = { "a": "a" }; - - var result = Object.getOwnPropertyNames(obj); - - var beforeDeleted = (result.hasOwnProperty("0")); - delete result[0]; - var afterDeleted = (result.hasOwnProperty("0")); - - return beforeDeleted && !afterDeleted; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.4-4-b-6 +description: > + Object.getOwnPropertyNames - elements of the returned array are + configurable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "a": "a" }; + + var result = Object.getOwnPropertyNames(obj); + + var beforeDeleted = (result.hasOwnProperty("0")); + delete result[0]; + var afterDeleted = (result.hasOwnProperty("0")); + + return beforeDeleted && !afterDeleted; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.4/S15.2.3.4_A1_T1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.4/S15.2.3.4_A1_T1.js index 27446d5326..ce2045ff3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.4/S15.2.3.4_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.4/S15.2.3.4_A1_T1.js @@ -1,16 +1,17 @@ // Copyright 2011 Google, Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.getOwnProperties and Object.prototype.hasOwnProperty should - * agree on what the own properties are. - * - * @path ch15/15.2/15.2.3/15.2.3.4/S15.2.3.4_A1_T1.js - * @description Check that all the own property names reported by - * Object.getOwnPropertyNames on a strict function are names that - * hasOwnProperty agrees are own properties. - * @onlyStrict - */ +/*--- +info: > + Object.getOwnProperties and Object.prototype.hasOwnProperty should + agree on what the own properties are. +es5id: 15.2.3.4_A1_T1 +description: > + Check that all the own property names reported by + Object.getOwnPropertyNames on a strict function are names that + hasOwnProperty agrees are own properties. +flags: [onlyStrict] +---*/ "use strict"; function foo() {} diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js index dfa779fa24..2f85c1eb2d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js - * @description Object.create must exist as a function - */ - - -function testcase() { - if (typeof(Object.create) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-0-1 +description: Object.create must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + if (typeof(Object.create) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js index f80b68210f..a950989524 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js - * @description Object.create must exist as a function taking 2 parameters - */ - - -function testcase() { - if (Object.create.length === 2) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-0-2 +description: Object.create must exist as a function taking 2 parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.create.length === 2) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js index db88752170..e76d5f4002 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js - * @description Object.create throws TypeError if 'O' is undefined - */ - - -function testcase() { - - try { - Object.create(undefined); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-1-1 +description: Object.create throws TypeError if 'O' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create(undefined); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js index 4b6fca4d33..c0dda8d822 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js - * @description Object.create TypeError is not thrown if 'O' is null - */ - - -function testcase() { - try { - Object.create(null); - return true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-1-2 +description: Object.create TypeError is not thrown if 'O' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.create(null); + return true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js index a4de55a2e4..20f316da37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js - * @description Object.create throws TypeError if 'O' is a boolean primitive - */ - - -function testcase() { - - try { - Object.create(true); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-1-3 +description: Object.create throws TypeError if 'O' is a boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create(true); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js index 61170283f8..5d829f2bb0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js - * @description Object.create throws TypeError if 'O' is a number primitive - */ - - -function testcase() { - - try { - Object.create(2); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-1-4 +description: Object.create throws TypeError if 'O' is a number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create(2); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js index b887240820..e2d619016d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js - * @description Object.create throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.create(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-1 +description: Object.create throws TypeError if type of first param is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.create(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js index 9e36ee730c..b1726e7639 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * create sets the [[Prototype]] of the created object to first parameter. - * This can be checked using isPrototypeOf, or getPrototypeOf. - * - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js - * @description Object.create creates new Object - */ - - -function testcase() { - function base() {} - var b = new base(); - var prop = new Object(); - var d = Object.create(b); - - if (typeof d === 'object') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + create sets the [[Prototype]] of the created object to first parameter. + This can be checked using isPrototypeOf, or getPrototypeOf. +es5id: 15.2.3.5-2-1 +description: Object.create creates new Object +includes: [runTestCase.js] +---*/ + +function testcase() { + function base() {} + var b = new base(); + var prop = new Object(); + var d = Object.create(b); + + if (typeof d === 'object') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js index d91ece076d..282a4d92e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js - * @description Object.create - returned object is an instance of Object - */ - - -function testcase() { - - var newObj = Object.create({}); - return newObj instanceof Object; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-2-2 +description: Object.create - returned object is an instance of Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}); + return newObj instanceof Object; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js index 87381b28ed..95eee6d854 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * create sets the [[Prototype]] of the created object to first parameter. - * This can be checked using isPrototypeOf, or getPrototypeOf. - * - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js - * @description Object.create sets the prototype of the passed-in object - */ - - -function testcase() { - function base() {} - var b = new base(); - var d = Object.create(b); - - if (Object.getPrototypeOf(d) === b && - b.isPrototypeOf(d) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + create sets the [[Prototype]] of the created object to first parameter. + This can be checked using isPrototypeOf, or getPrototypeOf. +es5id: 15.2.3.5-3-1 +description: Object.create sets the prototype of the passed-in object +includes: [runTestCase.js] +---*/ + +function testcase() { + function base() {} + var b = new base(); + var d = Object.create(b); + + if (Object.getPrototypeOf(d) === b && + b.isPrototypeOf(d) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js index 4c0d6c331c..ce5b3a458f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * create sets the [[Prototype]] of the created object to first parameter. - * This can be checked using isPrototypeOf, or getPrototypeOf. - * - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js - * @description Object.create sets the prototype of the passed-in object and adds new properties - */ - - -function testcase() { - function base() {} - var b = new base(); - var prop = new Object(); - var d = Object.create(b,{ "x": {value: true,writable: false}, - "y": {value: "str",writable: false} }); - - if (Object.getPrototypeOf(d) === b && - b.isPrototypeOf(d) === true && - d.x === true && - d.y === "str" && - b.x === undefined && - b.y === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + create sets the [[Prototype]] of the created object to first parameter. + This can be checked using isPrototypeOf, or getPrototypeOf. +es5id: 15.2.3.5-4-1 +description: > + Object.create sets the prototype of the passed-in object and adds + new properties +includes: [runTestCase.js] +---*/ + +function testcase() { + function base() {} + var b = new base(); + var prop = new Object(); + var d = Object.create(b,{ "x": {value: true,writable: false}, + "y": {value: "str",writable: false} }); + + if (Object.getPrototypeOf(d) === b && + b.isPrototypeOf(d) === true && + d.x === true && + d.y === "str" && + b.x === undefined && + b.y === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js index 24f542426a..a08820f4a0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js - * @description Object.create - argument 'Properties' is the Math object (15.2.3.7 step 2) - */ - - -function testcase() { - - var result = false; - Object.defineProperty(Math, "prop", { - get: function () { - result = (this === Math); - return {}; - }, - enumerable: true, - configurable: true - }); - - try { - var newObj = Object.create({}, Math); - return result && newObj.hasOwnProperty("prop"); - } finally { - delete Math.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-10 +description: > + Object.create - argument 'Properties' is the Math object (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + Object.defineProperty(Math, "prop", { + get: function () { + result = (this === Math); + return {}; + }, + enumerable: true, + configurable: true + }); + + try { + var newObj = Object.create({}, Math); + return result && newObj.hasOwnProperty("prop"); + } finally { + delete Math.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js index f2ec925e98..54946e2bd8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js - * @description Object.create - 'configurable' property of one property in 'Properties' is not present (8.10.5 step 4) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - value: "ownDataProperty" - } - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-100 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is not present (8.10.5 step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + value: "ownDataProperty" + } + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js index fc189c047b..3eeba23d90 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: false - } - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-101 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: false + } + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js index 37da96bded..b53dd44076 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = { - configurable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-102 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an inherited data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + configurable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js index 8a0ab5825e..de387bee37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = { - configurable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "configurable", { - value: false - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-103 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own data property that overrides an inherited data + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + configurable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "configurable", { + value: false + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js index 1a0ceb2d10..46efe998e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "configurable", { - value: false - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-104 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own data property that overrides an inherited + accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "configurable", { + value: false + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js index 57fd329d44..0af56dda4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = {}; - Object.defineProperty(descObj, "configurable", { - get: function () { - return true; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-105 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = {}; + Object.defineProperty(descObj, "configurable", { + get: function () { + return true; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js index 8885749dae..e43bd8e18a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-106 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an inherited accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js index 703236a0ff..b46f0aed17 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = { - configurable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "configurable", { - get: function () { - return false; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-107 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own accessor property that overrides an inherited + data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + configurable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "configurable", { + get: function () { + return false; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js index fa58eefb8a..fdae7da9d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "configurable", { - get: function () { - return false; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-108 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own accessor property that overrides an inherited + accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "configurable", { + get: function () { + return false; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js index df4ca63d34..ce2f39ee96 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = {}; - Object.defineProperty(descObj, "configurable", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-109 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own accessor property without a get function + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = {}; + Object.defineProperty(descObj, "configurable", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js index 68c465b25d..abdf0c9c28 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js - * @description Object.create - argument 'Properties' is a Date object (15.2.3.7 step 2) - */ - - -function testcase() { - - var props = new Date(); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Date; - return {}; - }, - enumerable: true - }); - var newObj = Object.create({}, props); - return result && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-11 +description: > + Object.create - argument 'Properties' is a Date object (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Date(); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Date; + return {}; + }, + enumerable: true + }); + var newObj = Object.create({}, props); + return result && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js index 2952f0de8d..0813fa1a2a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js - * @description Object.create - 'configurable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "configurable", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-110 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is own accessor property without a get function, + which overrides an inherited accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "configurable", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js index f18ba9488d..ce43122524 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 4.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "configurable", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-111 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an inherited accessor property without a get + function (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "configurable", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js index c10c6e052e..8801531990 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js - * @description Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = function () { }; - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-112 +description: > + Object.create - one property in 'Properties' is a Function object + which implements its own [[Get]] method to access the + 'configurable' property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = function () { }; + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js index e00bb78cea..9126936e5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js - * @description Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = []; - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-113 +description: > + Object.create - one property in 'Properties' is an Array object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = []; + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js index 256c435185..6e9ec2f61d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js - * @description Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = new String(); - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-114 +description: > + Object.create - one property in 'Properties' is a String object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = new String(); + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js index 969c9a4624..8552c6d336 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js - * @description Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = new Boolean(false); - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-115 +description: > + Object.create - one property in 'Properties' is a Boolean object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = new Boolean(false); + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js index e0a983c3c6..617816aa75 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js - * @description Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = new Number(-9); - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-116 +description: > + Object.create - one property in 'Properties' is a Number object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = new Number(-9); + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js index 906f30e04a..c37de8e66f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js - * @description Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - try { - Math.configurable = true; - - var newObj = Object.create({}, { - prop: Math - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } finally { - delete Math.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-117 +description: > + Object.create - one property in 'Properties' is the Math object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Math.configurable = true; + + var newObj = Object.create({}, { + prop: Math + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } finally { + delete Math.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js index 5c130f8c35..74821ee454 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = new Date(); - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-118 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = new Date(); + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js index 95d2f1bd40..757a2cbfad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = new RegExp(); - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-119 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = new RegExp(); + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js index 588572161c..0c5fb8b345 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js - * @description Object.create - argument 'Properties' is a RegExp object (15.2.3.7 step 2) - */ - - -function testcase() { - - var props = new RegExp(); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof RegExp; - return {}; - }, - enumerable: true - }); - var newObj = Object.create({}, props); - return result && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-12 +description: > + Object.create - argument 'Properties' is a RegExp object (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new RegExp(); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof RegExp; + return {}; + }, + enumerable: true + }); + var newObj = Object.create({}, props); + return result && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js index 494b5d490f..8323b37502 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js - * @description Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - try { - JSON.configurable = true; - - var newObj = Object.create({}, { - prop: JSON - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } finally { - delete JSON.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-120 +description: > + Object.create - one property in 'Properties' is the JSON object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.configurable = true; + + var newObj = Object.create({}, { + prop: JSON + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } finally { + delete JSON.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js index de6cc0831e..4e4c07ce11 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js - * @description Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var descObj = new Error(); - - descObj.configurable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-121 +description: > + Object.create - one property in 'Properties' is an Error object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = new Error(); + + descObj.configurable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js index 4dd19de0a5..6f52a36f43 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js - * @description Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - argObj.configurable = true; - - var newObj = Object.create({}, { - prop: argObj - }); - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-122 +description: > + Object.create - one property in 'Properties' is an Arguments + object which implements its own [[Get]] method to access the + 'configurable' property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + argObj.configurable = true; + + var newObj = Object.create({}, { + prop: argObj + }); + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js index 14a98e4ab5..fa04470b42 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js - * @description Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - try { - fnGlobalObject().configurable = true; - - var newObj = Object.create({}, { - prop: fnGlobalObject() - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } finally { - delete fnGlobalObject().configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-124 +description: > + Object.create - one property in 'Properties' is the global object + that uses Object's [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + try { + fnGlobalObject().configurable = true; + + var newObj = Object.create({}, { + prop: fnGlobalObject() + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } finally { + delete fnGlobalObject().configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js index d4f253bd4e..d7820db410 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js - * @description Object.create - 'configurable' property of one property in 'Properties' is undefined (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: undefined - } - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-125 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is undefined (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: undefined + } + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js index 625b1d810f..43a8a222a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js - * @description Object.create - 'configurable' property of one property in 'Properties' is null (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: null - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-126 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is null (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: null + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js index c36ad97c1c..1714eb4c7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js - * @description Object.create - 'configurable' property of one property in 'Properties' is true (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: true - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-127 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is true (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: true + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js index c13961a8eb..732ce93df3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js - * @description Object.create - 'configurable' property of one property in 'Properties' is false (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: false - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-128 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is false (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: false + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js index aae9f820ff..4c4e1670dd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js - * @description Object.create - 'configurable' property of one property in 'Properties' is 0 (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: 0 - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-129 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is 0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: 0 + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js index 78288dabf8..429aadce2a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js - * @description Object.create - argument 'Properties' is the JSON object (15.2.3.7 step 2) - */ - - -function testcase() { - - var result = false; - - Object.defineProperty(JSON, "prop", { - get: function () { - result = (this === JSON); - return {}; - }, - enumerable: true, - configurable: true - }); - - try { - var newObj = Object.create({}, JSON); - return result && newObj.hasOwnProperty("prop"); - } finally { - delete JSON.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-13 +description: > + Object.create - argument 'Properties' is the JSON object (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + + Object.defineProperty(JSON, "prop", { + get: function () { + result = (this === JSON); + return {}; + }, + enumerable: true, + configurable: true + }); + + try { + var newObj = Object.create({}, JSON); + return result && newObj.hasOwnProperty("prop"); + } finally { + delete JSON.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js index 7bd59a67b8..ec8f536ab8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js - * @description Object.create - 'configurable' property of one property in 'Properties' is +0 (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: +0 - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-130 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is +0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: +0 + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js index 0360cf0c77..0fe7a559a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js - * @description Object.create - 'configurable' property of one property in 'Properties' is -0 (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: -0 - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-131 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is -0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: -0 + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js index 9abb4ec062..b48bb35071 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js - * @description Object.create - 'configurable' property of one property in 'Properties' is NaN (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: NaN - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-132 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is NaN (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: NaN + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js index 35feac6e79..910ae0dcd2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a positive number (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: 123 - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-133 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a positive number (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: 123 + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js index 2da25728ff..c0bd7edb1a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a negative number (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: -123 - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-134 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a negative number (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: -123 + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js index b9532c0c7e..ccd7200a53 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an empty string (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: "" - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-135 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an empty string (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: "" + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js index 3c675e41aa..bf4b6cf4e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a non-empty string (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: "abc" - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-136 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a non-empty string (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: "abc" + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js index b217fb1cf8..4b0593660d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a Function object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: function () { } - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-137 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a Function object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: function () { } + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js index fd7f2fef25..c08f977172 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an Array object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: [] - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-138 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an Array object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: [] + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js index 03b20dbc4d..8a0571239c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a String object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new String("abc") - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-139 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a String object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new String("abc") + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js index 4fe1b99883..f1d973e33c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js - * @description Object.create - argument 'Properties' is an Error object (15.2.3.7 step 2) - */ - - -function testcase() { - - var props = new Error("test"); - var result = false; - - (Object.getOwnPropertyNames(props)).forEach(function(name){ - props[name] = {value:11, configurable:true} - }); - - Object.defineProperty(props, "prop15_2_3_5_4_14", { - get: function () { - result = this instanceof Error; - return {}; - }, - enumerable: true - }); - var newObj = Object.create({}, props); - return result && newObj.hasOwnProperty("prop15_2_3_5_4_14"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-14 +description: > + Object.create - argument 'Properties' is an Error object (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Error("test"); + var result = false; + + (Object.getOwnPropertyNames(props)).forEach(function(name){ + props[name] = {value:11, configurable:true} + }); + + Object.defineProperty(props, "prop15_2_3_5_4_14", { + get: function () { + result = this instanceof Error; + return {}; + }, + enumerable: true + }); + var newObj = Object.create({}, props); + return result && newObj.hasOwnProperty("prop15_2_3_5_4_14"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js index 1a3d6babb9..43c690d24a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a Boolean object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new Boolean(true) - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-140 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a Boolean object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new Boolean(true) + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js index c32d0c7071..bb8139e0b5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a Number object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new Number(123) - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-141 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a Number object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new Number(123) + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js index c762596a20..dac9349592 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js - * @description Object.create - 'configurable' property of one property in 'Properties' is the Math object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: Math - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-142 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is the Math object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: Math + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js index f525ab9fe3..496c22d471 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a Date object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new Date() - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-143 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a Date object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new Date() + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js index b3d4ed283a..f0fa89f62d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a RegExp object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new RegExp() - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-144 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a RegExp object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new RegExp() + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js index 889da7d226..8c1fcdf81d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js - * @description Object.create - 'configurable' property of one property in 'Properties' is the JSON object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: JSON - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-145 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is the JSON object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: JSON + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js index 92ca903989..43f15680fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an Error object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new Error() - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-146 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an Error object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new Error() + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js index a4947e2fa8..ff9b9909b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js - * @description Object.create - 'configurable' property of one property in 'Properties' is an Arguments object (8.10.5 step 4.b) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - var newObj = Object.create({}, { - prop: { - configurable: argObj - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-147 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is an Arguments object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + var newObj = Object.create({}, { + prop: { + configurable: argObj + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js index dfd50d46a6..0797e5609d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js - * @description Object.create - 'configurable' property of one property in 'Properties' is the global object (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: fnGlobalObject() - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-149 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is the global object (8.10.5 step 4.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: fnGlobalObject() + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js index 20ba021410..4b88f02726 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js - * @description Object.create - argument 'Properties' is the Aguments object (15.2.3.7 step 2) - */ - - -function testcase() { - - var result = false; - - var argObj = (function () { return arguments; })(); - - Object.defineProperty(argObj, "prop", { - get: function () { - result = ('[object Arguments]' === Object.prototype.toString.call(this)); - return {}; - }, - enumerable: true - }); - - var newObj = Object.create({}, argObj); - return result && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-15 +description: > + Object.create - argument 'Properties' is the Aguments object + (15.2.3.7 step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + + var argObj = (function () { return arguments; })(); + + Object.defineProperty(argObj, "prop", { + get: function () { + result = ('[object Arguments]' === Object.prototype.toString.call(this)); + return {}; + }, + enumerable: true + }); + + var newObj = Object.create({}, argObj); + return result && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js index 77d3e74347..e0d524ab1d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js - * @description Object.create - 'configurable' property of one property in 'Properties' is a string (value is 'false') which is treated as the value true (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: "false" - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-150 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is a string (value is 'false') which is treated as + the value true (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: "false" + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js index 95f9c4231d..4e3c5ac5c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js - * @description Object.create - 'configurable' property of one property in 'Properties' is new Boolean(false) which is treated as the value true (8.10.5 step 4.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: new Boolean(false) - } - }); - - var beforeDeleted = newObj.hasOwnProperty("prop"); - - delete newObj.prop; - - var afterDeleted = newObj.hasOwnProperty("prop"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-151 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is new Boolean(false) which is treated as the value + true (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: new Boolean(false) + } + }); + + var beforeDeleted = newObj.hasOwnProperty("prop"); + + delete newObj.prop; + + var afterDeleted = newObj.hasOwnProperty("prop"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js index 50d8ed4147..d54e2d3548 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js - * @description Object.create - 'value' property of one property in 'Properties' is present (8.10.5 step 5) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - value: 100 - } - }); - - return newObj.prop === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-152 +description: > + Object.create - 'value' property of one property in 'Properties' + is present (8.10.5 step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + value: 100 + } + }); + + return newObj.prop === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js index 6decc98214..277e5f4d5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js - * @description Object.create - 'value' property of one property in 'Properties' is not present (8.10.5 step 5) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: {} - }); - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-153 +description: > + Object.create - 'value' property of one property in 'Properties' + is not present (8.10.5 step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: {} + }); + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js index 4b1fefb8eb..ea9faadfd3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js - * @description Object.create - 'value' property of one property in 'Properties' is own data property (8.10.5 step 5.a) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - value: "ownDataProperty" - } - }); - - return newObj.prop === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-154 +description: > + Object.create - 'value' property of one property in 'Properties' + is own data property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + value: "ownDataProperty" + } + }); + + return newObj.prop === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js index ad79f31a55..5d5a1ce59b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js - * @description Object.create - 'value' property of one property in 'Properties' is an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = { - value: "inheritedDataProperty" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "inheritedDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-155 +description: > + Object.create - 'value' property of one property in 'Properties' + is an inherited data property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + value: "inheritedDataProperty" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "inheritedDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js index 20846a4962..00dbc66ca9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js - * @description Object.create - 'value' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = { - value: "inheritedDataProperty" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - descObj.value = "ownDataProperty"; - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-156 +description: > + Object.create - 'value' property of one property in 'Properties' + is own data property that overrides an inherited data property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + value: "inheritedDataProperty" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + descObj.value = "ownDataProperty"; + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js index f4d1cfee9c..8c910e0cda 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js - * @description Object.create - 'value' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownDataProperty"; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-157 +description: > + Object.create - 'value' property of one property in 'Properties' + is own data property that overrides an inherited accessor property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownDataProperty"; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js index 8b7afa5951..3fa52d9fbb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js - * @description Object.create - 'value' property of one property in 'Properties' is own accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - - var descObj = {}; - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-158 +description: > + Object.create - 'value' property of one property in 'Properties' + is own accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = {}; + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js index 1c6d3aa68e..86211a2fee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js - * @description Object.create - 'value' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "inheritedAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-159 +description: > + Object.create - 'value' property of one property in 'Properties' + is an inherited accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "inheritedAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js index c2d6df51ca..39373a836d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js - * @description Object.create - own enumerable data property in 'Properties' is defined in 'obj' (15.2.3.7 step 3) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: {} - }); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-16 +description: > + Object.create - own enumerable data property in 'Properties' is + defined in 'obj' (15.2.3.7 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: {} + }); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js index 5079bda927..4d1af71806 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js - * @description Object.create - 'value' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = { - value: "inheritedDataProperty" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-160 +description: > + Object.create - 'value' property of one property in 'Properties' + is own accessor property that overrides an inherited data property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + value: "inheritedDataProperty" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js index 0998ac3494..e9b0581bc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js - * @description Object.create - 'value' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-161 +description: > + Object.create - 'value' property of one property in 'Properties' + is own accessor property that overrides an inherited accessor + property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js index 2cc3f66595..9d138f3401 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js - * @description Object.create - 'value' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 5.a) - */ - - -function testcase() { - - var descObj = {}; - - Object.defineProperty(descObj, "value", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-162 +description: > + Object.create - 'value' property of one property in 'Properties' + is own accessor property without a get function (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = {}; + + Object.defineProperty(descObj, "value", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js index c20bf0e0e3..6c89c27529 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js - * @description Object.create - 'value' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "value", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-163 +description: > + Object.create - 'value' property of one property in 'Properties' + is own accessor property without a get function, which overrides + an inherited accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "value", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js index 506bf44fba..7ad81fcec5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js - * @description Object.create - 'value' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 5.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "value", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-164 +description: > + Object.create - 'value' property of one property in 'Properties' + is an inherited accessor property without a get function (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "value", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js index 57beb5c0c2..a5c9c9beb9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js - * @description Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var Func = function (a, b) { - return a + b; - }; - - var fun = new Func(); - fun.value = "FunValue"; - - var newObj = Object.create({}, { - prop: fun - }); - return newObj.prop === "FunValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-165 +description: > + Object.create - one property in 'Properties' is a Function object + which implements its own [[Get]] method to access the 'value' + property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var Func = function (a, b) { + return a + b; + }; + + var fun = new Func(); + fun.value = "FunValue"; + + var newObj = Object.create({}, { + prop: fun + }); + return newObj.prop === "FunValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js index 445c08ed33..7f4dc756de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js - * @description Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var arr = [1, 2, 3]; - - arr.value = "ArrValue"; - - var newObj = Object.create({}, { - prop: arr - }); - - return newObj.prop === "ArrValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-166 +description: > + Object.create - one property in 'Properties' is an Array object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [1, 2, 3]; + + arr.value = "ArrValue"; + + var newObj = Object.create({}, { + prop: arr + }); + + return newObj.prop === "ArrValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js index dd9bef6a81..7644189ef9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js - * @description Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var str = new String("abc"); - - str.value = "StrValue"; - - var newObj = Object.create({}, { - prop: str - }); - - return newObj.prop === "StrValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-167 +description: > + Object.create - one property in 'Properties' is a String object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = new String("abc"); + + str.value = "StrValue"; + + var newObj = Object.create({}, { + prop: str + }); + + return newObj.prop === "StrValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js index 396d599f36..a79a98d01e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js - * @description Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var booleanObj = new Boolean(false); - - booleanObj.value = "BooleanValue"; - - var newObj = Object.create({}, { - prop: booleanObj - }); - - return newObj.prop === "BooleanValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-168 +description: > + Object.create - one property in 'Properties' is a Boolean object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var booleanObj = new Boolean(false); + + booleanObj.value = "BooleanValue"; + + var newObj = Object.create({}, { + prop: booleanObj + }); + + return newObj.prop === "BooleanValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js index 5cc5366ec0..a40b6d1d94 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js - * @description Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var numObj = new Number(123); - - numObj.value = "NumValue"; - - var newObj = Object.create({}, { - prop: numObj - }); - - return newObj.prop === "NumValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-169 +description: > + Object.create - one property in 'Properties' is a Number object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var numObj = new Number(123); + + numObj.value = "NumValue"; + + var newObj = Object.create({}, { + prop: numObj + }); + + return newObj.prop === "NumValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js index b92c513eda..9b552069d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js - * @description Object.create - own data property in 'Properties' which is not enumerable is not defined in 'obj' (15.2.3.7 step 3) - */ - - -function testcase() { - - var props = {}; - Object.defineProperty(props, "prop", { - value: {}, - enumerable: false - }); - var newObj = Object.create({}, props); - - return !newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-17 +description: > + Object.create - own data property in 'Properties' which is not + enumerable is not defined in 'obj' (15.2.3.7 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = {}; + Object.defineProperty(props, "prop", { + value: {}, + enumerable: false + }); + var newObj = Object.create({}, props); + + return !newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js index fbb3c76c2c..ec2f42c87e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js - * @description Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - try { - Math.value = "MathValue"; - - var newObj = Object.create({}, { - prop: Math - }); - - return newObj.prop === "MathValue"; - } finally { - delete Math.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-170 +description: > + Object.create - one property in 'Properties' is the Math object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Math.value = "MathValue"; + + var newObj = Object.create({}, { + prop: Math + }); + + return newObj.prop === "MathValue"; + } finally { + delete Math.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js index ba18b85056..2d58d2cfa6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var dateObj = new Date(); - - dateObj.value = "DateValue"; - - var newObj = Object.create({}, { - prop: dateObj - }); - - return newObj.prop === "DateValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-171 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var dateObj = new Date(); + + dateObj.value = "DateValue"; + + var newObj = Object.create({}, { + prop: dateObj + }); + + return newObj.prop === "DateValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js index 8dd2f53ae5..fc320e2db4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js - * @description Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var regObj = new RegExp(); - - regObj.value = "RegExpValue"; - - var newObj = Object.create({}, { - prop: regObj - }); - - return newObj.prop === "RegExpValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-172 +description: > + Object.create - one property in 'Properties' is a RegExp object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var regObj = new RegExp(); + + regObj.value = "RegExpValue"; + + var newObj = Object.create({}, { + prop: regObj + }); + + return newObj.prop === "RegExpValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js index 76fc77b5e4..442eebc1eb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js - * @description Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - try { - JSON.value = "JSONValue"; - - var newObj = Object.create({}, { - prop: JSON - }); - - return newObj.prop === "JSONValue"; - } finally { - delete JSON.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-173 +description: > + Object.create - one property in 'Properties' is the JSON object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.value = "JSONValue"; + + var newObj = Object.create({}, { + prop: JSON + }); + + return newObj.prop === "JSONValue"; + } finally { + delete JSON.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js index 54cd9f7187..7a2a77debd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js - * @description Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var errorObj = new Error(); - - errorObj.value = "ErrorValue"; - - var newObj = Object.create({}, { - prop: errorObj - }); - - return newObj.prop === "ErrorValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-174 +description: > + Object.create - one property in 'Properties' is an Error object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var errorObj = new Error(); + + errorObj.value = "ErrorValue"; + + var newObj = Object.create({}, { + prop: errorObj + }); + + return newObj.prop === "ErrorValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js index 9216a1a5e4..6fa185eeb3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js - * @description Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - argObj.value = "ArgValue"; - - var newObj = Object.create({}, { - prop: argObj - }); - - return newObj.prop === "ArgValue"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-175 +description: > + Object.create - one property in 'Properties' is an Arguments + object which implements its own [[Get]] method to access the + 'value' property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + argObj.value = "ArgValue"; + + var newObj = Object.create({}, { + prop: argObj + }); + + return newObj.prop === "ArgValue"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js index d54ef7c162..5ab9a11cab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js - * @description Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - - try { - fnGlobalObject().value = "GlobalValue"; - - var newObj = Object.create({}, { - prop: fnGlobalObject() - }); - - return newObj.prop === "GlobalValue"; - } finally { - delete fnGlobalObject().value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-177 +description: > + Object.create - one property in 'Properties' is the global object + that uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + try { + fnGlobalObject().value = "GlobalValue"; + + var newObj = Object.create({}, { + prop: fnGlobalObject() + }); + + return newObj.prop === "GlobalValue"; + } finally { + delete fnGlobalObject().value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js index b181a8c9e2..b3dade4b7d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js - * @description Object.create - 'writable' property of one property in 'Properties' is true (8.10.5 step 6) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: true - } - }); - - var beforeWrite = ((newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined")); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-178 +description: > + Object.create - 'writable' property of one property in + 'Properties' is true (8.10.5 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: true + } + }); + + var beforeWrite = ((newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined")); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js index 31f23bc286..bd1a512475 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js - * @description Object.create - 'writable' property of one property in 'Properties' is not present (8.10.5 step 6) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - value: 100 - } - }); - - var beforeWrite = (newObj.prop === 100); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === 100); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-179 +description: > + Object.create - 'writable' property of one property in + 'Properties' is not present (8.10.5 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + value: 100 + } + }); + + var beforeWrite = (newObj.prop === 100); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === 100); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js index 93da062689..57c965197e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js - * @description Object.create - an enumerable inherited data property in 'Properties' is not defined in 'obj' (15.2.3.7 step 3) - */ - - -function testcase() { - - var proto = {}; - - proto.prop = {}; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - - var newObj = Object.create({}, child); - - return !newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-18 +description: > + Object.create - an enumerable inherited data property in + 'Properties' is not defined in 'obj' (15.2.3.7 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + proto.prop = {}; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + + var newObj = Object.create({}, child); + + return !newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js index c12b3fc84f..19cba165ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js - * @description Object.create - 'writable' property of one property in 'Properties' is own data property (8.10.5 step 6.a) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: true - } - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-180 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: true + } + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js index 8a55a03f76..184ec757e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js - * @description Object.create - 'writable' property of one property in 'Properties' is an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = { - writable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-181 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an inherited data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + writable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js index 86c16dc28f..a9e8372d5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js - * @description Object.create - 'writable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = { - writable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - descObj.writable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-182 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own data property that overrides an inherited data + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + writable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + descObj.writable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js index 7b75feb131..e092aa6981 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js - * @description Object.create - 'writable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "writable", { - value: true - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-183 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own data property that overrides an inherited + accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "writable", { + value: true + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js index d841acd7ae..25723716d0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js - * @description Object.create - 'writable' property of one property in 'Properties' is own accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - - var descObj = {}; - - Object.defineProperty(descObj, "writable", { - get: function () { - return true; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-184 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = {}; + + Object.defineProperty(descObj, "writable", { + get: function () { + return true; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js index 81e2443a67..ca9b8b904e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js - * @description Object.create - 'writable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-185 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an inherited accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js index 9c9433a542..8912409bb2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js - * @description Object.create - 'writable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = { - writable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "writable", { - get: function () { - return true; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-186 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own accessor property that overrides an inherited + data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + writable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "writable", { + get: function () { + return true; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js index 785a7d4572..12baaefbc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js - * @description Object.create - 'writable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "writable", { - get: function () { - return true; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-187 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own accessor property that overrides an inherited + accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "writable", { + get: function () { + return true; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js index c8f7e940b8..19e357ea37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js - * @description Object.create - 'writable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 6.a) - */ - - -function testcase() { - - var descObj = { value: 100 }; - - Object.defineProperty(descObj, "writable", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.prop === 100); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === 100); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-188 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own accessor property without a get function + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = { value: 100 }; + + Object.defineProperty(descObj, "writable", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.prop === 100); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === 100); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js index e1f91c9945..2454ae2c74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js - * @description Object.create - 'writable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "writable", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-189 +description: > + Object.create - 'writable' property of one property in + 'Properties' is own accessor property without a get function, + which overrides an inherited accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "writable", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js index fc85fe26cb..eed9a9c13a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js - * @description Object.create - own enumerable accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 3) - */ - - -function testcase() { - - var props = {}; - - Object.defineProperty(props, "prop", { - get: function () { - return {}; - }, - enumerable: true - }); - - var newObj = Object.create({}, props); - - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-19 +description: > + Object.create - own enumerable accessor property in 'Properties' + is defined in 'obj' (15.2.3.7 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = {}; + + Object.defineProperty(props, "prop", { + get: function () { + return {}; + }, + enumerable: true + }); + + var newObj = Object.create({}, props); + + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js index d053119214..c9d5746ddc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js - * @description Object.create - 'writable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 6.a) - */ - - -function testcase() { - - var proto = { value: 100 }; - - Object.defineProperty(proto, "writable", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - var beforeWrite = (newObj.prop === 100); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === 100); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-190 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an inherited accessor property without a get + function (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { value: 100 }; + + Object.defineProperty(proto, "writable", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + var beforeWrite = (newObj.prop === 100); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === 100); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js index 790c8f5758..117a7a668a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js - * @description Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var Func = function (a, b) { - return a + b; - }; - - var fun = new Func(); - fun.writable = true; - - var newObj = Object.create({}, { - prop: fun - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-191 +description: > + Object.create - one property in 'Properties' is a Function object + which implements its own [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var Func = function (a, b) { + return a + b; + }; + + var fun = new Func(); + fun.writable = true; + + var newObj = Object.create({}, { + prop: fun + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js index 9c10fc7bad..349b84ce51 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js - * @description Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var array = [1, 2, 3]; - - array.writable = true; - - var newObj = Object.create({}, { - prop: array - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-192 +description: > + Object.create - one property in 'Properties' is an Array object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var array = [1, 2, 3]; + + array.writable = true; + + var newObj = Object.create({}, { + prop: array + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js index 9528db032e..47316fcdd9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js - * @description Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var str = new String("abc"); - - str.writable = true; - - var newObj = Object.create({}, { - prop: str - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-193 +description: > + Object.create - one property in 'Properties' is a String object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = new String("abc"); + + str.writable = true; + + var newObj = Object.create({}, { + prop: str + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js index 4c8abc4e25..5b5282bd57 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js - * @description Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var booleanObj = new Boolean(false); - - booleanObj.writable = true; - - var newObj = Object.create({}, { - prop: booleanObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-194 +description: > + Object.create - one property in 'Properties' is a Boolean object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var booleanObj = new Boolean(false); + + booleanObj.writable = true; + + var newObj = Object.create({}, { + prop: booleanObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js index a3e33add93..2a573f1a66 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js - * @description Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var numObj = new Number(123); - - numObj.writable = true; - - var newObj = Object.create({}, { - prop: numObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-195 +description: > + Object.create - one property in 'Properties' is a Number object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var numObj = new Number(123); + + numObj.writable = true; + + var newObj = Object.create({}, { + prop: numObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js index 324c612cf9..29deb76514 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js - * @description Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - try { - Math.writable = true; - - var newObj = Object.create({}, { - prop: Math - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Math.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-196 +description: > + Object.create - one property in 'Properties' is the Math object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Math.writable = true; + + var newObj = Object.create({}, { + prop: Math + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Math.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js index cc5ed37436..8506f088b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var dateObj = new Date(); - - dateObj.writable = true; - - var newObj = Object.create({}, { - prop: dateObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-197 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var dateObj = new Date(); + + dateObj.writable = true; + + var newObj = Object.create({}, { + prop: dateObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js index 4b0424b157..9816b3f25c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js - * @description Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var regObj = new RegExp(); - - regObj.writable = true; - - var newObj = Object.create({}, { - prop: regObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-198 +description: > + Object.create - one property in 'Properties' is a RegExp object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var regObj = new RegExp(); + + regObj.writable = true; + + var newObj = Object.create({}, { + prop: regObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js index b74e37546b..e1bbc9784d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js - * @description Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - try { - JSON.writable = true; - - var newObj = Object.create({}, { - prop: JSON - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete JSON.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-199 +description: > + Object.create - one property in 'Properties' is the JSON object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.writable = true; + + var newObj = Object.create({}, { + prop: JSON + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete JSON.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js index e84197ba5f..b640af79bc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js - * @description Object.create - 'Properties' is undefined - */ - - -function testcase() { - - var newObj = Object.create({}, undefined); - return (newObj instanceof Object); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-2 +description: Object.create - 'Properties' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, undefined); + return (newObj instanceof Object); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js index dbff16f386..26f08fe705 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js - * @description Object.create - own accessor property in 'Properties' which is not enumerable is not defined in 'obj' (15.2.3.7 step 3) - */ - - -function testcase() { - - var props = {}; - - Object.defineProperty(props, "prop", { - get: function () { - return {}; - }, - enumerable: false - }); - - var newObj = Object.create({}, props); - - return !newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-20 +description: > + Object.create - own accessor property in 'Properties' which is not + enumerable is not defined in 'obj' (15.2.3.7 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = {}; + + Object.defineProperty(props, "prop", { + get: function () { + return {}; + }, + enumerable: false + }); + + var newObj = Object.create({}, props); + + return !newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js index 197e4c49f8..c30e57380d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js - * @description Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var errorObj = new Error(); - - errorObj.writable = true; - - var newObj = Object.create({}, { - prop: errorObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-200 +description: > + Object.create - one property in 'Properties' is an Error object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var errorObj = new Error(); + + errorObj.writable = true; + + var newObj = Object.create({}, { + prop: errorObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js index 35224d933c..8cba7dd0c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js - * @description Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - argObj.writable = true; - - var newObj = Object.create({}, { - prop: argObj - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-201 +description: > + Object.create - one property in 'Properties' is an Arguments + object which implements its own [[Get]] method to access the + 'writable' property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + argObj.writable = true; + + var newObj = Object.create({}, { + prop: argObj + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js index 785d33ed3d..6ee57c9852 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js - * @description Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - try { - fnGlobalObject().writable = true; - - var newObj = Object.create({}, { - prop: fnGlobalObject() - }); - - var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); - - newObj.prop = "isWritable"; - - var afterWrite = (newObj.prop === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete fnGlobalObject().writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-203 +description: > + Object.create - one property in 'Properties' is the global object + that uses Object's [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + try { + fnGlobalObject().writable = true; + + var newObj = Object.create({}, { + prop: fnGlobalObject() + }); + + var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"); + + newObj.prop = "isWritable"; + + var afterWrite = (newObj.prop === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete fnGlobalObject().writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js index d75cb5260a..a3cc23d730 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js - * @description Object.create - 'writable' property of one property in 'Properties' is undefined (8.10.5 step 6.b) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - writable: undefined - } - }); - - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-204 +description: > + Object.create - 'writable' property of one property in + 'Properties' is undefined (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + writable: undefined + } + }); + + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js index c26712998b..6001a5e234 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js - * @description Object.create - 'writable' property of one property in 'Properties' is null (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: null - } - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-205 +description: > + Object.create - 'writable' property of one property in + 'Properties' is null (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: null + } + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js index 3a924b98b1..dc9cdc0ffe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js - * @description Object.create - 'writable' property of one property in 'Properties' is true (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: true - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-206 +description: > + Object.create - 'writable' property of one property in + 'Properties' is true (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: true + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js index 47f3d64d63..f2de55adc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js - * @description Object.create - 'writable' property of one property in 'Properties' is false (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: false - } - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-207 +description: > + Object.create - 'writable' property of one property in + 'Properties' is false (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: false + } + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js index 8c97796492..5833446e2e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js - * @description Object.create - 'writable' property of one property in 'Properties' is 0 (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: 0 - } - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-208 +description: > + Object.create - 'writable' property of one property in + 'Properties' is 0 (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: 0 + } + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js index bf07b6c57d..07ceb4a0d3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js - * @description Object.create - 'writable' property of one property in 'Properties' is +0 (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: +0 - } - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-209 +description: > + Object.create - 'writable' property of one property in + 'Properties' is +0 (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: +0 + } + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js index c7fa1e92a0..f45b71fc34 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js - * @description Object.create - an enumerable inherited accessor property in 'Properties' is not defined in 'obj' (15.2.3.7 step 3) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "prop", { - get: function () { - return {}; - }, - enumerable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - - var newObj = Object.create({}, child); - - return !newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-21 +description: > + Object.create - an enumerable inherited accessor property in + 'Properties' is not defined in 'obj' (15.2.3.7 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "prop", { + get: function () { + return {}; + }, + enumerable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + + var newObj = Object.create({}, child); + + return !newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js index 421cfdc37e..99cf167a86 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js - * @description Object.create - 'writable' property of one property in 'Properties' is -0 (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: -0 - } - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-210 +description: > + Object.create - 'writable' property of one property in + 'Properties' is -0 (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: -0 + } + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js index 4a68d59a13..ee514260a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js - * @description Object.create - 'writable' property of one property in 'Properties' is NaN (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: NaN - } - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-211 +description: > + Object.create - 'writable' property of one property in + 'Properties' is NaN (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: NaN + } + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js index 8c13a3ee3b..00874f9569 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js - * @description Object.create - 'writable' property of one property in 'Properties' is a positive number primitive (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: 12 - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-212 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a positive number primitive (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: 12 + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js index d902f2aab6..5fc64d92d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js - * @description Object.create - 'writable' property of one property in 'Properties' is a negative number primitive (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: -9 - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-213 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a negative number primitive (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: -9 + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js index e50a42e18a..b31462556f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js - * @description Object.create - 'writable' property of one property in 'Properties' is an empty string (8.10.5 step 6.b) - */ - - -function testcase() { - var descObj = { - writable: "" - }; - - var newObj = Object.create({}, { - prop: descObj - }); - var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - - newObj.prop = 121; - - return hasProperty && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-214 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an empty string (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var descObj = { + writable: "" + }; + + var newObj = Object.create({}, { + prop: descObj + }); + var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + + newObj.prop = 121; + + return hasProperty && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js index 70a00ee955..880dafb507 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js - * @description Object.create - 'writable' property of one property in 'Properties' is a non-empty string (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: "abc" - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-215 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a non-empty string (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: "abc" + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js index 254a7670e9..b71c507abc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js - * @description Object.create - 'writable' property of one property in 'Properties' is a Function object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: function () { } - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-216 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a Function object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: function () { } + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js index afe29e01db..beff5f2214 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js - * @description Object.create - 'writable' property of one property in 'Properties' is an Array object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: [] - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-217 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an Array object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: [] + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js index b12f46fb4d..a600b21021 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js - * @description Object.create - 'writable' property of one property in 'Properties' is a String object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new String() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-218 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a String object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new String() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js index 960f20727b..ed0a37e247 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js - * @description Object.create - 'writable' property of one property in 'Properties' is a Boolean object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new Boolean() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-219 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a Boolean object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new Boolean() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js index a04dd654ea..c4367441d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js - * @description Object.create - own enumerable data property that overrides an enumerable inherited data property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var proto = {}; - proto.prop = { - value: "abc" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.prop = { - value: "bbq" - }; - var newObj = Object.create({}, child); - - return newObj.hasOwnProperty("prop") && newObj.prop === "bbq"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-22 +description: > + Object.create - own enumerable data property that overrides an + enumerable inherited data property in 'Properties' is defined in + 'obj' (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + proto.prop = { + value: "abc" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.prop = { + value: "bbq" + }; + var newObj = Object.create({}, child); + + return newObj.hasOwnProperty("prop") && newObj.prop === "bbq"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js index 786f2c90c1..986b718e3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js - * @description Object.create - 'writable' property of one property in 'Properties' is a Number object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new Number() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-220 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a Number object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new Number() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js index cdc0f2b275..9924dfbaef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js - * @description Object.create - 'writable' property of one property in 'Properties' is the Math object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: Math - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-221 +description: > + Object.create - 'writable' property of one property in + 'Properties' is the Math object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: Math + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js index 3f6c18829d..422a19dd57 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js - * @description Object.create - 'writable' property of one property in 'Properties' is a Date object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new Date() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-222 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a Date object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new Date() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js index ca4e6edada..b31ae98ad8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js - * @description Object.create - 'writable' property of one property in 'Properties' is a RegExp object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new RegExp() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-223 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a RegExp object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new RegExp() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js index 6a4db59e6c..94d6960fc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js - * @description Object.create - 'writable' property of one property in 'Properties' is the JSON object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: JSON - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - newObj.prop = 121; - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-224 +description: > + Object.create - 'writable' property of one property in + 'Properties' is the JSON object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: JSON + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + newObj.prop = 121; + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js index 4e0e1c3cfa..f866b3516c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js - * @description Object.create - 'writable' property of one property in 'Properties' is an Error object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new Error() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - newObj.prop = 121; - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-225 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an Error object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new Error() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + newObj.prop = 121; + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js index 749b73101e..983b715458 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js - * @description Object.create - 'writable' property of one property in 'Properties' is an Arguments object (8.10.5 step 6.b) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - var newObj = Object.create({}, { - prop: { - writable: argObj - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-226 +description: > + Object.create - 'writable' property of one property in + 'Properties' is an Arguments object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + var newObj = Object.create({}, { + prop: { + writable: argObj + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js index 00bff9b853..52981de134 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js - * @description Object.create - 'writable' property of one property in 'Properties' is the global object (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: fnGlobalObject() - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-228 +description: > + Object.create - 'writable' property of one property in + 'Properties' is the global object (8.10.5 step 6.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: fnGlobalObject() + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js index de5600fce8..afb0e9ec3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js - * @description Object.create - 'writable' property of one property in 'Properties' is a string (value is 'false') which is treated as the value true (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: "false" - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-229 +description: > + Object.create - 'writable' property of one property in + 'Properties' is a string (value is 'false') which is treated as + the value true (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: "false" + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js index c39f807395..9abad97148 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js - * @description Object.create - own enumerable data property that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { - return { value: 9 }; - }, - enumerable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "prop", { - value: { - value: 12 - }, - enumerable: true - }); - var newObj = Object.create({}, child); - - return newObj.hasOwnProperty("prop") && newObj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-23 +description: > + Object.create - own enumerable data property that overrides an + enumerable inherited accessor property in 'Properties' is defined + in 'obj' (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { + return { value: 9 }; + }, + enumerable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "prop", { + value: { + value: 12 + }, + enumerable: true + }); + var newObj = Object.create({}, child); + + return newObj.hasOwnProperty("prop") && newObj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js index 2fecebb083..2de33eb470 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js - * @description Object.create - 'writable' property of one property in 'Properties' is new Boolean(false) which is treated as the value true (8.10.5 step 6.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - writable: new Boolean(false) - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 121; - - return hasProperty && newObj.prop === 121; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-230 +description: > + Object.create - 'writable' property of one property in + 'Properties' is new Boolean(false) which is treated as the value + true (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + writable: new Boolean(false) + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 121; + + return hasProperty && newObj.prop === 121; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js index 563b4596d3..4e61da5892 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js - * @description Object.create - 'get' property of one property in 'Properties' is present (8.10.5 step 7) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - get: function () { - return "present"; - } - } - }); - return newObj.prop === "present"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-231 +description: > + Object.create - 'get' property of one property in 'Properties' is + present (8.10.5 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + get: function () { + return "present"; + } + } + }); + return newObj.prop === "present"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js index 270f70370d..9437b86bc2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js - * @description Object.create - 'get' property of one property in 'Properties' is not present (8.10.5 step 7) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: {} - }); - return typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-232 +description: > + Object.create - 'get' property of one property in 'Properties' is + not present (8.10.5 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: {} + }); + return typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js index bc12eabb99..6d000062e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js - * @description Object.create - 'get' property of one property in 'Properties' is own data property (8.10.5 step 7.a) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - get: function () { - return "ownDataProperty"; - } - } - }); - return newObj.prop === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-233 +description: > + Object.create - 'get' property of one property in 'Properties' is + own data property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + get: function () { + return "ownDataProperty"; + } + } + }); + return newObj.prop === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js index 5f257cc1cf..739956e84b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js - * @description Object.create - 'get' property of one property in 'Properties' is an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "inheritedDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-234 +description: > + Object.create - 'get' property of one property in 'Properties' is + an inherited data property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "inheritedDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js index 54a15bcaa8..c84019de8d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js - * @description Object.create - 'get' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "get", { - value: function () { - return "ownDataProperty"; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-235 +description: > + Object.create - 'get' property of one property in 'Properties' is + own data property that overrides an inherited data property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "get", { + value: function () { + return "ownDataProperty"; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js index 5ef7fe074d..6e63198780 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js - * @description Object.create - 'get' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "get", { - value: function () { - return "ownDataProperty"; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-236 +description: > + Object.create - 'get' property of one property in 'Properties' is + own data property that overrides an inherited accessor property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "get", { + value: function () { + return "ownDataProperty"; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js index 5dee0cb402..6353257e94 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js - * @description Object.create - 'get' property of one property in 'Properties' is own accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - - var descObj = {}; - - Object.defineProperty(descObj, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-237 +description: > + Object.create - 'get' property of one property in 'Properties' is + own accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var descObj = {}; + + Object.defineProperty(descObj, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js index 5ad3d4ea41..bbe536940c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js - * @description Object.create - 'get' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "inheritedAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-238 +description: > + Object.create - 'get' property of one property in 'Properties' is + an inherited accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "inheritedAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js index cc3fdb8ccc..c4af427ec2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js - * @description Object.create - 'get' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-239 +description: > + Object.create - 'get' property of one property in 'Properties' is + own accessor property that overrides an inherited data property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js index 5caa0bc7e2..e63380a878 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js - * @description Object.create - own enumerable accessor property that overrides an enumerable inherited data property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var proto = {}; - proto.prop = { - value: 12 - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "prop", { - get: function () { - return { - value: 9 - }; - }, - enumerable: true - }); - - var newObj = Object.create({}, child); - - return newObj.hasOwnProperty("prop") && newObj.prop === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-24 +description: > + Object.create - own enumerable accessor property that overrides an + enumerable inherited data property in 'Properties' is defined in + 'obj' (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + proto.prop = { + value: 12 + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "prop", { + get: function () { + return { + value: 9 + }; + }, + enumerable: true + }); + + var newObj = Object.create({}, child); + + return newObj.hasOwnProperty("prop") && newObj.prop === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js index 40c32e1a96..d383760458 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js - * @description Object.create - 'get' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.prop === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-240 +description: > + Object.create - 'get' property of one property in 'Properties' is + own accessor property that overrides an inherited accessor + property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.prop === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js index 7b6e4c8eba..f969c225da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js - * @description Object.create - 'get' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 7.a) - */ - - -function testcase() { - var descObj = {}; - - Object.defineProperty(descObj, "get", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-241 +description: > + Object.create - 'get' property of one property in 'Properties' is + own accessor property without a get function (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var descObj = {}; + + Object.defineProperty(descObj, "get", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js index 839000b38a..ca45c97df6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js - * @description Object.create - 'get' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "get", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-242 +description: > + Object.create - 'get' property of one property in 'Properties' is + own accessor property without a get function, which overrides an + inherited accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "get", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js index 90c37b42de..8fbc695553 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js - * @description Object.create - 'get' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 7.a) - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "get", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-243 +description: > + Object.create - 'get' property of one property in 'Properties' is + an inherited accessor property without a get function (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "get", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js index c12424851c..7d754cef71 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js - * @description Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var funObj = function () {}; - - funObj.get = function () { - return "VerifyFunctionObject"; - }; - - var newObj = Object.create({}, { - prop: funObj - }); - - return newObj.prop === "VerifyFunctionObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-244 +description: > + Object.create - one property in 'Properties' is a Function object + which implements its own [[Get]] method to access the 'get' + property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () {}; + + funObj.get = function () { + return "VerifyFunctionObject"; + }; + + var newObj = Object.create({}, { + prop: funObj + }); + + return newObj.prop === "VerifyFunctionObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js index fe74ad3d6b..ff552d1337 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js - * @description Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var arrayObj = [1, 2, 3]; - - arrayObj.get = function () { - return "VerifyArrayObject"; - }; - - var newObj = Object.create({}, { - prop: arrayObj - }); - - return newObj.prop === "VerifyArrayObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-245 +description: > + Object.create - one property in 'Properties' is an Array object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrayObj = [1, 2, 3]; + + arrayObj.get = function () { + return "VerifyArrayObject"; + }; + + var newObj = Object.create({}, { + prop: arrayObj + }); + + return newObj.prop === "VerifyArrayObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js index fe68042680..b9eb074dbe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js - * @description Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var strObj = new String("abc"); - - strObj.get = function () { - return "VerifyStringObject"; - }; - - var newObj = Object.create({}, { - prop: strObj - }); - - return newObj.prop === "VerifyStringObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-246 +description: > + Object.create - one property in 'Properties' is a String object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String("abc"); + + strObj.get = function () { + return "VerifyStringObject"; + }; + + var newObj = Object.create({}, { + prop: strObj + }); + + return newObj.prop === "VerifyStringObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js index 69d46240af..b93adc3db2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js - * @description Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var boolObj = new Boolean(true); - - boolObj.get = function () { - return "VerifyBooleanObject"; - }; - - var newObj = Object.create({}, { - prop: boolObj - }); - - return newObj.prop === "VerifyBooleanObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-247 +description: > + Object.create - one property in 'Properties' is a Boolean object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var boolObj = new Boolean(true); + + boolObj.get = function () { + return "VerifyBooleanObject"; + }; + + var newObj = Object.create({}, { + prop: boolObj + }); + + return newObj.prop === "VerifyBooleanObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js index 95e559fe05..a6bd34d2bc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js - * @description Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var numObj = new Number(5); - - numObj.get = function () { - return "VerifyNumberObject"; - }; - - var newObj = Object.create({}, { - prop: numObj - }); - - return newObj.prop === "VerifyNumberObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-248 +description: > + Object.create - one property in 'Properties' is a Number object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var numObj = new Number(5); + + numObj.get = function () { + return "VerifyNumberObject"; + }; + + var newObj = Object.create({}, { + prop: numObj + }); + + return newObj.prop === "VerifyNumberObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js index 8f6b488132..6801abc839 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var dateObj = new Date(); - - dateObj.get = function () { - return "VerifyDateObject"; - }; - - var newObj = Object.create({}, { - prop: dateObj - }); - - return newObj.prop === "VerifyDateObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-249 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateObj = new Date(); + + dateObj.get = function () { + return "VerifyDateObject"; + }; + + var newObj = Object.create({}, { + prop: dateObj + }); + + return newObj.prop === "VerifyDateObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js index d5da211114..1a71a632fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js - * @description Object.create - own enumerable accessor property that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { - return { - value: 9 - }; - }, - enumerable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "prop", { - get: function () { - return { - value: 12 - }; - }, - enumerable: true - }); - var newObj = Object.create({}, child); - - return newObj.hasOwnProperty("prop") && newObj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-25 +description: > + Object.create - own enumerable accessor property that overrides an + enumerable inherited accessor property in 'Properties' is defined + in 'obj' (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { + return { + value: 9 + }; + }, + enumerable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "prop", { + get: function () { + return { + value: 12 + }; + }, + enumerable: true + }); + var newObj = Object.create({}, child); + + return newObj.hasOwnProperty("prop") && newObj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js index 525228bf43..6ebdd3ade7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js - * @description Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var regObj = new RegExp(); - - regObj.get = function () { - return "VerifyRegExpObject"; - }; - - var newObj = Object.create({}, { - prop: regObj - }); - - return newObj.prop === "VerifyRegExpObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-250 +description: > + Object.create - one property in 'Properties' is a RegExp object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + + regObj.get = function () { + return "VerifyRegExpObject"; + }; + + var newObj = Object.create({}, { + prop: regObj + }); + + return newObj.prop === "VerifyRegExpObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js index 9f1b6a574d..b1a07ac91c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js - * @description Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - try { - Math.get = function () { - return "VerifyMathObject"; - }; - - var newObj = Object.create({}, { - prop: Math - }); - - return newObj.prop === "VerifyMathObject"; - } finally { - delete Math.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-251 +description: > + Object.create - one property in 'Properties' is the Math object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Math.get = function () { + return "VerifyMathObject"; + }; + + var newObj = Object.create({}, { + prop: Math + }); + + return newObj.prop === "VerifyMathObject"; + } finally { + delete Math.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js index 60f9fb848c..bb63a8474f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js - * @description Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - JSON.get = function () { - return "VerifyJSONObject"; - }; - - try { - var newObj = Object.create({}, { - prop: JSON - }); - - return newObj.prop === "VerifyJSONObject"; - } finally { - delete JSON.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-252 +description: > + Object.create - one property in 'Properties' is the JSON object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + JSON.get = function () { + return "VerifyJSONObject"; + }; + + try { + var newObj = Object.create({}, { + prop: JSON + }); + + return newObj.prop === "VerifyJSONObject"; + } finally { + delete JSON.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js index eec06cea98..6e16de5f46 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js - * @description Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var errObj = new Error("error"); - - errObj.get = function () { - return "VerifyErrorObject"; - }; - - var newObj = Object.create({}, { - prop: errObj - }); - - return newObj.prop === "VerifyErrorObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-253 +description: > + Object.create - one property in 'Properties' is an Error object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error("error"); + + errObj.get = function () { + return "VerifyErrorObject"; + }; + + var newObj = Object.create({}, { + prop: errObj + }); + + return newObj.prop === "VerifyErrorObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js index abe6d7b39a..237dda4724 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js - * @description Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - argObj.get = function () { - return "VerifyArgumentsObject"; - }; - - var newObj = Object.create({}, { - prop: argObj - }); - - return newObj.prop === "VerifyArgumentsObject"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-254 +description: > + Object.create - one property in 'Properties' is an Arguments + object which implements its own [[Get]] method to access the 'get' + property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + argObj.get = function () { + return "VerifyArgumentsObject"; + }; + + var newObj = Object.create({}, { + prop: argObj + }); + + return newObj.prop === "VerifyArgumentsObject"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js index fb5e46f110..d7e9bf5b44 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js @@ -1,27 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js - * @description Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - fnGlobalObject().get = function () { - return "VerifyGlobalObject"; - }; - - try { - var newObj = Object.create({}, { - prop: fnGlobalObject() - }); - - return newObj.prop === "VerifyGlobalObject"; - } finally { - delete fnGlobalObject().get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-256 +description: > + Object.create - one property in 'Properties' is the global object + that uses Object's [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + fnGlobalObject().get = function () { + return "VerifyGlobalObject"; + }; + + try { + var newObj = Object.create({}, { + prop: fnGlobalObject() + }); + + return newObj.prop === "VerifyGlobalObject"; + } finally { + delete fnGlobalObject().get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js index 7c698e03df..002062cddd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js - * @description Object.create - 'get' property of one property in 'Properties' is undefined (8.10.5 step 7.b) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - get: undefined - } - }); - - return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-257 +description: > + Object.create - 'get' property of one property in 'Properties' is + undefined (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + get: undefined + } + }); + + return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js index 40f29ef168..25eb3a8f76 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js - * @description Object.create - 'get' property of one property in 'Properties' is the primitive value null (8.10.5 step 7.b) - */ - - -function testcase() { - try { - Object.create({}, { - prop: { - get: null - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-258 +description: > + Object.create - 'get' property of one property in 'Properties' is + the primitive value null (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.create({}, { + prop: { + get: null + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js index 6003ac32da..f77025c502 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js - * @description Object.create - 'get' property of one property in 'Properties' is a boolean primitive (8.10.5 step 7.b) - */ - - -function testcase() { - try { - Object.create({}, { - prop: { - get: false - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-259 +description: > + Object.create - 'get' property of one property in 'Properties' is + a boolean primitive (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.create({}, { + prop: { + get: false + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js index 70ab28e62b..53a6c5c585 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js - * @description Object.create - TypeError is thrown when own enumerable accessor property of 'Properties' without a get function (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = {}; - Object.defineProperty(props, "prop", { - set: function () { }, - enumerable: true - }); - try { - Object.create({}, props); - - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-26 +description: > + Object.create - TypeError is thrown when own enumerable accessor + property of 'Properties' without a get function (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = {}; + Object.defineProperty(props, "prop", { + set: function () { }, + enumerable: true + }); + try { + Object.create({}, props); + + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js index 387516da43..995f7d80c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js - * @description Object.create - 'get' property of one property in 'Properties' is a number primitive (8.10.5 step 7.b) - */ - - -function testcase() { - try { - Object.create({}, { - prop: { - get: 123 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-260 +description: > + Object.create - 'get' property of one property in 'Properties' is + a number primitive (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.create({}, { + prop: { + get: 123 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js index d4573c34ff..7f3b76ce2e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js - * @description Object.create - 'get' property of one property in 'Properties' is a primitive string (8.10.5 step 7.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - get: "string" - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-261 +description: > + Object.create - 'get' property of one property in 'Properties' is + a primitive string (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + get: "string" + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js index 7f479f80c9..1a38888232 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js - * @description Object.create - 'get' property of one property in 'Properties' is an Array object (8.10.5 step 7.b) - */ - - -function testcase() { - try { - Object.create({}, { - prop: { - get: [1, 2, 3] - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-262 +description: > + Object.create - 'get' property of one property in 'Properties' is + an Array object (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.create({}, { + prop: { + get: [1, 2, 3] + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js index dcf5354e17..12bbe68f87 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js - * @description Object.create - 'get' property of one property in 'Properties' is a function (8.10.5 step 7.b) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - get: function () { } - } - }); - - return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-263 +description: > + Object.create - 'get' property of one property in 'Properties' is + a function (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + get: function () { } + } + }); + + return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js index 565bf3a3a9..0bb633f8da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js - * @description Object.create - 'set' property of one property in 'Properties' is present (8.10.5 step 8) - */ - - -function testcase() { - var data = "data"; - - var newObj = Object.create({}, { - prop: { - set: function (value) { - data = value; - } - } - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-266 +description: > + Object.create - 'set' property of one property in 'Properties' is + present (8.10.5 step 8) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + + var newObj = Object.create({}, { + prop: { + set: function (value) { + data = value; + } + } + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js index 560e1410bc..8f1cf5816c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js - * @description Object.create - 'set' property of one property in 'Properties' is not present (8.10.5 step 8) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - get: function () { - return "data"; - } - } - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && newObj.prop === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-267 +description: > + Object.create - 'set' property of one property in 'Properties' is + not present (8.10.5 step 8) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + get: function () { + return "data"; + } + } + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && newObj.prop === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js index c5ddeb9d3a..fc2e5f4bbf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js - * @description Object.create - 'set' property of one property in 'Properties' is own data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - - var newObj = Object.create({}, { - prop: { - set: function (value) { - data = value; - } - } - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-268 +description: > + Object.create - 'set' property of one property in 'Properties' is + own data property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + + var newObj = Object.create({}, { + prop: { + set: function (value) { + data = value; + } + } + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js index 43346cf4f4..4fdbc2a850 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js - * @description Object.create - 'set' property of one property in 'Properties' is an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var proto = { - set: function (value) { - data = value; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - - var newObj = Object.create({}, { - prop: child - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-269 +description: > + Object.create - 'set' property of one property in 'Properties' is + an inherited data property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var proto = { + set: function (value) { + data = value; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + + var newObj = Object.create({}, { + prop: child + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js index e6b9a1f113..ae880f1273 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js @@ -1,39 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js - * @description Object.create - own enumerable accessor property in 'Properties' without a get function that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { - return {}; - }, - enumerable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "prop", { - set: function () { }, - enumerable: true - }); - - try { - Object.create({}, child); - - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-27 +description: > + Object.create - own enumerable accessor property in 'Properties' + without a get function that overrides an enumerable inherited + accessor property in 'Properties' is defined in 'obj' (15.2.3.7 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { + return {}; + }, + enumerable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "prop", { + set: function () { }, + enumerable: true + }); + + try { + Object.create({}, child); + + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js index f44ffb81f6..441f25a086 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js - * @description Object.create - 'set' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - var proto = { - set: function (value) { - data2 = value; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - child.set = function (value) { - data1 = value; - }; - - var newObj = Object.create({}, { - prop: child - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data1 === "overrideData" && data2 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-270 +description: > + Object.create - 'set' property of one property in 'Properties' is + own data property that overrides an inherited data property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + var proto = { + set: function (value) { + data2 = value; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + child.set = function (value) { + data1 = value; + }; + + var newObj = Object.create({}, { + prop: child + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data1 === "overrideData" && data2 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js index 1a1e623471..49e65b0a0f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js - * @description Object.create - 'set' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - - var proto = {}; - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data2 = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - value: function (value) { - data1 = value; - } - }); - - var newObj = Object.create({}, { - prop: child - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data1 === "overrideData" && data2 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-271 +description: > + Object.create - 'set' property of one property in 'Properties' is + own data property that overrides an inherited accessor property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + + var proto = {}; + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data2 = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + value: function (value) { + data1 = value; + } + }); + + var newObj = Object.create({}, { + prop: child + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data1 === "overrideData" && data2 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js index 92170eef97..1455e405ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js - * @description Object.create - 'set' property of one property in 'Properties' is own accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var descObj = {}; - - Object.defineProperty(descObj, "set", { - get: function () { - return function (value) { - data = value; - }; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-272 +description: > + Object.create - 'set' property of one property in 'Properties' is + own accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var descObj = {}; + + Object.defineProperty(descObj, "set", { + get: function () { + return function (value) { + data = value; + }; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js index 91d99740e8..2feac78eb1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js - * @description Object.create - 'set' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var proto = {}; - - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - - var newObj = Object.create({}, { - prop: child - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-273 +description: > + Object.create - 'set' property of one property in 'Properties' is + an inherited accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var proto = {}; + + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + + var newObj = Object.create({}, { + prop: child + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js index 5228d52cdc..a5787c2056 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js - * @description Object.create - 'set' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - - var proto = {}; - proto.set = function (value) { - data2 = value; - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - get: function () { - return function (value) { - data1 = value; - }; - } - }); - - var newObj = Object.create({}, { - prop: child - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data1 === "overrideData" && data2 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-274 +description: > + Object.create - 'set' property of one property in 'Properties' is + own accessor property that overrides an inherited data property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + + var proto = {}; + proto.set = function (value) { + data2 = value; + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + get: function () { + return function (value) { + data1 = value; + }; + } + }); + + var newObj = Object.create({}, { + prop: child + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data1 === "overrideData" && data2 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js index e43323920f..4aa6cf9f4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js - * @description Object.create - 'set' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - var proto = {}; - - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data2 = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - get: function () { - return function (value) { - data1 = value; - }; - } - }); - - var newObj = Object.create({}, { - prop: child - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data1 === "overrideData" && data2 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-275 +description: > + Object.create - 'set' property of one property in 'Properties' is + own accessor property that overrides an inherited accessor + property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + var proto = {}; + + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data2 = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + get: function () { + return function (value) { + data1 = value; + }; + } + }); + + var newObj = Object.create({}, { + prop: child + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data1 === "overrideData" && data2 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js index 20ccea5b79..4e749830e8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js - * @description Object.create - 'set' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 8.a) - */ - - -function testcase() { - var descObj = {}; - Object.defineProperty(descObj, "set", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); - - return hasProperty && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-276 +description: > + Object.create - 'set' property of one property in 'Properties' is + own accessor property without a get function (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var descObj = {}; + Object.defineProperty(descObj, "set", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); + + return hasProperty && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js index 1c8bbf3100..617248b540 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js - * @description Object.create - 'set' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "set", { - get: function () { - return function () { }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: child - }); - - var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); - - return newObj.hasOwnProperty("prop") && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-277 +description: > + Object.create - 'set' property of one property in 'Properties' is + own accessor property without a get function, which overrides an + inherited accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "set", { + get: function () { + return function () { }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: child + }); + + var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); + + return newObj.hasOwnProperty("prop") && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js index aa19e57db2..995ab8e1ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js - * @description Object.create - 'set' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 8.a) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "set", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var child = new ConstructFun(); - - var newObj = Object.create({}, { - prop: child - }); - - var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); - - return newObj.hasOwnProperty("prop") && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-278 +description: > + Object.create - 'set' property of one property in 'Properties' is + an inherited accessor property without a get function (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "set", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var child = new ConstructFun(); + + var newObj = Object.create({}, { + prop: child + }); + + var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); + + return newObj.hasOwnProperty("prop") && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js index 06c1c62832..966bc06e9d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js - * @description Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var funObj = function () { }; - var data = "data"; - funObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: funObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-279 +description: > + Object.create - one property in 'Properties' is a Function object + which implements its own [[Get]] method to access the 'set' + property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { }; + var data = "data"; + funObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: funObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js index 30895d1e78..7cec3d4b65 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js - * @description Object.create - 'Properties' is a Function object which implements its own [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = function () { }; - props.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-28 +description: > + Object.create - 'Properties' is a Function object which implements + its own [[Get]] method to access own enumerable property (15.2.3.7 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = function () { }; + props.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js index ff4a32ad4a..1ef032c31b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js - * @description Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var arrObj = []; - var data = "data"; - arrObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: arrObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-280 +description: > + Object.create - one property in 'Properties' is an Array object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + var data = "data"; + arrObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: arrObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js index c14253c0a7..6ed87db329 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js - * @description Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var strObj = new String(); - var data = "data"; - strObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: strObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-281 +description: > + Object.create - one property in 'Properties' is a String object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String(); + var data = "data"; + strObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: strObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js index 8c69c3283b..fd84714731 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js - * @description Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var boolObj = new Boolean(true); - var data = "data"; - boolObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: boolObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-282 +description: > + Object.create - one property in 'Properties' is a Boolean object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var boolObj = new Boolean(true); + var data = "data"; + boolObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: boolObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js index 0cb3a87e7d..58608c317f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js - * @description Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var numObj = new Number(5); - var data = "data"; - numObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: numObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-283 +description: > + Object.create - one property in 'Properties' is a Number object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var numObj = new Number(5); + var data = "data"; + numObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: numObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js index 1759ec79ae..3317576ced 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js - * @description Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - - try { - Math.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: Math - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } finally { - delete Math.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-284 +description: > + Object.create - one property in 'Properties' is the Math object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + + try { + Math.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: Math + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } finally { + delete Math.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js index f23fe85893..c68093e82c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var dateObj = new Date(); - var data = "data"; - dateObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: dateObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-285 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateObj = new Date(); + var data = "data"; + dateObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: dateObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js index 1ec11bff34..12046f6a5e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js - * @description Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var regObj = new RegExp(); - var data = "data"; - regObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: regObj - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-286 +description: > + Object.create - one property in 'Properties' is a RegExp object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + var data = "data"; + regObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: regObj + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js index 948e89339d..92d3d4d918 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js - * @description Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - - try { - JSON.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: JSON - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } finally { - delete JSON.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-287 +description: > + Object.create - one property in 'Properties' is the JSON object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + + try { + JSON.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: JSON + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } finally { + delete JSON.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js index 4651085b16..e4582e3369 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js - * @description Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var errObj = new Error("error"); - var data = "data"; - - errObj.set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: errObj - }); - - newObj.prop = "overrideData"; - - return newObj.hasOwnProperty("prop") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-288 +description: > + Object.create - one property in 'Properties' is an Error object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error("error"); + var data = "data"; + + errObj.set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: errObj + }); + + newObj.prop = "overrideData"; + + return newObj.hasOwnProperty("prop") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js index 5615feb34d..0bb66cf58c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js - * @description Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var argObj = (function () { return arguments; })(); - - var data = "data"; - - argObj.set = function (value) { - data = value; - }; - - var newobj = Object.create({}, { - prop: argObj - }); - - var hasProperty = newobj.hasOwnProperty("prop"); - - newobj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-289 +description: > + Object.create - one property in 'Properties' is an Arguments + object which implements its own [[Get]] method to access the 'set' + property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function () { return arguments; })(); + + var data = "data"; + + argObj.set = function (value) { + data = value; + }; + + var newobj = Object.create({}, { + prop: argObj + }); + + var hasProperty = newobj.hasOwnProperty("prop"); + + newobj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js index 62c39eb12a..0da2604bb7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js - * @description Object.create - 'Properties' is an Array object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = []; - props.prop = { - value: {}, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-29 +description: > + Object.create - 'Properties' is an Array object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = []; + props.prop = { + value: {}, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js index d3c24c0b04..3c7ca74371 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js - * @description Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - - try { - fnGlobalObject().set = function (value) { - data = value; - }; - - var newObj = Object.create({}, { - prop: fnGlobalObject() - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = "overrideData"; - - return hasProperty && data === "overrideData"; - } finally { - delete fnGlobalObject().set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-291 +description: > + Object.create - one property in 'Properties' is the global object + that uses Object's [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var data = "data"; + + try { + fnGlobalObject().set = function (value) { + data = value; + }; + + var newObj = Object.create({}, { + prop: fnGlobalObject() + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = "overrideData"; + + return hasProperty && data === "overrideData"; + } finally { + delete fnGlobalObject().set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js index de777cc662..ca442da2ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js - * @description Object.create - 'set' property of one property in 'Properties' is undefined (8.10.5 step 8.b) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - set: undefined - } - }); - - newObj.prop = "overrideData"; - - return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-292 +description: > + Object.create - 'set' property of one property in 'Properties' is + undefined (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + set: undefined + } + }); + + newObj.prop = "overrideData"; + + return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js index 53eaf66135..3163f66e5d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js - * @description Object.create - 'set' property of one property in 'Properties' is a primitive value null (8.10.5 step 8.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: null - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-293 +description: > + Object.create - 'set' property of one property in 'Properties' is + a primitive value null (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: null + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js index 2a0d4f64d6..71721d44be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js - * @description Object.create - 'set' property of one property in 'Properties' is a primitive boolean value true (8.10.5 step 8.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-294 +description: > + Object.create - 'set' property of one property in 'Properties' is + a primitive boolean value true (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js index 18c78c5c6e..bab792c663 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js - * @description Object.create - 'set' property of one property in 'Properties' is a primitive number value (8.10.5 step 8.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: 123 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-295 +description: > + Object.create - 'set' property of one property in 'Properties' is + a primitive number value (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: 123 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js index 9ad65bdfae..083b7346ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js - * @description Object.create - 'set' property of one property in 'Properties' is a primitive string value (8.10.5 step 8.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: "abc" - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-296 +description: > + Object.create - 'set' property of one property in 'Properties' is + a primitive string value (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: "abc" + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js index 0160ba6e7d..9b99b2710e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js - * @description Object.create - 'set' property of one property in 'Properties' is an Date object (8.10.5 step 8.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: new Date() - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-297 +description: > + Object.create - 'set' property of one property in 'Properties' is + an Date object (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: new Date() + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js index 01a6d857ff..a79e8c4f2a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js - * @description Object.create - 'set' property of one property in 'Properties' is a function (8.10.5 step 8.b) - */ - - -function testcase() { - var data = "data"; - - var newObj = Object.create({}, { - prop: { - set: function (value) { - data = value; - } - } - }); - - newObj.prop = "overrideData"; - - return newObj.hasOwnProperty("prop") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-298 +description: > + Object.create - 'set' property of one property in 'Properties' is + a function (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + + var newObj = Object.create({}, { + prop: { + set: function (value) { + data = value; + } + } + }); + + newObj.prop = "overrideData"; + + return newObj.hasOwnProperty("prop") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js index 27fb1e8971..44df3f38af 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js - * @description Object.create throws TypeError if 'Properties' is null (15.2.3.7 step 2) - */ - - -function testcase() { - - try { - Object.create({}, null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-3 +description: > + Object.create throws TypeError if 'Properties' is null (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js index 9c6898b2f5..b6fa68effb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js - * @description Object.create - 'Properties' is a String object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = new String(); - props.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-30 +description: > + Object.create - 'Properties' is a String object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new String(); + props.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js index e73359cb41..7d2ed73dc1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js - * @description Object.create - 'set' property of one property in 'Properties' is a host object that isn't callable (8.10.5 step 8.b) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: fnGlobalObject() - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-300 +description: > + Object.create - 'set' property of one property in 'Properties' is + a host object that isn't callable (8.10.5 step 8.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: fnGlobalObject() + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js index 8af3f6b724..5b61c75e72 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js - * @description Object.create - TypeError is thrown if both 'set' property and 'value' property of one property in 'Properties' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: function () { }, - value: 100 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-301 +description: > + Object.create - TypeError is thrown if both 'set' property and + 'value' property of one property in 'Properties' are present + (8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: function () { }, + value: 100 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js index aa7798cd56..d579a52892 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js - * @description Object.create - TypeError is thrown if both 'set' property and 'writable' property of one property in 'Properties' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - set: function () { }, - writable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-302 +description: > + Object.create - TypeError is thrown if both 'set' property and + 'writable' property of one property in 'Properties' are present + (8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + set: function () { }, + writable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js index 10c088f837..27672fdb6f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js - * @description Object.create - TypeError is thrown if both 'get' property and 'value' property of one property in 'Properties' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - get: function () { }, - value: 100 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-303 +description: > + Object.create - TypeError is thrown if both 'get' property and + 'value' property of one property in 'Properties' are present + (8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + get: function () { }, + value: 100 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js index c431a3d194..ff6f1c3bdb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js - * @description Object.create - TypeError is thrown if both 'get' property and 'writable' property of one property in 'Properties' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: { - get: function () { }, - writable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-304 +description: > + Object.create - TypeError is thrown if both 'get' property and + 'writable' property of one property in 'Properties' are present + (8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: { + get: function () { }, + writable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js index 3d6a94e37a..7fbff73df5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js - * @description Object.create defines a data property when one property in 'Properties' is generic descriptor (8.12.9 step 4.a) - */ - - -function testcase() { - - try { - var newObj = Object.create({}, { - prop: { - enumerable: true - } - }); - return newObj.hasOwnProperty("prop"); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-305 +description: > + Object.create defines a data property when one property in + 'Properties' is generic descriptor (8.12.9 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + var newObj = Object.create({}, { + prop: { + enumerable: true + } + }); + return newObj.hasOwnProperty("prop"); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js index 329d31a4f8..0508529b5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js - * @description Object.create - [[Value]] is set as undefined if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) - */ - - -function testcase() { - - try { - var newObj = Object.create({}, { - prop: { - writable: true, - configurable: true, - enumerable: true - } - }); - return newObj.hasOwnProperty("prop") && newObj.prop === undefined; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-306 +description: > + Object.create - [[Value]] is set as undefined if it is absent in + data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + var newObj = Object.create({}, { + prop: { + writable: true, + configurable: true, + enumerable: true + } + }); + return newObj.hasOwnProperty("prop") && newObj.prop === undefined; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js index 41e876029e..f95c34d065 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js - * @description Object.create - [[Writable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - value: 1001, - configurable: true, - enumerable: true - } - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - newObj.prop = 12; - - return hasProperty && newObj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-307 +description: > + Object.create - [[Writable]] is set as false if it is absent in + data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + value: 1001, + configurable: true, + enumerable: true + } + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + newObj.prop = 12; + + return hasProperty && newObj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js index d7d8e5b68b..2d06988e45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js - * @description Object.create - [[Enumerable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var isEnumerable = false; - - var newObj = Object.create({}, { - prop: { - value: 1001, - writable: true, - configurable: true - } - }); - - var hasProperty = newObj.hasOwnProperty("prop"); - - for (var p in newObj) { - if (p === "prop") { - isEnumerable = true; - } - } - return hasProperty && !isEnumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-308 +description: > + Object.create - [[Enumerable]] is set as false if it is absent in + data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var isEnumerable = false; + + var newObj = Object.create({}, { + prop: { + value: 1001, + writable: true, + configurable: true + } + }); + + var hasProperty = newObj.hasOwnProperty("prop"); + + for (var p in newObj) { + if (p === "prop") { + isEnumerable = true; + } + } + return hasProperty && !isEnumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js index 0a08caecd7..f4df7a154a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js - * @description Object.create - [[Configurable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var isNotConfigurable = false; - - try { - var newObj = Object.create({}, { - prop: { - value: 1001, - writable: true, - enumerable: true - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - delete newObj.prop; - isNotConfigurable = newObj.hasOwnProperty("prop"); - return hasProperty && isNotConfigurable; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-309 +description: > + Object.create - [[Configurable]] is set as false if it is absent + in data descriptor of one property in 'Properties' (8.12.9 step + 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var isNotConfigurable = false; + + try { + var newObj = Object.create({}, { + prop: { + value: 1001, + writable: true, + enumerable: true + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + delete newObj.prop; + isNotConfigurable = newObj.hasOwnProperty("prop"); + return hasProperty && isNotConfigurable; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js index ec42b80a7d..e9f4d729c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js - * @description Object.create - 'Properties' is a Boolean object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = new Boolean(false); - props.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-31 +description: > + Object.create - 'Properties' is a Boolean object that uses + Object's [[Get]] method to access own enumerable property + (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Boolean(false); + props.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js index f84a8e8040..03688b3827 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js - * @description Object.create - [[Get]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - set: function () { }, - enumerable: true, - configurable: true - } - }); - return newObj.hasOwnProperty("prop") && newObj.prop === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-310 +description: > + Object.create - [[Get]] is set as undefined if it is absent in + accessor descriptor of one property in 'Properties' (8.12.9 step + 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + set: function () { }, + enumerable: true, + configurable: true + } + }); + return newObj.hasOwnProperty("prop") && newObj.prop === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js index 3e3806f5db..178b222528 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js - * @description Object.create - [[Set]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - get: function () { - return "verifyCreate"; - }, - enumerable: true, - configurable: true - } - }); - - var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); - var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; - - var verifyGet = false; - if (newObj.prop === "verifyCreate") { - verifyGet = true; - } - - var verifyEnumerable = false; - for (var p in newObj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - var hasProperty = newObj.hasOwnProperty("prop"); - delete newObj.prop; - verifyConfigurable = !newObj.hasOwnProperty("prop") && hasProperty; - - return verifySet && verifyGet && verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-311 +description: > + Object.create - [[Set]] is set as undefined if it is absent in + accessor descriptor of one property in 'Properties' (8.12.9 step + 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + get: function () { + return "verifyCreate"; + }, + enumerable: true, + configurable: true + } + }); + + var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); + var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; + + var verifyGet = false; + if (newObj.prop === "verifyCreate") { + verifyGet = true; + } + + var verifyEnumerable = false; + for (var p in newObj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + var hasProperty = newObj.hasOwnProperty("prop"); + delete newObj.prop; + verifyConfigurable = !newObj.hasOwnProperty("prop") && hasProperty; + + return verifySet && verifyGet && verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js index 152f53b70a..95ceefefa6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js - * @description Object.create - [[Enumerable]] is set as false if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b) - */ - - -function testcase() { - var isEnumerable = false; - var newObj = Object.create({}, { - prop: { - set: function () { }, - get: function () { }, - configurable: true - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - for (var p in newObj) { - if (p === "prop") { - isEnumerable = true; - } - } - return hasProperty && !isEnumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-312 +description: > + Object.create - [[Enumerable]] is set as false if it is absent in + accessor descriptor of one property in 'Properties' (8.12.9 step + 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var isEnumerable = false; + var newObj = Object.create({}, { + prop: { + set: function () { }, + get: function () { }, + configurable: true + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + for (var p in newObj) { + if (p === "prop") { + isEnumerable = true; + } + } + return hasProperty && !isEnumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js index c9d0a00267..f68d1b2f60 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js - * @description Object.create - [[Configurable]] is set as false if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b) - */ - - -function testcase() { - var newObj = Object.create({}, { - prop: { - set: function () { }, - get: function () { }, - enumerable: true - } - }); - var hasProperty = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var isNotConfigurable = newObj.hasOwnProperty("prop"); - return hasProperty && isNotConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-313 +description: > + Object.create - [[Configurable]] is set as false if it is absent + in accessor descriptor of one property in 'Properties' (8.12.9 + step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var newObj = Object.create({}, { + prop: { + set: function () { }, + get: function () { }, + enumerable: true + } + }); + var hasProperty = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var isNotConfigurable = newObj.hasOwnProperty("prop"); + return hasProperty && isNotConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js index 5621b4a9b6..f069e37893 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js - * @description Object.create - some enumerable own property in 'Properties' is empty object (15.2.3.7 step 7) - */ - - -function testcase() { - - var newObj = Object.create({}, { - foo: {} - }); - return newObj.hasOwnProperty("foo"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-314 +description: > + Object.create - some enumerable own property in 'Properties' is + empty object (15.2.3.7 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + foo: {} + }); + return newObj.hasOwnProperty("foo"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js index da251845a7..da1c857876 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js @@ -1,39 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js - * @description Object.create - all properties in 'Properties' are enumerable (data property and accessor property) (15.2.3.7 step 7) - */ - - -function testcase() { - - var newObj = {}; - function getFunc() { - return 10; - } - function setFunc(value) { - newObj.setVerifyHelpProp = value; - } - - newObj = Object.create({}, { - foo1: { - value: 200, - enumerable: true, - writable: true, - configurable: true - }, - foo2: { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - } - }); - return dataPropertyAttributesAreCorrect(newObj, "foo1", 200, true, true, true) && - accessorPropertyAttributesAreCorrect(newObj, "foo2", getFunc, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-315 +description: > + Object.create - all properties in 'Properties' are enumerable + (data property and accessor property) (15.2.3.7 step 7) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var newObj = {}; + function getFunc() { + return 10; + } + function setFunc(value) { + newObj.setVerifyHelpProp = value; + } + + newObj = Object.create({}, { + foo1: { + value: 200, + enumerable: true, + writable: true, + configurable: true + }, + foo2: { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + } + }); + return dataPropertyAttributesAreCorrect(newObj, "foo1", 200, true, true, true) && + accessorPropertyAttributesAreCorrect(newObj, "foo2", getFunc, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js index 0601c1fa7c..faa8e32708 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js - * @description Object.create - enumerable properties of 'Properties' are given numerical names (15.2.3.7 step 7) - */ - - -function testcase() { - - function getFunc() { - return 20; - } - function setFunc() { } - - var newObj = Object.create({}, { - 0: { - value: 100, - enumerable: true, - writable: true, - configurable: true - }, - 1: { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }, - 2: { - value: 200, - enumerable: true, - writable: true, - configurable: true - } - }); - return newObj[0] === 100 && newObj[1] === 20 && newObj[2] === 200; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-316 +description: > + Object.create - enumerable properties of 'Properties' are given + numerical names (15.2.3.7 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function getFunc() { + return 20; + } + function setFunc() { } + + var newObj = Object.create({}, { + 0: { + value: 100, + enumerable: true, + writable: true, + configurable: true + }, + 1: { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }, + 2: { + value: 200, + enumerable: true, + writable: true, + configurable: true + } + }); + return newObj[0] === 100 && newObj[1] === 20 && newObj[2] === 200; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js index 5b3aa58a96..41df98bb8c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js - * @description Object.create - 'Properties' is a Number object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = new Number(-9); - props.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-32 +description: > + Object.create - 'Properties' is a Number object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Number(-9); + props.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js index 0a60b9f84d..8179a37e53 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js - * @description Object.create - 'Properties' is the Math object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - try { - Math.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, Math); - return newObj.hasOwnProperty("prop"); - } finally { - delete Math.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-33 +description: > + Object.create - 'Properties' is the Math object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Math.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, Math); + return newObj.hasOwnProperty("prop"); + } finally { + delete Math.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js index 8d6c037ab6..3dc99420f5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js - * @description Object.create - 'Properties' is a Date object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = new Date(); - props.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-34 +description: > + Object.create - 'Properties' is a Date object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Date(); + props.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js index 7669003702..11d83975c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js - * @description Object.create - 'Properties' is a RegExp object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = new RegExp(); - props.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-35 +description: > + Object.create - 'Properties' is a RegExp object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new RegExp(); + props.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js index e1a9b82880..cd851c749b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js - * @description Object.create - 'Properties' is the JSON object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - try { - JSON.prop = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, JSON); - return newObj.hasOwnProperty("prop"); - } finally { - delete JSON.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-36 +description: > + Object.create - 'Properties' is the JSON object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + JSON.prop = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, JSON); + return newObj.hasOwnProperty("prop"); + } finally { + delete JSON.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js index 359ce95f9c..a40de36b59 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js - * @description Object.create - 'Properties' is an Error object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = new Error("test"); - - (Object.getOwnPropertyNames(props)).forEach(function(name){ - props[name] = {value:11, configurable:true} - }); - - props.prop15_2_3_5_4_37 = { - value: 12, - enumerable: true - }; - var newObj = Object.create({}, props); - return newObj.hasOwnProperty("prop15_2_3_5_4_37"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-37 +description: > + Object.create - 'Properties' is an Error object that uses Object's + [[Get]] method to access own enumerable property (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Error("test"); + + (Object.getOwnPropertyNames(props)).forEach(function(name){ + props[name] = {value:11, configurable:true} + }); + + props.prop15_2_3_5_4_37 = { + value: 12, + enumerable: true + }; + var newObj = Object.create({}, props); + return newObj.hasOwnProperty("prop15_2_3_5_4_37"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js index 57eb1e4e8e..ad5d00f03f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js - * @description Object.create - 'Properties' is an Arguments object which implements its own [[Get]] method to access own enumerable property (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - argObj.prop = { - value: 12, - enumerable: true - }; - - var newObj = Object.create({}, argObj); - - return newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-38 +description: > + Object.create - 'Properties' is an Arguments object which + implements its own [[Get]] method to access own enumerable + property (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + argObj.prop = { + value: 12, + enumerable: true + }; + + var newObj = Object.create({}, argObj); + + return newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js index 8a3f2f2a2b..ebf2f691cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js - * @description Object.create - ensure that side-effects of gets occur in the same order as they would for: for (P in props) props[P] (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var props = {}; - props.prop1 = { value: 12, enumerable: true }; - props.prop2 = { value: true, enumerable: true }; - - var tempArray = []; - for (var p in props) { - if (props.hasOwnProperty(p)) { - tempArray.push(p); - } - } - - var newObj = Object.create({}, props); - var index = 0; - for (var q in newObj) { - if (tempArray[index++] !== q && newObj.hasOwnProperty(q)) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-39 +description: > + Object.create - ensure that side-effects of gets occur in the same + order as they would for: for (P in props) props[P] (15.2.3.7 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = {}; + props.prop1 = { value: 12, enumerable: true }; + props.prop2 = { value: true, enumerable: true }; + + var tempArray = []; + for (var p in props) { + if (props.hasOwnProperty(p)) { + tempArray.push(p); + } + } + + var newObj = Object.create({}, props); + var index = 0; + for (var q in newObj) { + if (tempArray[index++] !== q && newObj.hasOwnProperty(q)) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js index 34a09e75a9..bca0958cc2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js - * @description Object.create - argument 'Properties' is an object (15.2.3.7 step 2). - */ - - -function testcase() { - - var props = {}; - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Object; - return {}; - }, - enumerable: true - }); - Object.create({}, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-4 +description: > + Object.create - argument 'Properties' is an object (15.2.3.7 step + 2). +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = {}; + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Object; + return {}; + }, + enumerable: true + }); + Object.create({}, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js index 3fd11b8328..7716de7b5b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js - * @description Object.create - ensure that if an exception is thrown it occurs in the correct order relative to prior and subsequent side-effects (15.2.3.7 step 5.a) - */ - - -function testcase() { - - var newObj = {}; - var props = {}; - var i = 0; - - Object.defineProperty(props, "prop1", { - get: function () { - i++; - return {}; - }, - enumerable: true - }); - - Object.defineProperty(props, "prop2", { - get: function () { - if (1 === i++) { - throw new RangeError(); - } else { - return {}; - } - }, - enumerable: true - }); - - try { - newObj = Object.create({}, props); - return false; - } catch (e) { - return (e instanceof RangeError) && !newObj.hasOwnProperty("prop1") && i === 2; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-40 +description: > + Object.create - ensure that if an exception is thrown it occurs in + the correct order relative to prior and subsequent side-effects + (15.2.3.7 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = {}; + var props = {}; + var i = 0; + + Object.defineProperty(props, "prop1", { + get: function () { + i++; + return {}; + }, + enumerable: true + }); + + Object.defineProperty(props, "prop2", { + get: function () { + if (1 === i++) { + throw new RangeError(); + } else { + return {}; + } + }, + enumerable: true + }); + + try { + newObj = Object.create({}, props); + return false; + } catch (e) { + return (e instanceof RangeError) && !newObj.hasOwnProperty("prop1") && i === 2; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js index 26c89d6ffd..9046ba9f4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js - * @description Object.create - value of one property in 'Properties' is undefined (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: undefined - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-41 +description: > + Object.create - value of one property in 'Properties' is undefined + (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: undefined + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js index 9100eaadbb..b7248ddf3e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js - * @description Object.create - value of one property in 'Properties' is null (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: null - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-42 +description: > + Object.create - value of one property in 'Properties' is null + (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: null + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js index 4091d5b1c4..1689dcf391 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js - * @description Object.create - value of one property in 'Properties' is false (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: false - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-43 +description: > + Object.create - value of one property in 'Properties' is false + (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: false + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js index e03eebe48f..bae77cbd8d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js - * @description Object.create - value of one property in 'Properties' is a number primitive (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: 12 - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-44 +description: > + Object.create - value of one property in 'Properties' is a number + primitive (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: 12 + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js index 09f357110f..602c9c6ad7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js - * @description Object.create - value of one property in 'Properties' is a string (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.create({}, { - prop: "abc" - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-45 +description: > + Object.create - value of one property in 'Properties' is a string + (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.create({}, { + prop: "abc" + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js index 7e0a83b8ec..d058fa85cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is true (8.10.5 step 3) - */ - - -function testcase() { - - var accessed = false; - var newObj = Object.create({}, { - prop: { - enumerable: true - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-46 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is true (8.10.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var newObj = Object.create({}, { + prop: { + enumerable: true + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js index 19c7ec676b..5166c7893e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is not present (8.10.5 step 3) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: {} - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-47 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is not present (8.10.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: {} + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js index b9fcfddbcc..78ee05550c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: true - } - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-48 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: true + } + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js index 44a70fbad7..f00e81467e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - - var proto = { - enumerable: true - }; - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-49 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an inherited data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var proto = { + enumerable: true + }; + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js index a8637ea333..b08c56ade8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js - * @description Object.create - argument 'Properties' is a Function object (15.2.3.7 step 2) - */ - - -function testcase() { - - var props = function () { }; - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Function; - return {}; - }, - enumerable: true - }); - Object.create({}, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-5 +description: > + Object.create - argument 'Properties' is a Function object + (15.2.3.7 step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = function () { }; + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Function; + return {}; + }, + enumerable: true + }); + Object.create({}, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js index 353ef477c2..f77c5214b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var proto = { - enumerable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "enumerable", { - value: false - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-50 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own data property that overrides an inherited data + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var proto = { + enumerable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "enumerable", { + value: false + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js index 167bbe3e5c..5c5310d1be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var proto = {}; - var accessed = false; - - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "enumerable", { - value: false - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-51 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own data property that overrides an inherited + accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + var accessed = false; + + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "enumerable", { + value: false + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js index 7eb16331d9..46ec44f712 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - - var descObj = {}; - Object.defineProperty(descObj, "enumerable", { - get: function () { - return true; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-52 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var descObj = {}; + Object.defineProperty(descObj, "enumerable", { + get: function () { + return true; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js index 6052457955..29f7aea9e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var proto = {}; - var accessed = false; - - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-53 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an inherited accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + var accessed = false; + + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js index 06271d024b..b0f526204c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var proto = { - enumerable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "enumerable", { - get: function () { - return false; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-54 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own accessor property that overrides an inherited + data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var proto = { + enumerable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "enumerable", { + get: function () { + return false; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js index 8b7163da8a..0f66ccbf8b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var proto = {}; - var accessed = false; - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "enumerable", { - get: function () { - return false; - } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-55 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own accessor property that overrides an inherited + accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + var accessed = false; + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "enumerable", { + get: function () { + return false; + } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js index ddc9fe3884..85537ff87b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = {}; - Object.defineProperty(descObj, "enumerable", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-56 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own accessor property without a get function + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = {}; + Object.defineProperty(descObj, "enumerable", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js index ca5f25e7fc..e97fd60847 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var proto = {}; - var accessed = false; - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - Object.defineProperty(descObj, "enumerable", { - set: function () { } - }); - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-57 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is own accessor property without a get function, + which overrides an inherited accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + var accessed = false; + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + Object.defineProperty(descObj, "enumerable", { + set: function () { } + }); + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js index 3596695a78..5fbe0f6664 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 3.a) - */ - - -function testcase() { - - - var proto = {}; - var accessed = false; - - Object.defineProperty(proto, "enumerable", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var descObj = new ConstructFun(); - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-58 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an inherited accessor property without a get + function (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + + var proto = {}; + var accessed = false; + + Object.defineProperty(proto, "enumerable", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var descObj = new ConstructFun(); + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js index 230f15a697..cb7b970603 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js - * @description Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = function () { }; - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-59 +description: > + Object.create - one property in 'Properties' is a Function object + which implements its own [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = function () { }; + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js index 718fc11026..b33e94b453 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js - * @description Object.create - argument 'Properties' is an Array object (15.2.3.7 step 2). - */ - - -function testcase() { - - var props = []; - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Array; - return {}; - }, - enumerable: true - }); - Object.create({}, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-6 +description: > + Object.create - argument 'Properties' is an Array object (15.2.3.7 + step 2). +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = []; + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Array; + return {}; + }, + enumerable: true + }); + Object.create({}, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js index 2853006b09..a0434bc713 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js - * @description Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - - var accessed = false; - var descObj = []; - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-60 +description: > + Object.create - one property in 'Properties' is an Array object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + + var accessed = false; + var descObj = []; + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js index 602c04d988..465ef7f0f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js - * @description Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = new String(); - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-61 +description: > + Object.create - one property in 'Properties' is a String object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = new String(); + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js index 57a548ff2e..23fdc6a71e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js - * @description Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = new Boolean(false); - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-62 +description: > + Object.create - one property in 'Properties' is a Boolean object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = new Boolean(false); + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js index ec541193f3..2401f6ee0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js - * @description Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = new Number(-9); - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-63 +description: > + Object.create - one property in 'Properties' is a Number object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = new Number(-9); + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js index 4f32bd625f..bda625e9af 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js - * @description Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - - try { - Math.enumerable = true; - - var newObj = Object.create({}, { - prop: Math - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } finally { - delete Math.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-64 +description: > + Object.create - one property in 'Properties' is the Math object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + try { + Math.enumerable = true; + + var newObj = Object.create({}, { + prop: Math + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } finally { + delete Math.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js index a2dd82fe8f..3051880679 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js - * @description Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = new Date(); - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-65 +description: > + Object.create - one property in 'Properties' is a Date object that + uses Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = new Date(); + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js index 8a6541f158..0eacc998a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js - * @description Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = new RegExp(); - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-66 +description: > + Object.create - one property in 'Properties' is a RegExp object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = new RegExp(); + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js index 5bbd08d5ca..501d2f1286 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js - * @description Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - - try { - JSON.enumerable = true; - - var newObj = Object.create({}, { - prop: JSON - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } finally { - delete JSON.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-67 +description: > + Object.create - one property in 'Properties' is the JSON object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + try { + JSON.enumerable = true; + + var newObj = Object.create({}, { + prop: JSON + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } finally { + delete JSON.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js index badddaf532..96d81c64d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js - * @description Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var descObj = new Error(); - - descObj.enumerable = true; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-68 +description: > + Object.create - one property in 'Properties' is an Error object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var descObj = new Error(); + + descObj.enumerable = true; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js index 46651bf00d..9fd4287f14 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js - * @description Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - var argObj = (function () { return arguments; })(); - - argObj.enumerable = true; - - var newObj = Object.create({}, { - prop: argObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-69 +description: > + Object.create - one property in 'Properties' is an Arguments + object which implements its own [[Get]] method to access the + 'enumerable' property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var argObj = (function () { return arguments; })(); + + argObj.enumerable = true; + + var newObj = Object.create({}, { + prop: argObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js index b5a9792caa..5b9ec0f52f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js - * @description Object.create - argument 'Properties' is a String object (15.2.3.7 step 2) - */ - - -function testcase() { - - var props = new String(); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof String; - return {}; - }, - enumerable: true - }); - Object.create({}, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-7 +description: > + Object.create - argument 'Properties' is a String object (15.2.3.7 + step 2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new String(); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof String; + return {}; + }, + enumerable: true + }); + Object.create({}, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js index 1e0347e1c2..a380620562 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js - * @description Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var accessed = false; - - try { - fnGlobalObject().enumerable = true; - - var newObj = Object.create({}, { - prop: fnGlobalObject() - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } finally { - delete fnGlobalObject().enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-71 +description: > + Object.create - one property in 'Properties' is the global object + that uses Object's [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + + try { + fnGlobalObject().enumerable = true; + + var newObj = Object.create({}, { + prop: fnGlobalObject() + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } finally { + delete fnGlobalObject().enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js index 6afff2bdb6..a4bdc26c9c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is undefined (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: undefined - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-72 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is undefined (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: undefined + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js index 13e38db800..b4b11f0c37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js - * @description Object.create - value of 'enumerable' property of one property in 'Properties' is null (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: null - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-73 +description: > + Object.create - value of 'enumerable' property of one property in + 'Properties' is null (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: null + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js index 7124e965ca..b50d5e8c88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is true (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: true - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-74 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is true (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: true + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js index 3fd3bc8543..d70e8820d0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is false (8.10.5 step 3.b) - */ - - -function testcase() { - - - var accessed = false; - var descObj = { - enumerable: false - }; - - var newObj = Object.create({}, { - prop: descObj - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-75 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is false (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + + var accessed = false; + var descObj = { + enumerable: false + }; + + var newObj = Object.create({}, { + prop: descObj + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js index 9fe510bbde..783be0ea58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is 0 (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: 0 - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-76 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is 0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: 0 + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js index c5811a2c7c..7cc65029b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is +0 (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: +0 - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-77 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is +0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: +0 + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js index ee7a3f7ece..eb17f5f1af 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is -0 (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: -0 - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-78 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is -0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: -0 + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js index 42b52143ba..91fd5a9b48 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is NaN (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: NaN - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-79 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is NaN (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: NaN + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js index e5474954c3..7d756111ee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js - * @description Object.create - argument 'Properties' is a Boolean object whose primitive value is true (15.2.3.7 step 2). - */ - - -function testcase() { - - var props = new Boolean(true); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Boolean; - return {}; - }, - enumerable: true - }); - Object.create({}, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-8 +description: > + Object.create - argument 'Properties' is a Boolean object whose + primitive value is true (15.2.3.7 step 2). +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Boolean(true); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Boolean; + return {}; + }, + enumerable: true + }); + Object.create({}, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js index e03133dfb1..cbee2c268e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a positive number primitive (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: 12 - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-80 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a positive number primitive (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: 12 + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js index 8dc8978b0a..6da1ba8952 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a negative number primitive (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: -9 - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-81 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a negative number primitive (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: -9 + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js index d848796ff6..fd7e429a5b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an empty string (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: "" - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed && newObj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-82 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an empty string (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: "" + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed && newObj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js index a77811bd39..a30cf3884e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a non-empty string (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: "AB\n\\cd" - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-83 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a non-empty string (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: "AB\n\\cd" + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js index 0e460058dc..b4bf3f1b20 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a Function object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: function () { } - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-84 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a Function object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: function () { } + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js index e5ee341453..ff30d20989 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an Array object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: [] - } - }); - - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-85 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an Array object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: [] + } + }); + + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js index 997980119b..7647b6d6c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a String object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new String() - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-86 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a String object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new String() + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js index e3d4906122..9df8f3446d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a Boolean object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new Boolean(true) - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-87 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a Boolean object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new Boolean(true) + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js index 62914dd6b2..711c5f624e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a Number object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new Number(-9) - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-88 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a Number object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new Number(-9) + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js index 9d86598f1f..82a1d415f4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is the Math object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: Math - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-89 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is the Math object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: Math + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js index 4bffa31c29..6f0c4b7861 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js - * @description Object.create - argument 'Properties' is a Number object whose primitive value is any interesting number (15.2.3.7 step 2). - */ - - -function testcase() { - - var props = new Number(12); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Number; - return {}; - }, - enumerable: true - }); - Object.create({}, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-9 +description: > + Object.create - argument 'Properties' is a Number object whose + primitive value is any interesting number (15.2.3.7 step 2). +includes: [runTestCase.js] +---*/ + +function testcase() { + + var props = new Number(12); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Number; + return {}; + }, + enumerable: true + }); + Object.create({}, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js index bc778b69fa..ba785b0215 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a Date object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new Date() - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-90 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a Date object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new Date() + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js index 21766aee01..c011a1850c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a RegExp object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new RegExp() - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-91 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a RegExp object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new RegExp() + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js index 9acf9abc5f..7ada969e2d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is the JSON object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: JSON - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-92 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is the JSON object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: JSON + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js index 58bb770d25..6e19aafa0a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an Error object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new Error() - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-93 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an Error object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new Error() + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js index 19cf008083..e7e7b72cbc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is an Arguments object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - var argObj = (function () { return arguments; })(); - - var newObj = Object.create({}, { - prop: { - enumerable: argObj - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-94 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is an Arguments object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var argObj = (function () { return arguments; })(); + + var newObj = Object.create({}, { + prop: { + enumerable: argObj + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js index d4f5aa133b..666aac5cbf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is the global object (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: fnGlobalObject() - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-96 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is the global object (8.10.5 step 3.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: fnGlobalObject() + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js index 02448d57d0..c4cfe71a45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is a string (value is 'false'), which is treated as the value true (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: "false" - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-97 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is a string (value is 'false'), which is treated as + the value true (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: "false" + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js index f5a56793ef..dbaeae96d6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js - * @description Object.create - 'enumerable' property of one property in 'Properties' is new Boolean(false), which is treated as the value true (8.10.5 step 3.b) - */ - - -function testcase() { - - var accessed = false; - - var newObj = Object.create({}, { - prop: { - enumerable: new Boolean(false) - } - }); - for (var property in newObj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-98 +description: > + Object.create - 'enumerable' property of one property in + 'Properties' is new Boolean(false), which is treated as the value + true (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var newObj = Object.create({}, { + prop: { + enumerable: new Boolean(false) + } + }); + for (var property in newObj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js index e2e656f00f..d609288ee2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js - * @description Object.create - 'configurable' property of one property in 'Properties' is true (8.10.5 step 4) - */ - - -function testcase() { - - var newObj = Object.create({}, { - prop: { - configurable: true - } - }); - - var result1 = newObj.hasOwnProperty("prop"); - delete newObj.prop; - var result2 = newObj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.5-4-99 +description: > + Object.create - 'configurable' property of one property in + 'Properties' is true (8.10.5 step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newObj = Object.create({}, { + prop: { + configurable: true + } + }); + + var result1 = newObj.hasOwnProperty("prop"); + delete newObj.prop; + var result2 = newObj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js index c9f48dc26a..5abe35b1f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js - * @description Object.defineProperty must exist as a function - */ - - -function testcase() { - var f = Object.defineProperty; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-0-1 +description: Object.defineProperty must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.defineProperty; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js index 71d533903a..a9b99cceca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js - * @description Object.defineProperty must exist as a function taking 3 parameters - */ - - -function testcase() { - if (Object.defineProperty.length === 3) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-0-2 +description: Object.defineProperty must exist as a function taking 3 parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.defineProperty.length === 3) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js index 2c596c6ca0..74fd5c34b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js - * @description Object.defineProperty applied to undefined throws a TypeError - */ - - -function testcase() { - try { - Object.defineProperty(undefined, "foo", {}); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-1-1 +description: Object.defineProperty applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(undefined, "foo", {}); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js index a155f823f4..4bd68f83ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js - * @description Object.defineProperty applied to null throws a TypeError - */ - - -function testcase() { - try { - Object.defineProperty(null, "foo", {}); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-1-2 +description: Object.defineProperty applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(null, "foo", {}); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js index 4c029e3c29..a4c6afd4ba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js - * @description Object.defineProperty applied to number primitive throws a TypeError - */ - - -function testcase() { - try { - Object.defineProperty(5, "foo", {}); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-1-3 +description: > + Object.defineProperty applied to number primitive throws a + TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(5, "foo", {}); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js index d79ebd9297..e9c8f52960 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js - * @description Object.defineProperty applied to string primitive throws a TypeError - */ - - -function testcase() { - try { - Object.defineProperty("hello\nworld\\!", "foo", {}); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-1-4 +description: > + Object.defineProperty applied to string primitive throws a + TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty("hello\nworld\\!", "foo", {}); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js index e513010569..d6c6792c81 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js - * @description Object.defineProperty throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.defineProperty(true, "foo", {}); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-1 +description: > + Object.defineProperty throws TypeError if type of first param is + not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(true, "foo", {}); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js index 643e6f35a9..a613839af0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js - * @description Object.defineProperty - argument 'P' is undefined that converts to string 'undefined' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, undefined, {}); - - return obj.hasOwnProperty("undefined"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-1 +description: > + Object.defineProperty - argument 'P' is undefined that converts to + string 'undefined' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, undefined, {}); + + return obj.hasOwnProperty("undefined"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js index 83cea7e1a0..fa06f51a41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is a negative number) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, -20, {}); - - return obj.hasOwnProperty("-20"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-10 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is a negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, -20, {}); + + return obj.hasOwnProperty("-20"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js index 7f634c3f6a..955529feac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is Infinity) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, Infinity, {}); - - return obj.hasOwnProperty("Infinity"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-11 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, Infinity, {}); + + return obj.hasOwnProperty("Infinity"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js index 6f21c4d4e3..c9ec29860a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is +Infinity) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, +Infinity, {}); - - return obj.hasOwnProperty("Infinity"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-12 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is +Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, +Infinity, {}); + + return obj.hasOwnProperty("Infinity"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js index 82eaa17a43..6ead89a9a9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is -Infinity) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, -Infinity, {}); - - return obj.hasOwnProperty("-Infinity"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-13 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, -Infinity, {}); + + return obj.hasOwnProperty("-Infinity"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js index 9daed0b1af..2d9fd6c80c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 20 zeros)) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 100000000000000000000, {}); - - return obj.hasOwnProperty("100000000000000000000"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-14 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 20 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 100000000000000000000, {}); + + return obj.hasOwnProperty("100000000000000000000"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js index f5d5a2ddcf..5d21680844 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 21 zeros)) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1000000000000000000000, {}); - - return obj.hasOwnProperty("1e+21"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-15 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 21 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1000000000000000000000, {}); + + return obj.hasOwnProperty("1e+21"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js index b7d58a3831..d564185091 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 22 zeros)) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 10000000000000000000000, {}); - - return obj.hasOwnProperty("1e+22"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-16 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 22 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 10000000000000000000000, {}); + + return obj.hasOwnProperty("1e+22"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js index f4b416302d..14ab142c7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(trailing 5 zeros)) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 000001, {}); - - return obj.hasOwnProperty("1"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-17-1 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(trailing 5 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 000001, {}); + + return obj.hasOwnProperty("1"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js index 956715ede5..b21ea28001 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e+20) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1e+20, {}); - - return obj.hasOwnProperty("100000000000000000000"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-17 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1e+20) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1e+20, {}); + + return obj.hasOwnProperty("100000000000000000000"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js index 3afc34d76c..f9b9df8e72 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js - * @description Object.defineProperty - argument 'P' is a number that converts to string (value is 1e+21) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1e+21, {}); - - return obj.hasOwnProperty("1e+21"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-18 +description: > + Object.defineProperty - argument 'P' is a number that converts to + string (value is 1e+21) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1e+21, {}); + + return obj.hasOwnProperty("1e+21"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js index 76ad5009c1..2f61b2e3fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js - * @description Object.defineProperty - argument 'P' is a number that converts to string (value is 1e+22) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1e+22, {}); - - return obj.hasOwnProperty("1e+22"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-19 +description: > + Object.defineProperty - argument 'P' is a number that converts to + string (value is 1e+22) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1e+22, {}); + + return obj.hasOwnProperty("1e+22"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js index 9347332394..aff23462f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js - * @description Object.defineProperty - argument 'P' is null that converts to string 'null' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, null, {}); - - return obj.hasOwnProperty("null"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-2 +description: > + Object.defineProperty - argument 'P' is null that converts to + string 'null' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, null, {}); + + return obj.hasOwnProperty("null"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js index 2f81e33ae0..f76f6668f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.000001) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 0.000001, {}); - - return obj.hasOwnProperty("0.000001"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-20 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 0.000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 0.000001, {}); + + return obj.hasOwnProperty("0.000001"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js index 8197f6e675..c10786b4ec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.0000001) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 0.0000001, {}); - - return obj.hasOwnProperty("1e-7"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-21 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 0.0000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 0.0000001, {}); + + return obj.hasOwnProperty("1e-7"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js index 70a580c846..2366d03206 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.00000001) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 0.00000001, {}); - - return obj.hasOwnProperty("1e-8"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-22 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 0.00000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 0.00000001, {}); + + return obj.hasOwnProperty("1e-8"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js index edab30d3fc..5081ea39c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-7) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1e-7, {}); - - return obj.hasOwnProperty("1e-7"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-23 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1e-7) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1e-7, {}); + + return obj.hasOwnProperty("1e-7"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js index 69328f49ae..45449b570f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-6) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1e-6, {}); - - return obj.hasOwnProperty("0.000001"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-24 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1e-6) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1e-6, {}); + + return obj.hasOwnProperty("0.000001"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js index e0eb145e1e..beac3bcfc4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-5) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1e-5, {}); - - return obj.hasOwnProperty("0.00001"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-25 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1e-5) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1e-5, {}); + + return obj.hasOwnProperty("0.00001"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js index 08b3ed3afa..dd95403205 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js - * @description Object.defineProperty - argument 'P' is an integer that converts to a string (value is 123) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 123, {}); - - return obj.hasOwnProperty("123"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-26 +description: > + Object.defineProperty - argument 'P' is an integer that converts + to a string (value is 123) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 123, {}); + + return obj.hasOwnProperty("123"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js index 41f2b81957..957a12e9ce 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js - * @description Object.defineProperty - argument 'P' is a decimal that converts to a string (value is 123.456) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 123.456, {}); - - return obj.hasOwnProperty("123.456"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-27 +description: > + Object.defineProperty - argument 'P' is a decimal that converts to + a string (value is 123.456) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 123.456, {}); + + return obj.hasOwnProperty("123.456"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js index 227ffaf85d..d7743d4339 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 19 zeros).1) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 10000000000000000000.1, {}); - - return obj.hasOwnProperty("10000000000000000000"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-28 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 19 zeros).1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 10000000000000000000.1, {}); + + return obj.hasOwnProperty("10000000000000000000"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js index da4a9ffd26..b3af7b920f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 20 zeros).1) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 100000000000000000000.1, {}); - - return obj.hasOwnProperty("100000000000000000000"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-29 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 20 zeros).1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 100000000000000000000.1, {}); + + return obj.hasOwnProperty("100000000000000000000"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js index 2287ed50d9..c880b6b28d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js - * @description Object.defineProperty - argument 'P' is a boolean whose value is false - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, false, {}); - - return obj.hasOwnProperty("false"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-3 +description: > + Object.defineProperty - argument 'P' is a boolean whose value is + false +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, false, {}); + + return obj.hasOwnProperty("false"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js index ab74c52ad7..f23f8e02b1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 21 zeros).1) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 1000000000000000000000.1, {}); - - return obj.hasOwnProperty("1e+21"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-30 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 21 zeros).1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 1000000000000000000000.1, {}); + + return obj.hasOwnProperty("1e+21"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js index 7593eba1a0..27435938fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 22 zeros).1) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 10000000000000000000000.1, {}); - - return obj.hasOwnProperty("1e+22"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-31 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 1(following 22 zeros).1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 10000000000000000000000.1, {}); + + return obj.hasOwnProperty("1e+22"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js index 70f24d872d..50abe86abd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 123.1234567) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 123.1234567, {}); - - return obj.hasOwnProperty("123.1234567"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-32 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 123.1234567) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 123.1234567, {}); + + return obj.hasOwnProperty("123.1234567"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js index 1fe107f2f4..7d2b21fa55 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js - * @description Object.defineProperty - argument 'P' is applied to an empty string - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "", {}); - - return obj.hasOwnProperty(""); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-33 +description: Object.defineProperty - argument 'P' is applied to an empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "", {}); + + return obj.hasOwnProperty(""); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js index f736cc67ce..6a15ee8a58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js @@ -1,20 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js - * @description Object.defineProperty - argument 'P' is applied to string 'AB - * \cd' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "AB\n\\cd", {}); - - return obj.hasOwnProperty("AB\n\\cd"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-34 +description: Object.defineProperty - argument 'P' is applied to string 'AB \cd' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "AB\n\\cd", {}); + + return obj.hasOwnProperty("AB\n\\cd"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js index bbdd67f3a1..7157f4297b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js - * @description Object.defineProperty - argument 'P' is applied to string 'undefined' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "undefined", {}); - - return obj.hasOwnProperty("undefined"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-35 +description: > + Object.defineProperty - argument 'P' is applied to string + 'undefined' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "undefined", {}); + + return obj.hasOwnProperty("undefined"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js index 36e1ea8128..3480258f08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js - * @description Object.defineProperty - argument 'P' is applied to string 'null' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "null", {}); - - return obj.hasOwnProperty("null"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-36 +description: Object.defineProperty - argument 'P' is applied to string 'null' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "null", {}); + + return obj.hasOwnProperty("null"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js index f80a523556..d70cfb6760 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js - * @description Object.defineProperty - argument 'P' is applied to string '123αβπcd' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "123αβπcd", {}); - - return obj.hasOwnProperty("123αβπcd"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-37 +description: > + Object.defineProperty - argument 'P' is applied to string + '123αβπcd' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "123αβπcd", {}); + + return obj.hasOwnProperty("123αβπcd"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js index 134fc21b70..d2a17b77ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js - * @description Object.defineProperty - argument 'P' is applied to string '1' - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "1", {}); - - return obj.hasOwnProperty("1"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-38 +description: Object.defineProperty - argument 'P' is applied to string '1' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "1", {}); + + return obj.hasOwnProperty("1"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js index ffdfcd3035..d71449d449 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js - * @description Object.defineProperty - argument 'P' is an array that converts to a string - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, [1, 2], {}); - - return obj.hasOwnProperty("1,2"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-39 +description: > + Object.defineProperty - argument 'P' is an array that converts to + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, [1, 2], {}); + + return obj.hasOwnProperty("1,2"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js index ef53407186..deb854fb6f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js - * @description Object.defineProperty - argument 'P' is a boolean whose value is true - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, true, {}); - - return obj.hasOwnProperty("true"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-4 +description: > + Object.defineProperty - argument 'P' is a boolean whose value is + true +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, true, {}); + + return obj.hasOwnProperty("true"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js index 4fb5484b13..19ea0fa14b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js - * @description Object.defineProperty - argument 'P' is a String Object that converts to a string - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, new String("Hello"), {}); - - return obj.hasOwnProperty("Hello"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-40 +description: > + Object.defineProperty - argument 'P' is a String Object that + converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, new String("Hello"), {}); + + return obj.hasOwnProperty("Hello"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js index 7dba4b58d7..6cbe301d25 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js - * @description Object.defineProperty - argument 'P' is a Boolean Object that converts to a string - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, new Boolean(false), {}); - - return obj.hasOwnProperty("false"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-41 +description: > + Object.defineProperty - argument 'P' is a Boolean Object that + converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, new Boolean(false), {}); + + return obj.hasOwnProperty("false"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js index 2f303245cd..37479f10ee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js - * @description Object.defineProperty - argument 'P' is a Number Object that converts to a string - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, new Number(123), {}); - - return obj.hasOwnProperty("123"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-42 +description: > + Object.defineProperty - argument 'P' is a Number Object that + converts to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, new Number(123), {}); + + return obj.hasOwnProperty("123"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js index 685aa0212b..039ff4aade 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js - * @description Object.defineProperty - argument 'P' is an object that has an own toString method - */ - - -function testcase() { - var obj = {}; - - var ownProp = { - toString: function () { - return "abc"; - } - }; - - Object.defineProperty(obj, ownProp, {}); - - return obj.hasOwnProperty("abc"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-43 +description: > + Object.defineProperty - argument 'P' is an object that has an own + toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var ownProp = { + toString: function () { + return "abc"; + } + }; + + Object.defineProperty(obj, ownProp, {}); + + return obj.hasOwnProperty("abc"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js index cfffabf60c..a2047a7893 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js - * @description Object.defineProperty - argument 'P' is an object that has an own valueOf method - */ - - -function testcase() { - var obj = {}; - - var ownProp = { - valueOf: function () { - return "abc"; - }, - toString: undefined - }; - - Object.defineProperty(obj, ownProp, {}); - - return obj.hasOwnProperty("abc"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-44 +description: > + Object.defineProperty - argument 'P' is an object that has an own + valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var ownProp = { + valueOf: function () { + return "abc"; + }, + toString: undefined + }; + + Object.defineProperty(obj, ownProp, {}); + + return obj.hasOwnProperty("abc"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js index 71f6b75098..3b4cb49aa5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js - * @description Object.defineProperty - argument 'P' is an object whose toString method returns an object and whose valueOf method returns a primitive value - */ - - -function testcase() { - var obj = {}; - var toStringAccessed = false; - var valueOfAccessed = false; - - var ownProp = { - toString: function () { - toStringAccessed = true; - return {}; - }, - valueOf: function () { - valueOfAccessed = true; - return "abc"; - } - }; - - Object.defineProperty(obj, ownProp, {}); - - return obj.hasOwnProperty("abc") && valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-45 +description: > + Object.defineProperty - argument 'P' is an object whose toString + method returns an object and whose valueOf method returns a + primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var toStringAccessed = false; + var valueOfAccessed = false; + + var ownProp = { + toString: function () { + toStringAccessed = true; + return {}; + }, + valueOf: function () { + valueOfAccessed = true; + return "abc"; + } + }; + + Object.defineProperty(obj, ownProp, {}); + + return obj.hasOwnProperty("abc") && valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js index 48145318e5..fbf51d9754 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js - * @description Object.defineProperty - argument 'P' is an object that has an own toString and valueOf method - */ - - -function testcase() { - var obj = {}; - var toStringAccessed = false; - var valueOfAccessed = false; - - var ownProp = { - toString: function () { - toStringAccessed = true; - return "abc"; - }, - valueOf: function () { - valueOfAccessed = true; - return "prop"; - } - }; - Object.defineProperty(obj, ownProp, {}); - - return obj.hasOwnProperty("abc") && !valueOfAccessed && toStringAccessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-46 +description: > + Object.defineProperty - argument 'P' is an object that has an own + toString and valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var toStringAccessed = false; + var valueOfAccessed = false; + + var ownProp = { + toString: function () { + toStringAccessed = true; + return "abc"; + }, + valueOf: function () { + valueOfAccessed = true; + return "prop"; + } + }; + Object.defineProperty(obj, ownProp, {}); + + return obj.hasOwnProperty("abc") && !valueOfAccessed && toStringAccessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js index 2a5620e6f0..81adbe5cc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js - * @description Object.defineProperty - TypeError exception is thrown when 'P' is an object that neither toString nor valueOf returns a primitive value - */ - - -function testcase() { - var obj = {}; - var toStringAccessed = false; - var valueOfAccessed = false; - - var ownProp = { - toString: function () { - toStringAccessed = true; - return {}; - }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; - - try { - Object.defineProperty(obj, ownProp, {}); - return false; - } catch (e) { - return valueOfAccessed && toStringAccessed && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-47 +description: > + Object.defineProperty - TypeError exception is thrown when 'P' is + an object that neither toString nor valueOf returns a primitive + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var toStringAccessed = false; + var valueOfAccessed = false; + + var ownProp = { + toString: function () { + toStringAccessed = true; + return {}; + }, + valueOf: function () { + valueOfAccessed = true; + return {}; + } + }; + + try { + Object.defineProperty(obj, ownProp, {}); + return false; + } catch (e) { + return valueOfAccessed && toStringAccessed && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js index 824c336de0..321623126e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js - * @description Object.defineProperty - an inherited toString method is invoked when 'P' is an object with an own valueOf and an inherited toString methods - */ - - -function testcase() { - var obj = {}; - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - toString: function () { - toStringAccessed = true; - return "test"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.valueOf = function () { - valueOfAccessed = true; - return "10"; - }; - - Object.defineProperty(obj, child, {}); - - return obj.hasOwnProperty("test") && !valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-48 +description: > + Object.defineProperty - an inherited toString method is invoked + when 'P' is an object with an own valueOf and an inherited + toString methods +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + toString: function () { + toStringAccessed = true; + return "test"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.valueOf = function () { + valueOfAccessed = true; + return "10"; + }; + + Object.defineProperty(obj, child, {}); + + return obj.hasOwnProperty("test") && !valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js index 0f9128c494..954a83b5b6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js @@ -1,18 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is NaN) - */ -function testcase() { - var obj = {}; - Object.defineProperty(obj, NaN, {}); - - return obj.hasOwnProperty("NaN"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-5 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, NaN, {}); + + return obj.hasOwnProperty("NaN"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js index 7701ff4608..8db3c94c06 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is 0) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 0, {}); - - return obj.hasOwnProperty("0"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-6 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 0, {}); + + return obj.hasOwnProperty("0"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js index 4dc96d02ce..c9788310b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is +0) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, +0, {}); - - return obj.hasOwnProperty("0"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-7 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, +0, {}); + + return obj.hasOwnProperty("0"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js index 789cbce5e4..282e723935 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is -0) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, -0, {}); - - return obj.hasOwnProperty("0"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-8 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, -0, {}); + + return obj.hasOwnProperty("0"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js index fa31d480e3..4f4bf026fe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js - * @description Object.defineProperty - argument 'P' is a number that converts to a string (value is a positive number) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, 30, {}); - - return obj.hasOwnProperty("30"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-2-9 +description: > + Object.defineProperty - argument 'P' is a number that converts to + a string (value is a positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, 30, {}); + + return obj.hasOwnProperty("30"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js index d3e699338b..fc532647cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js - * @description Object.defineProperty throws TypeError if desc has 'get' and 'value' present(8.10.5 step 9.a) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = function () { return 1; } - var desc = { get: getter, value: 101}; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-1 +description: > + Object.defineProperty throws TypeError if desc has 'get' and + 'value' present(8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = function () { return 1; } + var desc = { get: getter, value: 101}; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js index 9cd1f631ff..504701c9b5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js - * @description Object.defineProperty throws TypeError if setter is not callable but not undefined (Number)(8.10.5 step 8.b) - */ - - -function testcase() { - var o = {}; - - // dummy setter - var setter = 42; - var desc = { set: setter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-10 +description: > + Object.defineProperty throws TypeError if setter is not callable + but not undefined (Number)(8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy setter + var setter = 42; + var desc = { set: setter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js index f5078b9328..ea910978ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is null (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: null }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-100 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + null (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: null }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js index 653f5c31b7..f878d1a3f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is true (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: true }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-101 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + true (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: true }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js index 16776e0273..895f16d93a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is false (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: false }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-102 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + false (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: false }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js index faf1675f53..893ab5fd4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is 0 (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: 0 }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-103 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + 0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: 0 }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js index c751573e3d..af48c109cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is +0 (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: +0 }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-104 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + +0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: +0 }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js index 85a56f3ffb..977f5035fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is -0 (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: -0 }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-105 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + -0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: -0 }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js index 741a49695f..5861657f4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is NaN (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: NaN }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-106 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + NaN (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: NaN }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js index 82aafca72a..cb8f44dd6e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a positive number (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: 12345 }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-107 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a positive number (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: 12345 }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js index 19e24ee508..8b8d3d0420 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a negative number (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: -12345 }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-108 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a negative number (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: -12345 }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js index 1e925d72aa..a02187defd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is an empty string (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: "" }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-109 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + an empty string (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: "" }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js index 6a625e49e9..a879caf094 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js - * @description Object.defineProperty throws TypeError if setter is not callable but not undefined (Boolean)(8.10.5 step 8.b) - */ - - -function testcase() { - var o = {}; - - // dummy setter - var setter = true; - var desc = { set: setter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-11 +description: > + Object.defineProperty throws TypeError if setter is not callable + but not undefined (Boolean)(8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy setter + var setter = true; + var desc = { set: setter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js index befba1ceb1..225a6518e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a non-empty string (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: " " }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-110 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a non-empty string (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: " " }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js index 978124b2b2..79fe42fd94 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a Function object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - configurable: function () { } - }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-111 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a Function object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + configurable: function () { } + }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js index dd9d99434d..d137fc14bc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is an Array object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: [1, 2, 3] }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-112 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + an Array object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: [1, 2, 3] }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js index 44a2045d08..13aeecc474 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a String object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: new String("bbq") }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-113 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a String object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: new String("bbq") }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js index c346c627c8..3f95b03456 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a Boolean object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: new Boolean(true) }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-114 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a Boolean object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: new Boolean(true) }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js index 8c5bcb0e2c..dba2c11bd2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a Number object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: new Number(0) }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-115 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a Number object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: new Number(0) }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js index 9d78d02a0f..76a21eb47c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is the Math object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: Math }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-116 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + the Math object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: Math }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js index cc5475cec7..25ddc300f9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a Date object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { configurable: new Date() }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-117 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a Date object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { configurable: new Date() }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js index de72c62bd1..287b0817f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a RegExp object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var attr = { - configurable: new RegExp() - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-118 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a RegExp object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + configurable: new RegExp() + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js index 7c8a08d2e2..07dbca46a4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is the JSON object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var attr = { - configurable: JSON - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-119 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + the JSON object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + configurable: JSON + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js index cf33406239..af90faf54b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js - * @description Object.defineProperty throws TypeError if setter is not callable but not undefined (String)(8.10.5 step 8.b) - */ - - -function testcase() { - var o = {}; - - // dummy setter - var setter = "abc"; - var desc = { set: setter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-12 +description: > + Object.defineProperty throws TypeError if setter is not callable + but not undefined (String)(8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy setter + var setter = "abc"; + var desc = { set: setter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js index 7356a58257..64ef26ed88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is a Error object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var attr = { - configurable: new SyntaxError() - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-120 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + a Error object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + configurable: new SyntaxError() + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js index d1985452d8..dc104742ee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is the Argument object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var argObj = (function () { return arguments; })(1, true, "a"); - - var attr = { - configurable: argObj - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-121 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + the Argument object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var argObj = (function () { return arguments; })(1, true, "a"); + + var attr = { + configurable: argObj + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js index 164b77efa3..73a89c462b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is the global object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var attr = { - configurable: fnGlobalObject() - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-123 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + the global object (8.10.5 step 4.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + var attr = { + configurable: fnGlobalObject() + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js index 2d96302802..a90e21cb01 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is treated as true when it is a string (value is 'false') (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var attr = { - configurable: "false" - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-124 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + treated as true when it is a string (value is 'false') (8.10.5 + step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + configurable: "false" + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js index c80b40fff2..a39811e03e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is treated as true when it is new Boolean(false) (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var attr = { - configurable: new Boolean(false) - }; - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-125 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + treated as true when it is new Boolean(false) (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + configurable: new Boolean(false) + }; + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js index 93d54513d4..fa9d6ff0e4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js - * @description Object.defineProperty - 'value' property in 'Attributes' is present (8.10.5 step 5) - */ - - -function testcase() { - var obj = {}; - - var attr = { value: 100 }; - - Object.defineProperty(obj, "property", attr); - - return obj.property === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-126 +description: > + Object.defineProperty - 'value' property in 'Attributes' is + present (8.10.5 step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { value: 100 }; + + Object.defineProperty(obj, "property", attr); + + return obj.property === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js index 8c11ff61a6..5191395c3b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js - * @description Object.defineProperty - 'value' property in 'Attributes' is not present (8.10.5 step 5) - */ - - -function testcase() { - var obj = { }; - - var attr = { - writable: true - }; - - Object.defineProperty(obj, "property", attr); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-127 +description: > + Object.defineProperty - 'value' property in 'Attributes' is not + present (8.10.5 step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var attr = { + writable: true + }; + + Object.defineProperty(obj, "property", attr); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js index bc8cf19394..69c122c4f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js - * @description Object.defineProperty - 'value' property in 'Attributes' is an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var proto = { - value: "inheritedDataProperty" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - return obj.property === "inheritedDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-129 +description: > + Object.defineProperty - 'value' property in 'Attributes' is an + inherited data property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = { + value: "inheritedDataProperty" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + return obj.property === "inheritedDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js index 5adcf37410..9f3c3f861d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js - * @description Object.defineProperty throws TypeError if the setter in desc is not callable (Null)(8.10.5 step 8.b) - */ - - -function testcase() { - var o = {}; - - // dummy setter - var setter = null; - var desc = { set: setter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-13 +description: > + Object.defineProperty throws TypeError if the setter in desc is + not callable (Null)(8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy setter + var setter = null; + var desc = { set: setter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js index c34ab18129..ed4c549c15 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { value: "inheritedDataProperty" }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - child.value = "ownDataProperty"; - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-130 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + data property that overrides an inherited data property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { value: "inheritedDataProperty" }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + child.value = "ownDataProperty"; + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js index 7a9b9d065d..85283b1c35 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "value", { - value: "ownDataProperty" - }); - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-131 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + data property that overrides an inherited accessor property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "value", { + value: "ownDataProperty" + }); + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js index 1db8581a32..11117074ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var attr = {}; - Object.defineProperty(attr, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - Object.defineProperty(obj, "property", attr); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-132 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var attr = {}; + Object.defineProperty(attr, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + Object.defineProperty(obj, "property", attr); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js index 364bf467be..c31417353c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js - * @description Object.defineProperty - 'value' property in 'Attributes' is an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var proto = {}; - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - return obj.property === "inheritedAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-133 +description: > + Object.defineProperty - 'value' property in 'Attributes' is an + inherited accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = {}; + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + return obj.property === "inheritedAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js index 42af6c0ba9..8114741f61 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - value: "inheritedDataProperty" - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-134 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + accessor property that overrides an inherited data property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + value: "inheritedDataProperty" + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js index 6bd46c0891..198d51770f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-135 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js index c3618dc987..4c95043015 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own accessor property without a get function (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var attr = {}; - Object.defineProperty(attr, "value", { - set: function () { } - }); - - Object.defineProperty(obj, "property", attr); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-136 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + accessor property without a get function (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = {}; + Object.defineProperty(attr, "value", { + set: function () { } + }); + + Object.defineProperty(obj, "property", attr); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js index 00d33ec097..e91218fe5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js - * @description Object.defineProperty - 'value' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var proto = {}; - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "value", { - set : function () { } - }); - - Object.defineProperty(obj, "property", child); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-137 +description: > + Object.defineProperty - 'value' property in 'Attributes' is own + accessor property(without a get function) that overrides an + inherited accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = {}; + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "value", { + set : function () { } + }); + + Object.defineProperty(obj, "property", child); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js index 8b836edf89..d42fe862f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js - * @description Object.defineProperty - 'value' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { property : 120 }; - - var proto = {}; - Object.defineProperty(proto, "value", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-138 +description: > + Object.defineProperty - 'value' property in 'Attributes' is an + inherited accessor property without a get function (8.10.5 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { property : 120 }; + + var proto = {}; + Object.defineProperty(proto, "value", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js index 154b7fdb5b..07216abce0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Function.prototype.value = "Function"; - var funObj = function (a, b) { - return a + b; - }; - - Object.defineProperty(obj, "property", funObj); - - return obj.property === "Function"; - } finally { - delete Function.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-139-1 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'value' property + of prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Function.prototype.value = "Function"; + var funObj = function (a, b) { + return a + b; + }; + + Object.defineProperty(obj, "property", funObj); + + return obj.property === "Function"; + } finally { + delete Function.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js index 1423f15508..85ff4c3c0f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var funObj = function (a, b) { - return a + b; - }; - - funObj.value = "Function"; - - Object.defineProperty(obj, "property", funObj); - - return obj.property === "Function"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-139 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var funObj = function (a, b) { + return a + b; + }; + + funObj.value = "Function"; + + Object.defineProperty(obj, "property", funObj); + + return obj.property === "Function"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js index 91fedfed65..a4de681f7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js - * @description Object.defineProperty throws TypeError if setter is not callable but not undefined (Object)(8.10.5 step 8.b) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var setter = { a: 1 }; - var desc = { set: setter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-14 +description: > + Object.defineProperty throws TypeError if setter is not callable + but not undefined (Object)(8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var setter = { a: 1 }; + var desc = { set: setter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js index 9899cd3c34..e821ab8d06 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Array.prototype.value = "Array"; - var arrObj = [1, 2, 3]; - - Object.defineProperty(obj, "property", arrObj); - - return obj.property === "Array"; - } finally { - delete Array.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-140-1 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Array.prototype.value = "Array"; + var arrObj = [1, 2, 3]; + + Object.defineProperty(obj, "property", arrObj); + + return obj.property === "Array"; + } finally { + delete Array.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js index 977b0b3d9a..69dee95952 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var arrObj = [1, 2, 3]; - - arrObj.value = "Array"; - - Object.defineProperty(obj, "property", arrObj); - - return obj.property === "Array"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-140 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var arrObj = [1, 2, 3]; + + arrObj.value = "Array"; + + Object.defineProperty(obj, "property", arrObj); + + return obj.property === "Array"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js index 99fba7b053..2222e356f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - String.prototype.value = "String"; - var strObj = new String("abc"); - - Object.defineProperty(obj, "property", strObj); - - return obj.property === "String"; - } finally { - delete String.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-141-1 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + String.prototype.value = "String"; + var strObj = new String("abc"); + + Object.defineProperty(obj, "property", strObj); + + return obj.property === "String"; + } finally { + delete String.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js index 06bdac2030..17feb99f14 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var strObj = new String("abc"); - - strObj.value = "String"; - - Object.defineProperty(obj, "property", strObj); - - return obj.property === "String"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-141 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var strObj = new String("abc"); + + strObj.value = "String"; + + Object.defineProperty(obj, "property", strObj); + + return obj.property === "String"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js index 8d6a6e19f8..fe74667331 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Boolean.prototype.value = "Boolean"; - var boolObj = new Boolean(true); - - Object.defineProperty(obj, "property", boolObj); - - return obj.property === "Boolean"; - } finally { - delete Boolean.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-142-1 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Boolean.prototype.value = "Boolean"; + var boolObj = new Boolean(true); + + Object.defineProperty(obj, "property", boolObj); + + return obj.property === "Boolean"; + } finally { + delete Boolean.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js index 305fa18e86..c8d2075a49 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var boolObj = new Boolean(true); - - boolObj.value = "Boolean"; - - Object.defineProperty(obj, "property", boolObj); - - return obj.property === "Boolean"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-142 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var boolObj = new Boolean(true); + + boolObj.value = "Boolean"; + + Object.defineProperty(obj, "property", boolObj); + + return obj.property === "Boolean"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js index 4443e97dab..e55b95cfa3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Number.prototype.value = "Number"; - var numObj = new Number(-2); - - Object.defineProperty(obj, "property", numObj); - - return obj.property === "Number"; - } finally { - delete Number.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-143-1 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Number.prototype.value = "Number"; + var numObj = new Number(-2); + + Object.defineProperty(obj, "property", numObj); + + return obj.property === "Number"; + } finally { + delete Number.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js index d499ffdfc1..6937caacf7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var numObj = new Number(-2); - - numObj.value = "Number"; - - Object.defineProperty(obj, "property", numObj); - - return obj.property === "Number"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-143 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var numObj = new Number(-2); + + numObj.value = "Number"; + + Object.defineProperty(obj, "property", numObj); + + return obj.property === "Number"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js index cb560bafcf..336b7d7148 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.value = "Math"; - - Object.defineProperty(obj, "property", Math); - - return obj.property === "Math"; - } finally { - delete Object.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-144-1 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.value = "Math"; + + Object.defineProperty(obj, "property", Math); + + return obj.property === "Math"; + } finally { + delete Object.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js index 999fb99fdf..615b8fb1a3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - Math.value = "Math"; - - Object.defineProperty(obj, "property", Math); - - return obj.property === "Math"; - } finally { - delete Math.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-144 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Math.value = "Math"; + + Object.defineProperty(obj, "property", Math); + + return obj.property === "Math"; + } finally { + delete Math.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js index e231405eb7..461aa00acf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Date.prototype.value = "Date"; - var dateObj = new Date(); - - Object.defineProperty(obj, "property", dateObj); - - return obj.property === "Date"; - } finally { - delete Date.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-145-1 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Date.prototype.value = "Date"; + var dateObj = new Date(); + + Object.defineProperty(obj, "property", dateObj); + + return obj.property === "Date"; + } finally { + delete Date.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js index 4712d15734..857800b2c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var dateObj = new Date(); - - dateObj.value = "Date"; - - Object.defineProperty(obj, "property", dateObj); - - return obj.property === "Date"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-145 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var dateObj = new Date(); + + dateObj.value = "Date"; + + Object.defineProperty(obj, "property", dateObj); + + return obj.property === "Date"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js index 75a98b9915..530b663381 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - RegExp.prototype.value = "RegExp"; - var regObj = new RegExp(); - - Object.defineProperty(obj, "property", regObj); - - return obj.property === "RegExp"; - } finally { - delete RegExp.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-146-1 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + RegExp.prototype.value = "RegExp"; + var regObj = new RegExp(); + + Object.defineProperty(obj, "property", regObj); + + return obj.property === "RegExp"; + } finally { + delete RegExp.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js index 4fe4d56a08..faca06d190 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = { }; - - var regObj = new RegExp(); - - regObj.value = "RegExp"; - - Object.defineProperty(obj, "property", regObj); - - return obj.property === "RegExp"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-146 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var regObj = new RegExp(); + + regObj.value = "RegExp"; + + Object.defineProperty(obj, "property", regObj); + + return obj.property === "RegExp"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js index 524de019e9..b617e4d244 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.value = "JSON"; - - Object.defineProperty(obj, "property", JSON); - - return obj.property === "JSON"; - } finally { - delete Object.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-147-1 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.value = "JSON"; + + Object.defineProperty(obj, "property", JSON); + + return obj.property === "JSON"; + } finally { + delete Object.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js index 6a6a1e3200..217da83b41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - JSON.value = "JSON"; - - Object.defineProperty(obj, "property", JSON); - - return obj.property === "JSON"; - } finally { - delete JSON.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-147 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + JSON.value = "JSON"; + + Object.defineProperty(obj, "property", JSON); + + return obj.property === "JSON"; + } finally { + delete JSON.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js index 09320877f8..1334a2594c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Error.prototype.value = "Error"; - var errObj = new Error(); - - Object.defineProperty(obj, "property", errObj); - - return obj.property === "Error"; - } finally { - delete Error.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-148-1 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'value' property of + prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Error.prototype.value = "Error"; + var errObj = new Error(); + + Object.defineProperty(obj, "property", errObj); + + return obj.property === "Error"; + } finally { + delete Error.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js index 4a54162a6b..e250bc2e5a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var errObj = new Error(); - - errObj.value = "Error"; - - Object.defineProperty(obj, "property", errObj); - - return obj.property === "Error"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-148 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var errObj = new Error(); + + errObj.value = "Error"; + + Object.defineProperty(obj, "property", errObj); + + return obj.property === "Error"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js index b28a813f32..765b841e81 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - try { - Object.prototype.value = "arguments"; - var argObj = (function () { return arguments; })(); - - - Object.defineProperty(obj, "property", argObj); - - return obj.property === "arguments"; - } finally { - delete Object.prototype.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-149-1 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'value' property + of prototype object (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Object.prototype.value = "arguments"; + var argObj = (function () { return arguments; })(); + + + Object.defineProperty(obj, "property", argObj); + + return obj.property === "arguments"; + } finally { + delete Object.prototype.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js index baefc9f46a..bad7cef1fe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var argObj = (function () { return arguments; })(); - - argObj.value = "arguments"; - - Object.defineProperty(obj, "property", argObj); - - return obj.property === "arguments"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-149 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var argObj = (function () { return arguments; })(); + + argObj.value = "arguments"; + + Object.defineProperty(obj, "property", argObj); + + return obj.property === "arguments"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js index 2a034e99bb..8bf41e6cff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js - * @description Object.defineProperty - 'Attributes' is undefined (8.10.5 step 1) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperty(obj, "property", undefined); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-15 +description: Object.defineProperty - 'Attributes' is undefined (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperty(obj, "property", undefined); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js index ec9780f92a..777b7cce48 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js @@ -1,25 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js - * @description Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - fnGlobalObject().value = "global"; - - Object.defineProperty(obj, "property", fnGlobalObject()); - - return obj.property === "global"; - } finally { - delete fnGlobalObject().value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-151 +description: > + Object.defineProperty - 'Attributes' is the global object that + uses Object's [[Get]] method to access the 'value' property + (8.10.5 step 5.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + try { + fnGlobalObject().value = "global"; + + Object.defineProperty(obj, "property", fnGlobalObject()); + + return obj.property === "global"; + } finally { + delete fnGlobalObject().value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js index 0d468c2a95..fd02b8007d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is present (8.10.5 step 6) - */ - - -function testcase() { - var obj = {}; - - var attr = { - writable: false - }; - - Object.defineProperty(obj, "property", attr); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-152 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + present (8.10.5 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + writable: false + }; + + Object.defineProperty(obj, "property", attr); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js index 72e7d6b2f1..9a762117ce 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is not present (8.10.5 step 6) - */ - - -function testcase() { - var obj = {}; - - var attr = { - value: 100 - }; - - Object.defineProperty(obj, "property", attr); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-153 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is not + present (8.10.5 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = { + value: 100 + }; + + Object.defineProperty(obj, "property", attr); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js index 6790eb660a..97cf1abb0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var attr = { - writable: true - }; - - Object.defineProperty(obj, "property", attr); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-154 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var attr = { + writable: true + }; + + Object.defineProperty(obj, "property", attr); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js index b0ac8715eb..f8afd363f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var proto = { - writable: true - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-155 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is an + inherited data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = { + writable: true + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js index e859a28420..6518cd9d1a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var proto = { - writable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.writable = true; - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-156 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + data property that overrides an inherited data property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = { + writable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.writable = true; + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js index f412b59742..80e05f4385 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var proto = { }; - Object.defineProperty(proto, "writable", { - get : function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "writable", { - value: true - }); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-157 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + data property that overrides an inherited accessor property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = { }; + Object.defineProperty(proto, "writable", { + get : function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "writable", { + value: true + }); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js index c8b1817a5d..a5ff86524e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var attr = { }; - Object.defineProperty(attr, "writable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", attr); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-158 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var attr = { }; + Object.defineProperty(attr, "writable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", attr); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js index 85c67de2db..42740b6d01 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-159 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is an + inherited accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js index 088eec10b9..f9aba02426 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js - * @description Object.defineProperty - 'Attributes' is null (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.defineProperty({}, "property", null); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-16 +description: Object.defineProperty - 'Attributes' is null (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty({}, "property", null); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js index a42d5091db..02c75e5237 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - writable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "writable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-160 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + accessor property that overrides an inherited data property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + writable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "writable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js index abb690ad0d..f5abcd741c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "writable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "writable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-161 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "writable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "writable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js index f3f34991ec..93b0380737 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var attr = {}; - Object.defineProperty(attr, "writable", { - set: function () { } - }); - - Object.defineProperty(obj, "property", attr); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-162 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + accessor property without a get function (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attr = {}; + Object.defineProperty(attr, "writable", { + set: function () { } + }); + + Object.defineProperty(obj, "property", attr); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js index 2fa958a077..eec5ba503f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "writable", { - set: function () { } - }); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-163 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is own + accessor property(without a get function) that overrides an + inherited accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "writable", { + set: function () { } + }); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js index d488c75e67..6af11bec04 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "writable", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-164 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is an + inherited accessor property without a get function (8.10.5 step + 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "writable", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js index 73c56b0bf1..574adf5c88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - try { - Function.prototype.writable = true; - var funObj = function (a, b) { - return a + b; - }; - - Object.defineProperty(obj, "property", funObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Function.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-165-1 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'writable' + property of prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Function.prototype.writable = true; + var funObj = function (a, b) { + return a + b; + }; + + Object.defineProperty(obj, "property", funObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Function.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js index 1fa7275995..39d52f48f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var funObj = function (a, b) { - return a + b; - }; - - funObj.writable = true; - - Object.defineProperty(obj, "property", funObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-165 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var funObj = function (a, b) { + return a + b; + }; + + funObj.writable = true; + + Object.defineProperty(obj, "property", funObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js index a71f60ed4d..880f49495f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - Array.prototype.writable = true; - var arrObj = [1, 2, 3]; - - Object.defineProperty(obj, "property", arrObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Array.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-166-1 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Array.prototype.writable = true; + var arrObj = [1, 2, 3]; + + Object.defineProperty(obj, "property", arrObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Array.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js index 04aeb0720d..bbb4491df7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var arrObj = [1, 2, 3]; - - arrObj.writable = true; - - Object.defineProperty(obj, "property", arrObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-166 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var arrObj = [1, 2, 3]; + + arrObj.writable = true; + + Object.defineProperty(obj, "property", arrObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js index 22d7991dec..fbb04eafdb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - String.prototype.writable = true; - var strObj = new String("abc"); - - Object.defineProperty(obj, "property", strObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete String.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-167-1 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + String.prototype.writable = true; + var strObj = new String("abc"); + + Object.defineProperty(obj, "property", strObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete String.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js index a8a48051a5..59fcde077b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var strObj = new String("abc"); - - strObj.writable = true; - - Object.defineProperty(obj, "property", strObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-167 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var strObj = new String("abc"); + + strObj.writable = true; + + Object.defineProperty(obj, "property", strObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js index 3ddd35487f..e9e7f015dc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - Boolean.prototype.writable = true; - var boolObj = new Boolean(true); - - Object.defineProperty(obj, "property", boolObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Boolean.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-168-1 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Boolean.prototype.writable = true; + var boolObj = new Boolean(true); + + Object.defineProperty(obj, "property", boolObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Boolean.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js index 3f331a7207..26b35c38b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var boolObj = new Boolean(true); - - boolObj.writable = true; - - Object.defineProperty(obj, "property", boolObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-168 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var boolObj = new Boolean(true); + + boolObj.writable = true; + + Object.defineProperty(obj, "property", boolObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js index ec860a7f87..ff598320a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - Number.prototype.writable = true; - var numObj = new Number(-2); - - Object.defineProperty(obj, "property", numObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Number.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-169-1 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Number.prototype.writable = true; + var numObj = new Number(-2); + + Object.defineProperty(obj, "property", numObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Number.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js index a4952a071e..be7edfa554 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var numObj = new Number(-2); - - numObj.writable = true; - - Object.defineProperty(obj, "property", numObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-169 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var numObj = new Number(-2); + + numObj.writable = true; + + Object.defineProperty(obj, "property", numObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js index 1865576122..8db2a2edfd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js - * @description Object.defineProperty - 'Attributes' is a boolean primitive (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.defineProperty({}, "property", true); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-17 +description: > + Object.defineProperty - 'Attributes' is a boolean primitive + (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty({}, "property", true); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js index d919a4ea72..d12a0035af 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.writable = true; - - Object.defineProperty(obj, "property", Math); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Object.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-170-1 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.writable = true; + + Object.defineProperty(obj, "property", Math); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Object.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js index 253c2ad229..1ccf6d913e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - try { - Math.writable = true; - - Object.defineProperty(obj, "property", Math); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Math.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-170 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Math.writable = true; + + Object.defineProperty(obj, "property", Math); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Math.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js index b08660c811..5489c6786f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - Date.prototype.writable = true; - - dateObj = new Date(); - - Object.defineProperty(obj, "property", dateObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Date.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-171-1 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Date.prototype.writable = true; + + dateObj = new Date(); + + Object.defineProperty(obj, "property", dateObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Date.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js index f498ab44ce..c365133122 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var dateObj = new Date(); - - dateObj.writable = true; - - Object.defineProperty(obj, "property", dateObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-171 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var dateObj = new Date(); + + dateObj.writable = true; + + Object.defineProperty(obj, "property", dateObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js index dc877724b6..5b6e15c9c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - RegExp.prototype.writable = true; - - var regObj = new RegExp(); - - Object.defineProperty(obj, "property", regObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete RegExp.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-172-1 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + RegExp.prototype.writable = true; + + var regObj = new RegExp(); + + Object.defineProperty(obj, "property", regObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete RegExp.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js index e6abbf4353..3a53ac2e20 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var regObj = new RegExp(); - - regObj.writable = true; - - Object.defineProperty(obj, "property", regObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-172 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var regObj = new RegExp(); + + regObj.writable = true; + + Object.defineProperty(obj, "property", regObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js index 25bf5b1866..c3f7e388e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.writable = true; - - Object.defineProperty(obj, "property", JSON); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Object.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-173-1 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.writable = true; + + Object.defineProperty(obj, "property", JSON); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Object.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js index cc731e9f58..4b1183d15f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - try { - JSON.writable = true; - - Object.defineProperty(obj, "property", JSON); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete JSON.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-173 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + JSON.writable = true; + + Object.defineProperty(obj, "property", JSON); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete JSON.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js index 3f21360299..d24d8f9e94 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - Error.prototype.writable = true; - - var errObj = new Error(); - - Object.defineProperty(obj, "property", errObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Error.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-174-1 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'writable' property of + prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Error.prototype.writable = true; + + var errObj = new Error(); + + Object.defineProperty(obj, "property", errObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Error.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js index dc4a24bd09..39b9474f76 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = { }; - - var errObj = new Error(); - - errObj.writable = true; - - Object.defineProperty(obj, "property", errObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-174 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'writable' property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var errObj = new Error(); + + errObj.writable = true; + + Object.defineProperty(obj, "property", errObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js index 548b1dfdeb..db69c50890 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - try { - Object.prototype.writable = true; - - var argObj = (function () { return arguments; })(); - - Object.defineProperty(obj, "property", argObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete Object.prototype.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-175-1 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'writable' + property of prototype object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Object.prototype.writable = true; + + var argObj = (function () { return arguments; })(); + + Object.defineProperty(obj, "property", argObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete Object.prototype.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js index dcdd3af4d0..5c2c13e441 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var argObj = (function () { return arguments; })(); - - argObj.writable = true; - - Object.defineProperty(obj, "property", argObj); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-175 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'writable' + property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var argObj = (function () { return arguments; })(); + + argObj.writable = true; + + Object.defineProperty(obj, "property", argObj); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js index aa9e020958..52c950e05f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js - * @description Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - try { - fnGlobalObject().writable = true; - - Object.defineProperty(obj, "property", fnGlobalObject()); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } finally { - delete fnGlobalObject().writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-177 +description: > + Object.defineProperty - 'Attributes' is the global object that + uses Object's [[Get]] method to access the 'writable' property + (8.10.5 step 6.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + try { + fnGlobalObject().writable = true; + + Object.defineProperty(obj, "property", fnGlobalObject()); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } finally { + delete fnGlobalObject().writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js index e72ef3efb2..74c841e6a0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is undefined (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - writable: undefined - }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-178 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + undefined (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + writable: undefined + }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js index 964de16d0c..3cbdc5966d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is null (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { writable: null }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-179 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + null (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { writable: null }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js index c1a21e1af2..7f729f3363 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js - * @description Object.defineProperty - 'Attributes' is a number primitive (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.defineProperty({}, "property", 12); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-18 +description: > + Object.defineProperty - 'Attributes' is a number primitive (8.10.5 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty({}, "property", 12); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js index 0667b22b9d..1ce28f162b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is true (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: true }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-180 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + true (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: true }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js index 5ded528a9f..7588e920ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is false (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { writable: false }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-181 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + false (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { writable: false }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js index eef3c8f6e3..071ace4478 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is 0 (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { writable: 0 }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-182 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is 0 + (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { writable: 0 }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js index ed70af1df2..ed45254dfe 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is +0 (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: +0 }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-183 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is +0 + (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: +0 }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js index 338d0836f9..a568063d01 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is -0 (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { writable: -0 }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-184 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is -0 + (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { writable: -0 }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js index 6260df5542..0a06885de8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is NaN (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { writable: NaN}); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-185 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + NaN (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { writable: NaN}); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js index 2debfa0166..d7bc611d9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a positive number (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: 12345 }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-186 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + positive number (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: 12345 }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js index cb030ea742..bfa8aae75f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a negative number (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: -12345 }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-187 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + negative number (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: -12345 }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js index 22757b34a8..28f3049f08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is an empty string (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: "" }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (typeof (obj.property) === "undefined"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-188 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is an + empty string (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: "" }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (typeof (obj.property) === "undefined"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js index de71c7d570..e635ca535d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a non-empty string (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: " " }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-189 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + non-empty string (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: " " }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js index 01f27408e4..db262402cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js - * @description Object.defineProperty - 'Attributes' is a string primitive (8.10.5 step 1) - */ - - -function testcase() { - - try { - Object.defineProperty({}, "property", "abc"); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-19 +description: > + Object.defineProperty - 'Attributes' is a string primitive (8.10.5 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty({}, "property", "abc"); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js index 86dabf73d4..5355e4bd4d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a Function object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - writable: function () { } - }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-190 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + Function object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + writable: function () { } + }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js index 4a0928a7ee..38c25b8241 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is an Array object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: [1, 2, 3] }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-191 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is an + Array object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: [1, 2, 3] }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js index da1141b72d..51585f2bfa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a String object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: new String("bbq") }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-192 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + String object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: new String("bbq") }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js index 0a38461037..57939425b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a Boolean object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: new Boolean(true) }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-193 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + Boolean object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: new Boolean(true) }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js index 73bfddb798..c4722b0573 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a Number object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: new Number(123) }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-194 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + Number object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: new Number(123) }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js index d304daff5d..3a7eac3808 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is the Math object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: Math }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-195 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is the + Math object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: Math }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js index ec2cb278f9..8beace0315 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a Date object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: new Date() }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-196 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + Date object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: new Date() }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js index ff4376affb..003f77a682 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a RegExp object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - writable: new RegExp() - }); - - var beforeWrite = obj.hasOwnProperty("property") && typeof obj.property === "undefined"; - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite && afterWrite; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-197 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + RegExp object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + writable: new RegExp() + }); + + var beforeWrite = obj.hasOwnProperty("property") && typeof obj.property === "undefined"; + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite && afterWrite; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js index 56700f4986..5df98b3631 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is the JSON object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: JSON }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-198 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is the + JSON object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: JSON }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js index b63b7cfed0..a6381a5834 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is a Error object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: new SyntaxError() }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-199 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is a + Error object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: new SyntaxError() }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js index 53a1b09ea5..f430e7db03 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js - * @description Object.defineProperty throws TypeError if desc has 'get' and 'writable' present(8.10.5 step 9.a) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = function () { return 1; } - var desc = { get: getter, writable: false }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-2 +description: > + Object.defineProperty throws TypeError if desc has 'get' and + 'writable' present(8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = function () { return 1; } + var desc = { get: getter, writable: false }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js index f7ba28c608..110bf12aec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is present (8.10.5 step 3) - */ - - -function testcase() { - - var obj = {}; - - var accessed = false; - Object.defineProperty(obj, "property", { - enumerable: false - }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed && obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-20 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + present (8.10.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var accessed = false; + Object.defineProperty(obj, "property", { + enumerable: false + }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed && obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js index c2dfe1e3b2..93aaaa52fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is the Argument object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - var argObj = (function () { return arguments; })(1, true, "a"); - - Object.defineProperty(obj, "property", { writable: argObj }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-200 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is the + Argument object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var argObj = (function () { return arguments; })(1, true, "a"); + + Object.defineProperty(obj, "property", { writable: argObj }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js index 8a00906537..333281f47c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is the global object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - writable: fnGlobalObject() - }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-202 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is the + global object (8.10.5 step 6.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + writable: fnGlobalObject() + }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js index 9c06ba693c..5f7c4575f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is treated as true when it is a string(value is 'false') (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: "false" }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-203 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + treated as true when it is a string(value is 'false') (8.10.5 step + 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: "false" }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js index 71d6418352..ae2fa7d11e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js - * @description Object.defineProperty - 'writable' property in 'Attributes' is treated as true when it is new Boolean(false) (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { writable: new Boolean(false) }); - - var beforeWrite = obj.hasOwnProperty("property"); - - obj.property = "isWritable"; - - var afterWrite = (obj.property === "isWritable"); - - return beforeWrite === true && afterWrite === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-204 +description: > + Object.defineProperty - 'writable' property in 'Attributes' is + treated as true when it is new Boolean(false) (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { writable: new Boolean(false) }); + + var beforeWrite = obj.hasOwnProperty("property"); + + obj.property = "isWritable"; + + var afterWrite = (obj.property === "isWritable"); + + return beforeWrite === true && afterWrite === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js index 94feb43bca..59f1d1f9b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js - * @description Object.defineProperty - 'get' property in 'Attributes' is present (8.10.5 step 7) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - get: function () { - return "present"; - } - }); - - return obj.property === "present"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-205 +description: > + Object.defineProperty - 'get' property in 'Attributes' is present + (8.10.5 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + get: function () { + return "present"; + } + }); + + return obj.property === "present"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js index ac90edbbc0..6a288e537e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js - * @description Object.defineProperty - 'get' property in 'Attributes' is not present (8.10.5 step 7) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - set: function () {} - }); - - return typeof obj.property === "undefined" && obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-206 +description: > + Object.defineProperty - 'get' property in 'Attributes' is not + present (8.10.5 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + set: function () {} + }); + + return typeof obj.property === "undefined" && obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js index 1a290b65dc..6f22d7fa7d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var attributes = { - get: function () { - return "ownDataProperty"; - } - }; - - Object.defineProperty(obj, "property", attributes); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-207 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own data + property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var attributes = { + get: function () { + return "ownDataProperty"; + } + }; + + Object.defineProperty(obj, "property", attributes); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js index 03b742529c..cd3284d041 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js - * @description Object.defineProperty - 'get' property in 'Attributes' is an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - return obj.property === "inheritedDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-208 +description: > + Object.defineProperty - 'get' property in 'Attributes' is an + inherited data property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + return obj.property === "inheritedDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js index bdaabaeb82..fafd672b08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.get = function () { - return "ownDataProperty"; - }; - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-209 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own data + property that overrides an inherited data property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.get = function () { + return "ownDataProperty"; + }; + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js index 689f4bfea6..80bbdec553 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is not present (8.10.5 step 3) - */ - - -function testcase() { - - var obj = {}; - - var attr = {}; - var accessed = false; - Object.defineProperty(obj, "property", attr); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-21 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + not present (8.10.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var attr = {}; + var accessed = false; + Object.defineProperty(obj, "property", attr); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js index 71ac691ca1..830356e7b4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - var fun = function () { - return "inheritedAccessorProperty"; - }; - Object.defineProperty(proto, "get", { - get: function () { - return fun; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "get", { - value: function () { - return "ownDataProperty"; - } - }); - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-210 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own data + property that overrides an inherited accessor property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + var fun = function () { + return "inheritedAccessorProperty"; + }; + Object.defineProperty(proto, "get", { + get: function () { + return fun; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "get", { + value: function () { + return "ownDataProperty"; + } + }); + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js index 5ef27cb366..f2551902df 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var attributes = {}; - Object.defineProperty(attributes, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - Object.defineProperty(obj, "property", attributes); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-211 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own + accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attributes = {}; + Object.defineProperty(attributes, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + Object.defineProperty(obj, "property", attributes); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js index 550275f630..8785daea74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js - * @description Object.defineProperty - 'get' property in 'Attributes' is an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - return obj.property === "inheritedAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-212 +description: > + Object.defineProperty - 'get' property in 'Attributes' is an + inherited accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + return obj.property === "inheritedAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js index 74ba2ab28c..c9af94d774 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-213 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own + accessor property that overrides an inherited data property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js index ba39228080..cb3f245227 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - Object.defineProperty(obj, "property", child); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-214 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + Object.defineProperty(obj, "property", child); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js index ddcf67651e..036a6fcc5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own accessor property without a get function (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var attributes = {}; - Object.defineProperty(attributes, "get", { - set: function () { } - }); - - Object.defineProperty(obj, "property", attributes); - - return typeof obj.property === "undefined" && obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-215 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own + accessor property without a get function (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attributes = {}; + Object.defineProperty(attributes, "get", { + set: function () { } + }); + + Object.defineProperty(obj, "property", attributes); + + return typeof obj.property === "undefined" && obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js index 56e83aa080..68669270fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js - * @description Object.defineProperty - 'get' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "get", { - set: function () { } - }); - - Object.defineProperty(obj, "property", child); - - return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-216 +description: > + Object.defineProperty - 'get' property in 'Attributes' is own + accessor property(without a get function) that overrides an + inherited accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "get", { + set: function () { } + }); + + Object.defineProperty(obj, "property", child); + + return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js index a0efd8401b..106e414a83 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js - * @description Object.defineProperty - 'get' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "get", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-217 +description: > + Object.defineProperty - 'get' property in 'Attributes' is an + inherited accessor property without a get function (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "get", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js index 625f7edadb..ba50beae94 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Function.prototype.get = function () { - return "functionGetProperty"; - }; - var funObj = function () { }; - - Object.defineProperty(obj, "property", funObj); - - return obj.property === "functionGetProperty"; - } finally { - delete Function.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-218-1 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'get' property of + prototype object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Function.prototype.get = function () { + return "functionGetProperty"; + }; + var funObj = function () { }; + + Object.defineProperty(obj, "property", funObj); + + return obj.property === "functionGetProperty"; + } finally { + delete Function.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js index 5e5567c189..16d2e51e01 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var funObj = function () { }; - - funObj.get = function () { - return "functionGetProperty"; - }; - - Object.defineProperty(obj, "property", funObj); - - return obj.property === "functionGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-218 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var funObj = function () { }; + + funObj.get = function () { + return "functionGetProperty"; + }; + + Object.defineProperty(obj, "property", funObj); + + return obj.property === "functionGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js index 44f84c37b5..fcb2e5fdd7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Array.prototype.get = function () { - return "arrayGetProperty"; - }; - var arrObj = []; - - Object.defineProperty(obj, "property", arrObj); - - return obj.property === "arrayGetProperty"; - } finally { - delete Array.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-219-1 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Array.prototype.get = function () { + return "arrayGetProperty"; + }; + var arrObj = []; + + Object.defineProperty(obj, "property", arrObj); + + return obj.property === "arrayGetProperty"; + } finally { + delete Array.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js index 7c5b8ea275..6a2fbd6fc2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var arrObj = []; - - arrObj.get = function () { - return "arrayGetProperty"; - }; - - Object.defineProperty(obj, "property", arrObj); - - return obj.property === "arrayGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-219 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var arrObj = []; + + arrObj.get = function () { + return "arrayGetProperty"; + }; + + Object.defineProperty(obj, "property", arrObj); + + return obj.property === "arrayGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js index a00177fe27..0708943417 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own data property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { - enumerable: true - }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-22 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { + enumerable: true + }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js index 3cff0394c7..8511d2a474 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - String.prototype.get = function () { - return "stringGetProperty"; - }; - var strObj = new String(); - - Object.defineProperty(obj, "property", strObj); - - return obj.property === "stringGetProperty"; - } finally { - delete String.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-220-1 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + String.prototype.get = function () { + return "stringGetProperty"; + }; + var strObj = new String(); + + Object.defineProperty(obj, "property", strObj); + + return obj.property === "stringGetProperty"; + } finally { + delete String.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js index 97c08e5e34..68f4034c3e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var strObj = new String(); - - strObj.get = function () { - return "stringGetProperty"; - }; - - Object.defineProperty(obj, "property", strObj); - - return obj.property === "stringGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-220 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var strObj = new String(); + + strObj.get = function () { + return "stringGetProperty"; + }; + + Object.defineProperty(obj, "property", strObj); + + return obj.property === "stringGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js index 2e55c5af83..9d755fd7c0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Boolean.prototype.get = function () { - return "booleanGetProperty"; - }; - var boolObj = new Boolean(true); - - Object.defineProperty(obj, "property", boolObj); - - return obj.property === "booleanGetProperty"; - } finally { - delete Boolean.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-221-1 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Boolean.prototype.get = function () { + return "booleanGetProperty"; + }; + var boolObj = new Boolean(true); + + Object.defineProperty(obj, "property", boolObj); + + return obj.property === "booleanGetProperty"; + } finally { + delete Boolean.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js index 9319508af4..45b1ad045e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var boolObj = new Boolean(true); - - boolObj.get = function () { - return "booleanGetProperty"; - }; - - Object.defineProperty(obj, "property", boolObj); - - return obj.property === "booleanGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-221 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var boolObj = new Boolean(true); + + boolObj.get = function () { + return "booleanGetProperty"; + }; + + Object.defineProperty(obj, "property", boolObj); + + return obj.property === "booleanGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js index 71ec25e890..f9984b44d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Number.prototype.get = function () { - return "numberGetProperty"; - }; - var numObj = new Number(-2); - - Object.defineProperty(obj, "property", numObj); - - return obj.property === "numberGetProperty"; - } finally { - delete Number.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-222-1 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Number.prototype.get = function () { + return "numberGetProperty"; + }; + var numObj = new Number(-2); + + Object.defineProperty(obj, "property", numObj); + + return obj.property === "numberGetProperty"; + } finally { + delete Number.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js index 9d5905998e..2fd30d7a7e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var numObj = new Number(-2); - - numObj.get = function () { - return "numberGetProperty"; - }; - - Object.defineProperty(obj, "property", numObj); - - return obj.property === "numberGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-222 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var numObj = new Number(-2); + + numObj.get = function () { + return "numberGetProperty"; + }; + + Object.defineProperty(obj, "property", numObj); + + return obj.property === "numberGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js index a0de896388..9255a0a684 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.get = function () { - return "mathGetProperty"; - }; - - Object.defineProperty(obj, "property", Math); - - return obj.property === "mathGetProperty"; - } finally { - delete Object.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-223-1 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.get = function () { + return "mathGetProperty"; + }; + + Object.defineProperty(obj, "property", Math); + + return obj.property === "mathGetProperty"; + } finally { + delete Object.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js index 59ca2b6d1f..0ffbe18038 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - try { - Math.get = function () { - return "mathGetProperty"; - }; - - Object.defineProperty(obj, "property", Math); - - return obj.property === "mathGetProperty"; - } finally { - delete Math.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-223 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Math.get = function () { + return "mathGetProperty"; + }; + + Object.defineProperty(obj, "property", Math); + + return obj.property === "mathGetProperty"; + } finally { + delete Math.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js index 3ca48c6da1..c7a1ca80e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Date.prototype.get = function () { - return "dateGetProperty"; - }; - var dateObj = new Date(); - - Object.defineProperty(obj, "property", dateObj); - - return obj.property === "dateGetProperty"; - } finally { - delete Date.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-224-1 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Date.prototype.get = function () { + return "dateGetProperty"; + }; + var dateObj = new Date(); + + Object.defineProperty(obj, "property", dateObj); + + return obj.property === "dateGetProperty"; + } finally { + delete Date.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js index 32f8ae62b8..da2d0ebcbf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var dateObj = new Date(); - - dateObj.get = function () { - return "dateGetProperty"; - }; - - Object.defineProperty(obj, "property", dateObj); - - return obj.property === "dateGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-224 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var dateObj = new Date(); + + dateObj.get = function () { + return "dateGetProperty"; + }; + + Object.defineProperty(obj, "property", dateObj); + + return obj.property === "dateGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js index 915b2d15f2..bc853d3170 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - RegExp.prototype.get = function () { - return "regExpGetProperty"; - }; - var regObj = new RegExp(); - - - Object.defineProperty(obj, "property", regObj); - - return obj.property === "regExpGetProperty"; - } finally { - delete RegExp.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-225-1 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + RegExp.prototype.get = function () { + return "regExpGetProperty"; + }; + var regObj = new RegExp(); + + + Object.defineProperty(obj, "property", regObj); + + return obj.property === "regExpGetProperty"; + } finally { + delete RegExp.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js index aff5c5713d..3ce161a411 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var regObj = new RegExp(); - - regObj.get = function () { - return "regExpGetProperty"; - }; - - Object.defineProperty(obj, "property", regObj); - - return obj.property === "regExpGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-225 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var regObj = new RegExp(); + + regObj.get = function () { + return "regExpGetProperty"; + }; + + Object.defineProperty(obj, "property", regObj); + + return obj.property === "regExpGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js index 3e106a3c92..a2f82da725 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.get = function () { - return "jsonGetProperty"; - }; - - Object.defineProperty(obj, "property", JSON); - - return obj.property === "jsonGetProperty"; - } finally { - delete Object.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-226-1 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.get = function () { + return "jsonGetProperty"; + }; + + Object.defineProperty(obj, "property", JSON); + + return obj.property === "jsonGetProperty"; + } finally { + delete Object.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js index 855c4f5ebc..0be0001c7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - try { - JSON.get = function () { - return "jsonGetProperty"; - }; - - Object.defineProperty(obj, "property", JSON); - - return obj.property === "jsonGetProperty"; - } finally { - delete JSON.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-226 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + JSON.get = function () { + return "jsonGetProperty"; + }; + + Object.defineProperty(obj, "property", JSON); + + return obj.property === "jsonGetProperty"; + } finally { + delete JSON.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js index 39738a3b2c..365226562f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Error.prototype.get = function () { - return "errorGetProperty"; - }; - var errObj = new Error(); - - Object.defineProperty(obj, "property", errObj); - - return obj.property === "errorGetProperty"; - } finally { - delete Error.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-227-1 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'get' property of prototype + object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Error.prototype.get = function () { + return "errorGetProperty"; + }; + var errObj = new Error(); + + Object.defineProperty(obj, "property", errObj); + + return obj.property === "errorGetProperty"; + } finally { + delete Error.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js index b6ca7f60d8..d98536c160 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var errObj = new Error(); - - errObj.get = function () { - return "errorGetProperty"; - }; - - Object.defineProperty(obj, "property", errObj); - - return obj.property === "errorGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-227 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'get' property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var errObj = new Error(); + + errObj.get = function () { + return "errorGetProperty"; + }; + + Object.defineProperty(obj, "property", errObj); + + return obj.property === "errorGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js index 8acd1a79a1..b8b1f8a97b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - try { - Object.prototype.get = function () { - return "argumentGetProperty"; - }; - var argObj = (function () { return arguments; })(); - - Object.defineProperty(obj, "property", argObj); - - return obj.property === "argumentGetProperty"; - } finally { - delete Object.prototype.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-228-1 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'get' property of + prototype object (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Object.prototype.get = function () { + return "argumentGetProperty"; + }; + var argObj = (function () { return arguments; })(); + + Object.defineProperty(obj, "property", argObj); + + return obj.property === "argumentGetProperty"; + } finally { + delete Object.prototype.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js index 55f601b6db..4e9cd5c5b4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var argObj = (function () { return arguments; })(); - - argObj.get = function () { - return "argumentGetProperty"; - }; - - Object.defineProperty(obj, "property", argObj); - - return obj.property === "argumentGetProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-228 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'get' property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var argObj = (function () { return arguments; })(); + + argObj.get = function () { + return "argumentGetProperty"; + }; + + Object.defineProperty(obj, "property", argObj); + + return obj.property === "argumentGetProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js index fb90a87c02..b744be26d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var proto = {}; - Object.defineProperty(proto, "enumerable", { - value: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-23 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + an inherited data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var proto = {}; + Object.defineProperty(proto, "enumerable", { + value: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js index f362d68985..3c3b69917c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js @@ -1,27 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js - * @description Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - try { - fnGlobalObject().get = function () { - return "globalGetProperty"; - }; - - Object.defineProperty(obj, "property", fnGlobalObject()); - - return obj.property === "globalGetProperty"; - } finally { - delete fnGlobalObject().get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-230 +description: > + Object.defineProperty - 'Attributes' is the global object that + uses Object's [[Get]] method to access the 'get' property (8.10.5 + step 7.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + try { + fnGlobalObject().get = function () { + return "globalGetProperty"; + }; + + Object.defineProperty(obj, "property", fnGlobalObject()); + + return obj.property === "globalGetProperty"; + } finally { + delete fnGlobalObject().get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js index 7c033d0814..94baa6923d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js - * @description Object.defineProperty - value of 'get' property in 'Attributes' is undefined (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - get: undefined - }); - - return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-231 +description: > + Object.defineProperty - value of 'get' property in 'Attributes' is + undefined (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + get: undefined + }); + + return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js index 448811af8c..d5d0225d7e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js - * @description Object.defineProperty - value of 'get' property in 'Attributes' is a function (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - get: function () { - return "getFunction"; - } - }); - - return obj.hasOwnProperty("property") && obj.property === "getFunction"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-232 +description: > + Object.defineProperty - value of 'get' property in 'Attributes' is + a function (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + get: function () { + return "getFunction"; + } + }); + + return obj.hasOwnProperty("property") && obj.property === "getFunction"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js index ebecd3c041..24ab8476f7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js - * @description Object.defineProperty - 'set' property in 'Attributes' is present (8.10.5 step 8) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - Object.defineProperty(obj, "property", { - set: function (value) { - data = value; - } - }); - - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-235 +description: > + Object.defineProperty - 'set' property in 'Attributes' is present + (8.10.5 step 8) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + Object.defineProperty(obj, "property", { + set: function (value) { + data = value; + } + }); + + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js index 92bb2997e8..190c9dfb86 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js - * @description Object.defineProperty - 'set' property in 'Attributes' is not present (8.10.5 step 8) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - get: function () { - return 11; - } - }); - - obj.property = 14; - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - return obj.hasOwnProperty("property") && obj.property === 11 && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-236 +description: > + Object.defineProperty - 'set' property in 'Attributes' is not + present (8.10.5 step 8) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + get: function () { + return 11; + } + }); + + obj.property = 14; + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + return obj.hasOwnProperty("property") && obj.property === 11 && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js index c73d6ef863..4d651c25ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own data property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - Object.defineProperty(obj, "property", { - set: function (value) { - data = value; - } - }); - - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-237 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own data + property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + Object.defineProperty(obj, "property", { + set: function (value) { + data = value; + } + }); + + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js index fa8b007f0b..5c715694a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js - * @description Object.defineProperty - 'set' property in 'Attributes' is an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var proto = { - set: function (value) { - data = value; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-238 +description: > + Object.defineProperty - 'set' property in 'Attributes' is an + inherited data property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var proto = { + set: function (value) { + data = value; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js index 7018a807c9..e273421dc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data1 = "data"; - var data2 = "data"; - var proto = { - set: function (value) { - data1 = value; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.set = function (value) { - data2 = value; - }; - - Object.defineProperty(obj, "property", child); - - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data1 === "data" && data2 === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-239 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own data + property that overrides an inherited data property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data1 = "data"; + var data2 = "data"; + var proto = { + set: function (value) { + data1 = value; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.set = function (value) { + data2 = value; + }; + + Object.defineProperty(obj, "property", child); + + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data1 === "data" && data2 === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js index 858ae62bc1..dd718a1b67 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var proto = {}; - Object.defineProperty(proto, "enumerable", { - value: false - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "enumerable", { - value: true - }); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-24 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own data property that overrides an inherited data property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var proto = {}; + Object.defineProperty(proto, "enumerable", { + value: false + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "enumerable", { + value: true + }); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js index 8fe34665a4..5b022ac34d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - var data1 = "data"; - var data2 = "data"; - - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data1 = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - value: function (value) { - data2 = value; - } - }); - - Object.defineProperty(obj, "property", child); - - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data1 === "data" && data2 === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-240 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own data + property that overrides an inherited accessor property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + var data1 = "data"; + var data2 = "data"; + + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data1 = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + value: function (value) { + data2 = value; + } + }); + + Object.defineProperty(obj, "property", child); + + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data1 === "data" && data2 === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js index a85be3a4dd..9c1aa07645 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var attributes = {}; - Object.defineProperty(attributes, "set", { - get: function () { - return function (value) { - data = value; - }; - } - }); - - Object.defineProperty(obj, "property", attributes); - obj.property = "ownAccessorProperty"; - - return obj.hasOwnProperty("property") && data === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-241 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own + accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var attributes = {}; + Object.defineProperty(attributes, "set", { + get: function () { + return function (value) { + data = value; + }; + } + }); + + Object.defineProperty(obj, "property", attributes); + obj.property = "ownAccessorProperty"; + + return obj.hasOwnProperty("property") && data === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js index d173a4b4af..3e18d219da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js - * @description Object.defineProperty - 'set' property in 'Attributes' is an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - var data = "data"; - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - obj.property = "inheritedAccessorProperty"; - - return obj.hasOwnProperty("property") && data === "inheritedAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-242 +description: > + Object.defineProperty - 'set' property in 'Attributes' is an + inherited accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + var data = "data"; + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + obj.property = "inheritedAccessorProperty"; + + return obj.hasOwnProperty("property") && data === "inheritedAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js index 151713f9df..1c5d7d984a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data1 = "data"; - var data2 = "data"; - - var proto = { - set: function (value) { - data1 = value; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - get: function () { - return function (value) { - data2 = value; - }; - } - }); - - Object.defineProperty(obj, "property", child); - obj.property = "ownAccessorProperty"; - - return obj.hasOwnProperty("property") && data1 === "data" && data2 === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-243 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own + accessor property that overrides an inherited data property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data1 = "data"; + var data2 = "data"; + + var proto = { + set: function (value) { + data1 = value; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + get: function () { + return function (value) { + data2 = value; + }; + } + }); + + Object.defineProperty(obj, "property", child); + obj.property = "ownAccessorProperty"; + + return obj.hasOwnProperty("property") && data1 === "data" && data2 === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js index 33a32b4868..6a163d0725 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - var data1 = "data"; - var data2 = "data"; - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data1 = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - get: function () { - return function (value) { - data2 = value; - }; - } - }); - - Object.defineProperty(obj, "property", child); - obj.property = "ownAccessorProperty"; - - return obj.hasOwnProperty("property") && data1 === "data" && data2 === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-244 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + var data1 = "data"; + var data2 = "data"; + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data1 = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + get: function () { + return function (value) { + data2 = value; + }; + } + }); + + Object.defineProperty(obj, "property", child); + obj.property = "ownAccessorProperty"; + + return obj.hasOwnProperty("property") && data1 === "data" && data2 === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js index 5ec76f912b..62697ae08d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own accessor property without a get function (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - - var attributes = {}; - Object.defineProperty(attributes, "set", { - set: function () { } - }); - - Object.defineProperty(obj, "property", attributes); - - obj.property = "overrideOwnData"; - - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && - typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-245 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own + accessor property without a get function (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var attributes = {}; + Object.defineProperty(attributes, "set", { + set: function () { } + }); + + Object.defineProperty(obj, "property", attributes); + + obj.property = "overrideOwnData"; + + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && + typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js index 6fd046ee31..c103ec3ccb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js - * @description Object.defineProperty - 'set' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - var data = "data"; - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data = value; - }; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "set", { - set: function () { } - }); - - Object.defineProperty(obj, "property", child); - - obj.property = "overrideData"; - return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && data === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-246 +description: > + Object.defineProperty - 'set' property in 'Attributes' is own + accessor property(without a get function) that overrides an + inherited accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + var data = "data"; + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data = value; + }; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "set", { + set: function () { } + }); + + Object.defineProperty(obj, "property", child); + + obj.property = "overrideData"; + return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && data === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js index 822915fc5b..926b3bcab2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js - * @description Object.defineProperty - 'set' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "set", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - obj.property = "overrideData"; - return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-247 +description: > + Object.defineProperty - 'set' property in 'Attributes' is an + inherited accessor property without a get function (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "set", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + obj.property = "overrideData"; + return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js index e11f2af1bb..df9f87ad82 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - Function.prototype.set = function (value) { - data = value; - }; - var funObj = function () { }; - - Object.defineProperty(obj, "property", funObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Function.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-248-1 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'set' property of + prototype object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + Function.prototype.set = function (value) { + data = value; + }; + var funObj = function () { }; + + Object.defineProperty(obj, "property", funObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Function.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js index c526e0a7d5..981a0749ab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var funObj = function () { }; - - funObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", funObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-248 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var funObj = function () { }; + + funObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", funObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js index 269335b6ef..be9dba07b4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - Array.prototype.set = function (value) { - data = value; - }; - var arrObj = []; - - Object.defineProperty(obj, "property", arrObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Array.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-249-1 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + Array.prototype.set = function (value) { + data = value; + }; + var arrObj = []; + + Object.defineProperty(obj, "property", arrObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Array.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js index 644f03dcde..e5e7f5f130 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var arrObj = []; - - arrObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", arrObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-249 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var arrObj = []; + + arrObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", arrObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js index 7fabfbc93f..841cf97af4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var proto = {}; - Object.defineProperty(proto, "enumerable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "enumerable", { - value: true - }); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-25 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own data property that overrides an inherited accessor property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var proto = {}; + Object.defineProperty(proto, "enumerable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "enumerable", { + value: true + }); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js index ef9f8f89c6..f887079ae0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - try { - String.prototype.set = function (value) { - data = value; - }; - var strObj = new String(); - var data = "data"; - - Object.defineProperty(obj, "property", strObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete String.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-250-1 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + String.prototype.set = function (value) { + data = value; + }; + var strObj = new String(); + var data = "data"; + + Object.defineProperty(obj, "property", strObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete String.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js index 1037873468..364959c0fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var strObj = new String(); - var data = "data"; - - strObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", strObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-250 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var strObj = new String(); + var data = "data"; + + strObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", strObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js index 32cc13dc9b..cbd9292b4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - Boolean.prototype.set = function (value) { - data = value; - }; - var boolObj = new Boolean(true); - - Object.defineProperty(obj, "property", boolObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Boolean.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-251-1 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + Boolean.prototype.set = function (value) { + data = value; + }; + var boolObj = new Boolean(true); + + Object.defineProperty(obj, "property", boolObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Boolean.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js index a87cb25b3f..1b7fd522c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var boolObj = new Boolean(true); - - boolObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", boolObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-251 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var boolObj = new Boolean(true); + + boolObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", boolObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js index 63a4a3cb8f..b426331d4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - Number.prototype.set = function (value) { - data = value; - }; - var numObj = new Number(-2); - - Object.defineProperty(obj, "property", numObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Number.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-252-1 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + Number.prototype.set = function (value) { + data = value; + }; + var numObj = new Number(-2); + + Object.defineProperty(obj, "property", numObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Number.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js index e558bff7d1..cc9a6111e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var numObj = new Number(-2); - - numObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", numObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-252 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var numObj = new Number(-2); + + numObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", numObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js index b71261cfb8..e8ddcf3e27 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - try { - Object.prototype.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", Math); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Object.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-253-1 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + try { + Object.prototype.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", Math); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Object.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js index d615e9bd31..bf9b2cd3d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - try { - Math.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", Math); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Math.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-253 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + try { + Math.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", Math); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Math.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js index 2a16250244..c853f4fbef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - Date.prototype.set = function (value) { - data = value; - }; - var dateObj = new Date(); - - Object.defineProperty(obj, "property", dateObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Date.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-254-1 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + Date.prototype.set = function (value) { + data = value; + }; + var dateObj = new Date(); + + Object.defineProperty(obj, "property", dateObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Date.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js index 321587fcaf..db72fbe593 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var dateObj = new Date(); - - dateObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", dateObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-254 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var dateObj = new Date(); + + dateObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", dateObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js index 1fb7df112a..01e5e803a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - RegExp.prototype.set = function (value) { - data = value; - }; - var regObj = new RegExp(); - - Object.defineProperty(obj, "property", regObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete RegExp.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-255-1 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + RegExp.prototype.set = function (value) { + data = value; + }; + var regObj = new RegExp(); + + Object.defineProperty(obj, "property", regObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete RegExp.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js index 2a7bfc3619..1b2d7169c8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js - * @description Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var regObj = new RegExp(); - - regObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", regObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-255 +description: > + Object.defineProperty - 'Attributes' is a RegExp object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var regObj = new RegExp(); + + regObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", regObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js index 0b4ab5b221..a12061e220 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - try { - Object.prototype.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", JSON); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Object.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-256-1 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + try { + Object.prototype.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", JSON); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Object.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js index 3678ddbce0..1cd8fe501e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - try { - JSON.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", JSON); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete JSON.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-256 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + try { + JSON.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", JSON); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete JSON.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js index c394fbe610..f91bdd905d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - try { - Error.prototype.set = function (value) { - data = value; - }; - var errObj = new Error(); - - Object.defineProperty(obj, "property", errObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Error.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-257-1 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'set' property of prototype + object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + try { + Error.prototype.set = function (value) { + data = value; + }; + var errObj = new Error(); + + Object.defineProperty(obj, "property", errObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Error.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js index 233eca455c..eae1f677bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var errObj = new Error(); - - errObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", errObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-257 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'set' property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var errObj = new Error(); + + errObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", errObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js index eff77365d2..1afdef74c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - try { - Object.prototype.set = function (value) { - data = value; - }; - var argObj = (function () { return arguments; })(); - - Object.defineProperty(obj, "property", argObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete Object.prototype.set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-258-1 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'set' property of + prototype object (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + try { + Object.prototype.set = function (value) { + data = value; + }; + var argObj = (function () { return arguments; })(); + + Object.defineProperty(obj, "property", argObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete Object.prototype.set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js index 69d50cce08..9e31940439 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - var argObj = (function () { return arguments; })(); - argObj.set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", argObj); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-258 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'set' property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + var argObj = (function () { return arguments; })(); + argObj.set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", argObj); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js index 2bd0c19958..b7536414c0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var attr = {}; - Object.defineProperty(attr, "enumerable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", attr); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-26 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var attr = {}; + Object.defineProperty(attr, "enumerable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", attr); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js index 1617e468b1..4e4815d081 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js - * @description Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - try { - fnGlobalObject().set = function (value) { - data = value; - }; - - Object.defineProperty(obj, "property", fnGlobalObject()); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } finally { - delete fnGlobalObject().set; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-260 +description: > + Object.defineProperty - 'Attributes' is the global object that + uses Object's [[Get]] method to access the 'set' property (8.10.5 + step 8.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + try { + fnGlobalObject().set = function (value) { + data = value; + }; + + Object.defineProperty(obj, "property", fnGlobalObject()); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } finally { + delete fnGlobalObject().set; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js index 87c1671d9d..bfe3d3c771 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js - * @description Object.defineProperty - value of 'set' property in 'Attributes' is undefined (8.10.5 step 8.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - set: undefined - }); - - obj.property = "overrideData"; - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && - typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-261 +description: > + Object.defineProperty - value of 'set' property in 'Attributes' is + undefined (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + set: undefined + }); + + obj.property = "overrideData"; + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && + typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js index 07ff2f24c3..3d5e8f557e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js - * @description Object.defineProperty - value of 'set' property in 'Attributes' is a function (8.10.5 step 8.b) - */ - - -function testcase() { - var obj = {}; - var data = "data"; - - Object.defineProperty(obj, "property", { - set: function (value) { - data = value; - } - }); - obj.property = "overrideData"; - - return obj.hasOwnProperty("property") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-262 +description: > + Object.defineProperty - value of 'set' property in 'Attributes' is + a function (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var data = "data"; + + Object.defineProperty(obj, "property", { + set: function (value) { + data = value; + } + }); + obj.property = "overrideData"; + + return obj.hasOwnProperty("property") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js index 0fe3631cbd..e9aee6bbde 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var proto = {}; - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-27 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + an inherited accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var proto = {}; + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js index 14afef136b..66b133b093 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var proto = { enumerable: false }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(child, "enumerable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-28 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own accessor property that overrides an inherited data property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var proto = { enumerable: false }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(child, "enumerable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js index cc8d5a26c1..e03b4fd16b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - var proto = {}; - - Object.defineProperty(proto, "enumerable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(child, "enumerable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-29 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own accessor property that overrides an inherited accessor + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + var proto = {}; + + Object.defineProperty(proto, "enumerable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(child, "enumerable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js index b16380866e..c009a0980c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js - * @description Object.defineProperty throws TypeError if desc has 'set' and 'value' present(8.10.5 step 9.a) - */ - - -function testcase() { - var o = {}; - - // dummy setter - var setter = function () { } - var desc = { set: setter, value: 101}; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-3 +description: > + Object.defineProperty throws TypeError if desc has 'set' and + 'value' present(8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy setter + var setter = function () { } + var desc = { set: setter, value: 101}; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js index 1543c1cb70..8b9254a530 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var attr = {}; - Object.defineProperty(attr, "enumerable", { - set: function () { } - }); - - Object.defineProperty(obj, "property", attr); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-30 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own accessor property without a get function (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var attr = {}; + Object.defineProperty(attr, "enumerable", { + set: function () { } + }); + + Object.defineProperty(obj, "property", attr); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js index bc30650296..2d30f945da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - var proto = {}; - - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(child, "enumerable", { - set: function () { } - }); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-31 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + own accessor property(without a get function) that overrides an + inherited accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + var proto = {}; + + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(child, "enumerable", { + set: function () { } + }); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js index 0867df59ba..7ab0760ac2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js - * @description Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - var proto = {}; - - Object.defineProperty(proto, "enumerable", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-32 +description: > + Object.defineProperty - 'enumerable' property in 'Attributes' is + an inherited accessor property without a get function (8.10.5 step + 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + var proto = {}; + + Object.defineProperty(proto, "enumerable", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js index a363f14bd8..4c4553c314 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Function.prototype.enumerable = true; - var fun = function () { }; - - Object.defineProperty(obj, "property", fun); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Function.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-33-1 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'enumerable' + property of prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Function.prototype.enumerable = true; + var fun = function () { }; + + Object.defineProperty(obj, "property", fun); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Function.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js index f6aa32b173..195848a601 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var fun = function () { }; - fun.enumerable = true; - - Object.defineProperty(obj, "property", fun); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-33 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var fun = function () { }; + fun.enumerable = true; + + Object.defineProperty(obj, "property", fun); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js index 018eeedbdc..917f3f3e1b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Array.prototype.enumerable = true; - var arrObj = []; - - Object.defineProperty(obj, "property", arrObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Array.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-34-1 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Array.prototype.enumerable = true; + var arrObj = []; + + Object.defineProperty(obj, "property", arrObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Array.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js index 2e580141ec..57042812c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var arrObj = []; - arrObj.enumerable = true; - - Object.defineProperty(obj, "property", arrObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-34 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var arrObj = []; + arrObj.enumerable = true; + + Object.defineProperty(obj, "property", arrObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js index 3c97c70f51..5e2af073d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - String.prototype.enumerable = true; - var strObj = new String(); - - Object.defineProperty(obj, "property", strObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete String.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-35-1 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + String.prototype.enumerable = true; + var strObj = new String(); + + Object.defineProperty(obj, "property", strObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete String.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js index e4c8e794bb..43a21e380a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var strObj = new String(); - strObj.enumerable = true; - - Object.defineProperty(obj, "property", strObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-35 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var strObj = new String(); + strObj.enumerable = true; + + Object.defineProperty(obj, "property", strObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js index e1ce707c41..c2698558de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Boolean.prototype.enumerable = true; - var boolObj = new Boolean(true); - - Object.defineProperty(obj, "property", boolObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Boolean.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-36-1 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Boolean.prototype.enumerable = true; + var boolObj = new Boolean(true); + + Object.defineProperty(obj, "property", boolObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Boolean.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js index 29b38d730d..d97cd1001d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var boolObj = new Boolean(true); - boolObj.enumerable = true; - - Object.defineProperty(obj, "property", boolObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-36 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var boolObj = new Boolean(true); + boolObj.enumerable = true; + + Object.defineProperty(obj, "property", boolObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js index de92b2abcd..8ccd27c659 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Number.prototype.enumerable = true; - var numObj = new Number(-2); - - Object.defineProperty(obj, "property", numObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Number.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-37-1 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Number.prototype.enumerable = true; + var numObj = new Number(-2); + + Object.defineProperty(obj, "property", numObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Number.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js index 6007388b22..583195b9b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var numObj = new Number(-2); - numObj.enumerable = true; - - Object.defineProperty(obj, "property", numObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-37 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var numObj = new Number(-2); + numObj.enumerable = true; + + Object.defineProperty(obj, "property", numObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js index eec223e6be..8faa8c4b58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Object.prototype.enumerable = true; - - Object.defineProperty(obj, "property", Math); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } finally { - delete Object.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-38-1 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Object.prototype.enumerable = true; + + Object.defineProperty(obj, "property", Math); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } finally { + delete Object.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js index 7e5783e21d..0c9201f3e6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - try { - Math.enumerable = true; - - Object.defineProperty(obj, "property", Math); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } finally { - delete Math.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-38 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + try { + Math.enumerable = true; + + Object.defineProperty(obj, "property", Math); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } finally { + delete Math.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js index 90d762a50d..691155c7f7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - try { - Date.prototype.enumerable = true; - var dateObj = new Date(); - - Object.defineProperty(obj, "property", dateObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } finally { - delete Date.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-39-1 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + try { + Date.prototype.enumerable = true; + var dateObj = new Date(); + + Object.defineProperty(obj, "property", dateObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } finally { + delete Date.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js index af1983efad..ad288ba8b6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var dateObj = new Date(); - dateObj.enumerable = true; - - Object.defineProperty(obj, "property", dateObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-39 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var dateObj = new Date(); + dateObj.enumerable = true; + + Object.defineProperty(obj, "property", dateObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js index 30a200ec31..cce3292f29 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js - * @description Object.defineProperty throws TypeError if desc has 'set' and 'writable' present(8.10.5 step 9.a) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var setter = function () { } - var desc = { set: setter, writable: false }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-4 +description: > + Object.defineProperty throws TypeError if desc has 'set' and + 'writable' present(8.10.5 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var setter = function () { } + var desc = { set: setter, writable: false }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js index b6839971d6..c65d5c8dad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js - * @description Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - RegExp.prototype.enumerable = true; - var regObj = new RegExp(); - - Object.defineProperty(obj, "property", regObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete RegExp.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-40-1 +description: > + Object.defineProperty - 'Attributes' is an RegExp object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + RegExp.prototype.enumerable = true; + var regObj = new RegExp(); + + Object.defineProperty(obj, "property", regObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete RegExp.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js index 890591d867..3d5ac51d84 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js - * @description Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var regObj = new RegExp(); - regObj.enumerable = true; - - Object.defineProperty(obj, "property", regObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-40 +description: > + Object.defineProperty - 'Attributes' is an RegExp object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var regObj = new RegExp(); + regObj.enumerable = true; + + Object.defineProperty(obj, "property", regObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js index 48f2b429d7..9ccc757161 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Object.prototype.enumerable = true; - - Object.defineProperty(obj, "property", JSON); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Object.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-41-1 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Object.prototype.enumerable = true; + + Object.defineProperty(obj, "property", JSON); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Object.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js index 975fc998ac..05781766ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - try { - JSON.enumerable = true; - - Object.defineProperty(obj, "property", JSON); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete JSON.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-41 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + try { + JSON.enumerable = true; + + Object.defineProperty(obj, "property", JSON); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete JSON.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js index f8941d7721..54b9a60ca4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Error.prototype.enumerable = true; - var errObj = new Error(); - - Object.defineProperty(obj, "property", errObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Error.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-42-1 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'enumerable' property of + prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Error.prototype.enumerable = true; + var errObj = new Error(); + + Object.defineProperty(obj, "property", errObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Error.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js index c5cecf28a4..34c0c0d0e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var errObj = new Error(); - errObj.enumerable = true; - - Object.defineProperty(obj, "property", errObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-42 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var errObj = new Error(); + errObj.enumerable = true; + + Object.defineProperty(obj, "property", errObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js index c7a419ed38..b8417a6334 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - try { - Object.prototype.enumerable = true; - var argObj = (function () { return arguments; })(); - - Object.defineProperty(obj, "property", argObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete Object.prototype.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-43-1 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'enumerable' + property of prototype object (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + try { + Object.prototype.enumerable = true; + var argObj = (function () { return arguments; })(); + + Object.defineProperty(obj, "property", argObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete Object.prototype.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js index 1e32c97a43..624ce9c697 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - var argObj = (function () { return arguments; })(); - argObj.enumerable = true; - - Object.defineProperty(obj, "property", argObj); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-43 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'enumerable' + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + var argObj = (function () { return arguments; })(); + argObj.enumerable = true; + + Object.defineProperty(obj, "property", argObj); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js index 9c03904b08..4ec9cc73ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js - * @description Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - try { - fnGlobalObject().enumerable = true; - - Object.defineProperty(obj, "property", fnGlobalObject()); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - - return accessed; - } finally { - delete fnGlobalObject().enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-45 +description: > + Object.defineProperty - 'Attributes' is the global object that + uses Object's [[Get]] method to access the 'enumerable' property + (8.10.5 step 3.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + try { + fnGlobalObject().enumerable = true; + + Object.defineProperty(obj, "property", fnGlobalObject()); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + + return accessed; + } finally { + delete fnGlobalObject().enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js index 5660ea763f..cf17818daa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is undefined (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { - enumerable: undefined - }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-46 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is undefined (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { + enumerable: undefined + }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js index cd9c7d174f..dbfd70d320 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is null (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: null }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-47 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is null (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: null }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js index 7b364dadb6..d5d360a705 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is true (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: true }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-48 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is true (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: true }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js index f8dd8f2c38..e6cfa951a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is false (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: false }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-49 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is false (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: false }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js index 3d42cf6301..31e4cb352e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js - * @description Object.defineProperty throws TypeError if getter is not callable but not undefined (Number)(8.10.5 step 7.b) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = 42; - var desc = { get: getter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-5 +description: > + Object.defineProperty throws TypeError if getter is not callable + but not undefined (Number)(8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = 42; + var desc = { get: getter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js index 559c425d27..d30205574c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is 0 (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: 0 }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-50 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is 0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: 0 }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js index 57123624be..0bbb24a483 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is +0 (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: +0 }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-51 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is +0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: +0 }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js index acd57ed074..96d80e13f7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is -0 (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: -0 }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-52 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is -0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: -0 }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js index 44fbcc1cfd..39bd6bf3f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is NaN (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: NaN }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-53 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is NaN (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: NaN }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js index 89248e8cff..86bcaf283d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a positive number (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: 12 }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-54 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a positive number (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: 12 }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js index 8459951801..2f3169909d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a negative number (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: -2 }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-55 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a negative number (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: -2 }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js index 5b906685a8..88bf5497ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is an empty string (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: "" }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-56 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is an empty string (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: "" }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js index 50d0dd4c82..7543d98902 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a non-empty string (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: "AB\n\\cd" }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-57 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a non-empty string (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: "AB\n\\cd" }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js index 8b7de6bee0..f1cf83c97f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Function object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { - enumerable: function () { } - }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-58 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a Function object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { + enumerable: function () { } + }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js index f5eb483b96..843361f33c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Array object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: [] }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-59 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is an Array object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: [] }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js index b2ac8c8803..a3f8321e05 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js - * @description Object.defineProperty throws TypeError if getter is not callable but not undefined (Boolean)(8.10.5 step 7.b) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = true; - var desc = { get: getter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-6 +description: > + Object.defineProperty throws TypeError if getter is not callable + but not undefined (Boolean)(8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = true; + var desc = { get: getter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js index ec0295ebdb..0adbdc0e9b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a String Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new String() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-60 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a String Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new String() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js index 2a50ac60b9..40fde5cf24 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Boolean Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new Boolean() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-61 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a Boolean Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new Boolean() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js index 711a35a042..0ce1aea12c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Number Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new Number() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-62 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a Number Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new Number() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js index 4be8551e4f..ae08144efd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is the Math Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: Math }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-63 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is the Math Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: Math }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js index da77c80fe4..59630e6138 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Date Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new Date() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-64 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a Date Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new Date() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js index 1d30ad14ae..a32c4067a6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is a RegExp Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new RegExp() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-65 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is a RegExp Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new RegExp() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js index 3fa17944f4..9605d4a690 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is the JSON Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: JSON }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-66 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is the JSON Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: JSON }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js index d9e8cccd2e..d33f30b22e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Error Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new Error() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-67 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is an Error Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new Error() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js index 83724d0736..50db61d667 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Arguments Object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - var argObj = (function () { return arguments; })(0, 1, 2); - - Object.defineProperty(obj, "property", { enumerable: argObj }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-68 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is an Arguments Object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + var argObj = (function () { return arguments; })(0, 1, 2); + + Object.defineProperty(obj, "property", { enumerable: argObj }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js index 396b86e049..ffa6ac7e89 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js - * @description Object.defineProperty throws TypeError if getter is not callable but not undefined (String)(8.10.5 step 7.b) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = "abc"; - var desc = { get: getter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-7 +description: > + Object.defineProperty throws TypeError if getter is not callable + but not undefined (String)(8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = "abc"; + var desc = { get: getter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js index 2fbd98c128..740b2aebbb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is the global object (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: fnGlobalObject() }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-70 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is the global object (8.10.5 step 3.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: fnGlobalObject() }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js index 01f23a96a6..ae97884ad7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is treated as true when it is a string (value is 'false') (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: "false" }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-71 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is treated as true when it is a string (value is + 'false') (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: "false" }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js index 83c061229d..241cc177bc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js - * @description Object.defineProperty - value of 'enumerable' property in 'Attributes' is new Boolean(false) which is treated as true value (8.10.5 step 3.b) - */ - - -function testcase() { - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "property", { enumerable: new Boolean(false) }); - - for (var prop in obj) { - if (prop === "property") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-72 +description: > + Object.defineProperty - value of 'enumerable' property in + 'Attributes' is new Boolean(false) which is treated as true value + (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "property", { enumerable: new Boolean(false) }); + + for (var prop in obj) { + if (prop === "property") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js index 6adafd6bb0..18397ac58a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is present (8.10.5 step 4) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - configurable: false - }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-73 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + present (8.10.5 step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + configurable: false + }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js index 2fc02fe580..89ff175bb6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is not present (8.10.5 step 4) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { value: 100 }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = (obj.property === 100); - - return beforeDeleted === true && afterDeleted === true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-74 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + not present (8.10.5 step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { value: 100 }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = (obj.property === 100); + + return beforeDeleted === true && afterDeleted === true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js index 402d9a044f..968151cac0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own data property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { - configurable: true - }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-75 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { + configurable: true + }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js index de13151566..5d6e235bf0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var proto = { - configurable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - return beforeDeleted && afterDeleted && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-76 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + an inherited data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = { + configurable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + return beforeDeleted && afterDeleted && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js index 941bb92fef..202b96fb99 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var proto = { - configurable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.configurable = true; - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-77 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own data property that overrides an inherited data property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var proto = { + configurable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.configurable = true; + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js index ce0a02d2b7..3d03d1df98 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { }; - - Object.defineProperty(proto, "configurable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "configurable", { - value: true - }); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-78 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own data property that overrides an inherited accessor property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { }; + + Object.defineProperty(proto, "configurable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "configurable", { + value: true + }); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js index 384faafe89..4d192ace8d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var attr = {}; - Object.defineProperty(attr, "configurable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-79 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var attr = {}; + Object.defineProperty(attr, "configurable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js index 93bb5a9649..cd3fc63e9a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js - * @description Object.defineProperty throws TypeError if getter is not callable but not undefined (Null)(8.10.5 step 7.b) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = null; - var desc = { get: getter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-8 +description: > + Object.defineProperty throws TypeError if getter is not callable + but not undefined (Null)(8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = null; + var desc = { get: getter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js index 8e9d497e2f..5f6e1aa21a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-80 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + an inherited accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js index c66f4fd309..416f8eb5a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - configurable: false - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "configurable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-81 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own accessor property that overrides an inherited data property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + configurable: false + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "configurable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js index fd14e4b251..197b248522 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return false; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "configurable", { - get: function () { - return true; - } - }); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-82 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own accessor property that overrides an inherited accessor + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return false; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "configurable", { + get: function () { + return true; + } + }); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js index edf9d50f7c..cfb52b80a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var attr = {}; - Object.defineProperty(attr, "configurable", { - set : function () { } - }); - - Object.defineProperty(obj, "property", attr); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-83 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own accessor property without a get function (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var attr = {}; + Object.defineProperty(attr, "configurable", { + set : function () { } + }); + + Object.defineProperty(obj, "property", attr); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js index 95e0ebf2fa..233fecf253 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "configurable", { - set: function () { } - }); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-84 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + own accessor property(without a get function) that overrides an + inherited accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "configurable", { + set: function () { } + }); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js index 1cccfd1dbf..e5d79605bc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - Object.defineProperty(proto, "configurable", { - set: function () { } - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(obj, "property", child); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-85 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + an inherited accessor property without a get function (8.10.5 step + 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + Object.defineProperty(proto, "configurable", { + set: function () { } + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(obj, "property", child); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js index e9dca71aff..ac8f8379c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'configurable' property of prototype object (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - Function.prototype.configurable = true; - var funObj = function (a, b) { - return a + b; - }; - - Object.defineProperty(obj, "property", funObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Function.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-86-1 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'configurable' + property of prototype object (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Function.prototype.configurable = true; + var funObj = function (a, b) { + return a + b; + }; + + Object.defineProperty(obj, "property", funObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Function.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js index cdd246800c..3d27461caa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js - * @description Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var funObj = function (a, b) { - return a + b; - }; - - funObj.configurable = true; - - Object.defineProperty(obj, "property", funObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-86 +description: > + Object.defineProperty - 'Attributes' is a Function object which + implements its own [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var funObj = function (a, b) { + return a + b; + }; + + funObj.configurable = true; + + Object.defineProperty(obj, "property", funObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js index d07f2529ee..33ca3b94ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - Array.prototype.configurable = true; - var arrObj = [1, 2, 3]; - - Object.defineProperty(obj, "property", arrObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Array.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-87-1 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Array.prototype.configurable = true; + var arrObj = [1, 2, 3]; + + Object.defineProperty(obj, "property", arrObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Array.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js index d48f3cd0ac..7ac351e7d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js - * @description Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var arrObj = [1, 2, 3]; - - arrObj.configurable = true; - - Object.defineProperty(obj, "property", arrObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-87 +description: > + Object.defineProperty - 'Attributes' is an Array object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var arrObj = [1, 2, 3]; + + arrObj.configurable = true; + + Object.defineProperty(obj, "property", arrObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js index f7cc6f533b..665887839a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - String.prototype.configurable = true; - var strObj = new String("abc"); - - Object.defineProperty(obj, "property", strObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete String.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-88-1 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + String.prototype.configurable = true; + var strObj = new String("abc"); + + Object.defineProperty(obj, "property", strObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete String.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js index 03270ccf43..aeb35afeb4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js - * @description Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var strObj = new String("abc"); - - strObj.configurable = true; - - Object.defineProperty(obj, "property", strObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-88 +description: > + Object.defineProperty - 'Attributes' is a String object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var strObj = new String("abc"); + + strObj.configurable = true; + + Object.defineProperty(obj, "property", strObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js index 5acb26c6b2..f873aea012 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - Boolean.prototype.configurable = true; - var boolObj = new Boolean(true); - - Object.defineProperty(obj, "property", boolObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Boolean.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-89-1 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Boolean.prototype.configurable = true; + var boolObj = new Boolean(true); + + Object.defineProperty(obj, "property", boolObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Boolean.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js index e0f2442f31..791f85732c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js - * @description Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var boolObj = new Boolean(true); - - boolObj.configurable = true; - - Object.defineProperty(obj, "property", boolObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-89 +description: > + Object.defineProperty - 'Attributes' is a Boolean object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var boolObj = new Boolean(true); + + boolObj.configurable = true; + + Object.defineProperty(obj, "property", boolObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js index 1b37e2601e..e448503eca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * The abtract operation ToPropertyDescriptor is used to package the - * into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError - * if the property desc ends up having a mix of accessor and data property elements. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js - * @description Object.defineProperty throws TypeError if getter is not callable but not undefined (Object)(8.10.5 step 7.b) - */ - - -function testcase() { - var o = {}; - - // dummy getter - var getter = { a: 1 }; - var desc = { get: getter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + The abtract operation ToPropertyDescriptor is used to package the + into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError + if the property desc ends up having a mix of accessor and data property elements. +es5id: 15.2.3.6-3-9 +description: > + Object.defineProperty throws TypeError if getter is not callable + but not undefined (Object)(8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // dummy getter + var getter = { a: 1 }; + var desc = { get: getter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js index fcb7bbda74..6c401934b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - Number.prototype.configurable = true; - var numObj = new Number(-2); - - Object.defineProperty(obj, "property", numObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Number.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-90-1 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Number.prototype.configurable = true; + var numObj = new Number(-2); + + Object.defineProperty(obj, "property", numObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Number.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js index 038b4007fc..36119b5341 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js - * @description Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var numObj = new Number(-2); - - numObj.configurable = true; - - Object.defineProperty(obj, "property", numObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-90 +description: > + Object.defineProperty - 'Attributes' is a Number object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var numObj = new Number(-2); + + numObj.configurable = true; + + Object.defineProperty(obj, "property", numObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js index dab6f1eef0..0256ad79c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.configurable = true; - - Object.defineProperty(obj, "property", Math); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Object.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-91-1 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.configurable = true; + + Object.defineProperty(obj, "property", Math); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Object.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js index 4976765c56..9aec713358 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js - * @description Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - try { - Math.configurable = true; - - Object.defineProperty(obj, "property", Math); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Math.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-91 +description: > + Object.defineProperty - 'Attributes' is the Math object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Math.configurable = true; + + Object.defineProperty(obj, "property", Math); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Math.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js index ab866d48dc..25c435b0f9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - Date.prototype.configurable = true; - var dateObj = new Date(); - - Object.defineProperty(obj, "property", dateObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Date.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-92-1 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Date.prototype.configurable = true; + var dateObj = new Date(); + + Object.defineProperty(obj, "property", dateObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Date.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js index 2bb1800e40..71221188e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js - * @description Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var dateObj = new Date(); - - dateObj.configurable = true; - - Object.defineProperty(obj, "property", dateObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-92 +description: > + Object.defineProperty - 'Attributes' is a Date object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var dateObj = new Date(); + + dateObj.configurable = true; + + Object.defineProperty(obj, "property", dateObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js index 08777be8ec..e145d94cd4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js - * @description Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - RegExp.prototype.configurable = true; - var regObj = new RegExp(); - - Object.defineProperty(obj, "property", regObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete RegExp.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-93-1 +description: > + Object.defineProperty - 'Attributes' is an RegExp object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + RegExp.prototype.configurable = true; + var regObj = new RegExp(); + + Object.defineProperty(obj, "property", regObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete RegExp.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js index 8721cbfad0..a81542c4c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js - * @description Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var regObj = new RegExp(); - - regObj.configurable = true; - - Object.defineProperty(obj, "property", regObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-93 +description: > + Object.defineProperty - 'Attributes' is an RegExp object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var regObj = new RegExp(); + + regObj.configurable = true; + + Object.defineProperty(obj, "property", regObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js index 13ae26509d..a83d013c03 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.configurable = true; - - Object.defineProperty(obj, "property", JSON); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Object.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-94-1 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.configurable = true; + + Object.defineProperty(obj, "property", JSON); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Object.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js index 754f81925a..fad929404a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js - * @description Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - try { - JSON.configurable = true; - - Object.defineProperty(obj, "property", JSON); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete JSON.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-94 +description: > + Object.defineProperty - 'Attributes' is the JSON object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + JSON.configurable = true; + + Object.defineProperty(obj, "property", JSON); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete JSON.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js index 388055eca8..e07c4543de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - try { - Error.prototype.configurable = true; - var errObj = new Error(); - - Object.defineProperty(obj, "property", errObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Error.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-95-1 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + try { + Error.prototype.configurable = true; + var errObj = new Error(); + + Object.defineProperty(obj, "property", errObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Error.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js index 8b437d6874..77c9b6e538 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js - * @description Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = { }; - - var errObj = new Error(); - - errObj.configurable = true; - - Object.defineProperty(obj, "property", errObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-95 +description: > + Object.defineProperty - 'Attributes' is an Error object that uses + Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + var errObj = new Error(); + + errObj.configurable = true; + + Object.defineProperty(obj, "property", errObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js index dc5583c8b7..1d0dd4d83a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - try { - Object.prototype.configurable = true; - var argObj = (function () { return arguments; })(); - - Object.defineProperty(obj, "property", argObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete Object.prototype.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-96-1 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.prototype.configurable = true; + var argObj = (function () { return arguments; })(); + + Object.defineProperty(obj, "property", argObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete Object.prototype.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js index 1bba519c70..757eaaa9d8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js - * @description Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - var argObj = (function () { return arguments; })(); - argObj.configurable = true; - - Object.defineProperty(obj, "property", argObj); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-96 +description: > + Object.defineProperty - 'Attributes' is an Arguments object which + implements its own [[Get]] method to access the 'configurable' + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var argObj = (function () { return arguments; })(); + argObj.configurable = true; + + Object.defineProperty(obj, "property", argObj); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js index 693fa704b3..7c43fed5bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js - * @description Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - var obj = {}; - - try { - fnGlobalObject().configurable = true; - - Object.defineProperty(obj, "property", fnGlobalObject()); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property"); - - return beforeDeleted === true && afterDeleted === false; - } finally { - delete fnGlobalObject().configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-98 +description: > + Object.defineProperty - 'Attributes' is the global object that + uses Object's [[Get]] method to access the 'configurable' property + (8.10.5 step 4.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + try { + fnGlobalObject().configurable = true; + + Object.defineProperty(obj, "property", fnGlobalObject()); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property"); + + return beforeDeleted === true && afterDeleted === false; + } finally { + delete fnGlobalObject().configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js index 5ead44f1d0..3a724aaf7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js - * @description Object.defineProperty - 'configurable' property in 'Attributes' is undefined (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = { }; - - Object.defineProperty(obj, "property", { configurable: undefined }); - - var beforeDeleted = obj.hasOwnProperty("property"); - - delete obj.property; - - var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - return beforeDeleted === true && afterDeleted === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-3-99 +description: > + Object.defineProperty - 'configurable' property in 'Attributes' is + undefined (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + + Object.defineProperty(obj, "property", { configurable: undefined }); + + var beforeDeleted = obj.hasOwnProperty("property"); + + delete obj.property; + + var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + return beforeDeleted === true && afterDeleted === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js index 090b0a8a25..dcb7047972 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O passing 'true' for the Throw flag. In this case, step 3 of - * [[DefineOwnProperty]] requires that it throw a TypeError exception when - * current is undefined and extensible is false. The value of desc does not - * matter. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js - * @description Object.defineProperty throws TypeError when adding properties to non-extensible objects(8.12.9 step 3) - */ - - -function testcase() { - var o = {}; - Object.preventExtensions(o); - - try { - var desc = { value: 1 }; - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError && - (o.hasOwnProperty("foo") === false)) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O passing 'true' for the Throw flag. In this case, step 3 of + [[DefineOwnProperty]] requires that it throw a TypeError exception when + current is undefined and extensible is false. The value of desc does not + matter. +es5id: 15.2.3.6-4-1 +description: > + Object.defineProperty throws TypeError when adding properties to + non-extensible objects(8.12.9 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + Object.preventExtensions(o); + + try { + var desc = { value: 1 }; + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError && + (o.hasOwnProperty("foo") === false)) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js index 05daa8c217..d371771820 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if - * current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations - * of each other. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js - * @description Object.defineProperty throws TypeError when changing [[Enumerable]] from false to true on non-configurable accessor properties - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - // dummy getter - var getter = function () { return 1; } - var d1 = { get: getter, enumerable: false, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // now, setting enumerable to true should fail, since [[Configurable]] - // on the original property will be false. - var desc = { get: getter, enumerable: true }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.get === getter && - d2.enumerable === false && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if + current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations + of each other. +es5id: 15.2.3.6-4-10 +description: > + Object.defineProperty throws TypeError when changing + [[Enumerable]] from false to true on non-configurable accessor + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + // dummy getter + var getter = function () { return 1; } + var d1 = { get: getter, enumerable: false, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // now, setting enumerable to true should fail, since [[Configurable]] + // on the original property will be false. + var desc = { get: getter, enumerable: true }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.get === getter && + d2.enumerable === false && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js index 53da96a361..316211f30e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, desc.value and name.value are two different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { - value: 200 - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-100 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + desc.value and name.value are two different values (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { + value: 200 + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js index 831fddabf0..6c477c9040 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, name.value is present and desc.value is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { value: undefined }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-101 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + name.value is present and desc.value is undefined (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { value: undefined }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js index a73307e83a..f9d96c6bc3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, desc.value is present and name.value is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = undefined; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { value: 100 }); - return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-102 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + desc.value is present and name.value is undefined (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = undefined; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { value: 100 }); + return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js index bc923d5611..89ab24562a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js @@ -1,25 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, name.writable and desc.writable are different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - writable: false, configurable: true - }); - - Object.defineProperty(obj, "foo", { - writable: true - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-103 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + name.writable and desc.writable are different values (8.12.9 step + 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + writable: false, configurable: true + }); + + Object.defineProperty(obj, "foo", { + writable: true + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js index d8e53de955..4c7c0fd4fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, name.enumerable and desc.enumerable are different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: true - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-104 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + name.enumerable and desc.enumerable are different values (8.12.9 + step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: true + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js index 2bfc4a2837..5e6304857c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, name.configurable = true and desc.configurable = false (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 200, - enumerable: true, - writable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-105 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + name.configurable = true and desc.configurable = false (8.12.9 + step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 200, + enumerable: true, + writable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js index 5caba4135d..a5e4fa4a44 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js - * @description Object.defineProperty - 'name' and 'desc' are data properties, several attributes values of name and desc are different (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 100, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - value: 200, - writable: false, - enumerable: false - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-106 +description: > + Object.defineProperty - 'name' and 'desc' are data properties, + several attributes values of name and desc are different (8.12.9 + step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 100, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + value: 200, + writable: false, + enumerable: false + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js index e126f9d78e..c6cc0d47e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js @@ -1,39 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, both desc.[[Get]] and name.[[Get]] are two different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc, - configurable: true - }); - - function getFunc2() { - return 20; - } - - Object.defineProperty(obj, "foo", { - get: getFunc2 - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-107 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + both desc.[[Get]] and name.[[Get]] are two different values + (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc, + configurable: true + }); + + function getFunc2() { + return 20; + } + + Object.defineProperty(obj, "foo", { + get: getFunc2 + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js index ba3ce36432..3d28dcb761 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js @@ -1,37 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Get]] is present and desc.[[Get]] is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - set: setFunc, - get: undefined - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-108 +description: > + Object.defineProperty - 'name' and 'desc' are accessor + properties, name.[[Get]] is present and desc.[[Get]] is undefined + (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + set: setFunc, + get: undefined + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js index 4f1990030b..7b5c9b39a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js @@ -1,35 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Get]] is undefined and desc.[[Get]] is function (8.12.9 step 12) - */ - - -function testcase() { - var obj = {}; - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: setFunc, - get: undefined, - enumerable: true, - configurable: true - }); - - function getFunc() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: getFunc - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-109 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + name.[[Get]] is undefined and desc.[[Get]] is function (8.12.9 + step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: setFunc, + get: undefined, + enumerable: true, + configurable: true + }); + + function getFunc() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: getFunc + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js index ec9f8cb4cf..1a294a84d7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if - * current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations - * of each other. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js - * @description Object.defineProperty throws TypeError when changing [[Enumerable]] from true to false on non-configurable accessor properties - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - // dummy getter - var getter = function () { return 1; } - var d1 = { get: getter, enumerable: true, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // now, setting enumerable to true should fail, since [[Configurable]] - // on the original property will be false. - var desc = { get: getter, enumerable: false }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.get === getter && - d2.enumerable === true && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if + current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations + of each other. +es5id: 15.2.3.6-4-11 +description: > + Object.defineProperty throws TypeError when changing + [[Enumerable]] from true to false on non-configurable accessor + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + // dummy getter + var getter = function () { return 1; } + var d1 = { get: getter, enumerable: true, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // now, setting enumerable to true should fail, since [[Configurable]] + // on the original property will be false. + var desc = { get: getter, enumerable: false }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.get === getter && + d2.enumerable === true && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js index 71c6df7f33..52eb4a67a1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js @@ -1,35 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, both desc.[[Set]] and name.[[Set]] are two different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function setFunc1() { - return 10; - } - - Object.defineProperty(obj, "foo", { - set: setFunc1, - enumerable: true, - configurable: true - }); - - function setFunc2(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: setFunc2 - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc2, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-110 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + both desc.[[Set]] and name.[[Set]] are two different values + (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function setFunc1() { + return 10; + } + + Object.defineProperty(obj, "foo", { + set: setFunc1, + enumerable: true, + configurable: true + }); + + function setFunc2(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: setFunc2 + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc2, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js index 28818d63b9..2e940544b0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Set]] is present and desc.[[Set]] is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - set: undefined, - get: getFunc - }); - - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - return obj.hasOwnProperty("foo") && typeof (desc.set) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-111 +description: > + Object.defineProperty - 'name' and 'desc' are accessor + properties, name.[[Set]] is present and desc.[[Set]] is undefined + (8.12.9 step 12) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + set: undefined, + get: getFunc + }); + + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + return obj.hasOwnProperty("foo") && typeof (desc.set) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js index c5d0dcca3f..9fecb91763 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Set]] is undefined and desc.[[Set]] is function (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - - Object.defineProperty(obj, "foo", { - set: undefined, - get: getFunc, - enumerable: true, - configurable: true - }); - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: setFunc - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-112 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + name.[[Set]] is undefined and desc.[[Set]] is function (8.12.9 + step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + + Object.defineProperty(obj, "foo", { + set: undefined, + get: getFunc, + enumerable: true, + configurable: true + }); + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: setFunc + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js index 2ed5affe52..3da8fe015b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, name.enumerable and desc.enumerable are different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - get: getFunc, - enumerable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-113 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + name.enumerable and desc.enumerable are different values (8.12.9 + step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + get: getFunc, + enumerable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js index bb4fa578b6..3b40963bb1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, name.configurable = true and desc.configurable = false (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - function getFunc() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - get: getFunc, - configurable: false - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-114 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + name.configurable = true and desc.configurable = false (8.12.9 + step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + function getFunc() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + get: getFunc, + configurable: false + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js index db97764b79..639e979f4f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js - * @description Object.defineProperty - 'name' and 'desc' are accessor properties, several attributes values of 'name' and 'desc' are different (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function getFunc1() { - return 10; - } - function setFunc1() {} - - Object.defineProperty(obj, "foo", { - get: getFunc1, - set: setFunc1, - enumerable: true, - configurable: true - }); - - function getFunc2() { - return 20; - } - function setFunc2(value) { - obj.setVerifyHelpProp = value; - } - Object.defineProperty(obj, "foo", { - get: getFunc2, - set: setFunc2, - enumerable: false - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc2, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-115 +description: > + Object.defineProperty - 'name' and 'desc' are accessor properties, + several attributes values of 'name' and 'desc' are different + (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc1() { + return 10; + } + function setFunc1() {} + + Object.defineProperty(obj, "foo", { + get: getFunc1, + set: setFunc1, + enumerable: true, + configurable: true + }); + + function getFunc2() { + return 20; + } + function setFunc2(value) { + obj.setVerifyHelpProp = value; + } + Object.defineProperty(obj, "foo", { + get: getFunc2, + set: setFunc2, + enumerable: false + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc2, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js index 2e3f5f1b5e..944cd50fc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js - * @description Object.defineProperty - 'O' is an Array, test the length property of 'O' is own data property (15.4.5.1 step 1) - */ - - -function testcase() { - - var arrObj = [0, 1]; - Object.defineProperty(arrObj, "1", { - value: 1, - configurable: false - }); - try { - Object.defineProperty(arrObj, "length", { value: 1 }); - return false; - } catch (e) { - var desc = Object.getOwnPropertyDescriptor(arrObj, "length"); - - return Object.hasOwnProperty.call(arrObj, "length") && desc.value === 2 && - desc.writable === true && desc.configurable === false && desc.enumerable === false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-116 +description: > + Object.defineProperty - 'O' is an Array, test the length property + of 'O' is own data property (15.4.5.1 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + Object.defineProperty(arrObj, "1", { + value: 1, + configurable: false + }); + try { + Object.defineProperty(arrObj, "length", { value: 1 }); + return false; + } catch (e) { + var desc = Object.getOwnPropertyDescriptor(arrObj, "length"); + + return Object.hasOwnProperty.call(arrObj, "length") && desc.value === 2 && + desc.writable === true && desc.configurable === false && desc.enumerable === false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js index 7c05331917..86bca3d95f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js - * @description Object.defineProperty - 'O' is an Array, test the length property of 'O' is own data property that overrides an inherited data property (15.4.5.1 step 1) - */ - - -function testcase() { - var arrObj = [0, 1, 2]; - var arrProtoLen; - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - - - Object.defineProperty(arrObj, "2", { - configurable: false - }); - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 3 && Array.prototype.length === 0; - } finally { - Array.prototype.length = arrProtoLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-117 +description: > + Object.defineProperty - 'O' is an Array, test the length property + of 'O' is own data property that overrides an inherited data + property (15.4.5.1 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [0, 1, 2]; + var arrProtoLen; + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + + + Object.defineProperty(arrObj, "2", { + configurable: false + }); + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 3 && Array.prototype.length === 0; + } finally { + Array.prototype.length = arrProtoLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js index e7a327ad73..b9322775d5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is absent (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "length", {}); - - var verifyValue = false; - if (arrObj.length === 0) { - verifyValue = true; - } - - arrObj.length = 2; - var verifyWritable = arrObj.length === 2; - - var verifyEnumerable = false; - for (var p in arrObj) { - if (p === "length" && arrObj.hasOwnProperty(p)) { - verifyEnumerable = true; - } - } - - delete arrObj.length; - var verifyConfigurable = arrObj.hasOwnProperty("length"); - - return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-118 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + every field in 'desc' is absent (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "length", {}); + + var verifyValue = false; + if (arrObj.length === 0) { + verifyValue = true; + } + + arrObj.length = 2; + var verifyWritable = arrObj.length === 2; + + var verifyEnumerable = false; + for (var p in arrObj) { + if (p === "length" && arrObj.hasOwnProperty(p)) { + verifyEnumerable = true; + } + } + + delete arrObj.length; + var verifyConfigurable = arrObj.hasOwnProperty("length"); + + return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js index 19e59dcb79..1fc02fddb6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is same with corresponding attribute value of the length property in 'O' (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arrObj = []; - Object.defineProperty(arrObj, "length", { - writable: true, - enumerable: false, - configurable: false - }); - - var verifyValue = false; - if (arrObj.length === 0) { - verifyValue = true; - } - - arrObj.length = 2; - var verifyWritable = arrObj.length === 2 ? true : false; - - var verifyEnumerable = false; - for (var p in arrObj) { - if (p === "length" && arrObj.hasOwnProperty(p)) { - verifyEnumerable = true; - } - } - - delete arrObj.length; - var verifyConfigurable = arrObj.hasOwnProperty("length"); - - return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-119 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + every field in 'desc' is same with corresponding attribute value + of the length property in 'O' (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + Object.defineProperty(arrObj, "length", { + writable: true, + enumerable: false, + configurable: false + }); + + var verifyValue = false; + if (arrObj.length === 0) { + verifyValue = true; + } + + arrObj.length = 2; + var verifyWritable = arrObj.length === 2 ? true : false; + + var verifyEnumerable = false; + for (var p in arrObj) { + if (p === "length" && arrObj.hasOwnProperty(p)) { + verifyEnumerable = true; + } + } + + delete arrObj.length; + var verifyConfigurable = arrObj.hasOwnProperty("length"); + + return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js index 8fcdcd99c7..572e317369 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 9a of - * [[DefineOwnProperty]] rejects changing the kind of a property. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js - * @description Object.defineProperty throws TypeError when changing non-configurable data properties to accessor properties - */ - - -function testcase() { - var o = {}; - - // create a data valued property; all other attributes default to false. - var d1 = { value: 101, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // changing "foo" to be an accessor should fail, since [[Configurable]] - // on the original property will be false. - - // dummy getter - var getter = function () { return 1; } - - var desc = { get: getter }; - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain a data valued property. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.value === 101 && - d2.writable === false && - d2.enumerable === false && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 9a of + [[DefineOwnProperty]] rejects changing the kind of a property. +es5id: 15.2.3.6-4-12 +description: > + Object.defineProperty throws TypeError when changing + non-configurable data properties to accessor properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data valued property; all other attributes default to false. + var d1 = { value: 101, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // changing "foo" to be an accessor should fail, since [[Configurable]] + // on the original property will be false. + + // dummy getter + var getter = function () { return 1; } + + var desc = { get: getter }; + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain a data valued property. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.value === 101 && + d2.writable === false && + d2.enumerable === false && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js index c2e7a5f11a..8df298fb39 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Configurable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arrObj = []; - try { - Object.defineProperty(arrObj, "length", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-120 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when updating the [[Configurable]] attribute + of the length property from false to true (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + try { + Object.defineProperty(arrObj, "length", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js index 5672d06942..bdbeabc1c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Enumerable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arrObj = []; - try { - Object.defineProperty(arrObj, "length", { - enumerable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-121 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when updating the [[Enumerable]] attribute of + the length property from false to true (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + try { + Object.defineProperty(arrObj, "length", { + enumerable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js index 4204734157..686f3a0917 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when 'desc' is accessor descriptor (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arrObj = []; - try { - Object.defineProperty(arrObj, "length", { - get: function () { - return 2; - } - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-122 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test TypeError is thrown when 'desc' is accessor + descriptor (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + try { + Object.defineProperty(arrObj, "length", { + get: function () { + return 2; + } + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js index 8d66447651..11d08fa64d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Writable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arrObj = []; - try { - Object.defineProperty(arrObj, "length", { - writable: false - }); - Object.defineProperty(arrObj, "length", { - writable: true - }); - - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-123 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when updating the [[Writable]] attribute of + the length property from false to true (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + try { + Object.defineProperty(arrObj, "length", { + writable: false + }); + Object.defineProperty(arrObj, "length", { + writable: true + }); + + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js index 0fc7189ba7..71160001b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js @@ -1,21 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test updating the [[Writable]] attribute of the length property from true to false (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - return dataPropertyAttributesAreCorrect(arrObj, "length", 0, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-124 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + updating the [[Writable]] attribute of the length property from + true to false (15.4.5.1 step 3.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + return dataPropertyAttributesAreCorrect(arrObj, "length", 0, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js index cc26da9c03..e87b2f67c0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test that RangeError exception is thrown when [[Value]] field of 'desc' is undefined (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: undefined - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-125 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test that RangeError exception is thrown when + [[Value]] field of 'desc' is undefined (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: undefined + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js index 375400ff2c..6902ce11fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is null (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: null - }); - return arrObj.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-126 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is null + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: null + }); + return arrObj.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js index 161425acd3..f0311c2e77 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value false (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: false - }); - return arrObj.length === 0 && !arrObj.hasOwnProperty("0") && !arrObj.hasOwnProperty("1"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-127 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a boolean + with value false (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: false + }); + return arrObj.length === 0 && !arrObj.hasOwnProperty("0") && !arrObj.hasOwnProperty("1"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js index 02eae01180..3496f96eba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value true (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: true - }); - return arrObj.length === 1; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-128 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a boolean + with value true (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: true + }); + return arrObj.length === 1; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js index 12179b3024..d9213a9676 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is 0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 0 - }); - return arrObj.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-129 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is not thrown when the + [[Value]] field of 'desc' is 0 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 0 + }); + return arrObj.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js index e1e4ed945e..0d8f509c1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 9a of - * [[DefineOwnProperty]] rejects changing the kind of a property. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js - * @description Object.defineProperty throws TypeError when changing non-configurable accessor properties to data properties - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - - // dummy getter - var getter = function () { return 1; } - var d1 = { get: getter, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // changing "foo" to be a data property should fail, since [[Configurable]] - // on the original property will be false. - var desc = { value: 101 }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain an accessor property. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.get === getter && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 9a of + [[DefineOwnProperty]] rejects changing the kind of a property. +es5id: 15.2.3.6-4-13 +description: > + Object.defineProperty throws TypeError when changing + non-configurable accessor properties to data properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + + // dummy getter + var getter = function () { return 1; } + var d1 = { get: getter, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // changing "foo" to be a data property should fail, since [[Configurable]] + // on the original property will be false. + var desc = { value: 101 }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain an accessor property. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.get === getter && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js index 37f5a177c2..e497128c75 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is +0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: +0 - }); - return arrObj.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-130 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is not thrown when the + [[Value]] field of 'desc' is +0 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: +0 + }); + return arrObj.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js index 7978a452f6..4b2ae59551 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is -0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: -0 - }); - return arrObj.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-131 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is not thrown when the + [[Value]] field of 'desc' is -0 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: -0 + }); + return arrObj.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js index 8f4d5708e1..7c144ffd67 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is a positive number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: 12 - }); - return arrObj.length === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-132 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is not thrown when the + [[Value]] field of 'desc' is a positive number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: 12 + }); + return arrObj.length === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js index f073bf08aa..4211658bdd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a negative number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: -9 - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-133 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is a negative number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: -9 + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js index b20c788be8..6676aaa53b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is +Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: +Infinity - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-134 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is +Infinity (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: +Infinity + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js index 2168209fb5..ecaf993d1c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is -Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: -Infinity - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-135 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is -Infinity (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: -Infinity + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js index 5cee918b14..37bc706172 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is NaN (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: NaN - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-136 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is NaN (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: NaN + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js index c5d1bb9e35..26f64669bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is a string containing a positive number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: "2" - }); - return arrObj.length === 2; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-137 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is not thrown when the + [[Value]] field of 'desc' is a string containing a positive number + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: "2" + }); + return arrObj.length === 2; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js index 1963ea22a9..2b298db2b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing a negative number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: "-42" - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-138 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is a string containing a negative number + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: "-42" + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js index ada6045d53..3578c060e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing a decimal number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: "200.59" - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-139 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is a string containing a decimal number + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: "200.59" + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js index 1c1c17d92c..a0a11efaf7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For configurable properties, step 9b of - * [[DefineOwnProperty]] permits changing the kind of a property. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js - * @description Object.defineProperty permits changing data property to accessor property for configurable properties - */ - - -function testcase() { - var o = {}; - - // create a data property. In this case, - // [[Enumerable]] and [[Configurable]] are true - o["foo"] = 101; - - // changing "foo" to be an accessor should succeed, since [[Configurable]] - // on the original property will be true. Existing values of [[Configurable]] - // and [[Enumerable]] need to be preserved and the rest need to be set to - // their default values - - // dummy getter - var getter = function () { return 1; } - var d1 = { get: getter }; - Object.defineProperty(o, "foo", d1); - - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (d2.get === getter && - d2.enumerable === true && - d2.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For configurable properties, step 9b of + [[DefineOwnProperty]] permits changing the kind of a property. +es5id: 15.2.3.6-4-14 +description: > + Object.defineProperty permits changing data property to accessor + property for configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data property. In this case, + // [[Enumerable]] and [[Configurable]] are true + o["foo"] = 101; + + // changing "foo" to be an accessor should succeed, since [[Configurable]] + // on the original property will be true. Existing values of [[Configurable]] + // and [[Enumerable]] need to be preserved and the rest need to be set to + // their default values + + // dummy getter + var getter = function () { return 1; } + var d1 = { get: getter }; + Object.defineProperty(o, "foo", d1); + + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (d2.get === getter && + d2.enumerable === true && + d2.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js index 29ef4bc047..85c3fe9751 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing +Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: "+Infinity" - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-140 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is a string containing +Infinity + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: "+Infinity" + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js index 8038fb6d10..0767e650ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing -Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: "-Infinity" - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-141 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is a string containing -Infinity + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: "-Infinity" + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js index 87b4656eb2..b0dbc01100 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an exponential number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: "2E3" - }); - return arrObj.length === 2E3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-142 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing an exponential number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: "2E3" + }); + return arrObj.length === 2E3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js index 6b28a7ca5e..7256ee28df 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a hex number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: "0x00B" - }); - return arrObj.length === 0x00B; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-143 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing a hex number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: "0x00B" + }); + return arrObj.length === 0x00B; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js index 36e256cfe6..0488e3110d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a number with leading zeros (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: "0002.0" - }); - return arrObj.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-144 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing a number with leading zeros (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: "0002.0" + }); + return arrObj.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js index a2a9d61b61..c5259757e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string which doesn't convert to a number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: "two" - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-145 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError exception is thrown when the + [[Value]] field of 'desc' is a string which doesn't convert to a + number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: "two" + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js index 21f0061952..a3f1985071 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an object which has an own toString method (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: { - toString: function () { - return '2'; - } - } - }); - return arrObj.length === 2; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-146 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an object + which has an own toString method (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: { + toString: function () { + return '2'; + } + } + }); + return arrObj.length === 2; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js index b843eb3abb..ccd655932f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: { - valueOf: function () { - return 2; - } - } - }); - return arrObj.length === 2; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-147 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own valueOf method (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: { + valueOf: function () { + return 2; + } + } + }); + return arrObj.length === 2; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js index b4784be759..2ff090b27c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js @@ -1,34 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method that returns an object and toString method that returns a string (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - Object.defineProperty(arrObj, "length", { - value: { - toString: function () { - toStringAccessed = true; - return '2'; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }); - return arrObj.length === 2 && toStringAccessed && valueOfAccessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-148 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own valueOf method that returns an object and + toString method that returns a string (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + Object.defineProperty(arrObj, "length", { + value: { + toString: function () { + toStringAccessed = true; + return '2'; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + }); + return arrObj.length === 2 && toStringAccessed && valueOfAccessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js index 3d2070448d..b87adea7f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString and valueOf method (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - Object.defineProperty(arrObj, "length", { - value: { - toString: function () { - toStringAccessed = true; - return '2'; - }, - - valueOf: function () { - valueOfAccessed = true; - return 3; - } - } - }); - return arrObj.length === 3 && !toStringAccessed && valueOfAccessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-149 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own toString and valueOf method (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + Object.defineProperty(arrObj, "length", { + value: { + toString: function () { + toStringAccessed = true; + return '2'; + }, + + valueOf: function () { + valueOfAccessed = true; + return 3; + } + } + }); + return arrObj.length === 3 && !toStringAccessed && valueOfAccessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js index 2fc369c502..fb693d89a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For configurable properties, step 9c of - * [[DefineOwnProperty]] permits changing the kind of a property. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js - * @description Object.defineProperty permits changing accessor property to data property for configurable properties - */ - - -function testcase() { - var o = {}; - - // define an accessor property - // dummy getter - var getter = function () { return 1; } - var d1 = { get: getter, configurable: true }; - Object.defineProperty(o, "foo", d1); - - // changing "foo" to be a data valued property should succeed, since - // [[Configurable]] on the original property will be true. Existing - // values of [[Configurable]] and [[Enumerable]] need to be preserved - // and the rest need to be set to their default values. - var desc = { value: 101 }; - Object.defineProperty(o, "foo", desc); - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (d2.value === 101 && - d2.writable === false && - d2.enumerable === false && - d2.configurable === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For configurable properties, step 9c of + [[DefineOwnProperty]] permits changing the kind of a property. +es5id: 15.2.3.6-4-15 +description: > + Object.defineProperty permits changing accessor property to data + property for configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // define an accessor property + // dummy getter + var getter = function () { return 1; } + var d1 = { get: getter, configurable: true }; + Object.defineProperty(o, "foo", d1); + + // changing "foo" to be a data valued property should succeed, since + // [[Configurable]] on the original property will be true. Existing + // values of [[Configurable]] and [[Enumerable]] need to be preserved + // and the rest need to be set to their default values. + var desc = { value: 101 }; + Object.defineProperty(o, "foo", desc); + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (d2.value === 101 && + d2.writable === false && + d2.enumerable === false && + d2.configurable === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js index 759bfa95ce..2ba3bf13b0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when the [[Value]] field of 'desc' is an Object that both toString and valueOf wouldn't return primitive value (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - try { - Object.defineProperty(arrObj, "length", { - value: { - toString: function () { - toStringAccessed = true; - return {}; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }); - return false; - - } catch (e) { - return e instanceof TypeError && toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-150 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test TypeError is thrown when the [[Value]] field + of 'desc' is an Object that both toString and valueOf wouldn't + return primitive value (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + try { + Object.defineProperty(arrObj, "length", { + value: { + toString: function () { + toStringAccessed = true; + return {}; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + }); + return false; + + } catch (e) { + return e instanceof TypeError && toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js index 9ea4035ee1..5c6fbc0ece 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', and the [[Value]] field of 'desc' is an Object with an own toString method and an inherited valueOf method (15.4.5.1 step 3.c), test that the inherited valueOf method is used - */ - - -function testcase() { - - var arrObj = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - child.toString = function () { - toStringAccessed = true; - return 3; - }; - - Object.defineProperty(arrObj, "length", { - value: child - }); - return arrObj.length === 2 && !toStringAccessed && valueOfAccessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-151 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', and the [[Value]] field of 'desc' is an Object + with an own toString method and an inherited valueOf method + (15.4.5.1 step 3.c), test that the inherited valueOf method is used +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + child.toString = function () { + toStringAccessed = true; + return 3; + }; + + Object.defineProperty(arrObj, "length", { + value: child + }); + return arrObj.length === 2 && !toStringAccessed && valueOfAccessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js index 4f12e9d196..8bdfcf32b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a positive non-integer values (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: 123.5 - }); - - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-152 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is a positive non-integer values (15.4.5.1 step + 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: 123.5 + }); + + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js index 18cf66cdc9..cecf00720b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a negative non-integer values (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: -4294967294.5 - }); - - return false; - } catch (e) { - return e instanceof RangeError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-153 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is a negative non-integer values (15.4.5.1 step + 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: -4294967294.5 + }); + + return false; + } catch (e) { + return e instanceof RangeError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js index 49a672ef60..4f812ea419 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 2 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: 4294967294 - }); - - return arrObj.length === 4294967294; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-154 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is boundary + value 2^32 - 2 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: 4294967294 + }); + + return arrObj.length === 4294967294; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js index a4160921cb..9cc721722e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 1 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - value: 4294967295 - }); - - return arrObj.length === 4294967295; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-155 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is boundary + value 2^32 - 1 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + value: 4294967295 + }); + + return arrObj.length === 4294967295; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js index b565c16ded..d03503c13e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: 4294967296 - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-156 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: 4294967296 + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js index 1cba7dee59..4f1c95151c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arrObj = []; - - try { - Object.defineProperty(arrObj, "length", { - value: 4294967297 - }); - return false; - } catch (e) { - return e instanceof RangeError; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-157 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + try { + Object.defineProperty(arrObj, "length", { + value: 4294967297 + }); + return false; + } catch (e) { + return e instanceof RangeError; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js index cb0e6636bf..303bb463e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value greater than the existing value of length (15.4.5.1 step 3.f) - */ - - -function testcase() { - - var arrObj = [0, , 2]; - - Object.defineProperty(arrObj, "length", { - value: 5 - }); - - return arrObj.length === 5 && arrObj[0] === 0 && - !arrObj.hasOwnProperty("1") && arrObj[2] === 2 && - !arrObj.hasOwnProperty("4"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-159 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', set the [[Value]] field of 'desc' to a value + greater than the existing value of length (15.4.5.1 step 3.f) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, , 2]; + + Object.defineProperty(arrObj, "length", { + value: 5 + }); + + return arrObj.length === 5 && arrObj[0] === 0 && + !arrObj.hasOwnProperty("1") && arrObj[2] === 2 && + !arrObj.hasOwnProperty("4"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js index 1c7de9b17b..cc0df59ace 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 10.a.i - * of [[DefineOwnProperty]] rejects if relaxing the [[Writable]] attribute. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js - * @description Object.defineProperty throws TypeError when relaxing [[Writable]] on non-configurable data properties - */ - - -function testcase() { - var o = {}; - - // create a data valued property; all other attributes default to false. - var d1 = { value: 101 }; - Object.defineProperty(o, "foo", d1); - - // now, relaxing [[Writable]] on "foo" should fail, since both - // [[Configurable]] and [[Writable]] on the original property will be false. - var desc = { value: 101, writable: true }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.value === 101 && - d2.writable === false && - d2.enumerable === false && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 10.a.i + of [[DefineOwnProperty]] rejects if relaxing the [[Writable]] attribute. +es5id: 15.2.3.6-4-16 +description: > + Object.defineProperty throws TypeError when relaxing [[Writable]] + on non-configurable data properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data valued property; all other attributes default to false. + var d1 = { value: 101 }; + Object.defineProperty(o, "foo", d1); + + // now, relaxing [[Writable]] on "foo" should fail, since both + // [[Configurable]] and [[Writable]] on the original property will be false. + var desc = { value: 101, writable: true }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.value === 101 && + d2.writable === false && + d2.enumerable === false && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js index 09c7c1fe1c..45306ab8b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value equal to the existing value of length (15.4.5.1 step 3.f) - */ - - -function testcase() { - - var arrObj = [0, , 2]; - - Object.defineProperty(arrObj, "length", { - value: 3 - }); - - return arrObj.length === 3 && arrObj[0] === 0 && !arrObj.hasOwnProperty("1") && arrObj[2] === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-160 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', set the [[Value]] field of 'desc' to a value + equal to the existing value of length (15.4.5.1 step 3.f) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, , 2]; + + Object.defineProperty(arrObj, "length", { + value: 3 + }); + + return arrObj.length === 3 && arrObj[0] === 0 && !arrObj.hasOwnProperty("1") && arrObj[2] === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js index 1cd46f2251..066943f2cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value lesser than the existing value of length and test that indexes beyond the new length are deleted(15.4.5.1 step 3.f) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return arrObj.length === 1 && !arrObj.hasOwnProperty("1"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-161 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', set the [[Value]] field of 'desc' to a value + lesser than the existing value of length and test that indexes + beyond the new length are deleted(15.4.5.1 step 3.f) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return arrObj.length === 1 && !arrObj.hasOwnProperty("1"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js index e1300103c2..e0c74d7274 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - - try { - Object.defineProperty(arrObj, "length", { - value: 12 - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-162 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is greater than + value of the length property, test TypeError is thrown when the + length property is not writable (15.4.5.1 step 3.f.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + + try { + Object.defineProperty(arrObj, "length", { + value: 12 + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js index 9826a0fc38..ec8d59ce45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' equals to value of the length property, test no TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - - try { - Object.defineProperty(arrObj, "length", { - value: 0 - }); - return true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-163 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' equals to value of + the length property, test no TypeError is thrown when the length + property is not writable (15.4.5.1 step 3.f.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + + try { + Object.defineProperty(arrObj, "length", { + value: 0 + }); + return true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js index 28be447c1d..24d6829a08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test TypeError is thrown when the [[Writable]] attribute of the length property is false (15.4.5.1 step 3.g) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - - try { - Object.defineProperty(arrObj, "length", { - value: 0 - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-164 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test TypeError is thrown when the + [[Writable]] attribute of the length property is false (15.4.5.1 + step 3.g) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + + try { + Object.defineProperty(arrObj, "length", { + value: 0 + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js index 908f9e16cd..6689b10a70 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true after deleting properties with large index named if the [[Writable]] field of 'desc' is absent (15.4.5.1 step 3.h) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - - var indexDeleted = !arrObj.hasOwnProperty("1"); - - arrObj.length = 10; - - return indexDeleted && arrObj.length === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-165 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to true after deleting properties with + large index named if the [[Writable]] field of 'desc' is absent + (15.4.5.1 step 3.h) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + + var indexDeleted = !arrObj.hasOwnProperty("1"); + + arrObj.length = 10; + + return indexDeleted && arrObj.length === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js index 694739aa41..e0158fed13 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true after deleting properties with large index named if the [[Writable]] field of 'desc' is true (15.4.5.1 step 3.h) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 1, - writable: true - }); - - var indexDeleted = !arrObj.hasOwnProperty("1"); - - arrObj.length = 10; - - return indexDeleted && arrObj.length === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-166 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to true after deleting properties with + large index named if the [[Writable]] field of 'desc' is true + (15.4.5.1 step 3.h) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 1, + writable: true + }); + + var indexDeleted = !arrObj.hasOwnProperty("1"); + + arrObj.length = 10; + + return indexDeleted && arrObj.length === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js index b8910299b6..03dd2fbab5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false after deleting properties with large index named if the [[Writable]] field of 'desc' is false (15.4.5.1 step 3.i.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 1, - writable: false - }); - - var indexDeleted = !arrObj.hasOwnProperty("1"); - - arrObj.length = 10; - - return indexDeleted && arrObj.length === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-167 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to false after deleting properties with + large index named if the [[Writable]] field of 'desc' is false + (15.4.5.1 step 3.i.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 1, + writable: false + }); + + var indexDeleted = !arrObj.hasOwnProperty("1"); + + arrObj.length = 10; + + return indexDeleted && arrObj.length === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js index a5d64cf43d..c4e0fe9b91 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', whose writable attribute is being changed to false and the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable:false, test that new length is set to a value greater than the non-deletable index by 1, writable attribute of length is set to false and TypeError exception is thrown (15.4.5.1 step 3.i.iii) - */ - - -function testcase() { - - var arrObj = [0, 1, 2]; - - try { - Object.defineProperty(arrObj, "1", { - configurable: false - }); - - Object.defineProperty(arrObj, "length", { - value: 0, - writable: false - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-168 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', whose writable attribute is being changed to + false and the [[Value]] field of 'desc' is less than value of the + length property and also lesser than an index of the array which + is set to configurable:false, test that new length is set to a + value greater than the non-deletable index by 1, writable + attribute of length is set to false and TypeError exception is + thrown (15.4.5.1 step 3.i.iii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1, 2]; + + try { + Object.defineProperty(arrObj, "1", { + configurable: false + }); + + Object.defineProperty(arrObj, "length", { + value: 0, + writable: false + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js index ec22abbb61..883f5e441a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable: false, test that new length is set to a value greater than the non-deletable index by 1, and TypeError is thrown (15.4.5.1 step 3.l.i) - */ - - -function testcase() { - - var arrObj = [0, 1, 2]; - - Object.defineProperty(arrObj, "1", { - configurable: false - }); - - Object.defineProperty(arrObj, "2", { - configurable: true - }); - - try { - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && !arrObj.hasOwnProperty("2"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-169 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property and also lesser than an index of the array + which is set to configurable: false, test that new length is set + to a value greater than the non-deletable index by 1, and + TypeError is thrown (15.4.5.1 step 3.l.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1, 2]; + + Object.defineProperty(arrObj, "1", { + configurable: false + }); + + Object.defineProperty(arrObj, "2", { + configurable: true + }); + + try { + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && !arrObj.hasOwnProperty("2"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js index 2cc43439da..f08f108dfd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 10.a.ii.1 - * of [[DefineOwnProperty]] rejects changing the value of non-writable properties. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js - * @description Object.defineProperty throws TypeError when changing value of non-writable non-configurable data properties - */ - - -function testcase() { - var o = {}; - - // create a data valued property; all other attributes default to false. - var d1 = { value: 101 }; - Object.defineProperty(o, "foo", d1); - - // now, trying to change the value of "foo" should fail, since both - // [[Configurable]] and [[Writable]] on the original property will be false. - var desc = { value: 102 }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (d2.value === 101 && - d2.writable === false && - d2.enumerable === false && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 10.a.ii.1 + of [[DefineOwnProperty]] rejects changing the value of non-writable properties. +es5id: 15.2.3.6-4-17 +description: > + Object.defineProperty throws TypeError when changing value of + non-writable non-configurable data properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data valued property; all other attributes default to false. + var d1 = { value: 101 }; + Object.defineProperty(o, "foo", d1); + + // now, trying to change the value of "foo" should fail, since both + // [[Configurable]] and [[Writable]] on the original property will be false. + var desc = { value: 102 }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (d2.value === 101 && + d2.writable === false && + d2.enumerable === false && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js index 0811920373..43cbc6be34 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable: false, test that new length is set to a value greater than the non-deletable index by 1, writable attribute of length is set to false and TypeError exception is thrown (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - try { - Object.defineProperty(arrObj, "1", { - configurable: false - }); - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-170 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property and also lesser than an index of the array + which is set to configurable: false, test that new length is set + to a value greater than the non-deletable index by 1, writable + attribute of length is set to false and TypeError exception is + thrown (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + try { + Object.defineProperty(arrObj, "1", { + configurable: false + }); + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js index ed05a2c03f..c379fbca6c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js @@ -1,25 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of an inherited data property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - try { - Array.prototype[1] = 2; // Not setting the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return arrObj.length === 1 && !arrObj.hasOwnProperty("1"); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-171 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of an + inherited data property with large index named in 'O' can't stop + deleting index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + try { + Array.prototype[1] = 2; // Not setting the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return arrObj.length === 1 && !arrObj.hasOwnProperty("1"); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js index 8c597c867c..8718db87e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides an inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - try { - Object.defineProperty(arrObj, "1", { - configurable: false - }); - - Array.prototype[1] = 2; - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-172 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own data property with large index named in 'O' that overrides an + inherited data property can stop deleting index named properties + (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + try { + Object.defineProperty(arrObj, "1", { + configurable: false + }); + + Array.prototype[1] = 2; + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js index 5eb573acd8..313e530f16 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides an inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - try { - Object.defineProperty(arrObj, "1", { - configurable: false - }); - - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 2; - }, - configurable: true - }); - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-173 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own data property with large index named in 'O' that overrides an + inherited accessor property can stop deleting index named + properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + try { + Object.defineProperty(arrObj, "1", { + configurable: false + }); + + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 2; + }, + configurable: true + }); + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js index bc961f3246..f0a9e37343 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - try { - Object.defineProperty(arrObj, "1", { - get: function () { - return 1; - }, - configurable: false - }); - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-174 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own accessor property with large index named in 'O' can stop + deleting index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + try { + Object.defineProperty(arrObj, "1", { + get: function () { + return 1; + }, + configurable: false + }); + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js index 9f47e7ac7f..0e96b42411 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of an inherited accessor property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true // Not setting the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable - }); - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - - return arrObj.length === 1 && !arrObj.hasOwnProperty("1"); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-175 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of an + inherited accessor property with large index named in 'O' can't + stop deleting index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 1; + }, + configurable: true // Not setting the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable + }); + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + + return arrObj.length === 1 && !arrObj.hasOwnProperty("1"); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js index dea5c5f8f5..d6d6a7415a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides an inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - try { - Object.defineProperty(arrObj, "1", { - get: function () { - return 2; - }, - configurable: false - }); - - Array.prototype[1] = 2; - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-176 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own accessor property with large index named in 'O' that overrides + an inherited data property can stop deleting index named + properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + try { + Object.defineProperty(arrObj, "1", { + get: function () { + return 2; + }, + configurable: false + }); + + Array.prototype[1] = 2; + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js index 0aa030a913..8e9fdd7317 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js @@ -1,40 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides an inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - try { - Object.defineProperty(arrObj, "1", { - get: function () { - return 1; - }, - configurable: false - }); - - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 2; - }, - configurable: true - }); - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-177 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own accessor property with large index named in 'O' that overrides + an inherited accessor property can stop deleting index named + properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + try { + Object.defineProperty(arrObj, "1", { + get: function () { + return 1; + }, + configurable: false + }); + + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 2; + }, + configurable: true + }); + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1"); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js index bfd9568e15..b1e06fc340 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the configurable large index named property of 'O' is deleted (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 1 - }); - - return !arrObj.hasOwnProperty("1"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-178 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the configurable large index named + property of 'O' is deleted (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 1 + }); + + return !arrObj.hasOwnProperty("1"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js index d4c07fdc19..5d07d17b20 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test value of the length property is same as [[Value]] (15.4.5.1 step 3.l.iii.1) - */ - - -function testcase() { - var arrObj = [0, 1, 2, 3]; - - Object.defineProperty(arrObj, "1", { - configurable: false - }); - - Object.defineProperty(arrObj, "length", { - value: 3 - }); - - return arrObj.length === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-179-1 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is greater than + value of the length property, test value of the length property + is same as [[Value]] (15.4.5.1 step 3.l.iii.1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [0, 1, 2, 3]; + + Object.defineProperty(arrObj, "1", { + configurable: false + }); + + Object.defineProperty(arrObj, "length", { + value: 3 + }); + + return arrObj.length === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js index 594d44faef..b25e7785f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 11.a.i - * of [[DefineOwnProperty]] rejects changing the setter if present. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js - * @description Object.defineProperty throws TypeError when changing setter of non-configurable accessor properties(8.12.9 step 11.a.i) - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - // dummy getter - var getter = function () { return 1;} - var d1 = { get: getter }; - Object.defineProperty(o, "foo", d1); - - // now, trying to change the setter should fail, since [[Configurable]] - // on the original property will be false. - var setter = function (x) {}; - var desc = { set: setter }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.get === getter && - d2.configurable === false && - d2.enumerable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 11.a.i + of [[DefineOwnProperty]] rejects changing the setter if present. +es5id: 15.2.3.6-4-18 +description: > + Object.defineProperty throws TypeError when changing setter of + non-configurable accessor properties(8.12.9 step 11.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + // dummy getter + var getter = function () { return 1;} + var d1 = { get: getter }; + Object.defineProperty(o, "foo", d1); + + // now, trying to change the setter should fail, since [[Configurable]] + // on the original property will be false. + var setter = function (x) {}; + var desc = { set: setter }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.get === getter && + d2.configurable === false && + d2.enumerable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js index 673f243f8e..b25f7a081f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js - * @description Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' doesn't contain non-configurable large index named property (15.4.5.1 step 3.m) - */ - - -function testcase() { - - var arrObj = [0, 1]; - - Object.defineProperty(arrObj, "length", { - value: 0, - writable: false - }); - - arrObj.length = 10; //try to overwrite length value of arr - return !arrObj.hasOwnProperty("1") && arrObj.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-181 +description: > + Object.defineProperty - 'O' is an Array, 'name' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to false at last when the [[Writable]] + field of 'desc' is false and 'O' doesn't contain non-configurable + large index named property (15.4.5.1 step 3.m) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = [0, 1]; + + Object.defineProperty(arrObj, "length", { + value: 0, + writable: false + }); + + arrObj.length = 10; //try to overwrite length value of arr + return !arrObj.hasOwnProperty("1") && arrObj.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js index d93d9ee72e..73e8c5cf25 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is available String values that convert to numbers (15.4.5.1 step 4.a) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - value: 12 - }); - - return arrObj[0] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-182 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is available String values that convert to + numbers (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + value: 12 + }); + + return arrObj[0] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js index caedf0ef78..e5d1c01972 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 - 2 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 4294967294, { - value: 100 - }); - - return arrObj.hasOwnProperty("4294967294") && arrObj.length === 4294967295 && arrObj[4294967294] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-183 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is boundary value 2^32 - 2 (15.4.5.1 step + 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 4294967294, { + value: 100 + }); + + return arrObj.hasOwnProperty("4294967294") && arrObj.length === 4294967295 && arrObj[4294967294] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js index 7b412fff27..709e4d7449 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 - 1 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 4294967295, { - value: 100 - }); - - return arrObj.hasOwnProperty("4294967295") && arrObj.length === 0 && arrObj[4294967295] === 100; ; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-184 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is boundary value 2^32 - 1 (15.4.5.1 step + 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 4294967295, { + value: 100 + }); + + return arrObj.hasOwnProperty("4294967295") && arrObj.length === 0 && arrObj[4294967295] === 100; ; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js index 3ef3d82546..6181ff399e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 4294967296, { - value: 100 - }); - - return arrObj.hasOwnProperty("4294967296") && arrObj.length === 0 && arrObj[4294967296] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-185 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is boundary value 2^32 (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 4294967296, { + value: 100 + }); + + return arrObj.hasOwnProperty("4294967296") && arrObj.length === 0 && arrObj[4294967296] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js index 7a184b20d7..6cf69fb5f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 + 1 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 4294967297, { - value: 100 - }); - - return arrObj.hasOwnProperty("4294967297") && arrObj.length === 0 && arrObj[4294967297] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-186 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is boundary value 2^32 + 1 (15.4.5.1 step + 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 4294967297, { + value: 100 + }); + + return arrObj.hasOwnProperty("4294967297") && arrObj.length === 0 && arrObj[4294967297] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js index 18b7986352..981ebd29ba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is not thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' is less than value of the length property (15.4.5.1 step 4.b) - */ - - -function testcase() { - var arrObj = [1, 2, 3]; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - - try { - Object.defineProperty(arrObj, 1, { - value: "abc" - }); - - return true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-187 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, test TypeError is not thrown if the [[Writable]] + attribute of the length property in 'O' is false and value of + 'name' is less than value of the length property (15.4.5.1 step + 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [1, 2, 3]; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + + try { + Object.defineProperty(arrObj, 1, { + value: "abc" + }); + + return true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js index 3e57e04992..a9b92e7e44 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' equals to value of the length property (15.4.5.1 step 4.b) - */ - - -function testcase() { - var arrObj = [1, 2, 3]; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - - try { - Object.defineProperty(arrObj, 3, { - value: "abc" - }); - - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-188 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, test TypeError is thrown if the [[Writable]] + attribute of the length property in 'O' is false and value of + 'name' equals to value of the length property (15.4.5.1 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [1, 2, 3]; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + + try { + Object.defineProperty(arrObj, 3, { + value: "abc" + }); + + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js index 97f56931bb..2011c14112 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' is greater than value of the length property (15.4.5.1 step 4.b) - */ - - -function testcase() { - var arrObj = [1, 2, 3]; - - Object.defineProperty(arrObj, "length", { - writable: false - }); - - try { - Object.defineProperty(arrObj, 4, { - value: "abc" - }); - - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-189 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, test TypeError is thrown if the [[Writable]] + attribute of the length property in 'O' is false and value of + 'name' is greater than value of the length property (15.4.5.1 step + 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [1, 2, 3]; + + Object.defineProperty(arrObj, "length", { + writable: false + }); + + try { + Object.defineProperty(arrObj, 4, { + value: "abc" + }); + + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js index e99a9696f7..c08e31581c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 11.a.i - * of [[DefineOwnProperty]] permits setting a setter (if absent). - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js - * @description Object.defineProperty permits setting a setter (if absent) of non-configurable accessor properties(8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - // dummy getter - var getter = function () { return 1;} - var d1 = { get: getter }; - Object.defineProperty(o, "foo", d1); - - // now, trying to set the setter should succeed even though [[Configurable]] - // on the original property will be false. - var desc = { set: undefined }; - Object.defineProperty(o, "foo", desc); - - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (d2.get === getter && - d2.set === undefined && - d2.configurable === false && - d2.enumerable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 11.a.i + of [[DefineOwnProperty]] permits setting a setter (if absent). +es5id: 15.2.3.6-4-19 +description: > + Object.defineProperty permits setting a setter (if absent) of + non-configurable accessor properties(8.12.9 step 10.a.ii.1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + // dummy getter + var getter = function () { return 1;} + var d1 = { get: getter }; + Object.defineProperty(o, "foo", d1); + + // now, trying to set the setter should succeed even though [[Configurable]] + // on the original property will be false. + var desc = { set: undefined }; + Object.defineProperty(o, "foo", desc); + + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (d2.get === getter && + d2.set === undefined && + d2.configurable === false && + d2.enumerable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js index d064d5129a..95365ed274 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property, test TypeError is thrown on updating the configurable attribute from false to true (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - Object.defineProperty(arrObj, 0, { - value: "ownDataProperty", - configurable: false - }); - - try { - Object.defineProperty(arrObj, 0, { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arrObj, "0", "ownDataProperty", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-190 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is own data property, test TypeError is + thrown on updating the configurable attribute from false to true + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + Object.defineProperty(arrObj, 0, { + value: "ownDataProperty", + configurable: false + }); + + try { + Object.defineProperty(arrObj, 0, { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arrObj, "0", "ownDataProperty", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js index e8bc3671aa..2681ef4ac5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is an inherited data property, test that defining own index named property is successful (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 11, - configurable: true - }); - - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - configurable: false - }); - return arrObj.hasOwnProperty("0") && Array.prototype[0] === 11 && typeof arrObj[0] === "undefined"; - } finally { - delete Array.prototype[0]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-191 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is an inherited data property, test that + defining own index named property is successful (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 11, + configurable: true + }); + + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + configurable: false + }); + return arrObj.hasOwnProperty("0") && Array.prototype[0] === 11 && typeof arrObj[0] === "undefined"; + } finally { + delete Array.prototype[0]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js index cf055da6f6..b5e1f72214 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property that overrides an inherited data property, test TypeError is thrown on updating the [[Configurable]] attribute from false to true (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 11, - configurable: true - }); - - var arrObj = []; - Object.defineProperty(arrObj, "0", { - value: 12, - configurable: false - }); - - Object.defineProperty(arrObj, "0", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-192 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is own data property that overrides an + inherited data property, test TypeError is thrown on updating the + [[Configurable]] attribute from false to true (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 11, + configurable: true + }); + + var arrObj = []; + Object.defineProperty(arrObj, "0", { + value: 12, + configurable: false + }); + + Object.defineProperty(arrObj, "0", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js index 5164b0cbb8..2691fc7d55 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js @@ -1,37 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property that overrides an inherited accessor property, test TypeError is thrown when update the [[Configurable]] attribute to true and value of [[Configurable]] attribute of original is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - var arrObj = []; - Object.defineProperty(arrObj, "0", { - value: 12, - configurable: false - }); - - Object.defineProperty(arrObj, "0", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-193 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is own data property that overrides an + inherited accessor property, test TypeError is thrown when update + the [[Configurable]] attribute to true and value of + [[Configurable]] attribute of original is false (15.4.5.1 step + 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + var arrObj = []; + Object.defineProperty(arrObj, "0", { + value: 12, + configurable: false + }); + + Object.defineProperty(arrObj, "0", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js index 6f1be2fada..e5861d80aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property, test TypeError is thrown on updating the configurable attribute from false to true (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var getFunc = function () { - return 11; - }; - - Object.defineProperty(arrObj, "0", { - get: getFunc, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "0", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-194 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is own accessor property, test TypeError is + thrown on updating the configurable attribute from false to true + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + var getFunc = function () { + return 11; + }; + + Object.defineProperty(arrObj, "0", { + get: getFunc, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "0", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js index 68090c288d..cd4c93e99c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js @@ -1,43 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is an inherited accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - var arrObj = []; - - function getFunc() { - return arrObj.helpVerifySet; - } - function setFunc(value) { - arrObj.helpVerifySet = value; - } - - Object.defineProperty(arrObj, "0", { - get: getFunc, - set: setFunc, - configurable: false - }); - - arrObj[0] = 13; - - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "helpVerifySet", false, false); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-195 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is an inherited accessor property (15.4.5.1 + step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + var arrObj = []; + + function getFunc() { + return arrObj.helpVerifySet; + } + function setFunc(value) { + arrObj.helpVerifySet = value; + } + + Object.defineProperty(arrObj, "0", { + get: getFunc, + set: setFunc, + configurable: false + }); + + arrObj[0] = 13; + + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "helpVerifySet", false, false); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js index 46bb3d6941..cc33a638f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property that overrides an inherited data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 11, - configurable: true - }); - - var arrObj = []; - Object.defineProperty(arrObj, "0", { - get: function () { }, - configurable: false - }); - - Object.defineProperty(arrObj, "0", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-196 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is own accessor property that overrides an + inherited data property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 11, + configurable: true + }); + + var arrObj = []; + Object.defineProperty(arrObj, "0", { + get: function () { }, + configurable: false + }); + + Object.defineProperty(arrObj, "0", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js index 7a7e8052be..b1153b1d86 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property that overrides an inherited accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { }, - configurable: true - }); - - var arrObj = []; - Object.defineProperty(arrObj, "0", { - get: function () { }, - configurable: false - }); - - Object.defineProperty(arrObj, "0", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-197 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is own accessor property that overrides an + inherited accessor property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { }, + configurable: true + }); + + var arrObj = []; + Object.defineProperty(arrObj, "0", { + get: function () { }, + configurable: false + }); + + Object.defineProperty(arrObj, "0", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js index 0b084a852e..2574bcf516 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - Object.preventExtensions(arrObj); - - try { - var desc = { value: 1 }; - Object.defineProperty(arrObj, "0", desc); - return false; - } catch (e) { - return e instanceof TypeError && (arrObj.hasOwnProperty("0") === false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-198 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O', test + TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + Object.preventExtensions(arrObj); + + try { + var desc = { value: 1 }; + Object.defineProperty(arrObj, "0", desc); + return false; + } catch (e) { + return e instanceof TypeError && (arrObj.hasOwnProperty("0") === false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js index 27e367f624..76ee9cce33 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js @@ -1,21 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test 'name' is defined as data property when 'desc' is generic descriptor (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - enumerable: true - }); - - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-199 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O', test 'name' + is defined as data property when 'desc' is generic descriptor + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + enumerable: true + }); + + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js index 93c27d4ca0..78a3362e20 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For newly defined data properties, attributes - * missing from desc should have values set to the defaults from 8.6.1. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js - * @description Object.defineProperty sets missing attributes to their default values (data properties)(8.12.9 step 4.a.i) - */ - - -function testcase() { - var o = {}; - - var desc = { value: 1 }; - Object.defineProperty(o, "foo", desc); - - var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); - - if (propDesc.value === 1 && // this is the value that was set - propDesc.writable === false && // false by default - propDesc.enumerable === false && // false by default - propDesc.configurable === false) { // false by default - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For newly defined data properties, attributes + missing from desc should have values set to the defaults from 8.6.1. +es5id: 15.2.3.6-4-2 +description: > + Object.defineProperty sets missing attributes to their default + values (data properties)(8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + var desc = { value: 1 }; + Object.defineProperty(o, "foo", desc); + + var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); + + if (propDesc.value === 1 && // this is the value that was set + propDesc.writable === false && // false by default + propDesc.enumerable === false && // false by default + propDesc.configurable === false) { // false by default + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js index 3629b69751..0e351a1fbb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 11.a.ii - * of [[DefineOwnProperty]] rejects changing the getter if present. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js - * @description Object.defineProperty throws TypeError when changing getter (if present) of non-configurable accessor properties(8.12.9 step 11.a.ii) - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - // dummy getter/setter - var getter = function () { return 1;} - var d1 = { get: getter, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // now, trying to change the setter should fail, since [[Configurable]] - // on the original property will be false. - var desc = { get: undefined }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (d2.get === getter && - d2.configurable === false && - d2.enumerable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 11.a.ii + of [[DefineOwnProperty]] rejects changing the getter if present. +es5id: 15.2.3.6-4-20 +description: > + Object.defineProperty throws TypeError when changing getter (if + present) of non-configurable accessor properties(8.12.9 step + 11.a.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + // dummy getter/setter + var getter = function () { return 1;} + var d1 = { get: getter, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // now, trying to change the setter should fail, since [[Configurable]] + // on the original property will be false. + var desc = { get: undefined }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (d2.get === getter && + d2.configurable === false && + d2.enumerable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js index 31a71ea862..56028a480c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js @@ -1,23 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test [[Value]] of 'name' property of 'Attributes' is set as undefined if [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - writable: true, - enumerable: true, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-200 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O', test + [[Value]] of 'name' property of 'Attributes' is set as undefined + if [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + writable: true, + enumerable: true, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js index 736b8595a0..f51aba2e5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js @@ -1,22 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Writable]] is absent in data descriptor 'desc', test [[Writable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - value: 1001, - enumerable: true, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-201 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O' and + [[Writable]] is absent in data descriptor 'desc', test + [[Writable]] attribute of property 'name' is set to false + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + value: 1001, + enumerable: true, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js index 6f0ef7904c..0d8195705e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js @@ -1,22 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Enumerable]] is absent in data descriptor 'desc', test [[Enumerable]] of property 'name' is set to false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - value: 1001, - writable: true, - configurable: true - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-202 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O' and + [[Enumerable]] is absent in data descriptor 'desc', test + [[Enumerable]] of property 'name' is set to false (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + value: 1001, + writable: true, + configurable: true + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js index e685e4fb0a..e482f04c12 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js @@ -1,22 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Configurable]] is absent in data descriptor 'desc', test [[Configurable]] of property 'name' is set to false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - value: 1001, - writable: true, - enumerable: true - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-203 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O' and + [[Configurable]] is absent in data descriptor 'desc', test + [[Configurable]] of property 'name' is set to false (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + value: 1001, + writable: true, + enumerable: true + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js index 02dd9fcfb4..43732577ac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js @@ -1,24 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'desc' is data descriptor, test updating all attribute values of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(arrObj, "0", { - value: 1001, - writable: false, - enumerable: false, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-204 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'desc' is data descriptor, test updating all + attribute values of 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(arrObj, "0", { + value: 1001, + writable: false, + enumerable: false, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js index 39b6827c08..63c540b5f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Get]] is absent in accessor descriptor 'desc', test [[Get]] attribute of property 'name' is set to undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var setFunc = function (value) { - arrObj.setVerifyHelpProp = value; - }; - - Object.defineProperty(arrObj, "0", { - set: setFunc, - enumerable: true, - configurable: true - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-205 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O' and [[Get]] + is absent in accessor descriptor 'desc', test [[Get]] attribute of + property 'name' is set to undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + var setFunc = function (value) { + arrObj.setVerifyHelpProp = value; + }; + + Object.defineProperty(arrObj, "0", { + set: setFunc, + enumerable: true, + configurable: true + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js index 866022f020..52104a0203 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test [[Set]] of 'name' property in 'Attributes' is set as undefined if [[Set]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var getFunc = function () { }; - - Object.defineProperty(arrObj, "0", { - get: getFunc, - enumerable: true, - configurable: true - }); - - var desc = Object.getOwnPropertyDescriptor(arrObj, "0"); - - return arrObj.hasOwnProperty("0") && desc.hasOwnProperty("set") && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-206 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O', test [[Set]] + of 'name' property in 'Attributes' is set as undefined if [[Set]] + is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + var getFunc = function () { }; + + Object.defineProperty(arrObj, "0", { + get: getFunc, + enumerable: true, + configurable: true + }); + + var desc = Object.getOwnPropertyDescriptor(arrObj, "0"); + + return arrObj.hasOwnProperty("0") && desc.hasOwnProperty("set") && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js index 6e53b7131a..6f71b052f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js @@ -1,27 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Enumerable]] is absent in accessor descriptor 'desc', test [[Enumerable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - var setFunc = function (value) { - arrObj.setVerifyHelpProp = value; - }; - var getFunc = function () { }; - - Object.defineProperty(arrObj, "0", { - set: setFunc, - get: getFunc, - configurable: true - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-207 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O' and + [[Enumerable]] is absent in accessor descriptor 'desc', test + [[Enumerable]] attribute of property 'name' is set to false + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + var setFunc = function (value) { + arrObj.setVerifyHelpProp = value; + }; + var getFunc = function () { }; + + Object.defineProperty(arrObj, "0", { + set: setFunc, + get: getFunc, + configurable: true + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js index 3d700f5c1b..cef424e072 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js @@ -1,26 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Configurable]] is absent in accessor descriptor 'desc', test [[Configurable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var setFunc = function (value) { - arrObj.setVerifyHelpProp = value; - }; - var getFunc = function () { }; - - Object.defineProperty(arrObj, "0", { - set: setFunc, - get: getFunc, - enumerable: true - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-208 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' property doesn't exist in 'O' and + [[Configurable]] is absent in accessor descriptor 'desc', test + [[Configurable]] attribute of property 'name' is set to false + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + var setFunc = function (value) { + arrObj.setVerifyHelpProp = value; + }; + var getFunc = function () { }; + + Object.defineProperty(arrObj, "0", { + set: setFunc, + get: getFunc, + enumerable: true + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js index b856e43da0..b031f70d02 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js @@ -1,39 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'desc' is accessor descriptor, test updating all attribute values of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var setFunc = function (value) { - arrObj.setVerifyHelpProp = value; - }; - var getFunc = function () { - return 14; - }; - - Object.defineProperty(arrObj, "0", { - get: function () { - return 11; - }, - set: function () { }, - configurable: true, - enumerable: true - }); - - Object.defineProperty(arrObj, "0", { - get: getFunc, - set: setFunc, - configurable: false, - enumerable: false - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-209 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'desc' is accessor descriptor, test updating all + attribute values of 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + var setFunc = function (value) { + arrObj.setVerifyHelpProp = value; + }; + var getFunc = function () { + return 14; + }; + + Object.defineProperty(arrObj, "0", { + get: function () { + return 11; + }, + set: function () { }, + configurable: true, + enumerable: true + }); + + Object.defineProperty(arrObj, "0", { + get: getFunc, + set: setFunc, + configurable: false, + enumerable: false + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js index 9d56306d9b..3273296117 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For non-configurable properties, step 11.a.ii - * of [[DefineOwnProperty]] permits setting a getter if absent. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js - * @description Object.defineProperty permits setting a getter (if absent) of non-configurable accessor properties(8.12.9 step 11.a.ii) - */ - - -function testcase() { - var o = {}; - - // create an accessor property; all other attributes default to false. - // dummy setter - var setter = function (x) {} - var d1 = { set: setter }; - Object.defineProperty(o, "foo", d1); - - // now, trying to set the getter should succeed even though [[Configurable]] - // on the original property will be false. Existing values of need to be preserved. - var getter = undefined; - var desc = { get: getter }; - - Object.defineProperty(o, "foo", desc); - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (d2.get === getter && - d2.set === setter && - d2.configurable === false && - d2.enumerable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For non-configurable properties, step 11.a.ii + of [[DefineOwnProperty]] permits setting a getter if absent. +es5id: 15.2.3.6-4-21 +description: > + Object.defineProperty permits setting a getter (if absent) of + non-configurable accessor properties(8.12.9 step 11.a.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create an accessor property; all other attributes default to false. + // dummy setter + var setter = function (x) {} + var d1 = { set: setter }; + Object.defineProperty(o, "foo", d1); + + // now, trying to set the getter should succeed even though [[Configurable]] + // on the original property will be false. Existing values of need to be preserved. + var getter = undefined; + var desc = { get: getter }; + + Object.defineProperty(o, "foo", desc); + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (d2.get === getter && + d2.set === setter && + d2.configurable === false && + d2.enumerable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js index d583942261..e9cdbe2e05 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js @@ -1,20 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if every field in 'desc' is absent (name is data property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - arrObj[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(arrObj, "0", {}); - return dataPropertyAttributesAreCorrect(arrObj, "0", 101, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-210 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' makes no change if every field in 'desc' is + absent (name is data property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + arrObj[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(arrObj, "0", {}); + return dataPropertyAttributesAreCorrect(arrObj, "0", 101, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js index 40b8047ba5..892bfff666 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if every field in 'desc' is absent(name is accessor property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - function getFunc() { - return 11; - } - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(arrObj, "0", {}); - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-211 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' makes no change if every field in 'desc' is + absent(name is accessor property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + function getFunc() { + return 11; + } + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(arrObj, "0", {}); + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js index 14edc2d022..356e4fa1a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'name'(desc is data property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - arrObj[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(arrObj, "0", { - value: 100, - writable: true, - enumerable: true, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-212 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' makes no change if the value of every field + in 'desc' is the same value as the corresponding field in + 'name'(desc is data property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + arrObj[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(arrObj, "0", { + value: 100, + writable: true, + enumerable: true, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js index 67e6b97e0b..10f5117cf6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js @@ -1,39 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'name'(desc is accessor property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var getFunc = function () { - return "100"; - }; - var setFunc = function (value) { - arrObj.setVerifyHelpProp = value; - }; - - var desc = { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }; - - Object.defineProperty(arrObj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(arrObj, "0", desc); - - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-213 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' makes no change if the value of every field + in 'desc' is the same value as the corresponding field in + 'name'(desc is accessor property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + var getFunc = function () { + return "100"; + }; + var setFunc = function (value) { + arrObj.setVerifyHelpProp = value; + }; + + var desc = { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }; + + Object.defineProperty(arrObj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(arrObj, "0", desc); + + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js index db78e51da6..3cdb626d56 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js @@ -1,28 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property and its configurable and writable attributes are set to false, test TypeError is thrown when the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 0, { - value: 101, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "0", { value: "abc" }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-214 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property and its configurable and writable attributes are set to + false, test TypeError is thrown when the type of the [[Value]] + field of 'desc' is different from the type of the [[Value]] + attribute value of 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 0, { + value: 101, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "0", { value: "abc" }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js index 7d18b00f63..9df867e408 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js @@ -1,20 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: undefined }); - - Object.defineProperty(arrObj, "0", { value: undefined }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-215 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, both the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: undefined }); + + Object.defineProperty(arrObj, "0", { value: undefined }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js index 2bd0417281..91c911003b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js @@ -1,20 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are null (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: null }); - - Object.defineProperty(arrObj, "0", { value: null }); - return dataPropertyAttributesAreCorrect(arrObj, "0", null, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-216 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, both the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are null (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: null }); + + Object.defineProperty(arrObj, "0", { value: null }); + return dataPropertyAttributesAreCorrect(arrObj, "0", null, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js index fb7727b49f..b61efc91c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are NaN (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: NaN }); - - Object.defineProperty(arrObj, "0", { value: NaN }); - - var hasProperty = arrObj.hasOwnProperty("0"); - var verifyValue = (arrObj[0] !== arrObj[0]); - - var verifyWritable = false; - arrObj[0] = 1001; - verifyWritable = arrObj[0] !== 1001 && arrObj[0] !== arrObj[0]; - - var verifyEnumerable = false; - for (var p in arrObj) { - if (p === "0") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete arrObj[0]; - verifyConfigurable = arrObj.hasOwnProperty("0"); - - return hasProperty && verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-217 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, both the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are NaN (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: NaN }); + + Object.defineProperty(arrObj, "0", { value: NaN }); + + var hasProperty = arrObj.hasOwnProperty("0"); + var verifyValue = (arrObj[0] !== arrObj[0]); + + var verifyWritable = false; + arrObj[0] = 1001; + verifyWritable = arrObj[0] !== 1001 && arrObj[0] !== arrObj[0]; + + var verifyEnumerable = false; + for (var p in arrObj) { + if (p === "0") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete arrObj[0]; + verifyConfigurable = arrObj.hasOwnProperty("0"); + + return hasProperty && verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js index f6631ded5d..606a6bc92b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: -0 }); - - try { - Object.defineProperty(arrObj, "0", { value: +0 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-218 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, test TypeError is thrown when the [[Value]] field of + 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: -0 }); + + try { + Object.defineProperty(arrObj, "0", { value: +0 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js index 8c1d58621e..8f1336f6b8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: +0 }); - - try { - Object.defineProperty(arrObj, "0", { value: -0 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-219 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, test TypeError is thrown when the [[Value]] field of + 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: +0 }); + + try { + Object.defineProperty(arrObj, "0", { value: -0 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js index 4aff046aa6..5e9f476b54 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js - * @description Object.defineProperty - 'name' is existing own data property (8.12.9 step 1) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "foo", { - value: 11, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - value: 12, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && obj.foo === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-22 +description: > + Object.defineProperty - 'name' is existing own data property + (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "foo", { + value: 11, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + value: 12, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && obj.foo === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js index 5974072f85..e40c6e41c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with same vaule (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: 101 }); - - Object.defineProperty(arrObj, "0", { value: 101 }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-220 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two numbers with same vaule + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: 101 }); + + Object.defineProperty(arrObj, "0", { value: 101 }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js index ffaf27c9d4..fbc3ae6e3e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 0, { - value: 101, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "0", { value: 123 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-221 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, test TypeError is thrown when the [[Value]] field of + 'desc' and the [[Value]] attribute value of 'name' are two numbers + with different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 0, { + value: 101, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "0", { value: 123 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js index 02e4278f7a..1b0e5ba7e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings which have same length and same characters in corresponding positions (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: "abcd" }); - - Object.defineProperty(arrObj, "0", { value: "abcd" }); - return dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-222 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two strings which have same length + and same characters in corresponding positions (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: "abcd" }); + + Object.defineProperty(arrObj, "0", { value: "abcd" }); + return dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js index c83165e04d..42bd5ac785 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 0, { - value: "abcd", - writable: false, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "0", { value: "fghj" }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-223 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, test TypeError is thrown when the [[Value]] field of + 'desc' and the [[Value]] attribute value of 'name' are two strings + with different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 0, { + value: "abcd", + writable: false, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "0", { value: "fghj" }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js index 432f25b5cd..78d4ef9c6d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { value: true }); - - Object.defineProperty(arrObj, "0", { value: true }); - return dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-224 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two booleans with same value + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { value: true }); + + Object.defineProperty(arrObj, "0", { value: true }); + return dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js index d42b071a13..40d655eca6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, 0, { - value: true, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "0", { value: false }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-225 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, test TypeError is thrown when the [[Value]] field of + 'desc' and the [[Value]] attribute value of 'name' are two + booleans with different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, 0, { + value: true, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "0", { value: false }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js index c56e8ac973..78d60fe0e6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js @@ -1,22 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - var obj1 = { length: 10 }; - - Object.defineProperty(arrObj, "0", { value: obj1 }); - - Object.defineProperty(arrObj, "0", { value: obj1 }); - return dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-226 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two objects which refer to the same + object (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + var obj1 = { length: 10 }; + + Object.defineProperty(arrObj, "0", { value: obj1 }); + + Object.defineProperty(arrObj, "0", { value: obj1 }); + return dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js index 5012295e77..2d68820d72 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to two different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - var obj1 = { length: 10 }; - Object.defineProperty(arrObj, 0, { - value: obj1, - writable: false, - configurable: false - }); - - var obj2 = { length: 20 }; - - try { - Object.defineProperty(arrObj, "0", { value: obj2 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-227 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, test TypeError is thrown when the [[Value]] field of + 'desc' and the [[Value]] attribute value of 'name' are two objects + which refer to two different objects (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + var obj1 = { length: 10 }; + Object.defineProperty(arrObj, 0, { + value: obj1, + writable: false, + configurable: false + }); + + var obj2 = { length: 20 }; + + try { + Object.defineProperty(arrObj, "0", { value: obj2 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js index f568724395..e3e8b71df9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Writable]] field of 'desc' and the [[Writable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { writable: false }); - - Object.defineProperty(arrObj, "0", { writable: false }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-228 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Writable]] field of 'desc' and the [[Writable]] + attribute value of 'name' are two booleans with same value + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { writable: false }); + + Object.defineProperty(arrObj, "0", { writable: false }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js index 288da39b7e..8b6c5f7aa5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Writable]] field of 'desc' and the [[Writable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { writable: false, configurable: true }); - - Object.defineProperty(arrObj, "0", { writable: true }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-229 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Writable]] field of 'desc' and the [[Writable]] + attribute value of 'name' are two booleans with different values + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { writable: false, configurable: true }); + + Object.defineProperty(arrObj, "0", { writable: true }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js index 1d809bb539..189d8df875 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js - * @description Object.defineProperty - 'name' is existing an inherited data property (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - value: 11, - configurable: false - }); - - var ConstructFun = function () {}; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - - Object.defineProperty(obj, "foo", { - configurable: true - }); - return obj.hasOwnProperty("foo") && (typeof obj.foo) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-23 +description: > + Object.defineProperty - 'name' is existing an inherited data + property (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + value: 11, + configurable: false + }); + + var ConstructFun = function () {}; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + + Object.defineProperty(obj, "foo", { + configurable: true + }); + return obj.hasOwnProperty("foo") && (typeof obj.foo) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js index d438f63ba3..d2e7d2b4aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - arrObj.helpVerifySet = 10; - - function getFunc() { - return arrObj.helpVerifySet; - } - function setFunc(value) { - arrObj.helpVerifySet = value; - } - - Object.defineProperty(arrObj, "0", { - get: getFunc, - set: setFunc - }); - - Object.defineProperty(arrObj, "0", { - get: getFunc - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "helpVerifySet", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-230 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Get]] field of 'desc' and the [[Get]] attribute + value of 'name' are two objects which refer to the same object + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + arrObj.helpVerifySet = 10; + + function getFunc() { + return arrObj.helpVerifySet; + } + function setFunc(value) { + arrObj.helpVerifySet = value; + } + + Object.defineProperty(arrObj, "0", { + get: getFunc, + set: setFunc + }); + + Object.defineProperty(arrObj, "0", { + get: getFunc + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "helpVerifySet", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js index f839f6027a..2e682ba13a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - arrObj.helpVerifySet = 10; - - function getFunc1() { - return 20; - } - function getFunc2() { - return arrObj.helpVerifySet; - } - function setFunc(value) { - arrObj.helpVerifySet = value; - } - - Object.defineProperty(arrObj, "0", { - get: getFunc1, - set: setFunc, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - get: getFunc2 - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc2, setFunc, "helpVerifySet", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-231 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Get]] field of 'desc' and the [[Get]] attribute + value of 'name' are two objects which refer to the different + objects (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + arrObj.helpVerifySet = 10; + + function getFunc1() { + return 20; + } + function getFunc2() { + return arrObj.helpVerifySet; + } + function setFunc(value) { + arrObj.helpVerifySet = value; + } + + Object.defineProperty(arrObj, "0", { + get: getFunc1, + set: setFunc, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + get: getFunc2 + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc2, setFunc, "helpVerifySet", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js index c7bc010fe2..9c3a9425a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "0", { set: setFunc }); - - Object.defineProperty(arrObj, "0", { set: setFunc }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-232 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Set]] field of 'desc' and the [[Set]] attribute + value of 'name' are two objects which refer to the same object + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "0", { set: setFunc }); + + Object.defineProperty(arrObj, "0", { set: setFunc }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js index 7ebc8fe1e1..eb670a95f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - function setFunc1() { } - - Object.defineProperty(arrObj, "0", { - set: setFunc1, - configurable: true - }); - - function setFunc2(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "0", { set: setFunc2 }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc2, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-233 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Set]] field of 'desc' and the [[Set]] attribute + value of 'name' are two objects which refer to the different + objects (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + function setFunc1() { } + + Object.defineProperty(arrObj, "0", { + set: setFunc1, + configurable: true + }); + + function setFunc2(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "0", { set: setFunc2 }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc2, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js index f37e10fada..cab45f748a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Enumerable]] field of 'desc' and the [[Enumerable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { enumerable: false }); - - Object.defineProperty(arrObj, "0", { enumerable: false }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-234 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Enumerable]] field of 'desc' and the + [[Enumerable]] attribute value of 'name' are two booleans with + same value (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { enumerable: false }); + + Object.defineProperty(arrObj, "0", { enumerable: false }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js index 30202fc27b..ff75a490f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Enumerable]] field of 'desc' and the [[Enumerable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { enumerable: false, configurable: true }); - - Object.defineProperty(arrObj, "0", { enumerable: true }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-235 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Enumerable]] field of 'desc' and the + [[Enumerable]] attribute value of 'name' are two booleans with + different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { enumerable: false, configurable: true }); + + Object.defineProperty(arrObj, "0", { enumerable: true }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js index 645bc9f1a3..f4af3d3a19 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Configurable]] field of 'desc' and the [[Configurable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { configurable: false }); - - Object.defineProperty(arrObj, "0", { configurable: false }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-236 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Configurable]] field of 'desc' and the + [[Configurable]] attribute value of 'name' are two booleans with + same value (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { configurable: false }); + + Object.defineProperty(arrObj, "0", { configurable: false }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js index ff465e8abd..1322e386ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Configurable]] field of 'desc' and the [[Configurable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "0", { configurable: true }); - - Object.defineProperty(arrObj, "0", { configurable: false }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-237 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + property, the [[Configurable]] field of 'desc' and the + [[Configurable]] attribute value of 'name' are two booleans with + different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "0", { configurable: true }); + + Object.defineProperty(arrObj, "0", { configurable: false }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js index 81d000a5de..7fb3c4f0fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if the [[Configurable]] attribute value of 'name' is false and the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: 3, - writable: true, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "1", { - value: 13, - writable: true, - configurable: true - }); - return false; - - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-238 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, TypeError is thrown if the [[Configurable]] + attribute value of 'name' is false and the [[Configurable]] field + of 'desc' is true (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: 3, + writable: true, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "1", { + value: 13, + writable: true, + configurable: true + }); + return false; + + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js index f5be801a3b..5a965d5b31 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js @@ -1,35 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if the [[Configurable]] attribute value of 'name' is false, and [[Enumerable]] of 'desc' is present and its value is different from the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: 3, - writable: true, - configurable: false, - enumerable: false - }); - - try { - Object.defineProperty(arrObj, "1", { - value: 13, - writable: true, - enumerable: true - }); - return false; - - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-239 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, TypeError is thrown if the [[Configurable]] + attribute value of 'name' is false, and [[Enumerable]] of 'desc' + is present and its value is different from the [[Enumerable]] + attribute value of 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: 3, + writable: true, + configurable: false, + enumerable: false + }); + + try { + Object.defineProperty(arrObj, "1", { + value: 13, + writable: true, + enumerable: true + }); + return false; + + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js index 6b7fac060a..778109a0e6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js - * @description Object.defineProperty - 'name' is own data property that overrides an inherited data property (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - value: 12, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - Object.defineProperty(obj, "foo", { - value: 11, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && obj.foo === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-24 +description: > + Object.defineProperty - 'name' is own data property that overrides + an inherited data property (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + value: 12, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + Object.defineProperty(obj, "foo", { + value: 11, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && obj.foo === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js index 1cd43a7df0..e25653ab19 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if 'name' is accessor property, and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "1", { - set: setFunc, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "1", { - value: 13 - }); - return false; - - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-240 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, TypeError is thrown if 'name' is accessor + property, and 'desc' is data descriptor, and the [[Configurable]] + attribute value of 'name' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "1", { + set: setFunc, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "1", { + value: 13 + }); + return false; + + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js index 667f0e16e5..b09ad9e878 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if 'name' is data property, and'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: 3, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "1", { - set: function () { } - }); - return false; - - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-241 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, TypeError is thrown if 'name' is data property, + and'desc' is accessor descriptor, and the [[Configurable]] + attribute value of 'name' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: 3, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "1", { + set: function () { } + }); + return false; + + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js index 304493dae5..b41c3a75ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is updated successfully (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [3]; - - Object.defineProperty(arrObj, "0", { - value: 1001, - writable: false, - enumerable: false - }); - - return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-242-1 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + true, test 'name' is updated successfully (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [3]; + + Object.defineProperty(arrObj, "0", { + value: 1001, + writable: false, + enumerable: false + }); + + return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js index 264ea9aafb..1a93be344a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js @@ -1,25 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is converted from data property to accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [3]; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "0", { - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-242 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + true, test 'name' is converted from data property to accessor + property (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [3]; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "0", { + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js index ff3d56e73b..ee3e8ff4ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and assignment to the accessor property, fails to convert accessor property from accessor property to data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 3; - } - Object.defineProperty(arrObj, "1", { - get: getFunc, - configurable: true - }); - - arrObj[1] = 4; - - return accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-243-1 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and assignment to + the accessor property, fails to convert accessor property from + accessor property to data property (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 3; + } + Object.defineProperty(arrObj, "1", { + get: getFunc, + configurable: true + }); + + arrObj[1] = 4; + + return accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js index f1eed27090..1f2db50eb7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is converted from accessor property to data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 3; - } - Object.defineProperty(arrObj, "1", { - get: getFunc, - configurable: true - }); - - Object.defineProperty(arrObj, "1", { - value: 12 - }); - - return dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-243 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + true, test 'name' is converted from accessor property to data + property (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 3; + } + Object.defineProperty(arrObj, "1", { + get: getFunc, + configurable: true + }); + + Object.defineProperty(arrObj, "1", { + value: 12 + }); + + return dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js index 375a1240f5..df4ace8a4a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false and the [[Writable]] field of 'desc' is true (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - writable: false, - configurable: false - }); - - try { - - Object.defineProperty(arrObj, "1", { - writable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", undefined, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-244 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false and the [[Writable]] field of 'desc' is + true (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + writable: false, + configurable: false + }); + + try { + + Object.defineProperty(arrObj, "1", { + writable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", undefined, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js index a1630f3c48..4db654f76d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js @@ -1,32 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: 3, - writable: false, - configurable: false - }); - - try { - - Object.defineProperty(arrObj, "1", { - value: "abc" - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-245 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the type of the [[Value]] field of + 'desc' is different from the type of the [[Value]] attribute value + of 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: 3, + writable: false, + configurable: false + }); + + try { + + Object.defineProperty(arrObj, "1", { + value: "abc" + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js index 266e61673f..a822a5e889 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js @@ -1,30 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: -0 - - }); - - try { - Object.defineProperty(arrObj, "1", { - value: +0 - }); - - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-246 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the [[Value]] field of 'desc' is +0, + and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: -0 + + }); + + try { + Object.defineProperty(arrObj, "1", { + value: +0 + }); + + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js index 2bb414a3ec..51e1acb3f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js @@ -1,29 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: +0 - }); - - try { - - Object.defineProperty(arrObj, "1", { - value: -0 - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-247 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the [[Value]] field of 'desc' is -0, + and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: +0 + }); + + try { + + Object.defineProperty(arrObj, "1", { + value: -0 + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js index 0fdb58eb9f..39f410325a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js @@ -1,28 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with different vaules (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: 12 - }); - - try { - Object.defineProperty(arrObj, "1", { - value: 15 - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-248 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the [[Value]] field of 'desc' and + the [[Value]] attribute value of 'name' are two numbers with + different vaules (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: 12 + }); + + try { + Object.defineProperty(arrObj, "1", { + value: 15 + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js index e08e831f1e..84aaa2ed0b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js @@ -1,29 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: "abc" - }); - - try { - Object.defineProperty(arrObj, "1", { - value: "fgh" - }); - - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", "abc", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-249 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the [[Value]] field of 'desc' and + the [[Value]] attribute value of 'name' are two strings with + different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: "abc" + }); + + try { + Object.defineProperty(arrObj, "1", { + value: "fgh" + }); + + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", "abc", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js index dd46905b96..bf3baced5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js - * @description Object.defineProperty - 'data' is own data property that overrides an inherited accessor property (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - get: function () { }, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - Object.defineProperty(obj, "foo", { - value: 11, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && obj.foo === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-25 +description: > + Object.defineProperty - 'data' is own data property that overrides + an inherited accessor property (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + get: function () { }, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + Object.defineProperty(obj, "foo", { + value: 11, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && obj.foo === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js index 3a85979488..0c9a705ad8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js @@ -1,29 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - value: false - }); - - try { - Object.defineProperty(arrObj, "1", { - value: true - }); - - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", false, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-250 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the [[Value]] field of 'desc' and + the [[Value]] attribute value of 'name' are two booleans with + different values (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + value: false + }); + + try { + Object.defineProperty(arrObj, "1", { + value: true + }); + + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", false, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js index 236792688e..ce1c459b36 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js @@ -1,28 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - var obj = { length: 10 }; - - Object.defineProperty(arrObj, "1", { - value: obj - }); - - try { - Object.defineProperty(arrObj, "1", { value: {} }); - - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", obj, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-251 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is data property and 'desc' is data + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Writable]] attribute + value of 'name' is false, and the [[Value]] field of 'desc' and + the [[Value]] attribute value of 'name' are two objects which + refer to the different objects (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + var obj = { length: 10 }; + + Object.defineProperty(arrObj, "1", { + value: obj + }); + + try { + Object.defineProperty(arrObj, "1", { value: {} }); + + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", obj, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js index ae29f699a6..a098e29dbb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js @@ -1,32 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "1", { - set: setFunc - }); - - try { - Object.defineProperty(arrObj, "1", { - set: function () { } - }); - - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-252 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Set]] field of 'desc' is + present, and the [[Set]] field of 'desc' and the [[Set]] attribute + value of 'name' are two objects which refer to the different + objects (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "1", { + set: setFunc + }); + + try { + Object.defineProperty(arrObj, "1", { + set: function () { } + }); + + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js index df9d37de81..6abe4e9bc3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js @@ -1,32 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' is an object and the [[Set]] attribute value of 'name' is undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - function getFunc() { - return 12; - } - - Object.defineProperty(arrObj, "1", { - get: getFunc, - set: undefined - }); - - try { - Object.defineProperty(arrObj, "1", { - set: function () { } - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-253 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Set]] field of 'desc' is + present, and the [[Set]] field of 'desc' is an object and the + [[Set]] attribute value of 'name' is undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + function getFunc() { + return 12; + } + + Object.defineProperty(arrObj, "1", { + get: getFunc, + set: undefined + }); + + try { + Object.defineProperty(arrObj, "1", { + set: function () { } + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js index 33e5415d18..ea8a6097e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js @@ -1,43 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "1", { - set: undefined - }); - var hasProperty = arrObj.hasOwnProperty("1"); - - Object.defineProperty(arrObj, "1", { - set: undefined - }); - - var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); - - var verifyGet = desc.hasOwnProperty("get") && typeof desc.get === "undefined"; - - var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; - - var verifyEnumerable = false; - for (var p in arrObj) { - if (p === "1") { - verifyEnumerable = true - } - } - - var verifyConfigurable = false; - delete arrObj[1]; - verifyConfigurable = arrObj.hasOwnProperty("1"); - - return hasProperty && verifyGet && verifySet && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-254 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is not thrown if the [[Set]] field of 'desc' + is present, and the [[Set]] field of 'desc' and the [[Set]] + attribute value of 'name' are undefined (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "1", { + set: undefined + }); + var hasProperty = arrObj.hasOwnProperty("1"); + + Object.defineProperty(arrObj, "1", { + set: undefined + }); + + var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); + + var verifyGet = desc.hasOwnProperty("get") && typeof desc.get === "undefined"; + + var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; + + var verifyEnumerable = false; + for (var p in arrObj) { + if (p === "1") { + verifyEnumerable = true + } + } + + var verifyConfigurable = false; + delete arrObj[1]; + verifyConfigurable = arrObj.hasOwnProperty("1"); + + return hasProperty && verifyGet && verifySet && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js index 80cdfc9667..590d8aeb92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js @@ -1,53 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - - function getFunc() { - return 12; - } - Object.defineProperty(arrObj, "1", { - get: getFunc - }); - - try { - Object.defineProperty(arrObj, "1", { - get: function () { - return 14; - } - }); - - return false; - } catch (e) { - var hasProperty = arrObj.hasOwnProperty("1"); - var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); - - var verifyGet = arrObj[1] === getFunc(); - - var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; - - var verifyEnumerable = false; - for (var p in arrObj) { - if (p === "1") { - verifyEnumerable = true - } - } - - var verifyConfigurable = false; - delete arrObj[1]; - verifyConfigurable = arrObj.hasOwnProperty("1"); - - return e instanceof TypeError && hasProperty && verifyGet && - verifySet && !verifyEnumerable && verifyConfigurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-255 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Get]] field of 'desc' is + present, and the [[Get]] field of 'desc' and the [[Get]] attribute + value of 'name' are two objects which refer to the different + objects (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + function getFunc() { + return 12; + } + Object.defineProperty(arrObj, "1", { + get: getFunc + }); + + try { + Object.defineProperty(arrObj, "1", { + get: function () { + return 14; + } + }); + + return false; + } catch (e) { + var hasProperty = arrObj.hasOwnProperty("1"); + var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); + + var verifyGet = arrObj[1] === getFunc(); + + var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; + + var verifyEnumerable = false; + for (var p in arrObj) { + if (p === "1") { + verifyEnumerable = true + } + } + + var verifyConfigurable = false; + delete arrObj[1]; + verifyConfigurable = arrObj.hasOwnProperty("1"); + + return e instanceof TypeError && hasProperty && verifyGet && + verifySet && !verifyEnumerable && verifyConfigurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js index caa7c1142f..e0d4800010 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js @@ -1,50 +1,57 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' is an object and the [[Get]] attribute value of 'name' is undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - function getFunc() { - return 12; - } - - Object.defineProperty(arrObj, "1", { - get: getFunc - }); - - try { - Object.defineProperty(arrObj, "1", { - get: undefined - }); - return false; - } catch (e) { - var hasProperty = arrObj.hasOwnProperty("1"); - var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); - - var verifyGet = arrObj[1] === getFunc(); - - var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; - - var verifyEnumerable = false; - for (var p in arrObj) { - if (p === "1") { - verifyEnumerable = true - } - } - - var verifyConfigurable = false; - delete arrObj[1]; - verifyConfigurable = arrObj.hasOwnProperty("1"); - - return e instanceof TypeError && hasProperty && verifyGet && - verifySet && !verifyEnumerable && verifyConfigurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-256 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is thrown if the [[Get]] field of 'desc' is + present, and the [[Get]] field of 'desc' is an object and the + [[Get]] attribute value of 'name' is undefined (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + function getFunc() { + return 12; + } + + Object.defineProperty(arrObj, "1", { + get: getFunc + }); + + try { + Object.defineProperty(arrObj, "1", { + get: undefined + }); + return false; + } catch (e) { + var hasProperty = arrObj.hasOwnProperty("1"); + var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); + + var verifyGet = arrObj[1] === getFunc(); + + var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined"; + + var verifyEnumerable = false; + for (var p in arrObj) { + if (p === "1") { + verifyEnumerable = true + } + } + + var verifyConfigurable = false; + delete arrObj[1]; + verifyConfigurable = arrObj.hasOwnProperty("1"); + + return e instanceof TypeError && hasProperty && verifyGet && + verifySet && !verifyEnumerable && verifyConfigurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js index 430f392036..9da91a48e6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js @@ -1,34 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arrObj = []; - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "1", { - get: undefined, - set: setFunc, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "1", { - get: undefined - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-257 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, 'name' is accessor property and 'desc' is accessor + descriptor, and the [[Configurable]] attribute value of 'name' is + false, test TypeError is not thrown if the [[Get]] field of 'desc' + is present, and the [[Get]] field of 'desc' and the [[Get]] + attribute value of 'name' are undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "1", { + get: undefined, + set: setFunc, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "1", { + get: undefined + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js index 7de8e96d4e..d7b90d21ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js @@ -1,21 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [100]; - - Object.defineProperty(arrObj, "0", { - value: 200 - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 200, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-258 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test updating the [[Value]] attribute value of 'name' + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [100]; + + Object.defineProperty(arrObj, "0", { + value: 200 + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 200, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js index 49e0c9f0c3..9db0995084 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js @@ -1,21 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'name' as undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [100]; - - Object.defineProperty(arrObj, "0", { - value: undefined - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-259 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test setting the [[Value]] attribute value of 'name' + as undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [100]; + + Object.defineProperty(arrObj, "0", { + value: undefined + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js index 24df075824..69c34cbec1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js - * @description Object.defineProperty - 'name' is own accessor property (8.12.9 step 1) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - get: function () { - return 11; - }, - configurable: false - }); - - try { - Object.defineProperty(obj, "property", { - get: function () { - return 12; - }, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && obj.property === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-26 +description: > + Object.defineProperty - 'name' is own accessor property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + get: function () { + return 11; + }, + configurable: false + }); + + try { + Object.defineProperty(obj, "property", { + get: function () { + return 12; + }, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && obj.property === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js index 10bad6fbb0..7feaa01ce2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'name' from undefined to number (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [undefined]; - Object.defineProperty(arrObj, "0", { - value: 100 - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-260 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test setting the [[Value]] attribute value of 'name' + from undefined to number (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [undefined]; + Object.defineProperty(arrObj, "0", { + value: 100 + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js index dd2b6bee38..6fad4c8b26 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js @@ -1,20 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Writable]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [100]; - Object.defineProperty(arrObj, "0", { - writable: false - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-261 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test updating the [[Writable]] attribute value of + 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [100]; + Object.defineProperty(arrObj, "0", { + writable: false + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js index 7802175d8c..5eef4c6b07 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js @@ -1,21 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [100]; - - Object.defineProperty(arrObj, "0", { - enumerable: false - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-262 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test updating the [[Enumerable]] attribute value of + 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [100]; + + Object.defineProperty(arrObj, "0", { + enumerable: false + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js index 074e2d50ca..fd5644efec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js @@ -1,21 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Configurable]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [100]; - - Object.defineProperty(arrObj, "0", { - configurable: false - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-263 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test updating the [[Configurable]] attribute value of + 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [100]; + + Object.defineProperty(arrObj, "0", { + configurable: false + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js index a6ecf82d61..fab104a503 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js @@ -1,22 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = [100]; - Object.defineProperty(arrObj, "0", { - writable: false, - enumerable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-264 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is data property and 'desc' is data + descriptor, test updating multiple attribute values of 'name' + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = [100]; + Object.defineProperty(arrObj, "0", { + writable: false, + enumerable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js index 7da778fbfb..bcdcef9655 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 100; - } - Object.defineProperty(arrObj, "0", { - get: function () { - return 12; - }, - configurable: true - }); - Object.defineProperty(arrObj, "0", { - get: getFunc - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-265 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating the [[Get]] attribute value of 'name' + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 100; + } + Object.defineProperty(arrObj, "0", { + get: function () { + return 12; + }, + configurable: true + }); + Object.defineProperty(arrObj, "0", { + get: getFunc + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js index 1c6d520194..4102d77f37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test setting the [[Get]] attribute value of 'name' as undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - function getFunc() { - return 12; - } - - Object.defineProperty(arrObj, "0", { - get: getFunc, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - get: undefined - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-266 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test setting the [[Get]] attribute value of 'name' as + undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + function getFunc() { + return 12; + } + + Object.defineProperty(arrObj, "0", { + get: getFunc, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + get: undefined + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js index 1ecd7a8678..2c8a50323d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'name' from undefined to function object (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 12; - } - Object.defineProperty(arrObj, "0", { - get: undefined, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - get: getFunc - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-267 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating the [[Get]] attribute value of 'name' + from undefined to function object (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 12; + } + Object.defineProperty(arrObj, "0", { + get: undefined, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + get: getFunc + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js index 78ce446add..251838b551 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "0", { - set: function () { }, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - set: setFunc - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-268 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating the [[Set]] attribute value of 'name' + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "0", { + set: function () { }, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + set: setFunc + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js index 5dab710c29..988ddeb480 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test setting the [[Set]] attribute value of 'name' as undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "0", { - set: function () { }, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - set: undefined - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-269 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test setting the [[Set]] attribute value of 'name' as + undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "0", { + set: function () { }, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + set: undefined + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js index b3fcd69f84..6628efd592 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js - * @description Object.defineProperty - 'name' is an inherited accessor property (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "property", { - get: function () { - return 11; - }, - configurable: false - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - - Object.defineProperty(obj, "property", { - get: function () { - return 12; - }, - configurable: true - }); - return obj.hasOwnProperty("property") && obj.property === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-27 +description: > + Object.defineProperty - 'name' is an inherited accessor property + (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "property", { + get: function () { + return 11; + }, + configurable: false + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + + Object.defineProperty(obj, "property", { + get: function () { + return 12; + }, + configurable: true + }); + return obj.hasOwnProperty("property") && obj.property === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js index 2686a28625..7d1d3a42bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'name' from undefined to function object (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "0", { - set: undefined, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - set: setFunc - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-270 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating the [[Set]] attribute value of 'name' + from undefined to function object (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "0", { + set: undefined, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + set: setFunc + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js index becd87c1ae..82fab3164d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "0", { - set: setFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - enumerable: false - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-271 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating the [[Enumerable]] attribute value of + 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "0", { + set: setFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + enumerable: false + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js index 21a63aafaf..e0a35ebd0d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Configurable]] attribute value of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "0", { - set: setFunc, - configurable: true - }); - - Object.defineProperty(arrObj, "0", { - configurable: false - }); - return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-272 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating the [[Configurable]] attribute value of + 'name' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "0", { + set: setFunc, + configurable: true + }); + + Object.defineProperty(arrObj, "0", { + configurable: false + }); + return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js index 6839d8a221..b79561e2c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - function getFunc() { - return 12; - } - Object.defineProperty(arrObj, "1", { - get: function () { - return 6; - }, - set: setFunc, - enumerable: true, - configurable: true - }); - - Object.defineProperty(arrObj, "1", { - get: getFunc, - enumerable: false, - configurable: false - }); - return accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-273 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, name is accessor property and 'desc' is accessor + descriptor, test updating multiple attribute values of 'name' + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + function getFunc() { + return 12; + } + Object.defineProperty(arrObj, "1", { + get: function () { + return 6; + }, + set: setFunc, + enumerable: true, + configurable: true + }); + + Object.defineProperty(arrObj, "1", { + get: getFunc, + enumerable: false, + configurable: false + }); + return accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js index f16bb321b2..7399114f92 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is not changed if ToUint32('name') is less than value of the length property in 'O' (15.4.5.1 step 4.e) - */ - - -function testcase() { - - var arrObj = []; - arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false - - Object.defineProperty(arrObj, "1", { - value: 14 - }); - - return arrObj.length === 3 && arrObj[1] === 14; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-274 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, test the length property of 'O' is not changed if + ToUint32('name') is less than value of the length property in 'O' + (15.4.5.1 step 4.e) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false + + Object.defineProperty(arrObj, "1", { + value: 14 + }); + + return arrObj.length === 3 && arrObj[1] === 14; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js index 705e20f7d1..31106b7825 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is set as ToUint32('name') + 1 if ToUint32('name') equals to value of the length property in 'O' (15.4.5.1 step 4.e.ii) - */ - - -function testcase() { - - var arrObj = []; - arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false - - Object.defineProperty(arrObj, "3", { - value: 3 - }); - - return arrObj.length === 4 && arrObj[3] === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-275 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, test the length property of 'O' is set as + ToUint32('name') + 1 if ToUint32('name') equals to value of the + length property in 'O' (15.4.5.1 step 4.e.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false + + Object.defineProperty(arrObj, "3", { + value: 3 + }); + + return arrObj.length === 4 && arrObj[3] === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js index 9f7eabc024..319d7244e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js - * @description Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is set as ToUint32('name') + 1 if ToUint32('name') is greater than value of the length property in 'O' (15.4.5.1 step 4.e.ii) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "5", { - value: 3 - }); - - return arrObj.length === 6 && arrObj[5] === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-276 +description: > + Object.defineProperty - 'O' is an Array, 'name' is an array index + named property, test the length property of 'O' is set as + ToUint32('name') + 1 if ToUint32('name') is greater than value of + the length property in 'O' (15.4.5.1 step 4.e.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "5", { + value: 3 + }); + + return arrObj.length === 6 && arrObj[5] === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js index 77e6fcd321..cde4ef3798 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js @@ -1,25 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic property that won't exist on 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "property", { - value: 12, - writable: true, - enumerable: true, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(arrObj, "property", 12, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-277 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic + property that won't exist on 'O', and 'desc' is data descriptor, + test 'name' is defined in 'O' with all correct attribute values + (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "property", { + value: 12, + writable: true, + enumerable: true, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(arrObj, "property", 12, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js index 439838dbf3..832fbcb053 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js - * @description Object.defineProperty - 'name' is generic property that won't exist on 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 12; - } - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - - Object.defineProperty(arrObj, "property", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-278 +description: > + Object.defineProperty - 'name' is generic property that won't + exist on 'O', and 'desc' is accessor descriptor, test 'name' is + defined in 'O' with all correct attribute values (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 12; + } + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + + Object.defineProperty(arrObj, "property", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js index 12d1737256..dc0f32a82c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js @@ -1,38 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 12; - } - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "property", { - get: function () { - return 24; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(arrObj, "property", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-279 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + accessor property of 'O', and 'desc' is accessor descriptor, test + updating multiple attribute values of 'name' (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 12; + } + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "property", { + get: function () { + return 24; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(arrObj, "property", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js index ed637d7509..aa439eda4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js - * @description Object.defineProperty - 'name' is own accessor property that overrides an inherited data property (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - value: 11, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - Object.defineProperty(obj, "foo", { - get: function () { }, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-28 +description: > + Object.defineProperty - 'name' is own accessor property that + overrides an inherited data property (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + value: 11, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + Object.defineProperty(obj, "foo", { + get: function () { }, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js index 7efb40e5c3..b27fcf84a3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - arrObj.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(arrObj, "property", { - writable: false, - enumerable: false, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-280 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + data property of 'O', and 'desc' is data descriptor, test updating + multiple attribute values of 'name' (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + arrObj.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(arrObj, "property", { + writable: false, + enumerable: false, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js index 86a44cd23f..665ee2b403 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "property", { - value: 12 - }); - try { - Object.defineProperty(arrObj, "property", { - value: 36 - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-281 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + data property of 'O', test TypeError is thrown when updating the + [[Value]] attribute value of 'name' which is defined as + non-writable and non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "property", { + value: 12 + }); + try { + Object.defineProperty(arrObj, "property", { + value: 36 + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js index c8f30edf62..1e965821a6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "property", { - writable: false - }); - try { - Object.defineProperty(arrObj, "property", { - writable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", undefined, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-282 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + data property of 'O', test TypeError is thrown when updating the + [[Writable]] attribute value of 'name' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "property", { + writable: false + }); + try { + Object.defineProperty(arrObj, "property", { + writable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", undefined, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js index 2bd4e2f5ef..bc6ae00696 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "property", { - value: 12, - enumerable: false - }); - try { - Object.defineProperty(arrObj, "property", { - enumerable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-283 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + data property of 'O', test TypeError is thrown when updating the + [[Enumerable]] attribute value of 'name' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "property", { + value: 12, + enumerable: false + }); + try { + Object.defineProperty(arrObj, "property", { + enumerable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js index 3c36062ab8..a59e053610 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - Object.defineProperty(arrObj, "property", { - value: 12 - }); - try { - Object.defineProperty(arrObj, "property", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-284 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + data property of 'O', test TypeError is thrown when updating the + [[Configurable]] attribute value of 'name' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + Object.defineProperty(arrObj, "property", { + value: 12 + }); + try { + Object.defineProperty(arrObj, "property", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js index b803f4b361..35bb914e35 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js @@ -1,37 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - function getFunc() { - return 12; - } - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "property", { - get: getFunc, - set: setFunc - }); - try { - Object.defineProperty(arrObj, "property", { - get: function () { - return 36; - } - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-285 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Get]] attribute value of 'name' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function getFunc() { + return 12; + } + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "property", { + get: getFunc, + set: setFunc + }); + try { + Object.defineProperty(arrObj, "property", { + get: function () { + return 36; + } + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js index c1946b5df7..05930b970e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test TypeError is thrown when updating the [[Set]] attribute value of 'name' (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "property", { - set: setFunc - }); - try { - Object.defineProperty(arrObj, "property", { - set: function () {} - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-286 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + accessor property of 'O', and 'desc' is accessor descriptor, test + TypeError is thrown when updating the [[Set]] attribute value of + 'name' (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "property", { + set: setFunc + }); + try { + Object.defineProperty(arrObj, "property", { + set: function () {} + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js index cb022e6b95..a2e2cb8a76 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "property", { - set: setFunc, - enumerable: false - }); - try { - Object.defineProperty(arrObj, "property", { - enumerable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-287 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'name' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "property", { + set: setFunc, + enumerable: false + }); + try { + Object.defineProperty(arrObj, "property", { + enumerable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js index 1194ff32a7..77a5fc240f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js - * @description Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arrObj = []; - - function setFunc(value) { - arrObj.setVerifyHelpProp = value; - } - Object.defineProperty(arrObj, "property", { - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arrObj, "property", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-288 +description: > + Object.defineProperty - 'O' is an Array, 'name' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'name' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arrObj = []; + + function setFunc(value) { + arrObj.setVerifyHelpProp = value; + } + Object.defineProperty(arrObj, "property", { + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arrObj, "property", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js index dca8d24d21..07b2729e38 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js @@ -1,25 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property which is defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - delete arguments[0]; - Object.defineProperty(arguments, "0", { - value: 10, - writable: true, - enumerable: true, - configurable: true - }); - var verifyFormal = a === 0; - return dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-289-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own property which is + defined in both [[ParameterMap]] of 'O' and 'O', and is deleted + afterwards, and 'desc' is data descriptor, test 'name' is + redefined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + delete arguments[0]; + Object.defineProperty(arguments, "0", { + value: 10, + writable: true, + enumerable: true, + configurable: true + }); + var verifyFormal = a === 0; + return dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js index dd725721d0..997f3ef565 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own property of 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - delete arguments[0]; - Object.defineProperty(arguments, "0", { - value: 10, - writable: true, - enumerable: true, - configurable: true - }); - return dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-289 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + property of 'O', and is deleted afterwards, and 'desc' is data + descriptor, test 'name' is redefined in 'O' with all correct + attribute values (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + delete arguments[0]; + Object.defineProperty(arguments, "0", { + value: 10, + writable: true, + enumerable: true, + configurable: true + }); + return dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js index 6984de9478..ce4fdb0e14 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js - * @description Object.defineProperty - 'name' is own accessor property that overrides an inherited accessor property (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - get: function () { }, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - Object.defineProperty(obj, "foo", { - get: function () { }, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-29 +description: > + Object.defineProperty - 'name' is own accessor property that + overrides an inherited accessor property (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + get: function () { }, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + Object.defineProperty(obj, "foo", { + get: function () { }, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js index f321f3d930..e76e4ae239 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property which is defined in both [[ParameterMap]] of 'O' and 'O', is deleted afterwards, and 'desc' is accessor descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - delete arguments[0]; - function getFunc() { - return 10; - } - function setFunc(value) { - this.setVerifyHelpProp = value; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var verifyFormal = a === 0; - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", true, true) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-290-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own property which is + defined in both [[ParameterMap]] of 'O' and 'O', is deleted + afterwards, and 'desc' is accessor descriptor, test 'name' is + redefined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + delete arguments[0]; + function getFunc() { + return 10; + } + function setFunc(value) { + this.setVerifyHelpProp = value; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var verifyFormal = a === 0; + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", true, true) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js index ba56a742d2..0736bdf066 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own property of 'O', and is deleted afterwards, and 'desc' is accessor descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - delete arguments[0]; - function getFunc() { - return 10; - } - function setFunc(value) { - this.setVerifyHelpProp = value; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", true, true); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-290 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + property of 'O', and is deleted afterwards, and 'desc' is accessor + descriptor, test 'name' is redefined in 'O' with all correct + attribute values (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + delete arguments[0]; + function getFunc() { + return 10; + } + function setFunc(value) { + this.setVerifyHelpProp = value; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", true, true); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js index 581be432f4..cc4ca10128 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js @@ -1,34 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.a.i) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc1() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc1, - enumerable: true, - configurable: true - }); - function getFunc2() { - return 20; - } - Object.defineProperty(arguments, "0", { - get: getFunc2, - enumerable: false, - configurable: false - }); - var verifyFormal = a === 0; - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-291-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own accessor property of 'O' + which is also defined in [[ParameterMap]] of 'O', and 'desc' is + accessor descriptor, test updating multiple attribute values of + 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.a.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc1() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc1, + enumerable: true, + configurable: true + }); + function getFunc2() { + return 20; + } + Object.defineProperty(arguments, "0", { + get: getFunc2, + enumerable: false, + configurable: false + }); + var verifyFormal = a === 0; + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js index 54623731e5..d156266093 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - function getFunc1() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc1, - enumerable: true, - configurable: true - }); - function getFunc2() { - return 20; - } - Object.defineProperty(arguments, "0", { - get: getFunc2, - enumerable: false, - configurable: false - }); - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-291 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + accessor property of 'O', and 'desc' is accessor descriptor, test + updating multiple attribute values of 'name' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc1() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc1, + enumerable: true, + configurable: true + }); + function getFunc2() { + return 20; + } + Object.defineProperty(arguments, "0", { + get: getFunc2, + enumerable: false, + configurable: false + }); + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js index de8a05d213..392578ffd3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js @@ -1,24 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.b) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "0", { - value: 20, - writable: false, - enumerable: false, - configurable: false - }); - var verifyFormal = a === 20; - return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-292-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own property of 'O' which is + also defined in [[ParameterMap]] of 'O', and 'desc' is data + descriptor, test updating multiple attribute values of 'name' + (10.6 [[DefineOwnProperty]] step 3 and 5.b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false + }); + var verifyFormal = a === 20; + return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js index 66154e72c0..64d9d5de94 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js @@ -1,23 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 20, - writable: false, - enumerable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-292 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + data property of 'O', and 'desc' is data descriptor, test updating + multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] + step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js index 35c4e7da20..d7d07da1d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js @@ -1,24 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is not thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 and 5b) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false - }); - Object.defineProperty(arguments, "0", { - value: 20 - }); - return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-293-1 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + data property of 'O', test TypeError is not thrown when updating + the [[Value]] attribute value of 'name' which is defined as + non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 + and 5b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false + }); + Object.defineProperty(arguments, "0", { + value: 20 + }); + return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js index f7e821482e..d4659057b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as unwritable and non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - value: 20 - }); - } catch (e) { - var verifyFormal = a === 10; - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-293-2 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own data property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Value]] attribute value of 'name' + which is defined as unwritable and non-configurable (10.6 + [[DefineOwnProperty]] step 4 and step 5b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + value: 20 + }); + } catch (e) { + var verifyFormal = a === 10; + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js index ace83c39bc..91068d57c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js @@ -1,25 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is not thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 and step 5.b) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - }); - Object.defineProperty(arguments, "0", { - value: 20 - }); - var verifyFormal = a === 10; - return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-293-3 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own data property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is not thrown when updating the [[Value]] attribute value of + 'name' which is defined as non-writable and configurable (10.6 + [[DefineOwnProperty]] step 3 and step 5.b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + }); + Object.defineProperty(arguments, "0", { + value: 20 + }); + var verifyFormal = a === 10; + return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js index 4adaae3511..a24456bad3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and non-configurable (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - value: 20 - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-293 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + data property of 'O', test TypeError is thrown when updating the + [[Value]] attribute value of 'name' which is defined as + non-writable and non-configurable (10.6 [[DefineOwnProperty]] step + 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + value: 20 + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js index 87498685fe..100ec52e12 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and 5b) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - writable: true - }); - } catch (e) { - var verifyFormal = a === 10; - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-294-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own data property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Writable]] attribute value of 'name' + which is defined as non-configurable (10.6 [[DefineOwnProperty]] + step 4 and 5b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + writable: true + }); + } catch (e) { + var verifyFormal = a === 10; + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js index 9cb73fd906..5b82a901a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - writable: true - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-294 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + data property of 'O', test TypeError is thrown when updating the + [[Writable]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + writable: true + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js index 56a7ac89bc..c485e86c6d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - enumerable: false - }); - } catch (e) { - var verifyFormal = a === 10; - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-295-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own data property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Enumerable]] attribute value of + 'name' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4 and step 5b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + enumerable: false + }); + } catch (e) { + var verifyFormal = a === 10; + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js index 8193c4c090..4965a2aa72 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-295 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + data property of 'O', test TypeError is thrown when updating the + [[Enumerable]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js index 69334b52b0..570a234da4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - configurable: true - }); - } catch (e) { - var verifyFormal = a === 10; - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-296-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own data property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Configurable]] attribute value of + 'name' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4 and step 5b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + configurable: true + }); + } catch (e) { + var verifyFormal = a === 10; + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js index 97feb1a3d7..45ee0515fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-296 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + data property of 'O', test TypeError is thrown when updating the + [[Configurable]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js index c68ce67633..d4fe4f15f4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5a) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc1() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc1, - enumerable: false, - configurable: false - }); - function getFunc2() { - return 20; - } - try { - Object.defineProperty(arguments, "0", { - get: getFunc2 - }); - } catch (e) { - var verifyFormal = a === 0; - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-297-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own accessor property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Get]] attribute value of 'name' + which is defined as non-configurable (10.6 [[DefineOwnProperty]] + step 4 and step 5a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc1() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc1, + enumerable: false, + configurable: false + }); + function getFunc2() { + return 20; + } + try { + Object.defineProperty(arguments, "0", { + get: getFunc2 + }); + } catch (e) { + var verifyFormal = a === 0; + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js index ec1d3f519d..6544efa66e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc1() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc1, - enumerable: false, - configurable: false - }); - function getFunc2() { - return 20; - } - try { - Object.defineProperty(arguments, "0", { - get: getFunc2 - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-297 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Get]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc1() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc1, + enumerable: false, + configurable: false + }); + function getFunc2() { + return 20; + } + try { + Object.defineProperty(arguments, "0", { + get: getFunc2 + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js index d862edfe50..6e701c1e23 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js @@ -1,38 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] steps 4 and 5a) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - function setFunc(value) { - this.setVerifyHelpProp = value; - } - try { - Object.defineProperty(arguments, "0", { - set: setFunc - }); - } catch (e) { - var verifyFormal = a === 0; - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-298-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own accessor property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Set]] attribute value of 'name' + which is defined as non-configurable (10.6 [[DefineOwnProperty]] + steps 4 and 5a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + function setFunc(value) { + this.setVerifyHelpProp = value; + } + try { + Object.defineProperty(arguments, "0", { + set: setFunc + }); + } catch (e) { + var verifyFormal = a === 0; + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js index da8cebac25..1e3ac280d7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js @@ -1,36 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - function setFunc(value) { - this.setVerifyHelpProp = value; - } - try { - Object.defineProperty(arguments, "0", { - set: setFunc - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-298 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Set]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + function setFunc(value) { + this.setVerifyHelpProp = value; + } + try { + Object.defineProperty(arguments, "0", { + set: setFunc + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js index 6bda361dc2..38ce1f45b6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js @@ -1,34 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] steps 4 and 5a) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - enumerable: false - }); - } catch (e) { - var verifyFormal = a === 0; - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-299-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own accessor property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Enumerable]] attribute value of + 'name' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] steps 4 and 5a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + enumerable: false + }); + } catch (e) { + var verifyFormal = a === 0; + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js index af8330f6c4..fa0817b65a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-299 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js index f180df9a28..7300c7ea03 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For newly defined accessor properties, attributes - * missing from desc should have values set to the defaults from 8.6.1. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js - * @description Object.defineProperty sets missing attributes to their default values (accessor)(8.12.9 step 4.b.i) - */ - - -function testcase() { - var o = {}; - - var getter = function () { return 1; }; - var desc = { get: getter }; - - Object.defineProperty(o, "foo", desc); - - var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); - - if (typeof(propDesc.get) === "function" && // the getter must be the function that was provided - propDesc.get === getter && - propDesc.enumerable === false && // false by default - propDesc.configurable === false) { // false by default - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For newly defined accessor properties, attributes + missing from desc should have values set to the defaults from 8.6.1. +es5id: 15.2.3.6-4-3 +description: > + Object.defineProperty sets missing attributes to their default + values (accessor)(8.12.9 step 4.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + var getter = function () { return 1; }; + var desc = { get: getter }; + + Object.defineProperty(o, "foo", desc); + + var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); + + if (typeof(propDesc.get) === "function" && // the getter must be the function that was provided + propDesc.get === getter && + propDesc.enumerable === false && // false by default + propDesc.configurable === false) { // false by default + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js index 035fe3470b..c26be3784e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js - * @description Object.defineProperty - 'name' is own accessor property without a get function (8.12.9 step 1) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "foo", { - set: function () { }, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-30 +description: > + Object.defineProperty - 'name' is own accessor property without a + get function (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "foo", { + set: function () { }, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js index 7b6a19ed38..8ad3eae8f9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js @@ -1,34 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5a) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc() { - return 0; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - configurable: true - }); - } catch (e) { - var verifyFormal = a === 0; - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false) && verifyFormal; - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-300-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own accessor property of 'O' + which is also defined in [[ParameterMap]] of 'O', test TypeError + is thrown when updating the [[Configurable]] attribute value of + 'name' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4 and step 5a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc() { + return 0; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + configurable: true + }); + } catch (e) { + var verifyFormal = a === 0; + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false) && verifyFormal; + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js index 8a8c988aeb..c126506f1d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); - } - return false; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-300 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'name' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); + } + return false; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js index 94437edad3..6b1ec784e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js @@ -1,25 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is an index named property of 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - delete arguments[0]; - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - var verifyFormal = a === 0; - return dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-301-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is an index named property of + 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' + with all correct attribute values (10.6 [[DefineOwnProperty]] step + 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + delete arguments[0]; + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + var verifyFormal = a === 0; + return dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js index b8b2c7216b..84af90c001 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js @@ -1,24 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - delete arguments[0]; - Object.defineProperty(arguments, "0", { - value: 10, - writable: false, - enumerable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-301 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + array index named property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is data descriptor, test + 'name' is defined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + delete arguments[0]; + Object.defineProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js index abd315bdb5..f64d1b88bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3 and step 5a) - */ - - -function testcase() { - return (function (a, b, c) { - delete arguments[0]; - function getFunc() { - return 10; - } - function setFunc(value) { - this.setVerifyHelpProp = value; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - var verifyFormal = a === 0; - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false) && verifyFormal; - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-302-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is an index named property of + 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is + accessor descriptor, test 'name' is defined in 'O' with all + correct attribute values (10.6 [[DefineOwnProperty]] step 3 and + step 5a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + delete arguments[0]; + function getFunc() { + return 10; + } + function setFunc(value) { + this.setVerifyHelpProp = value; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + var verifyFormal = a === 0; + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false) && verifyFormal; + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js index c7974f8408..030cbe3dd4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - delete arguments[0]; - function getFunc() { - return 10; - } - function setFunc(value) { - this.setVerifyHelpProp = value; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false); - }(0, 1, 2)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-302 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named property of 'O' but not defined in [[ParameterMap]] of + 'O', and 'desc' is accessor descriptor, test 'name' is defined in + 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] + step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + delete arguments[0]; + function getFunc() { + return 10; + } + function setFunc(value) { + this.setVerifyHelpProp = value; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false); + }(0, 1, 2)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js index 37e9a795b2..4cc9b8b563 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js @@ -1,33 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - function getFunc1() { - return 10; - } - Object.defineProperty(arguments, "0", { - get: getFunc1, - enumerable: true, - configurable: true - }); - function getFunc2() { - return 20; - } - Object.defineProperty(arguments, "0", { - get: getFunc2, - enumerable: false, - configurable: false - }); - return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false); - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-303 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test + updating multiple attribute values of 'name' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc1() { + return 10; + } + Object.defineProperty(arguments, "0", { + get: getFunc1, + enumerable: true, + configurable: true + }); + function getFunc2() { + return 20; + } + Object.defineProperty(arguments, "0", { + get: getFunc2, + enumerable: false, + configurable: false + }); + return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false); + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js index f081c248e5..0af11ce929 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js @@ -1,23 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 20, - writable: false, - enumerable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false); - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-304 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is data descriptor, test + updating multiple attribute values of 'name' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false); + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js index db3bc6a4af..a16f290b5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 0, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(arguments, "0", { - value: 10 - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-305 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Value]] attribute value of 'name' which is not writable and + not configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 0, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(arguments, "0", { + value: 10 + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js index 4ee9f83efe..a9f64c1ddd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 0, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - writable: true - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-306 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Writable]] attribute value of 'name' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + writable: true + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js index 4efa25a10c..933c5503a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 0, - writable: false, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, true, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-307 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'name' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, true, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js index 2c7544b78e..68decc8ec9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "0", { - value: 0, - writable: false, - enumerable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-308 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'name' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js index 457b3b1915..5fda8e75c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js @@ -1,35 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc1() { - return 0; - } - Object.defineProperty(arguments, "0", { - get: getFunc1, - enumerable: false, - configurable: false - }); - function getFunc2() { - return 10; - } - try { - Object.defineProperty(arguments, "0", { - get: getFunc2 - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false); - } - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-309 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Get]] attribute value of 'name' which is not configurable + (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc1() { + return 0; + } + Object.defineProperty(arguments, "0", { + get: getFunc1, + enumerable: false, + configurable: false + }); + function getFunc2() { + return 10; + } + try { + Object.defineProperty(arguments, "0", { + get: getFunc2 + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false); + } + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js index 8b483c4ed8..9dd4fd4ee9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js - * @description Object.defineProperty - 'name' is own accessor property without a get function that overrides an inherited accessor property(8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - get: function () { }, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - Object.defineProperty(obj, "foo", { - set: function () { }, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-31 +description: > + Object.defineProperty - 'name' is own accessor property without a + get function that overrides an inherited accessor property(8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + get: function () { }, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + Object.defineProperty(obj, "foo", { + set: function () { }, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js index bc091eed12..e37e898cfa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js @@ -1,36 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return 0; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - function setFunc(value) { - this.setVerifyHelpProp = value; - } - try { - Object.defineProperty(arguments, "0", { - set: setFunc - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-310 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Set]] attribute value of 'name' which is not configurable + (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return 0; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + function setFunc(value) { + this.setVerifyHelpProp = value; + } + try { + Object.defineProperty(arguments, "0", { + set: setFunc + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js index 996c38d985..2c267d3255 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js @@ -1,32 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return 0; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-311 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'name' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return 0; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js index 783aa11ba4..2ff3706505 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js @@ -1,32 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return 0; - } - Object.defineProperty(arguments, "0", { - get: getFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "0", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); - } - return false; - }()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-312 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is an + index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'name' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return 0; + } + Object.defineProperty(arguments, "0", { + get: getFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "0", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false); + } + return false; + }()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js index 0f5ded557f..94b29a6e35 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js @@ -1,23 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-313-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own property, and 'desc' is + data descriptor, test 'P' is defined in 'O' with all correct + attribute values (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js index 3d7e3a648a..1061ac675d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js @@ -1,23 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is generic property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-313 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is generic + property, and 'desc' is data descriptor, test 'P' is defined in + 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] + step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js index cdfe740d49..11dcfd9a03 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc() { - return "getFunctionString"; - } - function setFunc(value) { - this.testgetFunction = value; - } - Object.defineProperty(arguments, "genericProperty", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", true, true); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-314-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is property, and 'desc' is + accessor descriptor, test 'P' is defined in 'O' with all correct + attribute values (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc() { + return "getFunctionString"; + } + function setFunc(value) { + this.testgetFunction = value; + } + Object.defineProperty(arguments, "genericProperty", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", true, true); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js index 2e908fe8ff..a82c9fe4e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - function getFunc() { - return "getFunctionString"; - } - function setFunc(value) { - this.testgetFunction = value; - } - Object.defineProperty(arguments, "genericProperty", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", true, true); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-314 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is generic + property, and 'desc' is accessor descriptor, test 'P' is defined + in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return "getFunctionString"; + } + function setFunc(value) { + this.testgetFunction = value; + } + Object.defineProperty(arguments, "genericProperty", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", true, true); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js index 0372ead5c8..934c465e40 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js @@ -1,40 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - get: function () { - return 1001; - }, - set: function (value) { - this.testgetFunction1 = value; - }, - enumerable: true, - configurable: true - }); - function getFunc() { - return "getFunctionString"; - } - function setFunc(value) { - this.testgetFunction = value; - } - Object.defineProperty(arguments, "genericProperty", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - var verifyFormal = c === 3; - return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", false, false) && verifyFormal; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-315-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own accessor property of 'O', + and 'desc' is accessor descriptor, test updating multiple + attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + get: function () { + return 1001; + }, + set: function (value) { + this.testgetFunction1 = value; + }, + enumerable: true, + configurable: true + }); + function getFunc() { + return "getFunctionString"; + } + function setFunc(value) { + this.testgetFunction = value; + } + Object.defineProperty(arguments, "genericProperty", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + var verifyFormal = c === 3; + return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", false, false) && verifyFormal; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js index 1111a3dc76..b999c26343 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js @@ -1,39 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - get: function () { - return 1001; - }, - set: function (value) { - this.testgetFunction1 = value; - }, - enumerable: true, - configurable: true - }); - function getFunc() { - return "getFunctionString"; - } - function setFunc(value) { - this.testgetFunction = value; - } - Object.defineProperty(arguments, "genericProperty", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", false, false); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-315 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is generic + own accessor property of 'O', and 'desc' is accessor descriptor, + test updating multiple attribute values of 'P' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + get: function () { + return 1001; + }, + set: function (value) { + this.testgetFunction1 = value; + }, + enumerable: true, + configurable: true + }); + function getFunc() { + return "getFunctionString"; + } + function setFunc(value) { + this.testgetFunction = value; + } + Object.defineProperty(arguments, "genericProperty", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", false, false); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js index ad62808653..4f9b508619 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - Object.defineProperty(arguments, "genericProperty", { - value: 1002, - enumerable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-316-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own data property of 'O', and + 'desc' is data descriptor, test updating multiple attribute values + of 'P' (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + Object.defineProperty(arguments, "genericProperty", { + value: 1002, + enumerable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js index 053bf7ee6b..c12cf363ce 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - Object.defineProperty(arguments, "genericProperty", { - value: 1002, - enumerable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false); - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-316 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is generic + own data property of 'O', and 'desc' is data descriptor, test + updating multiple attribute values of 'P' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + Object.defineProperty(arguments, "genericProperty", { + value: 1002, + enumerable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false); + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js index a3d0f171e8..67f92c9112 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js @@ -1,31 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - value: 1001, - writable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - value: 1002 - }); - } catch (e) { - var verifyFormal = b === 2; - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false) && verifyFormal; - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-317-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own data property of 'O', test + TypeError is thrown when updating the [[Value]] attribute value of + 'P' which is not writable and not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + value: 1001, + writable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + value: 1002 + }); + } catch (e) { + var verifyFormal = b === 2; + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false) && verifyFormal; + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js index 52eba63899..d6932e0c02 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - value: 1001, - writable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - value: 1002 - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-317 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is generic + own data property of 'O', test TypeError is thrown when updating + the [[Value]] attribute value of 'P' which is not writable and not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + value: 1001, + writable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + value: 1002 + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js index 243b44b1d4..27d5c6a7db 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js @@ -1,29 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - writable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - writable: true - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-318-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'name' is own data property of 'O', + test TypeError is thrown when updating the [[Writable]] attribute + value of 'name' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + writable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + writable: true + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js index eecedbf9c2..f1425044d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - writable: false, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - writable: true - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-318 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is + generic own data property of 'O', test TypeError is thrown when + updating the [[Writable]] attribute value of 'name' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + writable: false, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + writable: true + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js index aa227169db..2df5b34ad9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js @@ -1,29 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-319-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own data property of 'O', test + TypeError is thrown when updating the [[Enumerable]] attribute + value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] + step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js index f61da87847..916de45316 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-319 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is own + data property of 'O', test TypeError is thrown when updating the + [[Enumerable]] attribute value of 'P' which is not configurable + (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js index ae44cfbb8c..55b06bace3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js - * @description Object.defineProperty - 'name' is an inherited accessor property without a get function (8.12.9 step 1) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "foo", { - set: function () { }, - configurable: false - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - var obj = new ConstructFun(); - - Object.defineProperty(obj, "foo", { - configurable: true - }); - return obj.hasOwnProperty("foo") && typeof obj.foo === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-32 +description: > + Object.defineProperty - 'name' is an inherited accessor property + without a get function (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "foo", { + set: function () { }, + configurable: false + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + var obj = new ConstructFun(); + + Object.defineProperty(obj, "foo", { + configurable: true + }); + return obj.hasOwnProperty("foo") && typeof obj.foo === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js index dcdfb3dcaf..614468a7cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js @@ -1,28 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - Object.defineProperty(arguments, "genericProperty", { - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-320-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own data property of 'O', test + TypeError is thrown when updating the [[Configurable]] attribute + value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] + step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + Object.defineProperty(arguments, "genericProperty", { + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js index 087e47b5d2..7ad8de9e69 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - Object.defineProperty(arguments, "genericProperty", { - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-320 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is own + data property of 'O', test TypeError is thrown when updating the + [[Configurable]] attribute value of 'P' which is not configurable + (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + Object.defineProperty(arguments, "genericProperty", { + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js index 33dfeb6783..3805e0f288 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - function getFunc() { - return "genericPropertyString"; - } - function setFunc(value) { - this.helpVerifyGet = value; - } - Object.defineProperty(arguments, "genericProperty", { - get: getFunc, - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - get: function () { - return "overideGenericPropertyString"; - } - }); - } catch (e) { - var verifyFormal = a === 1; - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "helpVerifyGet", false, false, false) && verifyFormal; - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-321-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own accessor property of 'O', + test TypeError is thrown when updating the [[Get]] attribute value + of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step + 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function getFunc() { + return "genericPropertyString"; + } + function setFunc(value) { + this.helpVerifyGet = value; + } + Object.defineProperty(arguments, "genericProperty", { + get: getFunc, + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + get: function () { + return "overideGenericPropertyString"; + } + }); + } catch (e) { + var verifyFormal = a === 1; + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "helpVerifyGet", false, false, false) && verifyFormal; + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js index 5e4bb609e9..90a378c1cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function getFunc() { - return "genericPropertyString"; - } - function setFunc(value) { - this.helpVerifyGet = value; - } - Object.defineProperty(arguments, "genericProperty", { - get: getFunc, - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - get: function () { - return "overideGenericPropertyString"; - } - }); - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "helpVerifyGet", false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-321 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Get]] attribute value of 'P' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function getFunc() { + return "genericPropertyString"; + } + function setFunc(value) { + this.helpVerifyGet = value; + } + Object.defineProperty(arguments, "genericProperty", { + get: getFunc, + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + get: function () { + return "overideGenericPropertyString"; + } + }); + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "helpVerifyGet", false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js index e17fb4008a..c62fde7169 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js @@ -1,34 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - function setFunc(value) { - this.genericPropertyString = value; - } - Object.defineProperty(arguments, "genericProperty", { - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - set: function (value) { - this.genericPropertyString1 = value; - } - }); - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-322-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own accessor property of 'O', + test TypeError is thrown when updating the [[Set]] attribute value + of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step + 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function setFunc(value) { + this.genericPropertyString = value; + } + Object.defineProperty(arguments, "genericProperty", { + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + set: function (value) { + this.genericPropertyString1 = value; + } + }); + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js index 61e8254e34..f53eb4ed23 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function setFunc(value) { - this.genericPropertyString = value; - } - Object.defineProperty(arguments, "genericProperty", { - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - set: function (value) { - this.genericPropertyString1 = value; - } - }); - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-322 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Set]] attribute value of 'P' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function setFunc(value) { + this.genericPropertyString = value; + } + Object.defineProperty(arguments, "genericProperty", { + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + set: function (value) { + this.genericPropertyString1 = value; + } + }); + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js index 248c8424db..4f38a72106 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js @@ -1,34 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js - * @description Object.defineProperty - ''O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - function setFunc(value) { - this.genericPropertyString = value; - } - Object.defineProperty(arguments, "genericProperty", { - set: setFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - enumerable: false - }); - } catch (e) { - verifyFormal = c === 3; - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", true, false) && verifyFormal; - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-323-1 +description: > + Object.defineProperty - ''O' is an Arguments object of a function + that has formal parameters, 'P' is own accessor property of 'O', + test TypeError is thrown when updating the [[Enumerable]] + attribute value of 'P' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function setFunc(value) { + this.genericPropertyString = value; + } + Object.defineProperty(arguments, "genericProperty", { + set: setFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + enumerable: false + }); + } catch (e) { + verifyFormal = c === 3; + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", true, false) && verifyFormal; + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js index 4460ba4f48..7b3937b842 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js - * @description Object.defineProperty - ''O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function setFunc(value) { - this.genericPropertyString = value; - } - Object.defineProperty(arguments, "genericProperty", { - set: setFunc, - enumerable: true, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - enumerable: false - }); - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", true, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-323 +description: > + Object.defineProperty - ''O' is an Arguments object, 'P' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function setFunc(value) { + this.genericPropertyString = value; + } + Object.defineProperty(arguments, "genericProperty", { + set: setFunc, + enumerable: true, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + enumerable: false + }); + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", true, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js index 40a2ba3918..12384ea2ac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js @@ -1,32 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js - * @description Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function (a, b, c) { - function setFunc(value) { - this.genericPropertyString = value; - } - Object.defineProperty(arguments, "genericProperty", { - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-324-1 +description: > + Object.defineProperty - 'O' is an Arguments object of a function + that has formal parameters, 'P' is own accessor property of 'O', + test TypeError is thrown when updating the [[Configurable]] + attribute value of 'P' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function (a, b, c) { + function setFunc(value) { + this.genericPropertyString = value; + } + Object.defineProperty(arguments, "genericProperty", { + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js index ace0cc3597..00e2d81dc3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js - * @description Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - return (function () { - function setFunc(value) { - this.genericPropertyString = value; - } - Object.defineProperty(arguments, "genericProperty", { - set: setFunc, - configurable: false - }); - try { - Object.defineProperty(arguments, "genericProperty", { - configurable: true - }); - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); - } - return false; - }(1, 2, 3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-324 +description: > + Object.defineProperty - 'O' is an Arguments object, 'P' is own + accessor property of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + return (function () { + function setFunc(value) { + this.genericPropertyString = value; + } + Object.defineProperty(arguments, "genericProperty", { + set: setFunc, + configurable: false + }); + try { + Object.defineProperty(arguments, "genericProperty", { + configurable: true + }); + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false); + } + return false; + }(1, 2, 3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js index 51903691d9..29eb269d63 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js @@ -1,25 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js - * @description Object.defineProperty - 'O' is an Arguments object which created with function take formal parameters, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i) - */ - - -function testcase() { - var argObj = (function (a, b, c) { return arguments; })(1, 2, 3); - var accessed = false; - - Object.defineProperty(argObj, 0, { - get: function () { - accessed = true; - return 12; - } - }); - - return argObj[0] === 12 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-325-1 +description: > + Object.defineProperty - 'O' is an Arguments object which created + with function take formal parameters, 'name' is own property of + [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is + configurable and 'desc' is accessor descriptor (10.6 + [[DefineOwnProperty]] step 5.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function (a, b, c) { return arguments; })(1, 2, 3); + var accessed = false; + + Object.defineProperty(argObj, 0, { + get: function () { + accessed = true; + return 12; + } + }); + + return argObj[0] === 12 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js index 1344a6de0c..19051ff2bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js - * @description Object.defineProperty - 'O' is an Arguments object, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i) - */ - - -function testcase() { - var argObj = (function () { return arguments; })(1, 2, 3); - var accessed = false; - - Object.defineProperty(argObj, 0, { - get: function () { - accessed = true; - return 12; - } - }); - - return argObj[0] === 12 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-325 +description: > + Object.defineProperty - 'O' is an Arguments object, 'name' is own + property of [[ParameterMap]] of 'O', test 'name' is deleted if + 'name' is configurable and 'desc' is accessor descriptor (10.6 + [[DefineOwnProperty]] step 5.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function () { return arguments; })(1, 2, 3); + var accessed = false; + + Object.defineProperty(argObj, 0, { + get: function () { + accessed = true; + return 12; + } + }); + + return argObj[0] === 12 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js index 58f34d27e5..9e8844a564 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is writable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-326 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + true, [[Configurable]] is true) is writable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js index 9744d363bb..02846c078b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var property in obj) { - if (property === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-327 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + true, [[Configurable]] is true) is enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var property in obj) { + if (property === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js index b35c10923b..f6248ac5fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && !afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-328 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + true, [[Configurable]] is true) is deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && !afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js index 1f69125fc2..fdcd3c343f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js - * @description ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - writable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-329 +description: > + ES5 Attributes - success to update [[Writable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is true, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + writable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js index abf1f33b9a..1f0a634e82 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js - * @description Object.defineProperty - 'O' is a Function object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var fun = function () { }; - - Object.defineProperty(fun, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(fun, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && fun.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-33 +description: > + Object.defineProperty - 'O' is a Function object that uses + Object's [[GetOwnProperty]] method to access the 'name' property + (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fun = function () { }; + + Object.defineProperty(fun, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(fun, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && fun.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js index a39bafb519..d8997ae1d1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js - * @description ES5 Attributes - success to update [[enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - enumerable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-330 +description: > + ES5 Attributes - success to update [[enumerable]] attribute of + data property ([[Writable]] is true, [[Enumerable]] is true, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + enumerable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js index 13e3d120ef..56ffadbdec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-331 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + data property ([[Writable]] is true, [[Enumerable]] is true, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js index 2ad2a0e0a4..b5f1456560 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js - * @description ES5 Attributes - success to update the data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-332 +description: > + ES5 Attributes - success to update the data property ([[Writable]] + is true, [[Enumerable]] is true, [[Configurable]] is true) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-1.js index 536e5ffade..3e91e0e6a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-1.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-1.js - * @description Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Object object (8.12.9 - step 10) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - writable: true, - configurable: false - }); - - Object.defineProperty(obj, "property", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-1 +description: > + Object.defineProperty will update [[Value]] attribute of named + property 'P' successfully when [[Configurable]] attribute is + false, [[Writable]] attribute is true and 'O' is an Object object + (8.12.9 - step 10) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + writable: true, + configurable: false + }); + + Object.defineProperty(obj, "property", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js index 22dd9bb401..c6a0187ec7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js - * @description ES5 Attributes - indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "0", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var verifyValue = (obj[0] === 2010); - obj[0] = 1001; - - return verifyValue && obj[0] === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-10 +description: > + ES5 Attributes - indexed data property 'P' with attributes + [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false + is writable using simple assignment, 'O' is an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "0", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var verifyValue = (obj[0] === 2010); + obj[0] = 1001; + + return verifyValue && obj[0] === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-11.js index b06989f7e7..37f217f738 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-11.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-11.js - * @description ES5 Attributes - indexed property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function (x) { - return arguments; - }(1001)); - - Object.defineProperty(obj, "0", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var verifyValue = (obj[0] === 2010); - - return verifyValue; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-11 +description: > + ES5 Attributes - indexed property 'P' with attributes + [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false + is writable using simple assignment, 'O' is an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function (x) { + return arguments; + }(1001)); + + Object.defineProperty(obj, "0", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var verifyValue = (obj[0] === 2010); + + return verifyValue; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-2.js index 516b2b075f..12981e7979 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-2.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-2.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'A' is an Array object (8.12.9 - step 10) - */ - - -function testcase() { - - var obj = []; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - configurable: false - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-2 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property 'P' successfully when [[Configurable]] attribute is + false, [[Writable]] attribute is true and 'A' is an Array object + (8.12.9 - step 10) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = []; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + configurable: false + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-3.js index 333904687c..140ddcb5e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-3.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-3.js - * @description Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Arguments object (8.12.9 - step 10) - */ - - -function testcase() { - - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "property", { - value: 1001, - writable: true, - configurable: false - }); - - Object.defineProperty(obj, "property", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-3 +description: > + Object.defineProperty will update [[Value]] attribute of named + property 'P' successfully when [[Configurable]] attribute is + false, [[Writable]] attribute is true and 'O' is an Arguments + object (8.12.9 - step 10) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "property", { + value: 1001, + writable: true, + configurable: false + }); + + Object.defineProperty(obj, "property", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-4.js index 636de4017c..ee97ff9f8e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-4.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-4.js - * @description Indexed property 'P' with attributes [[Writable]]: true, [[Enumerable]]:true, [[Configurable]]:false is writable using simple assignment, 'A' is an Array Object - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "0", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var verifyValue = (obj[0] === 2010); - obj[0] = 1001; - - return verifyValue && obj[0] === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-4 +description: > + Indexed property 'P' with attributes [[Writable]]: true, + [[Enumerable]]:true, [[Configurable]]:false is writable using + simple assignment, 'A' is an Array Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "0", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var verifyValue = (obj[0] === 2010); + obj[0] = 1001; + + return verifyValue && obj[0] === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js index 6423d07b25..5a0f4ccb59 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js - * @description ES5 Attributes - named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var verifyValue = (obj.prop === 2010); - obj.prop = 1001; - - return verifyValue && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-5 +description: > + ES5 Attributes - named data property 'P' with attributes + [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false + is writable using simple assignment, 'O' is an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var verifyValue = (obj.prop === 2010); + obj.prop = 1001; + + return verifyValue && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-6.js index 53eb046570..d768025744 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-6.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-6.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Object object (8.12.9 - step 10) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - configurable: false - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-6 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property 'P' successfully when [[Configurable]] attribute is + false, [[Writable]] attribute is true and 'O' is an Object object + (8.12.9 - step 10) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + configurable: false + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-7.js index eb2601b502..4f15006f1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-7.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-7.js - * @description Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'A' is an Array object (8.12.9 - step 10) - */ - - -function testcase() { - - var obj = []; - - Object.defineProperty(obj, "prop", { - value: 1001, - writable: true, - configurable: false - }); - - Object.defineProperty(obj, "prop", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "prop", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-7 +description: > + Object.defineProperty will update [[Value]] attribute of named + property 'P' successfully when [[Configurable]] attribute is + false, [[Writable]] attribute is true and 'A' is an Array object + (8.12.9 - step 10) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = []; + + Object.defineProperty(obj, "prop", { + value: 1001, + writable: true, + configurable: false + }); + + Object.defineProperty(obj, "prop", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "prop", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js index cf0108a0ff..89d18fed0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property 'P'successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Arguments object (8.12.9 - step 10) - */ - - -function testcase() { - - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - configurable: false - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-8 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property 'P'successfully when [[Configurable]] attribute is false, + [[Writable]] attribute is true and 'O' is an Arguments object + (8.12.9 - step 10) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + configurable: false + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js index b75499917b..c1397eaf78 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js - * @description Object.defineProperty - Named property 'P' with attributes [[Writable]]: true, [[Enumerable]]:true, [[Configurable]]:false is writable using simple assignment, 'A' is an Array Object - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var verifyValue = (obj.prop === 2010); - obj.prop = 1001; - - return verifyValue && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333-9 +description: > + Object.defineProperty - Named property 'P' with attributes + [[Writable]]: true, [[Enumerable]]:true, [[Configurable]]:false is + writable using simple assignment, 'A' is an Array Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var verifyValue = (obj.prop === 2010); + obj.prop = 1001; + + return verifyValue && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js index e71c0b5a4d..7f4b2a8ba2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is writable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-333 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + true, [[Configurable]] is false) is writable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js index 8ea03a5475..b63bf105d8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-334 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + true, [[Configurable]] is false) is enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js index a3ce649ff7..435c74aa38 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && obj.prop === 2010 && afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-335 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + true, [[Configurable]] is false) is undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && obj.prop === 2010 && afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js index 3f97068a5a..d17087b16c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js - * @description ES5 Attributes - Success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - writable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-336 +description: > + ES5 Attributes - Success to update [[Writable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is true, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + writable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js index c15047650b..141b8a73b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - enumerable: false - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-337 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is true, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + enumerable: false + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js index 65966ce548..139fcb2541 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-338 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is true, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-1.js index 2b5e0248ed..5f7e72685e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-1.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-1.js - * @description Object.defineProperty - Updating indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'A' is an Array object (8.12.9 - step 9.a) - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "0", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "0", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - return propertyDefineCorrect && desc1.value === 2010 && obj[0] === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-339-1 +description: > + Object.defineProperty - Updating indexed data property 'P' with + attributes [[Writable]]: true, [[Enumerable]]: true, + [[Configurable]]: false to an accessor property does not succeed, + 'A' is an Array object (8.12.9 - step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "0", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "0", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + return propertyDefineCorrect && desc1.value === 2010 && obj[0] === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-2.js index af39eeb953..93c9505010 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-2.js @@ -1,39 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-2.js - * @description Object.defineProperty - Updating named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'O' is an Arguments object (8.12.9 - step 9.a) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-339-2 +description: > + Object.defineProperty - Updating named data property 'P' with + attributes [[Writable]]: true, [[Enumerable]]: true, + [[Configurable]]: false to an accessor property does not succeed, + 'O' is an Arguments object (8.12.9 - step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-3.js index cb69eb5c62..6688b6bffa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-3.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-3.js - * @description Object.defineProperty - Updating named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'A' is an Array object (8.12.9 - step 9.a) - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && - typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-339-3 +description: > + Object.defineProperty - Updating named data property 'P' with + attributes [[Writable]]: true, [[Enumerable]]: true, + [[Configurable]]: false to an accessor property does not succeed, + 'A' is an Array object (8.12.9 - step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && + typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-4.js index e1da377ac4..8e81ff6af2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-4.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-4.js - * @description Object.defineProperty - Updating indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'O' is an Arguments object (8.12.9 - step 9.a) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "0", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "0", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - return propertyDefineCorrect && desc1.value === 2010 && obj[0] === 2010 && - typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-339-4 +description: > + Object.defineProperty - Updating indexed data property 'P' with + attributes [[Writable]]: true, [[Enumerable]]: true, + [[Configurable]]: false to an accessor property does not succeed, + 'O' is an Arguments object (8.12.9 - step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "0", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "0", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + return propertyDefineCorrect && desc1.value === 2010 && obj[0] === 2010 && + typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js index c0ef340450..9d36f53d88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js - * @description ES5 Attributes - fail to update the data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-339 +description: > + ES5 Attributes - fail to update the data property ([[Writable]] is + true, [[Enumerable]] is true, [[Configurable]] is false) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js index f4fadb92d4..d0b3545eae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js - * @description Object.defineProperty - 'O' is an Array object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var arrObj = []; - - Object.defineProperty(arrObj, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(arrObj, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && arrObj.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-34 +description: > + Object.defineProperty - 'O' is an Array object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + Object.defineProperty(arrObj, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(arrObj, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && arrObj.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js index ac7d57c894..8a071c2d9b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is writable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-340 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + false, [[Configurable]] is true) is writable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js index a7445fe7ec..c6f2fdfdab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p in obj) { - if (p === "prop") { - return false; - } - } - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-341 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + false, [[Configurable]] is true) is non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p in obj) { + if (p === "prop") { + return false; + } + } + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js index c2a3301477..e1514ce0b1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && !afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-342 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + false, [[Configurable]] is true) is deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && !afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js index b3225b1d7e..3095e6b321 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js - * @description ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - writable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-343 +description: > + ES5 Attributes - success to update [[Writable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is false, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + writable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js index 47166a2361..d8921e120f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - enumerable: true - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-344 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + data property ([[Writable]] is true, [[Enumerable]] is false, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + enumerable: true + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js index ae7e977df6..20c769f359 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-345 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + data property ([[Writable]] is true, [[Enumerable]] is false, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js index 99f4d21474..a520a5d881 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js - * @description ES5 Attributes - success to update the data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-346 +description: > + ES5 Attributes - success to update the data property ([[Writable]] + is true, [[Enumerable]] is false, [[Configurable]] is true) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js index 8fba4b6aae..a1345d6795 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is writable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-347 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + false, [[Configurable]] is false) is writable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js index aabfe152f2..7572ee5813 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p in obj) { - if (p === "prop") { - return false; - } - } - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-348 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + false, [[Configurable]] is false) is non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p in obj) { + if (p === "prop") { + return false; + } + } + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js index d8371797d1..c2996028cd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js - * @description ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && obj.prop === 2010 && afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-349 +description: > + ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is + false, [[Configurable]] is false) is undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && obj.prop === 2010 && afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js index 03dcaee63d..38fd933069 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js - * @description Object.defineProperty - 'O' is a String object which implements its own [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var str = new String("abc"); - - Object.defineProperty(str, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(str, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && str.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-35 +description: > + Object.defineProperty - 'O' is a String object which implements + its own [[GetOwnProperty]] method to access the 'name' property + (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = new String("abc"); + + Object.defineProperty(str, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(str, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && str.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js index 81ef7f5094..8b91f28d43 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js - * @description ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - writable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-350 +description: > + ES5 Attributes - fail to update [[Writable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is false, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + writable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js index 201db8d9b9..382cfcda9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - enumerable: true - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-351 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is false, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + enumerable: true + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js index 65055f44bb..8445720092 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-352 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of data + property ([[Writable]] is true, [[Enumerable]] is false, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js index cb519c559c..439a296ebd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js - * @description ES5 Attributes - fail to update the data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: true, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-353 +description: > + ES5 Attributes - fail to update the data property ([[Writable]] is + true, [[Enumerable]] is false, [[Configurable]] is false) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: true, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js index 35f0f92b0e..6df341a796 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js - * @description Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Object object (8.12.9 step - Note) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "property", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-1 +description: > + Object.defineProperty will update [[Value]] attribute of named + property 'P' successfully when [[Configurable]] attribute is true + and [[Writable]] attribute is false, 'O' is an Object object + (8.12.9 step - Note) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "property", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js index 7e122baafb..be6c692264 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Object object (8.12.9 step - Note) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-10 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property 'P' successfully when [[Configurable]] attribute is true + and [[Writable]] attribute is false, 'O' is an Object object + (8.12.9 step - Note) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js index d12a2fdadd..d93238f5fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js - * @description Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'A' is an Array object (8.12.9 step - Note) - */ - - -function testcase() { - - var obj = []; - - Object.defineProperty(obj, "prop", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "prop", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "prop", 1002, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-11 +description: > + Object.defineProperty will update [[Value]] attribute of named + property 'P' successfully when [[Configurable]] attribute is true + and [[Writable]] attribute is false, 'A' is an Array object + (8.12.9 step - Note) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = []; + + Object.defineProperty(obj, "prop", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "prop", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "prop", 1002, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js index 59ccc34465..d3f8b3467b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Arguments object (8.12.9 - step Note) - */ - - -function testcase() { - - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "0", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-12 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property successfully when [[Configurable]] attribute is true and + [[Writable]] attribute is false, 'O' is an Arguments object + (8.12.9 - step Note) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "0", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-13.js index ee2857e8e0..3f7aece493 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-13.js @@ -1,32 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-13.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the global object (8.12.9 - step Note) - */ - - -function testcase() { - - var obj = fnGlobalObject(); - - try { - Object.defineProperty(obj, "0", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); - } finally { - delete obj[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-13 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property successfully when [[Configurable]] attribute is true and + [[Writable]] attribute is false, 'O' is the global object (8.12.9 + - step Note) +includes: + - runTestCase.js + - fnGlobalObject.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = fnGlobalObject(); + + try { + Object.defineProperty(obj, "0", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); + } finally { + delete obj[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js index 8282ab37d9..03a93ff7fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js - * @description Object.defineProperty - Named property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'A' is an Array object - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var verifyValue = (obj.prop === 2010); - obj.prop = 1001; - - return verifyValue && obj.prop === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-15 +description: > + Object.defineProperty - Named property 'P' with attributes + [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true + is non-writable using simple assignment, 'A' is an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var verifyValue = (obj.prop === 2010); + obj.prop = 1001; + + return verifyValue && obj.prop === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js index fccecd3f2b..765de208fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js - * @description ES5 Attributes - property 'P' is an indexed data property with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]] : true) is non-writable using simple assignment, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "0", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var valueVerify = (obj[0] === 2010); - obj[0] = 1001; - - return valueVerify && obj[0] === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-16 +description: > + ES5 Attributes - property 'P' is an indexed data property with + attributes [[Writable]]: false, [[Enumerable]]: true, + [[Configurable]] : true) is non-writable using simple assignment, + 'O' is an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "0", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var valueVerify = (obj[0] === 2010); + obj[0] = 1001; + + return valueVerify && obj[0] === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js index 3b0f07a325..3719a1991c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js - * @description Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'A' is an Array object (8.12.9 step - Note) - */ - - -function testcase() { - - var obj = []; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "0", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-2 +description: > + Object.defineProperty will update [[Value]] attribute of indexed + property 'P' successfully when [[Configurable]] attribute is true + and [[Writable]] attribute is false, 'A' is an Array object + (8.12.9 step - Note) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = []; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "0", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js index d58fe51302..f5dfce189a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js - * @description Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Arguments object (8.12.9 - step Note) - */ - - -function testcase() { - - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "property", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "property", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-3 +description: > + Object.defineProperty will update [[Value]] attribute successfully + when [[Configurable]] attribute is true and [[Writable]] attribute + is false, 'O' is an Arguments object (8.12.9 - step Note) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "property", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "property", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js index 0c85c0e3ad..fc5e8d4d4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js - * @description Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the global object (8.12.9 - step Note) - */ - - -function testcase() { - - var obj = fnGlobalObject(); - - try { - Object.defineProperty(obj, "property", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "property", { - value: 1002 - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true); - } finally { - delete obj.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-4 +description: > + Object.defineProperty will update [[Value]] attribute successfully + when [[Configurable]] attribute is true and [[Writable]] attribute + is false, 'O' is the global object (8.12.9 - step Note) +includes: + - runTestCase.js + - fnGlobalObject.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = fnGlobalObject(); + + try { + Object.defineProperty(obj, "property", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "property", { + value: 1002 + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true); + } finally { + delete obj.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js index 5d5d53a26b..21fbcfc95a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js - * @description Object.defineProperty - Indexed property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'A' is an Array object - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "0", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var verifyValue = (obj[0] === 2010); - obj[0] = 1001; - - return verifyValue && obj[0] === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-6 +description: > + Object.defineProperty - Indexed property 'P' with attributes + [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true + is non-writable using simple assignment, 'A' is an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "0", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var verifyValue = (obj[0] === 2010); + obj[0] = 1001; + + return verifyValue && obj[0] === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js index 79bb324dfa..8cfed4fc23 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js - * @description ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]] : true) is non-writable using simple assignment, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var valueVerify = (obj.prop === 2010); - obj.prop = 1001; - - return valueVerify && obj.prop === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-7 +description: > + ES5 Attributes - property 'P' with attributes [[Writable]]: false, + [[Enumerable]]: true, [[Configurable]] : true) is non-writable + using simple assignment, 'O' is an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var valueVerify = (obj.prop === 2010); + obj.prop = 1001; + + return valueVerify && obj.prop === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js index 26b64becd8..8c3d61e92f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js - * @description ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'O' is the global object - */ - - -function testcase() { - var obj = fnGlobalObject(); - try { - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var valueVerify = (obj.prop === 2010); - obj.prop = 1001; - - return valueVerify && obj.prop === 2010; - } finally { - delete obj.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354-8 +description: > + ES5 Attributes - property 'P' with attributes [[Writable]]: false, + [[Enumerable]]: true, [[Configurable]]: true is non-writable using + simple assignment, 'O' is the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + try { + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var valueVerify = (obj.prop === 2010); + obj.prop = 1001; + + return valueVerify && obj.prop === 2010; + } finally { + delete obj.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js index 066b53dda6..928550170b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is unwritable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-354 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is true, [[Configurable]] is true) is unwritable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js index 49651751b3..5c2fc05d1c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var property in obj) { - if (property === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-355 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is true, [[Configurable]] is true) is enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var property in obj) { + if (property === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js index aeab7d0565..a7d1c27ba0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && !afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-356 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is true, [[Configurable]] is true) is deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && !afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js index 314041db04..5570996f9a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js - * @description ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - writable: true - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-357 +description: > + ES5 Attributes - success to update [[Writable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is true, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + writable: true + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js index f9c9476f4a..2c5f6ee0db 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - enumerable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-358 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + data property ([[Writable]] is false, [[Enumerable]] is true, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + enumerable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js index abbeafe1a4..4d0775fc75 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-359 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + data property ([[Writable]] is false, [[Enumerable]] is true, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js index 79e13efc5c..579aff5660 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js - * @description Object.defineProperty - 'O' is a Boolean object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var obj = new Boolean(true); - - Object.defineProperty(obj, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && obj.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-36 +description: > + Object.defineProperty - 'O' is a Boolean object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Boolean(true); + + Object.defineProperty(obj, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && obj.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-1.js index cab503bd1d..048bcb8c7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-1.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-1.js - * @description ES5 Attributes - Updating indexed data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'A' is an Array object (8.12.9 - step 9.b.i) - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "0", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "0", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && - desc2.enumerable === true && desc2.configurable === true && - obj[0] === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360-1 +description: > + ES5 Attributes - Updating indexed data property 'P' whose + attributes are [[Writable]]: false, [[Enumerable]]: true, + [[Configurable]]: true to an accessor property, 'A' is an Array + object (8.12.9 - step 9.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "0", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "0", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && + desc2.enumerable === true && desc2.configurable === true && + obj[0] === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-2.js index b224166b90..e8bd748457 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-2.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-2.js - * @description ES5 Attributes - Updating data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is an Arguments object (8.12.9 - step 9.b.i) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && - desc2.enumerable === true && desc2.configurable === true && - obj.prop === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360-2 +description: > + ES5 Attributes - Updating data property 'P' whose attributes are + [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true + to an accessor property, 'O' is an Arguments object (8.12.9 - step + 9.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && + desc2.enumerable === true && desc2.configurable === true && + obj.prop === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-3.js index f13a84ab71..3077e9c0d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-3.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-3.js - * @description ES5 Attributes - Updating data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is the global object (8.12.9 - step 9.b.i) - */ - - -function testcase() { - var obj = fnGlobalObject(); - try { - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && - desc2.enumerable === true && desc2.configurable === true && - obj.prop === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; - } finally { - delete obj.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360-3 +description: > + ES5 Attributes - Updating data property 'P' whose attributes are + [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true + to an accessor property, 'O' is the global object (8.12.9 - step + 9.b.i) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + try { + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && + desc2.enumerable === true && desc2.configurable === true && + obj.prop === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; + } finally { + delete obj.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-5.js index d471e66815..0f83991465 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-5.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-5.js - * @description ES5 Attributes - Updating named data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'A' is an Array object (8.12.9 - step 9.b.i) - */ - - -function testcase() { - var obj = []; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && - desc2.enumerable === true && desc2.configurable === true && - obj.prop === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360-5 +description: > + ES5 Attributes - Updating named data property 'P' whose attributes + are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: + true to an accessor property, 'A' is an Array object (8.12.9 - + step 9.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && + desc2.enumerable === true && desc2.configurable === true && + obj.prop === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-6.js index d07f80b7c0..577a989597 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-6.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-6.js - * @description ES5 Attributes - Updating indexed data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is an Arguments object (8.12.9 - step 9.b.i) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - Object.defineProperty(obj, "0", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "0", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && - desc2.enumerable === true && desc2.configurable === true && - obj[0] === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360-6 +description: > + ES5 Attributes - Updating indexed data property 'P' whose + attributes are [[Writable]]: false, [[Enumerable]]: true, + [[Configurable]]: true to an accessor property, 'O' is an + Arguments object (8.12.9 - step 9.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + Object.defineProperty(obj, "0", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "0", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && + desc2.enumerable === true && desc2.configurable === true && + obj[0] === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-7.js index f2b2e47c7d..dee88492bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-7.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-7.js - * @description ES5 Attributes - Updating indexed data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is the global object (8.12.9 - step 9.b.i) - */ - - -function testcase() { - var obj = fnGlobalObject(); - try { - Object.defineProperty(obj, "0", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "0", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && - desc2.enumerable === true && desc2.configurable === true && - obj[0] === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; - } finally { - delete obj[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360-7 +description: > + ES5 Attributes - Updating indexed data property 'P' whose + attributes are [[Writable]]: false, [[Enumerable]]: true, + [[Configurable]]: true to an accessor property, 'O' is the global + object (8.12.9 - step 9.b.i) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + try { + Object.defineProperty(obj, "0", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "0", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get") && + desc2.enumerable === true && desc2.configurable === true && + obj[0] === 20 && typeof desc2.set === "undefined" && desc2.get === getFunc; + } finally { + delete obj[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js index 8d9f9d784c..731238d046 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js - * @description ES5 Attributes - success to update the data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-360 +description: > + ES5 Attributes - success to update the data property ([[Writable]] + is false, [[Enumerable]] is true, [[Configurable]] is true) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js index 92aaa0d49c..79ec2298ee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is unwritable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-361 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is true, [[Configurable]] is false) is unwritable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js index 6eac0123ae..7d8c8f1502 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is enumerable - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var property in obj) { - if (property === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-362 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is true, [[Configurable]] is false) is enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var property in obj) { + if (property === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js index d4f049f11f..85d87f129f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && obj.prop === 2010 && afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-363 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is true, [[Configurable]] is false) is undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && obj.prop === 2010 && afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js index f0825b8892..15b82bc3be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js - * @description ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - try { - Object.defineProperty(obj, "prop", { - writable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-364 +description: > + ES5 Attributes - fail to update [[Writable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is true, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + try { + Object.defineProperty(obj, "prop", { + writable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js index 215bbb35cb..1819daad56 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - try { - Object.defineProperty(obj, "prop", { - enumerable: false - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-365 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is true, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + try { + Object.defineProperty(obj, "prop", { + enumerable: false + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js index b873194eaf..94022c0f6b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-366 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is true, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js index 13a5407a97..7c05ae9e28 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js - * @description ES5 Attributes - fail to update the data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: true, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-367 +description: > + ES5 Attributes - fail to update the data property ([[Writable]] is + false, [[Enumerable]] is true, [[Configurable]] is false) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: true, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js index 915d69680f..3b2d1fb08e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is unwritable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-368 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is false, [[Configurable]] is true) is unwritable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js index 908a648057..3c9ce77e96 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p in obj) { - if (p === "prop") { - return false; - } - } - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-369 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is false, [[Configurable]] is true) is non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p in obj) { + if (p === "prop") { + return false; + } + } + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js index ad5dc7e3a7..ba28df25a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js - * @description Object.defineProperty - 'O' is a Number object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var obj = new Number(-2); - - Object.defineProperty(obj, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && obj.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-37 +description: > + Object.defineProperty - 'O' is a Number object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = new Number(-2); + + Object.defineProperty(obj, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && obj.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js index 7a12af5371..33122718c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && !afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-370 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is false, [[Configurable]] is true) is deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && !afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js index dc4cb0939e..990a6e44bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js - * @description ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - writable: true - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-371 +description: > + ES5 Attributes - success to update [[Writable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is false, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + writable: true + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js index a711791fd7..0428495e05 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - enumerable: true - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-372 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + data property ([[Writable]] is false, [[Enumerable]] is false, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + enumerable: true + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js index 8a4345a2e6..4d0b945e49 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-373 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + data property ([[Writable]] is false, [[Enumerable]] is false, + [[Configurable]] is true) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js index 4fb313be2e..428ced7a0e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js - * @description ES5 Attributes - success to update the data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - function getFunc() { - return 20; - } - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("value") && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-374 +description: > + ES5 Attributes - success to update the data property ([[Writable]] + is false, [[Enumerable]] is false, [[Configurable]] is true) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + function getFunc() { + return 20; + } + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("value") && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js index 1fcfd727d1..003d4cdfcf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is unwritable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = (obj.prop === 2010); - obj.prop = 1001; - - return propertyDefineCorrect && obj.prop === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-375 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is false, [[Configurable]] is false) is unwritable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = (obj.prop === 2010); + obj.prop = 1001; + + return propertyDefineCorrect && obj.prop === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js index 82869f60c9..b0212432bc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p in obj) { - if (p === "prop") { - return false; - } - } - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-376 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is false, [[Configurable]] is false) is non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p in obj) { + if (p === "prop") { + return false; + } + } + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js index 1c0687842d..9a08192988 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js - * @description ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var beforeDelete = obj.hasOwnProperty("prop"); - delete obj.prop; - var afterDelete = obj.hasOwnProperty("prop"); - return beforeDelete && obj.prop === 2010 && afterDelete; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-377 +description: > + ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] + is false, [[Configurable]] is false) is undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var beforeDelete = obj.hasOwnProperty("prop"); + delete obj.prop; + var afterDelete = obj.hasOwnProperty("prop"); + return beforeDelete && obj.prop === 2010 && afterDelete; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js index 17f98a01ab..747eaca732 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js - * @description ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - writable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-378 +description: > + ES5 Attributes - fail to update [[Writable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is false, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + writable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js index 0a70a8b9fb..3e13a1cfd2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - try { - Object.defineProperty(obj, "prop", { - enumerable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-379 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is false, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + try { + Object.defineProperty(obj, "prop", { + enumerable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js index 7cb361fbd6..ed21f85422 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js @@ -1,24 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js - * @description Object.defineProperty - 'O' is the Math object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - try { - Object.defineProperty(Math, "foo", { - value: 12, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(Math, "foo", 12, false, false, true); - } finally { - delete Math.foo; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-38 +description: > + Object.defineProperty - 'O' is the Math object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + try { + Object.defineProperty(Math, "foo", { + value: 12, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(Math, "foo", 12, false, false, true); + } finally { + delete Math.foo; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js index 07835493b1..96b15decb2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-380 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of data + property ([[Writable]] is false, [[Enumerable]] is false, + [[Configurable]] is false) to different value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js index 70b476f956..d6f865f017 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js - * @description ES5 Attributes - fail to update the data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to an accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 2010, - writable: false, - enumerable: false, - configurable: false - }); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - function getFunc() { - return 20; - } - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-381 +description: > + ES5 Attributes - fail to update the data property ([[Writable]] is + false, [[Enumerable]] is false, [[Configurable]] is false) to an + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 2010, + writable: false, + enumerable: false, + configurable: false + }); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + function getFunc() { + return 20; + } + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js index 8952dff6e0..0838cbb57d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js - * @description ES5 Attributes - [[Value]] attribute of data property is a number - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === 1001 && desc.value === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-382 +description: ES5 Attributes - [[Value]] attribute of data property is a number +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === 1001 && desc.value === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js index 5df8b370c0..9d8536283d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js - * @description ES5 Attributes - [[Value]] attribute of data property is a string - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: "ThisIsAString" - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === "ThisIsAString" && desc.value === "ThisIsAString"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-383 +description: ES5 Attributes - [[Value]] attribute of data property is a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: "ThisIsAString" + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === "ThisIsAString" && desc.value === "ThisIsAString"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js index d74669eb4c..b196bb1246 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js - * @description ES5 Attributes - [[Value]] attribute of data property is a boolean - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: false - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === false && desc.value === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-384 +description: ES5 Attributes - [[Value]] attribute of data property is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: false + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === false && desc.value === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js index 806d331b72..1445d46f4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js - * @description ES5 Attributes - [[Value]] attribute of data property is a generic object - */ - - -function testcase() { - var obj = {}; - var tempObj = { testproperty: 100 }; - - Object.defineProperty(obj, "prop", { - value: tempObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === tempObj && desc.value === tempObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-385 +description: > + ES5 Attributes - [[Value]] attribute of data property is a generic + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var tempObj = { testproperty: 100 }; + + Object.defineProperty(obj, "prop", { + value: tempObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === tempObj && desc.value === tempObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js index 5c096afc34..aed8b6f48e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js - * @description ES5 Attributes - [[Value]] attribute of data property is an Array object - */ - - -function testcase() { - var obj = {}; - var arrObj = []; - - Object.defineProperty(obj, "prop", { - value: arrObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === arrObj && desc.value === arrObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-386 +description: > + ES5 Attributes - [[Value]] attribute of data property is an Array + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var arrObj = []; + + Object.defineProperty(obj, "prop", { + value: arrObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === arrObj && desc.value === arrObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js index cb084446cf..6a397026d0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js - * @description ES5 Attributes - [[Value]] attribute of data property is a String object - */ - - -function testcase() { - var obj = {}; - var strObj = new String(); - - Object.defineProperty(obj, "prop", { - value: strObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === strObj && desc.value === strObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-387 +description: > + ES5 Attributes - [[Value]] attribute of data property is a String + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var strObj = new String(); + + Object.defineProperty(obj, "prop", { + value: strObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === strObj && desc.value === strObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js index 411f928575..788c93ce5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js - * @description ES5 Attributes - [[Value]] attribute of data property is a Number object - */ - - -function testcase() { - var obj = {}; - var numObj = new Number(); - - Object.defineProperty(obj, "prop", { - value: numObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === numObj && desc.value === numObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-388 +description: > + ES5 Attributes - [[Value]] attribute of data property is a Number + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var numObj = new Number(); + + Object.defineProperty(obj, "prop", { + value: numObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === numObj && desc.value === numObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js index d80d3c389e..b066e1b47f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js - * @description ES5 Attributes - [[Value]] attribute of data property is a Boolean Object - */ - - -function testcase() { - var obj = {}; - var boolObj = new Boolean(); - - Object.defineProperty(obj, "prop", { - value: boolObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === boolObj && desc.value === boolObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-389 +description: > + ES5 Attributes - [[Value]] attribute of data property is a Boolean + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var boolObj = new Boolean(); + + Object.defineProperty(obj, "prop", { + value: boolObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === boolObj && desc.value === boolObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js index 5f2042f090..4468b9da3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js - * @description Object.defineProperty - 'O' is a Date object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var desc = new Date(); - - Object.defineProperty(desc, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(desc, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && desc.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-39 +description: > + Object.defineProperty - 'O' is a Date object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = new Date(); + + Object.defineProperty(desc, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(desc, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && desc.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js index 8b2e01a407..64e26f0752 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js - * @description ES5 Attributes - [[Value]] attribute of data property is a Function object - */ - - -function testcase() { - var obj = {}; - var funObj = function () { }; - - Object.defineProperty(obj, "prop", { - value: funObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === funObj && desc.value === funObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-390 +description: > + ES5 Attributes - [[Value]] attribute of data property is a + Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var funObj = function () { }; + + Object.defineProperty(obj, "prop", { + value: funObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === funObj && desc.value === funObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js index 1500ba0746..44947b38ec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js - * @description ES5 Attributes - [[Value]] attribute of data property is an Error object - */ - - -function testcase() { - var obj = {}; - var errObj = new Error(); - - Object.defineProperty(obj, "prop", { - value: errObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === errObj && desc.value === errObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-391 +description: > + ES5 Attributes - [[Value]] attribute of data property is an Error + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var errObj = new Error(); + + Object.defineProperty(obj, "prop", { + value: errObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === errObj && desc.value === errObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js index f0c90c3f5e..ce1909bf6e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js - * @description ES5 Attributes - [[Value]] attribute of data property is a Date object - */ - - -function testcase() { - var obj = {}; - var dateObj = new Date(); - - Object.defineProperty(obj, "prop", { - value: dateObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === dateObj && desc.value === dateObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-392 +description: > + ES5 Attributes - [[Value]] attribute of data property is a Date + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var dateObj = new Date(); + + Object.defineProperty(obj, "prop", { + value: dateObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === dateObj && desc.value === dateObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js index 0d0ef208d7..2edd5dcc95 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js - * @description ES5 Attributes - [[Value]] attribute of data property is a RegExp object - */ - - -function testcase() { - var obj = {}; - var regObj = new RegExp(); - - Object.defineProperty(obj, "prop", { - value: regObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === regObj && desc.value === regObj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-393 +description: > + ES5 Attributes - [[Value]] attribute of data property is a RegExp + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var regObj = new RegExp(); + + Object.defineProperty(obj, "prop", { + value: regObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === regObj && desc.value === regObj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js index 90f3a7ad48..e600e04af4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js - * @description ES5 Attributes - [[Value]] attribute of data property is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: undefined - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined" && typeof desc.value === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-394 +description: ES5 Attributes - [[Value]] attribute of data property is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: undefined + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined" && typeof desc.value === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js index e855891a52..1208bebd74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js - * @description ES5 Attributes - [[Value]] attribute of data property is null - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: null - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === null && desc.value === null; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-395 +description: ES5 Attributes - [[Value]] attribute of data property is null +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: null + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === null && desc.value === null; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js index 7205ccfeb8..4e8a11c365 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js - * @description ES5 Attributes - [[Value]] attribute of data property is NaN - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: NaN - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop !== obj.prop && desc.value !== desc.value; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-396 +description: ES5 Attributes - [[Value]] attribute of data property is NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: NaN + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop !== obj.prop && desc.value !== desc.value; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js index 825824c371..aa909d9ed9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js - * @description ES5 Attributes - [[Value]] attribute of data property is Infinity - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: Infinity - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === Infinity && desc.value === Infinity; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-397 +description: ES5 Attributes - [[Value]] attribute of data property is Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: Infinity + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === Infinity && desc.value === Infinity; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js index 580e8e650e..ad82c3f949 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js - * @description ES5 Attributes - [[Value]] attribute of data property is -Infinity - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: -Infinity - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === -Infinity && desc.value === -Infinity; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-398 +description: ES5 Attributes - [[Value]] attribute of data property is -Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: -Infinity + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === -Infinity && desc.value === -Infinity; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js index 0fc50d5d70..08b047fd00 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js - * @description ES5 Attributes - [[Value]] attribute of data property is the global object - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - value: fnGlobalObject() - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.prop === fnGlobalObject() && desc.value === fnGlobalObject(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-399 +description: > + ES5 Attributes - [[Value]] attribute of data property is the + global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + value: fnGlobalObject() + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.prop === fnGlobalObject() && desc.value === fnGlobalObject(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js index 93cb5c6bff..2c521f9015 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. For newly defined properties, step 4.a.1 of - * [[DefineOwnProperty]] creates a data property if handed a generic desc. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js - * @description Object.defineProperty defines a data property if given a generic desc(8.12.9 step 4.a.i) - */ - - -function testcase() { - var o = {}; - - var desc = {}; - Object.defineProperty(o, "foo", desc); - - var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); - if (propDesc.value === undefined && // this is the value that was set - propDesc.writable === false && // false by default - propDesc.enumerable === false && // false by default - propDesc.configurable === false) { // false by default - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. For newly defined properties, step 4.a.1 of + [[DefineOwnProperty]] creates a data property if handed a generic desc. +es5id: 15.2.3.6-4-4 +description: > + Object.defineProperty defines a data property if given a generic + desc(8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + var desc = {}; + Object.defineProperty(o, "foo", desc); + + var propDesc = Object.getOwnPropertyDescriptor(o, "foo"); + if (propDesc.value === undefined && // this is the value that was set + propDesc.writable === false && // false by default + propDesc.enumerable === false && // false by default + propDesc.configurable === false) { // false by default + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js index e2d80368d1..0ed4df5497 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js - * @description Object.defineProperty - 'O' is a RegExp object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var desc = new RegExp(); - - Object.defineProperty(desc, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(desc, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && desc.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-40 +description: > + Object.defineProperty - 'O' is a RegExp object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = new RegExp(); + + Object.defineProperty(desc, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(desc, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && desc.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js index 126cff39fa..738322542f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js - * @description ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct (String instance) - */ - - -function testcase() { - try { - Object.defineProperty(String.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - var strObj = new String(); - - return !strObj.hasOwnProperty("prop") && strObj.prop === 1001; - } finally { - delete String.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-402 +description: > + ES5 Attributes - [[Value]] attribute of inherited property of + [[Prototype]] internal property is correct (String instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(String.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + var strObj = new String(); + + return !strObj.hasOwnProperty("prop") && strObj.prop === 1001; + } finally { + delete String.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js index f188b3e945..4b31b066df 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js - * @description ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with same name and [[Writable]] attribute is set to true (Array instance) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - var arrObj = []; - arrObj.prop = 1002; - - return arrObj.hasOwnProperty("prop") && arrObj.prop === 1002; - } finally { - delete Array.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-403 +description: > + ES5 Attributes - Successfully add a property to an object when the + object's prototype has a property with same name and [[Writable]] + attribute is set to true (Array instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + var arrObj = []; + arrObj.prop = 1002; + + return arrObj.hasOwnProperty("prop") && arrObj.prop === 1002; + } finally { + delete Array.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js index 0935b2e0c8..dc23d169aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Boolean instance) - */ - - -function testcase() { - try { - Object.defineProperty(Boolean.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - var boolObj = new Boolean(); - - var verifyEnumerable = false; - for (var p in boolObj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !boolObj.hasOwnProperty("prop") && verifyEnumerable; - } finally { - delete Boolean.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-404 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to true is enumerable (Boolean instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Boolean.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + var boolObj = new Boolean(); + + var verifyEnumerable = false; + for (var p in boolObj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !boolObj.hasOwnProperty("prop") && verifyEnumerable; + } finally { + delete Boolean.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js index a74de9acc2..4a8308f4fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js - * @description ES5 Attributes - Failed to add a property to an object when the object's object has a property with same name and [[Writable]] attribute is set to false (Number instance) - */ - - -function testcase() { - try { - Object.defineProperty(Number.prototype, "prop", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - var numObj = new Number(); - numObj.prop = 1002; - - return !numObj.hasOwnProperty("prop") && numObj.prop === 1001; - } finally { - delete Number.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-405 +description: > + ES5 Attributes - Failed to add a property to an object when the + object's object has a property with same name and [[Writable]] + attribute is set to false (Number instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Number.prototype, "prop", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + var numObj = new Number(); + numObj.prop = 1002; + + return !numObj.hasOwnProperty("prop") && numObj.prop === 1001; + } finally { + delete Number.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js index 382b49791b..f13cfdfea2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is non-enumerable (Function instance) - */ - - -function testcase() { - try { - Object.defineProperty(Function.prototype, "prop", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - var funObj = function () { }; - - var verifyEnumerable = false; - for (var p in funObj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !funObj.hasOwnProperty("prop") && !verifyEnumerable; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-406 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to false is non-enumerable (Function instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Function.prototype, "prop", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + var funObj = function () { }; + + var verifyEnumerable = false; + for (var p in funObj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !funObj.hasOwnProperty("prop") && !verifyEnumerable; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js index cd5fe23d16..3cb71e5648 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js - * @description ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct (Error Instance) - */ - - -function testcase() { - try { - Object.defineProperty(Error.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - var errObj = new Error(); - - return !errObj.hasOwnProperty("prop") && errObj.prop === 1001; - } finally { - delete Error.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-407 +description: > + ES5 Attributes - [[Value]] attribute of inherited property of + [[Prototype]] internal property is correct (Error Instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Error.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + var errObj = new Error(); + + return !errObj.hasOwnProperty("prop") && errObj.prop === 1001; + } finally { + delete Error.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js index 9ec1c8b6d1..0c2dd72fe1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js - * @description ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with same name and [[Writable]] attribute is set to true (Date instance) - */ - - -function testcase() { - try { - Object.defineProperty(Date.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - var dateObj = new Date(); - dateObj.prop = 1002; - - return dateObj.hasOwnProperty("prop") && dateObj.prop === 1002; - } finally { - delete Date.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-408 +description: > + ES5 Attributes - Successfully add a property to an object when the + object's prototype has a property with same name and [[Writable]] + attribute is set to true (Date instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Date.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + var dateObj = new Date(); + dateObj.prop = 1002; + + return dateObj.hasOwnProperty("prop") && dateObj.prop === 1002; + } finally { + delete Date.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js index 6540b96a9a..4c6b876f30 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is enumerable (RegExp instance) - */ - - -function testcase() { - try { - Object.defineProperty(RegExp.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - var regObj = new RegExp(); - - var verifyEnumerable = false; - for (var p in regObj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !regObj.hasOwnProperty("prop") && verifyEnumerable; - } finally { - delete RegExp.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-409 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to false is enumerable (RegExp instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(RegExp.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + var regObj = new RegExp(); + + var verifyEnumerable = false; + for (var p in regObj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !regObj.hasOwnProperty("prop") && verifyEnumerable; + } finally { + delete RegExp.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js index 5697ed6343..895eeff91a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js @@ -1,25 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js - * @description Object.defineProperty - 'O' is the JSON object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - - try { - Object.defineProperty(JSON, "foo", { - value: 12, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(JSON, "foo", 12, false, false, true); - } finally { - delete JSON.foo; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-41 +description: > + Object.defineProperty - 'O' is the JSON object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + try { + Object.defineProperty(JSON, "foo", { + value: 12, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(JSON, "foo", 12, false, false, true); + } finally { + delete JSON.foo; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js index d2de5c1cf0..7f0a267138 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js - * @description ES5 Attributes - Failed to add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to false (JSON) - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "prop", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - JSON.prop = 1002; - - return !JSON.hasOwnProperty("prop") && JSON.prop === 1001; - } finally { - delete Object.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-410 +description: > + ES5 Attributes - Failed to add a property to an object when the + object's prototype has a property with the same name and + [[Writable]] set to false (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "prop", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + JSON.prop = 1002; + + return !JSON.hasOwnProperty("prop") && JSON.prop === 1001; + } finally { + delete Object.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js index 4ad89a067e..7e68e44915 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is non-enumerable (Math) - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "prop", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - - var verifyEnumerable = false; - for (var p in Math) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !Math.hasOwnProperty("prop") && !verifyEnumerable; - } finally { - delete Object.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-411 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to false is non-enumerable (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "prop", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + + var verifyEnumerable = false; + for (var p in Math) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !Math.hasOwnProperty("prop") && !verifyEnumerable; + } finally { + delete Object.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js index 1a13073320..08b905e1dc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js - * @description ES5 Attributes - [[Value]] field of inherited property of [[Prototype]] internal property is correct(Object.create) - */ - - -function testcase() { - var appointment = {}; - - Object.defineProperty(appointment, "startTime", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - Object.defineProperty(appointment, "name", { - value: "NAME", - writable: true, - enumerable: true, - configurable: true - }); - - var meeting = Object.create(appointment); - Object.defineProperty(meeting, "conferenceCall", { - value: "In-person meeting", - writable: true, - enumerable: true, - configurable: true - }); - - var teamMeeting = Object.create(meeting); - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && teamMeeting.name === "NAME" && - teamMeeting.startTime === 1001 && - teamMeeting.conferenceCall === "In-person meeting"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-412 +description: > + ES5 Attributes - [[Value]] field of inherited property of + [[Prototype]] internal property is correct(Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + Object.defineProperty(appointment, "startTime", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + Object.defineProperty(appointment, "name", { + value: "NAME", + writable: true, + enumerable: true, + configurable: true + }); + + var meeting = Object.create(appointment); + Object.defineProperty(meeting, "conferenceCall", { + value: "In-person meeting", + writable: true, + enumerable: true, + configurable: true + }); + + var teamMeeting = Object.create(meeting); + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && teamMeeting.name === "NAME" && + teamMeeting.startTime === 1001 && + teamMeeting.conferenceCall === "In-person meeting"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js index 78f1d55aa1..454faaf5c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js @@ -1,50 +1,54 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js - * @description ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to true (Object.create) - */ - - -function testcase() { - var appointment = {}; - - Object.defineProperty(appointment, "startTime", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - Object.defineProperty(appointment, "name", { - value: "NAME", - writable: true, - enumerable: true, - configurable: true - }); - - var meeting = Object.create(appointment); - Object.defineProperty(meeting, "conferenceCall", { - value: "In-person meeting", - writable: true, - enumerable: true, - configurable: true - }); - - var teamMeeting = Object.create(meeting); - teamMeeting.name = "Team Meeting"; - var dateObj = new Date("10/31/2010 08:00"); - teamMeeting.startTime = dateObj; - teamMeeting.conferenceCall = "4255551212"; - - var hasOwnProperty = teamMeeting.hasOwnProperty("name") && - teamMeeting.hasOwnProperty("startTime") && - teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && teamMeeting.name === "Team Meeting" && - teamMeeting.startTime === dateObj && - teamMeeting.conferenceCall === "4255551212"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-413 +description: > + ES5 Attributes - Successfully add a property to an object when the + object's prototype has a property with the same name and + [[Writable]] set to true (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + Object.defineProperty(appointment, "startTime", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + Object.defineProperty(appointment, "name", { + value: "NAME", + writable: true, + enumerable: true, + configurable: true + }); + + var meeting = Object.create(appointment); + Object.defineProperty(meeting, "conferenceCall", { + value: "In-person meeting", + writable: true, + enumerable: true, + configurable: true + }); + + var teamMeeting = Object.create(meeting); + teamMeeting.name = "Team Meeting"; + var dateObj = new Date("10/31/2010 08:00"); + teamMeeting.startTime = dateObj; + teamMeeting.conferenceCall = "4255551212"; + + var hasOwnProperty = teamMeeting.hasOwnProperty("name") && + teamMeeting.hasOwnProperty("startTime") && + teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && teamMeeting.name === "Team Meeting" && + teamMeeting.startTime === dateObj && + teamMeeting.conferenceCall === "4255551212"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js index 88e052e2bf..478ea974c8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js @@ -1,59 +1,62 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Object.create) - */ - - -function testcase() { - var appointment = new Object(); - - Object.defineProperty(appointment, "startTime", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - Object.defineProperty(appointment, "name", { - value: "NAME", - writable: true, - enumerable: true, - configurable: true - }); - - var meeting = Object.create(appointment); - Object.defineProperty(meeting, "conferenceCall", { - value: "In-person meeting", - writable: true, - enumerable: true, - configurable: true - }); - - var teamMeeting = Object.create(meeting); - - var verifyTimeProp = false; - var verifyNameProp = false; - var verifyCallProp = false; - for (var p in teamMeeting) { - if (p === "startTime") { - verifyTimeProp = true; - } - if (p === "name") { - verifyNameProp = true; - } - if (p === "conferenceCall") { - verifyCallProp = true; - } - } - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty("conferenceCall"); - - return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-414 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to true is enumerable (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = new Object(); + + Object.defineProperty(appointment, "startTime", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + Object.defineProperty(appointment, "name", { + value: "NAME", + writable: true, + enumerable: true, + configurable: true + }); + + var meeting = Object.create(appointment); + Object.defineProperty(meeting, "conferenceCall", { + value: "In-person meeting", + writable: true, + enumerable: true, + configurable: true + }); + + var teamMeeting = Object.create(meeting); + + var verifyTimeProp = false; + var verifyNameProp = false; + var verifyCallProp = false; + for (var p in teamMeeting) { + if (p === "startTime") { + verifyTimeProp = true; + } + if (p === "name") { + verifyNameProp = true; + } + if (p === "conferenceCall") { + verifyCallProp = true; + } + } + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty("conferenceCall"); + + return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js index 003a776c32..a940095121 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js @@ -1,50 +1,54 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js - * @description ES5 Attributes - Failed to add properties to an object when the object's prototype has properties with the same name and [[Writable]] set to false (Object.create) - */ - - -function testcase() { - var appointment = new Object(); - - Object.defineProperty(appointment, "startTime", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - Object.defineProperty(appointment, "name", { - value: "NAME", - writable: false, - enumerable: false, - configurable: true - }); - - var meeting = Object.create(appointment); - Object.defineProperty(meeting, "conferenceCall", { - value: "In-person meeting", - writable: false, - enumerable: false, - configurable: true - }); - - var teamMeeting = Object.create(meeting); - teamMeeting.name = "Team Meeting"; - var dateObj = new Date("10/31/2010 08:00"); - teamMeeting.startTime = dateObj; - teamMeeting.conferenceCall = "4255551212"; - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && teamMeeting.name === "NAME" && - teamMeeting.startTime === 1001 && - teamMeeting.conferenceCall === "In-person meeting"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-415 +description: > + ES5 Attributes - Failed to add properties to an object when the + object's prototype has properties with the same name and + [[Writable]] set to false (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = new Object(); + + Object.defineProperty(appointment, "startTime", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + Object.defineProperty(appointment, "name", { + value: "NAME", + writable: false, + enumerable: false, + configurable: true + }); + + var meeting = Object.create(appointment); + Object.defineProperty(meeting, "conferenceCall", { + value: "In-person meeting", + writable: false, + enumerable: false, + configurable: true + }); + + var teamMeeting = Object.create(meeting); + teamMeeting.name = "Team Meeting"; + var dateObj = new Date("10/31/2010 08:00"); + teamMeeting.startTime = dateObj; + teamMeeting.conferenceCall = "4255551212"; + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && teamMeeting.name === "NAME" && + teamMeeting.startTime === 1001 && + teamMeeting.conferenceCall === "In-person meeting"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js index 08faa0616c..c637139aa1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js @@ -1,59 +1,62 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js - * @description ES5 Attributes - Inherited properties whose [[Enumerable]] attribute is set to false is non-enumerable (Object.create) - */ - - -function testcase() { - var appointment = {}; - - Object.defineProperty(appointment, "startTime", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - Object.defineProperty(appointment, "name", { - value: "NAME", - writable: false, - enumerable: false, - configurable: true - }); - - var meeting = Object.create(appointment); - Object.defineProperty(meeting, "conferenceCall", { - value: "In-person meeting", - writable: false, - enumerable: false, - configurable: true - }); - - var teamMeeting = Object.create(meeting); - - var verifyTimeProp = false; - var verifyNameProp = false; - var verifyCallProp = false; - for (var p in teamMeeting) { - if (p === "startTime") { - verifyTimeProp = true; - } - if (p === "name") { - verifyNameProp = true; - } - if (p === "conferenceCall") { - verifyCallProp = true; - } - } - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty("conferenceCall"); - - return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-416 +description: > + ES5 Attributes - Inherited properties whose [[Enumerable]] + attribute is set to false is non-enumerable (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + Object.defineProperty(appointment, "startTime", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + Object.defineProperty(appointment, "name", { + value: "NAME", + writable: false, + enumerable: false, + configurable: true + }); + + var meeting = Object.create(appointment); + Object.defineProperty(meeting, "conferenceCall", { + value: "In-person meeting", + writable: false, + enumerable: false, + configurable: true + }); + + var teamMeeting = Object.create(meeting); + + var verifyTimeProp = false; + var verifyNameProp = false; + var verifyCallProp = false; + for (var p in teamMeeting) { + if (p === "startTime") { + verifyTimeProp = true; + } + if (p === "name") { + verifyNameProp = true; + } + if (p === "conferenceCall") { + verifyCallProp = true; + } + } + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty("conferenceCall"); + + return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js index 10815e9e92..df05c133ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js - * @description ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct(Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - try { - Object.defineProperty(Function.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - var obj = foo.bind({}); - - return !obj.hasOwnProperty("prop") && obj.prop === 1001; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-417 +description: > + ES5 Attributes - [[Value]] attribute of inherited property of + [[Prototype]] internal property is correct(Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + try { + Object.defineProperty(Function.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + var obj = foo.bind({}); + + return !obj.hasOwnProperty("prop") && obj.prop === 1001; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js index f33b6ac991..f5f789a4a6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js - * @description ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to true (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - try { - Object.defineProperty(Function.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - var obj = foo.bind({}); - obj.prop = 1002; - - return obj.hasOwnProperty("prop") && obj.prop === 1002; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-418 +description: > + ES5 Attributes - Successfully add a property to an object when the + object's prototype has a property with the same name and + [[Writable]] set to true (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + try { + Object.defineProperty(Function.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + var obj = foo.bind({}); + obj.prop = 1002; + + return obj.hasOwnProperty("prop") && obj.prop === 1002; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js index 0d74a363b6..3122c68f73 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - try { - Object.defineProperty(Function.prototype, "prop", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - var obj = foo.bind({}); - var verifyEnumerable = false; - for (var p in obj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !obj.hasOwnProperty("prop") && verifyEnumerable; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-419 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to true is enumerable (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + try { + Object.defineProperty(Function.prototype, "prop", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + var obj = foo.bind({}); + var verifyEnumerable = false; + for (var p in obj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !obj.hasOwnProperty("prop") && verifyEnumerable; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js index ccbdab2de5..bec9abc586 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js - * @description Object.defineProperty - 'O' is an Error object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var desc = new Error(); - - Object.defineProperty(desc, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(desc, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && desc.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-42 +description: > + Object.defineProperty - 'O' is an Error object that uses Object's + [[GetOwnProperty]] method to access the 'name' property (8.12.9 + step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = new Error(); + + Object.defineProperty(desc, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(desc, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && desc.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js index 59310a772d..a24612f20d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js - * @description ES5 Attributes - Failed to add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to false(Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - try { - Object.defineProperty(Function.prototype, "prop", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - - var obj = foo.bind({}); - obj.prop = 1002; - - return !obj.hasOwnProperty("prop") && obj.prop === 1001; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-420 +description: > + ES5 Attributes - Failed to add a property to an object when the + object's prototype has a property with the same name and + [[Writable]] set to false(Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + try { + Object.defineProperty(Function.prototype, "prop", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + + var obj = foo.bind({}); + obj.prop = 1002; + + return !obj.hasOwnProperty("prop") && obj.prop === 1001; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js index 054fc5c9e9..eb630ed4ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js - * @description ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is non-enumerable (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - try { - Object.defineProperty(Function.prototype, "prop", { - value: 1001, - writable: false, - enumerable: false, - configurable: true - }); - - var obj = foo.bind({}); - var verifyEnumerable = false; - for (var p in obj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !obj.hasOwnProperty("prop") && !verifyEnumerable; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-421 +description: > + ES5 Attributes - Inherited property whose [[Enumerable]] attribute + is set to false is non-enumerable (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + try { + Object.defineProperty(Function.prototype, "prop", { + value: 1001, + writable: false, + enumerable: false, + configurable: true + }); + + var obj = foo.bind({}); + var verifyEnumerable = false; + for (var p in obj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !obj.hasOwnProperty("prop") && !verifyEnumerable; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js index 92656260c5..7573daa6e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-422 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js index a2f3408c29..33360568ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-423 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js index 107e1ea867..82242bf593 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-424 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is true) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js index 92fc1591fb..fcb00fb2a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-425 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js index bb6702b82e..6b91cbb13e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-426 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js index 2db5327206..7d4f5b8d4e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc1.set === "undefined" && desc2.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-427 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc1.set === "undefined" && desc2.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js index 577444c04b..efe78cf4f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js @@ -1,42 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: false - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-428 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: false + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js index 030a399f3c..2b5d02d37d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-429 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js index fe43091a49..f09a8958a3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js - * @description Object.defineProperty - 'O' is an Arguments object which implements its own [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - var argObj = (function () { return arguments; })(); - - Object.defineProperty(argObj, "foo", { - value: 12, - configurable: false - }); - - try { - Object.defineProperty(argObj, "foo", { - value: 11, - configurable: true - }); - return false; - } catch (e) { - return e instanceof TypeError && argObj.foo === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-43 +description: > + Object.defineProperty - 'O' is an Arguments object which + implements its own [[GetOwnProperty]] method to access the 'name' + property (8.12.9 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function () { return arguments; })(); + + Object.defineProperty(argObj, "foo", { + value: 12, + configurable: false + }); + + try { + Object.defineProperty(argObj, "foo", { + value: 11, + configurable: true + }); + return false; + } catch (e) { + return e instanceof TypeError && argObj.foo === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js index 33047c0e3f..63c0ca51bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-430 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js index ed465d2f75..c3a0c23ed2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-431 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js index fda0fe3e2f..1ad6a7a489 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-432 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js index 0faad7336f..aef5ca61ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-433 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is false) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js index 016dbb7300..24768ee829 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-434 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js index 64c6224842..331dc0cb48 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - return false; - } catch (e) { - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-435 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + return false; + } catch (e) { + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js index 69fcce8aba..a8503bc1ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js @@ -1,39 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-436 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js index f1bf325f9e..c2f11136dd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js @@ -1,47 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: false - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-437 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: false + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js index 67ae26d550..674c7b6d48 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-438 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js index f38346525d..1c54048cc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-439 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + undefined, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js index 6b1ac1e909..1f7f48d3e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-440 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js index 7062601051..4f6c93b4aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-441 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js index bf4318b6f3..be2f8ab992 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-442 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is true) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js index 583573ab63..e2f647a2df 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-443 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js index 4b6df57a62..80f684819a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-444 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js index 3e504fdcc7..03f58f85d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js @@ -1,39 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - obj.prop = "overrideData"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return typeof desc1.set === "undefined" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-445 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + obj.prop = "overrideData"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return typeof desc1.set === "undefined" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js index 5f8570b919..858bb87763 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js @@ -1,42 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: true - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-446 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: true + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js index 7b5d9349de..92a88f912a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-447 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js index 784d6c2b5a..57515598d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-448 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js index 7489315cae..b6d44a8869 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-449 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js index 9b8096e1bf..ced4ff42fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js @@ -1,24 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js - * @description Object.defineProperty - 'O' is the global object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1) - */ - - -function testcase() { - try { - Object.defineProperty(fnGlobalObject(), "foo", { - value: 12, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(fnGlobalObject(), "foo", 12, false, false, true); - } finally { - delete fnGlobalObject().foo; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-45 +description: > + Object.defineProperty - 'O' is the global object that uses + Object's [[GetOwnProperty]] method to access the 'name' property + (8.12.9 step 1) +includes: + - runTestCase.js + - fnGlobalObject.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + try { + Object.defineProperty(fnGlobalObject(), "foo", { + value: 12, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(fnGlobalObject(), "foo", 12, false, false, true); + } finally { + delete fnGlobalObject().foo; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js index 47fd6cfc3e..8d6192cce1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-450 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js index 1a3b63ef67..197767c79f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-451 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is false) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js index bbaa8cd03c..b66aecd8e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-452 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js index 4f56009831..eb6b117e05 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - return false; - } catch (e) { - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-453 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + return false; + } catch (e) { + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js index b9f2767cf6..05b26a07d0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-454 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js index 79061d60d9..cf805575ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js @@ -1,47 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: true - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-455 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: true + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js index bcc2bfeff8..89b1e2645e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-456 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js index 0524ed6d6f..ba2784b6ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: undefined, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-457 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + undefined, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: undefined, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js index 3b024034bd..3fe70fb82a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-458 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js index 88005bd768..2f3839c106 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-459 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js index 0ea526f54e..f12b3b64f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js - * @description Object.defineProperty - 'name' is defined as data property if 'name' property doesn't exist in 'O' and 'desc' is generic descriptor (8.12.9 step 4.a) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - enumerable: true - }); - - var isEnumerable = false; - for (var item in obj) { - if (obj.hasOwnProperty(item) && item === "property") { - isEnumerable = true; - } - } - - return obj.hasOwnProperty("property") && isEnumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-46 +description: > + Object.defineProperty - 'name' is defined as data property if + 'name' property doesn't exist in 'O' and 'desc' is generic + descriptor (8.12.9 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + enumerable: true + }); + + var isEnumerable = false; + for (var item in obj) { + if (obj.hasOwnProperty(item) && item === "property") { + isEnumerable = true; + } + } + + return obj.hasOwnProperty("property") && isEnumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js index 88a1a8f823..5fd1af4052 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is enumerable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-460 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is true) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js index 32b1ede40b..dc9a6f6161 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-461 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js index 4c3309c280..384e9c2901 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-462 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js index 810c3aa886..4e59aa4932 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - set: undefined - }); - - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && typeof desc2.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-463 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + set: undefined + }); + + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && typeof desc2.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js index 3784cfc4f8..42475b55cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js @@ -1,48 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: false - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-464 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: false + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js index f7323c580f..1714893118 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-465 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js index c70803774b..8cc835069e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-466 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js index ce527252e2..736658cea0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-467 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js index baa9e9bf32..54f09a1110 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-468 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js index e859414bce..ff845d3ef5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-469 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is false) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js index de6f2cfed5..ed2dec6ae0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js @@ -1,23 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', [[Value]] of 'name' property is set as undefined if it is absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - writable: true, - enumerable: true, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "property", undefined, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-47 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', + [[Value]] of 'name' property is set as undefined if it is absent + in data descriptor 'desc' (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + writable: true, + enumerable: true, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "property", undefined, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js index 6fce9a016a..53caecb88c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-470 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js index cdcb3c9079..5f7515434e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js @@ -1,47 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - return false; - } catch (e) { - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-471 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + return false; + } catch (e) { + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js index 712a79cc80..356a17197e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: undefined - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-472 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: undefined + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js index 84de2d33cc..b0c0932bd3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js @@ -1,53 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: false - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-473 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: false + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js index 5bbde850ec..e423c58071 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-474 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js index 3ef0886c45..fdd5eda79c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-475 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + undefined, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js index 2d12297b1f..a2db321cbd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-476 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js index cd90258803..3189d0d62b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-477 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js index 84b1dd1033..a711bc5e0e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-478 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is true) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js index 777fe406a5..b8e0423426 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-479 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js index d4d9c69bba..602305b605 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js @@ -1,23 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Writable]] of 'name' property of 'Attributes' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - enumerable: true, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1001, false, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-48 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Writable]] of 'name' property of 'Attributes' is set as false + value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + enumerable: true, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1001, false, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js index 1d6b3d65cc..6ce7cfa438 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-480 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js index 87f9b2a423..1b619c4de0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - set: undefined - }); - - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && typeof desc2.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-481 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + set: undefined + }); + + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && typeof desc2.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js index ff99ea1f4d..7c59d1d74f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js @@ -1,48 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: true - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-482 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: true + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js index e2e958eeb8..7a7c24c572 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-483 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js index a1b96d8ce0..f856deb540 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-484 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js index 5fbd6e5229..0ba85b5f54 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-485 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js index 4a6467517d..a05f242d41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-486 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is undefined, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js index 5c5b50f27e..8a713bad43 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-487 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is false) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js index d72d5ad622..f207463a06 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js - * @description ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-488 +description: > + ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js index 57970b7390..c5d3406c4b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js @@ -1,47 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - var result1 = typeof obj.prop === "undefined"; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - return false; - } catch (e) { - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-489 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + var result1 = typeof obj.prop === "undefined"; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + return false; + } catch (e) { + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js index ea500bcc4a..dcce164005 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Enumerable]] of 'name' property of 'Attributes' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - writable: true, - configurable: true - }); - return dataPropertyAttributesAreCorrect(obj, "property", 1001, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-49 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Enumerable]] of 'name' property of 'Attributes' is set as false + value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + writable: true, + configurable: true + }); + return dataPropertyAttributesAreCorrect(obj, "property", 1001, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js index 87a76d27d1..14b6b37574 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: undefined - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-490 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: undefined + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js index fc94b35282..55f0c60e82 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js @@ -1,53 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: true - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-491 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: true + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js index 8c1ce77709..68d32e80ba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-492 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is undefined, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js index daf1ca9b83..3e35f2f1bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: undefined, - set: setFunc, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-493 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + undefined, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: undefined, + set: setFunc, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js index dd9861d690..7fc84bff6c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-494 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js index c131d98b1d..620e83ab6d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-495 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js index 8054ed35bc..20806d6bae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-496 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is true) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js index f93885e7c5..a350872455 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-497 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js index 9578a2c1fe..84708ab36b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: undefined - }); - - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-498 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: undefined + }); + + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js index 005cc4b5cc..9e79446baf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - obj.prop = "overrideData"; - return typeof desc1.set === "undefined" && desc2.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-499 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + obj.prop = "overrideData"; + return typeof desc1.set === "undefined" && desc2.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js index e84e1aefb6..8dfe0f5c0a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 6 of [[DefineOwnProperty]] returns if - * every field of desc also occurs in current and every field in desc has - * the same value as current. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js - * @description Object.defineProperty is no-op if current and desc are the same data desc - */ - - -function testcase() { - function sameDataDescriptorValues(d1, d2) { - return (d1.value === d2.value && - d1.enumerable === d2.enumerable && - d1.writable === d2.writable && - d1.configurable === d2.configurable); - } - - var o = {}; - - // create a data valued property with the following attributes: - // value: 101, enumerable: true, writable: true, configurable: true - o["foo"] = 101; - - // query for, and save, the desc. A subsequent call to defineProperty - // with the same desc should not disturb the property definition. - var d1 = Object.getOwnPropertyDescriptor(o, "foo"); - - // now, redefine the property with the same descriptor - // the property defintion should not get disturbed. - var desc = { value: 101, enumerable: true, writable: true, configurable: true }; - Object.defineProperty(o, "foo", desc); - - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (sameDataDescriptorValues(d1, d2) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 6 of [[DefineOwnProperty]] returns if + every field of desc also occurs in current and every field in desc has + the same value as current. +es5id: 15.2.3.6-4-5 +description: > + Object.defineProperty is no-op if current and desc are the same + data desc +includes: [runTestCase.js] +---*/ + +function testcase() { + function sameDataDescriptorValues(d1, d2) { + return (d1.value === d2.value && + d1.enumerable === d2.enumerable && + d1.writable === d2.writable && + d1.configurable === d2.configurable); + } + + var o = {}; + + // create a data valued property with the following attributes: + // value: 101, enumerable: true, writable: true, configurable: true + o["foo"] = 101; + + // query for, and save, the desc. A subsequent call to defineProperty + // with the same desc should not disturb the property definition. + var d1 = Object.getOwnPropertyDescriptor(o, "foo"); + + // now, redefine the property with the same descriptor + // the property defintion should not get disturbed. + var desc = { value: 101, enumerable: true, writable: true, configurable: true }; + Object.defineProperty(o, "foo", desc); + + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (sameDataDescriptorValues(d1, d2) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js index b081e4d1bc..30d55351bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js @@ -1,22 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Configurable]] of 'name' property is set as false if it is absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - writable: true, - enumerable: true - }); - return dataPropertyAttributesAreCorrect(obj, "property", 1001, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-50 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Configurable]] of 'name' property is set as false if it is + absent in data descriptor 'desc' (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + writable: true, + enumerable: true + }); + return dataPropertyAttributesAreCorrect(obj, "property", 1001, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js index 50a4a0b946..a0b466ee76 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js @@ -1,46 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: false - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-500 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: false + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js index 9c07f32503..2f3baf5c56 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-501 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js index d2154cb88d..57870b7e4a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-502 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js index 3205f50552..b3bcecc03c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-503 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js index 950057aef5..85ce1bbf57 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-504 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js index c8f6cb1a79..2f9c8ecb10 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-505 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is false) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js index 766ffb4721..5492204e7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-506 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is true, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js index 8e58baa645..cb5929f429 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: undefined - }); - - return false; - } catch (e) { - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-507 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: undefined + }); + + return false; + } catch (e) { + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js index d483e47356..5023935b41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-508 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js index 7ce3e6b471..b6e79edc6c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js @@ -1,51 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: false - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-509 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: false + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js index 2bd649c060..e865661aa5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js - * @description Object.defineProperty - desc is data descriptor, test updating all attribute values of 'name' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = { "property": 1 }; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "property", { - value: 1001, - writable: false, - enumerable: false, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-51 +description: > + Object.defineProperty - desc is data descriptor, test updating all + attribute values of 'name' (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = { "property": 1 }; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "property", { + value: 1001, + writable: false, + enumerable: false, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js index 79592757d4..55ff979fa5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-510 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js index f315246d42..b2a05a7c11 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-511 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + a Function, [[Set]] is undefined, [[Enumerable]] is true, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js index cb808a6d01..be2781e8fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-512 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js index 754d573d29..c49b2c767a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-513 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is true) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js index da7249b474..27f0c2b913 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-514 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is true) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js index 579c3d72bc..2d4bf7c544 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-515 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js index f22effbc5c..90fbb22ee1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: undefined - }); - - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-516 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: undefined + }); + + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js index 27b8eb4292..01d1a7e604 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - obj.prop = "overrideData"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return typeof desc1.set === "undefined" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-517 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + obj.prop = "overrideData"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return typeof desc1.set === "undefined" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js index 3933856c44..94dccc300f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js @@ -1,46 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: true - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-518 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: true + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js index ce2b456f82..fcf391261e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-519 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js index 54fa3cb04c..416aeac5f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js @@ -1,19 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js - * @description Object.defineProperty - 'desc' is generic descriptor without any attribute, test 'name' is defined in 'obj' with all default attribute values (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", {}); - - return dataPropertyAttributesAreCorrect(obj, "property", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-52 +description: > + Object.defineProperty - 'desc' is generic descriptor without any + attribute, test 'name' is defined in 'obj' with all default + attribute values (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", {}); + + return dataPropertyAttributesAreCorrect(obj, "property", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js index 71e247324c..d3fd2b4bb4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-520 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js index ab451beeac..d6373cca7a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-521 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js index 55dfea5064..f573b38474 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-522 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is false) is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js index 229537c2f3..5bbb48cd00 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-523 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is false) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js index 47481e6452..6633001577 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-524 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is + undefined, [[Enumerable]] is false, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js index fdcec6eddf..abbc05a983 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: undefined - }); - - return false; - } catch (e) { - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-525 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: undefined + }); + + return false; + } catch (e) { + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js index 4960e6c1c8..aa0ffb9509 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-526 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js index d23c21427f..b2fc44c8dd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js @@ -1,51 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: true - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-527 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: true + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js index 42c165f907..c16ac8de1d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-528 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is undefined, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js index ff2b1c2370..0fab958b4d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: undefined, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-529 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + a Function, [[Set]] is undefined, [[Enumerable]] is false, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: undefined, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js index 688c9087b0..5076fe14dd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Get]] of 'name' property is set as undefined if it is absent in accessor descriptor 'desc' (8.12.9 step 4.b) - */ - - -function testcase() { - var obj = {}; - var setFunc = function (value) { - obj.setVerifyHelpProp = value; - }; - - Object.defineProperty(obj, "property", { - set: setFunc, - enumerable: true, - configurable: true - }); - - return accessorPropertyAttributesAreCorrect(obj, "property", undefined, setFunc, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-53 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Get]] of 'name' property is set as undefined if it is absent in + accessor descriptor 'desc' (8.12.9 step 4.b) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var setFunc = function (value) { + obj.setVerifyHelpProp = value; + }; + + Object.defineProperty(obj, "property", { + set: setFunc, + enumerable: true, + configurable: true + }); + + return accessorPropertyAttributesAreCorrect(obj, "property", undefined, setFunc, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js index 7314432f05..4754137291 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-530 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js index cc6e005ca2..c361ec258d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is an Object object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "property", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "property", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-1 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of named accessor property 'P' successfully when [[Configurable]] + attribute is true, 'O' is an Object object (8.12.9 step 11) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "property", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "property", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js index a27dcb05f8..4a98234062 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js @@ -1,42 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is an Object object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = {}; - - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "0", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-10 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of indexed accessor property 'P' successfully when + [[Configurable]] attribute is true, 'O' is an Object object + (8.12.9 step 11) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "0", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js index 6fe1e299bc..b2a8871a5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js @@ -1,42 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = []; - - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "prop", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction1", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-11 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of named accessor property 'P' successfully when [[Configurable]] + attribute is true, 'A' is an Array object (8.12.9 step 11) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = []; + + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "prop", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction1", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js index c145772130..ee06fc8999 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js @@ -1,44 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property successfully when [[Configurable]] attribute is true, 'O' is an Arguments object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "0", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-12 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of indexed accessor property successfully when [[Configurable]] + attribute is true, 'O' is an Arguments object (8.12.9 step 11) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "0", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js index acd25aa4ab..70f387324a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js @@ -1,47 +1,55 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the global object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = fnGlobalObject(); - try { - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "0", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); - } finally { - delete obj[0]; - delete obj.verifySetFunction; - delete obj.verifySetFunction1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-13 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of indexed accessor property 'P' successfully when + [[Configurable]] attribute is true, 'O' is the global object + (8.12.9 step 11) +includes: + - runTestCase.js + - fnGlobalObject.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = fnGlobalObject(); + try { + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "0", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); + } finally { + delete obj[0]; + delete obj.verifySetFunction; + delete obj.verifySetFunction1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-15.js index 5e8d837ce9..132ae375a9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-15.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-15.js - * @description ES5 Attributes - Updating a named accessor property 'P' using simple assignment is successful, 'A' is an Array object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = []; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - var getFunc = function () { - return verifySetFunc; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && obj.prop === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-15 +description: > + ES5 Attributes - Updating a named accessor property 'P' using + simple assignment is successful, 'A' is an Array object (8.12.5 + step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + var getFunc = function () { + return verifySetFunc; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && obj.prop === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-16.js index 9d2d3cdf69..ac266babb1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-16.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-16.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment, 'O' is an Arguments object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - var getFunc = function () { - return verifySetFunc; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - obj[0] = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc = Object.getOwnPropertyDescriptor(obj, "0"); - - return propertyDefineCorrect && desc.set === setFunc && obj[0] === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-16 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' using + simple assignment, 'O' is an Arguments object (8.12.5 step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + var getFunc = function () { + return verifySetFunc; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + obj[0] = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc = Object.getOwnPropertyDescriptor(obj, "0"); + + return propertyDefineCorrect && desc.set === setFunc && obj[0] === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-17.js index c415046d77..25de8f1e78 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-17.js @@ -1,40 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-17.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment is successful, 'O' is the global object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = fnGlobalObject(); - try { - obj.verifySetFunc = "data"; - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - var getFunc = function () { - return obj.verifySetFunc; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - obj[0] = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc = Object.getOwnPropertyDescriptor(obj, "0"); - - return propertyDefineCorrect && desc.set === setFunc && obj[0] === "overrideData"; - } finally { - delete obj[0]; - delete obj.verifySetFunc; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-17 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' using + simple assignment is successful, 'O' is the global object (8.12.5 + step 5.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + try { + obj.verifySetFunc = "data"; + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + var getFunc = function () { + return obj.verifySetFunc; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + obj[0] = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc = Object.getOwnPropertyDescriptor(obj, "0"); + + return propertyDefineCorrect && desc.set === setFunc && obj[0] === "overrideData"; + } finally { + delete obj[0]; + delete obj.verifySetFunc; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js index bb6b9f5b15..e705a17bd7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js @@ -1,42 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = []; - - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "0", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-2 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of indexed accessor property 'P' successfully when + [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 + step 11) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = []; + + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "0", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js index 284e11b8ab..85fe3ca930 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js @@ -1,44 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property successfully when [[Configurable]] attribute is true, 'O' is an Arguments object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "property", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "property", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-3 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of named accessor property successfully when [[Configurable]] + attribute is true, 'O' is an Arguments object (8.12.9 step 11) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "property", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "property", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js index 29f4fa9a3c..b0f2a80347 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js @@ -1,47 +1,54 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js - * @description Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the global object (8.12.9 step 11) - */ - - -function testcase() { - - var obj = fnGlobalObject(); - try { - obj.verifySetFunction = "data"; - Object.defineProperty(obj, "property", { - get: function () { - return obj.verifySetFunction; - }, - set: function (value) { - obj.verifySetFunction = value; - }, - configurable: true - }); - - obj.verifySetFunction1 = "data1"; - var getFunc = function () { - return obj.verifySetFunction1; - }; - var setFunc = function (value) { - obj.verifySetFunction1 = value; - }; - - Object.defineProperty(obj, "property", { - get: getFunc, - set: setFunc - }); - - return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true); - } finally { - delete obj.property; - delete obj.verifySetFunction; - delete obj.verifySetFunction1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-4 +description: > + Object.defineProperty will update [[Get]] and [[Set]] attributes + of named accessor property 'P' successfully when [[Configurable]] + attribute is true, 'O' is the global object (8.12.9 step 11) +includes: + - runTestCase.js + - fnGlobalObject.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = fnGlobalObject(); + try { + obj.verifySetFunction = "data"; + Object.defineProperty(obj, "property", { + get: function () { + return obj.verifySetFunction; + }, + set: function (value) { + obj.verifySetFunction = value; + }, + configurable: true + }); + + obj.verifySetFunction1 = "data1"; + var getFunc = function () { + return obj.verifySetFunction1; + }; + var setFunc = function (value) { + obj.verifySetFunction1 = value; + }; + + Object.defineProperty(obj, "property", { + get: getFunc, + set: setFunc + }); + + return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true); + } finally { + delete obj.property; + delete obj.verifySetFunction; + delete obj.verifySetFunction1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-6.js index 4746a9a236..f63bdf9e06 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-6.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-6.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' without [[Set]] using simple assignment is failed, 'A' is an Array object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = []; - - var verifySetFunc = "data"; - var getFunc = function () { - return verifySetFunc; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - enumerable: true, - configurable: true - }); - - obj[0] = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc = Object.getOwnPropertyDescriptor(obj, "0"); - - return propertyDefineCorrect && typeof desc.set === "undefined" && obj[0] === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-6 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' without + [[Set]] using simple assignment is failed, 'A' is an Array object + (8.12.5 step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + var verifySetFunc = "data"; + var getFunc = function () { + return verifySetFunc; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + enumerable: true, + configurable: true + }); + + obj[0] = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc = Object.getOwnPropertyDescriptor(obj, "0"); + + return propertyDefineCorrect && typeof desc.set === "undefined" && obj[0] === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-7.js index 4305c12bdd..6e35bab3f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-7.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-7.js - * @description ES5 Attributes - Updating a named accessor property 'P' without [[Set]] using simple assignment is failed, 'O' is an Arguments object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - var verifySetFunc = "data"; - var getFunc = function () { - return verifySetFunc; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - enumerable: true, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined" && obj.prop === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-7 +description: > + ES5 Attributes - Updating a named accessor property 'P' without + [[Set]] using simple assignment is failed, 'O' is an Arguments + object (8.12.5 step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + var verifySetFunc = "data"; + var getFunc = function () { + return verifySetFunc; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + enumerable: true, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined" && obj.prop === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-8.js index 8a107af0a3..c68dd029bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-8.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-8.js - * @description ES5 Attributes - Updating a named accessor property 'P' without [[Set]] using simple assignment is failed, 'O' is the global object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = fnGlobalObject(); - try { - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - enumerable: true, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && typeof desc.set === "undefined" && obj.prop === "data"; - } finally { - delete obj.prop; - delete obj.verifySetFunc; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531-8 +description: > + ES5 Attributes - Updating a named accessor property 'P' without + [[Set]] using simple assignment is failed, 'O' is the global + object (8.12.5 step 5.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + try { + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + enumerable: true, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && typeof desc.set === "undefined" && obj.prop === "data"; + } finally { + delete obj.prop; + delete obj.verifySetFunc; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js index a84ff16cbe..1b6764a4c8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-531 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js index 5414db28c0..cdd4f577fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-532 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is true) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js index aeecf22850..6ed5437928 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-533 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js index b8e7a08888..2ae5c60820 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: undefined - }); - - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-534 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: undefined + }); + + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js index 5101eedd6a..003af03f8a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - set: undefined - }); - - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && typeof desc2.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-535 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + set: undefined + }); + + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && typeof desc2.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js index 41852bab00..f128a0c08a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js @@ -1,51 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: false - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-536 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: false + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js index d0085eb2b3..b76bb85889 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-537 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-1.js index 4f18a51c1c..ce59418d56 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-1.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-1.js - * @description ES5 Attributes - Updating an indexed 'P' whose [[Configurable]] attribute is true to a data property is successful, 'A' is an Array object (8.12.9 - step 9.c.i) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - Object.defineProperty(obj, "0", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "0", 1001, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538-1 +description: > + ES5 Attributes - Updating an indexed 'P' whose [[Configurable]] + attribute is true to a data property is successful, 'A' is an + Array object (8.12.9 - step 9.c.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + Object.defineProperty(obj, "0", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "0", 1001, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-2.js index 05e9fd7886..d40aa701bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-2.js @@ -1,43 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-2.js - * @description ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538-2 +description: > + ES5 Attributes - Updating a named accessor property 'P' whose + [[Configurable]] attribute is true to a data property is + successful, 'O' is an Arguments object +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-3.js index 98c390c469..5f1078e3d6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-3.js @@ -1,45 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-3.js - * @description ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is the global object - */ - - -function testcase() { - var obj = fnGlobalObject(); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - try { - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); - } finally { - delete obj.prop; - delete obj.verifySetFunc; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538-3 +description: > + ES5 Attributes - Updating a named accessor property 'P' whose + [[Configurable]] attribute is true to a data property is + successful, 'O' is the global object +includes: + - runTestCase.js + - fnGlobalObject.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + try { + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); + } finally { + delete obj.prop; + delete obj.verifySetFunc; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-5.js index 5a9e072602..e6b8c1596a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-5.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-5.js - * @description ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'A' is an Array object (8.12.9 - step 9.c.i) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538-5 +description: > + ES5 Attributes - Updating a named accessor property 'P' whose + [[Configurable]] attribute is true to a data property is + successful, 'A' is an Array object (8.12.9 - step 9.c.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-6.js index 680a00f10e..40ce80c5f4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-6.js @@ -1,43 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-6.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is an Arguments object - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - Object.defineProperty(obj, "0", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "0", 1001, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538-6 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' whose + [[Configurable]] attribute is true to a data property is + successful, 'O' is an Arguments object +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + Object.defineProperty(obj, "0", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "0", 1001, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-7.js index f12ffa2cdd..1273fd5e39 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-7.js @@ -1,45 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-7.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is the global object - */ - - -function testcase() { - var obj = fnGlobalObject(); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - try { - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - Object.defineProperty(obj, "0", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "0", 1001, false, true, true); - } finally { - delete obj[0]; - delete obj.verifySetFunc; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538-7 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' whose + [[Configurable]] attribute is true to a data property is + successful, 'O' is the global object +includes: + - runTestCase.js + - fnGlobalObject.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = fnGlobalObject(); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + try { + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + Object.defineProperty(obj, "0", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "0", 1001, false, true, true); + } finally { + delete obj[0]; + delete obj.verifySetFunc; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js index b1ea0ff93a..753a63d816 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && - typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && - dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-538 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is true) to a data property +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value") && + typeof desc2.get === "undefined" && typeof desc2.get === "undefined" && + dataPropertyAttributesAreCorrect(obj, "prop", 1001, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js index ee682019b5..448140a80c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-539 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js index 02e5ac2a10..a7b66c03bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Set]] of 'name' property of 'Attributes' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "property", { - get: function () { - return "property"; - }, - enumerable: false, - configurable: false - }); - - - if (obj.property !== "property") { - return false; - } - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - if (typeof desc.set !== "undefined") { - return false; - } - for (var p in obj) { - if (p === "property") { - return false; - } - } - delete obj.property; - if (!obj.hasOwnProperty("property")) { - return false; - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-54 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Set]] of 'name' property of 'Attributes' is set as undefined + value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "property", { + get: function () { + return "property"; + }, + enumerable: false, + configurable: false + }); + + + if (obj.property !== "property") { + return false; + } + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + if (typeof desc.set !== "undefined") { + return false; + } + for (var p in obj) { + if (p === "property") { + return false; + } + } + delete obj.property; + if (!obj.hasOwnProperty("property")) { + return false; + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js index 5626e010ed..8017d5d92b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js @@ -1,51 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js - * @description Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named accessor property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'O' is an Object object (8.12.9 step 11.a) - */ - - -function testcase() { - var obj = {}; - - obj.verifySetFunction = "data"; - var getFunc = function () { - return obj.verifySetFunction; - }; - var setFunc = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "property", { - get: getFunc, - set: setFunc, - configurable: false - }); - - var result = false; - try { - Object.defineProperty(obj, "property", { - get: function () { - return 100; - } - }); - } catch (e) { - result = e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); - } - - try { - Object.defineProperty(obj, "property", { - set: function (value) { - obj.verifySetFunction1 = value; - } - }); - } catch (e1) { - return result && e1 instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-1 +description: > + Object.defineProperty fails to update [[Get]] and [[Set]] + attributes of a named accessor property 'P' whose [[Configurable]] + attribute is false and throws TypeError exception, 'O' is an + Object object (8.12.9 step 11.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + obj.verifySetFunction = "data"; + var getFunc = function () { + return obj.verifySetFunction; + }; + var setFunc = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "property", { + get: getFunc, + set: setFunc, + configurable: false + }); + + var result = false; + try { + Object.defineProperty(obj, "property", { + get: function () { + return 100; + } + }); + } catch (e) { + result = e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); + } + + try { + Object.defineProperty(obj, "property", { + set: function (value) { + obj.verifySetFunction1 = value; + } + }); + } catch (e1) { + return result && e1 instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-10.js index 71d928f8fb..624bcf53bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-10.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-10.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment is successful, 'O' is an Arguments object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - obj[0] = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc = Object.getOwnPropertyDescriptor(obj, "0"); - - return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-10 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' using + simple assignment is successful, 'O' is an Arguments object + (8.12.5 step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + obj[0] = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc = Object.getOwnPropertyDescriptor(obj, "0"); + + return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-2.js index 0a8f2c4853..b02f2b210d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-2.js @@ -1,51 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-2.js - * @description Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'A' is an Array object (8.12.9 step 11.a) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunction = "data"; - var getFunc = function () { - return obj.verifySetFunction; - }; - var setFunc = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - configurable: false - }); - - var result = false; - try { - Object.defineProperty(obj, "0", { - get: function () { - return 100; - } - }); - } catch (e) { - result = e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); - } - - try { - Object.defineProperty(obj, "0", { - set: function (value) { - obj.verifySetFunction1 = value; - } - }); - } catch (e1) { - return result && e1 instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-2 +description: > + Object.defineProperty fails to update [[Get]] and [[Set]] + attributes of an indexed property 'P' whose [[Configurable]] + attribute is false and throws TypeError exception, 'A' is an Array + object (8.12.9 step 11.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunction = "data"; + var getFunc = function () { + return obj.verifySetFunction; + }; + var setFunc = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + configurable: false + }); + + var result = false; + try { + Object.defineProperty(obj, "0", { + get: function () { + return 100; + } + }); + } catch (e) { + result = e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); + } + + try { + Object.defineProperty(obj, "0", { + set: function (value) { + obj.verifySetFunction1 = value; + } + }); + } catch (e1) { + return result && e1 instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js index 12812946bf..af693e6486 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js @@ -1,53 +1,59 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js - * @description Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named accessor property 'P' whose [[Configurable]] attribute is false, 'O' is an Arguments object (8.12.9 step 11.a) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunction = "data"; - var getFunc = function () { - return obj.verifySetFunction; - }; - var setFunc = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "property", { - get: getFunc, - set: setFunc, - configurable: false - }); - - var result = false; - try { - Object.defineProperty(obj, "property", { - get: function () { - return 100; - } - }); - } catch (e) { - result = e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); - } - - try { - Object.defineProperty(obj, "property", { - set: function (value) { - obj.verifySetFunction1 = value; - } - }); - } catch (e1) { - return result && e1 instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-3 +description: > + Object.defineProperty fails to update [[Get]] and [[Set]] + attributes of a named accessor property 'P' whose [[Configurable]] + attribute is false, 'O' is an Arguments object (8.12.9 step 11.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunction = "data"; + var getFunc = function () { + return obj.verifySetFunction; + }; + var setFunc = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "property", { + get: getFunc, + set: setFunc, + configurable: false + }); + + var result = false; + try { + Object.defineProperty(obj, "property", { + get: function () { + return 100; + } + }); + } catch (e) { + result = e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); + } + + try { + Object.defineProperty(obj, "property", { + set: function (value) { + obj.verifySetFunction1 = value; + } + }); + } catch (e1) { + return result && e1 instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-4.js index abfe7bee9e..cad9c57d3c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-4.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-4.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment is successful, 'A' is an Array object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - obj[0] = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("0"); - var desc = Object.getOwnPropertyDescriptor(obj, "0"); - - return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-4 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' using + simple assignment is successful, 'A' is an Array object (8.12.5 + step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + obj[0] = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("0"); + var desc = Object.getOwnPropertyDescriptor(obj, "0"); + + return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-5.js index 001e9a3c2e..89d4b92819 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-5.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-5.js - * @description ES5 Attributes - Updating a named accessor property 'P' using simple assignment is successful, 'O' is an Arguments object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-5 +description: > + ES5 Attributes - Updating a named accessor property 'P' using + simple assignment is successful, 'O' is an Arguments object + (8.12.5 step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js index 7dc675fec9..b6cf00397c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js @@ -1,51 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js - * @description Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed accessor property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'O' is an Object object (8.12.9 step 11.a) - */ - - -function testcase() { - var obj = {}; - - obj.verifySetFunction = "data"; - var getFunc = function () { - return obj.verifySetFunction; - }; - var setFunc = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - configurable: false - }); - - var result = false; - try { - Object.defineProperty(obj, "0", { - get: function () { - return 100; - } - }); - } catch (e) { - result = e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); - } - - try { - Object.defineProperty(obj, "0", { - set: function (value) { - obj.verifySetFunction1 = value; - } - }); - } catch (e1) { - return result && e1 instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-6 +description: > + Object.defineProperty fails to update [[Get]] and [[Set]] + attributes of an indexed accessor property 'P' whose + [[Configurable]] attribute is false and throws TypeError + exception, 'O' is an Object object (8.12.9 step 11.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + obj.verifySetFunction = "data"; + var getFunc = function () { + return obj.verifySetFunction; + }; + var setFunc = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + configurable: false + }); + + var result = false; + try { + Object.defineProperty(obj, "0", { + get: function () { + return 100; + } + }); + } catch (e) { + result = e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); + } + + try { + Object.defineProperty(obj, "0", { + set: function (value) { + obj.verifySetFunction1 = value; + } + }); + } catch (e1) { + return result && e1 instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js index 135be307f9..bbf262895e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js @@ -1,51 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js - * @description Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'A' is an Array object (8.12.9 step 11.a) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunction = "data"; - var getFunc = function () { - return obj.verifySetFunction; - }; - var setFunc = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - configurable: false - }); - - var result = false; - try { - Object.defineProperty(obj, "prop", { - get: function () { - return 100; - } - }); - } catch (e) { - result = e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction", false, false); - } - - try { - Object.defineProperty(obj, "prop", { - set: function (value) { - obj.verifySetFunction1 = value; - } - }); - } catch (e1) { - return result && e1 instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-7 +description: > + Object.defineProperty fails to update [[Get]] and [[Set]] + attributes of a named property 'P' whose [[Configurable]] + attribute is false and throws TypeError exception, 'A' is an Array + object (8.12.9 step 11.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunction = "data"; + var getFunc = function () { + return obj.verifySetFunction; + }; + var setFunc = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + configurable: false + }); + + var result = false; + try { + Object.defineProperty(obj, "prop", { + get: function () { + return 100; + } + }); + } catch (e) { + result = e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction", false, false); + } + + try { + Object.defineProperty(obj, "prop", { + set: function (value) { + obj.verifySetFunction1 = value; + } + }); + } catch (e1) { + return result && e1 instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js index 19a3d39565..b1851c9504 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js @@ -1,53 +1,60 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js - * @description Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed accessor property 'P' whose [[Configurable]] attribute is false, 'O' is an Arguments object (8.12.9 step 11.a) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunction = "data"; - var getFunc = function () { - return obj.verifySetFunction; - }; - var setFunc = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - configurable: false - }); - - var result = false; - try { - Object.defineProperty(obj, "0", { - get: function () { - return 100; - } - }); - } catch (e) { - result = e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); - } - - try { - Object.defineProperty(obj, "0", { - set: function (value) { - obj.verifySetFunction1 = value; - } - }); - } catch (e1) { - return result && e1 instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-8 +description: > + Object.defineProperty fails to update [[Get]] and [[Set]] + attributes of an indexed accessor property 'P' whose + [[Configurable]] attribute is false, 'O' is an Arguments object + (8.12.9 step 11.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunction = "data"; + var getFunc = function () { + return obj.verifySetFunction; + }; + var setFunc = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + configurable: false + }); + + var result = false; + try { + Object.defineProperty(obj, "0", { + get: function () { + return 100; + } + }); + } catch (e) { + result = e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); + } + + try { + Object.defineProperty(obj, "0", { + set: function (value) { + obj.verifySetFunction1 = value; + } + }); + } catch (e1) { + return result && e1 instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-9.js index f50732dbd2..1adf5ef49a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-9.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-9.js - * @description ES5 Attributes - Updating a named accessor property 'P' using simple assignment is successful, 'A' is an Array object (8.12.5 step 5.b) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540-9 +description: > + ES5 Attributes - Updating a named accessor property 'P' using + simple assignment is successful, 'A' is an Array object (8.12.5 + step 5.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js index 6709f809e5..0101f79fb7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-540 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js index eb8166bd88..f72c21cbc6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return propertyDefineCorrect && desc.enumerable === true; - } - } - - return false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-541 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is false) is + enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return propertyDefineCorrect && desc.enumerable === true; + } + } + + return false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js index e7a8fff154..7519e3a1f1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-542 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is true, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js index 353a38a383..be0fd55645 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js @@ -1,47 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: undefined - }); - - return false; - } catch (e) { - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-543 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: undefined + }); + + return false; + } catch (e) { + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js index 0a714716fc..b62cfb321d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: undefined - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-544 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: undefined + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js index 4a7f30fdbe..9eb04547b8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js @@ -1,56 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: false - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-545 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: false + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js index 8947e4a410..ca8d002ed7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-546 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is true, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-1.js index 4bd7712759..dd7ef5a037 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-1.js @@ -1,45 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-1.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Array object (8.12.9 step 9.a) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - try { - Object.defineProperty(obj, "0", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunc", true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-547-1 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' whose + [[Configurable]] attribute is false to a data property does not + succeed, 'A' is an Array object (8.12.9 step 9.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + try { + Object.defineProperty(obj, "0", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunc", true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-2.js index 9f9a3bd68c..a3a5b8e366 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-2.js @@ -1,47 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-2.js - * @description ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Arguments object (8.12.9 step 9.a) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunc", true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-547-2 +description: > + ES5 Attributes - Updating a named accessor property 'P' whose + [[Configurable]] attribute is false to a data property does not + succeed, 'A' is an Arguments object (8.12.9 step 9.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunc", true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-3.js index c4b1230c16..f0723406d5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-3.js @@ -1,45 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-3.js - * @description ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Array object (8.12.9 step 9.a) - */ - - -function testcase() { - var obj = []; - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunc", true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-547-3 +description: > + ES5 Attributes - Updating a named accessor property 'P' whose + [[Configurable]] attribute is false to a data property does not + succeed, 'A' is an Array object (8.12.9 step 9.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = []; + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunc", true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-4.js index 3bb8eade7a..0c724fb553 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-4.js @@ -1,47 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-4.js - * @description ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Arguments object (8.12.9 step 9.a) - */ - - -function testcase() { - var obj = (function () { - return arguments; - }()); - - obj.verifySetFunc = "data"; - var getFunc = function () { - return obj.verifySetFunc; - }; - - var setFunc = function (value) { - obj.verifySetFunc = value; - }; - - Object.defineProperty(obj, "0", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); - - try { - Object.defineProperty(obj, "0", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunc", true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-547-4 +description: > + ES5 Attributes - Updating an indexed accessor property 'P' whose + [[Configurable]] attribute is false to a data property does not + succeed, 'A' is an Arguments object (8.12.9 step 9.a) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = (function () { + return arguments; + }()); + + obj.verifySetFunc = "data"; + var getFunc = function () { + return obj.verifySetFunc; + }; + + var setFunc = function (value) { + obj.verifySetFunc = value; + }; + + Object.defineProperty(obj, "0", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "0"); + + try { + Object.defineProperty(obj, "0", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "0"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunc", true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js index c9cdb70077..9a303093e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-547 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + a Function, [[Set]] is a Function, [[Enumerable]] is true, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js index cb37e02aa4..25cb80e653 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-548 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js index 68774f754a..f6df5209d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-549 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is true) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js index 83c12fb927..50bb396b9a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Enumerable]] of 'name' property of 'Attributes' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - - var setFunc = function (value) { - obj.setVerifyHelpProp = value; - }; - var getFunc = function () { - return 10; - }; - - Object.defineProperty(obj, "property", { - set: setFunc, - get: getFunc, - configurable: true - }); - return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-55 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Enumerable]] of 'name' property of 'Attributes' is set as false + value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + var setFunc = function (value) { + obj.setVerifyHelpProp = value; + }; + var getFunc = function () { + return 10; + }; + + Object.defineProperty(obj, "property", { + set: setFunc, + get: getFunc, + configurable: true + }); + return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js index 0faf9153a7..e6ee700f4d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-550 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is true) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js index 7ee5963d8b..3fc996d7aa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is deletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-551 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is true) is + deletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js index f0bf34e2e5..f9f1ffb6fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js - * @description ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - get: undefined - }); - - var result2 = typeof obj.prop === "undefined"; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-552 +description: > + ES5 Attributes - success to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + get: undefined + }); + + var result2 = typeof obj.prop === "undefined"; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js index b10c8f9251..cb9e0744b5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js - * @description ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - set: undefined - }); - - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && typeof desc2.set === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-553 +description: > + ES5 Attributes - success to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + set: undefined + }); + + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && typeof desc2.set === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js index 77b26ae9cd..04f5f19fa6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js @@ -1,52 +1,57 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js - * @description ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - Object.defineProperty(obj, "prop", { - enumerable: true - }); - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-554 +description: > + ES5 Attributes - success to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + Object.defineProperty(obj, "prop", { + enumerable: true + }); + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js index e25a6a3f43..f008a75aef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js @@ -1,41 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js - * @description ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - configurable: false - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-555 +description: > + ES5 Attributes - success to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is true) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + configurable: false + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js index d47ba39c05..eb0aa48560 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js - * @description ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: true - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - Object.defineProperty(obj, "prop", { - value: 1001 - }); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-556 +description: > + ES5 Attributes - success to update the accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is true) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: true + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + Object.defineProperty(obj, "prop", { + value: 1001 + }); + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js index 39a46bb9b7..faf06bf10e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js - * @description ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-557 +description: > + ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js index 27413ebeab..bf0ef620f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js - * @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - obj.prop = "overrideData"; - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-558 +description: > + ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] + is a Function, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is false) is the expected function +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + obj.prop = "overrideData"; + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js index e7d93cc7d6..8076ec257a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - for (var p in obj) { - if (p === "prop") { - return false; - } - } - - return propertyDefineCorrect && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-559 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is false) is + non-enumerable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + for (var p in obj) { + if (p === "prop") { + return false; + } + } + + return propertyDefineCorrect && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js index 2c9199ebb1..1b8116b424 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js @@ -1,28 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js - * @description Object.defineProperty - 'name' property doesn't exist in 'O', test [[Configurable]] of 'name' property is set as false if it is absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - var setFunc = function (value) { - obj.setVerifyHelpProp = value; - }; - var getFunc = function () { - return 10; - }; - - Object.defineProperty(obj, "property", { - set: setFunc, - get: getFunc, - enumerable: true - }); - return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-56 +description: > + Object.defineProperty - 'name' property doesn't exist in 'O', test + [[Configurable]] of 'name' property is set as false if it is + absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var setFunc = function (value) { + obj.setVerifyHelpProp = value; + }; + var getFunc = function () { + return 10; + }; + + Object.defineProperty(obj, "property", { + set: setFunc, + get: getFunc, + enumerable: true + }); + return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js index ee6bbe1ae4..813252e94f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js - * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undeletable - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - var propertyDefineCorrect = obj.hasOwnProperty("prop"); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - delete obj.prop; - - return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-560 +description: > + ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a + Function, [[Enumerable]] is false, [[Configurable]] is false) is + undeletable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + var propertyDefineCorrect = obj.hasOwnProperty("prop"); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + delete obj.prop; + + return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js index 7c1dec1c44..5ae3eef61a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js @@ -1,47 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js - * @description ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - var result1 = obj.prop === 1001; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - get: undefined - }); - - return false; - } catch (e) { - var result2 = obj.prop === 1001; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-561 +description: > + ES5 Attributes - fail to update [[Get]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + var result1 = obj.prop === 1001; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + get: undefined + }); + + return false; + } catch (e) { + var result2 = obj.prop === 1001; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js index b5a83cee2a..1f4e78050f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js - * @description ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - set: undefined - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-562 +description: > + ES5 Attributes - fail to update [[Set]] attribute of accessor + property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + set: undefined + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js index 8f3b37cf25..e7cd88cf98 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js @@ -1,56 +1,61 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js - * @description ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - var result1 = false; - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p1 in obj) { - if (p1 === "prop") { - result1 = true; - } - } - - try { - Object.defineProperty(obj, "prop", { - enumerable: true - }); - - return false; - } catch (e) { - var result2 = false; - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - for (var p2 in obj) { - if (p2 === "prop") { - result2 = true; - } - } - - return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-563 +description: > + ES5 Attributes - fail to update [[Enumerable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + var result1 = false; + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p1 in obj) { + if (p1 === "prop") { + result1 = true; + } + } + + try { + Object.defineProperty(obj, "prop", { + enumerable: true + }); + + return false; + } catch (e) { + var result2 = false; + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + for (var p2 in obj) { + if (p2 === "prop") { + result2 = true; + } + } + + return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js index d788a65932..367ef618f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js - * @description ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - configurable: true - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - delete obj.prop; - - return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-564 +description: > + ES5 Attributes - fail to update [[Configurable]] attribute of + accessor property ([[Get]] is a Function, [[Set]] is a Function, + [[Enumerable]] is false, [[Configurable]] is false) to different + value +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + configurable: true + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + delete obj.prop; + + return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js index 996f3c8213..a8c1153708 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js - * @description ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property - */ - - -function testcase() { - var obj = {}; - - var getFunc = function () { - return 1001; - }; - - var verifySetFunc = "data"; - var setFunc = function (value) { - verifySetFunc = value; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc, - set: setFunc, - enumerable: false, - configurable: false - }); - var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { - Object.defineProperty(obj, "prop", { - value: 1001 - }); - - return false; - } catch (e) { - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-565 +description: > + ES5 Attributes - fail to update the accessor property ([[Get]] is + a Function, [[Set]] is a Function, [[Enumerable]] is false, + [[Configurable]] is false) to a data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getFunc = function () { + return 1001; + }; + + var verifySetFunc = "data"; + var setFunc = function (value) { + verifySetFunc = value; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc, + set: setFunc, + enumerable: false, + configurable: false + }); + var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); + + try { + Object.defineProperty(obj, "prop", { + value: 1001 + }); + + return false; + } catch (e) { + var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js index 1882016b2c..4c64428aa2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js - * @description ES5 Attributes - [[Get]] attribute is a function which has zero argument - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 2010; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-566 +description: > + ES5 Attributes - [[Get]] attribute is a function which has zero + argument +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 2010; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js index 640d891a47..52af0c8f51 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js - * @description ES5 Attributes - [[Get]] attribute is a function which has one argument - */ - - -function testcase() { - var obj = {}; - var getFunc = function (arg1) { - return 2010; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-567 +description: > + ES5 Attributes - [[Get]] attribute is a function which has one + argument +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function (arg1) { + return 2010; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js index 1e265a6c78..50309a8300 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js - * @description ES5 Attributes - [[Get]] attribute is a function which has two arguments - */ - - -function testcase() { - var obj = {}; - var getFunc = function (arg1, arg2) { - return 2010; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-568 +description: > + ES5 Attributes - [[Get]] attribute is a function which has two + arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function (arg1, arg2) { + return 2010; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js index 5433189e69..05a4ac76fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js - * @description ES5 Attributes - [[Get]] attribute is a function which contains global variable - */ - - -function testcase() { - var obj = {}; - var globalVariable = 20; - var getFunc = function () { - globalVariable = 2010; - return globalVariable; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.get === getFunc && obj.prop === 2010 && globalVariable === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-569 +description: > + ES5 Attributes - [[Get]] attribute is a function which contains + global variable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var globalVariable = 20; + var getFunc = function () { + globalVariable = 2010; + return globalVariable; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.get === getFunc && obj.prop === 2010 && globalVariable === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js index 0986bba900..31a52d5c95 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js @@ -1,39 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js - * @description Object.defineProperty - 'desc' is accessor descriptor, test updating all attribute values of 'name' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - var setFunc = function (value) { - obj.setVerifyHelpProp = value; - }; - var getFunc = function () { - return 14; - }; - - Object.defineProperty(obj, "property", { - get: function () { - return 11; - }, - set: function (value) { }, - configurable: true, - enumerable: true - }); - - Object.defineProperty(obj, "property", { - get: getFunc, - set: setFunc, - configurable: false, - enumerable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-57 +description: > + Object.defineProperty - 'desc' is accessor descriptor, test + updating all attribute values of 'name' (8.12.9 step 4.b.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var setFunc = function (value) { + obj.setVerifyHelpProp = value; + }; + var getFunc = function () { + return 14; + }; + + Object.defineProperty(obj, "property", { + get: function () { + return 11; + }, + set: function (value) { }, + configurable: true, + enumerable: true + }); + + Object.defineProperty(obj, "property", { + get: getFunc, + set: setFunc, + configurable: false, + enumerable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js index 3a328da09d..c63ed73be4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js - * @description ES5 Attributes - [[Get]] attribute is a function which doesn't contains return statement - */ - - -function testcase() { - var obj = {}; - var verifyExecute = false; - var getFunc = function () { - verifyExecute = true; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.get === getFunc && typeof obj.prop === "undefined" && verifyExecute; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-570 +description: > + ES5 Attributes - [[Get]] attribute is a function which doesn't + contains return statement +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var verifyExecute = false; + var getFunc = function () { + verifyExecute = true; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.get === getFunc && typeof obj.prop === "undefined" && verifyExecute; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js index 34d4deeef9..8a1cb12c95 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js - * @description ES5 Attributes - [[Get]] attribute is a function which involves 'this' object into statement(s) - */ - - -function testcase() { - var obj = { - len: 2010 - }; - var getFunc = function () { - return this; - }; - - Object.defineProperty(obj, "prop", { - get: getFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && obj.prop === obj && desc.get === getFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-571 +description: > + ES5 Attributes - [[Get]] attribute is a function which involves + 'this' object into statement(s) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + len: 2010 + }; + var getFunc = function () { + return this; + }; + + Object.defineProperty(obj, "prop", { + get: getFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && obj.prop === obj && desc.get === getFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js index e220c0bce9..203464e9c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js - * @description ES5 Attributes - [[Set]] attribute is a function which has zero argument - */ - - -function testcase() { - var obj = {}; - - var setFunc = function () { }; - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.set === setFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-572 +description: > + ES5 Attributes - [[Set]] attribute is a function which has zero + argument +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var setFunc = function () { }; + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.set === setFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js index 6f02c91b6b..0a163fb046 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js - * @description ES5 Attributes - [[Set]] attribute is a function which has one argument - */ - - -function testcase() { - var obj = {}; - - var verifySetFunc = 20; - var setFunc = function (value) { - verifySetFunc = value; - }; - Object.defineProperty(obj, "prop", { - set: setFunc - }); - obj.prop = 2010; - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.set === setFunc && verifySetFunc === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-573 +description: > + ES5 Attributes - [[Set]] attribute is a function which has one + argument +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var verifySetFunc = 20; + var setFunc = function (value) { + verifySetFunc = value; + }; + Object.defineProperty(obj, "prop", { + set: setFunc + }); + obj.prop = 2010; + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.set === setFunc && verifySetFunc === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js index 13bac13fd8..fe75f2a270 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js - * @description ES5 Attributes - [[Set]] attribute is a function which has two arguments - */ - - -function testcase() { - var obj = {}; - var firstArg = 12; - var secondArg = 12; - - var setFunc = function (a, b) { - firstArg = a; - secondArg = b; - }; - Object.defineProperty(obj, "prop", { - set: setFunc - }); - obj.prop = 100; - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.set === setFunc && firstArg === 100 && typeof secondArg === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-574 +description: > + ES5 Attributes - [[Set]] attribute is a function which has two + arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var firstArg = 12; + var secondArg = 12; + + var setFunc = function (a, b) { + firstArg = a; + secondArg = b; + }; + Object.defineProperty(obj, "prop", { + set: setFunc + }); + obj.prop = 100; + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.set === setFunc && firstArg === 100 && typeof secondArg === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js index 1a694d0a26..6ba5e1a3b6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js - * @description ES5 Attributes - [[Set]] attribute is a function which contains global variable - */ - - -function testcase() { - var obj = {}; - var globalVariable = 20; - var setFunc = function () { - globalVariable = 2010; - }; - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - obj.prop = 10; - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.set === setFunc && globalVariable === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-575 +description: > + ES5 Attributes - [[Set]] attribute is a function which contains + global variable +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var globalVariable = 20; + var setFunc = function () { + globalVariable = 2010; + }; + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + obj.prop = 10; + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.set === setFunc && globalVariable === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js index 616a392228..0755f0e2da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js - * @description ES5 Attributes - [[Set]] attribute is a function which contains return statement - */ - - -function testcase() { - var obj = {}; - - var setFunc = function () { - return 2010; - }; - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.set === setFunc; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-576 +description: > + ES5 Attributes - [[Set]] attribute is a function which contains + return statement +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var setFunc = function () { + return 2010; + }; + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.set === setFunc; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js index 637b92771d..b345059103 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js - * @description ES5 Attributes - [[Set]] attribute is a function which involves 'this' object into statement(s) - */ - - -function testcase() { - var obj = {}; - - var setFunc = function (value) { - this.len = value; - }; - - Object.defineProperty(obj, "prop", { - set: setFunc - }); - obj.prop = 2010; - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && desc.set === setFunc && obj.len === 2010; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-577 +description: > + ES5 Attributes - [[Set]] attribute is a function which involves + 'this' object into statement(s) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var setFunc = function (value) { + this.len = value; + }; + + Object.defineProperty(obj, "prop", { + set: setFunc + }); + obj.prop = 2010; + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && desc.set === setFunc && obj.len === 2010; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js index 203627997a..2dcb6a1646 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js - * @description ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (String instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(String.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - var strObj = new String(); - - return !strObj.hasOwnProperty("prop") && strObj.prop === "data"; - } finally { - delete String.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-578 +description: > + ES5 Attributes - [[Get]] field of inherited property of + [[Prototype]] internal property is correct (String instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(String.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + var strObj = new String(); + + return !strObj.hasOwnProperty("prop") && strObj.prop === "data"; + } finally { + delete String.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js index 5ec7355f08..71b6717d89 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js - * @description ES5 Attributes - Success to add property into object (Array instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Array.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - var arrObj = []; - arrObj.prop = "myOwnProperty"; - - return !arrObj.hasOwnProperty("prop") && arrObj.prop === "myOwnProperty" && data === "myOwnProperty"; - } finally { - delete Array.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-579 +description: > + ES5 Attributes - Success to add property into object (Array + instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Array.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + var arrObj = []; + arrObj.prop = "myOwnProperty"; + + return !arrObj.hasOwnProperty("prop") && arrObj.prop === "myOwnProperty" && data === "myOwnProperty"; + } finally { + delete Array.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js index 9405027055..2df6ccb9c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js - * @description Object.defineProperty - 'name' is data descriptor and every fields in 'desc' is absent (8.12.9 step 5) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", {}); - return dataPropertyAttributesAreCorrect(obj, "foo", 101, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-58 +description: > + Object.defineProperty - 'name' is data descriptor and every fields + in 'desc' is absent (8.12.9 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", {}); + return dataPropertyAttributesAreCorrect(obj, "foo", 101, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js index 7f1f3dbf35..e9fad5a572 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js - * @description ES5 Attributes - Inherited property is enumerable (Boolean instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Boolean.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - var boolObj = new Boolean(); - var verifyEnumerable = false; - for (var p in boolObj) { - if(p === "prop") { - verifyEnumerable = true; - } - } - - return !boolObj.hasOwnProperty("prop") && verifyEnumerable; - } finally { - delete Boolean.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-580 +description: > + ES5 Attributes - Inherited property is enumerable (Boolean + instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Boolean.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + var boolObj = new Boolean(); + var verifyEnumerable = false; + for (var p in boolObj) { + if(p === "prop") { + verifyEnumerable = true; + } + } + + return !boolObj.hasOwnProperty("prop") && verifyEnumerable; + } finally { + delete Boolean.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js index fbfdd41a8f..ee72423b65 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js - * @description ES5 Attributes - Fail to add property into object (Number instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Number.prototype, "prop", { - get: function () { - return data; - }, - enumerable: false, - configurable: true - }); - var numObj = new Number(); - numObj.prop = "myOwnProperty"; - - return !numObj.hasOwnProperty("prop") && numObj.prop === "data" && data === "data"; - } finally { - delete Number.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-581 +description: ES5 Attributes - Fail to add property into object (Number instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Number.prototype, "prop", { + get: function () { + return data; + }, + enumerable: false, + configurable: true + }); + var numObj = new Number(); + numObj.prop = "myOwnProperty"; + + return !numObj.hasOwnProperty("prop") && numObj.prop === "data" && data === "data"; + } finally { + delete Number.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js index 0921eb47f1..1af5b62ce8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js - * @description ES5 Attributes - Inherited property is non-enumerable (Function instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Function.prototype, "prop", { - get: function () { - return data; - }, - enumerable: false, - configurable: true - }); - var funObj = function () { }; - var verifyEnumerable = false; - for (var p in funObj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !funObj.hasOwnProperty("prop") && !verifyEnumerable; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-582 +description: > + ES5 Attributes - Inherited property is non-enumerable (Function + instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Function.prototype, "prop", { + get: function () { + return data; + }, + enumerable: false, + configurable: true + }); + var funObj = function () { }; + var verifyEnumerable = false; + for (var p in funObj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !funObj.hasOwnProperty("prop") && !verifyEnumerable; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js index eaa760b390..bab9d13948 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js - * @description ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Error Instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Error.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - var errObj = new Error(); - - return !errObj.hasOwnProperty("prop") && errObj.prop === "data"; - } finally { - delete Error.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-583 +description: > + ES5 Attributes - [[Get]] field of inherited property of + [[Prototype]] internal property is correct (Error Instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Error.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + var errObj = new Error(); + + return !errObj.hasOwnProperty("prop") && errObj.prop === "data"; + } finally { + delete Error.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js index 53fd9d9239..a63f587470 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js - * @description ES5 Attributes - Failed to add property into object (Date instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Date.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - var dateObj = new Date(); - dateObj.prop = "myOwnProperty"; - - return !dateObj.hasOwnProperty("prop") && dateObj.prop === "myOwnProperty" && data === "myOwnProperty"; - } finally { - delete Date.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-584 +description: ES5 Attributes - Failed to add property into object (Date instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Date.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + var dateObj = new Date(); + dateObj.prop = "myOwnProperty"; + + return !dateObj.hasOwnProperty("prop") && dateObj.prop === "myOwnProperty" && data === "myOwnProperty"; + } finally { + delete Date.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js index 8bacb1806d..8d33b1e58b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js @@ -1,38 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js - * @description ES5 Attributes - Inherited property is enumerable (RegExp instance) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(RegExp.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - var regObj = new RegExp(); - var verifyEnumerable = false; - for (var p in regObj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !regObj.hasOwnProperty("prop") && verifyEnumerable; - } finally { - delete RegExp.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-585 +description: ES5 Attributes - Inherited property is enumerable (RegExp instance) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(RegExp.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + var regObj = new RegExp(); + var verifyEnumerable = false; + for (var p in regObj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !regObj.hasOwnProperty("prop") && verifyEnumerable; + } finally { + delete RegExp.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js index 76f5408ac0..9c2f6bebe0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js - * @description ES5 Attributes - Fail to update value of property into of [[Proptotype]] internal property (JSON) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Object.prototype, "prop", { - get: function () { - return data; - }, - enumerable: false, - configurable: true - }); - JSON.prop = "myOwnProperty"; - - return !JSON.hasOwnProperty("prop") && JSON.prop === "data" && data === "data"; - } finally { - delete Object.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-586 +description: > + ES5 Attributes - Fail to update value of property into of + [[Proptotype]] internal property (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Object.prototype, "prop", { + get: function () { + return data; + }, + enumerable: false, + configurable: true + }); + JSON.prop = "myOwnProperty"; + + return !JSON.hasOwnProperty("prop") && JSON.prop === "data" && data === "data"; + } finally { + delete Object.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js index 59de6bbd14..e9f85d9b3c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js @@ -1,34 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js - * @description ES5 Attributes - Inherited property is non-enumerable (Math) - */ - - -function testcase() { - var data = "data"; - try { - Object.defineProperty(Object.prototype, "prop", { - get: function () { - return data; - }, - enumerable: false, - configurable: true - }); - var verifyEnumerable = false; - for (var p in Math) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !Math.hasOwnProperty("prop") && !verifyEnumerable; - } finally { - delete Object.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-587 +description: ES5 Attributes - Inherited property is non-enumerable (Math) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + try { + Object.defineProperty(Object.prototype, "prop", { + get: function () { + return data; + }, + enumerable: false, + configurable: true + }); + var verifyEnumerable = false; + for (var p in Math) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !Math.hasOwnProperty("prop") && !verifyEnumerable; + } finally { + delete Object.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js index 0ca8b745d8..b660a5f784 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js @@ -1,55 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js - * @description ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Object.create) - */ - - -function testcase() { - var appointment = {}; - - var data1 = 1001; - Object.defineProperty(appointment, "startTime", { - get: function () { - return data1; - }, - enumerable: true, - configurable: false - }); - var data2 = "NAME"; - Object.defineProperty(appointment, "name", { - get: function () { - return data2; - }, - set: function (value) { - data2 = value; - }, - enumerable: true, - configurable: true - }); - - var meeting = Object.create(appointment); - var data3 = "In-person meeting"; - Object.defineProperty(meeting, "conferenceCall", { - get: function () { - return data3; - }, - enumerable: true, - configurable: false - }); - - var teamMeeting = Object.create(meeting); - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && teamMeeting.name === "NAME" && - teamMeeting.startTime === 1001 && - teamMeeting.conferenceCall === "In-person meeting"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-588 +description: > + ES5 Attributes - [[Get]] field of inherited property of + [[Prototype]] internal property is correct (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + var data1 = 1001; + Object.defineProperty(appointment, "startTime", { + get: function () { + return data1; + }, + enumerable: true, + configurable: false + }); + var data2 = "NAME"; + Object.defineProperty(appointment, "name", { + get: function () { + return data2; + }, + set: function (value) { + data2 = value; + }, + enumerable: true, + configurable: true + }); + + var meeting = Object.create(appointment); + var data3 = "In-person meeting"; + Object.defineProperty(meeting, "conferenceCall", { + get: function () { + return data3; + }, + enumerable: true, + configurable: false + }); + + var teamMeeting = Object.create(meeting); + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && teamMeeting.name === "NAME" && + teamMeeting.startTime === 1001 && + teamMeeting.conferenceCall === "In-person meeting"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js index 1ae6e4812b..1ca23b7c67 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js @@ -1,65 +1,68 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js - * @description ES5 Attributes - Success to update value of property into of [[Proptotype]] internal property (Object.create) - */ - - -function testcase() { - var appointment = {}; - - var data1 = 1001; - Object.defineProperty(appointment, "startTime", { - get: function () { - return data1; - }, - set: function (value) { - data1 = value; - }, - enumerable: true, - configurable: true - }); - var data2 = "NAME"; - Object.defineProperty(appointment, "name", { - get: function () { - return data2; - }, - set: function (value) { - data2 = value; - }, - enumerable: true, - configurable: false - }); - - var meeting = Object.create(appointment); - var data3 = "In-person meeting"; - Object.defineProperty(meeting, "conferenceCall", { - get: function () { - return data3; - }, - set: function (value) { - data3 = value; - }, - enumerable: true, - configurable: false - }); - - var teamMeeting = Object.create(meeting); - teamMeeting.name = "Team Meeting"; - var dateObj = new Date("10/31/2010 08:00"); - teamMeeting.startTime = dateObj; - teamMeeting.conferenceCall = "4255551212"; - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && teamMeeting.name === "Team Meeting" && - teamMeeting.startTime === dateObj && - teamMeeting.conferenceCall === "4255551212"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-589 +description: > + ES5 Attributes - Success to update value of property into of + [[Proptotype]] internal property (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + var data1 = 1001; + Object.defineProperty(appointment, "startTime", { + get: function () { + return data1; + }, + set: function (value) { + data1 = value; + }, + enumerable: true, + configurable: true + }); + var data2 = "NAME"; + Object.defineProperty(appointment, "name", { + get: function () { + return data2; + }, + set: function (value) { + data2 = value; + }, + enumerable: true, + configurable: false + }); + + var meeting = Object.create(appointment); + var data3 = "In-person meeting"; + Object.defineProperty(meeting, "conferenceCall", { + get: function () { + return data3; + }, + set: function (value) { + data3 = value; + }, + enumerable: true, + configurable: false + }); + + var teamMeeting = Object.create(meeting); + teamMeeting.name = "Team Meeting"; + var dateObj = new Date("10/31/2010 08:00"); + teamMeeting.startTime = dateObj; + teamMeeting.conferenceCall = "4255551212"; + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && teamMeeting.name === "Team Meeting" && + teamMeeting.startTime === dateObj && + teamMeeting.conferenceCall === "4255551212"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js index f22db8b83b..8dd4dde8f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js - * @description Object.defineProperty - 'name' is accessor descriptor and every fields in 'desc' is absent (8.12.9 step 5) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 0; - } - function setFunc(value) { - obj.helpVerifySet = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc - }); - - Object.defineProperty(obj, "foo", {}); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "helpVerifySet", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-59 +description: > + Object.defineProperty - 'name' is accessor descriptor and every + fields in 'desc' is absent (8.12.9 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 0; + } + function setFunc(value) { + obj.helpVerifySet = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc + }); + + Object.defineProperty(obj, "foo", {}); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "helpVerifySet", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js index 90e38e8645..9369330a98 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js @@ -1,74 +1,75 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js - * @description ES5 Attributes - Inherited property is enumerable (Object.create) - */ - - -function testcase() { - var appointment = {}; - - var data1 = 1001; - Object.defineProperty(appointment, "startTime", { - get: function () { - return data1; - }, - set: function (value) { - data1 = value; - }, - enumerable: true, - configurable: true - }); - var data2 = "NAME"; - Object.defineProperty(appointment, "name", { - get: function () { - return data2; - }, - set: function (value) { - data2 = value; - }, - enumerable: true, - configurable: false - }); - - var meeting = Object.create(appointment); - var data3 = "In-person meeting"; - Object.defineProperty(meeting, "conferenceCall", { - get: function () { - return data3; - }, - set: function (value) { - data3 = value; - }, - enumerable: true, - configurable: false - }); - - var teamMeeting = Object.create(meeting); - - var verifyTimeProp = false; - var verifyNameProp = false; - var verifyCallProp = false; - for (var p in teamMeeting) { - if (p === "startTime") { - verifyTimeProp = true; - } - if (p === "name") { - verifyNameProp = true; - } - if (p === "conferenceCall") { - verifyCallProp = true; - } - } - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-590 +description: ES5 Attributes - Inherited property is enumerable (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + var data1 = 1001; + Object.defineProperty(appointment, "startTime", { + get: function () { + return data1; + }, + set: function (value) { + data1 = value; + }, + enumerable: true, + configurable: true + }); + var data2 = "NAME"; + Object.defineProperty(appointment, "name", { + get: function () { + return data2; + }, + set: function (value) { + data2 = value; + }, + enumerable: true, + configurable: false + }); + + var meeting = Object.create(appointment); + var data3 = "In-person meeting"; + Object.defineProperty(meeting, "conferenceCall", { + get: function () { + return data3; + }, + set: function (value) { + data3 = value; + }, + enumerable: true, + configurable: false + }); + + var teamMeeting = Object.create(meeting); + + var verifyTimeProp = false; + var verifyNameProp = false; + var verifyCallProp = false; + for (var p in teamMeeting) { + if (p === "startTime") { + verifyTimeProp = true; + } + if (p === "name") { + verifyNameProp = true; + } + if (p === "conferenceCall") { + verifyCallProp = true; + } + } + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js index 79ed156870..c063f60b7f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js @@ -1,56 +1,59 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js - * @description ES5 Attributes - Fail to update value of property of [[Proptotype]] internal property (Object.create) - */ - - -function testcase() { - var appointment = {}; - - var data1 = 1001; - Object.defineProperty(appointment, "startTime", { - get: function () { - return data1; - }, - enumerable: false, - configurable: false - }); - var data2 = "NAME"; - Object.defineProperty(appointment, "name", { - get: function () { - return data2; - }, - enumerable: false, - configurable: true - }); - - var meeting = Object.create(appointment); - var data3 = "In-person meeting"; - Object.defineProperty(meeting, "conferenceCall", { - get: function () { - return data3; - }, - enumerable: false, - configurable: false - }); - - var teamMeeting = Object.create(meeting); - teamMeeting.name = "IE Team Meeting"; - var dateObj = new Date("10/31/2010 08:00"); - teamMeeting.startTime = dateObj; - teamMeeting.conferenceCall = "4255551212"; - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && teamMeeting.name === "NAME" && - teamMeeting.startTime === 1001 && - teamMeeting.conferenceCall === "In-person meeting"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-591 +description: > + ES5 Attributes - Fail to update value of property of + [[Proptotype]] internal property (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + var data1 = 1001; + Object.defineProperty(appointment, "startTime", { + get: function () { + return data1; + }, + enumerable: false, + configurable: false + }); + var data2 = "NAME"; + Object.defineProperty(appointment, "name", { + get: function () { + return data2; + }, + enumerable: false, + configurable: true + }); + + var meeting = Object.create(appointment); + var data3 = "In-person meeting"; + Object.defineProperty(meeting, "conferenceCall", { + get: function () { + return data3; + }, + enumerable: false, + configurable: false + }); + + var teamMeeting = Object.create(meeting); + teamMeeting.name = "IE Team Meeting"; + var dateObj = new Date("10/31/2010 08:00"); + teamMeeting.startTime = dateObj; + teamMeeting.conferenceCall = "4255551212"; + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && teamMeeting.name === "NAME" && + teamMeeting.startTime === 1001 && + teamMeeting.conferenceCall === "In-person meeting"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js index 768c6e82e6..13131c8cce 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js @@ -1,65 +1,68 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js - * @description ES5 Attributes - Inherited property is non-enumerable (Object.create) - */ - - -function testcase() { - var appointment = {}; - - var data1 = 1001; - Object.defineProperty(appointment, "startTime", { - get: function () { - return data1; - }, - enumerable: false, - configurable: true - }); - var data2 = "NAME"; - Object.defineProperty(appointment, "name", { - get: function () { - return data2; - }, - enumerable: false, - configurable: false - }); - - var meeting = Object.create(appointment); - var data3 = "In-person meeting"; - Object.defineProperty(meeting, "conferenceCall", { - get: function () { - return data3; - }, - enumerable: false, - configurable: true - }); - - var teamMeeting = Object.create(meeting); - - var verifyTimeProp = false; - var verifyNameProp = false; - var verifyCallProp = false; - for (var p in teamMeeting) { - if (p === "startTime") { - verifyTimeProp = true; - } - if (p === "name") { - verifyNameProp = true; - } - if (p === "conferenceCall") { - verifyCallProp = true; - } - } - - var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && - !teamMeeting.hasOwnProperty("startTime") && - !teamMeeting.hasOwnProperty('conferenceCall'); - - return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-592 +description: > + ES5 Attributes - Inherited property is non-enumerable + (Object.create) +includes: [runTestCase.js] +---*/ + +function testcase() { + var appointment = {}; + + var data1 = 1001; + Object.defineProperty(appointment, "startTime", { + get: function () { + return data1; + }, + enumerable: false, + configurable: true + }); + var data2 = "NAME"; + Object.defineProperty(appointment, "name", { + get: function () { + return data2; + }, + enumerable: false, + configurable: false + }); + + var meeting = Object.create(appointment); + var data3 = "In-person meeting"; + Object.defineProperty(meeting, "conferenceCall", { + get: function () { + return data3; + }, + enumerable: false, + configurable: true + }); + + var teamMeeting = Object.create(meeting); + + var verifyTimeProp = false; + var verifyNameProp = false; + var verifyCallProp = false; + for (var p in teamMeeting) { + if (p === "startTime") { + verifyTimeProp = true; + } + if (p === "name") { + verifyNameProp = true; + } + if (p === "conferenceCall") { + verifyCallProp = true; + } + } + + var hasOwnProperty = !teamMeeting.hasOwnProperty("name") && + !teamMeeting.hasOwnProperty("startTime") && + !teamMeeting.hasOwnProperty('conferenceCall'); + + return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js index 8cdc6efd5c..e1dcc0cb60 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js - * @description ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - var data = "data"; - try { - Object.defineProperty(Function.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - - var obj = foo.bind({}); - - return !obj.hasOwnProperty("prop") && obj.prop === data; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-593 +description: > + ES5 Attributes - [[Get]] field of inherited property of + [[Prototype]] internal property is correct + (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + var data = "data"; + try { + Object.defineProperty(Function.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + + var obj = foo.bind({}); + + return !obj.hasOwnProperty("prop") && obj.prop === data; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js index ee25ffe10f..0784e1c4c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js - * @description ES5 Attributes - Success to update value of property into of [[Proptotype]] internal property (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - var data = "data"; - try { - Object.defineProperty(Function.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - - var obj = foo.bind({}); - obj.prop = "overrideData"; - - return !obj.hasOwnProperty("prop") && obj.prop === "overrideData"; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-594 +description: > + ES5 Attributes - Success to update value of property into of + [[Proptotype]] internal property (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + var data = "data"; + try { + Object.defineProperty(Function.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + + var obj = foo.bind({}); + obj.prop = "overrideData"; + + return !obj.hasOwnProperty("prop") && obj.prop === "overrideData"; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js index ab1824e31b..6e67ef2203 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js - * @description ES5 Attributes - Inherited property is enumerable (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - var data = "data"; - try { - Object.defineProperty(Function.prototype, "prop", { - get: function () { - return data; - }, - set: function (value) { - data = value; - }, - enumerable: true, - configurable: true - }); - - var obj = foo.bind({}); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !obj.hasOwnProperty("prop") && verifyEnumerable; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-595 +description: > + ES5 Attributes - Inherited property is enumerable + (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + var data = "data"; + try { + Object.defineProperty(Function.prototype, "prop", { + get: function () { + return data; + }, + set: function (value) { + data = value; + }, + enumerable: true, + configurable: true + }); + + var obj = foo.bind({}); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !obj.hasOwnProperty("prop") && verifyEnumerable; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js index ece37b8661..b0f14b119b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js - * @description ES5 Attributes - Fail to update value of property into of [[Proptotype]] internal property (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - var data = "data"; - try { - Object.defineProperty(Function.prototype, "prop", { - get: function () { - return data; - }, - enumerable: false, - configurable: true - }); - - var obj = foo.bind({}); - obj.prop = "overrideData"; - - return !obj.hasOwnProperty("prop") && obj.prop === "data"; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-596 +description: > + ES5 Attributes - Fail to update value of property into of + [[Proptotype]] internal property (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + var data = "data"; + try { + Object.defineProperty(Function.prototype, "prop", { + get: function () { + return data; + }, + enumerable: false, + configurable: true + }); + + var obj = foo.bind({}); + obj.prop = "overrideData"; + + return !obj.hasOwnProperty("prop") && obj.prop === "data"; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js index b867c929a1..7cbde1e027 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js - * @description ES5 Attributes - Inherited property is non-enumerable (Function.prototype.bind) - */ - - -function testcase() { - var foo = function () { }; - var data = "data"; - try { - Object.defineProperty(Function.prototype, "prop", { - get: function () { - return data; - }, - enumerable: false, - configurable: true - }); - - var obj = foo.bind({}); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "prop") { - verifyEnumerable = true; - } - } - - return !obj.hasOwnProperty("prop") && !verifyEnumerable; - } finally { - delete Function.prototype.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-597 +description: > + ES5 Attributes - Inherited property is non-enumerable + (Function.prototype.bind) +includes: [runTestCase.js] +---*/ + +function testcase() { + var foo = function () { }; + var data = "data"; + try { + Object.defineProperty(Function.prototype, "prop", { + get: function () { + return data; + }, + enumerable: false, + configurable: true + }); + + var obj = foo.bind({}); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "prop") { + verifyEnumerable = true; + } + } + + return !obj.hasOwnProperty("prop") && !verifyEnumerable; + } finally { + delete Function.prototype.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js index 8b3fe016f7..822d105d1c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js - * @description ES5 Attributes - all attributes in Object.getPrototypeOf are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.getPrototypeOf; - - try { - Object.getPrototypeOf = "2010"; - - var isWritable = (Object.getPrototypeOf === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "getPrototypeOf") { - isEnumerable = true; - } - } - - delete Object.getPrototypeOf; - - var isConfigurable = !Object.hasOwnProperty("getPrototypeOf"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "getPrototypeOf", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-598 +description: > + ES5 Attributes - all attributes in Object.getPrototypeOf are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.getPrototypeOf; + + try { + Object.getPrototypeOf = "2010"; + + var isWritable = (Object.getPrototypeOf === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "getPrototypeOf") { + isEnumerable = true; + } + } + + delete Object.getPrototypeOf; + + var isConfigurable = !Object.hasOwnProperty("getPrototypeOf"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "getPrototypeOf", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js index b29e86826a..ef604a512d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js - * @description ES5 Attributes - all attributes in Object.getOwnPropertyDescriptor are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.getOwnPropertyDescriptor; - - try { - Object.getOwnPropertyDescriptor = "2010"; - - var isWritable = (Object.getOwnPropertyDescriptor === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "getOwnPropertyDescriptor") { - isEnumerable = true; - } - } - - delete Object.getOwnPropertyDescriptor; - - var isConfigurable = !Object.hasOwnProperty("getOwnPropertyDescriptor"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "getOwnPropertyDescriptor", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-599 +description: > + ES5 Attributes - all attributes in Object.getOwnPropertyDescriptor + are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.getOwnPropertyDescriptor; + + try { + Object.getOwnPropertyDescriptor = "2010"; + + var isWritable = (Object.getOwnPropertyDescriptor === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "getOwnPropertyDescriptor") { + isEnumerable = true; + } + } + + delete Object.getOwnPropertyDescriptor; + + var isConfigurable = !Object.hasOwnProperty("getOwnPropertyDescriptor"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "getOwnPropertyDescriptor", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js index b1724509d1..618cb337da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js @@ -1,50 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 6 of [[DefineOwnProperty]] returns if - * every field of desc also occurs in current and every field in desc has - * the same value as current. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js - * @description Object.defineProperty is no-op if current and desc are the same accessor desc - */ - - -function testcase() { - function sameAccessorDescriptorValues(d1, d2) { - return (d1.get == d2.get && - d1.enumerable == d2.enumerable && - d1.configurable == d2.configurable); - } - - var o = {}; - - // create an accessor property with the following attributes: - // enumerable: true, configurable: true - var desc = { - get: function () {}, - enumerable: true, - configurable: true - }; - - Object.defineProperty(o, "foo", desc); - - // query for, and save, the desc. A subsequent call to defineProperty - // with the same desc should not disturb the property definition. - var d1 = Object.getOwnPropertyDescriptor(o, "foo"); - - // now, redefine the property with the same descriptor - // the property defintion should not get disturbed. - Object.defineProperty(o, "foo", desc); - - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - - if (sameAccessorDescriptorValues(d1, d2) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 6 of [[DefineOwnProperty]] returns if + every field of desc also occurs in current and every field in desc has + the same value as current. +es5id: 15.2.3.6-4-6 +description: > + Object.defineProperty is no-op if current and desc are the same + accessor desc +includes: [runTestCase.js] +---*/ + +function testcase() { + function sameAccessorDescriptorValues(d1, d2) { + return (d1.get == d2.get && + d1.enumerable == d2.enumerable && + d1.configurable == d2.configurable); + } + + var o = {}; + + // create an accessor property with the following attributes: + // enumerable: true, configurable: true + var desc = { + get: function () {}, + enumerable: true, + configurable: true + }; + + Object.defineProperty(o, "foo", desc); + + // query for, and save, the desc. A subsequent call to defineProperty + // with the same desc should not disturb the property definition. + var d1 = Object.getOwnPropertyDescriptor(o, "foo"); + + // now, redefine the property with the same descriptor + // the property defintion should not get disturbed. + Object.defineProperty(o, "foo", desc); + + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + + if (sameAccessorDescriptorValues(d1, d2) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js index bb92e157ea..cffda3eb54 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js - * @description Object.defineProperty - type of desc.value is different from type of name.value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { value: "abc" }); - return dataPropertyAttributesAreCorrect(obj, "foo", "abc", true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-60 +description: > + Object.defineProperty - type of desc.value is different from type + of name.value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { value: "abc" }); + return dataPropertyAttributesAreCorrect(obj, "foo", "abc", true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js index 7cb4418399..2b2f2f7f0f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js - * @description ES5 Attributes - all attributes in Object.getOwnPropertyNames are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.getOwnPropertyNames; - - try { - Object.getOwnPropertyNames = "2010"; - - var isWritable = (Object.getOwnPropertyNames === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "getOwnPropertyNames") { - isEnumerable = true; - } - } - - delete Object.getOwnPropertyNames; - - var isConfigurable = !Object.hasOwnProperty("getOwnPropertyNames"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "getOwnPropertyNames", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-600 +description: > + ES5 Attributes - all attributes in Object.getOwnPropertyNames are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.getOwnPropertyNames; + + try { + Object.getOwnPropertyNames = "2010"; + + var isWritable = (Object.getOwnPropertyNames === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "getOwnPropertyNames") { + isEnumerable = true; + } + } + + delete Object.getOwnPropertyNames; + + var isConfigurable = !Object.hasOwnProperty("getOwnPropertyNames"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "getOwnPropertyNames", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js index cbe186e3a1..3d5f2bd615 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js - * @description ES5 Attributes - all attributes in Object.create are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "create"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.create; - - try { - Object.create = "2010"; - - var isWritable = (Object.create === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "create") { - isEnumerable = true; - } - } - - delete Object.create; - - var isConfigurable = !Object.hasOwnProperty("create"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "create", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-601 +description: ES5 Attributes - all attributes in Object.create are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "create"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.create; + + try { + Object.create = "2010"; + + var isWritable = (Object.create === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "create") { + isEnumerable = true; + } + } + + delete Object.create; + + var isConfigurable = !Object.hasOwnProperty("create"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "create", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js index 61b30ad1f6..b119e99a97 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js - * @description ES5 Attributes - all attributes in Object.defineProperty are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - var temp = Object.defineProperty; - try { - Object.defineProperty = "2010"; - - var isWritable = (Object.defineProperty === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "defineProperty") { - isEnumerable = true; - } - } - - delete Object.defineProperty; - - var isConfigurable = !Object.hasOwnProperty("defineProperty"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty = temp; - Object.defineProperty(Object, "defineProperty", { - enumerable: false - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-602 +description: > + ES5 Attributes - all attributes in Object.defineProperty are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + var temp = Object.defineProperty; + try { + Object.defineProperty = "2010"; + + var isWritable = (Object.defineProperty === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "defineProperty") { + isEnumerable = true; + } + } + + delete Object.defineProperty; + + var isConfigurable = !Object.hasOwnProperty("defineProperty"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty = temp; + Object.defineProperty(Object, "defineProperty", { + enumerable: false + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js index d67b2596b5..327cb0dd6e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js - * @description ES5 Attributes - all attributes in Object.defineProperties are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.defineProperties; - - try { - Object.defineProperties = "2010"; - - var isWritable = (Object.defineProperties === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "defineProperties") { - isEnumerable = true; - } - } - - delete Object.defineProperties; - - var isConfigurable = !Object.hasOwnProperty("defineProperties"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "defineProperties", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-603 +description: > + ES5 Attributes - all attributes in Object.defineProperties are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.defineProperties; + + try { + Object.defineProperties = "2010"; + + var isWritable = (Object.defineProperties === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "defineProperties") { + isEnumerable = true; + } + } + + delete Object.defineProperties; + + var isConfigurable = !Object.hasOwnProperty("defineProperties"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "defineProperties", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js index 73dae60e5a..5022147947 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js - * @description ES5 Attributes - all attributes in Object.seal are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "seal"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.seal; - - try { - Object.seal = "2010"; - - var isWritable = (Object.seal === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "seal") { - isEnumerable = true; - } - } - - delete Object.seal; - - var isConfigurable = !Object.hasOwnProperty("seal"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "seal", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-604 +description: ES5 Attributes - all attributes in Object.seal are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "seal"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.seal; + + try { + Object.seal = "2010"; + + var isWritable = (Object.seal === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "seal") { + isEnumerable = true; + } + } + + delete Object.seal; + + var isConfigurable = !Object.hasOwnProperty("seal"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "seal", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js index aad6bd4fa5..fef986e3d5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js - * @description ES5 Attributes - all attributes in Object.freeze are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "freeze"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.freeze; - - try { - Object.freeze = "2010"; - - var isWritable = (Object.freeze === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "freeze") { - isEnumerable = true; - } - } - - delete Object.freeze; - - var isConfigurable = !Object.hasOwnProperty("freeze"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "freeze", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-605 +description: ES5 Attributes - all attributes in Object.freeze are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "freeze"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.freeze; + + try { + Object.freeze = "2010"; + + var isWritable = (Object.freeze === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "freeze") { + isEnumerable = true; + } + } + + delete Object.freeze; + + var isConfigurable = !Object.hasOwnProperty("freeze"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "freeze", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js index f4528bc56f..f7d808edea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js - * @description ES5 Attributes - all attributes in Object.preventExtensions are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.preventExtensions; - - try { - Object.preventExtensions = "2010"; - - var isWritable = (Object.preventExtensions === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "preventExtensions") { - isEnumerable = true; - } - } - - delete Object.preventExtensions; - - var isConfigurable = !Object.hasOwnProperty("preventExtensions"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "preventExtensions", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-606 +description: > + ES5 Attributes - all attributes in Object.preventExtensions are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.preventExtensions; + + try { + Object.preventExtensions = "2010"; + + var isWritable = (Object.preventExtensions === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "preventExtensions") { + isEnumerable = true; + } + } + + delete Object.preventExtensions; + + var isConfigurable = !Object.hasOwnProperty("preventExtensions"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "preventExtensions", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js index f3bf6fc03d..9861bfc552 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js - * @description ES5 Attributes - all attributes in Object.isSealed are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "isSealed"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.isSealed; - - try { - Object.isSealed = "2010"; - - var isWritable = (Object.isSealed === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "isSealed") { - isEnumerable = true; - } - } - - delete Object.isSealed; - - var isConfigurable = !Object.hasOwnProperty("isSealed"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "isSealed", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-607 +description: ES5 Attributes - all attributes in Object.isSealed are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "isSealed"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.isSealed; + + try { + Object.isSealed = "2010"; + + var isWritable = (Object.isSealed === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "isSealed") { + isEnumerable = true; + } + } + + delete Object.isSealed; + + var isConfigurable = !Object.hasOwnProperty("isSealed"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "isSealed", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js index dac49dd37a..a247ae8407 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js - * @description ES5 Attributes - all attributes in Object.isFrozen are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.isFrozen; - - try { - Object.isFrozen = "2010"; - - var isWritable = (Object.isFrozen === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "isFrozen") { - isEnumerable = true; - } - } - - delete Object.isFrozen; - - var isConfigurable = !Object.hasOwnProperty("isFrozen"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "isFrozen", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-608 +description: ES5 Attributes - all attributes in Object.isFrozen are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.isFrozen; + + try { + Object.isFrozen = "2010"; + + var isWritable = (Object.isFrozen === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "isFrozen") { + isEnumerable = true; + } + } + + delete Object.isFrozen; + + var isConfigurable = !Object.hasOwnProperty("isFrozen"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "isFrozen", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js index ac69ba5083..3acaae55dc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js - * @description ES5 Attributes - all attributes in Object.isExtensible are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.isExtensible; - - try { - Object.isExtensible = "2010"; - - var isWritable = (Object.isExtensible === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "isExtensible") { - isEnumerable = true; - } - } - - delete Object.isExtensible; - - var isConfigurable = !Object.hasOwnProperty("isExtensible"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "isExtensible", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-609 +description: ES5 Attributes - all attributes in Object.isExtensible are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.isExtensible; + + try { + Object.isExtensible = "2010"; + + var isWritable = (Object.isExtensible === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "isExtensible") { + isEnumerable = true; + } + } + + delete Object.isExtensible; + + var isConfigurable = !Object.hasOwnProperty("isExtensible"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "isExtensible", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js index 9d61bb08bd..de032453e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js - * @description Object.defineProperty - both desc.value and name.value are undefined (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: undefined }); - - Object.defineProperty(obj, "foo", { value: undefined }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-61 +description: > + Object.defineProperty - both desc.value and name.value are + undefined (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: undefined }); + + Object.defineProperty(obj, "foo", { value: undefined }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js index 09b6cee63c..bb8a1d36ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js - * @description ES5 Attributes - all attributes in Object.keys are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Object, "keys"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Object.keys; - - try { - Object.keys = "2010"; - - var isWritable = (Object.keys === "2010"); - - var isEnumerable = false; - - for (var prop in Object) { - if (prop === "keys") { - isEnumerable = true; - } - } - - delete Object.keys; - - var isConfigurable = !Object.hasOwnProperty("keys"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Object, "keys", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-610 +description: ES5 Attributes - all attributes in Object.keys are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Object, "keys"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Object.keys; + + try { + Object.keys = "2010"; + + var isWritable = (Object.keys === "2010"); + + var isEnumerable = false; + + for (var prop in Object) { + if (prop === "keys") { + isEnumerable = true; + } + } + + delete Object.keys; + + var isConfigurable = !Object.hasOwnProperty("keys"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Object, "keys", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js index 038b31c38c..3b57df4d1e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js - * @description ES5 Attributes - all attributes in Function.prototype.bind are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Function.prototype.bind; - - try { - Function.prototype.bind = "2010"; - - var isWritable = (Function.prototype.bind === "2010"); - - var isEnumerable = false; - - for (var prop in Function.prototype) { - if (prop === "bind") { - isEnumerable = true; - } - } - - delete Function.prototype.bind; - - var isConfigurable = !Function.prototype.hasOwnProperty("bind"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Function.prototype, "bind", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-611 +description: > + ES5 Attributes - all attributes in Function.prototype.bind are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Function.prototype.bind; + + try { + Function.prototype.bind = "2010"; + + var isWritable = (Function.prototype.bind === "2010"); + + var isEnumerable = false; + + for (var prop in Function.prototype) { + if (prop === "bind") { + isEnumerable = true; + } + } + + delete Function.prototype.bind; + + var isConfigurable = !Function.prototype.hasOwnProperty("bind"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Function.prototype, "bind", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js index 1bcd93bbaa..8bacb04108 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js - * @description ES5 Attributes - all attributes in Array.prototype.indexOf are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.indexOf; - - try { - Array.prototype.indexOf = "2010"; - - var isWritable = (Array.prototype.indexOf === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "indexOf") { - isEnumerable = true; - } - } - - delete Array.prototype.indexOf; - - var isConfigurable = !Array.prototype.hasOwnProperty("indexOf"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "indexOf", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-612 +description: > + ES5 Attributes - all attributes in Array.prototype.indexOf are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.indexOf; + + try { + Array.prototype.indexOf = "2010"; + + var isWritable = (Array.prototype.indexOf === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "indexOf") { + isEnumerable = true; + } + } + + delete Array.prototype.indexOf; + + var isConfigurable = !Array.prototype.hasOwnProperty("indexOf"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "indexOf", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js index fa16480f46..8fa1ecfa20 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js - * @description ES5 Attributes - all attributes in Object.lastIndexOf are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.lastIndexOf; - - try { - Array.prototype.lastIndexOf = "2010"; - - var isWritable = (Array.prototype.lastIndexOf === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "lastIndexOf") { - isEnumerable = true; - } - } - - delete Array.prototype.lastIndexOf; - - var isConfigurable = !Array.prototype.hasOwnProperty("lastIndexOf"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "lastIndexOf", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-613 +description: ES5 Attributes - all attributes in Object.lastIndexOf are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.lastIndexOf; + + try { + Array.prototype.lastIndexOf = "2010"; + + var isWritable = (Array.prototype.lastIndexOf === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "lastIndexOf") { + isEnumerable = true; + } + } + + delete Array.prototype.lastIndexOf; + + var isConfigurable = !Array.prototype.hasOwnProperty("lastIndexOf"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "lastIndexOf", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js index d96f0687ca..a9f2bae48e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js - * @description ES5 Attributes - all attributes in Array.prototype.every are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.every; - - try { - Array.prototype.every = "2010"; - - var isWritable = (Array.prototype.every === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "every") { - isEnumerable = true; - } - } - - delete Array.prototype.every; - - var isConfigurable = !Array.prototype.hasOwnProperty("every"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "every", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-614 +description: > + ES5 Attributes - all attributes in Array.prototype.every are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.every; + + try { + Array.prototype.every = "2010"; + + var isWritable = (Array.prototype.every === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "every") { + isEnumerable = true; + } + } + + delete Array.prototype.every; + + var isConfigurable = !Array.prototype.hasOwnProperty("every"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "every", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js index 7fbaf9f52c..ba81a2a331 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js - * @description ES5 Attributes - all attributes in Array.prototype.some are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.some; - - try { - Array.prototype.some = "2010"; - - var isWritable = (Array.prototype.some === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "some") { - isEnumerable = true; - } - } - - delete Array.prototype.some; - - var isConfigurable = !Array.prototype.hasOwnProperty("some"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "some", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-615 +description: ES5 Attributes - all attributes in Array.prototype.some are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.some; + + try { + Array.prototype.some = "2010"; + + var isWritable = (Array.prototype.some === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "some") { + isEnumerable = true; + } + } + + delete Array.prototype.some; + + var isConfigurable = !Array.prototype.hasOwnProperty("some"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "some", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js index 189e3e03a0..a5a27a43cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js - * @description ES5 Attributes - all attributes in Array.prototype.forEach are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.forEach; - - try { - Array.prototype.forEach = "2010"; - - var isWritable = (Array.prototype.forEach === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "forEach") { - isEnumerable = true; - } - } - - delete Array.prototype.forEach; - - var isConfigurable = !Array.prototype.hasOwnProperty("forEach"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "forEach", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-616 +description: > + ES5 Attributes - all attributes in Array.prototype.forEach are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.forEach; + + try { + Array.prototype.forEach = "2010"; + + var isWritable = (Array.prototype.forEach === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "forEach") { + isEnumerable = true; + } + } + + delete Array.prototype.forEach; + + var isConfigurable = !Array.prototype.hasOwnProperty("forEach"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "forEach", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js index b75875dd53..64b86a657d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js - * @description ES5 Attributes - all attributes in Array.prototype.map are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.map; - - try { - Array.prototype.map = "2010"; - - var isWritable = (Array.prototype.map === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "map") { - isEnumerable = true; - } - } - - delete Array.prototype.map; - - var isConfigurable = !Array.prototype.hasOwnProperty("map"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "map", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-617 +description: ES5 Attributes - all attributes in Array.prototype.map are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.map; + + try { + Array.prototype.map = "2010"; + + var isWritable = (Array.prototype.map === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "map") { + isEnumerable = true; + } + } + + delete Array.prototype.map; + + var isConfigurable = !Array.prototype.hasOwnProperty("map"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "map", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js index 176f934859..dacdd16afa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js - * @description ES5 Attributes - all attributes in Array.prototype.filter are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.filter; - - try { - Array.prototype.filter = "2010"; - - var isWritable = (Array.prototype.filter === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "filter") { - isEnumerable = true; - } - } - - delete Array.prototype.filter; - - var isConfigurable = !Array.prototype.hasOwnProperty("filter"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "filter", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-618 +description: > + ES5 Attributes - all attributes in Array.prototype.filter are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.filter; + + try { + Array.prototype.filter = "2010"; + + var isWritable = (Array.prototype.filter === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "filter") { + isEnumerable = true; + } + } + + delete Array.prototype.filter; + + var isConfigurable = !Array.prototype.hasOwnProperty("filter"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "filter", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js index 3176614926..e47dbfb2ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js - * @description ES5 Attributes - all attributes in Array.prototype.reduce are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.reduce; - - try { - Array.prototype.reduce = "2010"; - - var isWritable = (Array.prototype.reduce === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "reduce") { - isEnumerable = true; - } - } - - delete Array.prototype.reduce; - - var isConfigurable = !Array.prototype.hasOwnProperty("reduce"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "reduce", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-619 +description: > + ES5 Attributes - all attributes in Array.prototype.reduce are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.reduce; + + try { + Array.prototype.reduce = "2010"; + + var isWritable = (Array.prototype.reduce === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "reduce") { + isEnumerable = true; + } + } + + delete Array.prototype.reduce; + + var isConfigurable = !Array.prototype.hasOwnProperty("reduce"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "reduce", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js index 582b4c62c4..cba90524de 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js - * @description Object.defineProperty - both desc.value and name.value are null (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: null }); - - Object.defineProperty(obj, "foo", { value: null }); - return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-62 +description: > + Object.defineProperty - both desc.value and name.value are null + (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: null }); + + Object.defineProperty(obj, "foo", { value: null }); + return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js index 1c77bfccae..19f8972d39 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js - * @description ES5 Attributes - all attributes in Array.prototype.reduceRight are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Array.prototype.reduceRight; - - try { - Array.prototype.reduceRight = "2010"; - - var isWritable = (Array.prototype.reduceRight === "2010"); - - var isEnumerable = false; - - for (var prop in Array.prototype) { - if (prop === "reduceRight") { - isEnumerable = true; - } - } - - delete Array.prototype.reduceRight; - - var isConfigurable = !Array.prototype.hasOwnProperty("reduceRight"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Array.prototype, "reduceRight", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-620 +description: > + ES5 Attributes - all attributes in Array.prototype.reduceRight are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Array.prototype.reduceRight; + + try { + Array.prototype.reduceRight = "2010"; + + var isWritable = (Array.prototype.reduceRight === "2010"); + + var isEnumerable = false; + + for (var prop in Array.prototype) { + if (prop === "reduceRight") { + isEnumerable = true; + } + } + + delete Array.prototype.reduceRight; + + var isConfigurable = !Array.prototype.hasOwnProperty("reduceRight"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Array.prototype, "reduceRight", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js index 48a14ce135..8280c68787 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js - * @description ES5 Attributes - all attributes in String.prototype.trim are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = String.prototype.trim; - - try { - String.prototype.trim = "2010"; - - var isWritable = (String.prototype.trim === "2010"); - - var isEnumerable = false; - - for (var prop in String.prototype) { - if (prop === "trim") { - isEnumerable = true; - } - } - - delete String.prototype.trim; - - var isConfigurable = !String.prototype.hasOwnProperty("trim"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(String.prototype, "trim", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-621 +description: > + ES5 Attributes - all attributes in String.prototype.trim are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = String.prototype.trim; + + try { + String.prototype.trim = "2010"; + + var isWritable = (String.prototype.trim === "2010"); + + var isEnumerable = false; + + for (var prop in String.prototype) { + if (prop === "trim") { + isEnumerable = true; + } + } + + delete String.prototype.trim; + + var isConfigurable = !String.prototype.hasOwnProperty("trim"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(String.prototype, "trim", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js index aae0a80be0..23fffd9574 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js @@ -1,46 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js - * @description ES5 Attributes - all attributes in Date.now are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date, "now"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Date.now; - - try { - Date.now = "2010"; - - var isWritable = (Date.now === "2010"); - - var isEnumerable = false; - - for (var prop in Date) { - if (prop === "now") { - isEnumerable = true; - } - } - - delete Date.now; - - var isConfigurable = !Date.hasOwnProperty("now"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Date, "now", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-622 +description: ES5 Attributes - all attributes in Date.now are correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date, "now"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Date.now; + + try { + Date.now = "2010"; + + var isWritable = (Date.now === "2010"); + + var isEnumerable = false; + + for (var prop in Date) { + if (prop === "now") { + isEnumerable = true; + } + } + + delete Date.now; + + var isConfigurable = !Date.hasOwnProperty("now"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Date, "now", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js index 1b29367a3e..bb7cc9f811 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js - * @description ES5 Attributes - all attributes in Date.prototype.toISOString are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Date.prototype.toISOString; - - try { - Date.prototype.toISOString = "2010"; - - var isWritable = (Date.prototype.toISOString === "2010"); - - var isEnumerable = false; - - for (var prop in Date.prototype) { - if (prop === "toISOString") { - isEnumerable = true; - } - } - - delete Date.prototype.toISOString; - - var isConfigurable = !Date.prototype.hasOwnProperty("toISOString"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Date.prototype, "toISOString", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-623 +description: > + ES5 Attributes - all attributes in Date.prototype.toISOString are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Date.prototype.toISOString; + + try { + Date.prototype.toISOString = "2010"; + + var isWritable = (Date.prototype.toISOString === "2010"); + + var isEnumerable = false; + + for (var prop in Date.prototype) { + if (prop === "toISOString") { + isEnumerable = true; + } + } + + delete Date.prototype.toISOString; + + var isConfigurable = !Date.prototype.hasOwnProperty("toISOString"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Date.prototype, "toISOString", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js index 3b479d488d..68d0a9da51 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js - * @description ES5 Attributes - all attributes in Date.prototype.toJSON are correct - */ - - -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON"); - - var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - - var temp = Date.prototype.toJSON; - - try { - Date.prototype.toJSON = "2010"; - - var isWritable = (Date.prototype.toJSON === "2010"); - - var isEnumerable = false; - - for (var prop in Date.prototype) { - if (prop === "toJSON") { - isEnumerable = true; - } - } - - delete Date.prototype.toJSON; - - var isConfigurable = !Date.prototype.hasOwnProperty("toJSON"); - - return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; - } finally { - Object.defineProperty(Date.prototype, "toJSON", { - value: temp, - writable: true, - enumerable: false, - configurable: true - }); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-624 +description: > + ES5 Attributes - all attributes in Date.prototype.toJSON are + correct +includes: [runTestCase.js] +---*/ + +function testcase() { + var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON"); + + var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); + + var temp = Date.prototype.toJSON; + + try { + Date.prototype.toJSON = "2010"; + + var isWritable = (Date.prototype.toJSON === "2010"); + + var isEnumerable = false; + + for (var prop in Date.prototype) { + if (prop === "toJSON") { + isEnumerable = true; + } + } + + delete Date.prototype.toJSON; + + var isConfigurable = !Date.prototype.hasOwnProperty("toJSON"); + + return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable; + } finally { + Object.defineProperty(Date.prototype, "toJSON", { + value: temp, + writable: true, + enumerable: false, + configurable: true + }); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js index 924e47d107..cabdf81e68 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-625gs.js - * @description Globally declared variable should take precedence over Object.prototype property of the same name - */ - -Object.defineProperty(Object.prototype, - "prop", - { value: 1001, writable: false, enumerable: false, configurable: false} - ); -var prop = 1002; - -if (! (this.hasOwnProperty("prop") && prop === 1002)) { - throw "this.prop should take precedence over Object.prototype.prop"; -} +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-625gs +description: > + Globally declared variable should take precedence over + Object.prototype property of the same name +---*/ + +Object.defineProperty(Object.prototype, + "prop", + { value: 1001, writable: false, enumerable: false, configurable: false} + ); +var prop = 1002; + +if (! (this.hasOwnProperty("prop") && prop === 1002)) { + throw "this.prop should take precedence over Object.prototype.prop"; +} diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js index 02733ff66a..4d324d0f3f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js - * @description Object.defineProperty - both desc.value and name.value are NaN (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: NaN }); - - Object.defineProperty(obj, "foo", { value: NaN }); - - if (!isNaN(obj.foo)) { - return false; - } - - obj.foo = "verifyValue"; - if (obj.foo === "verifyValue") { - return false; - } - - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === "foo") { - return false; - } - } - - delete obj.foo; - if (!obj.hasOwnProperty("foo")) { - return false; - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-63 +description: > + Object.defineProperty - both desc.value and name.value are NaN + (8.12.9 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: NaN }); + + Object.defineProperty(obj, "foo", { value: NaN }); + + if (!isNaN(obj.foo)) { + return false; + } + + obj.foo = "verifyValue"; + if (obj.foo === "verifyValue") { + return false; + } + + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === "foo") { + return false; + } + } + + delete obj.foo; + if (!obj.hasOwnProperty("foo")) { + return false; + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js index 3f60c4f09b..999ea48c52 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js - * @description Object.defineProperty - desc.value = +0 and name.value = -0 (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: -0 }); - - try { - Object.defineProperty(obj, "foo", { value: +0 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-64 +description: > + Object.defineProperty - desc.value = +0 and name.value = -0 + (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: -0 }); + + try { + Object.defineProperty(obj, "foo", { value: +0 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js index 5538ec7a25..3c814ee1b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js - * @description Object.defineProperty - desc.value = -0 and name.value = +0 (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: +0 }); - - try { - Object.defineProperty(obj, "foo", { value: -0 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-65 +description: > + Object.defineProperty - desc.value = -0 and name.value = +0 + (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: +0 }); + + try { + Object.defineProperty(obj, "foo", { value: -0 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js index 7b59c27142..2faf1d5403 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js - * @description Object.defineProperty - desc.value and name.value are two numbers with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { value: 102 }); - return dataPropertyAttributesAreCorrect(obj, "foo", 102, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-66 +description: > + Object.defineProperty - desc.value and name.value are two numbers + with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { value: 102 }); + return dataPropertyAttributesAreCorrect(obj, "foo", 102, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js index 5ce17b5ce4..8b859e1242 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js @@ -1,21 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js - * @description Object.defineProperty - both desc.value and name.value are two strings which have same length and same characters in corresponding positions (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: "abcd" }); - - Object.defineProperty(obj, "foo", { value: "abcd" }); - return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-67 +description: > + Object.defineProperty - both desc.value and name.value are two + strings which have same length and same characters in + corresponding positions (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: "abcd" }); + + Object.defineProperty(obj, "foo", { value: "abcd" }); + return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js index 8b60868dbd..13ca0e7248 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js - * @description Object.defineProperty - desc.value and name.value are two strings with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = "abcd"; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { value: "fghj" }); - return dataPropertyAttributesAreCorrect(obj, "foo", "fghj", true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-68 +description: > + Object.defineProperty - desc.value and name.value are two strings + with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = "abcd"; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { value: "fghj" }); + return dataPropertyAttributesAreCorrect(obj, "foo", "fghj", true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js index e00bc118be..d7a79be7da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js - * @description Object.defineProperty - both desc.value and name.value are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { value: true }); - - Object.defineProperty(obj, "foo", { value: true }); - return dataPropertyAttributesAreCorrect(obj, "foo", true, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-69 +description: > + Object.defineProperty - both desc.value and name.value are boolean + values with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { value: true }); + + Object.defineProperty(obj, "foo", { value: true }); + return dataPropertyAttributesAreCorrect(obj, "foo", true, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js index d9d86c0ba4..da21e20d4f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 7a of [[DefineOwnProperty]] rejects if - * current.[[Configurable]] is false and desc.[[Configurable]] is true. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js - * @description Object.defineProperty throws TypeError when changing [[Configurable]] from false to true - */ - - -function testcase() { - var o = {}; - - // create a data valued property; all other attributes default to false. - var d1 = { value: 101, configurable: false }; - Object.defineProperty(o, "foo", d1); - - var desc = { value: 101, configurable: true }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.value === 101 && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 7a of [[DefineOwnProperty]] rejects if + current.[[Configurable]] is false and desc.[[Configurable]] is true. +es5id: 15.2.3.6-4-7 +description: > + Object.defineProperty throws TypeError when changing + [[Configurable]] from false to true +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data valued property; all other attributes default to false. + var d1 = { value: 101, configurable: false }; + Object.defineProperty(o, "foo", d1); + + var desc = { value: 101, configurable: true }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.value === 101 && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js index 8cbd26969a..fc8b770fb2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js - * @description Object.defineProperty - desc.value and name.value are two boolean values with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperty(obj, "foo", { value: false }); - return dataPropertyAttributesAreCorrect(obj, "foo", false, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-70 +description: > + Object.defineProperty - desc.value and name.value are two boolean + values with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperty(obj, "foo", { value: false }); + return dataPropertyAttributesAreCorrect(obj, "foo", false, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js index 02878239e0..5d9ff11379 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js - * @description Object.defineProperty - both desc.value and name.value are Ojbects which refer to the same Object (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - - Object.defineProperty(obj, "foo", { value: obj1 }); - - Object.defineProperty(obj, "foo", { value: obj1 }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-71 +description: > + Object.defineProperty - both desc.value and name.value are Ojbects + which refer to the same Object (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + + Object.defineProperty(obj, "foo", { value: obj1 }); + + Object.defineProperty(obj, "foo", { value: obj1 }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js index 09a0aba9b4..8100afcb5f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js - * @description Object.defineProperty - desc.value and name.value are two Ojbects which refer to the different objects (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true - - var obj2 = { length: 20 }; - - Object.defineProperty(obj, "foo", { value: obj2 }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj2, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-72 +description: > + Object.defineProperty - desc.value and name.value are two Ojbects + which refer to the different objects (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true + + var obj2 = { length: 20 }; + + Object.defineProperty(obj, "foo", { value: obj2 }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj2, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js index c45f4fd318..9627ae96fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js - * @description Object.defineProperty - both desc.writable and name.writable are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { writable: false}); - - Object.defineProperty(obj, "foo", { writable: false }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-73 +description: > + Object.defineProperty - both desc.writable and name.writable are + boolean values with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { writable: false}); + + Object.defineProperty(obj, "foo", { writable: false }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js index b933de520b..39280eaedd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js - * @description Object.defineProperty - desc.writable and name.writable are two boolean values with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { writable: false, configurable: true }); - - Object.defineProperty(obj, "foo", { writable: true }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-74 +description: > + Object.defineProperty - desc.writable and name.writable are two + boolean values with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { writable: false, configurable: true }); + + Object.defineProperty(obj, "foo", { writable: true }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js index 93e983b8be..2cf4f21216 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js - * @description Object.defineProperty - both desc.[[Get]] and name.[[Get]] are two objects which refer to the same object (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - function setFunc(value) { - obj.helpVerifySet = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc - }); - - Object.defineProperty(obj, "foo", { get: getFunc }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "helpVerifySet", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-75 +description: > + Object.defineProperty - both desc.[[Get]] and name.[[Get]] are two + objects which refer to the same object (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + function setFunc(value) { + obj.helpVerifySet = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc + }); + + Object.defineProperty(obj, "foo", { get: getFunc }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "helpVerifySet", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js index 40e31f14c2..943413aca1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js - * @description Object.defineProperty - desc.[[Get]] and name.[[Get]] are two objects which refer to the different objects (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function getFunc1() { - return 10; - } - function setFunc1(value) { - obj.helpVerifySet = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc1, - set: setFunc1, - configurable: true - }); - - function getFunc2() { - return 20; - } - - Object.defineProperty(obj, "foo", { get: getFunc2 }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc1, "helpVerifySet", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-76 +description: > + Object.defineProperty - desc.[[Get]] and name.[[Get]] are two + objects which refer to the different objects (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc1() { + return 10; + } + function setFunc1(value) { + obj.helpVerifySet = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc1, + set: setFunc1, + configurable: true + }); + + function getFunc2() { + return 20; + } + + Object.defineProperty(obj, "foo", { get: getFunc2 }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc1, "helpVerifySet", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js index ae16bedc08..7903793195 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js - * @description Object.defineProperty - both desc.[[Set]] and name.[[Set]] are two objects which refer to the same object (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { set: setFunc }); - - Object.defineProperty(obj, "foo", { set: setFunc }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-77 +description: > + Object.defineProperty - both desc.[[Set]] and name.[[Set]] are two + objects which refer to the same object (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { set: setFunc }); + + Object.defineProperty(obj, "foo", { set: setFunc }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js index ed4a0d89a9..df7d3b47a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js - * @description Object.defineProperty - desc.[[Set]] and name.[[Set]] are two objects which refer to the different objects (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function setFunc1() { } - - Object.defineProperty(obj, "foo", { - set: setFunc1, - configurable: true - }); - - function setFunc2(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { set: setFunc2 }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc2, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-78 +description: > + Object.defineProperty - desc.[[Set]] and name.[[Set]] are two + objects which refer to the different objects (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function setFunc1() { } + + Object.defineProperty(obj, "foo", { + set: setFunc1, + configurable: true + }); + + function setFunc2(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { set: setFunc2 }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc2, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js index 1d6c8d9d27..122ec04648 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js - * @description Object.defineProperty - both desc.enumerable and name.enumerable are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { enumerable: false }); - - Object.defineProperty(obj, "foo", { enumerable: false }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-79 +description: > + Object.defineProperty - both desc.enumerable and name.enumerable + are boolean values with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { enumerable: false }); + + Object.defineProperty(obj, "foo", { enumerable: false }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js index 72ff05af9d..3469d1cf1c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if - * current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations - * of each other. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js - * @description Object.defineProperty throws TypeError when changing [[Enumerable]] from false to true on non-configurable data properties - */ - - -function testcase() { - var o = {}; - - // create a data valued property; all other attributes default to false. - var d1 = { value: 101, enumerable: false, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // now, setting enumerable to true should fail, since [[Configurable]] - // on the original property will be false. - var desc = { value: 101, enumerable: true }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.value === 101 && - d2.enumerable === false && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if + current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations + of each other. +es5id: 15.2.3.6-4-8 +description: > + Object.defineProperty throws TypeError when changing + [[Enumerable]] from false to true on non-configurable data + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data valued property; all other attributes default to false. + var d1 = { value: 101, enumerable: false, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // now, setting enumerable to true should fail, since [[Configurable]] + // on the original property will be false. + var desc = { value: 101, enumerable: true }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.value === 101 && + d2.enumerable === false && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js index 45dade8167..2b4cb7dcde 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js - * @description Object.defineProperty - desc.enumerable and name.enumerable are boolean negation of each other (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { enumerable: false, configurable: true }); - - Object.defineProperty(obj, "foo", { enumerable: true }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-80 +description: > + Object.defineProperty - desc.enumerable and name.enumerable are + boolean negation of each other (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { enumerable: false, configurable: true }); + + Object.defineProperty(obj, "foo", { enumerable: true }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js index 5fe6acada7..f32840dfdc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js - * @description Object.defineProperty - both desc.configurable and name.configurable are booleans with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { configurable: false }); - - Object.defineProperty(obj, "foo", { configurable: false }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-81 +description: > + Object.defineProperty - both desc.configurable and + name.configurable are booleans with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { configurable: false }); + + Object.defineProperty(obj, "foo", { configurable: false }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js index e7fdde43c3..769cd95b32 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js @@ -1,29 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as false, 'name' property is a data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-1 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which only contains [[Enumerable]] + attribute as false, 'name' property is a data property (8.12.9 + step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js index 785d45f77b..a05dceb4e1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute is false, 'name' property is an accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: true, - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-10 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [[Enumerable]] + attribute as true and [[Configurable]] attribute is false, 'name' + property is an accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: true, + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js index 3e0c8daea0..2fac9a50e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js - * @description Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false, - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-11 +description: > + Object.defineProperty - Update [[Enumerable]] and [[Configurable]] + attributes of 'name' property to false successfully when + [[Enumerable]] and [[Configurable]] attributes of 'name' property + are true, the 'desc' is a generic descriptor which contains + [[Enumerable]] and [[Configurable]] attributes as false, 'name' + property is an accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: false, + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js index ae8dc1d7b0..24cc41f2cf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js @@ -1,35 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js - * @description Object.defineProperty - Update [[Enumerable]] attributes of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: true - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-12 +description: > + Object.defineProperty - Update [[Enumerable]] attributes of 'name' + property to true successfully when [[Enumerable]] attribute of + 'name' is false and [[Configurable]] attribute of 'name' is true, + the 'desc' is a generic descriptor which only contains + [[Enumerable]] attribute as true, 'name' property is an accessor + property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: true + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js index db242f2557..ae0699c336 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js @@ -1,29 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as false, 'name' property is an index data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-13 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which only contains [[Enumerable]] + attribute as false, 'name' property is an index data property + (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js index f4fb29329f..ef0755d245 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as false and [[Configurable]] attribute as true, 'name' property is an index data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: false, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-14 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [[Enumerable]] + attribute as false and [[Configurable]] attribute as true, 'name' + property is an index data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: false, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js index 9b5cb812a9..b3189647c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js @@ -1,29 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Configurable]] attribute of 'name' property is true, the 'desc' is a generic descriptor which contains [[Configurable]] attribute as false, 'name' property is an index data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-15 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Configurable]] + attribute of 'name' property is true, the 'desc' is a generic + descriptor which contains [[Configurable]] attribute as false, + 'name' property is an index data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js index 43ee9c892a..b4ed23d8cb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute as false, 'name' property is an index data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: true, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-16 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [[Enumerable]] + attribute as true and [[Configurable]] attribute as false, 'name' + property is an index data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: true, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js index 79df0b86a4..448d8c7751 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js - * @description Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an index data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: false, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-17 +description: > + Object.defineProperty - Update [[Enumerable]] and [[Configurable]] + attributes of 'name' property to false successfully when + [[Enumerable]] and [[Configurable]] attributes of 'name' property + are true, the 'desc' is a generic descriptor which contains + [[Enumerable]] and [[Configurable]] attributes as false, 'name' + property is an index data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: false, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js index c935503f2b..614ad6039e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js @@ -1,29 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an index data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: true, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: true - }); - - return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-18 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to true successfully when [[Enumerable]] attribute of + 'name' is false and [[Configurable]] attribute of 'name' is true, + the 'desc' is a generic descriptor which only contains + [[Enumerable]] attribute as true, 'name' property is an index data + property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: true + }); + + return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js index e64f31c8fc..939fd49d18 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js @@ -1,35 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [Enumerable]] attribute as false and 'name' property is an index accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-19 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which only contains [Enumerable]] + attribute as false and 'name' property is an index accessor + property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js index 7b8bb7b542..87966dcce4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as false and [[Configurable]] attribute as true, 'name' property is a data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false, - configurable: true - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-2 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [[Enumerable]] + attribute as false and [[Configurable]] attribute as true, 'name' + property is a data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: false, + configurable: true + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js index 8d81f176dc..386f5cf2bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [Enumerable]] attribute as false and [[Configurable]] property is true, 'name' property is an index accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: false, - configurable: true - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-20 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [Enumerable]] + attribute as false and [[Configurable]] property is true, 'name' + property is an index accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: false, + configurable: true + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js index 547a29d845..4a6e5e620c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js @@ -1,35 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Configurable]] attribute as false, 'name' property is an index accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-21 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which only contains + [[Configurable]] attribute as false, 'name' property is an index + accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js index b2cbc501c3..fceaa5941a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute is false, 'name' property is an index accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: true, - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-22 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [[Enumerable]] + attribute as true and [[Configurable]] attribute is false, 'name' + property is an index accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: true, + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js index 1acfafee43..29a637a453 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js - * @description Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an index accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: false, - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-23 +description: > + Object.defineProperty - Update [[Enumerable]] and [[Configurable]] + attributes of 'name' property to false successfully when + [[Enumerable]] and [[Configurable]] attributes of 'name' property + are true, the 'desc' is a generic descriptor which contains + [[Enumerable]] and [[Configurable]] attributes as false, 'name' + property is an index accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: false, + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js index ea23ee7de2..ea8c8f96b1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js @@ -1,35 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js - * @description Object.defineProperty - Update [[Enumerable]] attributes of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an index accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "0", { - get: get_func, - set: set_func, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "0", { - enumerable: true - }); - - return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-24 +description: > + Object.defineProperty - Update [[Enumerable]] attributes of 'name' + property to true successfully when [[Enumerable]] attribute of + 'name' is false and [[Configurable]] attribute of 'name' is true, + the 'desc' is a generic descriptor which only contains + [[Enumerable]] attribute as true, 'name' property is an index + accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "0", { + get: get_func, + set: set_func, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "0", { + enumerable: true + }); + + return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js index 45234601ef..c7feb4307f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js @@ -1,29 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Configurable]] attribute of 'name' property is true, the 'desc' is a generic descriptor which contains [[Configurable]] attribute as false, 'name' property is a data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-3 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Configurable]] + attribute of 'name' property is true, the 'desc' is a generic + descriptor which contains [[Configurable]] attribute as false, + 'name' property is a data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js index b211bd757d..9a0acc052d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute as false, 'name' property is a data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: true, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-4 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [[Enumerable]] + attribute as true and [[Configurable]] attribute as false, 'name' + property is a data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: true, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js index ba167dde25..78a4d85949 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js - * @description Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is a data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false, - configurable: false - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-5 +description: > + Object.defineProperty - Update [[Enumerable]] and [[Configurable]] + attributes of 'name' property to false successfully when + [[Enumerable]] and [[Configurable]] attributes of 'name' property + are true, the 'desc' is a generic descriptor which contains + [[Enumerable]] and [[Configurable]] attributes as false, 'name' + property is a data property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: false, + configurable: false + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js index b11388da99..1367232c37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js @@ -1,29 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is a data property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 1001, - writable: true, - enumerable: false, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: true - }); - - return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-6 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to true successfully when [[Enumerable]] attribute of + 'name' is false and [[Configurable]] attribute of 'name' is true, + the 'desc' is a generic descriptor which only contains + [[Enumerable]] attribute as true, 'name' property is a data + property (8.12.9 step 8) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: false, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: true + }); + + return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js index cdcb1286e3..d49a50b5e4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js @@ -1,35 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [Enumerable]] attribute as false and 'name' property is an accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-7 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which only contains [Enumerable]] + attribute as false and 'name' property is an accessor property + (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js index 23df37c127..3cad3541ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js @@ -1,36 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js - * @description Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [Enumerable]] attribute as false and [[Configurable]] property is true, 'name' property is an accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - enumerable: false, - configurable: true - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-8 +description: > + Object.defineProperty - Update [[Enumerable]] attribute of 'name' + property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which contains [Enumerable]] + attribute as false and [[Configurable]] property is true, 'name' + property is an accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + enumerable: false, + configurable: true + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js index 5cb332369f..a8b2def02a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js @@ -1,35 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js - * @description Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Configurable]] attribute as false, 'name' property is an accessor property (8.12.9 step 8) - */ - - -function testcase() { - - var obj = {}; - obj.verifySetFunction = "data"; - var get_func = function () { - return obj.verifySetFunction; - }; - var set_func = function (value) { - obj.verifySetFunction = value; - }; - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperty(obj, "foo", { - configurable: false - }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82-9 +description: > + Object.defineProperty - Update [[Configurable]] attribute of + 'name' property to false successfully when [[Enumerable]] and + [[Configurable]] attributes of 'name' property are true, the + 'desc' is a generic descriptor which only contains + [[Configurable]] attribute as false, 'name' property is an + accessor property (8.12.9 step 8) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.verifySetFunction = "data"; + var get_func = function () { + return obj.verifySetFunction; + }; + var set_func = function (value) { + obj.verifySetFunction = value; + }; + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperty(obj, "foo", { + configurable: false + }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js index 4f90454af5..22f8911a75 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js - * @description Object.defineProperty - desc.configurable and name.configurable are boolean negation of each other (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { configurable: true }); - - Object.defineProperty(obj, "foo", { configurable: false }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-82 +description: > + Object.defineProperty - desc.configurable and name.configurable + are boolean negation of each other (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { configurable: true }); + + Object.defineProperty(obj, "foo", { configurable: false }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js index 6199a0f017..0516f9521b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js - * @description Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = undefined and desc.value = undefined (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: undefined, - writable: false, - configurable: false - }); - - Object.defineProperty(obj, "foo", { - value: undefined, - writable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-83 +description: > + Object.defineProperty will not throw TypeError if + name.configurable = false, name.writable = false, name.value = + undefined and desc.value = undefined (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: undefined, + writable: false, + configurable: false + }); + + Object.defineProperty(obj, "foo", { + value: undefined, + writable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js index d36d691b58..732f8f3d81 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js - * @description Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = null and desc.value = null (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: null, - writable: false, - configurable: false - }); - - Object.defineProperty(obj, "foo", { - value: null, - writable: false, - configurable: false - }); - return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-84 +description: > + Object.defineProperty will not throw TypeError if + name.configurable = false, name.writable = false, name.value = + null and desc.value = null (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: null, + writable: false, + configurable: false + }); + + Object.defineProperty(obj, "foo", { + value: null, + writable: false, + configurable: false + }); + return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js index fbda3581d1..fae677cac9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js @@ -1,50 +1,54 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js - * @description Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = NaN and desc.value = NaN (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: NaN, - writable: false, - configurable: false - }); - - Object.defineProperty(obj, "foo", { - value: NaN, - writable: false, - configurable: false - }); - - if (!isNaN(obj.foo)) { - return false; - } - - obj.foo = "verifyValue"; - if (obj.foo === "verifyValue") { - return false; - } - - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && prop === "foo") { - return false; - } - } - - delete obj.foo; - if (!obj.hasOwnProperty("foo")) { - return false; - } - - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-85 +description: > + Object.defineProperty will not throw TypeError if + name.configurable = false, name.writable = false, name.value = NaN + and desc.value = NaN (8.12.9 step 10.a.ii.1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: NaN, + writable: false, + configurable: false + }); + + Object.defineProperty(obj, "foo", { + value: NaN, + writable: false, + configurable: false + }); + + if (!isNaN(obj.foo)) { + return false; + } + + obj.foo = "verifyValue"; + if (obj.foo === "verifyValue") { + return false; + } + + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === "foo") { + return false; + } + } + + delete obj.foo; + if (!obj.hasOwnProperty("foo")) { + return false; + } + + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js index 0692879308..70df96be68 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value = +0 and name.value = -0 (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: -0, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: +0 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-86 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.writable = false, desc.value = +0 and name.value = + -0 (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: -0, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: +0 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js index 146360732d..18c7b2fec3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value = -0 and name.value = +0 (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: +0, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: -0 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-87 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.writable = false, desc.value = -0 and name.value = + +0 (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: +0, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: -0 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js index a54c9a03df..de86c82c16 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js - * @description Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two numbers with the same value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 100, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: 100 }); - return dataPropertyAttributesAreCorrect(obj, "foo", 100, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-88 +description: > + Object.defineProperty will not throw TypeError when + name.configurable = false, name.writable = false, desc.value and + name.value are two numbers with the same value (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 100, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: 100 }); + return dataPropertyAttributesAreCorrect(obj, "foo", 100, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js index cce60fc0f4..340f34baa8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two numbers with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: 20 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-89 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.writable = false, desc.value and name.value are two + numbers with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: 20 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js index 618b974e05..9e2335b11d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method - * of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if - * current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations - * of each other. - * - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js - * @description Object.defineProperty throws TypeError when changing [[Enumerable]] from true to false on non-configurable data properties - */ - - -function testcase() { - var o = {}; - - // create a data valued property with [[Enumerable]] explicitly set to true; - // all other attributes default to false. - var d1 = { value: 101, enumerable: true, configurable: false }; - Object.defineProperty(o, "foo", d1); - - // now, setting enumerable to false should fail, since [[Configurable]] - // on the original property will be false. - var desc = { value: 101, enumerable: false }; - - try { - Object.defineProperty(o, "foo", desc); - } - catch (e) { - if (e instanceof TypeError) { - // the property should remain unchanged. - var d2 = Object.getOwnPropertyDescriptor(o, "foo"); - if (d2.value === 101 && - d2.enumerable === true && - d2.configurable === false) { - return true; - } - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method + of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if + current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations + of each other. +es5id: 15.2.3.6-4-9 +description: > + Object.defineProperty throws TypeError when changing + [[Enumerable]] from true to false on non-configurable data + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = {}; + + // create a data valued property with [[Enumerable]] explicitly set to true; + // all other attributes default to false. + var d1 = { value: 101, enumerable: true, configurable: false }; + Object.defineProperty(o, "foo", d1); + + // now, setting enumerable to false should fail, since [[Configurable]] + // on the original property will be false. + var desc = { value: 101, enumerable: false }; + + try { + Object.defineProperty(o, "foo", desc); + } + catch (e) { + if (e instanceof TypeError) { + // the property should remain unchanged. + var d2 = Object.getOwnPropertyDescriptor(o, "foo"); + if (d2.value === 101 && + d2.enumerable === true && + d2.configurable === false) { + return true; + } + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js index b0a2872abb..3557a0de82 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js - * @description Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two strings with the same value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: "abcd", - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: "abcd" }); - return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-90 +description: > + Object.defineProperty will not throw TypeError when + name.configurable = false, name.writable = false, desc.value and + name.value are two strings with the same value (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: "abcd", + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: "abcd" }); + return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js index 53096d5f1d..eb7d259f31 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two strings with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: "abcd", - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: "fghj" }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-91 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.writable = false, desc.value and name.value are two + strings with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: "abcd", + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: "fghj" }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js index 339056a448..fe298d2a64 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js - * @description Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two booleans with the same value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: false, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: false }); - return dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-92 +description: > + Object.defineProperty will not throw TypeError when + name.configurable = false, name.writable = false, desc.value and + name.value are two booleans with the same value (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: false, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: false }); + return dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js index a58fa696fb..4d58ee2ea2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two booleans with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: false, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: true }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-93 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.writable = false, desc.value and name.value are two + booleans with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: false, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: true }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js index 2b14294467..c12367ddb0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js - * @description Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two Objects refer to the same object (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - - Object.defineProperty(obj, "foo", { - value: obj1, - writable: false, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { value: obj1 }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-94 +description: > + Object.defineProperty will not throw TypeError when + name.configurable = false, name.writable = false, desc.value and + name.value are two Objects refer to the same object (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + + Object.defineProperty(obj, "foo", { + value: obj1, + writable: false, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { value: obj1 }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js index d175f92ac4..a41f683145 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two objects which refer to the different objects (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - - Object.defineProperty(obj, "foo", { - value: obj1, - writable: false, - configurable: false - }); - - var obj2 = { length: 20 }; - - try { - Object.defineProperty(obj, "foo", { value: obj2 }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-95 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.writable = false, desc.value and name.value are two + objects which refer to the different objects (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + + Object.defineProperty(obj, "foo", { + value: obj1, + writable: false, + configurable: false + }); + + var obj2 = { length: 20 }; + + try { + Object.defineProperty(obj, "foo", { value: obj2 }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js index 061dac5acb..ba8ab66ea8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js - * @description Object.defineProperty will not throw TypeError when name.configurable = false, both desc.[[Set]] and name.[[Set]] are two objects which refer to the same object (8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: setFunc, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { set: setFunc }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-96 +description: > + Object.defineProperty will not throw TypeError when + name.configurable = false, both desc.[[Set]] and name.[[Set]] are + two objects which refer to the same object (8.12.9 step 11.a.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: setFunc, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { set: setFunc }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js index 5eb9455c31..93ec84c6c1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js @@ -1,38 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.[[Set]] is undefined, desc.[[Set]] refers to an object (8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return "property"; - } - - Object.defineProperty(obj, "property", { - get: getFunc, - configurable: false - }); - - try { - Object.defineProperty(obj, "property", { - get: getFunc, - set: function () { }, - configurable: false - }); - - return false; - } catch (e) { - return e instanceof TypeError && - accessorPropertyAttributesAreCorrect(obj, "property", getFunc, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-97 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.[[Set]] is undefined, desc.[[Set]] refers to an + object (8.12.9 step 11.a.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return "property"; + } + + Object.defineProperty(obj, "property", { + get: getFunc, + configurable: false + }); + + try { + Object.defineProperty(obj, "property", { + get: getFunc, + set: function () { }, + configurable: false + }); + + return false; + } catch (e) { + return e instanceof TypeError && + accessorPropertyAttributesAreCorrect(obj, "property", getFunc, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js index 0b1cd9f2a8..9b788e4819 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js - * @description Object.defineProperty will not throw TypeError when name.configurable = false, both desc.[[Get]] and name.[[Get]] are two objects which refer to the same object (8.12.9 step 11.a.ii) - */ - - -function testcase() { - - var obj = {}; - - function getFunc() { - return 10; - } - function setFunc(value) { - obj.verifyGetHelpMethod = value; - } - - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc, - configurable: false - }); - - try { - Object.defineProperty(obj, "foo", { get: getFunc }); - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "verifyGetHelpMethod", false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-98 +description: > + Object.defineProperty will not throw TypeError when + name.configurable = false, both desc.[[Get]] and name.[[Get]] are + two objects which refer to the same object (8.12.9 step 11.a.ii) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function getFunc() { + return 10; + } + function setFunc(value) { + obj.verifyGetHelpMethod = value; + } + + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc, + configurable: false + }); + + try { + Object.defineProperty(obj, "foo", { get: getFunc }); + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "verifyGetHelpMethod", false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js index af8d796870..5c62c6f912 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js @@ -1,39 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js - * @description Object.defineProperty will throw TypeError when name.configurable = false, name.[[Get]] is undefined, desc.[[Get]] refers to an object (8.12.9 step 11.a.ii) - */ - - -function testcase() { - - var obj = {}; - - function setFunc(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: setFunc, - configurable: false - }); - - function getFunc() { - return 10; - } - - try { - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.6-4-99 +description: > + Object.defineProperty will throw TypeError when name.configurable + = false, name.[[Get]] is undefined, desc.[[Get]] refers to an + object (8.12.9 step 11.a.ii) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function setFunc(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: setFunc, + configurable: false + }); + + function getFunc() { + return 10; + } + + try { + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A1.js index 714098e5ed..ea25f202bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A1.js @@ -1,16 +1,16 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If a particular API exists (document.createElement, as happens to - * exist in a browser environment), check if the form objects it makes - * obey the constraints that even host objects must obey. In this - * case, that if defineProperty seems to have successfully installed a - * non-configurable getter, that it is still there. - * - * @path ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A1.js - * @description Do getters on HTMLFormElements disappear? - */ +/*--- +info: > + If a particular API exists (document.createElement, as happens to + exist in a browser environment), check if the form objects it makes + obey the constraints that even host objects must obey. In this + case, that if defineProperty seems to have successfully installed a + non-configurable getter, that it is still there. +es5id: 15.2.3.6_A1 +description: Do getters on HTMLFormElements disappear? +---*/ function getter() { return 'gotten'; } diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A2.js index 7693af8459..b672f9b85d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A2.js @@ -1,11 +1,12 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.3/15.2.3.6/S15.2.3.6_A2.js - * @description Checks if an inherited accessor property appears to be - * an own property. - */ +/*--- +es5id: 15.2.3.6_A2 +description: > + Checks if an inherited accessor property appears to be an own + property. +---*/ var base = {}; var derived = Object.create(base); @@ -14,4 +15,3 @@ Object.defineProperty(base, 'foo', {get: getter}); if (derived.hasOwnProperty('foo')) { $ERROR('Accessor properties inherit as own properties'); } - diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js index d9c4cd57f0..d768f488a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js - * @description Object.defineProperties must exist as a function - */ - - -function testcase() { - var f = Object.defineProperties; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-0-1 +description: Object.defineProperties must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.defineProperties; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js index 04dbbf355a..0323b6d927 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js - * @description Object.defineProperties must exist as a function taking 2 parameters - */ - - -function testcase() { - if (Object.defineProperties.length === 2) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-0-2 +description: > + Object.defineProperties must exist as a function taking 2 + parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.defineProperties.length === 2) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-1.js index e303305a46..b74713265c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-1.js - * @description Object.defineProperties throws TypeError if 'O' is undefined - */ - - -function testcase() { - - try { - Object.defineProperties(undefined, {}); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-1-1 +description: Object.defineProperties throws TypeError if 'O' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperties(undefined, {}); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-2.js index 00a709f9c4..0cee4768ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-2.js - * @description Object.defineProperties throws TypeError if 'O' is null - */ - - -function testcase() { - - try { - Object.defineProperties(null, {}); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-1-2 +description: Object.defineProperties throws TypeError if 'O' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperties(null, {}); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-3.js index 607b44b2ee..dc47a003c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-3.js - * @description Object.defineProperties throws TypeError if 'O' is a boolean - */ - - -function testcase() { - - try { - Object.defineProperties(true, {}); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-1-3 +description: Object.defineProperties throws TypeError if 'O' is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperties(true, {}); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-4.js index 2c9e6cfaa4..a36d483412 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-4.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-4.js - * @description Object.defineProperties throws TypeError if 'O' is a string - */ - - -function testcase() { - - try { - Object.defineProperties("abc", {}); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-1-4 +description: Object.defineProperties throws TypeError if 'O' is a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperties("abc", {}); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js index 0992ef2bdd..d4f5cc12c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js - * @description Object.defineProperties throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.defineProperties(0, {}); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-1 +description: > + Object.defineProperties throws TypeError if type of first param is + not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperties(0, {}); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-1.js index 1f1e32827a..40db6d8cb1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-1.js - * @description Object.defineProperties throws TypeError if 'Properties' is null - */ - - -function testcase() { - - try { - Object.defineProperties({}, null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-1 +description: Object.defineProperties throws TypeError if 'Properties' is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperties({}, null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-10.js index a66b3ccf6b..b4008e4c2e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-10.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-10.js - * @description Object.defineProperties - argument 'Properties' is an Array object - */ - - -function testcase() { - - var obj = {}; - var props = []; - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Array; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-10 +description: Object.defineProperties - argument 'Properties' is an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = []; + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Array; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-11.js index 5c7ef0019b..5a8941fa34 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-11.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-11.js - * @description Object.defineProperties - argument 'Properties' is the Math object - */ - - -function testcase() { - - var obj = {}; - var result = false; - - try { - Object.defineProperty(Math, "prop", { - get: function () { - result = (this === Math); - return {}; - }, - enumerable: true, - configurable: true - }); - - Object.defineProperties(obj, Math); - return result; - } finally { - delete Math.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-11 +description: Object.defineProperties - argument 'Properties' is the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var result = false; + + try { + Object.defineProperty(Math, "prop", { + get: function () { + result = (this === Math); + return {}; + }, + enumerable: true, + configurable: true + }); + + Object.defineProperties(obj, Math); + return result; + } finally { + delete Math.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-12.js index c205fe604e..34d26cd135 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-12.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-12.js - * @description Object.defineProperties - argument 'Properties' is a Date object - */ - - -function testcase() { - - var obj = {}; - var props = new Date(); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Date; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-12 +description: Object.defineProperties - argument 'Properties' is a Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Date(); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Date; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-13.js index 3c312334b9..679e0ec6cc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-13.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-13.js - * @description Object.defineProperties - argument 'Properties' is a RegExp object - */ - - -function testcase() { - - var obj = {}; - var props = new RegExp(); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof RegExp; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-13 +description: Object.defineProperties - argument 'Properties' is a RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new RegExp(); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof RegExp; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-14.js index 872db06680..b4b2116f9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-14.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-14.js - * @description Object.defineProperties - argument 'Properties' is the JSON object - */ - - -function testcase() { - - var obj = {}; - var result = false; - - try { - Object.defineProperty(JSON, "prop", { - get: function () { - result = (this === JSON); - return {}; - }, - enumerable: true, - configurable: true - }); - - Object.defineProperties(obj, JSON); - return result; - } finally { - delete JSON.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-14 +description: Object.defineProperties - argument 'Properties' is the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var result = false; + + try { + Object.defineProperty(JSON, "prop", { + get: function () { + result = (this === JSON); + return {}; + }, + enumerable: true, + configurable: true + }); + + Object.defineProperties(obj, JSON); + return result; + } finally { + delete JSON.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-15.js index f804405c2c..a37820529c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-15.js @@ -1,36 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-15.js - * @description Object.defineProperties - argument 'Properties' is an Error object - */ - - -function testcase() { - - var obj = {}; - var props = new Error("test"); - var obj1 = { - value: 11 - }; - props.description = obj1; - props.message = obj1; - props.name = obj1; - - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Error; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-15 +description: Object.defineProperties - argument 'Properties' is an Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Error("test"); + var obj1 = { + value: 11 + }; + props.description = obj1; + props.message = obj1; + props.name = obj1; + + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Error; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-16.js index 04bcffa45b..574f6a6640 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-16.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-16.js - * @description Object.defineProperties - argument 'Properties' is the Arguments object - */ - - -function testcase() { - - var obj = {}; - var result = false; - - var Fun = function () { - return arguments; - }; - var props = new Fun(); - - Object.defineProperty(props, "prop", { - get: function () { - result = ('[object Arguments]' === Object.prototype.toString.call(this)); - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-16 +description: > + Object.defineProperties - argument 'Properties' is the Arguments + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var result = false; + + var Fun = function () { + return arguments; + }; + var props = new Fun(); + + Object.defineProperty(props, "prop", { + get: function () { + result = ('[object Arguments]' === Object.prototype.toString.call(this)); + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-18.js index aef491cf2c..ab08ca928f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-18.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-18.js - * @description Object.defineProperties - argument 'Properties' is the global object - */ - - -function testcase() { - - var obj = {}; - var result = false; - - try { - Object.defineProperty(fnGlobalObject(), "prop", { - get: function () { - result = (this === fnGlobalObject()); - return {}; - }, - enumerable: true, - configurable:true - }); - - Object.defineProperties(obj, fnGlobalObject()); - return result; - } catch (e) { - return (e instanceof TypeError); - } finally { - delete fnGlobalObject().prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-18 +description: > + Object.defineProperties - argument 'Properties' is the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var obj = {}; + var result = false; + + try { + Object.defineProperty(fnGlobalObject(), "prop", { + get: function () { + result = (this === fnGlobalObject()); + return {}; + }, + enumerable: true, + configurable:true + }); + + Object.defineProperties(obj, fnGlobalObject()); + return result; + } catch (e) { + return (e instanceof TypeError); + } finally { + delete fnGlobalObject().prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-2.js index 7373914284..13131bd2d7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-2.js - * @description Object.defineProperties throws TypeError if 'Properties' is undefined - */ - - -function testcase() { - - try { - Object.defineProperties({}, undefined); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-2 +description: > + Object.defineProperties throws TypeError if 'Properties' is + undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperties({}, undefined); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-3.js index 92b3a9eca7..7400f56a75 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-3.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-3.js - * @description Object.defineProperties - argument 'Properties' is a boolean whose value is false - */ - - -function testcase() { - - var obj = {}; - var obj1 = Object.defineProperties(obj, false); - return obj === obj1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-3 +description: > + Object.defineProperties - argument 'Properties' is a boolean whose + value is false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var obj1 = Object.defineProperties(obj, false); + return obj === obj1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-4.js index 5a8baf8341..722ec3fca7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-4.js - * @description Object.defineProperties - argument 'Properties' is a Boolean object whose primitive value is true - */ - - -function testcase() { - - var obj = {}; - var props = new Boolean(true); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Boolean; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-4 +description: > + Object.defineProperties - argument 'Properties' is a Boolean + object whose primitive value is true +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Boolean(true); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Boolean; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-5.js index 9b7d82bf2a..46afc30843 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-5.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-5.js - * @description Object.defineProperties - argument 'Properties' is any interesting number - */ - - -function testcase() { - - var obj = { "123": 100 }; - var obj1 = Object.defineProperties(obj, -12); - return obj === obj1; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-5 +description: > + Object.defineProperties - argument 'Properties' is any interesting + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { "123": 100 }; + var obj1 = Object.defineProperties(obj, -12); + return obj === obj1; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-6.js index 9996b7d148..eeca7b709c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-6.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-6.js - * @description Object.defineProperties - argument 'Properties' is a Number object whose primitive value is any interesting number - */ - - -function testcase() { - - var obj = {}; - var props = new Number(-12); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Number; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-6 +description: > + Object.defineProperties - argument 'Properties' is a Number object + whose primitive value is any interesting number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Number(-12); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Number; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-7.js index 2a0dd3de2a..480fc6fc81 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-7.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-7.js - * @description Object.defineProperties - argument 'Properties' is a string whose value is any interesting string - */ - - -function testcase() { - - var obj = { "123": 100 }; - var obj1 = Object.defineProperties(obj, ""); - return obj === obj1; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-7 +description: > + Object.defineProperties - argument 'Properties' is a string whose + value is any interesting string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { "123": 100 }; + var obj1 = Object.defineProperties(obj, ""); + return obj === obj1; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-8.js index 0f708e5433..09f84735f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-8.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-8.js - * @description Object.defineProperties - argument 'Properties' is a String object whose primitive value is any interesting string - */ - - -function testcase() { - - var obj = {}; - var props = new String(); - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof String; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-8 +description: > + Object.defineProperties - argument 'Properties' is a String object + whose primitive value is any interesting string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new String(); + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof String; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-9.js index e6d25532e3..58ef630f8e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-9.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-9.js - * @description Object.defineProperties - argument 'Properties' is a Function object - */ - - -function testcase() { - - var obj = {}; - var props = function () { }; - var result = false; - - Object.defineProperty(props, "prop", { - get: function () { - result = this instanceof Function; - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-2-9 +description: > + Object.defineProperties - argument 'Properties' is a Function + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = function () { }; + var result = false; + + Object.defineProperty(props, "prop", { + get: function () { + result = this instanceof Function; + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-1.js index 8d9bce57cd..09cda3f342 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-1.js - * @description Object.defineProperties - enumerable own data property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - var props = {}; - Object.defineProperty(props, "prop", { - value: {}, - enumerable: true - }); - - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-1 +description: > + Object.defineProperties - enumerable own data property of + 'Properties' is defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = {}; + Object.defineProperty(props, "prop", { + value: {}, + enumerable: true + }); + + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-2.js index d745cc460e..fa9fe59be6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-2.js - * @description Object.defineProperties - own data property of 'Properties' which is not enumerable is not defined in 'O' - */ - - -function testcase() { - - var obj = {}; - var props = {}; - - Object.defineProperty(props, "prop", { - value: {}, - enumerable: false - }); - - Object.defineProperties(obj, props); - - return !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-2 +description: > + Object.defineProperties - own data property of 'Properties' which + is not enumerable is not defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = {}; + + Object.defineProperty(props, "prop", { + value: {}, + enumerable: false + }); + + Object.defineProperties(obj, props); + + return !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-3.js index 856d08627d..7728d401e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-3.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-3.js - * @description Object.defineProperties - enumerable inherited data property of 'Properties' is not defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "prop", { - value: {}, - enumerable: true - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - Object.defineProperties(obj, child); - - return !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-3 +description: > + Object.defineProperties - enumerable inherited data property of + 'Properties' is not defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "prop", { + value: {}, + enumerable: true + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + Object.defineProperties(obj, child); + + return !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-4.js index 59ef454c75..3d22659875 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-4.js - * @description Object.defineProperties - enumerable own accessor property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var props = {}; - - Object.defineProperty(props, "prop", { - get: function () { - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-4 +description: > + Object.defineProperties - enumerable own accessor property of + 'Properties' is defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var props = {}; + + Object.defineProperty(props, "prop", { + get: function () { + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-5.js index 0d374a5240..f09b305da7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-5.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-5.js - * @description Object.defineProperties - own accessor property of 'Properties' which is not enumerable is not defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var props = {}; - - Object.defineProperty(props, "prop", { - get: function () { - return {}; - }, - enumerable: false - }); - - Object.defineProperties(obj, props); - - return !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-5 +description: > + Object.defineProperties - own accessor property of 'Properties' + which is not enumerable is not defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var props = {}; + + Object.defineProperty(props, "prop", { + get: function () { + return {}; + }, + enumerable: false + }); + + Object.defineProperties(obj, props); + + return !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-6.js index a709b751a1..ddd5c9bbc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-6.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-6.js - * @description Object.defineProperties - enumerable inherited accessor property of 'Properties' is not defined in 'O' - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - - Object.defineProperty(proto, "prop", { - get: function () { - return {}; - }, - enumerable: true - }); - - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - Object.defineProperties(obj, child); - - return !obj.hasOwnProperty("prop"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-6 +description: > + Object.defineProperties - enumerable inherited accessor property + of 'Properties' is not defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + + Object.defineProperty(proto, "prop", { + get: function () { + return {}; + }, + enumerable: true + }); + + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + Object.defineProperties(obj, child); + + return !obj.hasOwnProperty("prop"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-7.js index 4507dd3a83..e2744f2a06 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-7.js - * @description Object.defineProperties - no additional property is defined in 'O' when 'Properties' doesn't contain enumerable own property - */ - - -function testcase() { - - var obj = {}; - - var props = {}; - - Object.defineProperty(props, "prop1", { - value: {}, - enumerable: false - }); - - Object.defineProperty(props, "prop2", { - get: function () { - return {}; - }, - enumerable: false - }); - - Object.defineProperties(obj, props); - - return !obj.hasOwnProperty("prop1") && !obj.hasOwnProperty("prop2"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-7 +description: > + Object.defineProperties - no additional property is defined in 'O' + when 'Properties' doesn't contain enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var props = {}; + + Object.defineProperty(props, "prop1", { + value: {}, + enumerable: false + }); + + Object.defineProperty(props, "prop2", { + get: function () { + return {}; + }, + enumerable: false + }); + + Object.defineProperties(obj, props); + + return !obj.hasOwnProperty("prop1") && !obj.hasOwnProperty("prop2"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-8.js index d8e177f578..156cf58e4d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-8.js - * @description Object.defineProperties - no additional property is defined in 'O' when 'Properties' doesn't contain enumerable own property - */ - - -function testcase() { - - var obj = {}; - - var props = {}; - - Object.defineProperty(props, "prop1", { - value: {}, - enumerable: false - }); - - Object.defineProperty(props, "prop2", { - get: function () { - return {}; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - - return !obj.hasOwnProperty("prop1") && obj.hasOwnProperty("prop2"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-3-8 +description: > + Object.defineProperties - no additional property is defined in 'O' + when 'Properties' doesn't contain enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var props = {}; + + Object.defineProperty(props, "prop1", { + value: {}, + enumerable: false + }); + + Object.defineProperty(props, "prop2", { + get: function () { + return {}; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + + return !obj.hasOwnProperty("prop1") && obj.hasOwnProperty("prop2"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-1.js index 58a9bd0eeb..30df974e91 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-1.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-1.js - * @description Object.defineProperties - 'P' is own data property that overrides enumerable inherited data property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "prop", { - value: { - value: 9 - }, - enumerable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "prop", { - value: { - value: 12 - }, - enumerable: true - }); - - Object.defineProperties(obj, child); - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-1 +description: > + Object.defineProperties - 'P' is own data property that overrides + enumerable inherited data property of 'Properties' is defined in + 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "prop", { + value: { + value: 9 + }, + enumerable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "prop", { + value: { + value: 12 + }, + enumerable: true + }); + + Object.defineProperties(obj, child); + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-10.js index b9fde33273..8b1c94690b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-10.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-10.js - * @description Object.defineProperties - 'Properties' is a Boolean object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = new Boolean(false); - - Object.defineProperty(props, "prop", { - value: { - value: 10 - }, - enumerable: true - }); - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-10 +description: > + Object.defineProperties - 'Properties' is a Boolean object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Boolean(false); + + Object.defineProperty(props, "prop", { + value: { + value: 10 + }, + enumerable: true + }); + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-11.js index f8ec4a8c37..2cdc9b531c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-11.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-11.js - * @description Object.defineProperties - 'Properties' is a Number object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = new Number(-9); - - Object.defineProperty(props, "prop", { - value: { - value: 12 - }, - enumerable: true - }); - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-11 +description: > + Object.defineProperties - 'Properties' is a Number object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Number(-9); + + Object.defineProperty(props, "prop", { + value: { + value: 12 + }, + enumerable: true + }); + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-12.js index 7550db5d6a..e23f71a396 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-12.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-12.js - * @description Object.defineProperties - 'Properties' is the Math object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - - try { - Math.prop = { - value: 12 - }; - Object.defineProperties(obj, Math); - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } finally { - delete Math.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-12 +description: > + Object.defineProperties - 'Properties' is the Math object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Math.prop = { + value: 12 + }; + Object.defineProperties(obj, Math); + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } finally { + delete Math.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-13.js index dd325b14c4..788d3913c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-13.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-13.js - * @description Object.defineProperties - 'Properties' is a Date object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = new Date(); - - Object.defineProperty(props, "prop", { - value: { - value: 13 - }, - enumerable: true - }); - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 13; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-13 +description: > + Object.defineProperties - 'Properties' is a Date object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Date(); + + Object.defineProperty(props, "prop", { + value: { + value: 13 + }, + enumerable: true + }); + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 13; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-14.js index e546a9dfcb..f08d4ff886 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-14.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-14.js - * @description Object.defineProperties - 'Properties' is a RegExp object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = new RegExp(); - - Object.defineProperty(props, "prop", { - value: { - value: 14 - }, - enumerable: true - }); - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 14; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-14 +description: > + Object.defineProperties - 'Properties' is a RegExp object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new RegExp(); + + Object.defineProperty(props, "prop", { + value: { + value: 14 + }, + enumerable: true + }); + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 14; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-15.js index e886127f4a..99d3f7b236 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-15.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-15.js - * @description Object.defineProperties - 'Properties' is the JSON object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - var obj = {}; - - try { - JSON.prop = { - value: 15 - }; - Object.defineProperties(obj, JSON); - - return obj.hasOwnProperty("prop") && obj.prop === 15; - } finally { - delete JSON.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-15 +description: > + Object.defineProperties - 'Properties' is the JSON object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + JSON.prop = { + value: 15 + }; + Object.defineProperties(obj, JSON); + + return obj.hasOwnProperty("prop") && obj.prop === 15; + } finally { + delete JSON.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-16.js index 367dea362c..b6d3bd74d3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-16.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-16.js - * @description Object.defineProperties - 'Properties' is an Error object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = new Error("test"); - var obj1 = { - value: 11 - }; - props.message = obj1; - props.name = obj1; - props.description = obj1; - - props.prop = { - value: 16 - }; - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 16; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-16 +description: > + Object.defineProperties - 'Properties' is an Error object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new Error("test"); + var obj1 = { + value: 11 + }; + props.message = obj1; + props.name = obj1; + props.description = obj1; + + props.prop = { + value: 16 + }; + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 16; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-17.js index 0c69d97a0b..7e78b2090a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-17.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-17.js - * @description Object.defineProperties - 'Properties' is the Arguments object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var arg; - - (function fun() { - arg = arguments; - }()); - - Object.defineProperty(arg, "prop", { - value: { - value: 17 - }, - enumerable: true - }); - - Object.defineProperties(obj, arg); - - return obj.hasOwnProperty("prop") && obj.prop === 17; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-17 +description: > + Object.defineProperties - 'Properties' is the Arguments object + which implements its own [[Get]] method to get enumerable own + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var arg; + + (function fun() { + arg = arguments; + }()); + + Object.defineProperty(arg, "prop", { + value: { + value: 17 + }, + enumerable: true + }); + + Object.defineProperties(obj, arg); + + return obj.hasOwnProperty("prop") && obj.prop === 17; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-2.js index 783a901021..9a6b6ff6e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-2.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-2.js - * @description Object.defineProperties - 'P' is own data property that overrides enumerable inherited accessor property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - - Object.defineProperty(proto, "prop", { - get: function () { - return { - value: 9 - }; - }, - enumerable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "prop", { - value: { - value: 12 - }, - enumerable: true - }); - Object.defineProperties(obj, child); - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-2 +description: > + Object.defineProperties - 'P' is own data property that overrides + enumerable inherited accessor property of 'Properties' is defined + in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + + Object.defineProperty(proto, "prop", { + get: function () { + return { + value: 9 + }; + }, + enumerable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "prop", { + value: { + value: 12 + }, + enumerable: true + }); + Object.defineProperties(obj, child); + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-3.js index a0f05ae6bc..6ce8de7ea1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-3.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-3.js - * @description Object.defineProperties - enumerable own accessor property of 'Properties' that overrides enumerable inherited data property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "prop", { - value: { - value: 9 - }, - enumerable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "prop", { - get: function () { - return { - value: 12 - }; - }, - enumerable: true - }); - Object.defineProperties(obj, child); - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-3 +description: > + Object.defineProperties - enumerable own accessor property of + 'Properties' that overrides enumerable inherited data property of + 'Properties' is defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "prop", { + value: { + value: 9 + }, + enumerable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "prop", { + get: function () { + return { + value: 12 + }; + }, + enumerable: true + }); + Object.defineProperties(obj, child); + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-4.js index 6b63697229..d8a06ed241 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-4.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-4.js - * @description Object.defineProperties - enumerable own accessor property of 'Properties' that overrides enumerable inherited accessor property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "prop", { - get: function () { - return { - value: 9 - }; - }, - enumerable: false - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "prop", { - get: function () { - return { - value: 12 - }; - }, - enumerable: true - }); - Object.defineProperties(obj, child); - - return obj.hasOwnProperty("prop") && obj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-4 +description: > + Object.defineProperties - enumerable own accessor property of + 'Properties' that overrides enumerable inherited accessor property + of 'Properties' is defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "prop", { + get: function () { + return { + value: 9 + }; + }, + enumerable: false + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "prop", { + get: function () { + return { + value: 12 + }; + }, + enumerable: true + }); + Object.defineProperties(obj, child); + + return obj.hasOwnProperty("prop") && obj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-5.js index bc3c23ce85..cb9d590bc5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-5.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-5.js - * @description Object.defineProperties - enumerable own accessor property of 'Properties' without a get function is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var props = {}; - Object.defineProperty(props, "prop", { - get: function () { - return { - set: function () { } - }; - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-5 +description: > + Object.defineProperties - enumerable own accessor property of + 'Properties' without a get function is defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var props = {}; + Object.defineProperty(props, "prop", { + get: function () { + return { + set: function () { } + }; + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-6.js index 18bcc3f110..75d0583528 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-6.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-6.js - * @description Object.defineProperties - enumerable own accessor property of 'Properties' without a get function that overrides enumerable inherited accessor property of 'Properties' is defined in 'O' - */ - - -function testcase() { - - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "prop", { - get: function () { - return 12; - }, - enumerable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "prop", { - get: function () { - return { - set: function () { } - }; - }, - enumerable: true - }); - Object.defineProperties(obj, child); - - return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-6 +description: > + Object.defineProperties - enumerable own accessor property of + 'Properties' without a get function that overrides enumerable + inherited accessor property of 'Properties' is defined in 'O' +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "prop", { + get: function () { + return 12; + }, + enumerable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "prop", { + get: function () { + return { + set: function () { } + }; + }, + enumerable: true + }); + Object.defineProperties(obj, child); + + return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-7.js index 5ec31411be..58d57f95c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-7.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-7.js - * @description Object.defineProperties - 'Properties' is a Function object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = function () { }; - - Object.defineProperty(props, "prop", { - value: { - value: 7 - }, - enumerable: true - }); - - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 7; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-7 +description: > + Object.defineProperties - 'Properties' is a Function object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = function () { }; + + Object.defineProperty(props, "prop", { + value: { + value: 7 + }, + enumerable: true + }); + + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 7; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-8.js index dfe4b3f85c..2b6773d903 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-8.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-8.js - * @description Object.defineProperties - 'Properties' is an Array object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = []; - var descObj = { - value: 8 - }; - - Object.defineProperty(props, "prop", { - value: descObj, - enumerable: true - }); - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 8; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-8 +description: > + Object.defineProperties - 'Properties' is an Array object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = []; + var descObj = { + value: 8 + }; + + Object.defineProperty(props, "prop", { + value: descObj, + enumerable: true + }); + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 8; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-9.js index 508a2771b6..d5258158b1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-9.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-9.js - * @description Object.defineProperties - 'Properties' is a String object which implements its own [[Get]] method to get enumerable own property - */ - - -function testcase() { - - var obj = {}; - var props = new String(); - - Object.defineProperty(props, "prop", { - value: { - value: 9 - }, - enumerable: true - }); - Object.defineProperties(obj, props); - - return obj.hasOwnProperty("prop") && obj.prop === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-a-9 +description: > + Object.defineProperties - 'Properties' is a String object which + implements its own [[Get]] method to get enumerable own property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var props = new String(); + + Object.defineProperty(props, "prop", { + value: { + value: 9 + }, + enumerable: true + }); + Object.defineProperties(obj, props); + + return obj.hasOwnProperty("prop") && obj.prop === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-1.js index 8982868e5d..2edc9223bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-1.js - * @description Object.defineProperties - 'descObj' is undefined (8.10.5 step 1) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: undefined - }); - return false; - } catch (e) { - return e instanceof TypeError && !obj.hasOwnProperty("prop"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-1 +description: Object.defineProperties - 'descObj' is undefined (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: undefined + }); + return false; + } catch (e) { + return e instanceof TypeError && !obj.hasOwnProperty("prop"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-10.js index fdf4df6391..822c8a20db 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-10.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-10.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - var proto = { - enumerable: true - }; - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "enumerable", { - value: false - }); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-10 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own data property that overrides an inherited data property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + var proto = { + enumerable: true + }; + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "enumerable", { + value: false + }); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-100.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-100.js index 1fed03b2db..c0e5356f9f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-100.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-100.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-100.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is Boolean object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new Boolean(true) - } - }); - - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-100 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is Boolean object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new Boolean(true) + } + }); + + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-101.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-101.js index 6a6d3ff927..03b1fb1bfa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-101.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-101.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-101.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is Number object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new Number(-123) - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-101 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is Number object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new Number(-123) + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-102.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-102.js index 14c755d1b8..7e8f22b47f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-102.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-102.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-102.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is the Math object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: Math - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-102 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is the Math object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: Math + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-103.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-103.js index 3626ed1ca0..3a8864736a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-103.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-103.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-103.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is Date object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new Date() - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-103 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is Date object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new Date() + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-104.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-104.js index f67d4d3a2f..e18a2186fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-104.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-104.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-104.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is RegExp object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new RegExp() - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-104 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is RegExp object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new RegExp() + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-105.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-105.js index 0feaaab37d..38707e07a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-105.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-105.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-105.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is the JSON object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: JSON - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-105 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is the JSON object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: JSON + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-106.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-106.js index 091ae9758d..19e84761e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-106.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-106.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-106.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is Error object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new SyntaxError() - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-106 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is Error object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new SyntaxError() + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-107.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-107.js index 1f4f6ba80a..7c36792f41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-107.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-107.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-107.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is the Argument object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b, c) { - return arguments; - }; - - var args = func(1, true, "a"); - - Object.defineProperties(obj, { - property: { - configurable: args - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-107 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is the Argument object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b, c) { + return arguments; + }; + + var args = func(1, true, "a"); + + Object.defineProperties(obj, { + property: { + configurable: args + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-109.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-109.js index 4f8c129405..b84fabff74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-109.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-109.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-109.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is the global object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: fnGlobalObject() - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-109 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is the global object (8.10.5 step 4.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: fnGlobalObject() + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-11.js index b1c3ca0a9a..c75474f93e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-11.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-11.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - var accessed = false; - - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "enumerable", { - value: false - }); - - Object.defineProperties(obj, { - prop: descObj - }); - - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-11 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own data property that overrides an inherited accessor property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + var accessed = false; + + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "enumerable", { + value: false + }); + + Object.defineProperties(obj, { + prop: descObj + }); + + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-110.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-110.js index 46e54c538d..bec1545e12 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-110.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-110.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-110.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is a string (value is 'false') which is treated as true value (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: "false" - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-110 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is a string (value is 'false') which is treated as true + value (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: "false" + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-111.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-111.js index 48f7efec04..40dae39051 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-111.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-111.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-111.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is new Boolean(false) which is treated as true value (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new Boolean(false) - } - }); - var preCheck = obj.hasOwnProperty("property"); - delete obj.property; - - return preCheck && !obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-111 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is new Boolean(false) which is treated as true value + (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new Boolean(false) + } + }); + var preCheck = obj.hasOwnProperty("property"); + delete obj.property; + + return preCheck && !obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-112.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-112.js index b34f003985..c2af6381ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-112.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-112.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-112.js - * @description Object.defineProperties - 'value' property of 'descObj' is present (8.10.5 step 5) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - value: 300 - } - }); - - return obj.property === 300; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-112 +description: > + Object.defineProperties - 'value' property of 'descObj' is present + (8.10.5 step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + value: 300 + } + }); + + return obj.property === 300; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-113.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-113.js index b560fb237c..dc67ffecf0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-113.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-113.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-113.js - * @description Object.defineProperties - 'value' property of 'descObj' is not present (8.10.5 step 5) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: true - } - }); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-113 +description: > + Object.defineProperties - 'value' property of 'descObj' is not + present (8.10.5 step 5) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: true + } + }); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-114.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-114.js index bb0b87e076..601ac83ade 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-114.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-114.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-114.js - * @description Object.defineProperties - 'value' property of 'descObj' is own data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - value: "ownDataProperty" - } - }); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-114 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + data property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + value: "ownDataProperty" + } + }); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-115.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-115.js index 7f9133c395..4500ddb1da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-115.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-115.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-115.js - * @description Object.defineProperties - 'value' property of 'descObj' is inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - value: "inheritedDataProperty" - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "inheritedDataProperty"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-115 +description: > + Object.defineProperties - 'value' property of 'descObj' is + inherited data property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + value: "inheritedDataProperty" + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "inheritedDataProperty"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-116.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-116.js index 18ccb60abe..b9ab1bc8a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-116.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-116.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-116.js - * @description Object.defineProperties - 'value' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - value: "inheritedDataProperty" - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - descObj.value = "ownDataProperty"; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownDataProperty"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-116 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + data property that overrides an inherited data property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + value: "inheritedDataProperty" + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + descObj.value = "ownDataProperty"; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownDataProperty"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-117.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-117.js index d73a750b59..9c27d87998 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-117.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-117.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-117.js - * @description Object.defineProperties - 'value' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "value", { - value: "ownDataProperty" - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownDataProperty"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-117 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + data property that overrides an inherited accessor property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "value", { + value: "ownDataProperty" + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownDataProperty"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-118.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-118.js index efcdac2d44..6a7742f8ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-118.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-118.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-118.js - * @description Object.defineProperties - 'value' property of 'descObj' is own accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = {}; - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-118 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = {}; + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-119.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-119.js index 684267a37c..693c573e57 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-119.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-119.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-119.js - * @description Object.defineProperties - 'value' property of 'descObj' is inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "inheritedAccessorProperty"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-119 +description: > + Object.defineProperties - 'value' property of 'descObj' is + inherited accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "inheritedAccessorProperty"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-12.js index 04fba743df..62b2ad27c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-12.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-12.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - var descObj = {}; - - Object.defineProperty(descObj, "enumerable", { - get: function () { - return true; - } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-12 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + var descObj = {}; + + Object.defineProperty(descObj, "enumerable", { + get: function () { + return true; + } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-120.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-120.js index 424916c8a1..25cc0fc4ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-120.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-120.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-120.js - * @description Object.defineProperties - 'value' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - value: "inheritedDataProperty" - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownAccessorProperty"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-120 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + accessor property that overrides an inherited data property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + value: "inheritedDataProperty" + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownAccessorProperty"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-121.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-121.js index 873c50cbf3..33efa395a4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-121.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-121.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-121.js - * @description Object.defineProperties - 'value' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "value", { - get: function () { - return "ownAccessorProperty"; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownAccessorProperty"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-121 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "value", { + get: function () { + return "ownAccessorProperty"; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownAccessorProperty"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-122.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-122.js index 5bdc2fed29..e21797bd25 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-122.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-122.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-122.js - * @description Object.defineProperties - 'value' property of 'descObj' is own accessor property without a get function (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = {}; - - Object.defineProperty(descObj, "value", { - set: function () { } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-122 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + accessor property without a get function (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = {}; + + Object.defineProperty(descObj, "value", { + set: function () { } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-123.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-123.js index a85c9a29e4..c6e232d446 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-123.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-123.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-123.js - * @description Object.defineProperties - 'value' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "value", { - get: function () { - return "inheritedAccessorProperty"; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "value", { - set: function () { } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-123 +description: > + Object.defineProperties - 'value' property of 'descObj' is own + accessor property without a get function that overrides an + inherited accessor property (8.10.5 step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "value", { + get: function () { + return "inheritedAccessorProperty"; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "value", { + set: function () { } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-124.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-124.js index 29b14fe962..1265e929bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-124.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-124.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-124.js - * @description Object.defineProperties - 'value' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "value", { - set: function () { } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-124 +description: > + Object.defineProperties - 'value' property of 'descObj' is + inherited accessor property without a get function (8.10.5 step + 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "value", { + set: function () { } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-125.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-125.js index a2e919fa6a..06fcb0f6f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-125.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-125.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-125.js - * @description Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b) { - return a + b; - }; - - func.value = "Function"; - - Object.defineProperties(obj, { - property: func - }); - - return obj.property === "Function"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-125 +description: > + Object.defineProperties - 'descObj' is a Function object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b) { + return a + b; + }; + + func.value = "Function"; + + Object.defineProperties(obj, { + property: func + }); + + return obj.property === "Function"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-126.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-126.js index 3e5f284a66..8062fd45b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-126.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-126.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-126.js - * @description Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var arr = [1, 2, 3]; - - arr.value = "Array"; - - Object.defineProperties(obj, { - property: arr - }); - - return obj.property === "Array"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-126 +description: > + Object.defineProperties - 'descObj' is an Array object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var arr = [1, 2, 3]; + + arr.value = "Array"; + + Object.defineProperties(obj, { + property: arr + }); + + return obj.property === "Array"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-127.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-127.js index 8978b8c293..8356a3cd68 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-127.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-127.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-127.js - * @description Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var str = new String("abc"); - - str.value = "String"; - - Object.defineProperties(obj, { - property: str - }); - - return obj.property === "String"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-127 +description: > + Object.defineProperties - 'descObj' is a String object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var str = new String("abc"); + + str.value = "String"; + + Object.defineProperties(obj, { + property: str + }); + + return obj.property === "String"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-128.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-128.js index ef6f0683c8..d40b6db0f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-128.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-128.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-128.js - * @description Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Boolean(false); - - descObj.value = "Boolean"; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Boolean"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-128 +description: > + Object.defineProperties - 'descObj' is a Boolean object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Boolean(false); + + descObj.value = "Boolean"; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Boolean"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-129.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-129.js index 331508a42f..b08b220051 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-129.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-129.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-129.js - * @description Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Number(-9); - - descObj.value = "Number"; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Number"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-129 +description: > + Object.defineProperties - 'descObj' is a Number object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Number(-9); + + descObj.value = "Number"; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Number"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-13.js index a9106eee68..a8922487a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-13.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-13.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - var accessed = false; - - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-13 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + inherited accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + var accessed = false; + + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-130.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-130.js index 53d3591bc2..a6c8df172d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-130.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-130.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-130.js - * @description Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - Math.value = "Math"; - - Object.defineProperties(obj, { - property: Math - }); - - return obj.property === "Math"; - } finally { - delete Math.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-130 +description: > + Object.defineProperties - 'descObj' is the Math object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Math.value = "Math"; + + Object.defineProperties(obj, { + property: Math + }); + + return obj.property === "Math"; + } finally { + delete Math.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-131.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-131.js index b3deec3033..929ad5054d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-131.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-131.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-131.js - * @description Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Date(); - - descObj.value = "Date"; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Date"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-131 +description: > + Object.defineProperties - 'descObj' is a Date object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Date(); + + descObj.value = "Date"; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Date"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-132.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-132.js index 9711b6f615..4d63b28500 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-132.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-132.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-132.js - * @description Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new RegExp(); - - descObj.value = "RegExp"; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "RegExp"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-132 +description: > + Object.defineProperties - 'descObj' is a RegExp object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new RegExp(); + + descObj.value = "RegExp"; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "RegExp"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-133.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-133.js index 81dbac1d16..6decd34300 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-133.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-133.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-133.js - * @description Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - JSON.value = "JSON"; - - Object.defineProperties(obj, { - property: JSON - }); - - return obj.property === "JSON"; - } finally { - delete JSON.value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-133 +description: > + Object.defineProperties - 'descObj' is the JSON object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + JSON.value = "JSON"; + + Object.defineProperties(obj, { + property: JSON + }); + + return obj.property === "JSON"; + } finally { + delete JSON.value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-134.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-134.js index 18b1dd1f98..79bb762645 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-134.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-134.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-134.js - * @description Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Error(); - - descObj.value = "Error"; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Error"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-134 +description: > + Object.defineProperties - 'descObj' is an Error object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Error(); + + descObj.value = "Error"; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Error"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-135.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-135.js index 31d6d2b5a5..01e9404a83 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-135.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-135.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-135.js - * @description Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b) { - arguments.value = "arguments"; - - Object.defineProperties(obj, { - property: arguments - }); - - return obj.property === "arguments"; - }; - - return func(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-135 +description: > + Object.defineProperties - 'descObj' is the Arguments object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b) { + arguments.value = "arguments"; + + Object.defineProperties(obj, { + property: arguments + }); + + return obj.property === "arguments"; + }; + + return func(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-137.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-137.js index d2d2838a1d..597f0b2f6d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-137.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-137.js @@ -1,27 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-137.js - * @description Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a) - */ - - -function testcase() { - var obj = {}; - - try { - fnGlobalObject().value = "global"; - - Object.defineProperties(obj, { - property: fnGlobalObject() - }); - - return obj.property === "global"; - } finally { - delete fnGlobalObject().value; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-137 +description: > + Object.defineProperties - 'descObj' is the global object which + implements its own [[Get]] method to get 'value' property (8.10.5 + step 5.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + try { + fnGlobalObject().value = "global"; + + Object.defineProperties(obj, { + property: fnGlobalObject() + }); + + return obj.property === "global"; + } finally { + delete fnGlobalObject().value; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-138.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-138.js index 59213738cb..90f74b5372 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-138.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-138.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-138.js - * @description Object.defineProperties - 'writable' property of 'descObj' is present (8.10.5 step 6) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: false - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-138 +description: > + Object.defineProperties - 'writable' property of 'descObj' is + present (8.10.5 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: false + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-139.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-139.js index c86d56d5b7..bd4d829b3a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-139.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-139.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-139.js - * @description Object.defineProperties - 'writable' property of 'descObj' is not present (8.10.5 step 6) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - value: "abc" - } - }); - - obj.property = "isWritable"; - - return obj.property === "abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-139 +description: > + Object.defineProperties - 'writable' property of 'descObj' is not + present (8.10.5 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + value: "abc" + } + }); + + obj.property = "isWritable"; + + return obj.property === "abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-14.js index 4edfcabe4c..dc9d25d9f4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-14.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-14.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - var proto = { - enumerable: true - }; - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "enumerable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-14 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own accessor property that overrides an inherited data property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + var proto = { + enumerable: true + }; + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "enumerable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-140.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-140.js index ae4bfed53a..b4713fff36 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-140.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-140.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-140.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: false - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-140 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: false + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-141.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-141.js index 3cd909a67c..3e96bb06b1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-141.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-141.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-141.js - * @description Object.defineProperties - 'writable' property of 'descObj' is inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - writable: false - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-141 +description: > + Object.defineProperties - 'writable' property of 'descObj' is + inherited data property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + writable: false + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-142.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-142.js index 36d961509e..c8d773512f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-142.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-142.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-142.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - writable: true - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - descObj.writable = false; - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-142 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + data property that overrides an inherited data property (8.10.5 + step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + writable: true + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + descObj.writable = false; + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-143.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-143.js index cc446e504a..4d9c84a2f0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-143.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-143.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-143.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { value: 120 }; - - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "writable", { - value: false - }); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && obj.property === 120; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-143 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + data property that overrides an inherited accessor property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { value: 120 }; + + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "writable", { + value: false + }); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && obj.property === 120; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-144.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-144.js index b6b3179794..285610f21b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-144.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-144.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-144.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = {}; - - Object.defineProperty(descObj, "writable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-144 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = {}; + + Object.defineProperty(descObj, "writable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-145.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-145.js index 079a64cda8..4d8c8cd730 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-145.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-145.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-145.js - * @description Object.defineProperties - 'writable' property of 'descObj' is inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-145 +description: > + Object.defineProperties - 'writable' property of 'descObj' is + inherited accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-146.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-146.js index efcbb574d1..abfba42d53 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-146.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-146.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-146.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - writable: true - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "writable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-146 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + accessor property that overrides an inherited data property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + writable: true + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "writable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-147.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-147.js index e495ea2e24..4db49aa113 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-147.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-147.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-147.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "writable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-147 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "writable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-148.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-148.js index 464bcdf52f..72c5c9bda3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-148.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-148.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-148.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own accessor property without a get function (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = {}; - - Object.defineProperty(descObj, "writable", { - set: function () { } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-148 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + accessor property without a get function (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = {}; + + Object.defineProperty(descObj, "writable", { + set: function () { } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-149.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-149.js index d06cec25f8..b984febec6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-149.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-149.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-149.js - * @description Object.defineProperties - 'writable' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "writable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "writable", { - set: function () { } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-149 +description: > + Object.defineProperties - 'writable' property of 'descObj' is own + accessor property without a get function that overrides an + inherited accessor property (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "writable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "writable", { + set: function () { } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-15.js index 2b769b7991..be87f59c37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-15.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-15.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - var accessed = false; - Object.defineProperty(proto, "enumerable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "enumerable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-15 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own accessor property that overrides an inherited accessor + property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + var accessed = false; + Object.defineProperty(proto, "enumerable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "enumerable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-150.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-150.js index 9dbc88f9b0..283fe2c277 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-150.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-150.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-150.js - * @description Object.defineProperties - 'writable' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "writable", { - set: function () { } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-150 +description: > + Object.defineProperties - 'writable' property of 'descObj' is + inherited accessor property without a get function (8.10.5 step + 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "writable", { + set: function () { } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-151.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-151.js index 4f306ec2d1..4efab8a00e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-151.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-151.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-151.js - * @description Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b) { - return a + b; - }; - - func.writable = false; - - Object.defineProperties(obj, { - property: func - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-151 +description: > + Object.defineProperties - 'descObj' is a Function object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b) { + return a + b; + }; + + func.writable = false; + + Object.defineProperties(obj, { + property: func + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-152.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-152.js index cadeed3c7d..512eda784e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-152.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-152.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-152.js - * @description Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var arr = [1, 2, 3]; - - arr.writable = false; - - Object.defineProperties(obj, { - property: arr - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-152 +description: > + Object.defineProperties - 'descObj' is an Array object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var arr = [1, 2, 3]; + + arr.writable = false; + + Object.defineProperties(obj, { + property: arr + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-153.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-153.js index 4fbf0b3d6d..a1e80ba2a0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-153.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-153.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-153.js - * @description Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var str = new String("abc"); - - str.writable = false; - - Object.defineProperties(obj, { - property: str - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-153 +description: > + Object.defineProperties - 'descObj' is a String object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var str = new String("abc"); + + str.writable = false; + + Object.defineProperties(obj, { + property: str + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-154.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-154.js index 2d43785dfe..995f522e5e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-154.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-154.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-154.js - * @description Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Boolean(false); - - descObj.writable = false; - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-154 +description: > + Object.defineProperties - 'descObj' is a Boolean object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Boolean(false); + + descObj.writable = false; + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-155.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-155.js index 36b5b8760e..790b335ef3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-155.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-155.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-155.js - * @description Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Number(-9); - - descObj.writable = false; - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-155 +description: > + Object.defineProperties - 'descObj' is a Number object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Number(-9); + + descObj.writable = false; + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-156.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-156.js index 4454212950..33127f81a4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-156.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-156.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-156.js - * @description Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var obj = {}; - - try { - Math.writable = false; - - Object.defineProperties(obj, { - property: Math - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } finally { - delete Math.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-156 +description: > + Object.defineProperties - 'descObj' is the Math object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Math.writable = false; + + Object.defineProperties(obj, { + property: Math + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } finally { + delete Math.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-157.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-157.js index 1bbd65cb47..a7bfc47457 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-157.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-157.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-157.js - * @description Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Date(); - - descObj.writable = false; - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-157 +description: > + Object.defineProperties - 'descObj' is a Date object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Date(); + + descObj.writable = false; + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-158.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-158.js index e9b5504da7..090aa0ff9f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-158.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-158.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-158.js - * @description Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new RegExp(); - - descObj.writable = false; - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-158 +description: > + Object.defineProperties - 'descObj' is a RegExp object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new RegExp(); + + descObj.writable = false; + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-159.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-159.js index 82ec511bf7..75abd9a4bb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-159.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-159.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-159.js - * @description Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var obj = {}; - - try { - JSON.writable = false; - - Object.defineProperties(obj, { - property: JSON - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } finally { - delete JSON.writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-159 +description: > + Object.defineProperties - 'descObj' is the JSON object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + JSON.writable = false; + + Object.defineProperties(obj, { + property: JSON + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } finally { + delete JSON.writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-16.js index 8e01a63f6c..dfa20d7c0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-16.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-16.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property without a get function (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - var descObj = {}; - - Object.defineProperty(descObj, "enumerable", { - set: function () { } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-16 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own accessor property without a get function (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + var descObj = {}; + + Object.defineProperty(descObj, "enumerable", { + set: function () { } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-160.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-160.js index 307ca72a87..e1285a5f2b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-160.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-160.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-160.js - * @description Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Error(); - - descObj.writable = false; - - Object.defineProperties(obj, { - property: descObj - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-160 +description: > + Object.defineProperties - 'descObj' is an Error object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Error(); + + descObj.writable = false; + + Object.defineProperties(obj, { + property: descObj + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-161.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-161.js index bac3280c76..506f36a79e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-161.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-161.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-161.js - * @description Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b) { - arguments.writable = false; - - Object.defineProperties(obj, { - property: arguments - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - }; - - return func(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-161 +description: > + Object.defineProperties - 'descObj' is the Arguments object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b) { + arguments.writable = false; + + Object.defineProperties(obj, { + property: arguments + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + }; + + return func(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-163.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-163.js index bae1ad92f9..d485dae302 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-163.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-163.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-163.js - * @description Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a) - */ - - -function testcase() { - - var obj = {}; - - try { - fnGlobalObject().writable = false; - - Object.defineProperties(obj, { - property: fnGlobalObject() - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } finally { - delete fnGlobalObject().writable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-163 +description: > + Object.defineProperties - 'descObj' is the global object which + implements its own [[Get]] method to get 'writable' property + (8.10.5 step 6.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var obj = {}; + + try { + fnGlobalObject().writable = false; + + Object.defineProperties(obj, { + property: fnGlobalObject() + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } finally { + delete fnGlobalObject().writable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-164.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-164.js index 834c1eff5b..0ed8c76255 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-164.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-164.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-164.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is undefined (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: undefined - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-164 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is undefined (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: undefined + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-165.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-165.js index 552b10d716..93162ef637 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-165.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-165.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-165.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is null (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: null - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-165 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is null (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: null + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-166.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-166.js index 24d62efa48..55243da22b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-166.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-166.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-166.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is true (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: true - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-166 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is true (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: true + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-167.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-167.js index a1415191a0..b4a58a8d8f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-167.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-167.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-167.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is false (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: false - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-167 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is false (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: false + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-168.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-168.js index 0dd0fed77b..4cc9e32f7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-168.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-168.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-168.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is 0 (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: 0 - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-168 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is 0 (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: 0 + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-169.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-169.js index fc765ce04f..0642bd9fab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-169.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-169.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-169.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is +0 (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: +0 - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-169 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is +0 (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: +0 + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-17.js index d7c4c72155..9a5c60eccf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-17.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-17.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - var accessed = false; - Object.defineProperty(proto, "enumerable", { - get: function () { - return false; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "enumerable", { - set: function () { } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-17 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own accessor property without a get function that overrides an + inherited accessor property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + var accessed = false; + Object.defineProperty(proto, "enumerable", { + get: function () { + return false; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "enumerable", { + set: function () { } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-170.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-170.js index d068d62fc1..06def7b7c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-170.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-170.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-170.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is -0 (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: -0 - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-170 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is -0 (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: -0 + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-171.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-171.js index e92a2b23fb..ba567b9beb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-171.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-171.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-171.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is NaN (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: NaN - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-171 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is NaN (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: NaN + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-172.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-172.js index 8ba112d97b..829fc7bc45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-172.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-172.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-172.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is positive number (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: 123 - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-172 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is positive number (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: 123 + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-173.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-173.js index fef0fe1c20..e4c4c14e9c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-173.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-173.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-173.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is negative number (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: -123 - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-173 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is negative number (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: -123 + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-174.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-174.js index 4400118a27..5dde2bfc0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-174.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-174.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-174.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is empty string (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: "" - } - }); - - obj.property = "isWritable"; - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-174 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is empty string (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: "" + } + }); + + obj.property = "isWritable"; + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-175.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-175.js index c2d5806d44..67078b2859 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-175.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-175.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-175.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is non-empty string (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: "abc" - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-175 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is non-empty string (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: "abc" + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-176.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-176.js index d21760ed5b..11ef545104 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-176.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-176.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-176.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is Function object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: function () { } - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-176 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is Function object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: function () { } + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-177.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-177.js index fb2f97c32e..b50419e98f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-177.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-177.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-177.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is Array object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: [] - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-177 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is Array object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: [] + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-178.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-178.js index ae9f69682e..34ea7c571c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-178.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-178.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-178.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is String object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new String("abc") - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-178 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is String object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new String("abc") + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-179.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-179.js index 5f2f10fc0c..3542005623 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-179.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-179.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-179.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is Boolean object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new Boolean(true) - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-179 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is Boolean object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new Boolean(true) + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-18.js index 2840cdac1a..8595a9f849 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-18.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-18.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - var accessed = false; - - Object.defineProperty(proto, "enumerable", { - set: function () { } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-18 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + inherited accessor property without a get function (8.10.5 step + 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + var accessed = false; + + Object.defineProperty(proto, "enumerable", { + set: function () { } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-180.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-180.js index b741581804..3b53339213 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-180.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-180.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-180.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is Number object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new Number(123) - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-180 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is Number object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new Number(123) + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-181.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-181.js index 6fde315856..b41527f0ae 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-181.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-181.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-181.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is the Math object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: Math - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-181 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is the Math object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: Math + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-182.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-182.js index 2f4359f949..e892fc717b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-182.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-182.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-182.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is Date object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new Date() - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-182 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is Date object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new Date() + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-183.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-183.js index 1036dbf6fe..619b031cd8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-183.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-183.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-183.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is RegExp object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new RegExp() - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-183 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is RegExp object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new RegExp() + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-184.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-184.js index c90f89dd3b..6448bcc9c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-184.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-184.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-184.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is the JSON object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: JSON - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-184 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is the JSON object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: JSON + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-185.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-185.js index 191e904767..1f2a649ef1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-185.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-185.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-185.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is Error object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new SyntaxError() - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-185 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is Error object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new SyntaxError() + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-186.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-186.js index 3d9b222c61..fda13b1bb9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-186.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-186.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-186.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is the Argument object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b, c) { - return arguments; - }; - - Object.defineProperties(obj, { - property: { - writable: func(1, true, "a") - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-186 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is the Argument object (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b, c) { + return arguments; + }; + + Object.defineProperties(obj, { + property: { + writable: func(1, true, "a") + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-188.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-188.js index db988505d6..e7e444b0f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-188.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-188.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-188.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is the global object (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: fnGlobalObject() - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-188 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is the global object (8.10.5 step 6.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: fnGlobalObject() + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-189.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-189.js index fa1689f96c..545ac80c52 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-189.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-189.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-189.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is a string (value is 'false') which is treated as true value (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: "false" - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-189 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is a string (value is 'false') which is treated as true + value (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: "false" + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-19.js index aed16b65c0..ec4d725ab7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-19.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-19.js - * @description Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = function () { }; - var accessed = false; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-19 +description: > + Object.defineProperties - 'descObj' is a Function object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = function () { }; + var accessed = false; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-190.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-190.js index 087368d4f1..4b17ccc28a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-190.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-190.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-190.js - * @description Object.defineProperties - value of 'writable' property of 'descObj' is new Boolean(false) which is treated as true value (8.10.5 step 6.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - writable: new Boolean(false) - } - }); - - obj.property = "isWritable"; - - return obj.property === "isWritable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-190 +description: > + Object.defineProperties - value of 'writable' property of + 'descObj' is new Boolean(false) which is treated as true value + (8.10.5 step 6.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + writable: new Boolean(false) + } + }); + + obj.property = "isWritable"; + + return obj.property === "isWritable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-191.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-191.js index 2406ffa15e..4b6a36ca3b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-191.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-191.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-191.js - * @description Object.defineProperties - 'get' property of 'descObj' is present (8.10.5 step 7) - */ - - -function testcase() { - var obj = {}; - - var getter = function () { - return "present"; - }; - - Object.defineProperties(obj, { - property: { - get: getter - } - }); - - return obj.property === "present"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-191 +description: > + Object.defineProperties - 'get' property of 'descObj' is present + (8.10.5 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getter = function () { + return "present"; + }; + + Object.defineProperties(obj, { + property: { + get: getter + } + }); + + return obj.property === "present"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-192.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-192.js index 230ce4987a..50c7a4d7b5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-192.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-192.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-192.js - * @description Object.defineProperties - 'get' property of 'descObj' is not present (8.10.5 step 7) - */ - - -function testcase() { - var obj = {}; - - var setter = function () { }; - - Object.defineProperties(obj, { - property: { - set: setter - } - }); - - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-192 +description: > + Object.defineProperties - 'get' property of 'descObj' is not + present (8.10.5 step 7) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var setter = function () { }; + + Object.defineProperties(obj, { + property: { + set: setter + } + }); + + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-193.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-193.js index 7d701fc82a..3b0dd89bd4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-193.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-193.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-193.js - * @description Object.defineProperties - 'get' property of 'descObj' is own data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var getter = function () { - return "ownDataProperty"; - }; - - Object.defineProperties(obj, { - property: { - get: getter - } - }); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-193 +description: > + Object.defineProperties - 'get' property of 'descObj' is own data + property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getter = function () { + return "ownDataProperty"; + }; + + Object.defineProperties(obj, { + property: { + get: getter + } + }); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-194.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-194.js index 0830a276bf..71384eb520 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-194.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-194.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-194.js - * @description Object.defineProperties - 'get' property of 'descObj' is inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var getter = function () { - return "inheritedDataProperty"; - }; - - var proto = { - get: getter - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "inheritedDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-194 +description: > + Object.defineProperties - 'get' property of 'descObj' is inherited + data property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getter = function () { + return "inheritedDataProperty"; + }; + + var proto = { + get: getter + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "inheritedDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-195.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-195.js index 697c809291..38dc407e43 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-195.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-195.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-195.js - * @description Object.defineProperties - 'get' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var getter = function () { - return "inheritedDataProperty"; - }; - - var proto = { - get: getter - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - descObj.get = function () { - return "ownDataProperty"; - }; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-195 +description: > + Object.defineProperties - 'get' property of 'descObj' is own data + property that overrides an inherited data property (8.10.5 step + 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getter = function () { + return "inheritedDataProperty"; + }; + + var proto = { + get: getter + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + descObj.get = function () { + return "ownDataProperty"; + }; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-196.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-196.js index 00f7931188..75d5d61528 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-196.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-196.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-196.js - * @description Object.defineProperties - 'get' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "get", { - value: function () { - return "ownDataProperty"; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownDataProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-196 +description: > + Object.defineProperties - 'get' property of 'descObj' is own data + property that overrides an inherited accessor property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "get", { + value: function () { + return "ownDataProperty"; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownDataProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-197.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-197.js index 2b85f45929..6532a34304 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-197.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-197.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-197.js - * @description Object.defineProperties - 'get' property of 'descObj' is own accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = {}; - - Object.defineProperty(descObj, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-197 +description: > + Object.defineProperties - 'get' property of 'descObj' is own + accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = {}; + + Object.defineProperty(descObj, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-198.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-198.js index bb527654b8..a7decfdcd2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-198.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-198.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-198.js - * @description Object.defineProperties - 'get' property of 'descObj' is inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "inheritedAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-198 +description: > + Object.defineProperties - 'get' property of 'descObj' is inherited + accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "inheritedAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-199.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-199.js index 5c694b2b6e..cfe54839f9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-199.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-199.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-199.js - * @description Object.defineProperties - 'get' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var proto = { - get: function () { - return "inheritedDataProperty"; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-199 +description: > + Object.defineProperties - 'get' property of 'descObj' is own + accessor property that overrides an inherited data property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = { + get: function () { + return "inheritedDataProperty"; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-2.js index 68e860a3d6..db68a590e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-2.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-2.js - * @description Object.defineProperties - 'descObj' is null (8.10.5 step 1) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: null - }); - return false; - } catch (e) { - return e instanceof TypeError && !obj.hasOwnProperty("prop"); ; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-2 +description: Object.defineProperties - 'descObj' is null (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: null + }); + return false; + } catch (e) { + return e instanceof TypeError && !obj.hasOwnProperty("prop"); ; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-20.js index 48cf2e4fe2..369365440c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-20.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-20.js - * @description Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - var descObj = []; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-20 +description: > + Object.defineProperties - 'descObj' is an Array object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + var descObj = []; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-200.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-200.js index 00ae3d0e47..1bb5b3ce1f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-200.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-200.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-200.js - * @description Object.defineProperties - 'get' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "get", { - get: function () { - return function () { - return "ownAccessorProperty"; - }; - } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "ownAccessorProperty"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-200 +description: > + Object.defineProperties - 'get' property of 'descObj' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "get", { + get: function () { + return function () { + return "ownAccessorProperty"; + }; + } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "ownAccessorProperty"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-201.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-201.js index 4dee2d5567..8c65185fb0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-201.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-201.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-201.js - * @description Object.defineProperties - 'get' property of 'descObj' is own accessor property without a get function (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = {}; - - Object.defineProperty(descObj, "get", { - set: function () { } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-201 +description: > + Object.defineProperties - 'get' property of 'descObj' is own + accessor property without a get function (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = {}; + + Object.defineProperty(descObj, "get", { + set: function () { } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-202.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-202.js index acdd759275..fcff868226 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-202.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-202.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-202.js - * @description Object.defineProperties - 'get' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "get", { - get: function () { - return function () { - return "inheritedAccessorProperty"; - }; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperty(descObj, "get", { - set: function () { } - }); - - Object.defineProperties(obj, { - property: descObj - }); - - return typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-202 +description: > + Object.defineProperties - 'get' property of 'descObj' is own + accessor property without a get function that overrides an + inherited accessor property (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "get", { + get: function () { + return function () { + return "inheritedAccessorProperty"; + }; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperty(descObj, "get", { + set: function () { } + }); + + Object.defineProperties(obj, { + property: descObj + }); + + return typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-203.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-203.js index 01b8fd7ef4..9087239e99 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-203.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-203.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-203.js - * @description Object.defineProperties - 'get' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var proto = {}; - - Object.defineProperty(proto, "get", { - set: function () { } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - - Object.defineProperties(obj, { - property: descObj - }); - - return typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-203 +description: > + Object.defineProperties - 'get' property of 'descObj' is inherited + accessor property without a get function (8.10.5 step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var proto = {}; + + Object.defineProperty(proto, "get", { + set: function () { } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + + Object.defineProperties(obj, { + property: descObj + }); + + return typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-204.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-204.js index f7fbfff4b1..d630fbd2d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-204.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-204.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-204.js - * @description Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b) { - return a + b; - }; - - func.get = function () { - return "Function"; - }; - - Object.defineProperties(obj, { - property: func - }); - - return obj.property === "Function"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-204 +description: > + Object.defineProperties - 'descObj' is a Function object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b) { + return a + b; + }; + + func.get = function () { + return "Function"; + }; + + Object.defineProperties(obj, { + property: func + }); + + return obj.property === "Function"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-205.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-205.js index 34722bd458..4987732f09 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-205.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-205.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-205.js - * @description Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var arr = []; - - arr.get = function () { - return "Array"; - }; - - Object.defineProperties(obj, { - property: arr - }); - - return obj.property === "Array"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-205 +description: > + Object.defineProperties - 'descObj' is an Array object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var arr = []; + + arr.get = function () { + return "Array"; + }; + + Object.defineProperties(obj, { + property: arr + }); + + return obj.property === "Array"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-206.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-206.js index 49014f5ad2..282dcb1693 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-206.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-206.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-206.js - * @description Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var str = new String("abc"); - - str.get = function () { - return "string Object"; - }; - - Object.defineProperties(obj, { - property: str - }); - - return obj.property === "string Object"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-206 +description: > + Object.defineProperties - 'descObj' is a String object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var str = new String("abc"); + + str.get = function () { + return "string Object"; + }; + + Object.defineProperties(obj, { + property: str + }); + + return obj.property === "string Object"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-207.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-207.js index c2aa17273c..2fb34238bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-207.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-207.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-207.js - * @description Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Boolean(false); - - descObj.get = function () { - return "Boolean"; - }; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Boolean"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-207 +description: > + Object.defineProperties - 'descObj' is a Boolean object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Boolean(false); + + descObj.get = function () { + return "Boolean"; + }; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Boolean"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-208.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-208.js index 601fe63254..06c5c77913 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-208.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-208.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-208.js - * @description Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Number(-9); - - descObj.get = function () { - return "Number"; - }; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Number"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-208 +description: > + Object.defineProperties - 'descObj' is a Number object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Number(-9); + + descObj.get = function () { + return "Number"; + }; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Number"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-209.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-209.js index 2333e743c1..8d2115fb4a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-209.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-209.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-209.js - * @description Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - - var obj = {}; - - try { - Math.get = function () { - return "Math"; - }; - - Object.defineProperties(obj, { - property: Math - }); - - return obj.property === "Math"; - } finally { - delete Math.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-209 +description: > + Object.defineProperties - 'descObj' is the Math object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Math.get = function () { + return "Math"; + }; + + Object.defineProperties(obj, { + property: Math + }); + + return obj.property === "Math"; + } finally { + delete Math.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-21.js index 9593500846..c1ebdb36e4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-21.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-21.js - * @description Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = new String(); - var accessed = false; - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-21 +description: > + Object.defineProperties - 'descObj' is a String object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = new String(); + var accessed = false; + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-210.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-210.js index 320c688cf1..f212a9840b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-210.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-210.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-210.js - * @description Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Date(); - - descObj.get = function () { - return "Date"; - }; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Date"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-210 +description: > + Object.defineProperties - 'descObj' is a Date object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Date(); + + descObj.get = function () { + return "Date"; + }; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Date"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-211.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-211.js index 4feeae08d2..877b4f038b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-211.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-211.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-211.js - * @description Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new RegExp(); - - descObj.get = function () { - return "RegExp"; - }; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "RegExp"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-211 +description: > + Object.defineProperties - 'descObj' is a RegExp object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new RegExp(); + + descObj.get = function () { + return "RegExp"; + }; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "RegExp"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-212.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-212.js index 5b536504f0..fb097bd078 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-212.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-212.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-212.js - * @description Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - - var obj = {}; - - try { - JSON.get = function () { - return "JSON"; - }; - - Object.defineProperties(obj, { - property: JSON - }); - - return obj.property === "JSON"; - } finally { - delete JSON.get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-212 +description: > + Object.defineProperties - 'descObj' is the JSON object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + JSON.get = function () { + return "JSON"; + }; + + Object.defineProperties(obj, { + property: JSON + }); + + return obj.property === "JSON"; + } finally { + delete JSON.get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-213.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-213.js index 2905a30ddf..fdd80e52a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-213.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-213.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-213.js - * @description Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var descObj = new Error(); - - descObj.get = function () { - return "Error"; - }; - - Object.defineProperties(obj, { - property: descObj - }); - - return obj.property === "Error"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-213 +description: > + Object.defineProperties - 'descObj' is an Error object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var descObj = new Error(); + + descObj.get = function () { + return "Error"; + }; + + Object.defineProperties(obj, { + property: descObj + }); + + return obj.property === "Error"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-214.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-214.js index 9484b9135c..a40095525f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-214.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-214.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-214.js - * @description Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - var obj = {}; - - var func = function (a, b) { - arguments.get = function () { - return "arguments"; - }; - - Object.defineProperties(obj, { - property: arguments - }); - - return obj.property === "arguments"; - }; - - return func(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-214 +description: > + Object.defineProperties - 'descObj' is the Arguments object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var func = function (a, b) { + arguments.get = function () { + return "arguments"; + }; + + Object.defineProperties(obj, { + property: arguments + }); + + return obj.property === "arguments"; + }; + + return func(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-216.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-216.js index ea8ee7e188..e86df67efa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-216.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-216.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-216.js - * @description Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a) - */ - - -function testcase() { - - var obj = {}; - - try { - fnGlobalObject().get = function () { - return "global"; - }; - - Object.defineProperties(obj, { - property: fnGlobalObject() - }); - - return obj.property === "global"; - } finally { - delete fnGlobalObject().get; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-216 +description: > + Object.defineProperties - 'descObj' is the global object which + implements its own [[Get]] method to get 'get' property (8.10.5 + step 7.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var obj = {}; + + try { + fnGlobalObject().get = function () { + return "global"; + }; + + Object.defineProperties(obj, { + property: fnGlobalObject() + }); + + return obj.property === "global"; + } finally { + delete fnGlobalObject().get; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-217.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-217.js index 7bc3a6a8b9..273ee94c37 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-217.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-217.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-217.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is undefined (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - get: undefined - } - }); - - return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-217 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + undefined (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + get: undefined + } + }); + + return obj.hasOwnProperty("property") && typeof obj.property === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-218.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-218.js index bc2bf525ad..b605246423 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-218.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-218.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-218.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is null) (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.defineProperties(obj, { - property: { - get: null - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-218 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + primitive values( value is null) (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.defineProperties(obj, { + property: { + get: null + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-219.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-219.js index 4781afc5f2..7db948cb74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-219.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-219.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-219.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is boolean) (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.defineProperties(obj, { - property: { - get: false - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-219 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + primitive values( value is boolean) (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.defineProperties(obj, { + property: { + get: false + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-22.js index 4faa587a3f..dbf3e0122f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-22.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-22.js - * @description Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = new Boolean(false); - var accessed = false; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-22 +description: > + Object.defineProperties - 'descObj' is a Boolean object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = new Boolean(false); + var accessed = false; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-220.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-220.js index 37562cba61..3e933c0652 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-220.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-220.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-220.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is number) (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.defineProperties(obj, { - property: { - get: 123 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-220 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + primitive values( value is number) (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.defineProperties(obj, { + property: { + get: 123 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-221.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-221.js index 59a035074b..87547ac121 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-221.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-221.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-221.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is string) (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.defineProperties(obj, { - property: { - get: "string" - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-221 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + primitive values( value is string) (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.defineProperties(obj, { + property: { + get: "string" + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-222.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-222.js index 7e5079e95e..b71da68bc3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-222.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-222.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-222.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is applied to Array object (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - try { - Object.defineProperties(obj, { - property: { - get: [] - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-222 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + applied to Array object (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + try { + Object.defineProperties(obj, { + property: { + get: [] + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-223.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-223.js index 161d1cb525..1e7f90454f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-223.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-223.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-223.js - * @description Object.defineProperties - value of 'get' property of 'descObj' is a function (8.10.5 step 7.b) - */ - - -function testcase() { - var obj = {}; - - var getter = function () { - return 100; - }; - - Object.defineProperties(obj, { - property: { - get: getter - } - }); - - return obj.property === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-223 +description: > + Object.defineProperties - value of 'get' property of 'descObj' is + a function (8.10.5 step 7.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var getter = function () { + return 100; + }; + + Object.defineProperties(obj, { + property: { + get: getter + } + }); + + return obj.property === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-226.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-226.js index 2ea3d234c3..b6eeb92aad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-226.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-226.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-226.js - * @description Object.defineProperties - 'set' property of 'descObj' is present (8.10.5 step 8) - */ - - -function testcase() { - var data = "data"; - var obj = {}; - - Object.defineProperties(obj, { - "prop": { - set: function (value) { - data = value; - } - } - }); - - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-226 +description: > + Object.defineProperties - 'set' property of 'descObj' is present + (8.10.5 step 8) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var obj = {}; + + Object.defineProperties(obj, { + "prop": { + set: function (value) { + data = value; + } + } + }); + + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-227.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-227.js index e12ba96cfc..f8a0874bcc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-227.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-227.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-227.js - * @description Object.defineProperties - 'set' property of 'descObj' is not present (8.10.5 step 8) - */ - - -function testcase() { - var data = "data"; - var obj = {}; - - try { - Object.defineProperties(obj, { - descObj: { - get: function () { - return data; - } - } - }); - - - obj.descObj = "overrideData"; - - var desc = Object.getOwnPropertyDescriptor(obj, "descObj"); - return obj.hasOwnProperty("descObj") && typeof (desc.set) === "undefined" && data === "data"; - } catch (e) { - return false; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-227 +description: > + Object.defineProperties - 'set' property of 'descObj' is not + present (8.10.5 step 8) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var obj = {}; + + try { + Object.defineProperties(obj, { + descObj: { + get: function () { + return data; + } + } + }); + + + obj.descObj = "overrideData"; + + var desc = Object.getOwnPropertyDescriptor(obj, "descObj"); + return obj.hasOwnProperty("descObj") && typeof (desc.set) === "undefined" && data === "data"; + } catch (e) { + return false; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-228.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-228.js index 6bed0b8df6..33f0af8a80 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-228.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-228.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-228.js - * @description Object.defineProperties - 'set' property of 'descObj' is own data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var obj = {}; - - Object.defineProperties(obj, { - descObj: { - set: function (value) { - data = value; - } - } - }); - - obj.descObj = "overrideData"; - - return obj.hasOwnProperty("descObj") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-228 +description: > + Object.defineProperties - 'set' property of 'descObj' is own data + property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var obj = {}; + + Object.defineProperties(obj, { + descObj: { + set: function (value) { + data = value; + } + } + }); + + obj.descObj = "overrideData"; + + return obj.hasOwnProperty("descObj") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-229.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-229.js index 66fc9c445c..ad1c3c5b55 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-229.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-229.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-229.js - * @description Object.defineProperties - 'set' property of 'descObj' is inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var proto = { - set: function (value) { - data = value; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - var obj = {}; - - Object.defineProperties(obj, { - prop: child - }); - - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data === "overrideData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-229 +description: > + Object.defineProperties - 'set' property of 'descObj' is inherited + data property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var proto = { + set: function (value) { + data = value; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + var obj = {}; + + Object.defineProperties(obj, { + prop: child + }); + + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data === "overrideData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-23.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-23.js index dac72261fb..91c78ed86e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-23.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-23.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-23.js - * @description Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = new Number(-9); - var accessed = false; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-23 +description: > + Object.defineProperties - 'descObj' is a Number object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = new Number(-9); + var accessed = false; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-230.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-230.js index a1fcd3d71b..3fb18bed74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-230.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-230.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-230.js - * @description Object.defineProperties - 'set' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - var proto = { - set: function (value) { - data2 = value; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.set = function (value) { - data1 = value; - }; - - var obj = {}; - - Object.defineProperties(obj, { - prop: child - }); - - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data1 === "overrideData" && data2 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-230 +description: > + Object.defineProperties - 'set' property of 'descObj' is own data + property that overrides an inherited data property (8.10.5 step + 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + var proto = { + set: function (value) { + data2 = value; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.set = function (value) { + data1 = value; + }; + + var obj = {}; + + Object.defineProperties(obj, { + prop: child + }); + + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data1 === "overrideData" && data2 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-231.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-231.js index 6265597dc2..d6d5001cd1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-231.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-231.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-231.js - * @description Object.defineProperties - 'set' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - var fun = function (value) { - data2 = value; - }; - var proto = {}; - Object.defineProperty(proto, "set", { - get: function () { - return fun; - }, - set: function (value) { - fun = value; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.set = function (value) { - data1 = value; - }; - - var obj = {}; - - Object.defineProperties(obj, { - prop: child - }); - - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data1 === "overrideData" && data2 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-231 +description: > + Object.defineProperties - 'set' property of 'descObj' is own data + property that overrides an inherited accessor property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + var fun = function (value) { + data2 = value; + }; + var proto = {}; + Object.defineProperty(proto, "set", { + get: function () { + return fun; + }, + set: function (value) { + fun = value; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.set = function (value) { + data1 = value; + }; + + var obj = {}; + + Object.defineProperties(obj, { + prop: child + }); + + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data1 === "overrideData" && data2 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-232.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-232.js index a586d233d0..59bbaf06a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-232.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-232.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-232.js - * @description Object.defineProperties - 'set' property of 'descObj' is own accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var setFun = function (value) { - data = value; - }; - var descObj = {}; - Object.defineProperty(descObj, "set", { - get: function () { - return setFun; - } - }); - - var obj = {}; - - Object.defineProperties(obj, { - prop: descObj - }); - - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data === "overrideData"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-232 +description: > + Object.defineProperties - 'set' property of 'descObj' is own + accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var setFun = function (value) { + data = value; + }; + var descObj = {}; + Object.defineProperty(descObj, "set", { + get: function () { + return setFun; + } + }); + + var obj = {}; + + Object.defineProperties(obj, { + prop: descObj + }); + + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data === "overrideData"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-233.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-233.js index f0224ce416..a146b6e1a6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-233.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-233.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-233.js - * @description Object.defineProperties - 'set' property of 'descObj' is inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var setFun = function (value) { - data = value; - }; - var proto = {}; - Object.defineProperty(proto, "set", { - get: function () { - return setFun; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - var obj = {}; - - Object.defineProperties(obj, { - prop: child - }); - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data === "overrideData"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-233 +description: > + Object.defineProperties - 'set' property of 'descObj' is inherited + accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var setFun = function (value) { + data = value; + }; + var proto = {}; + Object.defineProperty(proto, "set", { + get: function () { + return setFun; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + var obj = {}; + + Object.defineProperties(obj, { + prop: child + }); + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data === "overrideData"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-234.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-234.js index 2c9149385d..c9da8b4b45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-234.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-234.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-234.js - * @description Object.defineProperties - 'set' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - - var proto = {}; - proto.set = function (value) { - data1 = value; - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "set", { - get: function () { - return function (value) { - data2 = value; - }; - } - }); - - var obj = {}; - - Object.defineProperties(obj, { - prop: child - }); - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data2 === "overrideData" && data1 === "data"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-234 +description: > + Object.defineProperties - 'set' property of 'descObj' is own + accessor property that overrides an inherited data property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + + var proto = {}; + proto.set = function (value) { + data1 = value; + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "set", { + get: function () { + return function (value) { + data2 = value; + }; + } + }); + + var obj = {}; + + Object.defineProperties(obj, { + prop: child + }); + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data2 === "overrideData" && data1 === "data"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-235.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-235.js index cfcb0b7414..7a4358aade 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-235.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-235.js @@ -1,47 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-235.js - * @description Object.defineProperties - 'set' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - var data1 = "data"; - var data2 = "data"; - - var proto = {}; - Object.defineProperty(proto, "set", { - get: function () { - return function (value) { - data1 = value; - }; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "set", { - get: function () { - return function (value) { - data2 = value; - }; - } - }); - - var obj = {}; - - Object.defineProperties(obj, { - prop: child - }); - - obj.prop = "overrideData"; - - return obj.hasOwnProperty("prop") && data2 === "overrideData" && data1 === "data"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-235 +description: > + Object.defineProperties - 'set' property of 'descObj' is own + accessor property that overrides an inherited accessor property + (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data1 = "data"; + var data2 = "data"; + + var proto = {}; + Object.defineProperty(proto, "set", { + get: function () { + return function (value) { + data1 = value; + }; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "set", { + get: function () { + return function (value) { + data2 = value; + }; + } + }); + + var obj = {}; + + Object.defineProperties(obj, { + prop: child + }); + + obj.prop = "overrideData"; + + return obj.hasOwnProperty("prop") && data2 === "overrideData" && data1 === "data"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-236.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-236.js index cab1f2627b..ffb1a7868b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-236.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-236.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-236.js - * @description Object.defineProperties - 'set' property of 'descObj' is own accessor property without a get function (8.10.5 step 8.a) - */ - - -function testcase() { - var fun = function () { - return 10; - }; - var descObj = { - get: fun - }; - Object.defineProperty(descObj, "set", { - set: function () { } - }); - - var obj = {}; - - Object.defineProperties(obj, { - prop: descObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && typeof desc.set === "undefined" && obj.prop === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-236 +description: > + Object.defineProperties - 'set' property of 'descObj' is own + accessor property without a get function (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var fun = function () { + return 10; + }; + var descObj = { + get: fun + }; + Object.defineProperty(descObj, "set", { + set: function () { } + }); + + var obj = {}; + + Object.defineProperties(obj, { + prop: descObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && typeof desc.set === "undefined" && obj.prop === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-237.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-237.js index b36f3a811b..7957d29b55 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-237.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-237.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-237.js - * @description Object.defineProperties - 'set' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 8.a) - */ - - -function testcase() { - - var fun = function () { - return 10; - }; - var proto = {}; - Object.defineProperty(proto, "set", { - get: function () { - return function () { - return arguments; - }; - } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - Object.defineProperty(descObj, "set", { - set: function () { } - }); - - descObj.get = fun; - - var obj = {}; - - Object.defineProperties(obj, { - prop: descObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined" && obj.prop === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-237 +description: > + Object.defineProperties - 'set' property of 'descObj' is own + accessor property without a get function that overrides an + inherited accessor property (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var fun = function () { + return 10; + }; + var proto = {}; + Object.defineProperty(proto, "set", { + get: function () { + return function () { + return arguments; + }; + } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + Object.defineProperty(descObj, "set", { + set: function () { } + }); + + descObj.get = fun; + + var obj = {}; + + Object.defineProperties(obj, { + prop: descObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined" && obj.prop === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-238.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-238.js index 61b33656f3..7f2df06927 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-238.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-238.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-238.js - * @description Object.defineProperties - 'set' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 8.a) - */ - - -function testcase() { - - var fun = function () { - return 10; - }; - var proto = {}; - Object.defineProperty(proto, "set", { - set: function () { } - }); - - var Con = function () { }; - Con.prototype = proto; - - var descObj = new Con(); - descObj.get = fun; - - var obj = {}; - - Object.defineProperties(obj, { - prop: descObj - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined" && obj.prop === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-238 +description: > + Object.defineProperties - 'set' property of 'descObj' is inherited + accessor property without a get function (8.10.5 step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var fun = function () { + return 10; + }; + var proto = {}; + Object.defineProperty(proto, "set", { + set: function () { } + }); + + var Con = function () { }; + Con.prototype = proto; + + var descObj = new Con(); + descObj.get = fun; + + var obj = {}; + + Object.defineProperties(obj, { + prop: descObj + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined" && obj.prop === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-239.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-239.js index 9fe679d8f4..eeff8198ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-239.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-239.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-239.js - * @description Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var descFun = function () { }; - var setFun = function (value) { - data = value; - }; - - descFun.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descFun); - obj.prop = "funData"; - return obj.hasOwnProperty("prop") && data === "funData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-239 +description: > + Object.defineProperties - 'descObj' is a Function object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var descFun = function () { }; + var setFun = function (value) { + data = value; + }; + + descFun.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descFun); + obj.prop = "funData"; + return obj.hasOwnProperty("prop") && data === "funData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-24.js index 42061a6258..fa7ece60c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-24.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-24.js - * @description Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - try { - Math.enumerable = true; - - Object.defineProperties(obj, { - prop: Math - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } finally { - delete Math.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-24 +description: > + Object.defineProperties - 'descObj' is the Math object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + try { + Math.enumerable = true; + + Object.defineProperties(obj, { + prop: Math + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } finally { + delete Math.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-240.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-240.js index 05e5565ab7..3f73286ef3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-240.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-240.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-240.js - * @description Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var arr = []; - var setFun = function (value) { - data = value; - }; - arr.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, arr); - obj.prop = "arrData"; - return obj.hasOwnProperty("prop") && data === "arrData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-240 +description: > + Object.defineProperties - 'descObj' is an Array object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var arr = []; + var setFun = function (value) { + data = value; + }; + arr.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, arr); + obj.prop = "arrData"; + return obj.hasOwnProperty("prop") && data === "arrData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-241.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-241.js index 4c0215058c..f99e8ebd4f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-241.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-241.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-241.js - * @description Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var descStr = new String(); - var setFun = function (value) { - data = value; - }; - - descStr.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descStr); - obj.prop = "strData"; - return obj.hasOwnProperty("prop") && data === "strData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-241 +description: > + Object.defineProperties - 'descObj' is a String object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var descStr = new String(); + var setFun = function (value) { + data = value; + }; + + descStr.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descStr); + obj.prop = "strData"; + return obj.hasOwnProperty("prop") && data === "strData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-242.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-242.js index e360b1957d..03e9806ab3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-242.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-242.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-242.js - * @description Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var descObj = new Boolean(false); - var setFun = function (value) { - data = value; - }; - descObj.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descObj); - obj.prop = "booleanData"; - return obj.hasOwnProperty("prop") && data === "booleanData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-242 +description: > + Object.defineProperties - 'descObj' is a Boolean object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var descObj = new Boolean(false); + var setFun = function (value) { + data = value; + }; + descObj.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descObj); + obj.prop = "booleanData"; + return obj.hasOwnProperty("prop") && data === "booleanData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-243.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-243.js index e7f9ef9b0b..fe8c066eca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-243.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-243.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-243.js - * @description Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var descObj = new Number(-9); - var setFun = function (value) { - data = value; - }; - descObj.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descObj); - obj.prop = "numberData"; - return obj.hasOwnProperty("prop") && data === "numberData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-243 +description: > + Object.defineProperties - 'descObj' is a Number object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var descObj = new Number(-9); + var setFun = function (value) { + data = value; + }; + descObj.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descObj); + obj.prop = "numberData"; + return obj.hasOwnProperty("prop") && data === "numberData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-244.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-244.js index 653100815d..b509239928 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-244.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-244.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-244.js - * @description Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var setFun = function (value) { - data = value; - }; - try { - Math.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, Math); - obj.prop = "mathData"; - return obj.hasOwnProperty("prop") && data === "mathData"; - } finally { - delete Math.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-244 +description: > + Object.defineProperties - 'descObj' is the Math object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var setFun = function (value) { + data = value; + }; + try { + Math.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, Math); + obj.prop = "mathData"; + return obj.hasOwnProperty("prop") && data === "mathData"; + } finally { + delete Math.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-245.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-245.js index 2f6aba6a2f..875ed6f60a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-245.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-245.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-245.js - * @description Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var descObj = new Date(); - var setFun = function (value) { - data = value; - }; - descObj.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descObj); - obj.prop = "dateData"; - return obj.hasOwnProperty("prop") && data === "dateData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-245 +description: > + Object.defineProperties - 'descObj' is a Date object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var descObj = new Date(); + var setFun = function (value) { + data = value; + }; + descObj.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descObj); + obj.prop = "dateData"; + return obj.hasOwnProperty("prop") && data === "dateData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-246.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-246.js index 71befa4243..4dc8e6bc8f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-246.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-246.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-246.js - * @description Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var descObj = new RegExp(); - var setFun = function (value) { - data = value; - }; - descObj.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descObj); - obj.prop = "regExpData"; - return obj.hasOwnProperty("prop") && data === "regExpData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-246 +description: > + Object.defineProperties - 'descObj' is a RegExp object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var descObj = new RegExp(); + var setFun = function (value) { + data = value; + }; + descObj.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descObj); + obj.prop = "regExpData"; + return obj.hasOwnProperty("prop") && data === "regExpData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-247.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-247.js index 7e3ea3845a..28bfc6d020 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-247.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-247.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-247.js - * @description Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var setFun = function (value) { - data = value; - }; - try { - JSON.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, JSON); - obj.prop = "JSONData"; - return obj.hasOwnProperty("prop") && data === "JSONData"; - } finally { - delete JSON.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-247 +description: > + Object.defineProperties - 'descObj' is the JSON object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var setFun = function (value) { + data = value; + }; + try { + JSON.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, JSON); + obj.prop = "JSONData"; + return obj.hasOwnProperty("prop") && data === "JSONData"; + } finally { + delete JSON.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-248.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-248.js index cac869fc1c..931e0f791c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-248.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-248.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-248.js - * @description Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - - var data = "data"; - var descObj = new Error("test"); - descObj.description = { value: 11 }; - descObj.message = { value: 11 }; - descObj.name = { value: 11 }; - - var setFun = function (value) { - data = value; - }; - descObj.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, descObj); - obj.prop = "errorData"; - return obj.hasOwnProperty("prop") && data === "errorData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-248 +description: > + Object.defineProperties - 'descObj' is an Error object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var descObj = new Error("test"); + descObj.description = { value: 11 }; + descObj.message = { value: 11 }; + descObj.name = { value: 11 }; + + var setFun = function (value) { + data = value; + }; + descObj.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, descObj); + obj.prop = "errorData"; + return obj.hasOwnProperty("prop") && data === "errorData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-249.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-249.js index d95749b7f7..c3dd05b7d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-249.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-249.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-249.js - * @description Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a) - */ - - -function testcase() { - var data = "data"; - var fun = function () { - return arguments; - }; - var arg = fun(); - var setFun = function (value) { - data = value; - }; - - arg.prop = { - set: setFun - }; - - var obj = {}; - Object.defineProperties(obj, arg); - obj.prop = "argData"; - return obj.hasOwnProperty("prop") && data === "argData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-249 +description: > + Object.defineProperties - 'descObj' is the Arguments object which + implements its own [[Get]] method to get 'set' property (8.10.5 + step 8.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var data = "data"; + var fun = function () { + return arguments; + }; + var arg = fun(); + var setFun = function (value) { + data = value; + }; + + arg.prop = { + set: setFun + }; + + var obj = {}; + Object.defineProperties(obj, arg); + obj.prop = "argData"; + return obj.hasOwnProperty("prop") && data === "argData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-25.js index a6c7da415b..7ed5150536 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-25.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-25.js - * @description Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = new Date(); - var accessed = false; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-25 +description: > + Object.defineProperties - 'descObj' is a Date object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = new Date(); + var accessed = false; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-252.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-252.js index a5e665fa82..6f6c540473 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-252.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-252.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-252.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is undefined (8.10.5 step 8.b) - */ - - -function testcase() { - - var getFun = function () { - return 11; - }; - - var obj = {}; - Object.defineProperties(obj, { - prop: { - get: getFun, - set: undefined - } - }); - - try { - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined"; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-252 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + undefined (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var getFun = function () { + return 11; + }; + + var obj = {}; + Object.defineProperties(obj, { + prop: { + get: getFun, + set: undefined + } + }); + + try { + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined"; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-253.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-253.js index 5a08b77eea..fa598591ec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-253.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-253.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-253.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is primitive values null (8.10.5 step 8.b) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - set: null - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-253 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + primitive values null (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + set: null + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-254.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-254.js index 301fdae64d..d763e69e3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-254.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-254.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-254.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is primitive values boolean (8.10.5 step 8.b) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - set: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-254 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + primitive values boolean (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + set: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-255.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-255.js index 18f63aa8df..7009df2cea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-255.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-255.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-255.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is primitive values number (8.10.5 step 8.b) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - set: 100 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-255 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + primitive values number (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + set: 100 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-256.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-256.js index befaef4a42..26aa124352 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-256.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-256.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-256.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is primitive values string (8.10.5 step 8.b) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - set: "abcdef" - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-256 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + primitive values string (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + set: "abcdef" + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-257.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-257.js index fcd835711d..5c04838db4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-257.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-257.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-257.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is an interesting object other than a function (8.10.5 step 8.b) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - set: [] - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-257 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + an interesting object other than a function (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + set: [] + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-258.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-258.js index ef17018333..3348ea4a30 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-258.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-258.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-258.js - * @description Object.defineProperties - value of 'set' property of 'descObj' is a function (8.10.5 step 8.b) - */ - - -function testcase() { - - var data = "data"; - var setFun = function (value) { - data = value; - }; - var obj = {}; - - - Object.defineProperties(obj, { - prop: { - set: setFun - } - }); - obj.prop = "funData"; - return obj.hasOwnProperty("prop") && data === "funData"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-258 +description: > + Object.defineProperties - value of 'set' property of 'descObj' is + a function (8.10.5 step 8.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var data = "data"; + var setFun = function (value) { + data = value; + }; + var obj = {}; + + + Object.defineProperties(obj, { + prop: { + set: setFun + } + }); + obj.prop = "funData"; + return obj.hasOwnProperty("prop") && data === "funData"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-26.js index f266f7c2d7..6dc192047b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-26.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-26.js - * @description Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = new RegExp(); - var accessed = false; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-26 +description: > + Object.defineProperties - 'descObj' is a RegExp object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = new RegExp(); + var accessed = false; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-261.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-261.js index 9928f10f64..d7e9e129ff 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-261.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-261.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-261.js - * @description Object.defineProperties - TypeError is thrown if both 'set' property and 'value' property of 'descObj' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - var setFun = function () {}; - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - set: setFun - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-261 +description: > + Object.defineProperties - TypeError is thrown if both 'set' + property and 'value' property of 'descObj' are present (8.10.5 + step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var setFun = function () {}; + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + set: setFun + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-262.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-262.js index b970346e17..78ce751348 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-262.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-262.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-262.js - * @description Object.defineProperties - TypeError is thrown if both 'set' property and 'writable' property of 'descObj' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - var setFun = function () { }; - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - writable: true, - set: setFun - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-262 +description: > + Object.defineProperties - TypeError is thrown if both 'set' + property and 'writable' property of 'descObj' are present (8.10.5 + step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var setFun = function () { }; + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + writable: true, + set: setFun + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-263.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-263.js index 3a227f469a..ba3fcc54ad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-263.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-263.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-263.js - * @description Object.defineProperties - TypeError is thrown if both 'get' property and 'value' property of 'descObj' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - var getFun = function () {}; - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - get: getFun - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-263 +description: > + Object.defineProperties - TypeError is thrown if both 'get' + property and 'value' property of 'descObj' are present (8.10.5 + step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var getFun = function () {}; + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + get: getFun + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-264.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-264.js index 531acad780..3382065d14 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-264.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-264.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-264.js - * @description Object.defineProperties - TypeError is thrown if both 'get' property and 'writable' property of 'descObj' are present (8.10.5 step 9.a) - */ - - -function testcase() { - - var getFun = function () {}; - - var obj = {}; - - try { - Object.defineProperties(obj, { - "prop": { - writable: true, - get: getFun - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-264 +description: > + Object.defineProperties - TypeError is thrown if both 'get' + property and 'writable' property of 'descObj' are present (8.10.5 + step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var getFun = function () {}; + + var obj = {}; + + try { + Object.defineProperties(obj, { + "prop": { + writable: true, + get: getFun + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-27.js index 2036b7d8d3..2a7a3361f8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-27.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-27.js - * @description Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - try { - JSON.enumerable = true; - - Object.defineProperties(obj, { - prop: JSON - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } finally { - delete JSON.enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-27 +description: > + Object.defineProperties - 'descObj' is the JSON object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + try { + JSON.enumerable = true; + + Object.defineProperties(obj, { + prop: JSON + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } finally { + delete JSON.enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-28.js index aaf46f2a0b..53a54f2bf6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-28.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-28.js - * @description Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var descObj = new Error(); - var accessed = false; - - descObj.enumerable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-28 +description: > + Object.defineProperties - 'descObj' is an Error object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var descObj = new Error(); + var accessed = false; + + descObj.enumerable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-29.js index 8a739d92a7..f893bfd17e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-29.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-29.js - * @description Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var arg; - var accessed = false; - - (function fun() { - arg = arguments; - }()); - - arg.enumerable = true; - - Object.defineProperties(obj, { - prop: arg - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-29 +description: > + Object.defineProperties - 'descObj' is the Arguments object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var arg; + var accessed = false; + + (function fun() { + arg = arguments; + }()); + + arg.enumerable = true; + + Object.defineProperties(obj, { + prop: arg + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-3.js index 44aecdca6c..a1f17f62e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-3.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-3.js - * @description Object.defineProperties - 'descObj' is a boolean (8.10.5 step 1) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: true - }); - return false; - } catch (e) { - return e instanceof TypeError && !obj.hasOwnProperty("prop"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-3 +description: Object.defineProperties - 'descObj' is a boolean (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: true + }); + return false; + } catch (e) { + return e instanceof TypeError && !obj.hasOwnProperty("prop"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-31.js index eeb7a1b1d1..3b840872e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-31.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-31.js - * @description Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - try { - fnGlobalObject().enumerable = true; - - Object.defineProperties(obj, { - prop: fnGlobalObject() - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } finally { - delete fnGlobalObject().enumerable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-31 +description: > + Object.defineProperties - 'descObj' is the global object which + implements its own [[Get]] method to get 'enumerable' property + (8.10.5 step 3.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + try { + fnGlobalObject().enumerable = true; + + Object.defineProperties(obj, { + prop: fnGlobalObject() + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } finally { + delete fnGlobalObject().enumerable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-32.js index 5e626f8e00..65429acfc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-32.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-32.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is undefined (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: undefined - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-32 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is undefined (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: undefined + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-33.js index 605a29eceb..1c0b9bf981 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-33.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-33.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is null (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: null - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-33 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is null (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: null + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-34.js index c1de06c502..87e2bac686 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-34.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-34.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is true (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: true - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-34 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is true (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: true + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-35.js index 4d13cc326b..bba3e0e7cd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-35.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-35.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is false (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: false - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-35 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is false (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: false + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-36.js index f274e07276..f38d7a2b55 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-36.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-36.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is 0 (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: 0 - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-36 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is 0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: 0 + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-37.js index 0546e8d109..7d8705a638 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-37.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-37.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is +0 (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: +0 - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-37 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is +0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: +0 + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-38.js index a507901268..96fc6ea9b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-38.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-38.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is -0 (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: -0 - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-38 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is -0 (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: -0 + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-39.js index 67db04b98e..e54355938c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-39.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-39.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is NaN (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: NaN - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-39 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is NaN (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: NaN + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-4.js index 6397a5b419..717330adac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-4.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-4.js - * @description Object.defineProperties - 'descObj' is a number (8.10.5 step 1) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: 12 - }); - return false; - } catch (e) { - return e instanceof TypeError && !obj.hasOwnProperty("prop"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-4 +description: Object.defineProperties - 'descObj' is a number (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: 12 + }); + return false; + } catch (e) { + return e instanceof TypeError && !obj.hasOwnProperty("prop"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-40.js index 610f320e34..cecc926812 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-40.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-40.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is positive number (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: 12 - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-40 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is positive number (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: 12 + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-41.js index e934657931..181425fc6f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-41.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-41.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is negative number (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: -9 - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-41 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is negative number (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: -9 + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-42.js index acae2801ac..a090d1fcce 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-42.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-42.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is empty string (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: "" - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-42 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is empty string (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: "" + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-43.js index 45e1daf167..9b061ea0c8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-43.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-43.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is non-empty string (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: "AB\n\\cd" - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-43 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is non-empty string (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: "AB\n\\cd" + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-44.js index 2d0d7c3c81..0ddb43bf17 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-44.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-44.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a Function object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: function () { } - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-44 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a Function object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: function () { } + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-45.js index 917f1a23f6..10cb835a6f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-45.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-45.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is an Array object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: [] - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-45 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is an Array object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: [] + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-46.js index ff8997fb20..2e93acc522 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-46.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-46.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a String object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new String() - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-46 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a String object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new String() + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-47.js index bd327497ea..5d181fddba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-47.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-47.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a Boolean object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new Boolean(true) - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-47 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a Boolean object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new Boolean(true) + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-48.js index 1ccb51acc8..6307dc5c64 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-48.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-48.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a Number object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new Number(-9) - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-48 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a Number object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new Number(-9) + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-49.js index dfe9f73de6..245c6757d6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-49.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-49.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is the Math object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: Math - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-49 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is the Math object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: Math + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-5.js index 2f4ac1b34d..46c2b26063 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-5.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-5.js - * @description Object.defineProperties - 'descObj' is a string (8.10.5 step 1) - */ - - -function testcase() { - - var obj = {}; - - try { - Object.defineProperties(obj, { - prop: "abc" - }); - return false; - } catch (e) { - return e instanceof TypeError && !obj.hasOwnProperty("prop"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-5 +description: Object.defineProperties - 'descObj' is a string (8.10.5 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Object.defineProperties(obj, { + prop: "abc" + }); + return false; + } catch (e) { + return e instanceof TypeError && !obj.hasOwnProperty("prop"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-50.js index ea44d4c874..23cda58820 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-50.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-50.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a Date object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new Date() - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-50 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a Date object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new Date() + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-51.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-51.js index c1dc8a2ad9..c0e2ab1c00 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-51.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-51.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-51.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a RegExp object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new RegExp() - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-51 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a RegExp object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new RegExp() + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-52.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-52.js index 8750c40099..ff5ccadd8a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-52.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-52.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-52.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is the JSON object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: JSON - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-52 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is the JSON object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: JSON + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-53.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-53.js index a473379b90..5f2ef94c21 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-53.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-53.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-53.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is an Error object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new Error() - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-53 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is an Error object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new Error() + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-54.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-54.js index f6031d98ef..e569cd2bec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-54.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-54.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-54.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is the Arguments object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - var arg; - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - Object.defineProperties(obj, { - prop: { - enumerable: arg - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-54 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is the Arguments object (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + var arg; + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + Object.defineProperties(obj, { + prop: { + enumerable: arg + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-56.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-56.js index 5669271508..084ae835e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-56.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-56.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-56.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is the global object (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: fnGlobalObject() - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-56 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is the global object (8.10.5 step 3.b) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: fnGlobalObject() + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-57.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-57.js index 6c9286e26d..1dc22b2247 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-57.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-57.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-57.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is a string (value is 'false') which is treated as true value (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: "false" - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-57 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is a string (value is 'false') which is treated as true + value (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: "false" + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-58.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-58.js index 45a0981985..82ecb0600c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-58.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-58.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-58.js - * @description Object.defineProperties - value of 'enumerable' property of 'descObj' is new Boolean(false) which is treated as true value (8.10.5 step 3.b) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: new Boolean(false) - } - }); - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-58 +description: > + Object.defineProperties - value of 'enumerable' property of + 'descObj' is new Boolean(false) which is treated as true value + (8.10.5 step 3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: new Boolean(false) + } + }); + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-59.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-59.js index f058f367c3..99a5dbbbb4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-59.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-59.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-59.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is present (8.10.5 step 4) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperties(obj, { - prop: { - configurable: true - } - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-59 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + present (8.10.5 step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperties(obj, { + prop: { + configurable: true + } + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-6.js index 510f2c4d5b..1b8f4320c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-6.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-6.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is present (8.10.5 step 3) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: { - enumerable: true - } - }); - - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-6 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + present (8.10.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: { + enumerable: true + } + }); + + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-60.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-60.js index c15bb71632..272b02e98e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-60.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-60.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-60.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is not present (8.10.5 step 4) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperties(obj, { - prop: {} - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-60 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + not present (8.10.5 step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperties(obj, { + prop: {} + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-61.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-61.js index a73b3d4132..55284e377c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-61.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-61.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-61.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperties(obj, { - prop: { - configurable: true - } - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-61 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperties(obj, { + prop: { + configurable: true + } + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-62.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-62.js index 96bb283915..e0f6d570b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-62.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-62.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-62.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = { - configurable: true - }; - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-62 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + inherited data property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = { + configurable: true + }; + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-63.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-63.js index 3050309d43..9d208285fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-63.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-63.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-63.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = { - configurable: true - }; - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "configurable", { - value: false - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-63 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own data property that overrides an inherited data property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = { + configurable: true + }; + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "configurable", { + value: false + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js index f673e012b5..f754ca4fcf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "configurable", { - value: false - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-64 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own data property that overrides an inherited accessor property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "configurable", { + value: false + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-65.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-65.js index 1b6d7e2ffa..9663504925 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-65.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-65.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-65.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = {}; - Object.defineProperty(descObj, "configurable", { - get: function () { - return true; - } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-65 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = {}; + Object.defineProperty(descObj, "configurable", { + get: function () { + return true; + } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-66.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-66.js index f196e3312d..44e6ba52a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-66.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-66.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-66.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-66 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + inherited accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-67.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-67.js index 16d570e10e..eec0dbc5d5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-67.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-67.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-67.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = { - configurable: true - }; - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "configurable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-67 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own accessor property that overrides an inherited data property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = { + configurable: true + }; + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "configurable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-68.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-68.js index 5172d5dc15..e46ce68035 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-68.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-68.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-68.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "configurable", { - get: function () { - return false; - } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-68 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own accessor property that overrides an inherited accessor + property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "configurable", { + get: function () { + return false; + } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-69.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-69.js index 257e10bb53..4f43dd0260 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-69.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-69.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-69.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own accessor property without a get function (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = {}; - Object.defineProperty(descObj, "configurable", { - set: function () { } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-69 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own accessor property without a get function (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = {}; + Object.defineProperty(descObj, "configurable", { + set: function () { } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-7.js index e242e5676f..ac9a57dcc7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-7.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-7.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is not present (8.10.5 step 3) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperties(obj, { - prop: {} - }); - - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-7 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + not present (8.10.5 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperties(obj, { + prop: {} + }); + + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-70.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-70.js index 4b58a96bcb..850343a502 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-70.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-70.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-70.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - Object.defineProperty(proto, "configurable", { - get: function () { - return true; - } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperty(descObj, "configurable", { - set: function () { } - }); - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-70 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + own accessor property without a get function that overrides an + inherited accessor property (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + Object.defineProperty(proto, "configurable", { + get: function () { + return true; + } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperty(descObj, "configurable", { + set: function () { } + }); + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-71.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-71.js index 52e3b2fb17..4b4b639c6b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-71.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-71.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-71.js - * @description Object.defineProperties - 'configurable' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - var proto = {}; - - Object.defineProperty(proto, "configurable", { - set: function () { } - }); - - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-71 +description: > + Object.defineProperties - 'configurable' property of 'descObj' is + inherited accessor property without a get function (8.10.5 step + 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var proto = {}; + + Object.defineProperty(proto, "configurable", { + set: function () { } + }); + + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-72.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-72.js index cf9bf8d7c2..7b1bb81581 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-72.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-72.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-72.js - * @description Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = function () { }; - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-72 +description: > + Object.defineProperties - 'descObj' is a Function object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = function () { }; + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-73.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-73.js index 26ee7bd5ed..c0d581a11b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-73.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-73.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-73.js - * @description Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = []; - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-73 +description: > + Object.defineProperties - 'descObj' is an Array object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = []; + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-74.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-74.js index 946f544b14..d842598a0f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-74.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-74.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-74.js - * @description Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = new String(); - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-74 +description: > + Object.defineProperties - 'descObj' is a String object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = new String(); + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-75.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-75.js index 36d793089f..6df5e5ec3d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-75.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-75.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-75.js - * @description Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = new Boolean(false); - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-75 +description: > + Object.defineProperties - 'descObj' is a Boolean object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = new Boolean(false); + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-76.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-76.js index e6de7bb313..7ee1adbeab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-76.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-76.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-76.js - * @description Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = new Number(-9); - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-76 +description: > + Object.defineProperties - 'descObj' is a Number object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = new Number(-9); + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-77.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-77.js index c46aff6ec2..677a8b9009 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-77.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-77.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-77.js - * @description Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - try { - Math.configurable = true; - - Object.defineProperties(obj, { - prop: Math - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } finally { - delete Math.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-77 +description: > + Object.defineProperties - 'descObj' is the Math object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + Math.configurable = true; + + Object.defineProperties(obj, { + prop: Math + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } finally { + delete Math.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-78.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-78.js index ad02b6576a..941c0040b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-78.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-78.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-78.js - * @description Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = new Date(); - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-78 +description: > + Object.defineProperties - 'descObj' is a Date object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = new Date(); + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-79.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-79.js index 499bafd703..0e110ef73d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-79.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-79.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-79.js - * @description Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = new RegExp(); - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-79 +description: > + Object.defineProperties - 'descObj' is a RegExp object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = new RegExp(); + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-8.js index 4491dd1182..6fc9accab2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-8.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-8.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is own data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - var descObj = { enumerable: true }; - - Object.defineProperties(obj, { - prop: descObj - }); - - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-8 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + own data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + var descObj = { enumerable: true }; + + Object.defineProperties(obj, { + prop: descObj + }); + + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-80.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-80.js index e39ee868f1..7319d2896f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-80.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-80.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-80.js - * @description Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - try { - JSON.configurable = true; - - Object.defineProperties(obj, { - prop: JSON - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } finally { - delete JSON.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-80 +description: > + Object.defineProperties - 'descObj' is the JSON object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + try { + JSON.configurable = true; + + Object.defineProperties(obj, { + prop: JSON + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } finally { + delete JSON.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-81.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-81.js index 80d2a80da5..4668f54868 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-81.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-81.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-81.js - * @description Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var descObj = new Error(); - descObj.configurable = true; - - Object.defineProperties(obj, { - prop: descObj - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-81 +description: > + Object.defineProperties - 'descObj' is an Error object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var descObj = new Error(); + descObj.configurable = true; + + Object.defineProperties(obj, { + prop: descObj + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-82.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-82.js index c9903dd844..d58c12781b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-82.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-82.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-82.js - * @description Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - var arg; - (function fun() { - arg = arguments; - }()); - - arg.configurable = true; - - Object.defineProperties(obj, { - prop: arg - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-82 +description: > + Object.defineProperties - 'descObj' is the Arguments object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var arg; + (function fun() { + arg = arguments; + }()); + + arg.configurable = true; + + Object.defineProperties(obj, { + prop: arg + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-84.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-84.js index 05de150ae7..46fd4a6e2f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-84.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-84.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-84.js - * @description Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a) - */ - - -function testcase() { - - var obj = {}; - - try { - fnGlobalObject().configurable = true; - - Object.defineProperties(obj, { - prop: fnGlobalObject() - }); - - var result1 = obj.hasOwnProperty("prop"); - delete obj.prop; - var result2 = obj.hasOwnProperty("prop"); - - return result1 === true && result2 === false; - } finally { - delete fnGlobalObject().configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-84 +description: > + Object.defineProperties - 'descObj' is the global object which + implements its own [[Get]] method to get 'configurable' property + (8.10.5 step 4.a) +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var obj = {}; + + try { + fnGlobalObject().configurable = true; + + Object.defineProperties(obj, { + prop: fnGlobalObject() + }); + + var result1 = obj.hasOwnProperty("prop"); + delete obj.prop; + var result2 = obj.hasOwnProperty("prop"); + + return result1 === true && result2 === false; + } finally { + delete fnGlobalObject().configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-85.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-85.js index 3621a854ba..6136a39e9a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-85.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-85.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-85.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is undefined (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: undefined - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-85 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is undefined (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: undefined + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-86.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-86.js index c211671aa6..71374c29e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-86.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-86.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-86.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is null (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: null - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-86 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is null (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: null + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-87.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-87.js index 84565e1156..30772f6937 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-87.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-87.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-87.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is true (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: true - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-87 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is true (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: true + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-88.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-88.js index 4fb36bd964..0e2a6410ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-88.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-88.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-88.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is false (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: false - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-88 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is false (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: false + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-89.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-89.js index 881b767ac8..cc88c7b200 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-89.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-89.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-89.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is 0 (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: 0 - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-89 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is 0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: 0 + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-9.js index 838258b93b..b5d3673ecf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-9.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-9.js - * @description Object.defineProperties - 'enumerable' property of 'descObj' is inherited data property (8.10.5 step 3.a) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - var proto = { - enumerable: true - }; - var Con = function () { }; - Con.prototype = proto; - var descObj = new Con(); - - Object.defineProperties(obj, { - prop: descObj - }); - - for (var property in obj) { - if (property === "prop") { - accessed = true; - } - } - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-9 +description: > + Object.defineProperties - 'enumerable' property of 'descObj' is + inherited data property (8.10.5 step 3.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + var proto = { + enumerable: true + }; + var Con = function () { }; + Con.prototype = proto; + var descObj = new Con(); + + Object.defineProperties(obj, { + prop: descObj + }); + + for (var property in obj) { + if (property === "prop") { + accessed = true; + } + } + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-90.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-90.js index 8a82306e0a..aea69a8b42 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-90.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-90.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-90.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is +0 (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: +0 - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-90 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is +0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: +0 + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-91.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-91.js index dc13302fc8..594e4ed618 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-91.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-91.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-91.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is -0 (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: -0 - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-91 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is -0 (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: -0 + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-92.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-92.js index bc2ba93766..eb014efe36 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-92.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-92.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-92.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is NaN (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: NaN - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-92 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is NaN (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: NaN + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-93.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-93.js index 238eba4236..34a1060217 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-93.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-93.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-93.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is positive number (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: 123 - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-93 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is positive number (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: 123 + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-94.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-94.js index c7bff4ee6a..3972d07e57 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-94.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-94.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-94.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is negative number (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: -123 - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-94 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is negative number (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: -123 + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-95.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-95.js index 28ebc605d2..f98aad24c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-95.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-95.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-95.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is empty string (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: "" - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-95 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is empty string (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: "" + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-96.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-96.js index 976cbf2a4c..f1e7089878 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-96.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-96.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-96.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is non-empty string (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: "abc" - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-96 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is non-empty string (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: "abc" + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-97.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-97.js index e8c3a58875..55fe64e9e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-97.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-97.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-97.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is Function object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: function () { } - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-97 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is Function object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: function () { } + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-98.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-98.js index 5fa89682fc..4c3c8dd613 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-98.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-98.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-98.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is Array object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: [1, 2, 3] - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-98 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is Array object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: [1, 2, 3] + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-99.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-99.js index 08b94cbdee..4aa080f7f5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-99.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-99.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-99.js - * @description Object.defineProperties - value of 'configurable' property of 'descObj' is String object (8.10.5 step 4.b) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - property: { - configurable: new String("abc") - } - }); - - var hadOwnProperty = obj.hasOwnProperty("property"); - - delete obj.property; - - return !obj.hasOwnProperty("property") && hadOwnProperty; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-5-b-99 +description: > + Object.defineProperties - value of 'configurable' property of + 'descObj' is String object (8.10.5 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + property: { + configurable: new String("abc") + } + }); + + var hadOwnProperty = obj.hasOwnProperty("property"); + + delete obj.property; + + return !obj.hasOwnProperty("property") && hadOwnProperty; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-1.js index 4f85652614..57b356cade 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-1.js - * @description Object.defineProperties - 'P' is own existing data property (8.12.9 step 1 ) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-1 +description: > + Object.defineProperties - 'P' is own existing data property + (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-10.js index c462375072..5b579bab25 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-10.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-10.js - * @description Object.defineProperties - 'P' is own accessor property without a get function that overrides an inherited accessor property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { - return 11; - }, - set: function () { }, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - set: function () { }, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-10 +description: > + Object.defineProperties - 'P' is own accessor property without a + get function that overrides an inherited accessor property (8.12.9 + step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { + return 11; + }, + set: function () { }, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + set: function () { }, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-100.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-100.js index 28fc62f3d7..a718b2b736 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-100.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-100.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-100.js - * @description Object.defineProperties - 'P' is data property, several attributes values of P and properties are different (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 100, - writable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - value: 200, - writable: false, - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-100 +description: > + Object.defineProperties - 'P' is data property, several attributes + values of P and properties are different (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 100, + writable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + value: 200, + writable: false, + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-101.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-101.js index 5786c321cb..7654595d07 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-101.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-101.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-101.js - * @description Object.defineProperties - 'P' is accessor property, both properties.[[Get]] and P.[[Get]] are two different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - function get_func2() { - return 20; - } - - Object.defineProperties(obj, { - foo: { - get: get_func2 - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func2, set_func, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-101 +description: > + Object.defineProperties - 'P' is accessor property, both + properties.[[Get]] and P.[[Get]] are two different values (8.12.9 + step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + function get_func2() { + return 20; + } + + Object.defineProperties(obj, { + foo: { + get: get_func2 + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func2, set_func, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-102.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-102.js index 874057cc16..3a7e732c38 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-102.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-102.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-102.js - * @description Object.defineProperties - 'P' is accessor property, P.[[Get]] is present and properties.[[Get]] is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - get: undefined - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-102 +description: > + Object.defineProperties - 'P' is accessor property, P.[[Get]] is + present and properties.[[Get]] is undefined (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + get: undefined + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-103.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-103.js index 2b2e09d9b5..472d1a2547 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-103.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-103.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-103.js - * @description Object.defineProperties - 'P' is accessor property, P.[[Get]] is undefined and properties.[[Get]] is normal value (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: undefined, - set: set_func, - enumerable: true, - configurable: true - }); - - function get_func() { - return 10; - } - - Object.defineProperties(obj, { - foo: { - get: get_func - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-103 +description: > + Object.defineProperties - 'P' is accessor property, P.[[Get]] is + undefined and properties.[[Get]] is normal value (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: undefined, + set: set_func, + enumerable: true, + configurable: true + }); + + function get_func() { + return 10; + } + + Object.defineProperties(obj, { + foo: { + get: get_func + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-104.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-104.js index 9a8bfe3bb9..c24473b8d5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-104.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-104.js @@ -1,42 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-104.js - * @description Object.defineProperties - 'P' is accessor property, both properties.[[Set]] and P.[[Set]] are two different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - - function set_func() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - function set_func2(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperties(obj, { - foo: { - set: set_func2 - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func2, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-104 +description: > + Object.defineProperties - 'P' is accessor property, both + properties.[[Set]] and P.[[Set]] are two different values (8.12.9 + step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + + function set_func() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + function set_func2(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperties(obj, { + foo: { + set: set_func2 + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func2, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-105.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-105.js index 1986423f14..9a2c9f5c40 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-105.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-105.js @@ -1,55 +1,58 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-105.js - * @description Object.defineProperties - 'P' is accessor property, P.[[Set]] is present and properties.[[Set]] is undefined (8.12.9 step 12) - */ - - -function testcase() { - var obj = {}; - function get_func() { - return 10; - } - function set_func() { - return 10; - } - - Object.defineProperty(obj, "property", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperties(obj, { - property: { - set: undefined - } - }); - - var hasProperty = obj.hasOwnProperty("property"); - var verifyGet = false; - verifyGet = (obj.property === 10); - - var verifySet = false; - var desc = Object.getOwnPropertyDescriptor(obj, "property"); - verifySet = (typeof desc.set === 'undefined'); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "property") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete obj.property; - verifyConfigurable = obj.hasOwnProperty("property"); - - return hasProperty && verifyGet && verifySet && verifyEnumerable && !verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-105 +description: > + Object.defineProperties - 'P' is accessor property, P.[[Set]] is + present and properties.[[Set]] is undefined (8.12.9 step 12) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + function get_func() { + return 10; + } + function set_func() { + return 10; + } + + Object.defineProperty(obj, "property", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperties(obj, { + property: { + set: undefined + } + }); + + var hasProperty = obj.hasOwnProperty("property"); + var verifyGet = false; + verifyGet = (obj.property === 10); + + var verifySet = false; + var desc = Object.getOwnPropertyDescriptor(obj, "property"); + verifySet = (typeof desc.set === 'undefined'); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "property") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete obj.property; + verifyConfigurable = obj.hasOwnProperty("property"); + + return hasProperty && verifyGet && verifySet && verifyEnumerable && !verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-106.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-106.js index 4292000a33..c8c5ae6f31 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-106.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-106.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-106.js - * @description Object.defineProperties - 'P' is accessor property, P.[[Set]] is undefined and properties.[[Set]] is normal value (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: undefined, - enumerable: true, - configurable: true - }); - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperties(obj, { - foo: { - set: set_func - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-106 +description: > + Object.defineProperties - 'P' is accessor property, P.[[Set]] is + undefined and properties.[[Set]] is normal value (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: undefined, + enumerable: true, + configurable: true + }); + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperties(obj, { + foo: { + set: set_func + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-107.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-107.js index 86657807a6..ccbed0fcdb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-107.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-107.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-107.js - * @description Object.defineProperties - 'P' is accessor property, P.enumerable and properties.enumerable are different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - enumerable: false - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-107 +description: > + Object.defineProperties - 'P' is accessor property, P.enumerable + and properties.enumerable are different values (8.12.9 step 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + enumerable: false + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-108.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-108.js index d912878b6d..7218d10ec4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-108.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-108.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-108.js - * @description Object.defineProperties - 'P' is accessor property, P.configurable is true and properties.configurable is false - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - configurable: false - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-108 +description: > + Object.defineProperties - 'P' is accessor property, P.configurable + is true and properties.configurable is false +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + configurable: false + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-109.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-109.js index 45757d9366..43e641b782 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-109.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-109.js @@ -1,43 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-109.js - * @description Object.defineProperties - 'P' is accessor property, several attributes values of P and properties are different (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - function get_func1() { - return 10; - } - function set_func1() { } - - Object.defineProperty(obj, "foo", { - get: get_func1, - set: set_func1, - configurable: true - }); - - function get_func2() { - return 20; - } - function set_func2(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperties(obj, { - foo: { - get: get_func2, - set: set_func2, - configurable: false - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func2, set_func2, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-109 +description: > + Object.defineProperties - 'P' is accessor property, several + attributes values of P and properties are different (8.12.9 step + 12) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func1() { + return 10; + } + function set_func1() { } + + Object.defineProperty(obj, "foo", { + get: get_func1, + set: set_func1, + configurable: true + }); + + function get_func2() { + return 20; + } + function set_func2(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperties(obj, { + foo: { + get: get_func2, + set: set_func2, + configurable: false + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func2, set_func2, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-11.js index feec079d9e..0e2dc1dc2e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-11.js - * @description Object.defineProperties - 'P' is inherited accessor property without a get function (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - set: function () { }, - configurable: false - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - - Object.defineProperties(obj, { - prop: { - get: function () { - return 12; - }, - configurable: true - } - }); - return obj.hasOwnProperty("prop") && obj.prop === 12; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-11 +description: > + Object.defineProperties - 'P' is inherited accessor property + without a get function (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + set: function () { }, + configurable: false + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + + Object.defineProperties(obj, { + prop: { + get: function () { + return 12; + }, + configurable: true + } + }); + return obj.hasOwnProperty("prop") && obj.prop === 12; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-110.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-110.js index 40978b9d0f..46cf1e0385 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-110.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-110.js @@ -1,42 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-110.js - * @description Object.defineProperties - all own properties (data property and accessor property) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - var properties = { - foo1: { - value: 200, - enumerable: true, - writable: true, - configurable: true - }, - foo2: { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - } - }; - - Object.defineProperties(obj, properties); - return dataPropertyAttributesAreCorrect(obj, "foo1", 200, true, true, true) && accessorPropertyAttributesAreCorrect(obj, "foo2", get_func, set_func, "setVerifyHelpProp", true, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-110 +description: > + Object.defineProperties - all own properties (data property and + accessor property) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + var properties = { + foo1: { + value: 200, + enumerable: true, + writable: true, + configurable: true + }, + foo2: { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + } + }; + + Object.defineProperties(obj, properties); + return dataPropertyAttributesAreCorrect(obj, "foo1", 200, true, true, true) && accessorPropertyAttributesAreCorrect(obj, "foo2", get_func, set_func, "setVerifyHelpProp", true, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-111.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-111.js index 5987f1986b..2f1f13c566 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-111.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-111.js @@ -1,47 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-111.js - * @description Object.defineProperties - each properties are in list order - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 20; - } - - function set_func() { } - - var properties = { - a: { - value: 100, - enumerable: true, - writable: true, - configurable: true - }, - b: { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }, - c: { - value: 200, - enumerable: true, - writable: true, - configurable: true - } - }; - - Object.defineProperties(obj, properties); - return (obj["a"] === 100 && obj["b"] === 20 && obj["c"] === 200); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-111 +description: Object.defineProperties - each properties are in list order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 20; + } + + function set_func() { } + + var properties = { + a: { + value: 100, + enumerable: true, + writable: true, + configurable: true + }, + b: { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }, + c: { + value: 200, + enumerable: true, + writable: true, + configurable: true + } + }; + + Object.defineProperties(obj, properties); + return (obj["a"] === 100 && obj["b"] === 20 && obj["c"] === 200); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-112.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-112.js index 4229991ef3..dea7e70887 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-112.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-112.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-112.js - * @description Object.defineProperties - 'O' is an Array, test the length property of 'O' is own data property (15.4.5.1 step 1) - */ - - -function testcase() { - - var arr = [0, 1]; - Object.defineProperty(arr, "1", { - value: 1, - configurable: false - }); - try { - - Object.defineProperties(arr, { - length: { value: 1 } - }); - return false; - } catch (ex) { - var desc = Object.getOwnPropertyDescriptor(arr, "length"); - - return ex instanceof TypeError && desc.value === 2 && - desc.writable && !desc.enumerable && !desc.configurable; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-112 +description: > + Object.defineProperties - 'O' is an Array, test the length + property of 'O' is own data property (15.4.5.1 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + Object.defineProperty(arr, "1", { + value: 1, + configurable: false + }); + try { + + Object.defineProperties(arr, { + length: { value: 1 } + }); + return false; + } catch (ex) { + var desc = Object.getOwnPropertyDescriptor(arr, "length"); + + return ex instanceof TypeError && desc.value === 2 && + desc.writable && !desc.enumerable && !desc.configurable; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-113.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-113.js index aa3021bb7d..a287ac8ca2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-113.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-113.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-113.js - * @description Object.defineProperties - 'O' is an Array, test the length property of 'O' is own data property that overrides an inherited data property (15.4.5.1 step 1) - */ - - -function testcase() { - - var arrProtoLen; - var arr = [0, 1, 2]; - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - - Object.defineProperty(arr, "2", { - configurable: false - }); - - Object.defineProperties(arr, { - length: { value: 1 } - }); - return false; - } catch (e) { - var desc = Object.getOwnPropertyDescriptor(arr, "length"); - - return e instanceof TypeError && desc.value === 3 && - desc.writable && !desc.enumerable && !desc.configurable; - } finally { - Array.prototype.length = arrProtoLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-113 +description: > + Object.defineProperties - 'O' is an Array, test the length + property of 'O' is own data property that overrides an inherited + data property (15.4.5.1 step 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrProtoLen; + var arr = [0, 1, 2]; + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + + Object.defineProperty(arr, "2", { + configurable: false + }); + + Object.defineProperties(arr, { + length: { value: 1 } + }); + return false; + } catch (e) { + var desc = Object.getOwnPropertyDescriptor(arr, "length"); + + return e instanceof TypeError && desc.value === 3 && + desc.writable && !desc.enumerable && !desc.configurable; + } finally { + Array.prototype.length = arrProtoLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-114.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-114.js index fbb2216b96..beb373ec95 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-114.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-114.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-114.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is absent (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { length: {} }); - - var verifyValue = false; - verifyValue = (arr.length === 0); - - var verifyWritable = false; - arr.length = 2; - verifyWritable = (arr.length === 2); - - var verifyEnumerable = false; - for (var p in arr) { - if (p === "length") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete arr.length; - verifyConfigurable = arr.hasOwnProperty("length"); - - return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-114 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + every field in 'desc' is absent (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { length: {} }); + + var verifyValue = false; + verifyValue = (arr.length === 0); + + var verifyWritable = false; + arr.length = 2; + verifyWritable = (arr.length === 2); + + var verifyEnumerable = false; + for (var p in arr) { + if (p === "length") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete arr.length; + verifyConfigurable = arr.hasOwnProperty("length"); + + return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-115.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-115.js index 100919b35f..1a8c5d2040 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-115.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-115.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-115.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is same with corresponding attribute value of the length property in 'O' (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - length: { - writable: true, - enumerable: false, - configurable: false - } - }); - - var verifyValue = false; - verifyValue = (arr.length === 0); - - var verifyWritable = false; - arr.length = 2; - verifyWritable = (arr.length === 2); - - var verifyEnumerable = false; - for (var p in arr) { - if (p === "length") { - verifyEnumerable = true; - } - } - - var verifyConfigurable = false; - delete arr.length; - verifyConfigurable = arr.hasOwnProperty("length"); - - return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-115 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + every field in 'desc' is same with corresponding attribute value + of the length property in 'O' (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + length: { + writable: true, + enumerable: false, + configurable: false + } + }); + + var verifyValue = false; + verifyValue = (arr.length === 0); + + var verifyWritable = false; + arr.length = 2; + verifyWritable = (arr.length === 2); + + var verifyEnumerable = false; + for (var p in arr) { + if (p === "length") { + verifyEnumerable = true; + } + } + + var verifyConfigurable = false; + delete arr.length; + verifyConfigurable = arr.hasOwnProperty("length"); + + return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-116.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-116.js index bddc1a8e87..d63c5d3b75 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-116.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-116.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-116.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Configurable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { configurable: true } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-116 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when updating the [[Configurable]] attribute + of the length property from false to true (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { configurable: true } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-117.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-117.js index 2b4c69e5f1..8ec0b45be4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-117.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-117.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-117.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Enumerable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { enumerable: true } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-117 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when updating the [[Enumerable]] attribute of + the length property from false to true (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { enumerable: true } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-118.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-118.js index 4f850466e3..dd0124a4ec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-118.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-118.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-118.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when 'desc' is accessor descriptor (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - get: function () { - return 2; - } - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-118 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when 'desc' is accessor descriptor (15.4.5.1 + step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + get: function () { + return 2; + } + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-119.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-119.js index a465d0f461..b761b3f93e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-119.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-119.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-119.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Writable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "length", { - writable: false - }); - - try { - Object.defineProperties(arr, { - length: { writable: true } - }); - - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-119 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + TypeError is thrown when updating the [[Writable]] attribute of + the length property from false to true (15.4.5.1 step 3.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "length", { + writable: false + }); + + try { + Object.defineProperties(arr, { + length: { writable: true } + }); + + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-12.js index a2929e95cd..dd84a5faaa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-12.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-12.js - * @description Object.defineProperties - 'O' is a Function object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - var fun = function () { }; - - Object.defineProperty(fun, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(fun, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(fun, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-12 +description: > + Object.defineProperties - 'O' is a Function object which + implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 + step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var fun = function () { }; + + Object.defineProperty(fun, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(fun, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(fun, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-120.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-120.js index abebf7d7e9..39e13d920b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-120.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-120.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-120.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test updating the [[Writable]] attribute of the length property from true to false (15.4.5.1 step 3.a.i) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { writable: false } - }); - - return dataPropertyAttributesAreCorrect(arr, "length", 0, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-120 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is absent, test + updating the [[Writable]] attribute of the length property from + true to false (15.4.5.1 step 3.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { writable: false } + }); + + return dataPropertyAttributesAreCorrect(arr, "length", 0, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-121.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-121.js index e104b784bc..eb6a6f66ab 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-121.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-121.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-121.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test RangeError is thrown when setting the [[Value]] field of 'desc' to undefined (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { value: undefined } - }); - - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-121 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test RangeError is thrown when setting the + [[Value]] field of 'desc' to undefined (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { value: undefined } + }); + + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-122.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-122.js index 05902dd145..73981db22c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-122.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-122.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-122.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test setting the [[Value]] field of 'desc' to null actuall is set to 0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { value: null } - }); - return arr.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-122 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test setting the [[Value]] field of 'desc' to + null actuall is set to 0 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { value: null } + }); + return arr.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-123.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-123.js index 05fc71a601..599e0d0cc5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-123.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-123.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-123.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value false (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { value: false } - }); - return arr.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-123 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a boolean + with value false (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { value: false } + }); + return arr.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-124.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-124.js index 5e8e92a662..8edddac423 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-124.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-124.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-124.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value true (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { value: true } - }); - return arr.length === 1; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-124 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a boolean + with value true (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { value: true } + }); + return arr.length === 1; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-125.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-125.js index caf10f7569..ffbb0d5ba3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-125.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-125.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-125.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is 0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { value: 0 } - }); - return arr.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-125 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is 0 (15.4.5.1 + step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { value: 0 } + }); + return arr.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-126.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-126.js index fec8526217..0f08400977 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-126.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-126.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-126.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is +0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { value: +0 } - }); - return arr.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-126 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is +0 + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { value: +0 } + }); + return arr.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-127.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-127.js index 261a197aae..f204b43de7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-127.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-127.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-127.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is -0 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { value: -0 } - }); - return arr.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-127 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is -0 + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { value: -0 } + }); + return arr.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-128.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-128.js index eb379cf8cc..c39a34c440 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-128.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-128.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-128.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is positive number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { value: 12 } - }); - return arr.length === 12; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-128 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is positive + number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { value: 12 } + }); + return arr.length === 12; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-129.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-129.js index 0c9c04a468..f1c81d3572 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-129.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-129.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-129.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is negative number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: -9 - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-129 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is negative + number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: -9 + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-13.js index 83f322e775..0310a6ef91 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-13.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-13.js - * @description Object.defineProperties - 'O' is an Array object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(arr, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(arr, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-13 +description: > + Object.defineProperties - 'O' is an Array object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(arr, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(arr, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-130.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-130.js index 8594d36c57..941761b94b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-130.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-130.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-130.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is +Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: +Infinity - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-130 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is +Infinity + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: +Infinity + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-131.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-131.js index 50ca6d2fe6..17a65cfccf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-131.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-131.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-131.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is -Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: -Infinity - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-131 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is -Infinity + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: -Infinity + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-132.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-132.js index 7ab929d59c..924f053d25 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-132.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-132.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-132.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is NaN (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: NaN - } - }); - - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-132 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is NaN + (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: NaN + } + }); + + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-133.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-133.js index d09253f5e5..41638cfc84 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-133.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-133.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-133.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a positive number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: "2" - } - }); - return arr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-133 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing a positive number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: "2" + } + }); + return arr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-134.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-134.js index 5af2ba8bcf..ff233e80d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-134.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-134.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-134.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a negative number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: "-42" - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-134 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing a negative number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: "-42" + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-135.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-135.js index 764582d68d..4cb162c753 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-135.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-135.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-135.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a decimal number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: "200.59" - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-135 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing a decimal number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: "200.59" + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-136.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-136.js index 7b65eba0a7..7c8f263589 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-136.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-136.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-136.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing +Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: "+Infinity" - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-136 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing +Infinity (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: "+Infinity" + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-137.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-137.js index cad56ab111..798ba24aaf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-137.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-137.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-137.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing -Infinity (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: "-Infinity" - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-137 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing -Infinity (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: "-Infinity" + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-138.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-138.js index ad35d39c01..62f6512102 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-138.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-138.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-138.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an exponential number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: "2E3" - } - }); - return arr.length === 2E3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-138 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing an exponential number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: "2E3" + } + }); + return arr.length === 2E3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-139.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-139.js index 3521e7385a..e5fb9635b8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-139.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-139.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-139.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an hex number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: "0x00B" - } - }); - return arr.length === 0x00B; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-139 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing an hex number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: "0x00B" + } + }); + return arr.length === 0x00B; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-14.js index 14da1cf47b..b094ee9ef0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-14.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-14.js - * @description Object.defineProperties - 'O' is a String object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - var str = new String(); - - Object.defineProperty(str, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(str, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(str, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-14 +description: > + Object.defineProperties - 'O' is a String object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var str = new String(); + + Object.defineProperty(str, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(str, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(str, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-140.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-140.js index 128797c850..5b4b453a1c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-140.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-140.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-140.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an leading zero number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: "0002.0" - } - }); - return arr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-140 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + containing an leading zero number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: "0002.0" + } + }); + return arr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-141.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-141.js index c2c74d7870..0b3f110c7e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-141.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-141.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-141.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' is a string which doesn't convert to a number (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: "two" - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-141 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test the [[Value]] field of 'desc' is a string + which doesn't convert to a number (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: "two" + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-142.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-142.js index 73d85c89d5..48f1d966af 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-142.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-142.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-142.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString method (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: { - toString: function () { - return '2'; - } - } - } - }); - - return arr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-142 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own toString method (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: { + toString: function () { + return '2'; + } + } + } + }); + + return arr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-143.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-143.js index 6ad792cf12..56d2d4bac1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-143.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-143.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-143.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: { - valueOf: function () { - return 2; - } - } - } - }); - return arr.length === 2; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-143 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own valueOf method (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: { + valueOf: function () { + return 2; + } + } + } + }); + return arr.length === 2; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-144.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-144.js index 99f6b85057..18b614372c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-144.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-144.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-144.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method that returns an object and toString method that returns a string (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - Object.defineProperties(arr, { - length: { - value: { - toString: function () { - toStringAccessed = true; - return '2'; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - } - }); - return arr.length === 2 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-144 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own valueOf method that returns an object and + toString method that returns a string (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + Object.defineProperties(arr, { + length: { + value: { + toString: function () { + toStringAccessed = true; + return '2'; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + } + }); + return arr.length === 2 && toStringAccessed && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-145.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-145.js index a342f74714..3e6c139d1b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-145.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-145.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-145.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString and valueOf method (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - Object.defineProperties(arr, { - length: { - value: { - toString: function () { - toStringAccessed = true; - return '2'; - }, - - valueOf: function () { - valueOfAccessed = true; - return 3; - } - } - } - }); - return arr.length === 3 && !toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-145 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is an Object + which has an own toString and valueOf method (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + Object.defineProperties(arr, { + length: { + value: { + toString: function () { + toStringAccessed = true; + return '2'; + }, + + valueOf: function () { + valueOfAccessed = true; + return 3; + } + } + } + }); + return arr.length === 3 && !toStringAccessed && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-146.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-146.js index b84086a447..cb6242cd6a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-146.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-146.js @@ -1,40 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-146.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when the [[Value]] field of 'desc' is an Object that both toString and valueOf wouldn't return primitive value (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - try { - Object.defineProperties(arr, { - length: { - value: { - toString: function () { - toStringAccessed = true; - return {}; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-146 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test TypeError is thrown when the [[Value]] field + of 'desc' is an Object that both toString and valueOf wouldn't + return primitive value (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + try { + Object.defineProperties(arr, { + length: { + value: { + toString: function () { + toStringAccessed = true; + return {}; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-147.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-147.js index e485b51d6d..a4392bbdf9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-147.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-147.js @@ -1,45 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-147.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test using inherited valueOf method when the [[Value]] field of 'desc' is an Objec with an own toString and inherited valueOf methods (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - value: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "value", { - value: { - toString: function () { - toStringAccessed = true; - return 3; - } - } - }); - - Object.defineProperties(arr, { - length: child - }); - return arr.length === 3 && toStringAccessed && !valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-147 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test using inherited valueOf method when the + [[Value]] field of 'desc' is an Objec with an own toString and + inherited valueOf methods (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + value: { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "value", { + value: { + toString: function () { + toStringAccessed = true; + return 3; + } + } + }); + + Object.defineProperties(arr, { + length: child + }); + return arr.length === 3 && toStringAccessed && !valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-148.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-148.js index 07408edde2..e53d756aca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-148.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-148.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-148.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is positive non-integer values (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: 123.5 - } - }); - - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-148 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is positive non-integer values (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: 123.5 + } + }); + + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-149.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-149.js index 5d28b234f1..5bef4be464 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-149.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-149.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-149.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is negative non-integer values (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - try { - Object.defineProperties(arr, { - length: { - value: -4294967294.5 - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-149 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is negative non-integer values (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + try { + Object.defineProperties(arr, { + length: { + value: -4294967294.5 + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-15.js index 46e2f2fd77..09c6d877da 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-15.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-15.js - * @description Object.defineProperties - 'O' is a Boolean object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - var obj = new Boolean(false); - - Object.defineProperty(obj, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-15 +description: > + Object.defineProperties - 'O' is a Boolean object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = new Boolean(false); + + Object.defineProperty(obj, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-150.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-150.js index 1f3d9dc804..7ddfb68296 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-150.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-150.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-150.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 2 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: 4294967294 - } - }); - - return arr.length === 4294967294; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-150 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is boundary + value 2^32 - 2 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: 4294967294 + } + }); + + return arr.length === 4294967294; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-151.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-151.js index 288e5f3ca6..7070c47b12 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-151.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-151.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-151.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 1 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - length: { - value: 4294967295 - } - }); - - return arr.length === 4294967295; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-151 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test the [[Value]] field of 'desc' is boundary + value 2^32 - 1 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + length: { + value: 4294967295 + } + }); + + return arr.length === 4294967295; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-152.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-152.js index f9bad3ea63..076fc9286b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-152.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-152.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-152.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - try { - Object.defineProperties(arr, { - length: { - value: 4294967296 - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-152 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + try { + Object.defineProperties(arr, { + length: { + value: 4294967296 + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-153.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-153.js index 1d72f3a9ff..88875433f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-153.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-153.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-153.js - * @description Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c) - */ - - -function testcase() { - - var arr = []; - try { - Object.defineProperties(arr, { - length: { - value: 4294967297 - } - }); - return false; - } catch (e) { - return e instanceof RangeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-153 +description: > + Object.defineProperties - 'O' is an Array, 'name' is the length + property of 'O', test RangeError is thrown when the [[Value]] + field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + try { + Object.defineProperties(arr, { + length: { + value: 4294967297 + } + }); + return false; + } catch (e) { + return e instanceof RangeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-155.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-155.js index 5dae7802f1..7aea9dad24 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-155.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-155.js @@ -1,28 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-155.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' which is greater than value of the length property is defined into 'O' without deleting any property with large index named (15.4.5.1 step 3.f) - */ - - -function testcase() { - - var arr = [0, , 2]; - - try { - Object.defineProperties(arr, { - length: { - value: 5 - } - }); - - return arr.length === 5 && arr[0] === 0 && !arr.hasOwnProperty("1") && arr[2] === 2; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-155 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test the [[Value]] field of 'desc' which is + greater than value of the length property is defined into 'O' + without deleting any property with large index named (15.4.5.1 + step 3.f) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + try { + Object.defineProperties(arr, { + length: { + value: 5 + } + }); + + return arr.length === 5 && arr[0] === 0 && !arr.hasOwnProperty("1") && arr[2] === 2; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-156.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-156.js index 7514b0cca0..f2a2a5ef88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-156.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-156.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-156.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' which equals to value of the length property is defined into 'O' without deleting any property with large index named (15.4.5.1 step 3.f) - */ - - -function testcase() { - - var arr = [0, , 2]; - try { - Object.defineProperties(arr, { - length: { - value: 3 - } - }); - - return arr.length === 3 && arr[0] === 0 && !arr.hasOwnProperty("1") && arr[2] === 2; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-156 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test the [[Value]] field of 'desc' which equals + to value of the length property is defined into 'O' without + deleting any property with large index named (15.4.5.1 step 3.f) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + try { + Object.defineProperties(arr, { + length: { + value: 3 + } + }); + + return arr.length === 3 && arr[0] === 0 && !arr.hasOwnProperty("1") && arr[2] === 2; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-157.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-157.js index 95e2601ab0..ebd0878f85 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-157.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-157.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-157.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' which is less than value of the length property is defined into 'O' with deleting properties with large index named (15.4.5.1 step 3.f) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - return arr.length === 1 && !arr.hasOwnProperty("1") && arr[0] === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-157 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', test the [[Value]] field of 'desc' which is less + than value of the length property is defined into 'O' with + deleting properties with large index named (15.4.5.1 step 3.f) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + return arr.length === 1 && !arr.hasOwnProperty("1") && arr[0] === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-158.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-158.js index 03d606a7ed..4f406fe7ee 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-158.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-158.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-158.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "length", { - writable: false - }); - - try { - Object.defineProperties(arr, { - length: { - value: 12 - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 0; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-158 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is greater than + value of the length property, test TypeError is thrown when the + length property is not writable (15.4.5.1 step 3.f.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "length", { + writable: false + }); + + try { + Object.defineProperties(arr, { + length: { + value: 12 + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 0; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-159.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-159.js index cee46c5fbf..ad39dbb14e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-159.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-159.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-159.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' equals to value of the length property, test TypeError wouldn't be thrown when the length property is not writable (15.4.5.1 step 3.f.i) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "length", { - writable: false - }); - - try { - Object.defineProperties(arr, { - length: { - value: 0 - } - }); - return true && arr.length === 0; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-159 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' equals to value of + the length property, test TypeError wouldn't be thrown when the + length property is not writable (15.4.5.1 step 3.f.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "length", { + writable: false + }); + + try { + Object.defineProperties(arr, { + length: { + value: 0 + } + }); + return true && arr.length === 0; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-16.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-16.js index abf0c4dee9..47ec1565c9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-16.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-16.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-16.js - * @description Object.defineProperties - 'O' is a Number object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - var obj = new Number(-9); - - Object.defineProperty(obj, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-16 +description: > + Object.defineProperties - 'O' is a Number object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = new Number(-9); + + Object.defineProperty(obj, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-160.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-160.js index 8d259764c3..d08efeebc9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-160.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-160.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-160.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test TypeError is thrown when the [[Writable]] attribute of the length property is false (15.4.5.1 step 3.g) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperty(arr, "length", { - writable: false - }); - - try { - Object.defineProperties(arr, { - length: { - value: 0 - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 2 && arr[0] === 0 && arr[1] === 1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-160 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test TypeError is thrown when the + [[Writable]] attribute of the length property is false (15.4.5.1 + step 3.g) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperty(arr, "length", { + writable: false + }); + + try { + Object.defineProperties(arr, { + length: { + value: 0 + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 2 && arr[0] === 0 && arr[1] === 1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-161.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-161.js index 8010c450b0..4b30d92881 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-161.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-161.js @@ -1,25 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-161.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true at last after deleting properties with large index named if the [[Writable]] field of 'desc' is absent (15.4.5.1 step 3.h) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - arr.length = 10; //try to overwrite length value of arr - return !arr.hasOwnProperty("1") && arr.length === 10 && arr[0] === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-161 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to true at last after deleting properties + with large index named if the [[Writable]] field of 'desc' is + absent (15.4.5.1 step 3.h) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + arr.length = 10; //try to overwrite length value of arr + return !arr.hasOwnProperty("1") && arr.length === 10 && arr[0] === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-162.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-162.js index 74cdc7431b..82f939a525 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-162.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-162.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-162.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true at last after deleting properties with large index named if the [[Writable]] field of 'desc' is true (15.4.5.1 step 3.h) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { - value: 1, - writable: true - } - }); - - arr.length = 10; //try to overwrite length value of arr - return !arr.hasOwnProperty("1") && arr.length === 10 && arr[0] === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-162 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to true at last after deleting properties + with large index named if the [[Writable]] field of 'desc' is true + (15.4.5.1 step 3.h) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { + value: 1, + writable: true + } + }); + + arr.length = 10; //try to overwrite length value of arr + return !arr.hasOwnProperty("1") && arr.length === 10 && arr[0] === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-163.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-163.js index 1783cc9a96..de3c9f8e63 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-163.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-163.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-163.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last after deleting properties with large index named if the [[Writable]] field of 'desc' is false (15.4.5.1 step 3.i.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { - value: 1, - writable: false - } - }); - - arr.length = 10; //try to overwrite length value of arr - return !arr.hasOwnProperty("1") && arr.length === 1 && arr[0] === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-163 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to false at last after deleting properties + with large index named if the [[Writable]] field of 'desc' is + false (15.4.5.1 step 3.i.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { + value: 1, + writable: false + } + }); + + arr.length = 10; //try to overwrite length value of arr + return !arr.hasOwnProperty("1") && arr.length === 1 && arr[0] === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-164.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-164.js index d3d5b2877e..b88842d5e7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-164.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-164.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-164.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property in 'O' is set as true before deleting properties with large index named (15.4.5.1 step 3.i.iii) - */ - - -function testcase() { - - var arr = [0, 1, 2]; - var result = 0; - - try { - Object.defineProperty(arr, "1", { - configurable: false - }); - - Object.defineProperties(arr, { - length: { - value: 0, - writable: false - } - }); - - return false; - } catch (e) { - result = (arr.length === 2); - arr.length = 10; - return (e instanceof TypeError) && result && arr.length === 2; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-164 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property in 'O' is set as true before deleting properties + with large index named (15.4.5.1 step 3.i.iii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2]; + var result = 0; + + try { + Object.defineProperty(arr, "1", { + configurable: false + }); + + Object.defineProperties(arr, { + length: { + value: 0, + writable: false + } + }); + + return false; + } catch (e) { + result = (arr.length === 2); + arr.length = 10; + return (e instanceof TypeError) && result && arr.length === 2; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-165.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-165.js index ad26a4ce4f..365358cfa1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-165.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-165.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-165.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the length property is decreased by 1 (15.4.5.1 step 3.l.i) - */ - - -function testcase() { - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "1", { - configurable: false - }); - - Object.defineProperty(arr, "2", { - configurable: true - }); - - try { - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 2 && - !arr.hasOwnProperty("2") && arr[0] === 0 && arr[1] === 1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-165 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the length property is decreased by + 1 (15.4.5.1 step 3.l.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "1", { + configurable: false + }); + + Object.defineProperty(arr, "2", { + configurable: true + }); + + try { + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 2 && + !arr.hasOwnProperty("2") && arr[0] === 0 && arr[1] === 1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-166.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-166.js index c555ad88c0..54049f7dcd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-166.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-166.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-166.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - - try { - Object.defineProperty(arr, "1", { - configurable: false - }); - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && arr.length === 2 && - arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-166 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own data property with large index named in 'O' can stop deleting + index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + try { + Object.defineProperty(arr, "1", { + configurable: false + }); + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && arr.length === 2 && + arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-167.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-167.js index 788f74f85b..426f6a714c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-167.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-167.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-167.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of inherited data property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - try { - Array.prototype[1] = 2; //we are not allowed to set the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - return arr.length === 1 && !arr.hasOwnProperty("1") && arr[0] === 0 && Array.prototype[1] === 2; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-167 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + inherited data property with large index named in 'O' can't stop + deleting index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + try { + Array.prototype[1] = 2; //we are not allowed to set the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + return arr.length === 1 && !arr.hasOwnProperty("1") && arr[0] === 0 && Array.prototype[1] === 2; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-168.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-168.js index 20e6679558..9524eb81ac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-168.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-168.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-168.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - try { - Object.defineProperty(arr, "1", { - configurable: false - }); - - Array.prototype[1] = 2; - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 2 && - arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 1; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-168 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own data property with large index named in 'O' that overrides + inherited data property can stop deleting index named properties + (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + try { + Object.defineProperty(arr, "1", { + configurable: false + }); + + Array.prototype[1] = 2; + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 2 && + arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 1; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-169.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-169.js index 16918cc04e..fed0e218ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-169.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-169.js @@ -1,41 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-169.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - try { - Object.defineProperty(arr, "1", { - configurable: false - }); - - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 2; - }, - configurable: true - }); - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 2 && arr.hasOwnProperty("1") && - arr[0] === 0 && arr[1] === 1 && Array.prototype[1] === 2; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-169 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own data property with large index named in 'O' that overrides + inherited accessor property can stop deleting index named + properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + try { + Object.defineProperty(arr, "1", { + configurable: false + }); + + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 2; + }, + configurable: true + }); + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 2 && arr.hasOwnProperty("1") && + arr[0] === 0 && arr[1] === 1 && Array.prototype[1] === 2; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-17.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-17.js index abfa2e2ad2..8a6603c892 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-17.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-17.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-17.js - * @description Object.defineProperties - 'O' is the Math object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - try { - Object.defineProperty(Math, "prop", { - value: 11, - writable: true, - configurable: true - }); - var hasProperty = Math.hasOwnProperty("prop") && Math.prop === 11; - - Object.defineProperties(Math, { - prop: { - value: 12 - } - }); - return hasProperty && Math.prop === 12; - } finally { - delete Math.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-17 +description: > + Object.defineProperties - 'O' is the Math object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Math, "prop", { + value: 11, + writable: true, + configurable: true + }); + var hasProperty = Math.hasOwnProperty("prop") && Math.prop === 11; + + Object.defineProperties(Math, { + prop: { + value: 12 + } + }); + return hasProperty && Math.prop === 12; + } finally { + delete Math.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-170.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-170.js index df61965ba2..e15ed1ef52 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-170.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-170.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-170.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - - try { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: false - }); - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && arr.length === 2 && - arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-170 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own accessor property with large index named in 'O' can stop + deleting index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + try { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: false + }); + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && arr.length === 2 && + arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-171.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-171.js index 28c0413c74..4f7c446a88 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-171.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-171.js @@ -1,34 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-171.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of inherited accessor property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true //we are not allowed to set the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable - }); - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - return arr.length === 1 && !arr.hasOwnProperty("1") && arr[0] === 0 && Array.prototype[1] === 1; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-171 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + inherited accessor property with large index named in 'O' can't + stop deleting index named properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 1; + }, + configurable: true //we are not allowed to set the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable + }); + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + return arr.length === 1 && !arr.hasOwnProperty("1") && arr[0] === 0 && Array.prototype[1] === 1; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-172.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-172.js index 07144eb1b0..1702466bda 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-172.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-172.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-172.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - try { - Object.defineProperty(arr, "1", { - get: function () { - return 2; - }, - configurable: false - }); - - Array.prototype[1] = 3; - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 2 && - arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 2; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-172 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own accessor property with large index named in 'O' that overrides + inherited data property can stop deleting index named properties + (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + try { + Object.defineProperty(arr, "1", { + get: function () { + return 2; + }, + configurable: false + }); + + Array.prototype[1] = 3; + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 2 && + arr.hasOwnProperty("1") && arr[0] === 0 && arr[1] === 2; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-173.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-173.js index fa97c91e3b..7fea4bc59a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-173.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-173.js @@ -1,43 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-173.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - try { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: false - }); - - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 2; - }, - configurable: true - }); - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr.length === 2 && arr.hasOwnProperty("1") && - arr[0] === 0 && arr[1] === 1 && Array.prototype[1] === 2; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-173 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Configurable]] attribute of + own accessor property with large index named in 'O' that overrides + inherited accessor property can stop deleting index named + properties (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + try { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: false + }); + + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 2; + }, + configurable: true + }); + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr.length === 2 && arr.hasOwnProperty("1") && + arr[0] === 0 && arr[1] === 1 && Array.prototype[1] === 2; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-174.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-174.js index 8ccb7317f0..6a64e5d7a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-174.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-174.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-174.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the configurable large index named property of 'O' can be deleted (15.4.5.1 step 3.l.ii) - */ - - -function testcase() { - - var arr = [0, 1]; - - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - - return !arr.hasOwnProperty("1"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-174 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the configurable large index named + property of 'O' can be deleted (15.4.5.1 step 3.l.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + + return !arr.hasOwnProperty("1"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-175.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-175.js index ccb571ca10..b84b2f86b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-175.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-175.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-175.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test value of the length property is set to the last non-configurable index named property of 'O' plus 1 (15.4.5.1 step 3.l.iii.1) - */ - - -function testcase() { - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "1", { - configurable: false - }); - - try { - Object.defineProperties(arr, { - length: { - value: 1 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && (arr.length === 2); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-175 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test value of the length property is set + to the last non-configurable index named property of 'O' plus 1 + (15.4.5.1 step 3.l.iii.1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "1", { + configurable: false + }); + + try { + Object.defineProperties(arr, { + length: { + value: 1 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && (arr.length === 2); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-176.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-176.js index ce0e86f42f..2dcebe5c5c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-176.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-176.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-176.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' contains non-configurable large index named property (15.4.5.1 step 3.l.iii.2) - */ - - -function testcase() { - - var arr = [0, 1]; - - try { - Object.defineProperty(arr, "1", { - configurable: false - }); - - Object.defineProperties(arr, { - length: { - value: 1, - writable: false - } - }); - return false; - } catch (e) { - arr.length = 10; //try to overwrite length value of arr - return e instanceof TypeError && arr.hasOwnProperty("1") && - arr.length === 2 && arr[0] === 0 && arr[1] === 1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-176 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to false at last when the [[Writable]] + field of 'desc' is false and 'O' contains non-configurable large + index named property (15.4.5.1 step 3.l.iii.2) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + try { + Object.defineProperty(arr, "1", { + configurable: false + }); + + Object.defineProperties(arr, { + length: { + value: 1, + writable: false + } + }); + return false; + } catch (e) { + arr.length = 10; //try to overwrite length value of arr + return e instanceof TypeError && arr.hasOwnProperty("1") && + arr.length === 2 && arr[0] === 0 && arr[1] === 1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-177.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-177.js index 962d5ed86c..0fe59a8499 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-177.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-177.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-177.js - * @description Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' doesn't contain non-configurable large index named property (15.4.5.1 step 3.m) - */ - - -function testcase() { - - var arr = [0, 1]; - - try { - Object.defineProperties(arr, { - length: { - value: 0, - writable: false - } - }); - - arr.length = 10; //try to overwrite length value of arr - return !arr.hasOwnProperty("1") && arr.length === 0 && !arr.hasOwnProperty("0"); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-177 +description: > + Object.defineProperties - 'O' is an Array, 'P' is the length + property of 'O', the [[Value]] field of 'desc' is less than value + of the length property, test the [[Writable]] attribute of the + length property is set to false at last when the [[Writable]] + field of 'desc' is false and 'O' doesn't contain non-configurable + large index named property (15.4.5.1 step 3.m) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + + try { + Object.defineProperties(arr, { + length: { + value: 0, + writable: false + } + }); + + arr.length = 10; //try to overwrite length value of arr + return !arr.hasOwnProperty("1") && arr.length === 0 && !arr.hasOwnProperty("0"); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-178.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-178.js index ed31e513e3..8ddede34bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-178.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-178.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-178.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is available String values that convert to numbers (15.4.5.1 step 4.a) - */ - - -function testcase() { - - var arr = [0]; - - Object.defineProperties(arr, { - "0": { - value: 12 - } - }); - return arr[0] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-178 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is available String values that convert to + numbers (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0]; + + Object.defineProperties(arr, { + "0": { + value: 12 + } + }); + return arr[0] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-179.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-179.js index 6748036bac..783d69a247 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-179.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-179.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-179.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 - 2 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "4294967294": { - value: 100 - } - }); - - return arr.hasOwnProperty("4294967294") && arr.length === 4294967295 && arr[4294967294] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-179 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is boundary value 2^32 - 2 (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "4294967294": { + value: 100 + } + }); + + return arr.hasOwnProperty("4294967294") && arr.length === 4294967295 && arr[4294967294] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-18.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-18.js index 5b8fb6114d..f645b3f8d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-18.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-18.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-18.js - * @description Object.defineProperties - 'O' is a Date object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - var obj = new Date(); - - Object.defineProperty(obj, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-18 +description: > + Object.defineProperties - 'O' is a Date object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = new Date(); + + Object.defineProperty(obj, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-180.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-180.js index 23e9d1c730..812991be4a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-180.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-180.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-180.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 - 1 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "4294967295": { - value: 100 - } - }); - - return arr.hasOwnProperty("4294967295") && arr.length === 0 && arr[4294967295] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-180 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is boundary value 2^32 - 1 (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "4294967295": { + value: 100 + } + }); + + return arr.hasOwnProperty("4294967295") && arr.length === 0 && arr[4294967295] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-181.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-181.js index 1278c013c7..60047b776f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-181.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-181.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-181.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "4294967296": { - value: 100 - } - }); - - return arr.hasOwnProperty("4294967296") && arr.length === 0 && arr[4294967296] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-181 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is boundary value 2^32 (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "4294967296": { + value: 100 + } + }); + + return arr.hasOwnProperty("4294967296") && arr.length === 0 && arr[4294967296] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-182.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-182.js index eb1935bb21..f7457f09c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-182.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-182.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-182.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 + 1 (15.4.5.1 step 4.a) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "4294967297": { - value: 100 - } - }); - - return arr.hasOwnProperty("4294967297") && arr.length === 0 && arr[4294967297] === 100; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-182 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is boundary value 2^32 + 1 (15.4.5.1 step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "4294967297": { + value: 100 + } + }); + + return arr.hasOwnProperty("4294967297") && arr.length === 0 && arr[4294967297] === 100; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-183.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-183.js index 7e4b07fbf0..e8df1fe06b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-183.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-183.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-183.js - * @description Object.defineProperties - TypeError is not thrown if 'O' is an Array, 'P' is an array index named property, [[Writable]] attribute of the length property in 'O' is false, value of 'P' is less than value of the length property in'O' (15.4.5.1 step 4.b) - */ - - -function testcase() { - var arr = [1, 2, 3]; - - Object.defineProperty(arr, "length", { - writable: false - }); - - Object.defineProperties(arr, { - "1": { - value: "abc" - } - }); - - return arr[0] === 1 && arr[1] === "abc" && arr[2] === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-183 +description: > + Object.defineProperties - TypeError is not thrown if 'O' is an + Array, 'P' is an array index named property, [[Writable]] + attribute of the length property in 'O' is false, value of 'P' is + less than value of the length property in'O' (15.4.5.1 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [1, 2, 3]; + + Object.defineProperty(arr, "length", { + writable: false + }); + + Object.defineProperties(arr, { + "1": { + value: "abc" + } + }); + + return arr[0] === 1 && arr[1] === "abc" && arr[2] === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-184.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-184.js index 250d768af8..58824dfc41 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-184.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-184.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-184.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property,[[Writable]] attribute of the length property in 'O' is false, value of 'P' is equal to value of the length property in 'O' (15.4.5.1 step 4.b) - */ - - -function testcase() { - var arr = [1, 2, 3]; - - Object.defineProperty(arr, "length", { - writable: false - }); - - try { - Object.defineProperties(arr, { - "3": { - value: "abc" - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 1 && - arr[1] === 2 && arr[2] === 3 && !arr.hasOwnProperty("3"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-184 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property,[[Writable]] attribute of the + length property in 'O' is false, value of 'P' is equal to value of + the length property in 'O' (15.4.5.1 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [1, 2, 3]; + + Object.defineProperty(arr, "length", { + writable: false + }); + + try { + Object.defineProperties(arr, { + "3": { + value: "abc" + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 1 && + arr[1] === 2 && arr[2] === 3 && !arr.hasOwnProperty("3"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-185.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-185.js index e763b8f4ad..87423daf50 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-185.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-185.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-185.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property,[[Writable]] attribute of the length property in 'O' is false, value of 'P' is bigger than value of the length property in 'O' (15.4.5.1 step 4.b) - */ - - -function testcase() { - var arr = [1, 2, 3]; - - Object.defineProperty(arr, "length", { - writable: false - }); - - try { - Object.defineProperties(arr, { - "4": { - value: "abc" - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 1 && arr[1] === 2 && - arr[2] === 3 && !arr.hasOwnProperty("3") && !arr.hasOwnProperty("4"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-185 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property,[[Writable]] attribute of the + length property in 'O' is false, value of 'P' is bigger than value + of the length property in 'O' (15.4.5.1 step 4.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [1, 2, 3]; + + Object.defineProperty(arr, "length", { + writable: false + }); + + try { + Object.defineProperties(arr, { + "4": { + value: "abc" + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 1 && arr[1] === 2 && + arr[2] === 3 && !arr.hasOwnProperty("3") && !arr.hasOwnProperty("4"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-186.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-186.js index 836d3c16d9..f4877449dc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-186.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-186.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-186.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - Object.defineProperty(arr, 0, { - value: "ownDataProperty", - configurable: false - }); - - try { - Object.defineProperties(arr, { - "0": { - value: "abc", - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === "ownDataProperty"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-186 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is own data property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + Object.defineProperty(arr, 0, { + value: "ownDataProperty", + configurable: false + }); + + try { + Object.defineProperties(arr, { + "0": { + value: "abc", + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === "ownDataProperty"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-187.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-187.js index 47e3f48c2c..cf45cbe65f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-187.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-187.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-187.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is inherited data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 11, - configurable: true - }); - - var arr = []; - - Object.defineProperties(arr, { - "0": { - configurable: false - } - }); - return arr.hasOwnProperty("0") && typeof arr[0] === "undefined" && Array.prototype[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-187 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is inherited data property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 11, + configurable: true + }); + + var arr = []; + + Object.defineProperties(arr, { + "0": { + configurable: false + } + }); + return arr.hasOwnProperty("0") && typeof arr[0] === "undefined" && Array.prototype[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-188.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-188.js index a440ae2843..d35c05d0ec 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-188.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-188.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-188.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own data property that overrides an inherited data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 11, - configurable: true - }); - - var arr = []; - Object.defineProperty(arr, "0", { - value: 12, - configurable: false - }); - - Object.defineProperties(arr, { - "0": { - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-188 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is own data property that overrides an + inherited data property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 11, + configurable: true + }); + + var arr = []; + Object.defineProperty(arr, "0", { + value: 12, + configurable: false + }); + + Object.defineProperties(arr, { + "0": { + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-189.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-189.js index db92f74b08..54d1574ba9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-189.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-189.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-189.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own data property that overrides an inherited accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - var arr = []; - Object.defineProperty(arr, "0", { - value: 12, - configurable: false - }); - - Object.defineProperties(arr, { - "0": { - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-189 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is own data property that overrides an + inherited accessor property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + var arr = []; + Object.defineProperty(arr, "0", { + value: 12, + configurable: false + }); + + Object.defineProperties(arr, { + "0": { + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-19.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-19.js index 74942c8c80..d6251e983b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-19.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-19.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-19.js - * @description Object.defineProperties - 'O' is a RegExp object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - var obj = new RegExp(); - - Object.defineProperty(obj, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-19 +description: > + Object.defineProperties - 'O' is a RegExp object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = new RegExp(); + + Object.defineProperty(obj, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-190.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-190.js index 3b42f283bb..714dd64455 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-190.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-190.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-190.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: false - }); - - try { - Object.defineProperties(arr, { - "0": { - get: function () { - return 12; - }, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 11; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-190 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is own accessor property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + get: function () { + return 11; + }, + configurable: false + }); + + try { + Object.defineProperties(arr, { + "0": { + get: function () { + return 12; + }, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 11; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-191.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-191.js index d0ff1a063d..9c4292a133 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-191.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-191.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-191.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is inherited accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - var arr = []; - - Object.defineProperties(arr, { - "0": { - get: function () { - return 12; - }, - configurable: false - } - }); - return arr.hasOwnProperty("0") && arr[0] === 12 && Array.prototype[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-191 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, 'P' is inherited accessor property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + var arr = []; + + Object.defineProperties(arr, { + "0": { + get: function () { + return 12; + }, + configurable: false + } + }); + return arr.hasOwnProperty("0") && arr[0] === 12 && Array.prototype[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-192.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-192.js index 57fd728251..71d5dd9e4d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-192.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-192.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-192.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own accessor property that overrides an inherited data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 11, - configurable: true - }); - - var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - return 12; - }, - configurable: false - }); - - Object.defineProperties(arr, { - "0": { - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-192 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is own accessor property that overrides an + inherited data property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 11, + configurable: true + }); + + var arr = []; + Object.defineProperty(arr, "0", { + get: function () { + return 12; + }, + configurable: false + }); + + Object.defineProperties(arr, { + "0": { + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-193.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-193.js index 4968f669c6..1c97e586a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-193.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-193.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-193.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own accessor property that overrides an inherited accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - var arr = []; - Object.defineProperty(arr, "0", { - get: function () { - return 12; - }, - configurable: false - }); - - Object.defineProperties(arr, { - "0": { - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-193 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' is own accessor property that overrides an + inherited accessor property (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + var arr = []; + Object.defineProperty(arr, "0", { + get: function () { + return 12; + }, + configurable: false + }); + + Object.defineProperties(arr, { + "0": { + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-194.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-194.js index f69a58617d..69ebd5f234 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-194.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-194.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-194.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - Object.preventExtensions(arr); - - try { - Object.defineProperties(arr, { - "0": { - value: 1 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && (arr.hasOwnProperty("0") === false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-194 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test TypeError + is thrown when 'O' is not extensible (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + Object.preventExtensions(arr); + + try { + Object.defineProperties(arr, { + "0": { + value: 1 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && (arr.hasOwnProperty("0") === false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-195.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-195.js index 4ce56f1ebc..6bd51acb36 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-195.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-195.js @@ -1,23 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-195.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test 'P' is defined as data property when 'desc' is generic descriptor (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "0": { - enumerable: true - } - }); - - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-195 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test 'P' is + defined as data property when 'desc' is generic descriptor + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "0": { + enumerable: true + } + }); + + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-196.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-196.js index 99f55fb78d..deefffca24 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-196.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-196.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-196.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Value]] of 'P' property in 'Attributes' is set as undefined value if [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "0": { - writable: true, - enumerable: true, - configurable: false - } - }); - - return arr.hasOwnProperty("0") && typeof (arr[0]) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-196 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test [[Value]] + of 'P' property in 'Attributes' is set as undefined value if + [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "0": { + writable: true, + enumerable: true, + configurable: false + } + }); + + return arr.hasOwnProperty("0") && typeof (arr[0]) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-197.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-197.js index 3271212d55..1303906dcf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-197.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-197.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-197.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Writable]] of 'P' property in 'Attributes' is set as false value if [[Writable]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var isOwnProperty = false; - var canWritable = false; - - Object.defineProperties(arr, { - "0": { - value: 1001, - enumerable: true, - configurable: false - } - }); - - isOwnProperty = arr.hasOwnProperty("0"); - - arr[0] = 12; - - canWritable = (arr[0] === 12); - - return isOwnProperty && !canWritable && arr[0] === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-197 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test + [[Writable]] of 'P' property in 'Attributes' is set as false value + if [[Writable]] is absent in data descriptor 'desc' (15.4.5.1 + step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + var isOwnProperty = false; + var canWritable = false; + + Object.defineProperties(arr, { + "0": { + value: 1001, + enumerable: true, + configurable: false + } + }); + + isOwnProperty = arr.hasOwnProperty("0"); + + arr[0] = 12; + + canWritable = (arr[0] === 12); + + return isOwnProperty && !canWritable && arr[0] === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-198.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-198.js index a03637be68..d79db26a7b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-198.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-198.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-198.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Enumerable]] of 'P' property in 'Attributes' is set as false value if [[Enumerable]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var isOwnProperty = false; - var canEnumerable = false; - - Object.defineProperties(arr, { - "0": { - value: 1001, - writable: true, - configurable: true - } - }); - - isOwnProperty = arr.hasOwnProperty("0"); - for (var i in arr) { - if (i === "0") { - canEnumerable = true; - } - } - return isOwnProperty && !canEnumerable && arr[0] === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-198 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test + [[Enumerable]] of 'P' property in 'Attributes' is set as false + value if [[Enumerable]] is absent in data descriptor 'desc' + (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + var isOwnProperty = false; + var canEnumerable = false; + + Object.defineProperties(arr, { + "0": { + value: 1001, + writable: true, + configurable: true + } + }); + + isOwnProperty = arr.hasOwnProperty("0"); + for (var i in arr) { + if (i === "0") { + canEnumerable = true; + } + } + return isOwnProperty && !canEnumerable && arr[0] === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-199.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-199.js index 50ca00dd4d..e2b155f592 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-199.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-199.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-199.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Configurable]] of 'P' property in 'Attributes' is set as false value if [[Configurable]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var beforeDeleted = false; - var afterDeleted = false; - - Object.defineProperties(arr, { - "0": { - value: 1001, - writable: true, - enumerable: true - } - }); - - beforeDeleted = arr.hasOwnProperty("0"); - delete arr[0]; - afterDeleted = arr.hasOwnProperty("0"); - return beforeDeleted && afterDeleted && arr[0] === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-199 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test + [[Configurable]] of 'P' property in 'Attributes' is set as false + value if [[Configurable]] is absent in data descriptor 'desc' + (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + var beforeDeleted = false; + var afterDeleted = false; + + Object.defineProperties(arr, { + "0": { + value: 1001, + writable: true, + enumerable: true + } + }); + + beforeDeleted = arr.hasOwnProperty("0"); + delete arr[0]; + afterDeleted = arr.hasOwnProperty("0"); + return beforeDeleted && afterDeleted && arr[0] === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-2.js index c3d5a7530f..8622375b53 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-2.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-2.js - * @description Object.defineProperties - 'P' is inherited data property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - value: 11, - configurable: false - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - - return dataPropertyAttributesAreCorrect(obj, "prop", 12, false, false, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-2 +description: > + Object.defineProperties - 'P' is inherited data property (8.12.9 + step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 11, + configurable: false + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + + return dataPropertyAttributesAreCorrect(obj, "prop", 12, false, false, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-20.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-20.js index 8617309e9c..fea6bec612 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-20.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-20.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-20.js - * @description Object.defineProperties - 'O' is a JSON object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - try { - Object.defineProperty(JSON, "prop", { - value: 11, - writable: true, - configurable: true - }); - var hasProperty = JSON.hasOwnProperty("prop") && JSON.prop === 11; - Object.defineProperties(JSON, { - prop: { - value: 12 - } - }); - return hasProperty && JSON.prop === 12; - } finally { - delete JSON.prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-20 +description: > + Object.defineProperties - 'O' is a JSON object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(JSON, "prop", { + value: 11, + writable: true, + configurable: true + }); + var hasProperty = JSON.hasOwnProperty("prop") && JSON.prop === 11; + Object.defineProperties(JSON, { + prop: { + value: 12 + } + }); + return hasProperty && JSON.prop === 12; + } finally { + delete JSON.prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-200.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-200.js index 81f52138e2..63bcb05445 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-200.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-200.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-200.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'desc' is data descriptor, test updating all attribute values of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(arr, { - "0": { - value: 1001, - writable: false, - enumerable: false, - configurable: false - } - }); - - return dataPropertyAttributesAreCorrect(arr, "0", 1001, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-200 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'desc' is data descriptor, test updating all + attribute values of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(arr, { + "0": { + value: 1001, + writable: false, + enumerable: false, + configurable: false + } + }); + + return dataPropertyAttributesAreCorrect(arr, "0", 1001, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-201.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-201.js index 19a88731be..5bda1f8d43 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-201.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-201.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-201.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Get]] of 'P' property in 'Attributes' is set as undefined value if [[Get]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "0": { - set: function () { }, - enumerable: true, - configurable: true - } - }); - - return arr.hasOwnProperty("0") && typeof (arr[0]) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-201 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test [[Get]] of + 'P' property in 'Attributes' is set as undefined value if [[Get]] + is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "0": { + set: function () { }, + enumerable: true, + configurable: true + } + }); + + return arr.hasOwnProperty("0") && typeof (arr[0]) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-202.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-202.js index f07424e16d..55734c44e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-202.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-202.js @@ -1,43 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-202.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Set]] of 'P' property in 'Attributes' is set as undefined value if [[Set]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var getFunc = function () { - return 11; - }; - - Object.defineProperties(arr, { - "0": { - get: getFunc, - enumerable: true, - configurable: true - } - }); - - var verifyEnumerable = false; - for (var i in arr) { - if (i === "0" && arr.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } - - var desc = Object.getOwnPropertyDescriptor(arr, "0"); - var propertyDefineCorrect = arr.hasOwnProperty("0"); - - var verifyConfigurable = false; - delete arr[0]; - verifyConfigurable = arr.hasOwnProperty("0"); - return typeof desc.set === "undefined" && propertyDefineCorrect && - desc.get === getFunc && !verifyConfigurable && verifyEnumerable; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-202 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test [[Set]] of + 'P' property in 'Attributes' is set as undefined value if [[Set]] + is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + var getFunc = function () { + return 11; + }; + + Object.defineProperties(arr, { + "0": { + get: getFunc, + enumerable: true, + configurable: true + } + }); + + var verifyEnumerable = false; + for (var i in arr) { + if (i === "0" && arr.hasOwnProperty("0")) { + verifyEnumerable = true; + } + } + + var desc = Object.getOwnPropertyDescriptor(arr, "0"); + var propertyDefineCorrect = arr.hasOwnProperty("0"); + + var verifyConfigurable = false; + delete arr[0]; + verifyConfigurable = arr.hasOwnProperty("0"); + return typeof desc.set === "undefined" && propertyDefineCorrect && + desc.get === getFunc && !verifyConfigurable && verifyEnumerable; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-203.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-203.js index b68da7b612..a9f1f97dd1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-203.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-203.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-203.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Enumerable]] of 'P' property in 'Attributes' is set as false value if [[Enumerable]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "0": { - set: function () { }, - get: function () { }, - configurable: true - } - }); - - for (var i in arr) { - if (i === "0" && arr.hasOwnProperty("0")) { - return false; - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-203 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test + [[Enumerable]] of 'P' property in 'Attributes' is set as false + value if [[Enumerable]] is absent in accessor descriptor 'desc' + (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "0": { + set: function () { }, + get: function () { }, + configurable: true + } + }); + + for (var i in arr) { + if (i === "0" && arr.hasOwnProperty("0")) { + return false; + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-204.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-204.js index af338c9385..54b0004f05 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-204.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-204.js @@ -1,38 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-204.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Configurable]] of 'P' property in 'Attributes' is set as false value if [[Configurable]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var beforeDeleted = false; - var afterDeleted = false; - arr.verifySetter = 100; - - Object.defineProperties(arr, { - "0": { - set: function (value) { - arr.verifySetter = value; - }, - get: function () { - return arr.verifySetter; - }, - enumerable: true - } - }); - - beforeDeleted = arr.hasOwnProperty("0"); - delete arr[0]; - afterDeleted = arr.hasOwnProperty("0"); - - arr[0] = 101; - - return beforeDeleted && afterDeleted && arr[0] === 101 && arr.verifySetter === 101; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-204 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' property doesn't exist in 'O', test + [[Configurable]] of 'P' property in 'Attributes' is set as false + value if [[Configurable]] is absent in accessor descriptor 'desc' + (15.4.5.1 step 4.c) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + var beforeDeleted = false; + var afterDeleted = false; + arr.verifySetter = 100; + + Object.defineProperties(arr, { + "0": { + set: function (value) { + arr.verifySetter = value; + }, + get: function () { + return arr.verifySetter; + }, + enumerable: true + } + }); + + beforeDeleted = arr.hasOwnProperty("0"); + delete arr[0]; + afterDeleted = arr.hasOwnProperty("0"); + + arr[0] = 101; + + return beforeDeleted && afterDeleted && arr[0] === 101 && arr.verifySetter === 101; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-205.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-205.js index 664513e107..8fa5be67a0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-205.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-205.js @@ -1,43 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-205.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'desc' is accessor descriptor, test updating all attribute values of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperties(arr, { - "0": { - get: function () { - return 11; - }, - set: function () { }, - configurable: true, - enumerable: true - } - }); - - var setFun = function (value) { - arr.setVerifyHelpProp = value; - }; - var getFun = function () { - return 14; - }; - Object.defineProperties(arr, { - "0": { - get: getFun, - set: setFun, - configurable: false, - enumerable: false - } - }); - - return accessorPropertyAttributesAreCorrect(arr, "0", getFun, setFun, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-205 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'desc' is accessor descriptor, test updating all + attribute values of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperties(arr, { + "0": { + get: function () { + return 11; + }, + set: function () { }, + configurable: true, + enumerable: true + } + }); + + var setFun = function (value) { + arr.setVerifyHelpProp = value; + }; + var getFun = function () { + return 14; + }; + Object.defineProperties(arr, { + "0": { + get: getFun, + set: setFun, + configurable: false, + enumerable: false + } + }); + + return accessorPropertyAttributesAreCorrect(arr, "0", getFun, setFun, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-206.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-206.js index 2bb1df8061..150ed4111a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-206.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-206.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-206.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if every field in 'desc' is absent (name is data property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - arr[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - try { - Object.defineProperties(arr, { - "0": {} - }); - return dataPropertyAttributesAreCorrect(arr, "0", 101, true, true, true); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-206 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' makes no change if every field in 'desc' is + absent (name is data property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + arr[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + try { + Object.defineProperties(arr, { + "0": {} + }); + return dataPropertyAttributesAreCorrect(arr, "0", 101, true, true, true); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-207.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-207.js index 7633bd2b4a..406e09285d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-207.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-207.js @@ -1,38 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-207.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if every field in 'desc' is absent (name is accessor property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function get_func() { - return 11; - } - function set_func(value) { - arr.setVerifyHelpProp = value; - } - - Object.defineProperty(arr, "0", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": {} - }); - return accessorPropertyAttributesAreCorrect(arr, "0", get_func, set_func, "setVerifyHelpProp", true, true); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-207 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' makes no change if every field in 'desc' is + absent (name is accessor property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function get_func() { + return 11; + } + function set_func(value) { + arr.setVerifyHelpProp = value; + } + + Object.defineProperty(arr, "0", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": {} + }); + return accessorPropertyAttributesAreCorrect(arr, "0", get_func, set_func, "setVerifyHelpProp", true, true); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-208.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-208.js index c251283c46..a0bc75abc0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-208.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-208.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-208.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'P'(desc is data property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - arr[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(arr, { - "0": { - value: 100, - writable: true, - enumerable: true, - configurable: true - } - }); - - return dataPropertyAttributesAreCorrect(arr, "0", 100, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-208 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' makes no change if the value of every field in + 'desc' is the same value as the corresponding field in 'P'(desc is + data property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + arr[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(arr, { + "0": { + value: 100, + writable: true, + enumerable: true, + configurable: true + } + }); + + return dataPropertyAttributesAreCorrect(arr, "0", 100, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-209.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-209.js index c22d5c5e88..5ba2fa5dd9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-209.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-209.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-209.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'P'(desc is accessor property) (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var get_func = function () { - return "100"; - }; - var set_func = function (value) { - arr.setVerifyHelpProp = value; - }; - - var descObj = { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }; - - var properties = { - "0": descObj - }; - - Object.defineProperty(arr, "0", descObj); - - Object.defineProperties(arr, properties); - - return accessorPropertyAttributesAreCorrect(arr, "0", get_func, set_func, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-209 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, 'P' makes no change if the value of every field in + 'desc' is the same value as the corresponding field in 'P'(desc is + accessor property) (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + var get_func = function () { + return "100"; + }; + var set_func = function (value) { + arr.setVerifyHelpProp = value; + }; + + var descObj = { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }; + + var properties = { + "0": descObj + }; + + Object.defineProperty(arr, "0", descObj); + + Object.defineProperties(arr, properties); + + return accessorPropertyAttributesAreCorrect(arr, "0", get_func, set_func, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-21.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-21.js index 9d04000ad7..d87892727b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-21.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-21.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-21.js - * @description Object.defineProperties - 'O' is an Error object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - var obj = new Error(); - - Object.defineProperty(obj, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-21 +description: > + Object.defineProperties - 'O' is an Error object which implements + its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = new Error(); + + Object.defineProperty(obj, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "prop", 11, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-210.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-210.js index 5f4f1c268d..a3ae0fcabb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-210.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-210.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-210.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: undefined - }); - - Object.defineProperties(arr, { - "0": { - value: undefined - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-210 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, both the [[Value]] field of 'desc' and the + [[Value]] attribute value of 'name' are undefined (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: undefined + }); + + Object.defineProperties(arr, { + "0": { + value: undefined + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-211.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-211.js index ff4fba3cdb..e732b47ac4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-211.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-211.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-211.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are null (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: null - }); - - Object.defineProperties(arr, { - "0": { - value: null - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", null, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-211 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, both the [[Value]] field of 'desc' and the + [[Value]] attribute value of 'name' are null (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: null + }); + + Object.defineProperties(arr, { + "0": { + value: null + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", null, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-212.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-212.js index b6b528086c..9bec4223e3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-212.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-212.js @@ -1,27 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-212.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are NaN (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: NaN - }); - - Object.defineProperties(arr, { - "0": { - value: NaN - } - }); - - return dataPropertyAttributesAreCorrect(arr, "0", NaN, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-212 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, both the [[Value]] field of 'desc' and the + [[Value]] attribute value of 'name' are NaN (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: NaN + }); + + Object.defineProperties(arr, { + "0": { + value: NaN + } + }); + + return dataPropertyAttributesAreCorrect(arr, "0", NaN, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-213.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-213.js index e9fa73203b..23b3b1ff09 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-213.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-213.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-213.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: -0 - }); - - try { - Object.defineProperties(arr, { - "0": { - value: +0 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "0", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-213 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, the [[Value]] field of 'desc' is +0, and the + [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: -0 + }); + + try { + Object.defineProperties(arr, { + "0": { + value: +0 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "0", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-214.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-214.js index 4bc0fc5554..f6c82c5216 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-214.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-214.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-214.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: +0 - }); - - try { - Object.defineProperties(arr, { - "0": { - value: -0 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "0", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-214 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, the [[Value]] field of 'desc' is -0, and the + [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: +0 + }); + + try { + Object.defineProperties(arr, { + "0": { + value: -0 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "0", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-215.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-215.js index 7b9ba21019..84b4915818 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-215.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-215.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-215.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with same vaule (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: 101 - }); - - try { - Object.defineProperties(arr, { - "0": { - value: 101 - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 101, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-215 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two numbers with same vaule + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: 101 + }); + + try { + Object.defineProperties(arr, { + "0": { + value: 101 + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 101, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-216.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-216.js index aeb8f7c2e4..d31ab7a424 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-216.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-216.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-216.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings which have same length and same characters in corresponding positions (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: "abcd" - }); - - try { - Object.defineProperties(arr, { - "0": { - value: "abcd" - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", "abcd", false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-216 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two strings which have same length + and same characters in corresponding positions (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: "abcd" + }); + + try { + Object.defineProperties(arr, { + "0": { + value: "abcd" + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", "abcd", false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-217.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-217.js index 358ecfdbf3..828b925553 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-217.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-217.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-217.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - value: true - }); - - try { - Object.defineProperties(arr, { - "0": { - value: true - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", true, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-217 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two booleans with same value + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + value: true + }); + + try { + Object.defineProperties(arr, { + "0": { + value: true + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", true, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-218.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-218.js index 8a2fed488a..79613d2e08 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-218.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-218.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-218.js - * @description Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - var obj1 = { length: 10 }; - Object.defineProperty(arr, "0", { - value: obj1 - }); - - var properties = { - "0": { - value: obj1 - } - }; - try { - Object.defineProperties(arr, properties); - return dataPropertyAttributesAreCorrect(arr, "0", obj1, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-218 +description: > + Object.defineProperties - 'O' is an Array, 'name' is an array + index property, the [[Value]] field of 'desc' and the [[Value]] + attribute value of 'name' are two objects which refer to the same + object (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + var obj1 = { length: 10 }; + Object.defineProperty(arr, "0", { + value: obj1 + }); + + var properties = { + "0": { + value: obj1 + } + }; + try { + Object.defineProperties(arr, properties); + return dataPropertyAttributesAreCorrect(arr, "0", obj1, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-219.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-219.js index 5f28097390..1ea718c282 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-219.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-219.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-219.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Writable]] true, and the [[Writable]] field of 'desc' is true (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - writable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - writable: true - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, true, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-219 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property that already exists on 'O' with [[Writable]] true, and + the [[Writable]] field of 'desc' is true (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + writable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + writable: true + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, true, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-22.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-22.js index 814b62c104..f4e43b93fa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-22.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-22.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-22.js - * @description Object.defineProperties - 'O' is the Arguments object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - var arg = function () { - return arguments; - }(); - - Object.defineProperty(arg, "prop", { - value: 11, - configurable: false - }); - - try { - Object.defineProperties(arg, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-22 +description: > + Object.defineProperties - 'O' is the Arguments object which + implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 + step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arg = function () { + return arguments; + }(); + + Object.defineProperty(arg, "prop", { + value: 11, + configurable: false + }); + + try { + Object.defineProperties(arg, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-220.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-220.js index 5751505f6f..ea67a91e2b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-220.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-220.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-220.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Writable]] true, and the [[Writable]] field of 'desc' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - writable: true, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - writable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, true); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-220 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property that already exists on 'O' with [[Writable]] true, and + the [[Writable]] field of 'desc' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + writable: true, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + writable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, true); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-221.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-221.js index 9d76013b8e..63e162462f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-221.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-221.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-221.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are two objects which refer to the same object (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function get_func() { - return 10; - } - - Object.defineProperty(arr, "0", { - get: get_func - }); - - Object.defineProperties(arr, { - "0": { - get: get_func - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", get_func, undefined, undefined, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-221 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, the [[Get]] field of 'desc' and the [[Get]] attribute + value of 'P' are two objects which refer to the same object + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function get_func() { + return 10; + } + + Object.defineProperty(arr, "0", { + get: get_func + }); + + Object.defineProperties(arr, { + "0": { + get: get_func + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", get_func, undefined, undefined, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-222.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-222.js index ed8f520c53..c982b46c18 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-222.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-222.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-222.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are two objects which refer to the same object (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function set_func(value) { - arr.setVerifyHelpProp = value; - } - - Object.defineProperty(arr, "0", { - set: set_func - }); - - try { - Object.defineProperties(arr, { - "0": { - set: set_func - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_func, "setVerifyHelpProp", false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-222 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, the [[Set]] field of 'desc' and the [[Set]] attribute + value of 'P' are two objects which refer to the same object + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function set_func(value) { + arr.setVerifyHelpProp = value; + } + + Object.defineProperty(arr, "0", { + set: set_func + }); + + try { + Object.defineProperties(arr, { + "0": { + set: set_func + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_func, "setVerifyHelpProp", false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-223.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-223.js index f4f0bf8eb3..0c587ae74b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-223.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-223.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-223.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Enumerable]] true, the [[Enumerable]] field of 'desc' is true (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - enumerable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - enumerable: true - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, true, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-223 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property that already exists on 'O' with [[Enumerable]] true, the + [[Enumerable]] field of 'desc' is true (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + enumerable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + enumerable: true + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, true, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-224.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-224.js index 9d7e680a98..62274038e5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-224.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-224.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-224.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Enumerable]] true, the [[Enumerable]] field of 'desc' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - enumerable: true, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - enumerable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, true); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-224 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property that already exists on 'O' with [[Enumerable]] true, the + [[Enumerable]] field of 'desc' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + enumerable: true, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + enumerable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, true); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-225.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-225.js index f947630f7f..a7f972595e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-225.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-225.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-225.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Configurable]] true, the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - configurable: true - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, true); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-225 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property that already exists on 'O' with [[Configurable]] true, + the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + configurable: true + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, true); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-226.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-226.js index aa9dfacbc3..f7d174a536 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-226.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-226.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-226.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Configurable]] true, the [[Configurable]] field of 'desc' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "0", { - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, false); - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-226 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property that already exists on 'O' with [[Configurable]] true, + the [[Configurable]] field of 'desc' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "0", { + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, false, false, false); + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-227.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-227.js index aca7200022..b89ee1eb86 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-227.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-227.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-227.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if the [[Configurable]] attribute value of 'P' is false and the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "1", { - value: 3, - configurable: false - }); - - try { - Object.defineProperties(arr, { - "1": { - value: 13, - configurable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-227 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, TypeError is thrown if the [[Configurable]] attribute + value of 'P' is false and the [[Configurable]] field of 'desc' is + true (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "1", { + value: 3, + configurable: false + }); + + try { + Object.defineProperties(arr, { + "1": { + value: 13, + configurable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-228.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-228.js index 80f80401f5..2e81f368d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-228.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-228.js @@ -1,35 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-228.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if the [[Configurable]] attribute value of 'P' is false, and [[Enumerable]] of 'desc' is present and its value is different from the [[Enumerable]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "1", { - value: 3, - configurable: false, - enumerable: false - - }); - - try { - Object.defineProperties(arr, { - "1": { - value: 13, - enumerable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-228 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, TypeError is thrown if the [[Configurable]] attribute + value of 'P' is false, and [[Enumerable]] of 'desc' is present and + its value is different from the [[Enumerable]] attribute value of + 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "1", { + value: 3, + configurable: false, + enumerable: false + + }); + + try { + Object.defineProperties(arr, { + "1": { + value: 13, + enumerable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-229.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-229.js index abb13a0670..b58d7049e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-229.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-229.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-229.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if 'P' is accessor property, and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - - Object.defineProperty(arr, "1", { - set: set_fun, - configurable: false - - }); - - try { - Object.defineProperties(arr, { - "1": { - value: 13 - } - }); - return false; - - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-229 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, TypeError is thrown if 'P' is accessor property, and + 'desc' is data descriptor, and the [[Configurable]] attribute + value of 'P' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + + Object.defineProperty(arr, "1", { + set: set_fun, + configurable: false + + }); + + try { + Object.defineProperties(arr, { + "1": { + value: 13 + } + }); + return false; + + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-230.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-230.js index 560983f999..d242800b93 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-230.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-230.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-230.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if 'P' is data property, and'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'P' is false (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "1", { - value: 3, - configurable: false - }); - - try { - Object.defineProperties(arr, { - "1": { - set: function () { } - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-230 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, TypeError is thrown if 'P' is data property, and'desc' + is accessor descriptor, and the [[Configurable]] attribute value + of 'P' is false (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "1", { + value: 3, + configurable: false + }); + + try { + Object.defineProperties(arr, { + "1": { + set: function () { } + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-231.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-231.js index e5743f4303..d96779415d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-231.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-231.js @@ -1,28 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-231.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is data property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'P' is true, test 'P' is converted from data property to accessor property (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - arr[1] = 3; // default value of attributes: writable: true, configurable: true, enumerable: true - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - - Object.defineProperties(arr, { - "1": { - set: set_fun - } - }); - - return accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-231 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, 'P' is data property and 'desc' is accessor descriptor, + and the [[Configurable]] attribute value of 'P' is true, test 'P' + is converted from data property to accessor property (15.4.5.1 + step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + arr[1] = 3; // default value of attributes: writable: true, configurable: true, enumerable: true + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + + Object.defineProperties(arr, { + "1": { + set: set_fun + } + }); + + return accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-232.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-232.js index 680b80244b..f60491fb73 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-232.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-232.js @@ -1,31 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-232.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is accessor property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is true, test 'P' is converted from accessor property to data property (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - get: function () { - return 3; - }, - configurable: true - - }); - - Object.defineProperties(arr, { - "1": { - value: 12 - } - }); - - return dataPropertyAttributesAreCorrect(arr, "1", 12, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-232 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, 'P' is accessor property and 'desc' is data descriptor, + and the [[Configurable]] attribute value of 'P' is true, test 'P' + is converted from accessor property to data property (15.4.5.1 + step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + get: function () { + return 3; + }, + configurable: true + + }); + + Object.defineProperties(arr, { + "1": { + value: 12 + } + }); + + return dataPropertyAttributesAreCorrect(arr, "1", 12, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-233.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-233.js index a1ebe30d44..f546ecea13 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-233.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-233.js @@ -1,33 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-233.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is false, test TypeError is thrown if the [[Writable]] attribute value of 'P' is false and the [[Writable]] field of 'desc' is true. (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "1", { - configurable: false, - writable: false - - }); - - try { - Object.defineProperties(arr, { - "1": { - writable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", undefined, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-233 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, 'P' is data property and 'desc' is data descriptor, and + the [[Configurable]] attribute value of 'P' is false, test + TypeError is thrown if the [[Writable]] attribute value of 'P' is + false and the [[Writable]] field of 'desc' is true. (15.4.5.1 + step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "1", { + configurable: false, + writable: false + + }); + + try { + Object.defineProperties(arr, { + "1": { + writable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", undefined, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-234.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-234.js index e845afd70b..5adafc9cc1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-234.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-234.js @@ -1,34 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-234.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is false, test TypeError is thrown if the [[Writable]] attribute value of 'P' is false, and the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "1", { - value: 3, - configurable: false, - writable: false - }); - - try { - - Object.defineProperties(arr, { - "1": { - value: "abc" - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-234 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + property, 'P' is data property and 'desc' is data descriptor, and + the [[Configurable]] attribute value of 'P' is false, test + TypeError is thrown if the [[Writable]] attribute value of 'P' is + false, and the type of the [[Value]] field of 'desc' is different + from the type of the [[Value]] attribute value of 'P' (15.4.5.1 + step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "1", { + value: 3, + configurable: false, + writable: false + }); + + try { + + Object.defineProperties(arr, { + "1": { + value: "abc" + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 3, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-235.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-235.js index cd43470312..8c915439ac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-235.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-235.js @@ -1,30 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-235.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'P' is -0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - value: +0 - }); - - try { - Object.defineProperties(arr, { - "1": { - value: -0 - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-235 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + data property with [[Configurable]], [[Writable]] false, 'desc' + is data descriptor, [[Value]] field of 'desc' is +0, and the + [[Value]] attribute value of 'P' is -0 (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + value: +0 + }); + + try { + Object.defineProperties(arr, { + "1": { + value: -0 + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-236.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-236.js index faa063cfaa..6b8a8ad32a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-236.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-236.js @@ -1,31 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-236.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'P' is +0 (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - value: -0 - }); - - try { - Object.defineProperties(arr, { - "1": { - value: +0 - } - }); - - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-236 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + data property with [[Configurable]], [[Writable]] false, 'desc' + is data descriptor, [[Value]] field of 'desc' is -0, and the + [[Value]] attribute value of 'P' is +0 (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + value: -0 + }); + + try { + Object.defineProperties(arr, { + "1": { + value: +0 + } + }); + + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-237.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-237.js index 06e89eccfc..ac6fe0f2fc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-237.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-237.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-237.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two numbers with different vaule (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - value: 12 - }); - - try { - Object.defineProperties(arr, { - "1": { - value: 36 - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-237 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + data property with [[Configurable]], [[Writable]] false, 'desc' + is data descriptor, [[Value]] field of 'desc' and the [[Value]] + attribute value of 'P' are two numbers with different vaule + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + value: 12 + }); + + try { + Object.defineProperties(arr, { + "1": { + value: 36 + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-238.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-238.js index f95e027dd3..91573862c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-238.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-238.js @@ -1,30 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-238.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two strings with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - value: "abcd" - }); - - try { - Object.defineProperties(arr, { - "1": { - value: "efgh" - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", "abcd", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-238 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + data property with [[Configurable]], [[Writable]] false, 'desc' + is data descriptor, [[Value]] field of 'desc' and the [[Value]] + attribute value of 'P' are two strings with different values + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + value: "abcd" + }); + + try { + Object.defineProperties(arr, { + "1": { + value: "efgh" + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", "abcd", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-239.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-239.js index e982fca2e2..ae155c7e44 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-239.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-239.js @@ -1,31 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-239.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two booleans with different values (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - value: true - }); - - try { - Object.defineProperties(arr, { - "1": { - value: false - } - }); - - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", true, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-239 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + data property with [[Configurable]], [[Writable]] false, 'desc' + is data descriptor, [[Value]] field of 'desc' and the [[Value]] + attribute value of 'P' are two booleans with different values + (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + value: true + }); + + try { + Object.defineProperties(arr, { + "1": { + value: false + } + }); + + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", true, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-24.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-24.js index d96a7103c6..c7272405d3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-24.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-24.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-24.js - * @description Object.defineProperties - 'O' is the global object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) - */ - - -function testcase() { - - try { - Object.defineProperty(fnGlobalObject(), "prop", { - value: 11, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperties(fnGlobalObject(), { - prop: { - value: 12 - } - }); - return dataPropertyAttributesAreCorrect(fnGlobalObject(), "prop", 12, true, true, true); - } finally { - delete fnGlobalObject().prop; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-24 +description: > + Object.defineProperties - 'O' is the global object which + implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 + step 1 ) +includes: + - runTestCase.js + - fnGlobalObject.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + try { + Object.defineProperty(fnGlobalObject(), "prop", { + value: 11, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperties(fnGlobalObject(), { + prop: { + value: 12 + } + }); + return dataPropertyAttributesAreCorrect(fnGlobalObject(), "prop", 12, true, true, true); + } finally { + delete fnGlobalObject().prop; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-240.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-240.js index df1f8ef42f..ca06eceb26 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-240.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-240.js @@ -1,33 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-240.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - var obj1 = { value: 12 }; - var obj2 = { value: 36 }; - - Object.defineProperty(arr, "1", { - value: obj1 - }); - - try { - Object.defineProperties(arr, { - "1": { - value: obj2 - } - }); - - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", obj1, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-240 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + data property with [[Configurable]], [[Writable]] false, 'desc' + is data descriptor, [[Value]] field of 'desc' and the [[Value]] + attribute value of 'P' are two objects which refer to the + different objects (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + var obj1 = { value: 12 }; + var obj2 = { value: 36 }; + + Object.defineProperty(arr, "1", { + value: obj1 + }); + + try { + Object.defineProperties(arr, { + "1": { + value: obj2 + } + }); + + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "1", obj1, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-241.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-241.js index c1e3ebdd59..2b013a35c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-241.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-241.js @@ -1,34 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-241.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "1", { - set: set_fun - }); - - try { - Object.defineProperties(arr, { - "1": { - set: function () { } - } - }); - - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-241 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + accessor property with [[Configurable]] false, 'desc' is accessor + descriptor, the [[Set]] field of 'desc' is present, and the + [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are + two objects which refer to the different objects (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "1", { + set: set_fun + }); + + try { + Object.defineProperties(arr, { + "1": { + set: function () { } + } + }); + + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-242.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-242.js index 09ba890991..b3bf558257 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-242.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-242.js @@ -1,34 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-242.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' is an object and the [[Set]] attribute value of 'P' is undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "1", { - set: set_fun - }); - - try { - Object.defineProperties(arr, { - "1": { - set: undefined - } - }); - - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-242 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + accessor property with [[Configurable]] false, 'desc' is accessor + descriptor, the [[Set]] field of 'desc' is present, and the + [[Set]] field of 'desc' is an object and the [[Set]] attribute + value of 'P' is undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "1", { + set: set_fun + }); + + try { + Object.defineProperties(arr, { + "1": { + set: undefined + } + }); + + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", undefined, set_fun, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-243.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-243.js index 06661edcc1..61cef225ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-243.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-243.js @@ -1,27 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-243.js - * @description Object.defineProperties - TypeError is not thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - set: undefined - }); - - Object.defineProperties(arr, { - "1": { - set: undefined - } - }); - - return accessorPropertyAttributesAreCorrect(arr, "1", undefined, undefined, undefined, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-243 +description: > + Object.defineProperties - TypeError is not thrown if 'O' is an + Array, 'P' is an array index named property that already exists on + 'O' is accessor property with [[Configurable]] false, 'desc' is + accessor descriptor, the [[Set]] field of 'desc' is present, and + the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' + are undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + set: undefined + }); + + Object.defineProperties(arr, { + "1": { + set: undefined + } + }); + + return accessorPropertyAttributesAreCorrect(arr, "1", undefined, undefined, undefined, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-244.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-244.js index 883673107e..9737323fc6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-244.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-244.js @@ -1,36 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-244.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are two objects which refer to the different objects (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function get_fun() { - return 36; - } - Object.defineProperty(arr, "1", { - get: get_fun - }); - - try { - Object.defineProperties(arr, { - "1": { - get: function () { - return 12; - } - } - }); - - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", get_fun, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-244 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + accessor property with [[Configurable]] false, 'desc' is accessor + descriptor, the [[Get]] field of 'desc' is present, and the + [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are + two objects which refer to the different objects (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function get_fun() { + return 36; + } + Object.defineProperty(arr, "1", { + get: get_fun + }); + + try { + Object.defineProperties(arr, { + "1": { + get: function () { + return 12; + } + } + }); + + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", get_fun, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-245.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-245.js index 1dc5ad6b96..79e12c982c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-245.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-245.js @@ -1,33 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-245.js - * @description Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' is an object and the [[Get]] attribute value of 'P' is undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - function get_fun() { - return 36; - } - Object.defineProperty(arr, "1", { - get: get_fun - }); - - try { - Object.defineProperties(arr, { - "1": { - get: undefined - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", get_fun, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-245 +description: > + Object.defineProperties - TypeError is thrown if 'O' is an Array, + 'P' is an array index named property that already exists on 'O' is + accessor property with [[Configurable]] false, 'desc' is accessor + descriptor, the [[Get]] field of 'desc' is present, and the + [[Get]] field of 'desc' is an object and the [[Get]] attribute + value of 'P' is undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function get_fun() { + return 36; + } + Object.defineProperty(arr, "1", { + get: get_fun + }); + + try { + Object.defineProperties(arr, { + "1": { + get: undefined + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "1", get_fun, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-246.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-246.js index c3a312f2ef..7b81c82975 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-246.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-246.js @@ -1,31 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-246.js - * @description Object.defineProperties - TypeError is not thrown if ''O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, test TypeError is not thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - var arr = []; - - Object.defineProperty(arr, "1", { - get: undefined - }); - - try { - Object.defineProperties(arr, { - "1": { - get: undefined - } - }); - - return accessorPropertyAttributesAreCorrect(arr, "1", undefined, undefined, undefined, false, false); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-246 +description: > + Object.defineProperties - TypeError is not thrown if ''O' is an + Array, 'P' is an array index named property that already exists on + 'O' is accessor property with [[Configurable]] false, 'desc' is + accessor descriptor, test TypeError is not thrown if the [[Get]] + field of 'desc' is present, and the [[Get]] field of 'desc' and + the [[Get]] attribute value of 'P' are undefined (15.4.5.1 step + 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + Object.defineProperty(arr, "1", { + get: undefined + }); + + try { + Object.defineProperties(arr, { + "1": { + get: undefined + } + }); + + return accessorPropertyAttributesAreCorrect(arr, "1", undefined, undefined, undefined, false, false); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-247.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-247.js index 23d3c2e3b5..7691b79384 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-247.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-247.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-247.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Value]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [12]; - - try { - Object.defineProperties(arr, { - "0": { - value: 36 - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 36, true, true, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-247 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test updating the [[Value]] attribute + value of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [12]; + + try { + Object.defineProperties(arr, { + "0": { + value: 36 + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 36, true, true, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-248.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-248.js index d141cb84f8..a8aaac93f6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-248.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-248.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-248.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'P' as undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [12]; - - try { - Object.defineProperties(arr, { - "0": { - value: undefined - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", undefined, true, true, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-248 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test setting the [[Value]] attribute + value of 'P' as undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [12]; + + try { + Object.defineProperties(arr, { + "0": { + value: undefined + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", undefined, true, true, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-249.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-249.js index 93cf841200..e79096ad81 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-249.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-249.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-249.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'P' from undefined to normal value (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [undefined]; - - try { - Object.defineProperties(arr, { - "0": { - value: 12 - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 12, true, true, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-249 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test setting the [[Value]] attribute + value of 'P' from undefined to normal value (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [undefined]; + + try { + Object.defineProperties(arr, { + "0": { + value: 12 + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 12, true, true, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-25.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-25.js index 15f4072d52..17bb7b99fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-25.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-25.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-25.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (8.12.9 step 3) - */ - - -function testcase() { - var obj = {}; - Object.preventExtensions(obj); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && !obj.hasOwnProperty("prop"); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-25 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test TypeError + is thrown when 'O' is not extensible (8.12.9 step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.preventExtensions(obj); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && !obj.hasOwnProperty("prop"); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-250.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-250.js index 660ffd92aa..b3bf8147ba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-250.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-250.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-250.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Writable]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [100]; - - try { - Object.defineProperties(arr, { - "0": { - writable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 100, false, true, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-250 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test updating the [[Writable]] + attribute value of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [100]; + + try { + Object.defineProperties(arr, { + "0": { + writable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 100, false, true, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-251.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-251.js index 368af9b89d..93dea5d521 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-251.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-251.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-251.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Enumerable]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [12]; - - try { - Object.defineProperties(arr, { - "0": { - enumerable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 12, true, false, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-251 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test updating the [[Enumerable]] + attribute value of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [12]; + + try { + Object.defineProperties(arr, { + "0": { + enumerable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 12, true, false, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-252.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-252.js index 412f12ecbd..e9ae90c36c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-252.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-252.js @@ -1,27 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-252.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Configurable]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [12]; - - try { - Object.defineProperties(arr, { - "0": { - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 12, true, true, false); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-252 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test updating the [[Configurable]] + attribute value of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [12]; + + try { + Object.defineProperties(arr, { + "0": { + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 12, true, true, false); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-253.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-253.js index 04f9e5b8fb..bb7079b9c2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-253.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-253.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-253.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = [12]; - - try { - Object.defineProperties(arr, { - "0": { - value: 36, - writable: false, - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "0", 36, false, true, false); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-253 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is data property and + 'desc' is data descriptor, test updating multiple attribute values + of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = [12]; + + try { + Object.defineProperties(arr, { + "0": { + value: 36, + writable: false, + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "0", 36, false, true, false); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-254.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-254.js index 4317de8554..37b3fd8f39 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-254.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-254.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-254.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'P' with different getter function (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function get_fun() { - return 36; - } - - Object.defineProperty(arr, "0", { - get: function () { - return 12; - }, - configurable: true - }); - - Object.defineProperties(arr, { - "0": { - get: get_fun - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", get_fun, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-254 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating the [[Get]] attribute + value of 'P' with different getter function (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function get_fun() { + return 36; + } + + Object.defineProperty(arr, "0", { + get: function () { + return 12; + }, + configurable: true + }); + + Object.defineProperties(arr, { + "0": { + get: get_fun + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", get_fun, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-255.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-255.js index b85af3c348..1dc6b1551b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-255.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-255.js @@ -1,30 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-255.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test setting the [[Get]] attribute value of 'P' as undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "0", { - get: function () { - return 12; - }, - configurable: true - }); - - Object.defineProperties(arr, { - "0": { - get: undefined - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-255 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test setting the [[Get]] attribute + value of 'P' as undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "0", { + get: function () { + return 12; + }, + configurable: true + }); + + Object.defineProperties(arr, { + "0": { + get: undefined + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-256.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-256.js index 49ae1f5416..b81817a235 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-256.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-256.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-256.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'P' from undefined to function (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function get_fun() { - return 36; - } - - Object.defineProperty(arr, "0", { - get: undefined, - configurable: true - }); - - Object.defineProperties(arr, { - "0": { - get: get_fun - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", get_fun, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-256 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating the [[Get]] attribute + value of 'P' from undefined to function (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function get_fun() { + return 36; + } + + Object.defineProperty(arr, "0", { + get: undefined, + configurable: true + }); + + Object.defineProperties(arr, { + "0": { + get: get_fun + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", get_fun, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-257.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-257.js index 7ba06302ee..eee053f641 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-257.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-257.js @@ -1,36 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-257.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'P' with different getter function (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - set: set_fun - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-257 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating the [[Set]] attribute + value of 'P' with different getter function (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + set: set_fun + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-258.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-258.js index ca97606a99..006ca06217 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-258.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-258.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-258.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test setting the [[Set]] attribute value of 'P' as undefined (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - Object.defineProperties(arr, { - "0": { - set: undefined - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, undefined, undefined, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-258 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test setting the [[Set]] attribute + value of 'P' as undefined (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + Object.defineProperties(arr, { + "0": { + set: undefined + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, undefined, undefined, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-259.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-259.js index a112476f58..eaa40a6eb6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-259.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-259.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-259.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'P' from undefined to function (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "0", { - set: undefined, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - set: set_fun - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-259 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating the [[Set]] attribute + value of 'P' from undefined to function (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "0", { + set: undefined, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + set: set_fun + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-26.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-26.js index 466205ce6d..0ce274aba7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-26.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-26.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-26.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test 'P' is defined as data property when 'desc' is generic descriptor (8.12.9 step 4.a) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - prop: { - configurable: true, - enumerable: true - } - }); - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc.hasOwnProperty("value") && typeof desc.value === "undefined" && - desc.hasOwnProperty("writable") && desc.writable === false && - desc.hasOwnProperty("configurable") && desc.configurable === true && - desc.hasOwnProperty("enumerable") && desc.enumerable === true && - !desc.hasOwnProperty("get") && !desc.hasOwnProperty("set"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-26 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test 'P' is + defined as data property when 'desc' is generic descriptor (8.12.9 + step 4.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + prop: { + configurable: true, + enumerable: true + } + }); + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc.hasOwnProperty("value") && typeof desc.value === "undefined" && + desc.hasOwnProperty("writable") && desc.writable === false && + desc.hasOwnProperty("configurable") && desc.configurable === true && + desc.hasOwnProperty("enumerable") && desc.enumerable === true && + !desc.hasOwnProperty("get") && !desc.hasOwnProperty("set"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-260.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-260.js index 56c607cb84..867cb5c62c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-260.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-260.js @@ -1,36 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-260.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Enumerable]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "0", { - set: set_fun, - enumerable: true, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - enumerable: false - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, true); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-260 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating the [[Enumerable]] + attribute value of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "0", { + set: set_fun, + enumerable: true, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + enumerable: false + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, true); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-261.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-261.js index 5efdf82ae9..0098303752 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-261.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-261.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-261.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Configurable]] attribute value of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "0", { - set: set_fun, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - configurable: false - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, false); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-261 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating the [[Configurable]] + attribute value of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "0", { + set: set_fun, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + configurable: false + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", undefined, set_fun, "setVerifyHelpProp", false, false); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-262.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-262.js index ed48bd9098..cf4f32fa2a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-262.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-262.js @@ -1,44 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-262.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 4.c) - */ - - -function testcase() { - - var arr = []; - - function get_fun() { - return 36; - } - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "0", { - get: function () { - return 12; - }, - set: set_fun, - enumerable: true, - configurable: true - }); - - try { - Object.defineProperties(arr, { - "0": { - get: get_fun, - enumerable: false, - configurable: false - } - }); - return accessorPropertyAttributesAreCorrect(arr, "0", get_fun, set_fun, "setVerifyHelpProp", false, false); - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-262 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property that already exists on 'O' is accessor property and + 'desc' is accessor descriptor, test updating multiple attribute + values of 'P' (15.4.5.1 step 4.c) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function get_fun() { + return 36; + } + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "0", { + get: function () { + return 12; + }, + set: set_fun, + enumerable: true, + configurable: true + }); + + try { + Object.defineProperties(arr, { + "0": { + get: get_fun, + enumerable: false, + configurable: false + } + }); + return accessorPropertyAttributesAreCorrect(arr, "0", get_fun, set_fun, "setVerifyHelpProp", false, false); + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-263.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-263.js index 8b32853c7f..65034fa2e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-263.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-263.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-263.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, test the length property of 'O' is not changed if ToUint32('P') is less than value of the length property in 'O' (15.4.5.1 step 4.e) - */ - - -function testcase() { - - var arr = []; - - arr.length = 3; // default value of length: writable: true, configurable: false, enumerable: false - - Object.defineProperties(arr, { - "1": { - value: 26 - } - }); - return arr.length === 3 && arr[1] === 26; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-263 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, test the length property of 'O' is not changed if + ToUint32('P') is less than value of the length property in 'O' + (15.4.5.1 step 4.e) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + arr.length = 3; // default value of length: writable: true, configurable: false, enumerable: false + + Object.defineProperties(arr, { + "1": { + value: 26 + } + }); + return arr.length === 3 && arr[1] === 26; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-264.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-264.js index 07ed0639c1..aa99410045 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-264.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-264.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-264.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, test the length property of 'O' is set as ToUint32('P') + 1 if ToUint32('P') equals to value of the length property in 'O' (15.4.5.1 step 4.e.ii) - */ - - -function testcase() { - - var arr = []; - - arr.length = 3; // default value of length: writable: true, configurable: false, enumerable: false - - Object.defineProperties(arr, { - "3": { - value: 26 - } - }); - return arr.length === 4 && arr[3] === 26; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-264 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, test the length property of 'O' is set as + ToUint32('P') + 1 if ToUint32('P') equals to value of the length + property in 'O' (15.4.5.1 step 4.e.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + arr.length = 3; // default value of length: writable: true, configurable: false, enumerable: false + + Object.defineProperties(arr, { + "3": { + value: 26 + } + }); + return arr.length === 4 && arr[3] === 26; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-265.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-265.js index 6e86ab1251..62ff57b15f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-265.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-265.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-265.js - * @description Object.defineProperties - 'O' is an Array, 'P' is an array index named property, test the length property of 'O' is set as ToUint32('P') + 1 if ToUint32('P') is greater than value of the length property in 'O' (15.4.5.1 step 4.e.ii) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - "5": { - value: 26 - } - }); - return arr.length === 6 && arr[5] === 26; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-265 +description: > + Object.defineProperties - 'O' is an Array, 'P' is an array index + named property, test the length property of 'O' is set as + ToUint32('P') + 1 if ToUint32('P') is greater than value of the + length property in 'O' (15.4.5.1 step 4.e.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + "5": { + value: 26 + } + }); + return arr.length === 6 && arr[5] === 26; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-266.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-266.js index 8565152c82..4db292bd34 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-266.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-266.js @@ -1,26 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-266.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic property that won't exist on 'O', and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperties(arr, { - "property": { - value: 12, - writable: true, - enumerable: true, - configurable: true - } - }); - return dataPropertyAttributesAreCorrect(arr, "property", 12, true, true, true) && arr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-266 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic property + that won't exist on 'O', and 'desc' is data descriptor, test 'P' + is defined in 'O' with all correct attribute values (15.4.5.1 step + 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperties(arr, { + "property": { + value: 12, + writable: true, + enumerable: true, + configurable: true + } + }); + return dataPropertyAttributesAreCorrect(arr, "property", 12, true, true, true) && arr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-267.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-267.js index b8afb467e4..7b8d81bdc4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-267.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-267.js @@ -1,34 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-267.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - function get_fun() { - return 12; - } - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - - Object.defineProperties(arr, { - "property": { - get: get_fun, - set: set_fun, - enumerable: true, - configurable: true - } - }); - return accessorPropertyAttributesAreCorrect(arr, "property", get_fun, set_fun, "setVerifyHelpProp", true, true) && - arr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-267 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic + property, and 'desc' is accessor descriptor, test 'P' is defined + in 'O' with all correct attribute values (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function get_fun() { + return 12; + } + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + + Object.defineProperties(arr, { + "property": { + get: get_fun, + set: set_fun, + enumerable: true, + configurable: true + } + }); + return accessorPropertyAttributesAreCorrect(arr, "property", get_fun, set_fun, "setVerifyHelpProp", true, true) && + arr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-268.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-268.js index 79be79c65c..c302b57a84 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-268.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-268.js @@ -1,37 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-268.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 5) - */ - - -function testcase() { - var arr = []; - function get_fun() { - return 12; - } - function set_fun(value) { - arr.verifySetFun = value; - } - Object.defineProperty(arr, "property", { - get: function () { - return 36; - }, - enumerable: true, - configurable: true - }); - - Object.defineProperties(arr, { - "property": { - get: get_fun, - set: set_fun, - enumerable: false - } - }); - return accessorPropertyAttributesAreCorrect(arr, "property", get_fun, set_fun, "verifySetFun", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-268 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own + accessor property of 'O', and 'desc' is accessor descriptor, test + updating multiple attribute values of 'P' (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + function get_fun() { + return 12; + } + function set_fun(value) { + arr.verifySetFun = value; + } + Object.defineProperty(arr, "property", { + get: function () { + return 36; + }, + enumerable: true, + configurable: true + }); + + Object.defineProperties(arr, { + "property": { + get: get_fun, + set: set_fun, + enumerable: false + } + }); + return accessorPropertyAttributesAreCorrect(arr, "property", get_fun, set_fun, "verifySetFun", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-269.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-269.js index 2a07de6543..84b60a4e0e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-269.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-269.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-269.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - arr.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(arr, { - "property": { - writable: false, - enumerable: false, - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false) && arr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-269 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own data + property of 'O', and 'desc' is data descriptor, test updating + multiple attribute values of 'P' (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + arr.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(arr, { + "property": { + writable: false, + enumerable: false, + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false) && arr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-27.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-27.js index 7d03b68ae3..9a7948f91b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-27.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-27.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-27.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Value]] of 'P' is set as undefined value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - prop: { - writable: true - } - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc.hasOwnProperty("value") && typeof desc.value === "undefined" && - desc.hasOwnProperty("writable") && desc.writable === true && - desc.hasOwnProperty("configurable") && desc.configurable === false && - desc.hasOwnProperty("enumerable") && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-27 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test [[Value]] + of 'P' is set as undefined value if absent in data descriptor + 'desc' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + prop: { + writable: true + } + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc.hasOwnProperty("value") && typeof desc.value === "undefined" && + desc.hasOwnProperty("writable") && desc.writable === true && + desc.hasOwnProperty("configurable") && desc.configurable === false && + desc.hasOwnProperty("enumerable") && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-270.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-270.js index bda5c3f481..8ddf5151c4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-270.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-270.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-270.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is defined as unwritable and non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "property", { - value: 12 - }); - - try { - Object.defineProperties(arr, { - "property": { - value: 36 - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-270 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own data + property of 'O', test TypeError is thrown when updating the + [[Value]] attribute value of 'P' which is defined as unwritable + and non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "property", { + value: 12 + }); + + try { + Object.defineProperties(arr, { + "property": { + value: 36 + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-271.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-271.js index 743ca389f4..6cefedf40e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-271.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-271.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-271.js - * @description Object.defineProperties -'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "property", { - writable: false - }); - - try { - Object.defineProperties(arr, { - "property": { - writable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", undefined, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-271 +description: > + Object.defineProperties -'O' is an Array, 'P' is generic own data + property of 'O', test TypeError is thrown when updating the + [[Writable]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "property", { + writable: false + }); + + try { + Object.defineProperties(arr, { + "property": { + writable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", undefined, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-272.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-272.js index cdb2a2005a..2630e340d9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-272.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-272.js @@ -1,32 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-272.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "property", { - value: 12, - enumerable: false - }); - - try { - Object.defineProperties(arr, { - "property": { - enumerable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-272 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own data + property of 'O', test TypeError is thrown when updating the + [[Enumerable]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "property", { + value: 12, + enumerable: false + }); + + try { + Object.defineProperties(arr, { + "property": { + enumerable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-273.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-273.js index ec002d18da..f22658d7c3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-273.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-273.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-273.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "property", { - value: 12 - }); - - try { - Object.defineProperties(arr, { - "property": { - configurable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-273 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own data + property of 'O', test TypeError is thrown when updating the + [[Configurable]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "property", { + value: 12 + }); + + try { + Object.defineProperties(arr, { + "property": { + configurable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, "property", 12, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-274.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-274.js index 2295cd87d8..2f27559b3e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-274.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-274.js @@ -1,40 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-274.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - var arr = []; - - function get_fun() { - return 37; - } - function set_fun(value) { - arr.verifySetFun = value; - } - Object.defineProperty(arr, "property", { - get: get_fun, - set: set_fun - }); - - try { - Object.defineProperties(arr, { - "property": { - get: function () { - return 36; - } - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && - accessorPropertyAttributesAreCorrect(arr, "property", get_fun, set_fun, "verifySetFun", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-274 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Get]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arr = []; + + function get_fun() { + return 37; + } + function set_fun(value) { + arr.verifySetFun = value; + } + Object.defineProperty(arr, "property", { + get: get_fun, + set: set_fun + }); + + try { + Object.defineProperties(arr, { + "property": { + get: function () { + return 36; + } + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && + accessorPropertyAttributesAreCorrect(arr, "property", get_fun, set_fun, "verifySetFun", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-275.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-275.js index 7825e32aaa..db153cc1f9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-275.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-275.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-275.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "property", { - set: set_fun - }); - - try { - Object.defineProperties(arr, { - "property": { - set: function () { } - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "property", undefined, set_fun, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-275 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Set]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "property", { + set: set_fun + }); + + try { + Object.defineProperties(arr, { + "property": { + set: function () { } + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "property", undefined, set_fun, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-276.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-276.js index 7febad27e8..f39432a200 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-276.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-276.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-276.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "property", { - set: set_fun, - enumerable: false - }); - - try { - Object.defineProperties(arr, { - "property": { - enumerable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "property", undefined, set_fun, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-276 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "property", { + set: set_fun, + enumerable: false + }); + + try { + Object.defineProperties(arr, { + "property": { + enumerable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "property", undefined, set_fun, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-277.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-277.js index d679d81823..2e327ca23e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-277.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-277.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-277.js - * @description Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5) - */ - - -function testcase() { - - var arr = []; - - function set_fun(value) { - arr.setVerifyHelpProp = value; - } - Object.defineProperty(arr, "property", { - set: set_fun, - configurable: false - }); - - try { - Object.defineProperties(arr, { - "property": { - configurable: true - } - }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "property", undefined, set_fun, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-277 +description: > + Object.defineProperties - 'O' is an Array, 'P' is generic own + accessor property of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'P' which is defined as + non-configurable (15.4.5.1 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arr = []; + + function set_fun(value) { + arr.setVerifyHelpProp = value; + } + Object.defineProperty(arr, "property", { + set: set_fun, + configurable: false + }); + + try { + Object.defineProperties(arr, { + "property": { + configurable: true + } + }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, "property", undefined, set_fun, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-278.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-278.js index 4be0c7165a..020367e287 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-278.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-278.js @@ -1,33 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-278.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own property which is ever defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'P' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - delete arg[0]; - - Object.defineProperties(arg, { - "0": { - value: 10, - writable: true, - enumerable: true, - configurable: true - } - }); - - return dataPropertyAttributesAreCorrect(arg, "0", 10, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-278 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + property which is ever defined in both [[ParameterMap]] of 'O' and + 'O', and is deleted afterwards, and 'desc' is data descriptor, + test 'P' is redefined in 'O' with all correct attribute values + (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + delete arg[0]; + + Object.defineProperties(arg, { + "0": { + value: 10, + writable: true, + enumerable: true, + configurable: true + } + }); + + return dataPropertyAttributesAreCorrect(arg, "0", 10, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-279.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-279.js index b8ca3e83ae..445d5719d3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-279.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-279.js @@ -1,40 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-279.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own property which is ever defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is accessor descriptor, test 'P' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - delete arg[0]; - - function get_func() { - return 10; - } - function set_func(value) { - arg.setVerifyHelpProp = value; - } - - Object.defineProperties(arg, { - "0": { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - } - }); - - return accessorPropertyAttributesAreCorrect(arg, "0", get_func, set_func, "setVerifyHelpProp", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-279 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + property which is ever defined in both [[ParameterMap]] of 'O' and + 'O', and is deleted afterwards, and 'desc' is accessor descriptor, + test 'P' is redefined in 'O' with all correct attribute values + (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + delete arg[0]; + + function get_func() { + return 10; + } + function set_func(value) { + arg.setVerifyHelpProp = value; + } + + Object.defineProperties(arg, { + "0": { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + } + }); + + return accessorPropertyAttributesAreCorrect(arg, "0", get_func, set_func, "setVerifyHelpProp", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-28.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-28.js index 7b986fda79..3627e00847 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-28.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-28.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-28.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Writable]] of 'P' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - prop: { - value: 1001 - } - }); - obj.prop = 1002; - return obj.hasOwnProperty("prop") && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-28 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test + [[Writable]] of 'P' is set as false value if absent in data + descriptor 'desc' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + prop: { + value: 1001 + } + }); + obj.prop = 1002; + return obj.hasOwnProperty("prop") && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-280.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-280.js index a92e7e070e..e47d631ecd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-280.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-280.js @@ -1,46 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-280.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - } (0, 1, 2)); - - function get_func1() { - return 10; - } - - Object.defineProperty(arg, "0", { - get: get_func1, - enumerable: true, - configurable: true - }); - - function get_func2() { - return 20; - } - - Object.defineProperties(arg, { - "0": { - get: get_func2, - enumerable: false, - configurable: false - } - }); - - var desc = Object.getOwnPropertyDescriptor(arg, "0"); - return desc.get === get_func2 && typeof desc.set === "undefined" && - desc.configurable === false && desc.enumerable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-280 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + accessor property of 'O' which is also defined in [[ParameterMap]] + of 'O', and 'desc' is accessor descriptor, test updating multiple + attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + } (0, 1, 2)); + + function get_func1() { + return 10; + } + + Object.defineProperty(arg, "0", { + get: get_func1, + enumerable: true, + configurable: true + }); + + function get_func2() { + return 20; + } + + Object.defineProperties(arg, { + "0": { + get: get_func2, + enumerable: false, + configurable: false + } + }); + + var desc = Object.getOwnPropertyDescriptor(arg, "0"); + return desc.get === get_func2 && typeof desc.set === "undefined" && + desc.configurable === false && desc.enumerable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-281.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-281.js index 8110575484..cf0de9523e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-281.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-281.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-281.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - Object.defineProperties(arg, { - "0": { - value: 20, - writable: false, - enumerable: false, - configurable: false - } - }); - - return dataPropertyAttributesAreCorrect(arg, "0", 20, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-281 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + data property of 'O' which is also defined in [[ParameterMap]] of + 'O', and 'desc' is data descriptor, test updating multiple + attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + Object.defineProperties(arg, { + "0": { + value: 20, + writable: false, + enumerable: false, + configurable: false + } + }); + + return dataPropertyAttributesAreCorrect(arg, "0", 20, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-282.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-282.js index b962c4f37b..f8dc1ff7b9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-282.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-282.js @@ -1,38 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-282.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' whose writable and configurable attributes are false (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - value: 10 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-282 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + data property of 'O' which is also defined in [[ParameterMap]] of + 'O', test TypeError is thrown when updating the [[Value]] + attribute value of 'P' whose writable and configurable attributes + are false (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + value: 10 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-283.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-283.js index 77450641f6..1f43637be3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-283.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-283.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-283.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - enumerable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - writable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-283 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + data property of 'O' which is also defined in [[ParameterMap]] of + 'O', test TypeError is thrown when updating the [[Writable]] + attribute value of 'P' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + writable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-284.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-284.js index 50834034b6..62bda9ef70 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-284.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-284.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-284.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - enumerable: false - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-284 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + data property of 'O' which is also defined in [[ParameterMap]] of + 'O', test TypeError is thrown when updating the [[Enumerable]] + attribute value of 'P' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + enumerable: false + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-285.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-285.js index 223a72e51e..9b00b79ee0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-285.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-285.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-285.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - enumerable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - configurable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-285 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + data property of 'O' which is also defined in [[ParameterMap]] of + 'O', test TypeError is thrown when updating the [[Configurable]] + attribute value of 'P' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + configurable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-286.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-286.js index 8ba195aa41..362ef9c736 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-286.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-286.js @@ -1,47 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-286.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - } (0, 1, 2)); - - function get_func1() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func1, - enumerable: false, - configurable: false - }); - - function get_func2() { - return 10; - } - try { - Object.defineProperties(arg, { - "0": { - get: get_func2 - } - }); - - return false; - } catch (e) { - var desc = Object.getOwnPropertyDescriptor(arg, "0"); - return e instanceof TypeError && desc.get === get_func1 && typeof desc.set === "undefined" && - desc.enumerable === false && desc.configurable === false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-286 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + accessor property of 'O' which is also defined in [[ParameterMap]] + of 'O', test TypeError is thrown when updating the [[Get]] + attribute value of 'P' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + } (0, 1, 2)); + + function get_func1() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func1, + enumerable: false, + configurable: false + }); + + function get_func2() { + return 10; + } + try { + Object.defineProperties(arg, { + "0": { + get: get_func2 + } + }); + + return false; + } catch (e) { + var desc = Object.getOwnPropertyDescriptor(arg, "0"); + return e instanceof TypeError && desc.get === get_func1 && typeof desc.set === "undefined" && + desc.enumerable === false && desc.configurable === false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-287.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-287.js index f8aa84a2a2..4ca7f80cad 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-287.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-287.js @@ -1,48 +1,54 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-287.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - function get_func() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func, - set: undefined, - enumerable: false, - configurable: false - }); - - function set_func(value) { - arg.setVerifyHelpProp = value; - } - try { - Object.defineProperties(arg, { - "0": { - set: set_func - } - }); - - return false; - } catch (e) { - var desc = Object.getOwnPropertyDescriptor(arg, "0"); - return e instanceof TypeError && desc.get === get_func && typeof desc.set === "undefined" && - desc.enumerable === false && desc.configurable === false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-287 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + accessor property of 'O' which is also defined in [[ParameterMap]] + of 'O', test TypeError is thrown when updating the [[Set]] + attribute value of 'P' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + function get_func() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func, + set: undefined, + enumerable: false, + configurable: false + }); + + function set_func(value) { + arg.setVerifyHelpProp = value; + } + try { + Object.defineProperties(arg, { + "0": { + set: set_func + } + }); + + return false; + } catch (e) { + var desc = Object.getOwnPropertyDescriptor(arg, "0"); + return e instanceof TypeError && desc.get === get_func && typeof desc.set === "undefined" && + desc.enumerable === false && desc.configurable === false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-288.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-288.js index 850aab28a1..1c3e584d50 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-288.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-288.js @@ -1,42 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-288.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - function get_func() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - enumerable: false - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-288 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + accessor property of 'O' which is also defined in [[ParameterMap]] + of 'O', test TypeError is thrown when updating the [[Enumerable]] + attribute value of 'P' which is defined as non-configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + function get_func() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + enumerable: false + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-289.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-289.js index 0bb18b700c..d7b9bf4667 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-289.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-289.js @@ -1,42 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-289.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun(a, b, c) { - arg = arguments; - }(0, 1, 2)); - - function get_func() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - configurable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-289 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is own + accessor property of 'O' which is also defined in [[ParameterMap]] + of 'O', test TypeError is thrown when updating the + [[Configurable]] attribute value of 'P' which is defined as + non-configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun(a, b, c) { + arg = arguments; + }(0, 1, 2)); + + function get_func() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + configurable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-29.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-29.js index e296b4d612..06a3dc89e9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-29.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-29.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-29.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Enumerable]] of 'P' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - prop: { value: 1001} - }); - - for (var prop in obj) { - if (obj.hasOwnProperty(prop)) { - if (prop === "prop") { - return false; - } - } - } - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-29 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test + [[Enumerable]] of 'P' is set as false value if absent in data + descriptor 'desc' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + prop: { value: 1001} + }); + + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + if (prop === "prop") { + return false; + } + } + } + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-290.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-290.js index 50f771e9f3..7dc503f5ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-290.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-290.js @@ -1,33 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-290.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }(0, 1, 2)); - - delete arg[0]; - - Object.defineProperties(arg, { - "0": { - value: 10, - writable: false, - enumerable: false, - configurable: false - } - }); - - return dataPropertyAttributesAreCorrect(arg, "0", 10, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-290 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is data descriptor, test 'P' + is defined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }(0, 1, 2)); + + delete arg[0]; + + Object.defineProperties(arg, { + "0": { + value: 10, + writable: false, + enumerable: false, + configurable: false + } + }); + + return dataPropertyAttributesAreCorrect(arg, "0", 10, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-291.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-291.js index 09353d5b3b..c9eabffa5d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-291.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-291.js @@ -1,40 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-291.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }(0, 1, 2)); - - delete arg[0]; - - function get_func() { - return 10; - } - function set_func(value) { - arg.setVerifyHelpProp = value; - } - - Object.defineProperties(arg, { - "0": { - get: get_func, - set: set_func, - enumerable: false, - configurable: false - } - }); - - return accessorPropertyAttributesAreCorrect(arg, "0", get_func, set_func, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-291 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test + 'P' is defined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }(0, 1, 2)); + + delete arg[0]; + + function get_func() { + return 10; + } + function set_func(value) { + arg.setVerifyHelpProp = value; + } + + Object.defineProperties(arg, { + "0": { + get: get_func, + set: set_func, + enumerable: false, + configurable: false + } + }); + + return accessorPropertyAttributesAreCorrect(arg, "0", get_func, set_func, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-292.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-292.js index d1bcd32d0f..3f9f987923 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-292.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-292.js @@ -1,44 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-292.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }(0, 1, 2)); - - function get_func1() { - return 10; - } - - Object.defineProperty(arg, "0", { - get: get_func1, - enumerable: true, - configurable: true - }); - - function get_func2() { - return 20; - } - - Object.defineProperties(arg, { - "0": { - get: get_func2, - enumerable: false, - configurable: false - } - }); - - return accessorPropertyAttributesAreCorrect(arg, "0", get_func2, undefined, undefined, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-292 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test + updating multiple attribute values of 'P' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }(0, 1, 2)); + + function get_func1() { + return 10; + } + + Object.defineProperty(arg, "0", { + get: get_func1, + enumerable: true, + configurable: true + }); + + function get_func2() { + return 20; + } + + Object.defineProperties(arg, { + "0": { + get: get_func2, + enumerable: false, + configurable: false + } + }); + + return accessorPropertyAttributesAreCorrect(arg, "0", get_func2, undefined, undefined, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-293.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-293.js index fbace17855..5c2ceab3f2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-293.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-293.js @@ -1,31 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-293.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }(0, 1, 2)); - - Object.defineProperties(arg, { - "0": { - value: 20, - writable: false, - enumerable: false, - configurable: false - } - }); - - return dataPropertyAttributesAreCorrect(arg, "0", 20, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-293 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', and 'desc' is data descriptor, test + updating multiple attribute values of 'P' (10.6 + [[DefineOwnProperty]] step 3) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }(0, 1, 2)); + + Object.defineProperties(arg, { + "0": { + value: 20, + writable: false, + enumerable: false, + configurable: false + } + }); + + return dataPropertyAttributesAreCorrect(arg, "0", 20, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-294.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-294.js index 52576d6d09..39fd992a02 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-294.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-294.js @@ -1,38 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-294.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - value: 10 - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-294 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Value]] attribute value of 'P' which is not writable and not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + value: 10 + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-295.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-295.js index 458a125e80..30e5f1762a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-295.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-295.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-295.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - enumerable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - writable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-295 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Writable]] attribute value of 'P' which is not configurable + (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + writable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-296.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-296.js index 74da251407..8c8d628466 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-296.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-296.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-296.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - enumerable: false - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-296 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + enumerable: false + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-297.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-297.js index b72c0e1616..1a0fa728a9 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-297.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-297.js @@ -1,39 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-297.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - Object.defineProperty(arg, "0", { - value: 0, - writable: false, - enumerable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - configurable: true - } - }); - - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-297 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named data property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + Object.defineProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + configurable: true + } + }); + + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, "0", 0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-298.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-298.js index 105871dfde..0c72e56b90 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-298.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-298.js @@ -1,44 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-298.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - function get_func1() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func1, - enumerable: false, - configurable: false - }); - - function get_func2() { - return 10; - } - try { - Object.defineProperties(arg, { - "0": { - get: get_func2 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func1, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-298 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Get]] attribute value of 'P' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + function get_func1() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func1, + enumerable: false, + configurable: false + }); + + function get_func2() { + return 10; + } + try { + Object.defineProperties(arg, { + "0": { + get: get_func2 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func1, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-299.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-299.js index fc33392c60..f42e1cd306 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-299.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-299.js @@ -1,45 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-299.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - function get_func() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func, - set: undefined, - enumerable: false, - configurable: false - }); - - function set_func(value) { - arg.setVerifyHelpProp = value; - } - try { - Object.defineProperties(arg, { - "0": { - set: set_func - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-299 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Set]] attribute value of 'P' which is not configurable (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + function get_func() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func, + set: undefined, + enumerable: false, + configurable: false + }); + + function set_func(value) { + arg.setVerifyHelpProp = value; + } + try { + Object.defineProperties(arg, { + "0": { + set: set_func + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-3.js index ac5969ad11..a2c2ef6ef2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-3.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-3.js - * @description Object.defineProperties - 'P' is own data property that overrides an inherited data property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - value: 11, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - value: 12, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 13, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-3 +description: > + Object.defineProperties - 'P' is own data property that overrides + an inherited data property (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 11, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + value: 12, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 13, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-30.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-30.js index a2d36da084..97b89b2ff8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-30.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-30.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-30.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Configurable]] of 'P' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - - Object.defineProperties(obj, { - prop: { value: 1001 } - }); - delete obj.prop; - return obj.hasOwnProperty("prop") && obj.prop === 1001; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-30 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test + [[Configurable]] of 'P' is set as false value if absent in data + descriptor 'desc' (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + + Object.defineProperties(obj, { + prop: { value: 1001 } + }); + delete obj.prop; + return obj.hasOwnProperty("prop") && obj.prop === 1001; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-300.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-300.js index 5dbe86ad5f..34362547fd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-300.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-300.js @@ -1,41 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-300.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - function get_func() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - enumerable: false - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-300 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Enumerable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + function get_func() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + enumerable: false + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-301.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-301.js index 7e1e9ff8d9..a642570d13 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-301.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-301.js @@ -1,41 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-301.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }()); - - function get_func() { - return 0; - } - - Object.defineProperty(arg, "0", { - get: get_func, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "0": { - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-301 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is an + array index named accessor property of 'O' but not defined in + [[ParameterMap]] of 'O', test TypeError is thrown when updating + the [[Configurable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }()); + + function get_func() { + return 0; + } + + Object.defineProperty(arg, "0", { + get: get_func, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "0": { + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, "0", get_func, undefined, undefined, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-302.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-302.js index 4f142e5952..cd827ebbb4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-302.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-302.js @@ -1,28 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-302.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperties(arg, { - "genericProperty": { - value: 1001, - writable: true, - enumerable: true, - configurable: true - } - }); - - return dataPropertyAttributesAreCorrect(arg, "genericProperty", 1001, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-302 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic property, and 'desc' is data descriptor, test 'P' is + defined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperties(arg, { + "genericProperty": { + value: 1001, + writable: true, + enumerable: true, + configurable: true + } + }); + + return dataPropertyAttributesAreCorrect(arg, "genericProperty", 1001, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-303.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-303.js index ad3a72d784..f5eff7cec5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-303.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-303.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-303.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - function getFun() { - return "getFunctionString"; - } - function setFun(value) { - arg.testGetFunction = value; - } - Object.defineProperties(arg, { - "genericProperty": { - get: getFun, - set: setFun, - enumerable: true, - configurable: true - } - }); - - return accessorPropertyAttributesAreCorrect(arg, "genericProperty", getFun, setFun, "testGetFunction", true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-303 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic property, and 'desc' is accessor descriptor, test 'P' is + defined in 'O' with all correct attribute values (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + function getFun() { + return "getFunctionString"; + } + function setFun(value) { + arg.testGetFunction = value; + } + Object.defineProperties(arg, { + "genericProperty": { + get: getFun, + set: setFun, + enumerable: true, + configurable: true + } + }); + + return accessorPropertyAttributesAreCorrect(arg, "genericProperty", getFun, setFun, "testGetFunction", true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-304.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-304.js index ad5c880c2d..faa10b1688 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-304.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-304.js @@ -1,45 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-304.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperty(arg, "genericProperty", { - get: function () { - return 1001; - }, - set: function (value) { - arg.testGetFunction1 = value; - }, - enumerable: true, - configurable: true - }); - - function getFun() { - return "getFunctionString"; - } - function setFun(value) { - arg.testGetFunction = value; - } - Object.defineProperties(arg, { - "genericProperty": { - get: getFun, - set: setFun, - enumerable: false, - configurable: false - } - }); - - return accessorPropertyAttributesAreCorrect(arg, "genericProperty", getFun, setFun, "testGetFunction", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-304 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own accessor property of 'O', and 'desc' is accessor + descriptor, test updating multiple attribute values of 'P' (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperty(arg, "genericProperty", { + get: function () { + return 1001; + }, + set: function (value) { + arg.testGetFunction1 = value; + }, + enumerable: true, + configurable: true + }); + + function getFun() { + return "getFunctionString"; + } + function setFun(value) { + arg.testGetFunction = value; + } + Object.defineProperties(arg, { + "genericProperty": { + get: getFun, + set: setFun, + enumerable: false, + configurable: false + } + }); + + return accessorPropertyAttributesAreCorrect(arg, "genericProperty", getFun, setFun, "testGetFunction", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-305.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-305.js index 4d212c3cfd..641833ad3e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-305.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-305.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-305.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperty(arg, "genericProperty", { - value: 1001, - writable: true, - enumerable: true, - configurable: true - }); - - Object.defineProperties(arg, { - "genericProperty": { - value: 1002, - enumerable: false, - configurable: false - } - }); - - return dataPropertyAttributesAreCorrect(arg, "genericProperty", 1002, true, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-305 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own data property of 'O', and 'desc' is data descriptor, + test updating multiple attribute values of 'P' (10.6 + [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperty(arg, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true + }); + + Object.defineProperties(arg, { + "genericProperty": { + value: 1002, + enumerable: false, + configurable: false + } + }); + + return dataPropertyAttributesAreCorrect(arg, "genericProperty", 1002, true, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-306.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-306.js index 115b025c77..44ce844fe0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-306.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-306.js @@ -1,36 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-306.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperty(arg, "genericProperty", { - value: 1001, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - value: 1002 - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - dataPropertyAttributesAreCorrect(arg, "genericProperty", 1001, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-306 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own data property of 'O', test TypeError is thrown when + updating the [[Value]] attribute value of 'P' which is not + writable and not configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperty(arg, "genericProperty", { + value: 1001, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + value: 1002 + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + dataPropertyAttributesAreCorrect(arg, "genericProperty", 1001, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-307.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-307.js index 2d57b0ea6e..106bb6c803 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-307.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-307.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-307.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperty(arg, "genericProperty", { - writable: false, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - writable: true - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - dataPropertyAttributesAreCorrect(arg, "genericProperty", undefined, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-307 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own data property of 'O', test TypeError is thrown when + updating the [[Writable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperty(arg, "genericProperty", { + writable: false, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + writable: true + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + dataPropertyAttributesAreCorrect(arg, "genericProperty", undefined, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-308.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-308.js index e6b8be4ef9..f25243da34 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-308.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-308.js @@ -1,35 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-308.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperty(arg, "genericProperty", { - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - enumerable: false - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - dataPropertyAttributesAreCorrect(arg, "genericProperty", undefined, false, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-308 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own data property of 'O', test TypeError is thrown when + updating the [[Enumerable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperty(arg, "genericProperty", { + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + enumerable: false + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + dataPropertyAttributesAreCorrect(arg, "genericProperty", undefined, false, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-309.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-309.js index 4d895e3e6c..acf8ce4311 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-309.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-309.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-309.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - Object.defineProperty(arg, "genericProperty", { - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - configurable: true - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - dataPropertyAttributesAreCorrect(arg, "genericProperty", undefined, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-309 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own data property of 'O', test TypeError is thrown when + updating the [[Configurable]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + Object.defineProperty(arg, "genericProperty", { + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + configurable: true + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + dataPropertyAttributesAreCorrect(arg, "genericProperty", undefined, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-31.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-31.js index 290ff2c2d4..4ae9958654 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-31.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-31.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-31.js - * @description Object.defineProperties - 'desc' is data descriptor, test setting all attribute values of 'P' (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { - prop: { - value: 1002, - writable: false, - enumerable: false, - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "prop", 1002, false, false, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-31 +description: > + Object.defineProperties - 'desc' is data descriptor, test setting + all attribute values of 'P' (8.12.9 step 4.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { + prop: { + value: 1002, + writable: false, + enumerable: false, + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "prop", 1002, false, false, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-310.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-310.js index 2baf6e41bf..f2dc102f59 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-310.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-310.js @@ -1,44 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-310.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - } (1, 2, 3)); - - function getFun() { - return "genericPropertyString"; - } - function setFun(value) { - arg.verifySetFun = value; - } - Object.defineProperty(arg, "genericProperty", { - get: getFun, - set: setFun, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - get: function () { - return "overideGenericPropertyString"; - } - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - accessorPropertyAttributesAreCorrect(arg, "genericProperty", getFun, setFun, "verifySetFun", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-310 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own accessor property of 'O', test TypeError is thrown + when updating the [[Get]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + } (1, 2, 3)); + + function getFun() { + return "genericPropertyString"; + } + function setFun(value) { + arg.verifySetFun = value; + } + Object.defineProperty(arg, "genericProperty", { + get: getFun, + set: setFun, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + get: function () { + return "overideGenericPropertyString"; + } + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + accessorPropertyAttributesAreCorrect(arg, "genericProperty", getFun, setFun, "verifySetFun", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-311.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-311.js index dd42871c22..ddbd7e60cd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-311.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-311.js @@ -1,40 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-311.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - function setFun(value) { - arg.genericPropertyString = value; - } - Object.defineProperty(arg, "genericProperty", { - set: setFun, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - set: function (value) { - arg.genericPropertyString1 = value; - } - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - accessorPropertyAttributesAreCorrect(arg, "genericProperty", undefined, setFun, "genericPropertyString", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-311 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own accessor property of 'O', test TypeError is thrown + when updating the [[Set]] attribute value of 'P' which is not + configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + function setFun(value) { + arg.genericPropertyString = value; + } + Object.defineProperty(arg, "genericProperty", { + set: setFun, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + set: function (value) { + arg.genericPropertyString1 = value; + } + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + accessorPropertyAttributesAreCorrect(arg, "genericProperty", undefined, setFun, "genericPropertyString", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-312.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-312.js index 9a065ffaa4..3717eb0c3b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-312.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-312.js @@ -1,39 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-312.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - function setFun(value) { - arg.genericPropertyString = value; - } - Object.defineProperty(arg, "genericProperty", { - set: setFun, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - enumerable: false - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - accessorPropertyAttributesAreCorrect(arg, "genericProperty", undefined, setFun, "genericPropertyString", true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-312 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own accessor property of 'O', test TypeError is thrown + when updating the [[Enumerable]] attribute value of 'P' which is + not configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + function setFun(value) { + arg.genericPropertyString = value; + } + Object.defineProperty(arg, "genericProperty", { + set: setFun, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + enumerable: false + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + accessorPropertyAttributesAreCorrect(arg, "genericProperty", undefined, setFun, "genericPropertyString", true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-313.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-313.js index 42c70420bf..28f1e14408 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-313.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-313.js @@ -1,38 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-313.js - * @description Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - - function setFun(value) { - arg.genericPropertyString = value; - } - Object.defineProperty(arg, "genericProperty", { - set: setFun, - configurable: false - }); - - try { - Object.defineProperties(arg, { - "genericProperty": { - configurable: true - } - }); - - return false; - } catch (ex) { - return ex instanceof TypeError && - accessorPropertyAttributesAreCorrect(arg, "genericProperty", undefined, setFun, "genericPropertyString", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-313 +description: > + Object.defineProperties - 'O' is an Arguments object, 'P' is + generic own accessor property of 'O', test TypeError is thrown + when updating the [[Configurable]] attribute value of 'P' which is + not configurable (10.6 [[DefineOwnProperty]] step 4) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + + function setFun(value) { + arg.genericPropertyString = value; + } + Object.defineProperty(arg, "genericProperty", { + set: setFun, + configurable: false + }); + + try { + Object.defineProperties(arg, { + "genericProperty": { + configurable: true + } + }); + + return false; + } catch (ex) { + return ex instanceof TypeError && + accessorPropertyAttributesAreCorrect(arg, "genericProperty", undefined, setFun, "genericPropertyString", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-314.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-314.js index 2f7db9bf5a..ec1a271c70 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-314.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-314.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-314.js - * @description Object.defineProperties - 'O' is an Arguments object, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i) - */ - - -function testcase() { - var arg = (function () { - return arguments; - }(1, 2, 3)); - var accessed = false; - - Object.defineProperties(arg, { - "0": { - get: function () { - accessed = true; - return 12; - } - } - }); - - return arg[0] === 12 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-314 +description: > + Object.defineProperties - 'O' is an Arguments object, 'name' is + own property of [[ParameterMap]] of 'O', test 'name' is deleted if + 'name' is configurable and 'desc' is accessor descriptor (10.6 + [[DefineOwnProperty]] step 5.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arg = (function () { + return arguments; + }(1, 2, 3)); + var accessed = false; + + Object.defineProperties(arg, { + "0": { + get: function () { + accessed = true; + return 12; + } + } + }); + + return arg[0] === 12 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-32.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-32.js index 0ee54fbf48..edb2aea633 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-32.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-32.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-32.js - * @description Object.defineProperties - 'desc' is generic descriptor without any attribute, test 'P' is defined in 'obj' with all default attribute values (8.12.9 step 4.a.i) - */ - - -function testcase() { - var obj = {}; - - Object.defineProperties(obj, { prop: {} }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - - return desc.hasOwnProperty("value") && typeof desc.value === "undefined" && - desc.hasOwnProperty("writable") && desc.writable === false && - desc.hasOwnProperty("configurable") && desc.configurable === false && - desc.hasOwnProperty("enumerable") && desc.enumerable === false && - !desc.hasOwnProperty("get") && !desc.hasOwnProperty("set"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-32 +description: > + Object.defineProperties - 'desc' is generic descriptor without any + attribute, test 'P' is defined in 'obj' with all default attribute + values (8.12.9 step 4.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperties(obj, { prop: {} }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + + return desc.hasOwnProperty("value") && typeof desc.value === "undefined" && + desc.hasOwnProperty("writable") && desc.writable === false && + desc.hasOwnProperty("configurable") && desc.configurable === false && + desc.hasOwnProperty("enumerable") && desc.enumerable === false && + !desc.hasOwnProperty("get") && !desc.hasOwnProperty("set"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-33.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-33.js index 5aae1e7d7e..0c254b1ca4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-33.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-33.js @@ -1,28 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-33.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Get]] of 'P' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b) - */ - - -function testcase() { - var obj = {}; - var setFun = function (value) { - obj.setVerifyHelpProp = value; - }; - - Object.defineProperties(obj, { - prop: { - set: setFun, - enumerable: true, - configurable: true - } - }); - return accessorPropertyAttributesAreCorrect(obj, "prop", undefined, setFun, "setVerifyHelpProp", true, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-33 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test [[Get]] + of 'P' is set as undefined value if absent in accessor descriptor + 'desc' (8.12.9 step 4.b) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var setFun = function (value) { + obj.setVerifyHelpProp = value; + }; + + Object.defineProperties(obj, { + prop: { + set: setFun, + enumerable: true, + configurable: true + } + }); + return accessorPropertyAttributesAreCorrect(obj, "prop", undefined, setFun, "setVerifyHelpProp", true, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-34.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-34.js index 46dfbcf8ba..23d555cbe0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-34.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-34.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-34.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Set]] of 'P' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - var getFunc = function () { - return 10; - }; - - Object.defineProperties(obj, { - prop: { - get: getFunc, - enumerable: true, - configurable: true - } - }); - - var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined"; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-34 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test [[Set]] + of 'P' is set as undefined value if absent in accessor descriptor + 'desc' (8.12.9 step 4.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + var getFunc = function () { + return 10; + }; + + Object.defineProperties(obj, { + prop: { + get: getFunc, + enumerable: true, + configurable: true + } + }); + + var desc = Object.getOwnPropertyDescriptor(obj, "prop"); + return obj.hasOwnProperty("prop") && typeof (desc.set) === "undefined"; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-35.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-35.js index c30043f155..bbacd3f260 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-35.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-35.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-35.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Enumerable]] of 'P' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - var getFun = function () { - return 10; - }; - var setFun = function (value) { - obj.setVerifyHelpProp = value; - }; - - Object.defineProperties(obj, { - prop: { - set: setFun, - get: getFun, - configurable: true - } - }); - return accessorPropertyAttributesAreCorrect(obj, "prop", getFun, setFun, "setVerifyHelpProp", false, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-35 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test + [[Enumerable]] of 'P' is set as false value if absent in accessor + descriptor 'desc' (8.12.9 step 4.b.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var getFun = function () { + return 10; + }; + var setFun = function (value) { + obj.setVerifyHelpProp = value; + }; + + Object.defineProperties(obj, { + prop: { + set: setFun, + get: getFun, + configurable: true + } + }); + return accessorPropertyAttributesAreCorrect(obj, "prop", getFun, setFun, "setVerifyHelpProp", false, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-36.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-36.js index c8ed96a4c4..f8c1d276bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-36.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-36.js @@ -1,31 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-36.js - * @description Object.defineProperties - 'P' doesn't exist in 'O', test [[Configurable]] of 'P' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - var getFun = function () { - return 10; - }; - var setFun = function (value) { - obj.setVerifyHelpProp = value; - }; - - Object.defineProperties(obj, { - prop: { - set: setFun, - get: getFun, - enumerable: true - } - }); - return accessorPropertyAttributesAreCorrect(obj, "prop", getFun, setFun, "setVerifyHelpProp", true, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-36 +description: > + Object.defineProperties - 'P' doesn't exist in 'O', test + [[Configurable]] of 'P' is set as false value if absent in + accessor descriptor 'desc' (8.12.9 step 4.b.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var getFun = function () { + return 10; + }; + var setFun = function (value) { + obj.setVerifyHelpProp = value; + }; + + Object.defineProperties(obj, { + prop: { + set: setFun, + get: getFun, + enumerable: true + } + }); + return accessorPropertyAttributesAreCorrect(obj, "prop", getFun, setFun, "setVerifyHelpProp", true, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-37.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-37.js index a38a90b2d7..fd0bca98c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-37.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-37.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-37.js - * @description Object.defineProperties - 'desc' is accessor descriptor, test setting all attribute values of 'P' (8.12.9 step 4.b.i) - */ - - -function testcase() { - var obj = {}; - var getFun = function () { - return 10; - }; - var setFun = function (value) { - obj.setVerifyHelpProp = value; - }; - - Object.defineProperties(obj, { - prop: { - get: getFun, - set: setFun, - enumerable: false, - configurable: false - } - }); - return accessorPropertyAttributesAreCorrect(obj, "prop", getFun, setFun, "setVerifyHelpProp", false, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-37 +description: > + Object.defineProperties - 'desc' is accessor descriptor, test + setting all attribute values of 'P' (8.12.9 step 4.b.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var getFun = function () { + return 10; + }; + var setFun = function (value) { + obj.setVerifyHelpProp = value; + }; + + Object.defineProperties(obj, { + prop: { + get: getFun, + set: setFun, + enumerable: false, + configurable: false + } + }); + return accessorPropertyAttributesAreCorrect(obj, "prop", getFun, setFun, "setVerifyHelpProp", false, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38-1.js index 1ca03a3d6d..368a1f12d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38-1.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38-1.js - * @description Object.defineProperties - 'P' exists in 'O' is an accessor property, test 'P' makes no change if 'desc' is generic descriptor without any attribute (8.12.9 step 5) - */ - - -function testcase() { - - var obj = {}; - var getFunc = function () { - return 12; - }; - Object.defineProperties(obj, { - foo: { - get: getFunc, - enumerable: true, - configurable: true - } - }); - - Object.defineProperties(obj, { foo: {} }); - - return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, undefined, undefined, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-38-1 +description: > + Object.defineProperties - 'P' exists in 'O' is an accessor + property, test 'P' makes no change if 'desc' is generic descriptor + without any attribute (8.12.9 step 5) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + var getFunc = function () { + return 12; + }; + Object.defineProperties(obj, { + foo: { + get: getFunc, + enumerable: true, + configurable: true + } + }); + + Object.defineProperties(obj, { foo: {} }); + + return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, undefined, undefined, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38.js index 0d5944fc72..20dd526511 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38.js @@ -1,20 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38.js - * @description Object.defineProperties - 'P' exists in 'O', test 'P' makes no change if 'desc' is generic descriptor without any attribute (8.12.9 step 5) - */ - - -function testcase() { - - var obj = {}; - obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { foo: {} }); - return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-38 +description: > + Object.defineProperties - 'P' exists in 'O', test 'P' makes no + change if 'desc' is generic descriptor without any attribute + (8.12.9 step 5) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { foo: {} }); + return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-39.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-39.js index 65cf71f8d6..4849a6cf96 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-39.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-39.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-39.js - * @description Object.defineProperties - 'P' is data descriptor and every fields in 'desc' is the same with 'P' (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { - foo: { - value: 101, - enumerable: true, - writable: true, - configurable: true - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 101, true, true, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-39 +description: > + Object.defineProperties - 'P' is data descriptor and every fields + in 'desc' is the same with 'P' (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { + foo: { + value: 101, + enumerable: true, + writable: true, + configurable: true + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 101, true, true, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-4.js index d8a81d3d6a..744774231a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-4.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-4.js - * @description Object.defineProperties - 'P' is own data property that overrides an inherited accessor property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { - return 11; - }, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - value: 12, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 13, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-4 +description: > + Object.defineProperties - 'P' is own data property that overrides + an inherited accessor property (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { + return 11; + }, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + value: 12, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 13, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-40.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-40.js index ce24e83194..c823e8a653 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-40.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-40.js @@ -1,42 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-40.js - * @description Object.defineProperties - 'P' is accessor descriptor and every fields in 'desc' is the same with 'P' (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 0; - } - function set_func(value) { - obj.setVerifyHelpProp = value; - } - var desc = { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }; - - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-40 +description: > + Object.defineProperties - 'P' is accessor descriptor and every + fields in 'desc' is the same with 'P' (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 0; + } + function set_func(value) { + obj.setVerifyHelpProp = value; + } + var desc = { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }; + + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", true, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-41.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-41.js index 5bf0496cb6..2e16082d42 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-41.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-41.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-41.js - * @description Object.defineProperties - type of desc.value is different from type of P.value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { - foo: { - value: "102" - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", "102", true, true, true); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-41 +description: > + Object.defineProperties - type of desc.value is different from + type of P.value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { + foo: { + value: "102" + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", "102", true, true, true); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-42.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-42.js index d1904a45f6..4d1958eae1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-42.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-42.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-42.js - * @description Object.defineProperties - both desc.value and P.value are undefined (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: undefined }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: undefined - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-42 +description: > + Object.defineProperties - both desc.value and P.value are + undefined (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: undefined }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: undefined + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-43.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-43.js index 1b7306cb65..640630cce8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-43.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-43.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-43.js - * @description Object.defineProperties - both desc.value and P.value are null (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: null }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: null - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-43 +description: > + Object.defineProperties - both desc.value and P.value are null + (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: null }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: null + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-44.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-44.js index c5ef3f62e8..b573b3b85b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-44.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-44.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-44.js - * @description Object.defineProperties - both desc.value and P.value are NaN (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: NaN }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: NaN - } - }); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var verifyValue = false; - obj.prop = "overrideData"; - verifyValue = obj.foo !== obj.foo && isNaN(obj.foo); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return verifyConfigurable && !verifyEnumerable && verifyValue; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-44 +description: > + Object.defineProperties - both desc.value and P.value are NaN + (8.12.9 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: NaN }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: NaN + } + }); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var verifyValue = false; + obj.prop = "overrideData"; + verifyValue = obj.foo !== obj.foo && isNaN(obj.foo); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return verifyConfigurable && !verifyEnumerable && verifyValue; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-45.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-45.js index 742f80ec94..a993f783e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-45.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-45.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-45.js - * @description Object.defineProperties - desc.value is +0 and P.value is -0 (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: -0 }; - Object.defineProperty(obj, "foo", desc); - - try { - Object.defineProperties(obj, { - foo: { - value: +0 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-45 +description: > + Object.defineProperties - desc.value is +0 and P.value is -0 + (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: -0 }; + Object.defineProperty(obj, "foo", desc); + + try { + Object.defineProperties(obj, { + foo: { + value: +0 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-46.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-46.js index df89dbaf64..701be15e42 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-46.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-46.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-46.js - * @description Object.defineProperties - desc.value is -0 and P.value is +0 (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: +0 }; - Object.defineProperty(obj, "foo", desc); - - try { - Object.defineProperties(obj, { - foo: { - value: -0 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-46 +description: > + Object.defineProperties - desc.value is -0 and P.value is +0 + (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: +0 }; + Object.defineProperty(obj, "foo", desc); + + try { + Object.defineProperties(obj, { + foo: { + value: -0 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-47.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-47.js index 17de500695..a67240e609 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-47.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-47.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-47.js - * @description Object.defineProperties - desc.value and P.value are two numbers with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: 101 }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: 101 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 101, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-47 +description: > + Object.defineProperties - desc.value and P.value are two numbers + with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: 101 }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: 101 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 101, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-48.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-48.js index 19bbebe315..5c00c5a11a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-48.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-48.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-48.js - * @description Object.defineProperties - desc.value and P.value are two numbers with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { - foo: { - value: 102 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 102, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-48 +description: > + Object.defineProperties - desc.value and P.value are two numbers + with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { + foo: { + value: 102 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 102, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-49.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-49.js index fac7976315..e40d0f9ceb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-49.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-49.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-49.js - * @description Object.defineProperties - both desc.value and P.value are two strings which have same length and same characters in corresponding positions (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: "abcd" }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: "abcd" - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-49 +description: > + Object.defineProperties - both desc.value and P.value are two + strings which have same length and same characters in + corresponding positions (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: "abcd" }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: "abcd" + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-5.js index b452622100..74783d0104 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-5.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-5.js - * @description Object.defineProperties - 'P' is own accessor property (8.12.9 step 1 ) - */ - - -function testcase() { - var obj = {}; - function getFunc() { - return 11; - } - - Object.defineProperty(obj, "prop", { - get: getFunc, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 12, - configurable: true - } - }); - return false; - } catch (e) { - return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, undefined, undefined, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-5 +description: > + Object.defineProperties - 'P' is own accessor property (8.12.9 + step 1 ) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + function getFunc() { + return 11; + } + + Object.defineProperty(obj, "prop", { + get: getFunc, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 12, + configurable: true + } + }); + return false; + } catch (e) { + return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, undefined, undefined, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-50.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-50.js index 28ada07244..72ca8054d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-50.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-50.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-50.js - * @description Object.defineProperties - desc.value and P.value are two strings with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = "abcd"; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { - foo: { - value: "fghj" - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", "fghj", true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-50 +description: > + Object.defineProperties - desc.value and P.value are two strings + with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = "abcd"; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { + foo: { + value: "fghj" + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", "fghj", true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-51.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-51.js index 6c185544e3..173acbb8b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-51.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-51.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-51.js - * @description Object.defineProperties - both desc.value and P.value are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { value: true }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: true - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", true, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-51 +description: > + Object.defineProperties - both desc.value and P.value are boolean + values with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { value: true }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: true + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", true, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-52.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-52.js index 8e7c342ee0..968030f312 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-52.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-52.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-52.js - * @description Object.defineProperties - desc.value and P.value are two boolean values with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { - foo: { - value: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", false, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-52 +description: > + Object.defineProperties - desc.value and P.value are two boolean + values with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { + foo: { + value: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", false, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-53.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-53.js index 3bccc3c440..2396efc195 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-53.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-53.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-53.js - * @description Object.defineProperties - both desc.value and P.value are Ojbects which refer to the same Object (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - var desc = { value: obj1 }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - value: obj1 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-53 +description: > + Object.defineProperties - both desc.value and P.value are Ojbects + which refer to the same Object (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + var desc = { value: obj1 }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + value: obj1 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-54.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-54.js index 90f33a1e17..d5aa5a11df 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-54.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-54.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-54.js - * @description Object.defineProperties - desc.value and P.value are two Ojbects which refer to the different objects (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true - - var obj2 = { length: 20 }; - - Object.defineProperties(obj, { - foo: { - value: obj2 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj2, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-54 +description: > + Object.defineProperties - desc.value and P.value are two Ojbects + which refer to the different objects (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true + + var obj2 = { length: 20 }; + + Object.defineProperties(obj, { + foo: { + value: obj2 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj2, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-55.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-55.js index cff3b58aac..253e7c7b13 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-55.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-55.js @@ -1,26 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-55.js - * @description Object.defineProperties - both desc.writable and P.writable are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { writable: false }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - writable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-55 +description: > + Object.defineProperties - both desc.writable and P.writable are + boolean values with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { writable: false }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + writable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-56.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-56.js index ba575662d5..bc9b5be007 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-56.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-56.js @@ -1,27 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-56.js - * @description Object.defineProperties - desc.writable and P.writable are two boolean values with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - var desc = { writable: false, configurable: true }; - Object.defineProperty(obj, "foo", desc); - - Object.defineProperties(obj, { - foo: { - writable: true, - configurable: true - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-56 +description: > + Object.defineProperties - desc.writable and P.writable are two + boolean values with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var desc = { writable: false, configurable: true }; + Object.defineProperty(obj, "foo", desc); + + Object.defineProperties(obj, { + foo: { + writable: true, + configurable: true + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-57.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-57.js index 52cc7a201c..1fe32cd97b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-57.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-57.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-57.js - * @description Object.defineProperties - both desc.[[Get]] and P.[[Get]] are two objects which refer to the same object (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function get_Func() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_Func - }); - - Object.defineProperties(obj, { - foo: { - get: get_Func - } - }); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var verifyValue = false; - verifyValue = (obj.foo === 10); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - return verifyConfigurable && !verifyEnumerable && verifyValue && typeof (desc.set) === "undefined" && desc.get === get_Func; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-57 +description: > + Object.defineProperties - both desc.[[Get]] and P.[[Get]] are two + objects which refer to the same object (8.12.9 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_Func() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_Func + }); + + Object.defineProperties(obj, { + foo: { + get: get_Func + } + }); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var verifyValue = false; + verifyValue = (obj.foo === 10); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + return verifyConfigurable && !verifyEnumerable && verifyValue && typeof (desc.set) === "undefined" && desc.get === get_Func; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-58.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-58.js index dbac01d95d..dc8532994b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-58.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-58.js @@ -1,53 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-58.js - * @description Object.defineProperties - desc.[[Get]] and P.[[Get]] are two objects which refer to the different objects (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function get_Func1() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_Func1, - configurable: true - }); - - function get_Func2() { - return 20; - } - - Object.defineProperties(obj, { - foo: { - get: get_Func2 - } - }); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var verifyValue = false; - verifyValue = (obj.foo === 20); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return !verifyConfigurable && !verifyEnumerable && verifyValue && typeof (desc.set) === "undefined" && desc.get === get_Func2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-58 +description: > + Object.defineProperties - desc.[[Get]] and P.[[Get]] are two + objects which refer to the different objects (8.12.9 step 6) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_Func1() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_Func1, + configurable: true + }); + + function get_Func2() { + return 20; + } + + Object.defineProperties(obj, { + foo: { + get: get_Func2 + } + }); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var verifyValue = false; + verifyValue = (obj.foo === 20); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return !verifyConfigurable && !verifyEnumerable && verifyValue && typeof (desc.set) === "undefined" && desc.get === get_Func2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-59.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-59.js index d4194e36c8..3e68bf7875 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-59.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-59.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-59.js - * @description Object.defineProperties - both desc.[[Set]] and P.[[Set]] are two objects which refer to the same object (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: set_func - }); - - Object.defineProperties(obj, { - foo: { - set: set_func - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-59 +description: > + Object.defineProperties - both desc.[[Set]] and P.[[Set]] are two + objects which refer to the same object (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: set_func + }); + + Object.defineProperties(obj, { + foo: { + set: set_func + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-6.js index e62ce17832..3f9916564a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-6.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-6.js - * @description Object.defineProperties - 'P' is inherited accessor property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function () { - return 11; - }, - configurable: false - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - - Object.defineProperties(obj, { - prop: { - get: function () { - return 12; - }, - configurable: true - } - }); - return obj.hasOwnProperty("prop") && obj.prop === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-6 +description: > + Object.defineProperties - 'P' is inherited accessor property + (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function () { + return 11; + }, + configurable: false + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + + Object.defineProperties(obj, { + prop: { + get: function () { + return 12; + }, + configurable: true + } + }); + return obj.hasOwnProperty("prop") && obj.prop === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-60.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-60.js index 5551fecf6e..b190d23497 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-60.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-60.js @@ -1,34 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-60.js - * @description Object.defineProperties - desc.[[Set]] and P.[[Set]] are two objects which refer to the different objects (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - function set_func1() {} - - Object.defineProperty(obj, "foo", { - set: set_func1, - configurable: true - }); - - function set_func2(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperties(obj, { - foo: { - set: set_func2 - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func2, "setVerifyHelpProp", false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-60 +description: > + Object.defineProperties - desc.[[Set]] and P.[[Set]] are two + objects which refer to the different objects (8.12.9 step 6) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func1() {} + + Object.defineProperty(obj, "foo", { + set: set_func1, + configurable: true + }); + + function set_func2(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperties(obj, { + foo: { + set: set_func2 + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func2, "setVerifyHelpProp", false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-61.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-61.js index 7da46e2bff..7628964a8f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-61.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-61.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-61.js - * @description Object.defineProperties - both desc.enumerable and P.enumerable are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - enumerable: false - }); - - Object.defineProperties(obj, { - foo: { - enumerable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-61 +description: > + Object.defineProperties - both desc.enumerable and P.enumerable + are boolean values with the same value (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + enumerable: false + }); + + Object.defineProperties(obj, { + foo: { + enumerable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-62.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-62.js index 22630d09ed..7caea92ed3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-62.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-62.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-62.js - * @description Object.defineProperties - desc.enumerable and P.enumerable are two boolean values with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - enumerable: false, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - enumerable: true - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-62 +description: > + Object.defineProperties - desc.enumerable and P.enumerable are two + boolean values with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + enumerable: false, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + enumerable: true + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-63.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-63.js index 4067832a51..3da10b24b4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-63.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-63.js @@ -1,28 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-63.js - * @description Object.defineProperties - both desc.configurable and P.configurable are boolean values with the same value (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-63 +description: > + Object.defineProperties - both desc.configurable and + P.configurable are boolean values with the same value (8.12.9 step + 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-64.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-64.js index 2f71ac08f8..7ca8d05820 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-64.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-64.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-64.js - * @description Object.defineProperties - desc.configurable and P.configurable are two boolean values with different values (8.12.9 step 6) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-64 +description: > + Object.defineProperties - desc.configurable and P.configurable are + two boolean values with different values (8.12.9 step 6) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-65.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-65.js index df6bdaf5e0..1b85ed9e19 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-65.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-65.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-65.js - * @description Object.defineProperties throws TypeError when P.configurable is false and desc.configurable is true (8.12.9 step 7.a) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-65 +description: > + Object.defineProperties throws TypeError when P.configurable is + false and desc.configurable is true (8.12.9 step 7.a) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66-1.js index 264432d225..7e28fd8d0c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66-1.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66-1.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.enumerable and desc.enumerable has different values (8.12.9 step 7.b) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - enumerable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - enumerable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-66-1 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.enumerable and desc.enumerable has different values + (8.12.9 step 7.b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + enumerable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + enumerable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66.js index 90e60d9d19..c2e204fdbb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.enumerable and desc.enumerable has different values (8.12.9 step 7.b) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - enumerable: true, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - enumerable: false - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-66 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.enumerable and desc.enumerable has different values + (8.12.9 step 7.b) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + enumerable: true, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + enumerable: false + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-67.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-67.js index f3ef192d9d..d800cad55f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-67.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-67.js @@ -1,53 +1,57 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-67.js - * @description Object.defineProperties throws TypeError when P is accessor property and P.configurable is false, desc is data property (8.12.9 step 9.a) - */ - - -function testcase() { - - var obj = {}; - - function get_Func() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_Func, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: 11 - } - }); - return false; - } catch (e) { - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var verifyValue = false; - verifyValue = (obj.foo === 10); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return e instanceof TypeError && verifyConfigurable && !verifyEnumerable && - verifyValue && typeof (desc.set) === "undefined" && desc.get === get_Func; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-67 +description: > + Object.defineProperties throws TypeError when P is accessor + property and P.configurable is false, desc is data property + (8.12.9 step 9.a) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_Func() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_Func, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: 11 + } + }); + return false; + } catch (e) { + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var verifyValue = false; + verifyValue = (obj.foo === 10); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return e instanceof TypeError && verifyConfigurable && !verifyEnumerable && + verifyValue && typeof (desc.set) === "undefined" && desc.get === get_Func; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-68.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-68.js index 29c8ef604e..21417771be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-68.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-68.js @@ -1,36 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-68.js - * @description Object.defineProperties throws TypeError when P is data property and P.configurable is false, desc is accessor property (8.12.9 step 9.a) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - configurable: false - }); - - function get_func() { - return 11; - } - - try { - Object.defineProperties(obj, { - foo: { - get: get_func - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-68 +description: > + Object.defineProperties throws TypeError when P is data property + and P.configurable is false, desc is accessor property (8.12.9 + step 9.a) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + configurable: false + }); + + function get_func() { + return 11; + } + + try { + Object.defineProperties(obj, { + foo: { + get: get_func + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-69.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-69.js index 7cc4380ad7..9e89d7547f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-69.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-69.js @@ -1,50 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-69.js - * @description Object.defineProperties - 'P' is data property and P.configurable is true, desc is accessor property (8.12.9 step 9.b.i) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - configurable: true - }); - - function get_Func() { - return 20; - } - - Object.defineProperties(obj, { - foo: { - get: get_Func - } - }); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var verifyValue = false; - verifyValue = (obj.foo === 20); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var verifyConfigurable = true; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return !verifyConfigurable && !verifyEnumerable && verifyValue && - typeof desc.set === "undefined" && desc.get === get_Func; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-69 +description: > + Object.defineProperties - 'P' is data property and P.configurable + is true, desc is accessor property (8.12.9 step 9.b.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + configurable: true + }); + + function get_Func() { + return 20; + } + + Object.defineProperties(obj, { + foo: { + get: get_Func + } + }); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var verifyValue = false; + verifyValue = (obj.foo === 20); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var verifyConfigurable = true; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return !verifyConfigurable && !verifyEnumerable && verifyValue && + typeof desc.set === "undefined" && desc.get === get_Func; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-7.js index ff379e968f..e9654946fb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-7.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-7.js - * @description Object.defineProperties - 'P' is own accessor property that overrides an inherited data property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - value: 11, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - get: function () { - return 12; - }, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 13, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && obj.prop === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-7 +description: > + Object.defineProperties - 'P' is own accessor property that + overrides an inherited data property (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + value: 11, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { + return 12; + }, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 13, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && obj.prop === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-70.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-70.js index e7b77b9283..332480ccd7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-70.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-70.js @@ -1,32 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-70.js - * @description Object.defineProperties - 'P' is accessor property and P.configurable is true, 'desc' in 'Properties' is data property (8.12.9 step 9.c.i) - */ - - -function testcase() { - - var obj = {}; - - function get_func() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - value: 12 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 12, false, false, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-70 +description: > + Object.defineProperties - 'P' is accessor property and + P.configurable is true, 'desc' in 'Properties' is data property + (8.12.9 step 9.c.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function get_func() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + value: 12 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 12, false, false, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-71.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-71.js index 11de43285f..720bfcfbc4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-71.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-71.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-71.js - * @description Object.defineProperties throws TypeError when 'P' is data property and P.configurable is false, P.writable is false, desc is data property and desc.writable is true (8.12.9 step 10.a.i) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - writable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-71 +description: > + Object.defineProperties throws TypeError when 'P' is data property + and P.configurable is false, P.writable is false, desc is data + property and desc.writable is true (8.12.9 step 10.a.i) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + writable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-72.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-72.js index 6d56f3a843..8932e5856b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-72.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-72.js @@ -1,33 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-72.js - * @description Object.defineProperties throws TypeError when P is data property and P.configurable is false, P.writable is false, desc is data property and desc.value is not equal to P.value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: 20 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-72 +description: > + Object.defineProperties throws TypeError when P is data property + and P.configurable is false, P.writable is false, desc is data + property and desc.value is not equal to P.value (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: 20 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-73.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-73.js index 8cb92538be..3e094e30b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-73.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-73.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-73.js - * @description Object.defineProperties will not throw TypeError if P.configurable is false, P.writalbe is false, P.value is undefined and properties.value is undefined (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: undefined, - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: undefined - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-73 +description: > + Object.defineProperties will not throw TypeError if P.configurable + is false, P.writalbe is false, P.value is undefined and + properties.value is undefined (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: undefined, + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: undefined + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-74.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-74.js index 79838f499e..2c304da322 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-74.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-74.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-74.js - * @description Object.defineProperties will not throw TypeError if P.configurable is false, P.writalbe is false, P.value is null and properties.value is null (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: null, - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: null - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-74 +description: > + Object.defineProperties will not throw TypeError if P.configurable + is false, P.writalbe is false, P.value is null and + properties.value is null (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: null, + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: null + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-75.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-75.js index 9125bd953d..305a4fc34a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-75.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-75.js @@ -1,48 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-75.js - * @description Object.defineProperties will not throw TypeError if P.configurable is false, P.writalbe is false, P.value is NaN and properties.value is NaN (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - var accessed = false; - - Object.defineProperty(obj, "foo", { - value: NaN, - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: NaN - } - }); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - obj.prop = "overrideData"; - var verifyValue = false; - verifyValue = obj.foo !== obj.foo && isNaN(obj.foo); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return verifyValue && !verifyEnumerable && verifyConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-75 +description: > + Object.defineProperties will not throw TypeError if P.configurable + is false, P.writalbe is false, P.value is NaN and properties.value + is NaN (8.12.9 step 10.a.ii.1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var accessed = false; + + Object.defineProperty(obj, "foo", { + value: NaN, + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: NaN + } + }); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + obj.prop = "overrideData"; + var verifyValue = false; + verifyValue = obj.foo !== obj.foo && isNaN(obj.foo); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return verifyValue && !verifyEnumerable && verifyConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-76.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-76.js index 19a8311fbf..554f369a2e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-76.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-76.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-76.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value is +0 and P.value is -0 (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: -0, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: +0 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-76 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.writalbe is false, properties.value is +0 and P.value is + -0 (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: -0, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: +0 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-77.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-77.js index 82b203e86f..34fe3b6c55 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-77.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-77.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-77.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value is +0 and P.value is -0 (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: +0, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: -0 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-77 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.writalbe is false, properties.value is +0 and P.value is + -0 (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: +0, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: -0 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-78.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-78.js index 565be90a47..cdf8636caa 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-78.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-78.js @@ -1,30 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-78.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two numbers with the same value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 100, - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: 100 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 100, false, false, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-78 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.writalbe is false, properties.value and + P.value are two numbers with the same value (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 100, + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: 100 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 100, false, false, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-79.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-79.js index ed4ceadfeb..b4b9b841ac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-79.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-79.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-79.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two numbers with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: 20 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-79 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.writalbe is false, properties.value and P.value are two + numbers with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: 20 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-8.js index 900f06b39f..7215462703 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-8.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-8.js - * @description Object.defineProperties - 'P' is own accessor property that overrides an inherited accessor property (8.12.9 step 1 ) - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "prop", { - get: function() { - return 11; - }, - configurable: true - }); - var Con = function () { }; - Con.prototype = proto; - - var obj = new Con(); - Object.defineProperty(obj, "prop", { - get: function () { - return 12; - }, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - value: 13, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && obj.prop === 12; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-8 +description: > + Object.defineProperties - 'P' is own accessor property that + overrides an inherited accessor property (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "prop", { + get: function() { + return 11; + }, + configurable: true + }); + var Con = function () { }; + Con.prototype = proto; + + var obj = new Con(); + Object.defineProperty(obj, "prop", { + get: function () { + return 12; + }, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + value: 13, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && obj.prop === 12; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-80.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-80.js index 6ec41150d2..b74bf81ddb 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-80.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-80.js @@ -1,29 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-80.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two strings with the same value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: "abcd", - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: "abcd" - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-80 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.writalbe is false, properties.value and + P.value are two strings with the same value (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: "abcd", + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: "abcd" + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-81.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-81.js index 99dd20a73d..e0a225461e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-81.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-81.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-81.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two strings with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: "abcd", - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: "defg" - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-81 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.writalbe is false, properties.value and P.value are two + strings with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: "abcd", + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: "defg" + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-82.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-82.js index d994b8ef8f..8e8406a35f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-82.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-82.js @@ -1,29 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-82.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two booleans with the same value (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: false, - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-82 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.writalbe is false, properties.value and + P.value are two booleans with the same value (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: false, + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-83.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-83.js index a3541be1b5..5a0cf3c052 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-83.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-83.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-83.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two booleans with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: false, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - foo: { - value: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-83 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.writalbe is false, properties.value and P.value are two + booleans with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: false, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + foo: { + value: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84-1.js index 9de4f530b0..c77f237933 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84-1.js @@ -1,34 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84-1.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two Objects refer to the same object which has been updated before use it to update the object (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - - Object.defineProperty(obj, "foo", { - value: obj1, - writable: false, - configurable: false - }); - - var obj2 = obj1; - obj2.y = "hello"; - - Object.defineProperties(obj, { - foo: { - value: obj2 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-84-1 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.writalbe is false, properties.value and + P.value are two Objects refer to the same object which has been + updated before use it to update the object (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + + Object.defineProperty(obj, "foo", { + value: obj1, + writable: false, + configurable: false + }); + + var obj2 = obj1; + obj2.y = "hello"; + + Object.defineProperties(obj, { + foo: { + value: obj2 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84.js index 2e4ba8a12a..d5f9f878f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84.js @@ -1,31 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two Objects refer to the same object (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - - Object.defineProperty(obj, "foo", { - value: obj1, - writable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - value: obj1 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-84 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.writalbe is false, properties.value and + P.value are two Objects refer to the same object (8.12.9 step + 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + + Object.defineProperty(obj, "foo", { + value: obj1, + writable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + value: obj1 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-85.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-85.js index b217a18cf4..0e7b1f0e09 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-85.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-85.js @@ -1,37 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-85.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two objects with different values (8.12.9 step 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - var obj1 = { length: 10 }; - - Object.defineProperty(obj, "foo", { - value: obj1, - writable: false, - configurable: false - }); - - var obj2 = { length: 20 }; - - try { - Object.defineProperties(obj, { - foo: { - value: obj2 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-85 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.writalbe is false, properties.value and P.value are two + objects with different values (8.12.9 step 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var obj1 = { length: 10 }; + + Object.defineProperty(obj, "foo", { + value: obj1, + writable: false, + configurable: false + }); + + var obj2 = { length: 20 }; + + try { + Object.defineProperties(obj, { + foo: { + value: obj2 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86-1.js index 4db27601d2..0463add589 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86-1.js @@ -1,39 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86-1.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, both properties.[[Set]] and P.[[Set]] are two objects which refer to the same object and the object has been updated after defined(8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - var set_func = function (value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: set_func, - configurable: false - }); - - set_func = function (value) { - obj.setVerifyHelpProp1 = value; - } - - try { - Object.defineProperties(obj, { - foo: { - set: set_func - } - }); - } catch (e) { - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-86-1 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, both properties.[[Set]] and P.[[Set]] are + two objects which refer to the same object and the object has been + updated after defined(8.12.9 step 11.a.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + var set_func = function (value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: set_func, + configurable: false + }); + + set_func = function (value) { + obj.setVerifyHelpProp1 = value; + } + + try { + Object.defineProperties(obj, { + foo: { + set: set_func + } + }); + } catch (e) { + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86.js index 21371f11b2..786272d8e2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, both properties.[[Set]] and P.[[Set]] are two objects which refer to the same object (8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: set_func, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - set: set_func - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-86 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, both properties.[[Set]] and P.[[Set]] are + two objects which refer to the same object (8.12.9 step 11.a.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: set_func, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + set: set_func + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-87.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-87.js index 186b7924b1..d06e7f7444 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-87.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-87.js @@ -1,39 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-87.js - * @description Object.defineProperties throws TypeError when P.configurable is false, both properties.[[Set]] and P.[[Set]] are two objects which refer to different objects (8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - function set_func1(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - set: set_func1, - configurable: false - }); - - function set_func2() {} - - try { - Object.defineProperties(obj, { - foo: { - set: set_func2 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func1, "setVerifyHelpProp", false, false); - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-87 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, both properties.[[Set]] and P.[[Set]] are two objects which + refer to different objects (8.12.9 step 11.a.i) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func1(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + set: set_func1, + configurable: false + }); + + function set_func2() {} + + try { + Object.defineProperties(obj, { + foo: { + set: set_func2 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func1, "setVerifyHelpProp", false, false); + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-88.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-88.js index 45f793fb98..c2f741608b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-88.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-88.js @@ -1,53 +1,57 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-88.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.[[Set]] is undefined, properties.[[Set]] refers to an objcet (8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - function get_Func() { - return 0; - } - - Object.defineProperty(obj, "foo", { - set: undefined, - get: get_Func, - enumerable: false, - configurable: false - }); - - function set_Func() { } - - try { - Object.defineProperties(obj, { - foo: { - set: set_Func - } - }); - return false; - } catch (e) { - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return e instanceof TypeError && !verifyEnumerable && verifyConfigurable && typeof (desc.set) === "undefined"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-88 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.[[Set]] is undefined, properties.[[Set]] refers to an + objcet (8.12.9 step 11.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_Func() { + return 0; + } + + Object.defineProperty(obj, "foo", { + set: undefined, + get: get_Func, + enumerable: false, + configurable: false + }); + + function set_Func() { } + + try { + Object.defineProperties(obj, { + foo: { + set: set_Func + } + }); + return false; + } catch (e) { + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return e instanceof TypeError && !verifyEnumerable && verifyConfigurable && typeof (desc.set) === "undefined"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-89.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-89.js index 9e8cc4ddb9..208bbd3b0d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-89.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-89.js @@ -1,48 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-89.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.[[Set]] and properties.[[Set]] are undefined (8.12.9 step 11.a.i) - */ - - -function testcase() { - - var obj = {}; - - function get_Func() { - return 0; - } - - Object.defineProperty(obj, "foo", { - get: get_Func, - set: undefined, - enumerable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - set: undefined - } - }); - - var verifyEnumerable = false; - for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } - } - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var verifyConfigurable = false; - delete obj.foo; - verifyConfigurable = obj.hasOwnProperty("foo"); - - return verifyConfigurable && !verifyEnumerable && typeof (desc.set) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-89 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.[[Set]] and properties.[[Set]] are + undefined (8.12.9 step 11.a.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function get_Func() { + return 0; + } + + Object.defineProperty(obj, "foo", { + get: get_Func, + set: undefined, + enumerable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + set: undefined + } + }); + + var verifyEnumerable = false; + for (var p in obj) { + if (p === "foo") { + verifyEnumerable = true; + } + } + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var verifyConfigurable = false; + delete obj.foo; + verifyConfigurable = obj.hasOwnProperty("foo"); + + return verifyConfigurable && !verifyEnumerable && typeof (desc.set) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-9.js index 2c6ab892fb..a969a199b6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-9.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-9.js - * @description Object.defineProperties - 'P' is own accessor property without a get function (8.12.9 step 1 ) - */ - - -function testcase() { - var obj = {}; - Object.defineProperty(obj, "prop", { - set: function () { }, - configurable: false - }); - - try { - Object.defineProperties(obj, { - prop: { - get: function () { }, - configurable: true - } - }); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-9 +description: > + Object.defineProperties - 'P' is own accessor property without a + get function (8.12.9 step 1 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + Object.defineProperty(obj, "prop", { + set: function () { }, + configurable: false + }); + + try { + Object.defineProperties(obj, { + prop: { + get: function () { }, + configurable: true + } + }); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-90.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-90.js index d1ae73f9e0..c453b3347b 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-90.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-90.js @@ -1,37 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-90.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, both properties.[[Get]] and P.[[Get]] are two objects which refer to the same object (8.12.9 step 11.a.ii) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - function get_func() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - get: get_func - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-90 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, both properties.[[Get]] and P.[[Get]] are + two objects which refer to the same object (8.12.9 step 11.a.ii) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + function get_func() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + get: get_func + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-91.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-91.js index 067804e90d..0af65538ef 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-91.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-91.js @@ -1,46 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-91.js - * @description Object.defineProperties throws TypeError when P.configurable is false, both properties.[[Get]] and P.[[Get]] are two objects which refer to different objects (8.12.9 step 11.a.ii) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - function get_func1() { - return 10; - } - - Object.defineProperty(obj, "foo", { - get: get_func1, - set: set_func, - enumerable: false, - configurable: false - }); - - function get_func2() { - return 20; - } - - try { - Object.defineProperties(obj, { - foo: { - get: get_func2 - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, "foo", get_func1, set_func, "setVerifyHelpProp", false, false); - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-91 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, both properties.[[Get]] and P.[[Get]] are two objects which + refer to different objects (8.12.9 step 11.a.ii) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + function get_func1() { + return 10; + } + + Object.defineProperty(obj, "foo", { + get: get_func1, + set: set_func, + enumerable: false, + configurable: false + }); + + function get_func2() { + return 20; + } + + try { + Object.defineProperties(obj, { + foo: { + get: get_func2 + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, "foo", get_func1, set_func, "setVerifyHelpProp", false, false); + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-92.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-92.js index aeb83b1364..de8e0f3a4c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-92.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-92.js @@ -1,42 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-92.js - * @description Object.defineProperties throws TypeError when P.configurable is false, P.[[Get]] is undefined, properties.[[Get]] refers to an objcet (8.12.9 step 11.a.ii) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: undefined, - set: set_func, - enumerable: false, - configurable: false - }); - - function get_func() { - return 0; - } - - try { - Object.defineProperties(obj, { - foo: { - get: get_func - } - }); - return false; - } catch (e) { - return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-92 +description: > + Object.defineProperties throws TypeError when P.configurable is + false, P.[[Get]] is undefined, properties.[[Get]] refers to an + objcet (8.12.9 step 11.a.ii) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: undefined, + set: set_func, + enumerable: false, + configurable: false + }); + + function get_func() { + return 0; + } + + try { + Object.defineProperties(obj, { + foo: { + get: get_func + } + }); + return false; + } catch (e) { + return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-1.js index 2ed50278f6..0eb423ff4c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-1.js @@ -1,45 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-1.js - * @description Object.defineProperties will update [[Value]] attribute of named data property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false but not when both are false (8.12.9 - step Note & 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "property1", { - value: 1003, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - property: { - value: 1002 - }, - property1: { - value: 1004 - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true) && - dataPropertyAttributesAreCorrect(obj, "property1", 1003, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-93-1 +description: > + Object.defineProperties will update [[Value]] attribute of named + data property 'P' successfully when [[Configurable]] attribute is + true and [[Writable]] attribute is false but not when both are + false (8.12.9 - step Note & 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "property1", { + value: 1003, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + property: { + value: 1002 + }, + property1: { + value: 1004 + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true) && + dataPropertyAttributesAreCorrect(obj, "property1", 1003, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js index df041fb157..1c00fce1a5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js @@ -1,45 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js - * @description Object.defineProperties will update [[Value]] attribute of indexed data property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false but not when both are false (8.12.9 - step Note & 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: false, - configurable: true - }); - - Object.defineProperty(obj, "1", { - value: 1003, - writable: false, - configurable: false - }); - - try { - Object.defineProperties(obj, { - 0: { - value: 1002 - }, - 1: { - value: 1004 - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true) && - dataPropertyAttributesAreCorrect(obj, "1", 1003, false, false, false); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-93-2 +description: > + Object.defineProperties will update [[Value]] attribute of indexed + data property 'P' successfully when [[Configurable]] attribute is + true and [[Writable]] attribute is false but not when both are + false (8.12.9 - step Note & 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: false, + configurable: true + }); + + Object.defineProperty(obj, "1", { + value: 1003, + writable: false, + configurable: false + }); + + try { + Object.defineProperties(obj, { + 0: { + value: 1002 + }, + 1: { + value: 1004 + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true) && + dataPropertyAttributesAreCorrect(obj, "1", 1003, false, false, false); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-3.js index ee800e22bb..971bfc98ea 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-3.js @@ -1,45 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-3.js - * @description Object.defineProperties will fail to update [[Value]] attribute of named data property 'P' when [[Configurable]] attribute of first updating property is false (8.12.9 - step Note & 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "property", { - value: 1001, - writable: false, - configurable: false - }); - - Object.defineProperty(obj, "property1", { - value: 1003, - writable: false, - configurable: true - }); - - try { - Object.defineProperties(obj, { - property: { - value: 1002 - }, - property1: { - value: 1004 - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false) && - dataPropertyAttributesAreCorrect(obj, "property1", 1003, false, false, true); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-93-3 +description: > + Object.defineProperties will fail to update [[Value]] attribute of + named data property 'P' when [[Configurable]] attribute of first + updating property is false (8.12.9 - step Note & 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "property", { + value: 1001, + writable: false, + configurable: false + }); + + Object.defineProperty(obj, "property1", { + value: 1003, + writable: false, + configurable: true + }); + + try { + Object.defineProperties(obj, { + property: { + value: 1002 + }, + property1: { + value: 1004 + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false) && + dataPropertyAttributesAreCorrect(obj, "property1", 1003, false, false, true); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-4.js index 51d9aab69f..76b7ff71ba 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-4.js @@ -1,45 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-4.js - * @description Object.defineProperties will fail to update [[Value]] attribute of indexed data property 'P' when [[Configurable]] attribute of first updating property are false (8.12.9 - step Note & 10.a.ii.1) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "0", { - value: 1001, - writable: false, - configurable: false - }); - - Object.defineProperty(obj, "1", { - value: 1003, - writable: false, - configurable: true - }); - - try { - Object.defineProperties(obj, { - 0: { - value: 1002 - }, - 1: { - value: 1004 - } - }); - - return false; - } catch (e) { - return e instanceof TypeError && - dataPropertyAttributesAreCorrect(obj, "0", 1001, false, false, false) && - dataPropertyAttributesAreCorrect(obj, "1", 1003, false, false, true); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-93-4 +description: > + Object.defineProperties will fail to update [[Value]] attribute of + indexed data property 'P' when [[Configurable]] attribute of first + updating property are false (8.12.9 - step Note & 10.a.ii.1) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "0", { + value: 1001, + writable: false, + configurable: false + }); + + Object.defineProperty(obj, "1", { + value: 1003, + writable: false, + configurable: true + }); + + try { + Object.defineProperties(obj, { + 0: { + value: 1002 + }, + 1: { + value: 1004 + } + }); + + return false; + } catch (e) { + return e instanceof TypeError && + dataPropertyAttributesAreCorrect(obj, "0", 1001, false, false, false) && + dataPropertyAttributesAreCorrect(obj, "1", 1003, false, false, true); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93.js index aebee7e859..9b472a691d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93.js @@ -1,34 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93.js - * @description Object.defineProperties will not throw TypeError when P.configurable is false, P.[[Get]] and properties.[[Get]] are undefined (8.12.9 step 11.a.ii) - */ - - -function testcase() { - - var obj = {}; - - function set_func(value) { - obj.setVerifyHelpProp = value; - } - - Object.defineProperty(obj, "foo", { - get: undefined, - set: set_func, - enumerable: false, - configurable: false - }); - - Object.defineProperties(obj, { - foo: { - get: undefined - } - }); - return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-93 +description: > + Object.defineProperties will not throw TypeError when + P.configurable is false, P.[[Get]] and properties.[[Get]] are + undefined (8.12.9 step 11.a.ii) +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + function set_func(value) { + obj.setVerifyHelpProp = value; + } + + Object.defineProperty(obj, "foo", { + get: undefined, + set: set_func, + enumerable: false, + configurable: false + }); + + Object.defineProperties(obj, { + foo: { + get: undefined + } + }); + return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, set_func, "setVerifyHelpProp", false, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-94.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-94.js index 9c19248315..9f95b6b70e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-94.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-94.js @@ -1,25 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-94.js - * @description Object.defineProperties - 'P' is data property, properties.value and P.value are two different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true - - Object.defineProperties(obj, { - foo: { - value: 200 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-94 +description: > + Object.defineProperties - 'P' is data property, properties.value + and P.value are two different values (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true + + Object.defineProperties(obj, { + foo: { + value: 200 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-95.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-95.js index 8227e0c230..3ecad959c5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-95.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-95.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-95.js - * @description Object.defineProperties - 'P' is data property, P.value is present and properties.value is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 200, - enumerable: true, - writable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - value: undefined - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-95 +description: > + Object.defineProperties - 'P' is data property, P.value is present + and properties.value is undefined (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 200, + enumerable: true, + writable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + value: undefined + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-96.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-96.js index 65427d1b4c..931496de96 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-96.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-96.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-96.js - * @description Object.defineProperties - 'P' is data property, properties.value is present and P.value is undefined (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: undefined, - enumerable: true, - writable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - value: 200 - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-96 +description: > + Object.defineProperties - 'P' is data property, properties.value + is present and P.value is undefined (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: undefined, + enumerable: true, + writable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + value: 200 + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-97.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-97.js index 3cbd1372df..a666b975bf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-97.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-97.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-97.js - * @description Object.defineProperties - 'P' is data property, P.writable and properties.writable are different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 100, - enumerable: true, - writable: false, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - writable: true - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-97 +description: > + Object.defineProperties - 'P' is data property, P.writable and + properties.writable are different values (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 100, + enumerable: true, + writable: false, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + writable: true + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-98.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-98.js index adf27f03f4..c9a1cf1a13 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-98.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-98.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-98.js - * @description Object.defineProperties - 'P' is data property, P.enumerable and properties.enumerable are different values (8.12.9 step 12) - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 200, - enumerable: false, - writable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - enumerable: true - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-98 +description: > + Object.defineProperties - 'P' is data property, P.enumerable and + properties.enumerable are different values (8.12.9 step 12) +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 200, + enumerable: false, + writable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + enumerable: true + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-99.js b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-99.js index 3d52bb30b4..bafcc5943a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-99.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-99.js @@ -1,30 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-99.js - * @description Object.defineProperties - 'P' is data property, P.configurable is true and properties.configurable is false - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 200, - enumerable: true, - writable: true, - configurable: true - }); - - Object.defineProperties(obj, { - foo: { - configurable: false - } - }); - return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.7-6-a-99 +description: > + Object.defineProperties - 'P' is data property, P.configurable is + true and properties.configurable is false +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 200, + enumerable: true, + writable: true, + configurable: true + }); + + Object.defineProperties(obj, { + foo: { + configurable: false + } + }); + return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js index c939c8df53..73cd7e05ed 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js - * @description Object.seal must exist as a function - */ - - -function testcase() { - var f = Object.seal; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-0-1 +description: Object.seal must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.seal; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js index e7a19390c6..96ae8da14a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js - * @description Object.seal must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.seal.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-0-2 +description: Object.seal must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.seal.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js index 130804e649..1ad1153274 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js - * @description Object.seal throws TypeError if type of first param is undefined - */ - - -function testcase() { - try { - Object.seal(undefined); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-1-1 +description: Object.seal throws TypeError if type of first param is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.seal(undefined); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js index 27c28fc74e..033eee71d1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js - * @description Object.seal throws TypeError if type of first param is null - */ - - -function testcase() { - try { - Object.seal(null); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-1-2 +description: Object.seal throws TypeError if type of first param is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.seal(null); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js index 87853ae785..bd5aed4438 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js - * @description Object.seal throws TypeError if type of first param is a boolean primitive - */ - - -function testcase() { - try { - Object.seal(false); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-1-3 +description: > + Object.seal throws TypeError if type of first param is a boolean + primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.seal(false); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js index 65ea699f9f..6e3aca140e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js - * @description Object.seal throws TypeError if type of first param is a string primitive - */ - - -function testcase() { - try { - Object.seal("abc"); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-1-4 +description: > + Object.seal throws TypeError if type of first param is a string + primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.seal("abc"); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js index 91073d1e46..769c927f8e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js - * @description Object.seal throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.seal(0); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-1 +description: Object.seal throws TypeError if type of first param is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.seal(0); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-1.js index c06073b89a..ff15403015 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-1.js - * @description Object.seal - extensible of 'O' is set as false even if 'O' has no own property - */ - - -function testcase() { - var obj = {}; - - var preCheck = Object.isExtensible(obj); - - Object.seal(obj); - - return preCheck && !Object.isExtensible(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-1 +description: > + Object.seal - extensible of 'O' is set as false even if 'O' has no + own property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + var preCheck = Object.isExtensible(obj); + + Object.seal(obj); + + return preCheck && !Object.isExtensible(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-2.js index 424aeb1643..ac7bb44838 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-2.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-2.js - * @description Object.seal - inherited data properties are ignored - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "Father", { - value: 10, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - var preCheck = Object.isExtensible(child); - Object.seal(child); - - var beforeDeleted = proto.hasOwnProperty("Father"); - delete proto.Father; - var afterDeleted = proto.hasOwnProperty("Father"); - - return preCheck && beforeDeleted && !afterDeleted; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-2 +description: Object.seal - inherited data properties are ignored +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "Father", { + value: 10, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + var preCheck = Object.isExtensible(child); + Object.seal(child); + + var beforeDeleted = proto.hasOwnProperty("Father"); + delete proto.Father; + var afterDeleted = proto.hasOwnProperty("Father"); + + return preCheck && beforeDeleted && !afterDeleted; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-3.js index a3e41e5983..bf7139feaf 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-3.js @@ -1,35 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-3.js - * @description Object.seal - inherited accessor properties are ignored - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "Father", { - get: function () { - return 10; - }, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - var preCheck = Object.isExtensible(child); - Object.seal(child); - - var beforeDeleted = proto.hasOwnProperty("Father"); - delete proto.Father; - var afterDeleted = proto.hasOwnProperty("Father"); - - return preCheck && beforeDeleted && !afterDeleted; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-3 +description: Object.seal - inherited accessor properties are ignored +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "Father", { + get: function () { + return 10; + }, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + var preCheck = Object.isExtensible(child); + Object.seal(child); + + var beforeDeleted = proto.hasOwnProperty("Father"); + delete proto.Father; + var afterDeleted = proto.hasOwnProperty("Father"); + + return preCheck && beforeDeleted && !afterDeleted; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-4.js index bf6b67d8fb..21642fdc6a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-4.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-4.js - * @description Object.seal - non-enumerable own property of 'O' is sealed - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - enumerable: false, - configurable: true - }); - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - var beforeDeleted = obj.hasOwnProperty("foo"); - delete obj.foo; - var afterDeleted = obj.hasOwnProperty("foo"); - - return preCheck && beforeDeleted && afterDeleted; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-4 +description: Object.seal - non-enumerable own property of 'O' is sealed +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + enumerable: false, + configurable: true + }); + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + var beforeDeleted = obj.hasOwnProperty("foo"); + delete obj.foo; + var afterDeleted = obj.hasOwnProperty("foo"); + + return preCheck && beforeDeleted && afterDeleted; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-1.js index 5d52d84b98..438a9830d2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-1.js - * @description Object.seal - 'P' is own data property - */ - - -function testcase() { - var obj = {}; - - obj.foo = 10; // default [[Configurable]] attribute value of foo: true - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - delete obj.foo; - return preCheck && obj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-1 +description: Object.seal - 'P' is own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + obj.foo = 10; // default [[Configurable]] attribute value of foo: true + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + delete obj.foo; + return preCheck && obj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-10.js index 8497bd9ef9..3446451210 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-10.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-10.js - * @description Object.seal - 'P' is own property of a Boolean object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var boolObj = new Boolean(false); - - boolObj.foo = 10; - var preCheck = Object.isExtensible(boolObj); - Object.seal(boolObj); - - delete boolObj.foo; - return preCheck && boolObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-10 +description: > + Object.seal - 'P' is own property of a Boolean object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var boolObj = new Boolean(false); + + boolObj.foo = 10; + var preCheck = Object.isExtensible(boolObj); + Object.seal(boolObj); + + delete boolObj.foo; + return preCheck && boolObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-11.js index 6d6f19b606..0c7cbd1122 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-11.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-11.js - * @description Object.seal - 'P' is own property of a Number object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var numObj = new Number(-1); - - numObj.foo = 10; - var preCheck = Object.isExtensible(numObj); - Object.seal(numObj); - - delete numObj.foo; - return preCheck && numObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-11 +description: > + Object.seal - 'P' is own property of a Number object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var numObj = new Number(-1); + + numObj.foo = 10; + var preCheck = Object.isExtensible(numObj); + Object.seal(numObj); + + delete numObj.foo; + return preCheck && numObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-12.js index 3839fa34ab..194ff02c56 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-12.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-12.js - * @description Object.seal - 'P' is own property of a Date object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var dateObj = new Date(); - - dateObj.foo = 10; - var preCheck = Object.isExtensible(dateObj); - Object.seal(dateObj); - - delete dateObj.foo; - return preCheck && dateObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-12 +description: > + Object.seal - 'P' is own property of a Date object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateObj = new Date(); + + dateObj.foo = 10; + var preCheck = Object.isExtensible(dateObj); + Object.seal(dateObj); + + delete dateObj.foo; + return preCheck && dateObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-13.js index bd1245536d..bc649320d8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-13.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-13.js - * @description Object.seal - 'P' is own property of a RegExp object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var regObj = new RegExp(); - - regObj.foo = 10; - var preCheck = Object.isExtensible(regObj); - Object.seal(regObj); - - delete regObj.foo; - return preCheck && regObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-13 +description: > + Object.seal - 'P' is own property of a RegExp object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + + regObj.foo = 10; + var preCheck = Object.isExtensible(regObj); + Object.seal(regObj); + + delete regObj.foo; + return preCheck && regObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-14.js index d7fcbb8b65..27230a81c6 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-14.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-14.js - * @description Object.seal - 'P' is own property of an Error object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var errObj = new Error(); - - errObj.foo = 10; - var preCheck = Object.isExtensible(errObj); - Object.seal(errObj); - - delete errObj.foo; - return preCheck && errObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-14 +description: > + Object.seal - 'P' is own property of an Error object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error(); + + errObj.foo = 10; + var preCheck = Object.isExtensible(errObj); + Object.seal(errObj); + + delete errObj.foo; + return preCheck && errObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-15.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-15.js index 7439bd2e52..086bc21055 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-15.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-15.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-15.js - * @description Object.seal - 'P' is own property of an Arguments object which implements its own [[GetOwnProperty]] - */ - - -function testcase() { - var argObj = (function () { return arguments; })(); - - argObj.foo = 10; // default [[Configurable]] attribute value of foo: true - var preCheck = Object.isExtensible(argObj); - Object.seal(argObj); - - delete argObj.foo; - return preCheck && argObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-15 +description: > + Object.seal - 'P' is own property of an Arguments object which + implements its own [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function () { return arguments; })(); + + argObj.foo = 10; // default [[Configurable]] attribute value of foo: true + var preCheck = Object.isExtensible(argObj); + Object.seal(argObj); + + delete argObj.foo; + return preCheck && argObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-2.js index 191ece56f2..1751c372bd 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-2.js - * @description Object.seal - 'P' is own data property that overrides an inherited data property - */ - - -function testcase() { - var proto = { foo: 0 }; - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "foo", { - value: 10, - configurable: true - }); - var preCheck = Object.isExtensible(child); - Object.seal(child); - - delete child.foo; - return preCheck && child.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-2 +description: > + Object.seal - 'P' is own data property that overrides an inherited + data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = { foo: 0 }; + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "foo", { + value: 10, + configurable: true + }); + var preCheck = Object.isExtensible(child); + Object.seal(child); + + delete child.foo; + return preCheck && child.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-3.js index f81db05e1a..08639dee6d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-3.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-3.js - * @description Object.seal - 'P' is own data property that overrides an inherited accessor property - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 0; - }, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - Object.defineProperty(child, "foo", { - value: 10, - configurable: true - }); - var preCheck = Object.isExtensible(child); - Object.seal(child); - - delete child.foo; - return preCheck && child.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-3 +description: > + Object.seal - 'P' is own data property that overrides an inherited + accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 0; + }, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + Object.defineProperty(child, "foo", { + value: 10, + configurable: true + }); + var preCheck = Object.isExtensible(child); + Object.seal(child); + + delete child.foo; + return preCheck && child.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-4.js index d0f7279876..1d8813bb81 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-4.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-4.js - * @description Object.seal - 'P' is own accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - get: function () { - return 10; - }, - configurable: true - }); - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - delete obj.foo; - return preCheck && obj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-4 +description: Object.seal - 'P' is own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + get: function () { + return 10; + }, + configurable: true + }); + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + delete obj.foo; + return preCheck && obj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-5.js index fb4bece77b..51a328de45 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-5.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-5.js - * @description Object.seal - 'P' is own accessor property that overrides an inherited data property - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "foo", { - value: 0, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(child, "foo", { - get: function () { - return 10; - }, - configurable: true - }); - var preCheck = Object.isExtensible(child); - Object.seal(child); - - delete child.foo; - return preCheck && child.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-5 +description: > + Object.seal - 'P' is own accessor property that overrides an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "foo", { + value: 0, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(child, "foo", { + get: function () { + return 10; + }, + configurable: true + }); + var preCheck = Object.isExtensible(child); + Object.seal(child); + + delete child.foo; + return preCheck && child.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-6.js index 8ba68fe755..65ee994811 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-6.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-6.js - * @description Object.seal - 'P' is own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 0; - }, - configurable: true - }); - - var ConstructFun = function () { }; - ConstructFun.prototype = proto; - - var child = new ConstructFun(); - - Object.defineProperty(child, "foo", { - get: function () { - return 10; - }, - configurable: true - }); - var preCheck = Object.isExtensible(child); - Object.seal(child); - - delete child.foo; - return preCheck && child.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-6 +description: > + Object.seal - 'P' is own accessor property that overrides an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 0; + }, + configurable: true + }); + + var ConstructFun = function () { }; + ConstructFun.prototype = proto; + + var child = new ConstructFun(); + + Object.defineProperty(child, "foo", { + get: function () { + return 10; + }, + configurable: true + }); + var preCheck = Object.isExtensible(child); + Object.seal(child); + + delete child.foo; + return preCheck && child.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-7.js index 80e64fc327..3c6be994f5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-7.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-7.js - * @description Object.seal - 'P' is own property of a Function object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var funObj = function () { }; - - funObj.foo = 10; // default [[Configurable]] attribute value of foo: true - var preCheck = Object.isExtensible(funObj); - Object.seal(funObj); - - delete funObj.foo; - return preCheck && funObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-7 +description: > + Object.seal - 'P' is own property of a Function object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { }; + + funObj.foo = 10; // default [[Configurable]] attribute value of foo: true + var preCheck = Object.isExtensible(funObj); + Object.seal(funObj); + + delete funObj.foo; + return preCheck && funObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-8.js index ec0b47c4ad..316eac67a8 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-8.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-8.js - * @description Object.seal - 'P' is own property of an Array object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var arrObj = []; - - arrObj.foo = 10; - var preCheck = Object.isExtensible(arrObj); - Object.seal(arrObj); - - delete arrObj.foo; - return preCheck && arrObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-8 +description: > + Object.seal - 'P' is own property of an Array object that uses + Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + arrObj.foo = 10; + var preCheck = Object.isExtensible(arrObj); + Object.seal(arrObj); + + delete arrObj.foo; + return preCheck && arrObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-9.js index edcccd4b3c..3ed5884e58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-9.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-9.js - * @description Object.seal - 'P' is own property of a String object which implements its own [[GetOwnProperty]] - */ - - -function testcase() { - var strObj = new String("abc"); - - strObj.foo = 10; // default [[Configurable]] attribute value of foo: true - var preCheck = Object.isExtensible(strObj); - Object.seal(strObj); - - delete strObj.foo; - return preCheck && strObj.foo === 10; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-a-9 +description: > + Object.seal - 'P' is own property of a String object which + implements its own [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String("abc"); + + strObj.foo = 10; // default [[Configurable]] attribute value of foo: true + var preCheck = Object.isExtensible(strObj); + Object.seal(strObj); + + delete strObj.foo; + return preCheck && strObj.foo === 10; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-1.js index c6f61b6dfc..765f59418d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-1.js @@ -1,26 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-1.js - * @description Object.seal - the [[Configurable]] attribute of own data property of 'O' is set from true to false and other attributes of the property are unaltered - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: true, - enumerable: true, - configurable: true - }); - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - return preCheck && dataPropertyAttributesAreCorrect(obj, "foo", 10, true, true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-b-1 +description: > + Object.seal - the [[Configurable]] attribute of own data property + of 'O' is set from true to false and other attributes of the + property are unaltered +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: true, + enumerable: true, + configurable: true + }); + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + return preCheck && dataPropertyAttributesAreCorrect(obj, "foo", 10, true, true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-2.js index 9eedec9eb8..895622cf58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-2.js @@ -1,33 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-2.js - * @description Object.seal - the [[Configurable]] attribute of own accessor property of 'O' is set from true to false and other attributes of the property are unaltered - */ - - -function testcase() { - var obj = {}; - obj.variableForHelpVerify = "data"; - - function setFunc(value) { - obj.variableForHelpVerify = value; - } - function getFunc() { - return 10; - } - Object.defineProperty(obj, "foo", { - get: getFunc, - set: setFunc, - enumerable: true, - configurable: true - }); - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - return preCheck && accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "variableForHelpVerify", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-b-2 +description: > + Object.seal - the [[Configurable]] attribute of own accessor + property of 'O' is set from true to false and other attributes of + the property are unaltered +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + obj.variableForHelpVerify = "data"; + + function setFunc(value) { + obj.variableForHelpVerify = value; + } + function getFunc() { + return 10; + } + Object.defineProperty(obj, "foo", { + get: getFunc, + set: setFunc, + enumerable: true, + configurable: true + }); + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + return preCheck && accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "variableForHelpVerify", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-3.js index 6f3c4d1ccb..c6d1b9c0f5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-3.js @@ -1,41 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-3.js - * @description Object.seal - the [[Configurable]] attribute of all own properties of 'O' are set from true to false and other attributes of the property are unaltered - */ - - -function testcase() { - var obj = {}; - obj.variableForHelpVerify = "data"; - - Object.defineProperty(obj, "foo1", { - value: 10, - writable: true, - enumerable: true, - configurable: true - }); - - function set_func(value) { - obj.variableForHelpVerify = value; - } - function get_func() { - return 10; - } - Object.defineProperty(obj, "foo2", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - return preCheck && dataPropertyAttributesAreCorrect(obj, "foo1", 10, true, true, false) && - accessorPropertyAttributesAreCorrect(obj, "foo2", get_func, set_func, "variableForHelpVerify", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-b-3 +description: > + Object.seal - the [[Configurable]] attribute of all own properties + of 'O' are set from true to false and other attributes of the + property are unaltered +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + obj.variableForHelpVerify = "data"; + + Object.defineProperty(obj, "foo1", { + value: 10, + writable: true, + enumerable: true, + configurable: true + }); + + function set_func(value) { + obj.variableForHelpVerify = value; + } + function get_func() { + return 10; + } + Object.defineProperty(obj, "foo2", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + return preCheck && dataPropertyAttributesAreCorrect(obj, "foo1", 10, true, true, false) && + accessorPropertyAttributesAreCorrect(obj, "foo2", get_func, set_func, "variableForHelpVerify", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-4.js index 6c5e83896b..bec8f3a5a2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-4.js @@ -1,41 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-4.js - * @description Object.seal - all own properties of 'O' are already non-configurable - */ - - -function testcase() { - var obj = {}; - obj.variableForHelpVerify = "data"; - - Object.defineProperty(obj, "foo1", { - value: 10, - writable: true, - enumerable: true, - configurable: false - }); - - function set_func(value) { - obj.variableForHelpVerify = value; - } - function get_func() { - return 10; - } - Object.defineProperty(obj, "foo2", { - get: get_func, - set: set_func, - enumerable: true, - configurable: false - }); - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - return preCheck && dataPropertyAttributesAreCorrect(obj, "foo1", 10, true, true, false) && - accessorPropertyAttributesAreCorrect(obj, "foo2", get_func, set_func, "variableForHelpVerify", true, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-b-4 +description: > + Object.seal - all own properties of 'O' are already + non-configurable +includes: + - runTestCase.js + - accessorPropertyAttributesAreCorrect.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + obj.variableForHelpVerify = "data"; + + Object.defineProperty(obj, "foo1", { + value: 10, + writable: true, + enumerable: true, + configurable: false + }); + + function set_func(value) { + obj.variableForHelpVerify = value; + } + function get_func() { + return 10; + } + Object.defineProperty(obj, "foo2", { + get: get_func, + set: set_func, + enumerable: true, + configurable: false + }); + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + return preCheck && dataPropertyAttributesAreCorrect(obj, "foo1", 10, true, true, false) && + accessorPropertyAttributesAreCorrect(obj, "foo2", get_func, set_func, "variableForHelpVerify", true, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-1.js index 63663816b6..c6de767c9e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-1.js - * @description Object.seal - 'O' is a Function object - */ - - -function testcase() { - - var fun = function () { }; - var preCheck = Object.isExtensible(fun); - Object.seal(fun); - - return preCheck && Object.isSealed(fun); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-1 +description: Object.seal - 'O' is a Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var fun = function () { }; + var preCheck = Object.isExtensible(fun); + Object.seal(fun); + + return preCheck && Object.isSealed(fun); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-2.js index da65873cfc..a8314d0ad1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-2.js - * @description Object.seal - 'O' is an Array object - */ - - -function testcase() { - - var arr = [0, 1]; - var preCheck = Object.isExtensible(arr); - Object.seal(arr); - - return preCheck && Object.isSealed(arr); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-2 +description: Object.seal - 'O' is an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1]; + var preCheck = Object.isExtensible(arr); + Object.seal(arr); + + return preCheck && Object.isSealed(arr); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-3.js index 4a8168c462..3612df5348 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-3.js - * @description Object.seal - 'O' is a String object - */ - - -function testcase() { - - var strObj = new String("a"); - var preCheck = Object.isExtensible(strObj); - Object.seal(strObj); - - return preCheck && Object.isSealed(strObj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-3 +description: Object.seal - 'O' is a String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var strObj = new String("a"); + var preCheck = Object.isExtensible(strObj); + Object.seal(strObj); + + return preCheck && Object.isSealed(strObj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-4.js index 2f70a2f2da..9212552a2d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-4.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-4.js - * @description Object.seal - 'O' is a Boolean object - */ - - -function testcase() { - - var boolObj = new Boolean(false); - var preCheck = Object.isExtensible(boolObj); - Object.seal(boolObj); - - return preCheck && Object.isSealed(boolObj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-4 +description: Object.seal - 'O' is a Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var boolObj = new Boolean(false); + var preCheck = Object.isExtensible(boolObj); + Object.seal(boolObj); + + return preCheck && Object.isSealed(boolObj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-5.js index 73dfded1ab..8ac0ad4739 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-5.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-5.js - * @description Object.seal - 'O' is a Number object - */ - - -function testcase() { - - var numObj = new Number(3); - var preCheck = Object.isExtensible(numObj); - Object.seal(numObj); - - return preCheck && Object.isSealed(numObj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-5 +description: Object.seal - 'O' is a Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var numObj = new Number(3); + var preCheck = Object.isExtensible(numObj); + Object.seal(numObj); + + return preCheck && Object.isSealed(numObj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-6.js index b922d7df0b..dcd48f1150 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-6.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-6.js - * @description Object.seal - 'O' is a Date object - */ - - -function testcase() { - - var dateObj = new Date(); - var preCheck = Object.isExtensible(dateObj); - Object.seal(dateObj); - - return preCheck && Object.isSealed(dateObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-6 +description: Object.seal - 'O' is a Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var dateObj = new Date(); + var preCheck = Object.isExtensible(dateObj); + Object.seal(dateObj); + + return preCheck && Object.isSealed(dateObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-7.js index 3c7702e1d7..778d073253 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-7.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-7.js - * @description Object.seal - 'O' is a RegExp object - */ - - -function testcase() { - var regObj = new RegExp(); - var preCheck = Object.isExtensible(regObj); - Object.seal(regObj); - - return preCheck && Object.isSealed(regObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-7 +description: Object.seal - 'O' is a RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + var preCheck = Object.isExtensible(regObj); + Object.seal(regObj); + + return preCheck && Object.isSealed(regObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-8.js index 29145cb9bf..8e83383b30 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-8.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-8.js - * @description Object.seal - 'O' is an Error object - */ - - -function testcase() { - - var errObj = new Error(); - var preCheck = Object.isExtensible(errObj); - Object.seal(errObj); - - return preCheck && Object.isSealed(errObj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-8 +description: Object.seal - 'O' is an Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var errObj = new Error(); + var preCheck = Object.isExtensible(errObj); + Object.seal(errObj); + + return preCheck && Object.isSealed(errObj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-9.js index 91794f5aa2..db64226ea5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-9.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-9.js - * @description Object.seal - 'O' is an Arguments object - */ - - -function testcase() { - - var argObj = (function () { return arguments; })(); - - var preCheck = Object.isExtensible(argObj); - Object.seal(argObj); - - return preCheck && Object.isSealed(argObj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-2-c-9 +description: Object.seal - 'O' is an Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var argObj = (function () { return arguments; })(); + + var preCheck = Object.isExtensible(argObj); + Object.seal(argObj); + + return preCheck && Object.isSealed(argObj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-3-1.js index 5e18e03ede..4c6a5803d0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-3-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-3-1.js - * @description Object.seal - returned object is not extensible - */ - - -function testcase() { - - var obj = {}; - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - return preCheck && !Object.isExtensible(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-3-1 +description: Object.seal - returned object is not extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + return preCheck && !Object.isExtensible(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-1.js index 1fec6f8750..277a13357c 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-1.js - * @description Object.seal - 'O' is sealed already - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true - var preCheck = Object.isExtensible(obj); - Object.seal(obj); - - Object.seal(obj); - return preCheck && Object.isSealed(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-4-1 +description: Object.seal - 'O' is sealed already +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true + var preCheck = Object.isExtensible(obj); + Object.seal(obj); + + Object.seal(obj); + return preCheck && Object.isSealed(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-2.js index 4f1ecbde5e..f093bf94c7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-2.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-2.js - * @description Object.seal - 'O' is frozen already - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true - var preCheck = Object.isExtensible(obj); - Object.freeze(obj); - - Object.seal(obj); - return preCheck && Object.isSealed(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-4-2 +description: Object.seal - 'O' is frozen already +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true + var preCheck = Object.isExtensible(obj); + Object.freeze(obj); + + Object.seal(obj); + return preCheck && Object.isSealed(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-3.js index 73fa0c1086..889ddfe21e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-3.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-3.js - * @description Object.seal - the extension of 'O' is prevented already - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true - var preCheck = Object.isExtensible(obj); - Object.preventExtensions(obj); - Object.seal(obj); - return preCheck && Object.isSealed(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.8-4-3 +description: Object.seal - the extension of 'O' is prevented already +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true + var preCheck = Object.isExtensible(obj); + Object.preventExtensions(obj); + Object.seal(obj); + return preCheck && Object.isSealed(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js index 594458a267..3bc7fd3fac 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js - * @description Object.freeze must exist as a function - */ - - -function testcase() { - var f = Object.freeze; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-0-1 +description: Object.freeze must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Object.freeze; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js index 3d5dd332f7..d03f57c30a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js - * @description Object.freeze must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Object.freeze.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-0-2 +description: Object.freeze must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Object.freeze.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js index 9313c3163a..fddc2f49ca 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js - * @description Object.freeze throws TypeError if type of first param is undefined - */ - - -function testcase() { - try { - Object.freeze(undefined); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-1-1 +description: Object.freeze throws TypeError if type of first param is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.freeze(undefined); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js index 6e9024d32d..51673ac3b1 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js - * @description Object.freeze throws TypeError if type of first param is null - */ - - -function testcase() { - try { - Object.freeze(null); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-1-2 +description: Object.freeze throws TypeError if type of first param is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.freeze(null); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js index 6f23bae119..84a6f56901 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js - * @description Object.freeze throws TypeError if type of first param is boolean primitive - */ - - -function testcase() { - var result = false; - try { - Object.freeze(false); - - return false; - } catch (e) { - result = e instanceof TypeError; - } - try { - Object.freeze(true); - - return false; - } catch (e) { - return result && e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-1-3 +description: > + Object.freeze throws TypeError if type of first param is boolean + primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + try { + Object.freeze(false); + + return false; + } catch (e) { + result = e instanceof TypeError; + } + try { + Object.freeze(true); + + return false; + } catch (e) { + return result && e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js index fe32d4549a..191e29f1b2 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js - * @description Object.freeze throws TypeError if type of first param is string primitive - */ - - -function testcase() { - try { - Object.freeze("abc"); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-1-4 +description: > + Object.freeze throws TypeError if type of first param is string + primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.freeze("abc"); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js index 2511f89d4f..f884d20a38 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js - * @description Object.freeze throws TypeError if type of first param is not Object - */ - - -function testcase() { - try { - Object.freeze(0); - return false; - } catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-1 +description: Object.freeze throws TypeError if type of first param is not Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.freeze(0); + return false; + } catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-1.js index 9d0312273f..7107c8d95f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-1.js - * @description Object.freeze - extensible of 'O' is set as false even if 'O' has no own property - */ - - -function testcase() { - var obj = {}; - - Object.freeze(obj); - - return !Object.isExtensible(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-1 +description: > + Object.freeze - extensible of 'O' is set as false even if 'O' has + no own property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.freeze(obj); + + return !Object.isExtensible(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-2.js index 4f52a43a2a..6ada162584 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-2.js @@ -1,32 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-2.js - * @description Object.freeze - inherited data properties are not frozen - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "Father", { - value: 10, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.freeze(child); - - var beforeDeleted = proto.hasOwnProperty("Father"); - delete proto.Father; - var afterDeleted = proto.hasOwnProperty("Father"); - - return beforeDeleted && !afterDeleted; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-2 +description: Object.freeze - inherited data properties are not frozen +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "Father", { + value: 10, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.freeze(child); + + var beforeDeleted = proto.hasOwnProperty("Father"); + delete proto.Father; + var afterDeleted = proto.hasOwnProperty("Father"); + + return beforeDeleted && !afterDeleted; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-3.js index 4f2c988e4b..c7790b3f12 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-3.js @@ -1,34 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-3.js - * @description Object.freeze - inherited accessor properties are not frozen - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "Father", { - get: function () { - return 10; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.freeze(child); - - var beforeDeleted = proto.hasOwnProperty("Father"); - delete proto.Father; - var afterDeleted = proto.hasOwnProperty("Father"); - - return beforeDeleted && !afterDeleted; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-3 +description: Object.freeze - inherited accessor properties are not frozen +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "Father", { + get: function () { + return 10; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.freeze(child); + + var beforeDeleted = proto.hasOwnProperty("Father"); + delete proto.Father; + var afterDeleted = proto.hasOwnProperty("Father"); + + return beforeDeleted && !afterDeleted; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-4.js index 43191dd89e..cea5af1b58 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-4.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-4.js - * @description Object.freeze - Non-enumerable own properties of 'O' are frozen - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - enumerable: false, - configurable: true - }); - - Object.freeze(obj); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - var beforeDeleted = obj.hasOwnProperty("foo"); - delete obj.foo; - var afterDeleted = obj.hasOwnProperty("foo"); - - return beforeDeleted && afterDeleted && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-4 +description: Object.freeze - Non-enumerable own properties of 'O' are frozen +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + enumerable: false, + configurable: true + }); + + Object.freeze(obj); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + var beforeDeleted = obj.hasOwnProperty("foo"); + delete obj.foo; + var afterDeleted = obj.hasOwnProperty("foo"); + + return beforeDeleted && afterDeleted && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-1.js index 535a3304d5..cff6b873be 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-1.js - * @description Object.freeze - 'P' is own data property - */ - - -function testcase() { - var obj = {}; - - obj.foo = 10; // default [[Configurable]] attribute value of foo: true - - Object.freeze(obj); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - delete obj.foo; - return obj.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-1 +description: Object.freeze - 'P' is own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + obj.foo = 10; // default [[Configurable]] attribute value of foo: true + + Object.freeze(obj); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + delete obj.foo; + return obj.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-10.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-10.js index efb9a18a1c..ddf76323a7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-10.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-10.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-10.js - * @description Object.freeze - 'P' is own named property of an Array object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var arrObj = []; - - arrObj.foo = 10; // default [[Configurable]] attribute value of foo: true - - Object.freeze(arrObj); - - var desc = Object.getOwnPropertyDescriptor(arrObj, "foo"); - - delete arrObj.foo; - return arrObj.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-10 +description: > + Object.freeze - 'P' is own named property of an Array object that + uses Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = []; + + arrObj.foo = 10; // default [[Configurable]] attribute value of foo: true + + Object.freeze(arrObj); + + var desc = Object.getOwnPropertyDescriptor(arrObj, "foo"); + + delete arrObj.foo; + return arrObj.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-11.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-11.js index 0cda9043bc..cac28ab403 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-11.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-11.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-11.js - * @description Object.freeze - 'P' is own index property of the Arguments object that implements its own [[GetOwnProperty]] - */ - - -function testcase() { - - // default [[Configurable]] attribute value of "0": true - var argObj = (function () { return arguments; }(1, 2, 3)); - - Object.freeze(argObj); - - var desc = Object.getOwnPropertyDescriptor(argObj, "0"); - - delete argObj[0]; - return argObj[0] === 1 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-11 +description: > + Object.freeze - 'P' is own index property of the Arguments object + that implements its own [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + + // default [[Configurable]] attribute value of "0": true + var argObj = (function () { return arguments; }(1, 2, 3)); + + Object.freeze(argObj); + + var desc = Object.getOwnPropertyDescriptor(argObj, "0"); + + delete argObj[0]; + return argObj[0] === 1 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-12.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-12.js index 97f0ba013b..d19572e726 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-12.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-12.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-12.js - * @description Object.freeze - 'P' is own index property of a String object that implements its own [[GetOwnProperty]] - */ - - -function testcase() { - - // default [[Configurable]] attribute value of "0": true - var strObj = new String("abc"); - - Object.freeze(strObj); - - var desc = Object.getOwnPropertyDescriptor(strObj, "0"); - - delete strObj[0]; - return strObj[0] === "a" && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-12 +description: > + Object.freeze - 'P' is own index property of a String object that + implements its own [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + + // default [[Configurable]] attribute value of "0": true + var strObj = new String("abc"); + + Object.freeze(strObj); + + var desc = Object.getOwnPropertyDescriptor(strObj, "0"); + + delete strObj[0]; + return strObj[0] === "a" && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-13.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-13.js index 4cad5afea0..a3f9171823 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-13.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-13.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-13.js - * @description Object.freeze - 'P' is own index property of the Object - */ - - -function testcase() { - - // default [[Configurable]] attribute value of "0": true - var obj = { 0: 0, 1: 1, length: 2}; - - Object.freeze(obj); - - var desc = Object.getOwnPropertyDescriptor(obj, "0"); - - delete obj[0]; - return obj[0] === 0 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-13 +description: Object.freeze - 'P' is own index property of the Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + // default [[Configurable]] attribute value of "0": true + var obj = { 0: 0, 1: 1, length: 2}; + + Object.freeze(obj); + + var desc = Object.getOwnPropertyDescriptor(obj, "0"); + + delete obj[0]; + return obj[0] === 0 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-14.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-14.js index a96c924ca3..e1041f7846 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-14.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-14.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-14.js - * @description Object.freeze - 'P' is own index property of an Array object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - - // default [[Configurable]] attribute value of "0": true - var arrObj = [0, 1, 2]; - - Object.freeze(arrObj); - - var desc = Object.getOwnPropertyDescriptor(arrObj, "0"); - - delete arrObj[0]; - return arrObj[0] === 0 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-14 +description: > + Object.freeze - 'P' is own index property of an Array object that + uses Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + + // default [[Configurable]] attribute value of "0": true + var arrObj = [0, 1, 2]; + + Object.freeze(arrObj); + + var desc = Object.getOwnPropertyDescriptor(arrObj, "0"); + + delete arrObj[0]; + return arrObj[0] === 0 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-2.js index 74d681c259..6cca87dc2f 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-2.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-2.js - * @description Object.freeze - 'P' is own data property that overrides an inherited data property - */ - - -function testcase() { - - var proto = { foo: 0 }; // default [[Configurable]] attribute value of foo: true - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.foo = 10; // default [[Configurable]] attribute value of foo: true - - Object.freeze(child); - - var desc = Object.getOwnPropertyDescriptor(child, "foo"); - - delete child.foo; - return child.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-2 +description: > + Object.freeze - 'P' is own data property that overrides an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { foo: 0 }; // default [[Configurable]] attribute value of foo: true + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.foo = 10; // default [[Configurable]] attribute value of foo: true + + Object.freeze(child); + + var desc = Object.getOwnPropertyDescriptor(child, "foo"); + + delete child.foo; + return child.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-3.js index f8d1189b94..d4984f12c0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-3.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-3.js - * @description Object.freeze - 'P' is own data property that overrides an inherited accessor property - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "foo", { - value: 10, - configurable: true - }); - - Object.freeze(child); - - var desc = Object.getOwnPropertyDescriptor(child, "foo"); - - delete child.foo; - return child.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-3 +description: > + Object.freeze - 'P' is own data property that overrides an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "foo", { + value: 10, + configurable: true + }); + + Object.freeze(child); + + var desc = Object.getOwnPropertyDescriptor(child, "foo"); + + delete child.foo; + return child.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-4.js index 304287fef0..736da56f65 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-4.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-4.js - * @description Object.freeze - 'P' is own accessor property - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.freeze(obj); - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - delete obj.foo; - return obj.foo === 10 && desc.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-4 +description: Object.freeze - 'P' is own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.freeze(obj); + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + delete obj.foo; + return obj.foo === 10 && desc.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-5.js index ebd51f99b1..e01b86a8d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-5.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-5.js - * @description Object.freeze - 'P' is own accessor property that overrides an inherited data property - */ - - -function testcase() { - - var proto = {}; - - proto.foo = 0; // default [[Configurable]] attribute value of foo: true - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "foo", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.freeze(child); - - var desc = Object.getOwnPropertyDescriptor(child, "foo"); - - delete child.foo; - return child.foo === 10 && desc.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-5 +description: > + Object.freeze - 'P' is own accessor property that overrides an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + + proto.foo = 0; // default [[Configurable]] attribute value of foo: true + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "foo", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.freeze(child); + + var desc = Object.getOwnPropertyDescriptor(child, "foo"); + + delete child.foo; + return child.foo === 10 && desc.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-6.js index 4999d84e84..617216a376 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-6.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-6.js - * @description Object.freeze - 'P' is own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - var proto = {}; - - Object.defineProperty(proto, "foo", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "foo", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.freeze(child); - - var desc = Object.getOwnPropertyDescriptor(child, "foo"); - - delete child.foo; - return child.foo === 10 && desc.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-6 +description: > + Object.freeze - 'P' is own accessor property that overrides an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + + Object.defineProperty(proto, "foo", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "foo", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.freeze(child); + + var desc = Object.getOwnPropertyDescriptor(child, "foo"); + + delete child.foo; + return child.foo === 10 && desc.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-7.js index 44fc1eccdc..da5684ba01 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-7.js - * @description Object.freeze - 'P' is own named property of an Arguments object that implements its own [[GetOwnProperty]] - */ - - -function testcase() { - var argObj = (function () { return arguments; }()); - - argObj.foo = 10; // default [[Configurable]] attribute value of foo: true - - Object.freeze(argObj); - - var desc = Object.getOwnPropertyDescriptor(argObj, "foo"); - - delete argObj.foo; - return argObj.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-7 +description: > + Object.freeze - 'P' is own named property of an Arguments object + that implements its own [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function () { return arguments; }()); + + argObj.foo = 10; // default [[Configurable]] attribute value of foo: true + + Object.freeze(argObj); + + var desc = Object.getOwnPropertyDescriptor(argObj, "foo"); + + delete argObj.foo; + return argObj.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-8.js index 0b81f98490..5ea7dd20e0 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-8.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-8.js - * @description Object.freeze - 'P' is own named property of the String object that implements its own [[GetOwnProperty]] - */ - - -function testcase() { - var strObj = new String("abc"); - - strObj.foo = 10; // default [[Configurable]] attribute value of foo: true - - Object.freeze(strObj); - - var desc = Object.getOwnPropertyDescriptor(strObj, "foo"); - - delete strObj.foo; - return strObj.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-8 +description: > + Object.freeze - 'P' is own named property of the String object + that implements its own [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String("abc"); + + strObj.foo = 10; // default [[Configurable]] attribute value of foo: true + + Object.freeze(strObj); + + var desc = Object.getOwnPropertyDescriptor(strObj, "foo"); + + delete strObj.foo; + return strObj.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-9.js index bcc125919a..a79395ad27 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-9.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-9.js - * @description Object.freeze - 'P' is own property of the Function object that uses Object's [[GetOwnProperty]] - */ - - -function testcase() { - var funObj = function () { }; - - funObj.foo = 10; // default [[Configurable]] attribute value of foo: true - - Object.freeze(funObj); - - var desc = Object.getOwnPropertyDescriptor(funObj, "foo"); - - delete funObj.foo; - return funObj.foo === 10 && desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-a-9 +description: > + Object.freeze - 'P' is own property of the Function object that + uses Object's [[GetOwnProperty]] +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { }; + + funObj.foo = 10; // default [[Configurable]] attribute value of foo: true + + Object.freeze(funObj); + + var desc = Object.getOwnPropertyDescriptor(funObj, "foo"); + + delete funObj.foo; + return funObj.foo === 10 && desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-1.js index c7bf0fd78c..10fc296827 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-1.js @@ -1,28 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-1.js - * @description Object.freeze - The [[Wrtiable]] attribute of own data property of 'O' is set to false while other attributes are unchanged - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: true, - enumerable: true, - configurable: false - }); - - Object.freeze(obj); - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, false) && - desc.writable === false && desc.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-b-i-1 +description: > + Object.freeze - The [[Wrtiable]] attribute of own data property of + 'O' is set to false while other attributes are unchanged +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: true, + enumerable: true, + configurable: false + }); + + Object.freeze(obj); + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, false) && + desc.writable === false && desc.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-2.js index 58bb173e11..f985e57df5 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-2.js @@ -1,39 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-2.js - * @description Object.freeze - The [[Wrtiable]] attribute of all own data property of 'O' is set to false while other attributes are unchanged - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo1", { - value: 10, - writable: false, - enumerable: true, - configurable: false - }); - - Object.defineProperty(obj, "foo2", { - value: 20, - writable: true, - enumerable: false, - configurable: false - }); - - Object.freeze(obj); - - var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); - var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); - - return dataPropertyAttributesAreCorrect(obj, "foo1", 10, false, true, false) && - dataPropertyAttributesAreCorrect(obj, "foo2", 20, false, false, false) && - desc1.configurable === false && desc1.writable === false && - desc2.configurable === false && desc2.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-b-i-2 +description: > + Object.freeze - The [[Wrtiable]] attribute of all own data + property of 'O' is set to false while other attributes are + unchanged +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo1", { + value: 10, + writable: false, + enumerable: true, + configurable: false + }); + + Object.defineProperty(obj, "foo2", { + value: 20, + writable: true, + enumerable: false, + configurable: false + }); + + Object.freeze(obj); + + var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); + var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); + + return dataPropertyAttributesAreCorrect(obj, "foo1", 10, false, true, false) && + dataPropertyAttributesAreCorrect(obj, "foo2", 20, false, false, false) && + desc1.configurable === false && desc1.writable === false && + desc2.configurable === false && desc2.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-1.js index 3d87e76e6f..9ef22a3d74 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-1.js @@ -1,28 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-1.js - * @description Object.freeze - The [[Configurable]] attribute of own data property of 'O' is set to false while other attributes are unchanged - */ - - -function testcase() { - var obj = {}; - - Object.defineProperty(obj, "foo", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - Object.freeze(obj); - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, false) && - desc.configurable === false && desc.writable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-c-1 +description: > + Object.freeze - The [[Configurable]] attribute of own data + property of 'O' is set to false while other attributes are + unchanged +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + + Object.defineProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + Object.freeze(obj); + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + + return dataPropertyAttributesAreCorrect(obj, "foo", 10, false, true, false) && + desc.configurable === false && desc.writable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-2.js index 55d5133e34..6fb497345d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-2.js @@ -1,52 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-2.js - * @description Object.freeze - The [[Configurable]] attribute of own accessor property of 'O' is set to false while other attributes are unchanged - */ - - -function testcase() { - var obj = {}; - - function get_func() { - return 10; - } - - var resultSetFun = false; - function set_func() { - resultSetFun = true; - } - - Object.defineProperty(obj, "foo", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.freeze(obj); - var res1 = obj.hasOwnProperty("foo"); - delete obj.foo; - var res2 = obj.hasOwnProperty("foo"); - var resultConfigurable = (res1 && res2); - - var resultGetFun = (obj.foo === 10); - obj.foo = 12; - - var resultEnumerable = false; - for (var prop in obj) { - if (prop === "foo") { - resultEnumerable = true; - } - } - - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun; - - return desc.configurable === false && result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-c-2 +description: > + Object.freeze - The [[Configurable]] attribute of own accessor + property of 'O' is set to false while other attributes are + unchanged +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + + function get_func() { + return 10; + } + + var resultSetFun = false; + function set_func() { + resultSetFun = true; + } + + Object.defineProperty(obj, "foo", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.freeze(obj); + var res1 = obj.hasOwnProperty("foo"); + delete obj.foo; + var res2 = obj.hasOwnProperty("foo"); + var resultConfigurable = (res1 && res2); + + var resultGetFun = (obj.foo === 10); + obj.foo = 12; + + var resultEnumerable = false; + for (var prop in obj) { + if (prop === "foo") { + resultEnumerable = true; + } + } + + var desc = Object.getOwnPropertyDescriptor(obj, "foo"); + var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun; + + return desc.configurable === false && result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-3.js index e0973ab9e0..81ab9fe037 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-3.js @@ -1,65 +1,71 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-3.js - * @description Object.freeze - The [[Configurable]] attribute of all own data property of 'O' is set to false while other attributes are unchanged - */ - - -function testcase() { - - var obj = {}; - var resultSetFun = false; - - Object.defineProperty(obj, "foo1", { - value: 10, - writable: false, - enumerable: true, - configurable: true - }); - - function get_func() { - return 10; - } - - function set_func() { - resultSetFun = true; - } - - Object.defineProperty(obj, "foo2", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.freeze(obj); - - var res1 = obj.hasOwnProperty("foo2"); - delete obj.foo2; - var res2 = obj.hasOwnProperty("foo2"); - var resultConfigurable = (res1 && res2); - - var resultGetFun = (obj.foo2 === 10); - obj.foo2 = 12; - - var resultEnumerable = false; - for (var prop in obj) { - if (prop === "foo2") { - resultEnumerable = true; - } - } - - var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); - var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); - - var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun; - - return dataPropertyAttributesAreCorrect(obj, "foo1", 10, false, true, false) && result && - desc1.configurable === false && desc1.writable === false && desc2.configurable === false; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-c-3 +description: > + Object.freeze - The [[Configurable]] attribute of all own data + property of 'O' is set to false while other attributes are + unchanged +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + + var obj = {}; + var resultSetFun = false; + + Object.defineProperty(obj, "foo1", { + value: 10, + writable: false, + enumerable: true, + configurable: true + }); + + function get_func() { + return 10; + } + + function set_func() { + resultSetFun = true; + } + + Object.defineProperty(obj, "foo2", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.freeze(obj); + + var res1 = obj.hasOwnProperty("foo2"); + delete obj.foo2; + var res2 = obj.hasOwnProperty("foo2"); + var resultConfigurable = (res1 && res2); + + var resultGetFun = (obj.foo2 === 10); + obj.foo2 = 12; + + var resultEnumerable = false; + for (var prop in obj) { + if (prop === "foo2") { + resultEnumerable = true; + } + } + + var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); + var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); + + var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun; + + return dataPropertyAttributesAreCorrect(obj, "foo1", 10, false, true, false) && result && + desc1.configurable === false && desc1.writable === false && desc2.configurable === false; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-4.js index 60ecd93a90..b438bea8d4 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-4.js @@ -1,63 +1,68 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-4.js - * @description Object.freeze - all own properties of 'O' are not writable and not configurable - */ - - -function testcase() { - var obj = {}; - var resultSetFun = false; - - Object.defineProperty(obj, "foo1", { - value: 10, - writable: false, - enumerable: true, - configurable: false - }); - - function get_func() { - return 10; - } - - function set_func() { - resultSetFun = true; - } - - Object.defineProperty(obj, "foo2", { - get: get_func, - set: set_func, - enumerable: true, - configurable: true - }); - - Object.freeze(obj); - - var res1 = obj.hasOwnProperty("foo2"); - delete obj.foo2; - var res2 = obj.hasOwnProperty("foo2"); - var resultConfigurable = (res1 && res2); - - var resultGetFun = (obj.foo2 === 10); - obj.foo2 = 12; - - var resultEnumerable = false; - for (var prop in obj) { - if (prop === "foo2") { - resultEnumerable = true; - } - } - - var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); - var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); - - var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun; - - return dataPropertyAttributesAreCorrect(obj, "foo1", 10, false, true, false) && - result && desc1.configurable === false && desc1.writable === false && desc2.configurable === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-c-4 +description: > + Object.freeze - all own properties of 'O' are not writable and not + configurable +includes: + - runTestCase.js + - dataPropertyAttributesAreCorrect.js +---*/ + +function testcase() { + var obj = {}; + var resultSetFun = false; + + Object.defineProperty(obj, "foo1", { + value: 10, + writable: false, + enumerable: true, + configurable: false + }); + + function get_func() { + return 10; + } + + function set_func() { + resultSetFun = true; + } + + Object.defineProperty(obj, "foo2", { + get: get_func, + set: set_func, + enumerable: true, + configurable: true + }); + + Object.freeze(obj); + + var res1 = obj.hasOwnProperty("foo2"); + delete obj.foo2; + var res2 = obj.hasOwnProperty("foo2"); + var resultConfigurable = (res1 && res2); + + var resultGetFun = (obj.foo2 === 10); + obj.foo2 = 12; + + var resultEnumerable = false; + for (var prop in obj) { + if (prop === "foo2") { + resultEnumerable = true; + } + } + + var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); + var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); + + var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun; + + return dataPropertyAttributesAreCorrect(obj, "foo1", 10, false, true, false) && + result && desc1.configurable === false && desc1.writable === false && desc2.configurable === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-1.js index d93a4588ab..e090c6f174 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-1.js - * @description Object.freeze - 'O' is a Function object - */ - - -function testcase() { - var funObj = function () { }; - - Object.freeze(funObj); - - return Object.isFrozen(funObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-1 +description: Object.freeze - 'O' is a Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { }; + + Object.freeze(funObj); + + return Object.isFrozen(funObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-2.js index 1f571b75ca..40be24937a 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-2.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-2.js - * @description Object.freeze - 'O' is an Array object - */ - - -function testcase() { - var arrObj = [0, 1]; - - Object.freeze(arrObj); - - return Object.isFrozen(arrObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-2 +description: Object.freeze - 'O' is an Array object +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [0, 1]; + + Object.freeze(arrObj); + + return Object.isFrozen(arrObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-3.js index 6b6cc4351e..8d9c48bf42 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-3.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-3.js - * @description Object.freeze - 'O' is a String object - */ - - -function testcase() { - var strObj = new String("a"); - - Object.freeze(strObj); - - return Object.isFrozen(strObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-3 +description: Object.freeze - 'O' is a String object +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String("a"); + + Object.freeze(strObj); + + return Object.isFrozen(strObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-4.js index 0b27c3e645..d5c41a9996 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-4.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-4.js - * @description Object.freeze - 'O' is a Boolean object - */ - - -function testcase() { - var boolObj = new Boolean(false); - - Object.freeze(boolObj); - - return Object.isFrozen(boolObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-4 +description: Object.freeze - 'O' is a Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + var boolObj = new Boolean(false); + + Object.freeze(boolObj); + + return Object.isFrozen(boolObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-5.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-5.js index 5f9a876915..8445bec774 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-5.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-5.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-5.js - * @description Object.freeze - 'O' is a Number object - */ - - -function testcase() { - var numObj = new Number(3); - - Object.freeze(numObj); - - return Object.isFrozen(numObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-5 +description: Object.freeze - 'O' is a Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + var numObj = new Number(3); + + Object.freeze(numObj); + + return Object.isFrozen(numObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-6.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-6.js index 5e14d6df5f..d47e9852b3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-6.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-6.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-6.js - * @description Object.freeze - 'O' is a Date object - */ - - -function testcase() { - var dateObj = new Date(); - - Object.freeze(dateObj); - - return Object.isFrozen(dateObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-6 +description: Object.freeze - 'O' is a Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateObj = new Date(); + + Object.freeze(dateObj); + + return Object.isFrozen(dateObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-7.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-7.js index a5ae89491a..15f1628dfc 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-7.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-7.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-7.js - * @description Object.freeze - 'O' is a RegExp object - */ - - -function testcase() { - var regObj = new RegExp(); - - Object.freeze(regObj); - - return Object.isFrozen(regObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-7 +description: Object.freeze - 'O' is a RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(); + + Object.freeze(regObj); + + return Object.isFrozen(regObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-8.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-8.js index 1750b542f8..3ae9e87992 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-8.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-8.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-8.js - * @description Object.freeze - 'O' is an Error object - */ - - -function testcase() { - var errObj = new SyntaxError(); - - Object.freeze(errObj); - - return Object.isFrozen(errObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-8 +description: Object.freeze - 'O' is an Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new SyntaxError(); + + Object.freeze(errObj); + + return Object.isFrozen(errObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-9.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-9.js index e8bcaac00b..a30c5d79f3 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-9.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-9.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-9.js - * @description Object.freeze - 'O' is the Arguments object - */ - - -function testcase() { - var argObj = (function () { return arguments; } ()); - - Object.freeze(argObj); - - return Object.isFrozen(argObj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-2-d-9 +description: Object.freeze - 'O' is the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = (function () { return arguments; } ()); + + Object.freeze(argObj); + + return Object.isFrozen(argObj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-3-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-3-1.js index 9cecf9f61c..82c17cc409 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-3-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-3-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-3-1.js - * @description Object.freeze - returned object is not extensible - */ - - -function testcase() { - - var obj = {}; - Object.freeze(obj); - return !Object.isExtensible(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-3-1 +description: Object.freeze - returned object is not extensible +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + Object.freeze(obj); + return !Object.isExtensible(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-1.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-1.js index dce11e6577..2df7ac68b7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-1.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-1.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-1.js - * @description Object.freeze - 'O' is sealed already - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 10; // default value of attributes: writable: true, enumerable: true - - Object.seal(obj); - - Object.freeze(obj); - return Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-4-1 +description: Object.freeze - 'O' is sealed already +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 10; // default value of attributes: writable: true, enumerable: true + + Object.seal(obj); + + Object.freeze(obj); + return Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-2.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-2.js index cda6cb31c7..80d93fd688 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-2.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-2.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-2.js - * @description Object.freeze - 'O' is frozen already - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 10; // default value of attributes: writable: true, enumerable: true - - Object.freeze(obj); - - Object.freeze(obj); - return Object.isFrozen(obj); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-4-2 +description: Object.freeze - 'O' is frozen already +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 10; // default value of attributes: writable: true, enumerable: true + + Object.freeze(obj); + + Object.freeze(obj); + return Object.isFrozen(obj); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-3.js index f00502e56c..c31dbcef5d 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-3.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-3.js - * @description Object.freeze - the extensions of 'O' is prevented already - */ - - -function testcase() { - - var obj = {}; - - obj.foo = 10; // default value of attributes: writable: true, enumerable: true - - Object.preventExtensions(obj); - - Object.freeze(obj); - return Object.isFrozen(obj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.3.9-4-3 +description: Object.freeze - the extensions of 'O' is prevented already +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + obj.foo = 10; // default value of attributes: writable: true, enumerable: true + + Object.preventExtensions(obj); + + Object.freeze(obj); + return Object.isFrozen(obj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.3/S15.2.3_A1.js b/test/suite/ch15/15.2/15.2.3/S15.2.3_A1.js index ec0659bf8c..0b7564f500 100644 --- a/test/suite/ch15/15.2/15.2.3/S15.2.3_A1.js +++ b/test/suite/ch15/15.2/15.2.3/S15.2.3_A1.js @@ -1,14 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object constructor has the property "prototype" - * - * @path ch15/15.2/15.2.3/S15.2.3_A1.js - * @description Checking existence of the property "prototype" - */ +/*--- +info: The Object constructor has the property "prototype" +es5id: 15.2.3_A1 +description: Checking existence of the property "prototype" +---*/ if(!Object.hasOwnProperty("prototype")){ $ERROR('#1: The Object constructor has the property "prototype"'); } - diff --git a/test/suite/ch15/15.2/15.2.3/S15.2.3_A2.js b/test/suite/ch15/15.2/15.2.3/S15.2.3_A2.js index 93a8e92a59..e2a0dfa490 100644 --- a/test/suite/ch15/15.2/15.2.3/S15.2.3_A2.js +++ b/test/suite/ch15/15.2/15.2.3/S15.2.3_A2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Object constructor - * is the Function prototype object - * - * @path ch15/15.2/15.2.3/S15.2.3_A2.js - * @description Checking Function.prototype.isPrototypeOf(Object) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Object constructor + is the Function prototype object +es5id: 15.2.3_A2 +description: Checking Function.prototype.isPrototypeOf(Object) +---*/ // CHECK# if (!(Function.prototype.isPrototypeOf(Object))) { $ERROR('#1: the value of the internal [[Prototype]] property of the Object constructor is the Function prototype object.'); } - diff --git a/test/suite/ch15/15.2/15.2.3/S15.2.3_A3.js b/test/suite/ch15/15.2/15.2.3/S15.2.3_A3.js index 6ad395b04e..0c72e32832 100644 --- a/test/suite/ch15/15.2/15.2.3/S15.2.3_A3.js +++ b/test/suite/ch15/15.2/15.2.3/S15.2.3_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object constructor has length property whose value is 1 - * - * @path ch15/15.2/15.2.3/S15.2.3_A3.js - * @description Checking Object.length - */ +/*--- +info: Object constructor has length property whose value is 1 +es5id: 15.2.3_A3 +description: Checking Object.length +---*/ //CHECK#1 if(!Object.hasOwnProperty("length")){ @@ -17,4 +16,3 @@ if(!Object.hasOwnProperty("length")){ if (Object.length !== 1) { $ERROR('#2: Object.length property value should be 1'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-1.js index 4cab4855c1..3750a959f5 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-1.js - * @description Object.prototype.toString - '[object Undefined]' will be returned when 'this' value is undefined - */ - - -function testcase() { - return Object.prototype.toString.call(undefined) === "[object Undefined]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.4.2-1-1 +description: > + Object.prototype.toString - '[object Undefined]' will be returned + when 'this' value is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + return Object.prototype.toString.call(undefined) === "[object Undefined]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-2.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-2.js index 38cb9c506c..ad38be59fe 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-2.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-2.js - * @description Object.prototype.toString - '[object Undefined]' will be returned when 'this' value is undefined - */ - - -function testcase() { - return Object.prototype.toString.apply(undefined, []) === "[object Undefined]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.4.2-1-2 +description: > + Object.prototype.toString - '[object Undefined]' will be returned + when 'this' value is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + return Object.prototype.toString.apply(undefined, []) === "[object Undefined]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-1.js index 91d8b635b2..14f17b5400 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-1.js - * @description Object.prototype.toString - '[object Null]' will be returned when 'this' value is null - */ - - -function testcase() { - return Object.prototype.toString.call(null) === "[object Null]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.4.2-2-1 +description: > + Object.prototype.toString - '[object Null]' will be returned when + 'this' value is null +includes: [runTestCase.js] +---*/ + +function testcase() { + return Object.prototype.toString.call(null) === "[object Null]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-2.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-2.js index d52724e089..e2b7b33348 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-2.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-2.js - * @description Object.prototype.toString - '[object Null]' will be returned when 'this' value is null - */ - - -function testcase() { - return Object.prototype.toString.apply(null, []) === "[object Null]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.4.2-2-2 +description: > + Object.prototype.toString - '[object Null]' will be returned when + 'this' value is null +includes: [runTestCase.js] +---*/ + +function testcase() { + return Object.prototype.toString.apply(null, []) === "[object Null]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A1.js index 5f849a63e1..dccb405cf6 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A1.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the toString method is called, the following steps are taken: - * i) Get the [[Class]] property of this object - * ii) Compute a string value by concatenating the three strings "[object ", Result(1), and "]" - * iii) Return Result(2) - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A1.js - * @description Checking the type of Object.prototype.toString and the returned result - */ +/*--- +info: > + When the toString method is called, the following steps are taken: + i) Get the [[Class]] property of this object + ii) Compute a string value by concatenating the three strings "[object ", Result(1), and "]" + iii) Return Result(2) +es5id: 15.2.4.2_A1 +description: > + Checking the type of Object.prototype.toString and the returned + result +---*/ //CHECK#1 if (typeof Object.prototype.toString !== "function") { @@ -25,4 +27,3 @@ if (Object.prototype.toString() !=="[object "+"Object"+"]") { if ({}.toString()!=="[object "+"Object"+"]") { $ERROR('#3: return a string value by concatenating the three strings "[object ", the [[Class]] property of this object, and "]"'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A10.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A10.js index 7a3010dfb9..a97f7f79da 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A10.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A10.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.toString.length property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A10.js - * @description Checking if varying the Object.prototype.toString.length property fails - * @noStrict - */ +/*--- +info: The Object.prototype.toString.length property has the attribute ReadOnly +es5id: 15.2.4.2_A10 +description: > + Checking if varying the Object.prototype.toString.length property + fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Object.prototype.toString.hasOwnProperty('length'))) { @@ -22,4 +24,3 @@ Object.prototype.toString.length = function(){return "shifted";}; if (Object.prototype.toString.length !== obj) { $ERROR('#2: the Object.prototype.toString length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A11.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A11.js index fc2281b409..a73e93a7d2 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A11.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toString method is 0 - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A11.js - * @description Checking the Object.prototype.toString.length property - */ +/*--- +info: The length property of the toString method is 0 +es5id: 15.2.4.2_A11 +description: Checking the Object.prototype.toString.length property +---*/ //CHECK#1 if (!(Object.prototype.toString.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Object.prototype.toString.hasOwnProperty("length"))) { if (Object.prototype.toString.length !== 0) { $ERROR('#2: The length property of the toString method is 0'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A12.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A12.js index 239afb792c..2986526b2c 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A12.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A12.js @@ -1,12 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A12.js - * @description If the this value is undefined, return "[object Undefined]". - */ +/*--- +es5id: 15.2.4.2_A12 +description: If the this value is undefined, return "[object Undefined]". +---*/ if (Object.prototype.toString.call(undefined) !== "[object Undefined]") { $ERROR('If the this value is undefined, return "[object Undefined]".'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A13.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A13.js index a68665c2a8..9f414791fd 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A13.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A13.js @@ -1,12 +1,11 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A13.js - * @description If the this value is null, return "[object Null]". - */ +/*--- +es5id: 15.2.4.2_A13 +description: If the this value is null, return "[object Null]". +---*/ if (Object.prototype.toString.call(null) !== "[object Null]") { $ERROR('If the this value is null, return "[object Null]".'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A14.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A14.js index 4469b7c017..86e338520d 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A14.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A14.js @@ -1,13 +1,14 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A14.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - */ +/*--- +es5id: 15.2.4.2_A14 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +---*/ if (Object.prototype.toString.call(33) !== "[object Number]") { $ERROR('Let O be the result of calling ToObject passing the this ' + 'value as the argument.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A15.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A15.js index 59753fa011..37eedc92a8 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A15.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A15.js @@ -1,13 +1,14 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A15.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - */ +/*--- +es5id: 15.2.4.2_A15 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +---*/ if (Object.prototype.toString.call(true) !== "[object Boolean]") { $ERROR('Let O be the result of calling ToObject passing the this ' + 'value as the argument.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A16.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A16.js index 917e8965b5..c1081121ca 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A16.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A16.js @@ -1,13 +1,14 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A16.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - */ +/*--- +es5id: 15.2.4.2_A16 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +---*/ if (Object.prototype.toString.call('foo') !== "[object String]") { $ERROR('Let O be the result of calling ToObject passing the this ' + 'value as the argument.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A6.js index 2e11f8252e..08a81d649f 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.toString has not prototype property - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A6.js - * @description Checking if obtaining the prototype property of Object.prototype.toString fails - */ +/*--- +info: Object.prototype.toString has not prototype property +es5id: 15.2.4.2_A6 +description: > + Checking if obtaining the prototype property of + Object.prototype.toString fails +---*/ //CHECK#1 if (Object.prototype.toString.prototype !== undefined) { $ERROR('#1: Object.prototype.toString has not prototype property'+Object.prototype.toString.prototype); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A7.js index 9491331779..df58ac94dc 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.toString can't be used as a constructor - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A7.js - * @description Checking if creating "new Object.prototype.toString" fails - */ +/*--- +info: Object.prototype.toString can't be used as a constructor +es5id: 15.2.4.2_A7 +description: Checking if creating "new Object.prototype.toString" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Object.prototype.toString; @@ -16,4 +18,3 @@ try { } catch (e) { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A8.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A8.js index dc4fbc4c80..bc97bd6989 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A8.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.toString.length property has the attribute DontEnum - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A8.js - * @description Checking if enumerating the Object.prototype.toString.length property fails - */ +/*--- +info: The Object.prototype.toString.length property has the attribute DontEnum +es5id: 15.2.4.2_A8 +description: > + Checking if enumerating the Object.prototype.toString.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.toString.hasOwnProperty('length'))) { @@ -25,4 +27,3 @@ for (var p in Object.prototype.toString){ $ERROR('#2: the Object.prototype.toString.length property has the attributes DontEnum'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A9.js b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A9.js index 54fc689070..5517272613 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A9.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.toString.length property has the attribute DontDelete - * - * @path ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A9.js - * @description Checknig if deleting of the Object.prototype.toString.length property fails - * @noStrict - */ +/*--- +info: The Object.prototype.toString.length property has the attribute DontDelete +es5id: 15.2.4.2_A9 +description: > + Checknig if deleting of the Object.prototype.toString.length + property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.toString.hasOwnProperty('length'))) { @@ -23,4 +25,3 @@ if (delete Object.prototype.toString.length) { if (!(Object.prototype.toString.hasOwnProperty('length'))) { $FAIL('#2: The Object.prototype.toString.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A1.js index f849be7de8..9f81cd5987 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toLocaleString function returns the result of calling toString() - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A1.js - * @description Checking the type of Object.prototype.toLocaleString and the returned result - */ +/*--- +info: toLocaleString function returns the result of calling toString() +es5id: 15.2.4.3_A1 +description: > + Checking the type of Object.prototype.toLocaleString and the + returned result +---*/ //CHECK#1 if (typeof Object.prototype.toLocaleString !== "function") { @@ -22,4 +23,3 @@ if (Object.prototype.toLocaleString() !== Object.prototype.toString()) { if ({}.toLocaleString()!=={}.toString()) { $ERROR('#2: toLocaleString function returns the result of calling toString()'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A10.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A10.js index e6f73800ad..61c0ade127 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A10.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.toLocaleString.length property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A10.js - * @description Checking if varying the Object.prototype.toLocaleString.length property fails - */ +/*--- +info: > + The Object.prototype.toLocaleString.length property has the attribute + ReadOnly +es5id: 15.2.4.3_A10 +description: > + Checking if varying the Object.prototype.toLocaleString.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { @@ -21,4 +25,3 @@ Object.prototype.toLocaleString.length = function(){return "shifted";}; if (Object.prototype.toLocaleString.length !== obj) { $ERROR('#2: the Object.prototype.toLocaleString length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A11.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A11.js index 0d0f4108e8..41828b41fd 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A11.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toLocaleString method is 0 - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A11.js - * @description Checking the Object.prototype.toLocaleString.length - */ +/*--- +info: The length property of the toLocaleString method is 0 +es5id: 15.2.4.3_A11 +description: Checking the Object.prototype.toLocaleString.length +---*/ //CHECK#1 if (!(Object.prototype.toLocaleString.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Object.prototype.toLocaleString.hasOwnProperty("length"))) { if (Object.prototype.toLocaleString.length !== 0) { $ERROR('#2: The length property of the toLocaleString method is 0'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A12.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A12.js index 72f1422640..e88e23bc51 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A12.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A12.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A12.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.3_A12 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.toLocaleString.call(undefined); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A13.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A13.js index c5570753ce..c438ea539d 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A13.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A13.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A13.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.3_A13 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.toLocaleString.call(null); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A6.js index adb3ce9936..2ba0637806 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.toLocaleString has not prototype property - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A6.js - * @description Checking if obtaining the prototype property of Object.prototype.toLocaleString fails - */ +/*--- +info: Object.prototype.toLocaleString has not prototype property +es5id: 15.2.4.3_A6 +description: > + Checking if obtaining the prototype property of + Object.prototype.toLocaleString fails +---*/ //CHECK#1 if (Object.prototype.toLocaleString.prototype !== undefined) { $ERROR('#1: Object.prototype.toLocaleString has not prototype property'+Object.prototype.toLocaleString.prototype); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A7.js index 4a15a4413c..464d702fb3 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.toLocaleString can't be used as a constructor - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A7.js - * @description Checking if creating "new Object.prototype.toLocaleString" fails - */ +/*--- +info: Object.prototype.toLocaleString can't be used as a constructor +es5id: 15.2.4.3_A7 +description: Checking if creating "new Object.prototype.toLocaleString" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Object.prototype.toLocaleString; @@ -17,4 +19,3 @@ try { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A8.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A8.js index 646bcb4006..e5c10ec848 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A8.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.toLocaleString.length property has the attribute DontEnum - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A8.js - * @description Checking if enumerating the Object.prototype.toLocaleString.length property fails - */ +/*--- +info: > + The Object.prototype.toLocaleString.length property has the attribute + DontEnum +es5id: 15.2.4.3_A8 +description: > + Checking if enumerating the Object.prototype.toLocaleString.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { @@ -25,4 +29,3 @@ for (p in Object.prototype.toLocaleString){ $ERROR('#2: the Object.prototype.toLocaleString.length property has the attributes DontEnum'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A9.js b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A9.js index d5929c1b79..1eb87555b8 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A9.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A9.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.toLocaleString.length property has the attribute DontDelete - * - * @path ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A9.js - * @description Checknig if deleting of the Object.prototype.toLocaleString.length property fails - * @noStrict - */ +/*--- +info: > + The Object.prototype.toLocaleString.length property has the attribute + DontDelete +es5id: 15.2.4.3_A9 +description: > + Checknig if deleting of the Object.prototype.toLocaleString.length + property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { @@ -23,4 +27,3 @@ if (delete Object.prototype.toLocaleString.length) { if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { $FAIL('#2: The Object.prototype.toLocaleString.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-1.js index b2f92f7f71..b1de63a3cc 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-1.js - * @description Object.prototype.valueOf - typeof Object.prototype.valueOf.call(true)==="object" - */ - - -function testcase() { - return (typeof Object.prototype.valueOf.call(true)) === "object"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.4.4-1 +description: > + Object.prototype.valueOf - typeof + Object.prototype.valueOf.call(true)==="object" +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof Object.prototype.valueOf.call(true)) === "object"; +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-2.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-2.js index 791f5ce69c..bb9a449fdf 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-2.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.2/15.2.4/15.2.4.4/15.2.4.4-2.js - * @description Object.prototype.valueOf - typeof Object.prototype.valueOf.call(false)==="object" - */ - - -function testcase() { - return (typeof Object.prototype.valueOf.call(false)) === "object"; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.2.4.4-2 +description: > + Object.prototype.valueOf - typeof + Object.prototype.valueOf.call(false)==="object" +includes: [runTestCase.js] +---*/ + +function testcase() { + return (typeof Object.prototype.valueOf.call(false)) === "object"; +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A10.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A10.js index e0b39e076b..4e85b00fde 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A10.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.valueOf.length property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A10.js - * @description Checking if varying the Object.prototype.valueOf.length property fails - */ +/*--- +info: The Object.prototype.valueOf.length property has the attribute ReadOnly +es5id: 15.2.4.4_A10 +description: > + Checking if varying the Object.prototype.valueOf.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { @@ -21,4 +23,3 @@ Object.prototype.valueOf.length = function(){return "shifted";}; if (Object.prototype.valueOf.length !== obj) { $ERROR('#2: the Object.prototype.valueOf length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A11.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A11.js index 2ecde7c52d..7ed73a36d5 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A11.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the valueOf method is 0 - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A11.js - * @description Checking the Object.prototype.valueOf.length - */ +/*--- +info: The length property of the valueOf method is 0 +es5id: 15.2.4.4_A11 +description: Checking the Object.prototype.valueOf.length +---*/ //CHECK#1 if (!(Object.prototype.valueOf.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Object.prototype.valueOf.hasOwnProperty("length"))) { if (Object.prototype.valueOf.length !== 0) { $ERROR('#2: The length property of the toObject method is 0'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A12.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A12.js index b2bec26f37..e620e6da84 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A12.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A12.js @@ -1,13 +1,13 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let O be the result of calling ToObject passing the this value as the argument. - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A12.js - * @description Checking Object.prototype.valueOf invoked by the 'call' property. - * @negative - */ +/*--- +info: > + Let O be the result of calling ToObject passing the this value as the + argument. +es5id: 15.2.4.4_A12 +description: Checking Object.prototype.valueOf invoked by the 'call' property. +flags: [negative] +---*/ Object.prototype.valueOf.call(undefined); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A13.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A13.js index a9842e5a25..b60d60537d 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A13.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A13.js @@ -1,13 +1,13 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let O be the result of calling ToObject passing the this value as the argument. - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A13.js - * @description Checking Object.prototype.valueOf invoked by the 'call' property. - * @negative - */ +/*--- +info: > + Let O be the result of calling ToObject passing the this value as the + argument. +es5id: 15.2.4.4_A13 +description: Checking Object.prototype.valueOf invoked by the 'call' property. +flags: [negative] +---*/ Object.prototype.valueOf.call(null); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A14.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A14.js index e3d1fd7d7c..1f1df5b7a2 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A14.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A14.js @@ -1,13 +1,13 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let O be the result of calling ToObject passing the this value as the argument. - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A14.js - * @description Checking Object.prototype.valueOf invoked by the 'call' property. - * @negative - */ +/*--- +info: > + Let O be the result of calling ToObject passing the this value as the + argument. +es5id: 15.2.4.4_A14 +description: Checking Object.prototype.valueOf invoked by the 'call' property. +flags: [negative] +---*/ (1,Object.prototype.valueOf)(); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A15.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A15.js index 1e26f05f59..b95ec31965 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A15.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A15.js @@ -1,14 +1,14 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Let O be the result of calling ToObject passing the this value as the argument. - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A15.js - * @description Checking Object.prototype.valueOf when called as a global function. - * @negative - */ +/*--- +info: > + Let O be the result of calling ToObject passing the this value as the + argument. +es5id: 15.2.4.4_A15 +description: Checking Object.prototype.valueOf when called as a global function. +flags: [negative] +---*/ var v = Object.prototype.valueOf; v(); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T1.js index 5f0dd6f276..b138c58dc4 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T1.js - * @description "this" value is a number - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T1 +description: "\"this\" value is a number" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!==1.1) { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T2.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T2.js index c5c88ff051..7cddd7100a 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T2.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T2.js - * @description "this" value is a boolean - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T2 +description: "\"this\" value is a boolean" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!==true) { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T3.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T3.js index 66b9aa6d89..0374674c8c 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T3.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T3.js - * @description "this" value is a string - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T3 +description: "\"this\" value is a string" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!=="greenfield") { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T4.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T4.js index 9c7b3b4df5..0c1e630620 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T4.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T4.js - * @description "this" value is an object - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T4 +description: "\"this\" value is an object" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!==obj) { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T5.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T5.js index a227c41dd8..4ab7b5b4f5 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T5.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T5.js - * @description "this" value is "null" - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T5 +description: "\"this\" value is \"null\"" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!==obj) { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T6.js index f4b989c30a..bbf95febdd 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T6.js - * @description "this" value is "undefined" - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T6 +description: "\"this\" value is \"undefined\"" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!==obj) { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T7.js index 4e7cd73539..e8a2460646 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf method returns its "this" value - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A1_T7.js - * @description "this" value is "void 0" - */ +/*--- +info: The valueOf method returns its "this" value +es5id: 15.2.4.4_A1_T7 +description: "\"this\" value is \"void 0\"" +---*/ //CHECK#1 if (typeof Object.prototype.valueOf !== "function") { @@ -24,5 +23,3 @@ if (typeof obj.valueOf !== "function") { if (obj.valueOf()!==obj) { $ERROR('#3: The valueOf method returns its this value'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A6.js index f53fbaaaa3..b9cc6e21f9 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.valueOf has not prototype property - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A6.js - * @description Checking if obtaining the prototype property of Object.prototype.valueOf fails - */ +/*--- +info: Object.prototype.valueOf has not prototype property +es5id: 15.2.4.4_A6 +description: > + Checking if obtaining the prototype property of + Object.prototype.valueOf fails +---*/ //CHECK#1 if (Object.prototype.valueOf.prototype !== undefined) { $ERROR('#1: Object.prototype.valueOf has not prototype property'+Object.prototype.valueOf.prototype); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A7.js index 23be75a1b3..4b7bd6d822 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.valueOf can't be used as a constructor - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A7.js - * @description Checking if creating "new Object.prototype.valueOf" fails - */ +/*--- +info: Object.prototype.valueOf can't be used as a constructor +es5id: 15.2.4.4_A7 +description: Checking if creating "new Object.prototype.valueOf" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Object.prototype.valueOf; @@ -17,4 +19,3 @@ try { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A8.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A8.js index 7872afa5e6..de6d6322e0 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A8.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.valueOf.length property has the attribute DontEnum - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A8.js - * @description Checking if enumerating the Object.prototype.valueOf.length property fails - */ +/*--- +info: The Object.prototype.valueOf.length property has the attribute DontEnum +es5id: 15.2.4.4_A8 +description: > + Checking if enumerating the Object.prototype.valueOf.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { @@ -25,4 +27,3 @@ for (p in Object.prototype.valueOf){ $ERROR('#2: the Object.prototype.valueOf.length property has the attributes DontEnum'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A9.js b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A9.js index 709a3313eb..c1dc9e1b27 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A9.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.valueOf.length property has the attribute DontDelete - * - * @path ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A9.js - * @description Checknig if deleting of the Object.prototype.valueOf.length property fails - * @noStrict - */ +/*--- +info: The Object.prototype.valueOf.length property has the attribute DontDelete +es5id: 15.2.4.4_A9 +description: > + Checknig if deleting of the Object.prototype.valueOf.length + property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { @@ -23,4 +25,3 @@ if (delete Object.prototype.valueOf.length) { if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { $FAIL('#2: The Object.prototype.valueOf.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A10.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A10.js index 70a0ca21e8..d7e3f2c3f1 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A10.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.hasOwnProperty.length property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A10.js - * @description Checking if varying the Object.prototype.hasOwnProperty.length property fails - */ +/*--- +info: > + The Object.prototype.hasOwnProperty.length property has the attribute + ReadOnly +es5id: 15.2.4.5_A10 +description: > + Checking if varying the Object.prototype.hasOwnProperty.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) { @@ -21,4 +25,3 @@ Object.prototype.hasOwnProperty.length = function(){return "shifted";}; if (Object.prototype.hasOwnProperty.length !== obj) { $ERROR('#2: the Object.prototype.hasOwnProperty length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A11.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A11.js index 176f74c252..5cc9e47507 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A11.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the hasOwnProperty method is 1 - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A11.js - * @description Checking the Object.prototype.hasOwnProperty.length - */ +/*--- +info: The length property of the hasOwnProperty method is 1 +es5id: 15.2.4.5_A11 +description: Checking the Object.prototype.hasOwnProperty.length +---*/ //CHECK#1 if (!(Object.prototype.hasOwnProperty.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Object.prototype.hasOwnProperty.hasOwnProperty("length"))) { if (Object.prototype.hasOwnProperty.length !== 1) { $ERROR('#2: The length property of the toObject method is 1'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A12.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A12.js index aa0ab49297..a873a36cc7 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A12.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A12.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A12.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.5_A12 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.hasOwnProperty.call(undefined, 'foo'); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A13.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A13.js index 68b75b0e7b..a2264a9a91 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A13.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A13.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A13.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.5_A13 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.hasOwnProperty.call(null, 'foo'); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T1.js index f860127284..c85884bd9c 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T1.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the hasOwnProperty method is called with argument V, the following steps are taken: - * i) Let O be this object - * ii) Call ToString(V) - * iii) If O doesn't have a property with the name given by Result(ii), return false - * iv) Return true - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T1.js - * @description Checking type of the Object.prototype.hasOwnProperty and the returned result - */ +/*--- +info: > + When the hasOwnProperty method is called with argument V, the following steps are taken: + i) Let O be this object + ii) Call ToString(V) + iii) If O doesn't have a property with the name given by Result(ii), return false + iv) Return true +es5id: 15.2.4.5_A1_T1 +description: > + Checking type of the Object.prototype.hasOwnProperty and the + returned result +---*/ //CHECK#1 if (typeof Object.prototype.hasOwnProperty !== "function") { @@ -22,4 +24,3 @@ if (!(Object.prototype.hasOwnProperty("hasOwnProperty"))) { $ERROR('#2: hasOwnProperty method works properly'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T2.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T2.js index 860cd49361..7cb1cc8cad 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T2.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T2.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the hasOwnProperty method is called with argument V, the following steps are taken: - * i) Let O be this object - * ii) Call ToString(V) - * iii) If O doesn't have a property with the name given by Result(ii), return false - * iv) Return true - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T2.js - * @description Argument of the hasOwnProperty method is a custom boolean property - */ +/*--- +info: > + When the hasOwnProperty method is called with argument V, the following steps are taken: + i) Let O be this object + ii) Call ToString(V) + iii) If O doesn't have a property with the name given by Result(ii), return false + iv) Return true +es5id: 15.2.4.5_A1_T2 +description: Argument of the hasOwnProperty method is a custom boolean property +---*/ //CHECK#1 if (typeof Object.prototype.hasOwnProperty !== "function") { @@ -34,4 +34,3 @@ if (!(obj.hasOwnProperty("the_property"))) { $ERROR('#4: hasOwnProperty method works properly'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T3.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T3.js index cb6cb43bf5..cc6b333901 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T3.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T3.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the hasOwnProperty method is called with argument V, the following steps are taken: - * i) Let O be this object - * ii) Call ToString(V) - * iii) If O doesn't have a property with the name given by Result(ii), return false - * iv) Return true - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A1_T3.js - * @description Argument of the hasOwnProperty method is a custom property of a function object - */ +/*--- +info: > + When the hasOwnProperty method is called with argument V, the following steps are taken: + i) Let O be this object + ii) Call ToString(V) + iii) If O doesn't have a property with the name given by Result(ii), return false + iv) Return true +es5id: 15.2.4.5_A1_T3 +description: > + Argument of the hasOwnProperty method is a custom property of a + function object +---*/ var FACTORY = function(){ this.aproperty = 1; @@ -37,5 +39,3 @@ if (instance.hasOwnProperty("toString")) { if (!(instance.hasOwnProperty("aproperty"))) { $ERROR('#4: hasOwnProperty method works properly'); } - - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A6.js index 2af4fa7669..e494320031 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.hasOwnProperty has not prototype property - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A6.js - * @description Checking if obtaining the prototype property of Object.prototype.hasOwnProperty fails - */ +/*--- +info: Object.prototype.hasOwnProperty has not prototype property +es5id: 15.2.4.5_A6 +description: > + Checking if obtaining the prototype property of + Object.prototype.hasOwnProperty fails +---*/ //CHECK#1 if (Object.prototype.hasOwnProperty.prototype !== undefined) { $ERROR('#1: Object.prototype.hasOwnProperty has not prototype property'+Object.prototype.hasOwnProperty.prototype); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A7.js index d4543791ae..62c077b989 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.hasOwnProperty can't be used as a constructor - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A7.js - * @description Checking if creating "new Object.prototype.hasOwnProperty" fails - */ +/*--- +info: Object.prototype.hasOwnProperty can't be used as a constructor +es5id: 15.2.4.5_A7 +description: Checking if creating "new Object.prototype.hasOwnProperty" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Object.prototype.hasOwnProperty; @@ -17,4 +19,3 @@ try { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A8.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A8.js index d1e2452967..b6181e4e5e 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A8.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.hasOwnProperty.length property has the attribute DontEnum - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A8.js - * @description Checking if enumerating the Object.prototype.hasOwnProperty.length property fails - */ +/*--- +info: > + The Object.prototype.hasOwnProperty.length property has the attribute + DontEnum +es5id: 15.2.4.5_A8 +description: > + Checking if enumerating the Object.prototype.hasOwnProperty.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) { @@ -25,4 +29,3 @@ for (p in Object.prototype.hasOwnProperty){ $ERROR('#2: the Object.prototype.hasOwnProperty.length property has the attributes DontEnum'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A9.js b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A9.js index c32d75ff87..59e3eeb71c 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A9.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.hasOwnProperty.length property has the attribute DontDelete - * - * @path ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A9.js - * @description Checking if deleting the Object.prototype.hasOwnProperty.length property fails - */ +/*--- +info: > + The Object.prototype.hasOwnProperty.length property has the attribute + DontDelete +es5id: 15.2.4.5_A9 +description: > + Checking if deleting the Object.prototype.hasOwnProperty.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) { @@ -22,4 +26,3 @@ if (delete Object.prototype.hasOwnProperty.length) { if (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) { $FAIL('#2: The Object.prototype.hasOwnProperty.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A1.js index accc8ba7d7..65a3bb3acd 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the isPrototypeOf method is called with argument V and when O and - * V refer to the same object or to objects joined to each other, return true - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A1.js - * @description Creating two objects with the same prototype - */ +/*--- +info: > + When the isPrototypeOf method is called with argument V and when O and + V refer to the same object or to objects joined to each other, return true +es5id: 15.2.4.6_A1 +description: Creating two objects with the same prototype +includes: [$PRINT.js] +---*/ function USER_FACTORY( name ) { this.name = name; @@ -51,4 +52,3 @@ if(Number.isPrototypeOf(luke)){ } // ///////// - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A10.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A10.js index 81609c8dc2..6ace571c50 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A10.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A10.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.isPrototypeOf.length property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A10.js - * @description Checking if varying the Object.prototype.isPrototypeOf.length property fails - * @noStrict - */ +/*--- +info: > + The Object.prototype.isPrototypeOf.length property has the attribute + ReadOnly +es5id: 15.2.4.6_A10 +description: > + Checking if varying the Object.prototype.isPrototypeOf.length + property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) { @@ -22,4 +26,3 @@ Object.prototype.isPrototypeOf.length = function(){return "shifted";}; if (Object.prototype.isPrototypeOf.length !== obj) { $ERROR('#2: the Object.prototype.isPrototypeOf length property has the attributes ReadOnly'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A11.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A11.js index 71200a579a..dcd5e13e4e 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A11.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the hasOwnProperty method is 1 - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A11.js - * @description Checking the Object.prototype.hasOwnProperty.length - */ +/*--- +info: The length property of the hasOwnProperty method is 1 +es5id: 15.2.4.6_A11 +description: Checking the Object.prototype.hasOwnProperty.length +---*/ //CHECK#1 if (!(Object.prototype.isPrototypeOf.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Object.prototype.isPrototypeOf.hasOwnProperty("length"))) { if (Object.prototype.isPrototypeOf.length !== 1) { $ERROR('#2: The length property of the toObject method is 1'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A12.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A12.js index e81cd68d11..ada5deb3b1 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A12.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A12.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A12.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.6_A12 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.isPrototypeOf.call(undefined, {}); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A13.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A13.js index 1a37cecdd6..f2fd45dd3a 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A13.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A13.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A13.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.6_A13 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.isPrototypeOf.call(null, {}); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A6.js index b55044497d..dd63755a1f 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.isPrototypeOf has not prototype property - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A6.js - * @description Checking if obtaining the prototype property of Object.prototype.isPrototypeOf fails - */ +/*--- +info: Object.prototype.isPrototypeOf has not prototype property +es5id: 15.2.4.6_A6 +description: > + Checking if obtaining the prototype property of + Object.prototype.isPrototypeOf fails +---*/ //CHECK#1 if (Object.prototype.isPrototypeOf.prototype !== undefined) { $ERROR('#1: Object.prototype.isPrototypeOf has not prototype property'+Object.prototype.isPrototypeOf.prototype); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A7.js index 537ee1bb19..be11ead07c 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.isPrototypeOf can't be used as a constructor - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A7.js - * @description Checking if creating new "Object.prototype.isPrototypeOf" fails - */ +/*--- +info: Object.prototype.isPrototypeOf can't be used as a constructor +es5id: 15.2.4.6_A7 +description: Checking if creating new "Object.prototype.isPrototypeOf" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Object.prototype.isPrototypeOf; @@ -17,4 +19,3 @@ try { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A8.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A8.js index 17c7e1e129..44a27f6bc9 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A8.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.isPrototypeOf.length property has the attribute DontEnum - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A8.js - * @description Checknig if enumerating the Object.prototype.isPrototypeOf.length property fails - */ +/*--- +info: > + The Object.prototype.isPrototypeOf.length property has the attribute + DontEnum +es5id: 15.2.4.6_A8 +description: > + Checknig if enumerating the Object.prototype.isPrototypeOf.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) { @@ -25,4 +29,3 @@ for (p in Object.prototype.isPrototypeOf){ $ERROR('#2: the Object.prototype.isPrototypeOf.length property has the attributes DontEnum'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A9.js b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A9.js index fe93b264d1..640b2d1ddf 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A9.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.isPrototypeOf.length property has the attribute DontDelete - * - * @path ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A9.js - * @description Checking deleting the Object.prototype.isPrototypeOf.length property fails - */ +/*--- +info: > + The Object.prototype.isPrototypeOf.length property has the attribute + DontDelete +es5id: 15.2.4.6_A9 +description: > + Checking deleting the Object.prototype.isPrototypeOf.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) { @@ -18,4 +22,3 @@ if (delete Object.prototype.isPrototypeOf.length) { $ERROR('#1: The Object.prototype.isPrototypeOf.length property has the attributes DontDelete'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A10.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A10.js index a375a71ae9..876a17131f 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A10.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A10.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.propertyIsEnumerable.length property has the attribute ReadOnly - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A10.js - * @description Checking if varying the Object.prototype.propertyIsEnumerable.length property fails - * @noStrict - */ +/*--- +info: > + The Object.prototype.propertyIsEnumerable.length property has the + attribute ReadOnly +es5id: 15.2.4.7_A10 +description: > + Checking if varying the + Object.prototype.propertyIsEnumerable.length property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { @@ -22,4 +26,3 @@ Object.prototype.propertyIsEnumerable.length = function(){return "shifted";}; if (Object.prototype.propertyIsEnumerable.length !== obj) { $ERROR('#2: the Object.prototype.propertyIsEnumerable length property has the attributes ReadOnly'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A11.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A11.js index c6c54336ea..6c9cbe659b 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A11.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the hasOwnProperty method is 1 - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A11.js - * @description Checking the value of Object.prototype.hasOwnProperty.length - */ +/*--- +info: The length property of the hasOwnProperty method is 1 +es5id: 15.2.4.7_A11 +description: Checking the value of Object.prototype.hasOwnProperty.length +---*/ //CHECK#1 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty("length"))) { if (Object.prototype.propertyIsEnumerable.length !== 1) { $ERROR('#2: The length property of the toObject method is 1'); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A12.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A12.js index 6340475e3f..a7449b757d 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A12.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A12.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A12.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.7_A12 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.propertyIsEnumerable.call(undefined, 'foo'); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A13.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A13.js index d053e6ab45..99177cb25d 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A13.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A13.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A13.js - * @description Let O be the result of calling ToObject passing the this value as the argument. - * @negative - */ +/*--- +es5id: 15.2.4.7_A13 +description: > + Let O be the result of calling ToObject passing the this value as + the argument. +flags: [negative] +---*/ Object.prototype.propertyIsEnumerable.call(null, 'foo'); - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A1_T1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A1_T1.js index 455bab10ae..40f9f18079 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A1_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The propertyIsEnumerable method does not consider objects in the prototype chain - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A1_T1.js - * @description Calling the propertyIsEnumerable method for object in the prototype chain - */ +/*--- +info: > + The propertyIsEnumerable method does not consider objects in the + prototype chain +es5id: 15.2.4.7_A1_T1 +description: > + Calling the propertyIsEnumerable method for object in the + prototype chain +---*/ //CHECK#1 if (typeof Object.prototype.propertyIsEnumerable !== "function") { @@ -36,4 +39,3 @@ if (seagull.propertyIsEnumerable("rootprop")) { $ERROR('#4: propertyIsEnumerable method does not consider objects in the prototype chain'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T1.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T1.js index b7a328f79d..42df9a3d5f 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T1.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T1.js @@ -1,17 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the propertyIsEnumerable method is called with argument V, the following steps are taken: - * i) Let O be this object - * ii) Call ToString(V) - * iii) If O doesn't have a property with the name given by Result(ii), return false - * iv) If the property has the DontEnum attribute, return false - * v) Return true - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T1.js - * @description Checking the type of Object.prototype.propertyIsEnumerable and the returned result - */ +/*--- +info: > + When the propertyIsEnumerable method is called with argument V, the following steps are taken: + i) Let O be this object + ii) Call ToString(V) + iii) If O doesn't have a property with the name given by Result(ii), return false + iv) If the property has the DontEnum attribute, return false + v) Return true +es5id: 15.2.4.7_A2_T1 +description: > + Checking the type of Object.prototype.propertyIsEnumerable and the + returned result +---*/ //CHECK#1 if (typeof Object.prototype.propertyIsEnumerable !== "function") { @@ -23,4 +25,3 @@ if (Object.prototype.propertyIsEnumerable("propertyIsEnumerable")) { $ERROR('#2: hasOwnProperty method works properly'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T2.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T2.js index 373880b83a..fc3900f2a5 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T2.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T2.js @@ -1,17 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the propertyIsEnumerable method is called with argument V, the following steps are taken: - * i) Let O be this object - * ii) Call ToString(V) - * iii) If O doesn't have a property with the name given by Result(ii), return false - * iv) If the property has the DontEnum attribute, return false - * v) Return true - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A2_T2.js - * @description Argument of the propertyIsEnumerable method is a custom boolean property - */ +/*--- +info: > + When the propertyIsEnumerable method is called with argument V, the following steps are taken: + i) Let O be this object + ii) Call ToString(V) + iii) If O doesn't have a property with the name given by Result(ii), return false + iv) If the property has the DontEnum attribute, return false + v) Return true +es5id: 15.2.4.7_A2_T2 +description: > + Argument of the propertyIsEnumerable method is a custom boolean + property +---*/ //CHECK#1 if (typeof Object.prototype.propertyIsEnumerable !== "function") { @@ -39,4 +41,3 @@ if (accum.indexOf("the_property")!==0) { $ERROR('#4: enumerating works properly'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A6.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A6.js index 0e74d7a83f..4e093cda92 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A6.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.propertyIsEnumerable has not prototype property - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A6.js - * @description Checking if obtaining the prototype property of Object.prototype.propertyIsEnumerable fails - */ +/*--- +info: Object.prototype.propertyIsEnumerable has not prototype property +es5id: 15.2.4.7_A6 +description: > + Checking if obtaining the prototype property of + Object.prototype.propertyIsEnumerable fails +---*/ //CHECK#1 if (Object.prototype.propertyIsEnumerable.prototype !== undefined) { $ERROR('#1: Object.prototype.propertyIsEnumerable has not prototype property'+Object.prototype.propertyIsEnumerable.prototype); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A7.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A7.js index 6c0974bfd7..466e27dcc4 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A7.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A7.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object.prototype.propertyIsEnumerable can't be used as a constructor - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A7.js - * @description Checking if creating "new Object.prototype.propertyIsEnumerable" fails - */ +/*--- +info: Object.prototype.propertyIsEnumerable can't be used as a constructor +es5id: 15.2.4.7_A7 +description: > + Checking if creating "new Object.prototype.propertyIsEnumerable" + fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Object.prototype.propertyIsEnumerable; @@ -17,4 +21,3 @@ try { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A8.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A8.js index e83f04365b..211eb3581f 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A8.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.propertyIsEnumerable.length property has the attribute DontEnum - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A8.js - * @description Checking if enumerating the Object.prototype.propertyIsEnumerable.length property fails - */ +/*--- +info: > + The Object.prototype.propertyIsEnumerable.length property has the + attribute DontEnum +es5id: 15.2.4.7_A8 +description: > + Checking if enumerating the + Object.prototype.propertyIsEnumerable.length property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { @@ -25,4 +29,3 @@ for (p in Object.prototype.propertyIsEnumerable){ $ERROR('#2: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A9.js b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A9.js index 139add6136..54b3ff4a5f 100644 --- a/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A9.js +++ b/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Object.prototype.propertyIsEnumerable.length property has the attribute DontDelete - * - * @path ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A9.js - * @description Checking if deleting the Object.prototype.propertyIsEnumerable.length property fails - */ +/*--- +info: > + The Object.prototype.propertyIsEnumerable.length property has the + attribute DontDelete +es5id: 15.2.4.7_A9 +description: > + Checking if deleting the + Object.prototype.propertyIsEnumerable.length property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) { @@ -18,4 +22,3 @@ if (delete Object.prototype.propertyIsEnumerable.length) { $ERROR('#1: The Object.prototype.propertyIsEnumerable.length property has the attributes DontDelete'); } // - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T1.js b/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T1.js index 393c83870a..d4d5588b11 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Object.prototype.constructor is the built-in Object constructor - * - * @path ch15/15.2/15.2.4/S15.2.4.1_A1_T1.js - * @description Checking the Object.prototype.constructor - */ +/*--- +info: > + The initial value of Object.prototype.constructor is the built-in Object + constructor +es5id: 15.2.4.1_A1_T1 +description: Checking the Object.prototype.constructor +---*/ //CHECK#1 if (Object.prototype.constructor !== Object) { $ERROR('#1: The initial value of Object.prototype.constructor is the built-in Object constructor'); } - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T2.js b/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T2.js index df3b111f70..d8e774ba4f 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T2.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4.1_A1_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Object.prototype.constructor is the built-in Object constructor - * - * @path ch15/15.2/15.2.4/S15.2.4.1_A1_T2.js - * @description Creating "new Object.prototype.constructor" and checking its properties - */ +/*--- +info: > + The initial value of Object.prototype.constructor is the built-in Object + constructor +es5id: 15.2.4.1_A1_T2 +description: > + Creating "new Object.prototype.constructor" and checking its + properties +---*/ var constr = Object.prototype.constructor; @@ -37,4 +40,3 @@ if (obj.toString() !== to_string_result) { if (obj.valueOf().toString() !== to_string_result) { $ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.'); } - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T1.js b/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T1.js index cfdbafe9f3..9e975c0094 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T1.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object prototype object has not prototype - * - * @path ch15/15.2/15.2.4/S15.2.4_A1_T1.js - * @description Checking if obtaining Object.prototype.prototype fails - */ +/*--- +info: Object prototype object has not prototype +es5id: 15.2.4_A1_T1 +description: Checking if obtaining Object.prototype.prototype fails +---*/ // CHECK#1 if (Object.prototype.prototype !== undefined) { $ERROR('#1: Object prototype has not prototype'); } - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T2.js b/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T2.js index 1c6e97e24b..9fd0c15bb5 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T2.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object prototype object has not prototype - * - * @path ch15/15.2/15.2.4/S15.2.4_A1_T2.js - * @description Since the Object prototype object has not prototype, deleted toString method can not be found in prototype chain - */ +/*--- +info: Object prototype object has not prototype +es5id: 15.2.4_A1_T2 +description: > + Since the Object prototype object has not prototype, deleted + toString method can not be found in prototype chain +---*/ //CHECK#1 if (Object.prototype.toString() == false) { @@ -25,4 +26,3 @@ try { } } // - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4_A2.js b/test/suite/ch15/15.2/15.2.4/S15.2.4_A2.js index d0d5647cc2..b75a2f1d30 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4_A2.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4_A2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Class]] property of Object prototype object is "Object" - * - * @path ch15/15.2/15.2.4/S15.2.4_A2.js - * @description Getting the value of the internal [[Class]] property with Object.prototype.toString() function - */ +/*--- +info: > + The value of the internal [[Class]] property of Object prototype object + is "Object" +es5id: 15.2.4_A2 +description: > + Getting the value of the internal [[Class]] property with + Object.prototype.toString() function +---*/ var tostr = Object.prototype.toString(); @@ -14,4 +17,3 @@ var tostr = Object.prototype.toString(); if (tostr !== "[object Object]") { $ERROR('#1: the value of the internal [[Class]] property of Object prototype object is "Object"'); } - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4_A3.js b/test/suite/ch15/15.2/15.2.4/S15.2.4_A3.js index cd5dc8b2df..d289b2af21 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4_A3.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4_A3.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since the Object prototype object is not a function, it has not [[call]] method - * - * @path ch15/15.2/15.2.4/S15.2.4_A3.js - * @description Checking if calling Object prototype as a function fails - */ +/*--- +info: > + Since the Object prototype object is not a function, it has not [[call]] + method +es5id: 15.2.4_A3 +description: Checking if calling Object prototype as a function fails +includes: + - $PRINT.js + - $FAIL.js +---*/ //CHECK#1 try { @@ -15,4 +19,3 @@ try { } catch (e) { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/15.2.4/S15.2.4_A4.js b/test/suite/ch15/15.2/15.2.4/S15.2.4_A4.js index 34a95179c7..5e941575aa 100644 --- a/test/suite/ch15/15.2/15.2.4/S15.2.4_A4.js +++ b/test/suite/ch15/15.2/15.2.4/S15.2.4_A4.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since the Object prototype object is not a function, it has not [[create]] method - * - * @path ch15/15.2/15.2.4/S15.2.4_A4.js - * @description Checking if creating "new Object.prototype" fails - */ +/*--- +info: > + Since the Object prototype object is not a function, it has not + [[create]] method +es5id: 15.2.4_A4 +description: Checking if creating "new Object.prototype" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ //CHECK#1 try { @@ -15,4 +19,3 @@ try { } catch (e) { $PRINT(e); } - diff --git a/test/suite/ch15/15.2/S15.2_A1.js b/test/suite/ch15/15.2/S15.2_A1.js index 985b65afc7..6cbac35e03 100644 --- a/test/suite/ch15/15.2/S15.2_A1.js +++ b/test/suite/ch15/15.2/S15.2_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Object is the property of global - * - * @path ch15/15.2/S15.2_A1.js - * @description Checking if Object equals to this.Object - */ +/*--- +info: Object is the property of global +es5id: 15.2_A1 +description: Checking if Object equals to this.Object +---*/ var obj=Object; @@ -15,4 +14,3 @@ var thisobj=this.Object; if(obj!==thisobj){ $ERROR('Object is the property of global'); } - diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js index 442da6b2a0..fcedd396c6 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-4gs.js - * @description Strict Mode - SyntaxError is thrown if a function using the Function constructor has two identical parameters in (global) strict mode - * @onlyStrict - * @negative NotEarlyError - */ - -"use strict"; -throw NotEarlyError; -var _15_3_2_1_10_4_fun = new Function('param_1', 'param_2', 'param_1', '"use strict"; return 0;'); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-10-4gs +description: > + Strict Mode - SyntaxError is thrown if a function using the + Function constructor has two identical parameters in (global) + strict mode +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +"use strict"; +throw new Test262Error(); +var _15_3_2_1_10_4_fun = new Function('param_1', 'param_2', 'param_1', '"use strict"; return 0;'); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js index 950bd16a6f..32bb9a0e9b 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js @@ -1,15 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-10-6gs.js - * @description Strict Mode - SyntaxError is thrown if a function using the Function constructor has two identical parameters in (local) strict mode - * @onlyStrict - * @negative NotEarlyError - */ - -throw NotEarlyError; -var _15_3_2_1_10_6_fun = new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;'); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-10-6gs +description: > + Strict Mode - SyntaxError is thrown if a function using the + Function constructor has two identical parameters in (local) + strict mode +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +throw new Test262Error(); +var _15_3_2_1_10_6_fun = new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;'); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1-s.js index 4d6c194b02..7ae0b26a74 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1-s.js - * @description Duplicate seperate parameter name in Function constructor throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() { - try { - Function('a','a','"use strict";'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-1-s +description: > + Duplicate seperate parameter name in Function constructor throws + SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function('a','a','"use strict";'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js index f5a4f01760..6ff0a29bd1 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js - * @description Duplicate separate parameter name in Function constructor allowed if body not strict - */ - - -function testcase() -{ - Function('a','a','return;'); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-1 +description: > + Duplicate separate parameter name in Function constructor allowed + if body not strict +includes: [runTestCase.js] +---*/ + +function testcase() +{ + Function('a','a','return;'); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-2-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-2-s.js index 84d1f13850..dd2a4c297d 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-2-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-2-s.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-2-s.js - * @description Duplicate seperate parameter name in Function constructor called from strict mode allowed if body not strict - * @onlyStrict - */ - - -function testcase() -{ - "use strict"; - try { - Function('a','a','return;'); - return true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-2-s +description: > + Duplicate seperate parameter name in Function constructor called + from strict mode allowed if body not strict +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() +{ + "use strict"; + try { + Function('a','a','return;'); + return true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3-s.js index c01edad67d..f732742f63 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3-s.js - * @description Function constructor having a formal parameter named 'eval' throws SyntaxError if function body is strict mode - * @onlyStrict - */ - - -function testcase() { - - - try { - Function('eval', '"use strict";'); - return false; - } - catch (e) { - return (e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-3-s +description: > + Function constructor having a formal parameter named 'eval' throws + SyntaxError if function body is strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + + + try { + Function('eval', '"use strict";'); + return false; + } + catch (e) { + return (e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js index defc1c46e3..d73cca5294 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js - * @description Function constructor may have a formal parameter named 'eval' if body is not strict mode - */ - - -function testcase() { - Function('eval', 'return;'); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-3 +description: > + Function constructor may have a formal parameter named 'eval' if + body is not strict mode +includes: [runTestCase.js] +---*/ + +function testcase() { + Function('eval', 'return;'); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-4-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-4-s.js index 9521c6f42f..035e0e8eae 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-4-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-4-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-4-s.js - * @description Function constructor call from strict code with formal parameter named 'eval' does not throws SyntaxError if function body is not strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - Function('eval', 'return;'); - return true; - } catch (e) { - return false; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-4-s +description: > + Function constructor call from strict code with formal parameter + named 'eval' does not throws SyntaxError if function body is not + strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + Function('eval', 'return;'); + return true; + } catch (e) { + return false; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5-s.js index 27d157f651..db2d975ef3 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5-s.js - * @description Duplicate combined parameter name in Function constructor throws SyntaxError in strict mode - * @onlyStrict - */ - - -function testcase() -{ - try - { - Function('a,a','"use strict";'); - return false; - } - catch (e) { - return(e instanceof SyntaxError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-5-s +description: > + Duplicate combined parameter name in Function constructor throws + SyntaxError in strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() +{ + try + { + Function('a,a','"use strict";'); + return false; + } + catch (e) { + return(e instanceof SyntaxError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js index e59b188d0e..c7da9396f0 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js - * @description Duplicate combined parameter name in Function constructor allowed if body is not strict - */ - - -function testcase() -{ - Function('a,a','return;'); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-5 +description: > + Duplicate combined parameter name in Function constructor allowed + if body is not strict +includes: [runTestCase.js] +---*/ + +function testcase() +{ + Function('a,a','return;'); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s.js index 50ced19603..2b5280e760 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s.js - * @description Duplicate combined parameter name allowed in Function constructor called in strict mode if body not strict - * @onlyStrict - */ - - -function testcase() -{ - "use strict"; - try { - Function('a,a','return a;'); - return true; - } catch (e) { - return false; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-6-s +description: > + Duplicate combined parameter name allowed in Function constructor + called in strict mode if body not strict +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() +{ + "use strict"; + try { + Function('a,a','return a;'); + return true; + } catch (e) { + return false; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-7-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-7-s.js index 7b01bccd2d..799fac830b 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-7-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-7-s.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-7-s.js - * @description Function constructor call from strict code with formal parameter named arguments does not throws SyntaxError if function body is not strict mode - * @onlyStrict - */ - - -function testcase() { - "use strict"; - try { - Function('arguments', 'return;'); - return true; - - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-7-s +description: > + Function constructor call from strict code with formal parameter + named arguments does not throws SyntaxError if function body is + not strict mode +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + try { + Function('arguments', 'return;'); + return true; + + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-8-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-8-s.js index 5eac4dacbc..3df412dfa4 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-8-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-8-s.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-8-s.js - * @description Strict Mode - SyntaxError is not thrown if a function is created using a Function constructor that has two identical parameters, which are separated by a unique parameter name and there is no explicit 'use strict' in the function constructor's body - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var foo = new Function("baz", "qux", "baz", "return 0;"); - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-8-s +description: > + Strict Mode - SyntaxError is not thrown if a function is created + using a Function constructor that has two identical parameters, + which are separated by a unique parameter name and there is no + explicit 'use strict' in the function constructor's body +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var foo = new Function("baz", "qux", "baz", "return 0;"); + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-9-s.js b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-9-s.js index bbdbb4435f..fab6667f0a 100644 --- a/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-9-s.js +++ b/test/suite/ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-9-s.js @@ -1,19 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-9-s.js - * @description Strict Mode - SyntaxError is thrown if a function is created using the Function constructor that has three identical parameters and there is no explicit 'use strict' in the function constructor's body - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - var foo = new Function("baz", "baz", "baz", "return 0;"); - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.2.1-11-9-s +description: > + Strict Mode - SyntaxError is thrown if a function is created using + the Function constructor that has three identical parameters and + there is no explicit 'use strict' in the function constructor's + body +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + var foo = new Function("baz", "baz", "baz", "return 0;"); + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T1.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T1.js index b555fa475f..8a1721636d 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T1.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T1.js - * @description The body of the function is "{toString:function(){throw 7;}}" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T1 +description: "The body of the function is \"{toString:function(){throw 7;}}\"" +includes: [$FAIL.js] +---*/ var body = {toString:function(){throw 7;}} @@ -25,4 +26,3 @@ try { $ERROR('#1.1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)'); } } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T10.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T10.js index bebedfa7bb..8f5f661a91 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T10.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T10.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T10.js - * @description Value of the function constructor argument is "null" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T10 +description: Value of the function constructor argument is "null" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -30,4 +31,3 @@ if (f.constructor !== Function) { if (f() !== undefined) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T11.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T11.js index 15c27010d7..f4ad7db5f4 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T11.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T11.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T11.js - * @description Value of the function constructor argument is "undefined" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T11 +description: Value of the function constructor argument is "undefined" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -30,4 +31,3 @@ if (f.constructor !== Function) { if (f() !== undefined) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T12.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T12.js index fd076fdd50..935b6940b8 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T12.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T12.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T12.js - * @description Value of the function constructor argument is "void 0" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T12 +description: Value of the function constructor argument is "void 0" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -30,4 +31,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T13.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T13.js index 4c29ed8347..a5d43a6b25 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T13.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T13.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T13.js - * @description Value of the function constructor argument is "{}" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T13 +description: Value of the function constructor argument is "{}" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -23,4 +24,3 @@ try { $ERROR('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); } } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T2.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T2.js index fe9bc55751..ee8bd7de68 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T2.js @@ -1,18 +1,21 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T2.js - * @description The body of the function is "{toString:function(){return "return 1;";}}" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T2 +description: > + The body of the function is "{toString:function(){return "return + 1;";}}" +includes: [$FAIL.js] +---*/ var body={toString:function(){return "return 1;";}}; @@ -32,4 +35,3 @@ if (f.constructor !== Function) { if (f()!==1) { $ERROR('#3: hen the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T3.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T3.js index 16bbcb38be..e9f77ee7c1 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T3.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T3.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T3.js - * @description Value of the function constructor argument is 1 - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T3 +description: Value of the function constructor argument is 1 +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -30,4 +31,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T4.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T4.js index 5747cf649c..c9f7226fe0 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T4.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T4.js @@ -1,18 +1,21 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T4.js - * @description Value of the function constructor argument is x, where x is specified with "undefined" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T4 +description: > + Value of the function constructor argument is x, where x is + specified with "undefined" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -32,4 +35,3 @@ if (f()!==undefined) { } var x; - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T5.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T5.js index 8465f24e27..3b00cebde2 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T5.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T5.js @@ -1,18 +1,21 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T5.js - * @description Value of the function constructor argument is "Object("return \'A\'")" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T5 +description: > + Value of the function constructor argument is "Object("return + \'A\'")" +includes: [$FAIL.js] +---*/ var body = Object("return \'A\'"); @@ -32,4 +35,3 @@ if (f.constructor !== Function) { if (f()!=="\u0041") { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T6.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T6.js index 08893ef08c..5b975616cd 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T6.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T6.js @@ -1,18 +1,21 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T6.js - * @description Value of the function constructor argument is the string "return true;" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T6 +description: > + Value of the function constructor argument is the string "return + true;" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -30,4 +33,3 @@ if (f.constructor !== Function) { if (!(f())) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T7.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T7.js index 072bb2dadd..8e8faaf512 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T7.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T7.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T7.js - * @description Value of the function constructor argument is "Object(1)" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T7 +description: Value of the function constructor argument is "Object(1)" +includes: [$FAIL.js] +---*/ var body = new Object(1); @@ -32,4 +33,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T8.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T8.js index 66c143da2c..bcd9fddc98 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T8.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T8.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T8.js - * @description Value of the function constructor argument is "var 1=1;" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T8 +description: Value of the function constructor argument is "var 1=1;" +includes: [$FAIL.js] +---*/ var body = "var 1=1;"; @@ -25,4 +26,3 @@ try { $ERROR('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception'); } } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T9.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T9.js index c0db5a2475..a44c3b8808 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T9.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A1_T9.js @@ -1,18 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with one argument then body be that argument and the following steps are taken: - * i) Call ToString(body) - * ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception - * iii) If body is not parsable as FunctionBody then throw a SyntaxError exception - * iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. - * Pass in a scope chain consisting of the global object as the Scope parameter - * v) Return Result(iv) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A1_T9.js - * @description Value of the function constructor argument is "return arguments[0];" - */ +/*--- +info: > + When the Function constructor is called with one argument then body be that argument and the following steps are taken: + i) Call ToString(body) + ii) If P is not parsable as a FormalParameterListopt then throw a SyntaxError exception + iii) If body is not parsable as FunctionBody then throw a SyntaxError exception + iv) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody. + Pass in a scope chain consisting of the global object as the Scope parameter + v) Return Result(iv) +es5id: 15.3.2.1_A1_T9 +description: > + Value of the function constructor argument is "return + arguments[0];" +---*/ var f = new Function("return arguments[0];"); @@ -25,4 +27,3 @@ if (!(f instanceof Function)) { if (f("A") !== "A") { $ERROR('#2: When the Function constructor is called with one argument then body be that argument and the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T1.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T1.js index d55278080f..af2604cb0d 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T1.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * It is permissible but not necessary to have one argument for each formal parameter to be specified - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A2_T1.js - * @description Values of the function constructor arguments are "arg1", "arg2", "arg3", "return arg1+arg2+arg3;" - */ +/*--- +info: > + It is permissible but not necessary to have one argument for each formal + parameter to be specified +es5id: 15.3.2.1_A2_T1 +description: > + Values of the function constructor arguments are "arg1", "arg2", + "arg3", "return arg1+arg2+arg3;" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -24,4 +28,3 @@ if (!(f instanceof Function)){ if (f(1,2,3) !== 6) { $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T2.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T2.js index b9deb65a09..ef1231a8eb 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * It is permissible but not necessary to have one argument for each formal parameter to be specified - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A2_T2.js - * @description Values of the function constructor arguments are "arg1, arg2", "arg3", "return arg1+arg2+arg3;" - */ +/*--- +info: > + It is permissible but not necessary to have one argument for each formal + parameter to be specified +es5id: 15.3.2.1_A2_T2 +description: > + Values of the function constructor arguments are "arg1, arg2", + "arg3", "return arg1+arg2+arg3;" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -24,4 +28,3 @@ if (!(f instanceof Function)){ if (f("AB","BA",1) !== "ABBA1") { $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T3.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T3.js index d46d16ac6d..26a4470d1e 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T3.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T3.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * It is permissible but not necessary to have one argument for each formal parameter to be specified - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A2_T3.js - * @description Values of the function constructor arguments are "arg1, arg2, arg3", "return arg1+arg2+arg3;" - */ +/*--- +info: > + It is permissible but not necessary to have one argument for each formal + parameter to be specified +es5id: 15.3.2.1_A2_T3 +description: > + Values of the function constructor arguments are "arg1, arg2, + arg3", "return arg1+arg2+arg3;" +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -24,4 +28,3 @@ if (!(f instanceof Function)){ if (f(1,1,"ABBA") !== "2ABBA") { $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T4.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T4.js index 99dab211da..0bf320e080 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T4.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T4.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * It is permissible but not necessary to have one argument for each formal parameter to be specified - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A2_T4.js - * @description Values of the function constructor arguments are "return"-s of various results - */ +/*--- +info: > + It is permissible but not necessary to have one argument for each formal + parameter to be specified +es5id: 15.3.2.1_A2_T4 +description: > + Values of the function constructor arguments are "return"-s of + various results +includes: [$FAIL.js] +---*/ var i=0; @@ -28,4 +32,3 @@ if (!(f instanceof Function)){ if (f(4,"2","QUESTION") !== "42QUESTION") { $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T5.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T5.js index 2953c784ea..80a0105980 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T5.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T5.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * It is permissible but not necessary to have one argument for each formal parameter to be specified - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A2_T5.js - * @description Values of the function constructor arguments are "return"-s of various results and a concotenation of strings - */ +/*--- +info: > + It is permissible but not necessary to have one argument for each formal + parameter to be specified +es5id: 15.3.2.1_A2_T5 +description: > + Values of the function constructor arguments are "return"-s of + various results and a concotenation of strings +includes: [$FAIL.js] +---*/ var i=0; @@ -28,4 +32,3 @@ if (!(f instanceof Function)){ if (f("",1,2) !== "12") { $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T6.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T6.js index c9cdbbe257..f63ae274bf 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T6.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A2_T6.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * It is permissible but not necessary to have one argument for each formal parameter to be specified - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A2_T6.js - * @description Values of the function constructor arguments are "return"-s of various results and a concotenation of strings - */ +/*--- +info: > + It is permissible but not necessary to have one argument for each formal + parameter to be specified +es5id: 15.3.2.1_A2_T6 +description: > + Values of the function constructor arguments are "return"-s of + various results and a concotenation of strings +includes: [$FAIL.js] +---*/ var i=0; @@ -28,4 +32,3 @@ if (!(f instanceof Function)){ if (f("",1,p) !== "1arg4") { $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T1.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T1.js index d88a7125b6..c36119da03 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T1.js @@ -1,20 +1,24 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T1.js - * @description Values of the function constructor arguments are "{toString:function(){throw 1;}}" and "{toString:function(){throw 'body';}}" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T1 +description: > + Values of the function constructor arguments are + "{toString:function(){throw 1;}}" and "{toString:function(){throw + 'body';}}" +includes: [$FAIL.js] +---*/ var p = {toString:function(){throw 1;}}; var body = {toString:function(){throw "body";}}; @@ -28,6 +32,3 @@ try { $ERROR('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); } } - - - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T10.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T10.js index c51f90ac08..8ebd3077ac 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T10.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T10.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T10.js - * @description Values of the function constructor arguments are "{toString:function(){return "z;x"}}" and "return this;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T10 +description: > + Values of the function constructor arguments are + "{toString:function(){return "z;x"}}" and "return this;" +includes: [$FAIL.js] +---*/ var body = "return this;"; var p={toString:function(){return "z;x"}}; @@ -28,4 +31,3 @@ try { $ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T11.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T11.js index 9bebddcc9e..a30dee17bd 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T11.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T11.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T11.js - * @description Values of the function constructor arguments are "a,b,c" and "void 0" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T11 +description: > + Values of the function constructor arguments are "a,b,c" and "void + 0" +includes: [$FAIL.js] +---*/ var p = "a,b,c"; @@ -34,4 +37,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T12.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T12.js index 2ab0d4289d..a74e8cb2d2 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T12.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T12.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T12.js - * @description Values of the function constructor arguments are "a,b,c" and "undefined" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T12 +description: > + Values of the function constructor arguments are "a,b,c" and + "undefined" +includes: [$FAIL.js] +---*/ var p = "a,b,c"; @@ -34,4 +37,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T13.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T13.js index 120e8f857c..59ad58aa1c 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T13.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T13.js @@ -1,20 +1,21 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T13.js - * @description Values of the function constructor arguments are "a,b,c" and "null" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T13 +description: Values of the function constructor arguments are "a,b,c" and "null" +includes: [$FAIL.js] +---*/ var p = "a,b,c"; @@ -34,4 +35,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T14.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T14.js index 6b936260d8..8eb1e4070e 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T14.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T14.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T14.js - * @description Values of the function constructor arguments are "a,b,c" and an undefined variable - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T14 +description: > + Values of the function constructor arguments are "a,b,c" and an + undefined variable +includes: [$FAIL.js] +---*/ var p = "a,b,c"; @@ -36,4 +39,3 @@ if (f()!==undefined) { } var body; - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T15.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T15.js index b1c430d091..01d4b3f06f 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T15.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T15.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T15.js - * @description Values of the function constructor arguments are are two empty strings - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T15 +description: > + Values of the function constructor arguments are are two empty + strings +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -32,4 +35,3 @@ if (f.constructor !== Function) { if (f()!==undefined) { $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...'); } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T2.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T2.js index d6ba8f1e18..99ccb2d591 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T2.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T2.js - * @description Values of the function constructor arguments are "{toString:function(){return 'a';}}" and "return a;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T2 +description: > + Values of the function constructor arguments are + "{toString:function(){return 'a';}}" and "return a;" +includes: [$FAIL.js] +---*/ var p = {toString:function(){return "a";}}; var body = "return a;"; @@ -35,6 +38,3 @@ if (f.constructor !== Function) { if (f(42)!==42) { $ERROR('#3: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2'); } - - - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T3.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T3.js index 7e23616acc..8b8baf9497 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T3.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T3.js @@ -1,20 +1,24 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T3.js - * @description Values of the function constructor arguments are "{toString:function(){p=1;return "a";}}" and "{toString:function(){throw "body";}}" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T3 +description: > + Values of the function constructor arguments are + "{toString:function(){p=1;return "a";}}" and + "{toString:function(){throw "body";}}" +includes: [$FAIL.js] +---*/ var p = {toString:function(){p=1;return "a";}}; var body = {toString:function(){throw "body";}}; @@ -33,7 +37,3 @@ try { if (p !== 1) { $ERROR('#2: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))'); } - - - - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T4.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T4.js index 50ca1f4e86..1f26565d27 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T4.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T4.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T4.js - * @description Values of the function constructor arguments are an undefined variable and "return 1.1;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T4 +description: > + Values of the function constructor arguments are an undefined + variable and "return 1.1;" +includes: [$FAIL.js] +---*/ var body = "return 1.1;"; diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T5.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T5.js index 4591d11a3b..b7c6cc0bc3 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T5.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T5.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T5.js - * @description Values of the function constructor arguments are "void 0" and "return \"A\";" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T5 +description: > + Values of the function constructor arguments are "void 0" and + "return \"A\";" +includes: [$FAIL.js] +---*/ var body = "return \"A\";"; @@ -34,6 +37,3 @@ if (f.constructor !== Function) { if (f()!=='\u0041') { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - - - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T6.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T6.js index 1015e215ee..4837e146e5 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T6.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T6.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T6.js - * @description Values of the function constructor arguments are "null" and "return true;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T6 +description: > + Values of the function constructor arguments are "null" and + "return true;" +includes: [$FAIL.js] +---*/ var body = "return true;"; diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T7.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T7.js index d78484373c..daa5877f4a 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T7.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T7.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T7.js - * @description Values of the function constructor arguments are "Object("a")" and "return a;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T7 +description: > + Values of the function constructor arguments are "Object("a")" and + "return a;" +includes: [$FAIL.js] +---*/ var body = "return a;"; diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T8.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T8.js index 89464dcea0..693c2706c9 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T8.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T8.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T8.js - * @description Values of the function constructor arguments are "undefined" and "return this;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T8 +description: > + Values of the function constructor arguments are "undefined" and + "return this;" +includes: [$FAIL.js] +---*/ var body = "return this;"; @@ -34,6 +37,3 @@ if (f.constructor !== Function) { if (f()!==this) { $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...'); } - - - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T9.js b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T9.js index befbdd9d2c..9e2dc1ca8b 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T9.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2.1_A3_T9.js @@ -1,20 +1,23 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the Function constructor is called with arguments p, body the following steps are taken: - * i) Let Result(i) be the first argument - * ii) Let P be ToString(Result(i)) - * iii) Call ToString(body) - * iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception - * v) If body is not parsable as FunctionBody then throw a SyntaxError exception - * vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody - * Pass in a scope chain consisting of the global object as the Scope parameter - * vii) Return Result(vi) - * - * @path ch15/15.3/15.3.2/S15.3.2.1_A3_T9.js - * @description Values of the function constructor arguments are "1,1" and "return this;" - */ +/*--- +info: > + When the Function constructor is called with arguments p, body the following steps are taken: + i) Let Result(i) be the first argument + ii) Let P be ToString(Result(i)) + iii) Call ToString(body) + iv) If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception + v) If body is not parsable as FunctionBody then throw a SyntaxError exception + vi) Create a new Function object as specified in 13.2 with parameters specified by parsing P as a FormalParameterListopt and body specified by parsing body as a FunctionBody + Pass in a scope chain consisting of the global object as the Scope parameter + vii) Return Result(vi) +es5id: 15.3.2.1_A3_T9 +description: > + Values of the function constructor arguments are "1,1" and "return + this;" +includes: [$FAIL.js] +---*/ var body = "return this;"; var p="1,1"; @@ -28,4 +31,3 @@ try { $ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception'); } } - diff --git a/test/suite/ch15/15.3/15.3.2/S15.3.2_A1.js b/test/suite/ch15/15.3/15.3.2/S15.3.2_A1.js index 0ad4336e85..c36edf0cef 100644 --- a/test/suite/ch15/15.3/15.3.2/S15.3.2_A1.js +++ b/test/suite/ch15/15.3/15.3.2/S15.3.2_A1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Function is called as part of a new expression, it is a constructor: it initialises the newly created object - * - * @path ch15/15.3/15.3.2/S15.3.2_A1.js - * @description Checking the constuctor of the object that is created as a new Function - */ +/*--- +info: > + When Function is called as part of a new expression, it is a constructor: + it initialises the newly created object +es5id: 15.3.2_A1 +description: > + Checking the constuctor of the object that is created as a new + Function +---*/ var f = new Function; @@ -19,4 +22,3 @@ if (f.constructor !== Function) { if (f === undefined) { $ERROR('#2: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object'); } - diff --git a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A1.js b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A1.js index 0db8f44b3a..63c29cc5c8 100644 --- a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A1.js +++ b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype property has the attribute ReadOnly - * - * @path ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A1.js - * @description Checking if varying the Function.prototype property fails - */ +/*--- +info: The Function.prototype property has the attribute ReadOnly +es5id: 15.3.3.1_A1 +description: Checking if varying the Function.prototype property fails +---*/ var obj = Function.prototype; Function.prototype = function(){return "shifted";}; @@ -24,4 +23,3 @@ try { } catch (e) { $ERROR('#2.1: the Function.prototype property has the attributes ReadOnly: '+e); } - diff --git a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A2.js b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A2.js index 7f4f9a04a1..a5cca523cc 100644 --- a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A2.js +++ b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype property has the attribute DontEnum - * - * @path ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A2.js - * @description Checking if enumerating the Function.prototype property fails - */ +/*--- +info: The Function.prototype property has the attribute DontEnum +es5id: 15.3.3.1_A2 +description: Checking if enumerating the Function.prototype property fails +---*/ // CHECK#1 if (Function.propertyIsEnumerable('prototype')) { @@ -23,4 +22,3 @@ for (p in Function){ if (count !== 0) { $ERROR('#2: the Function.prototype property has the attributes DontEnum'); } - diff --git a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A3.js b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A3.js index a03351de88..c33d356882 100644 --- a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A3.js +++ b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype property has the attribute DontDelete - * - * @path ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A3.js - * @description Checking if deleting the Function.prototype property fails - */ +/*--- +info: The Function.prototype property has the attribute DontDelete +es5id: 15.3.3.1_A3 +description: Checking if deleting the Function.prototype property fails +---*/ delete Function.prototype; @@ -14,4 +13,3 @@ delete Function.prototype; if (!(Function.hasOwnProperty('prototype'))) { $ERROR('#1: the Function.prototype property has the attributes DontDelete.'); } - diff --git a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A4.js b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A4.js index edd70c32ab..197f4e50ef 100644 --- a/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A4.js +++ b/test/suite/ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A4.js @@ -1,16 +1,17 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Detects whether the value of a function's "prototype" property - * as seen by normal object operations might deviate from the value - * as seem by Object.getOwnPropertyDescriptor - * - * @path ch15/15.3/15.3.3/15.3.3.1/S15.3.3.1_A4.js - * @description Checks if reading a function's .prototype directly - * agrees with reading it via Object.getOwnPropertyDescriptor, after - * having set it by Object.defineProperty. - */ +/*--- +info: > + Detects whether the value of a function's "prototype" property + as seen by normal object operations might deviate from the value + as seem by Object.getOwnPropertyDescriptor +es5id: 15.3.3.1_A4 +description: > + Checks if reading a function's .prototype directly agrees with + reading it via Object.getOwnPropertyDescriptor, after having set + it by Object.defineProperty. +---*/ function foo() {} @@ -19,4 +20,3 @@ if (foo.prototype !== Object.getOwnPropertyDescriptor(foo, 'prototype').value) { $ERROR("A function.prototype's descriptor lies"); } - diff --git a/test/suite/ch15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js b/test/suite/ch15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js index d753895671..28c9d733bd 100644 --- a/test/suite/ch15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js +++ b/test/suite/ch15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js - * @description Function.length - data property with value 1 - */ - - -function testcase() { - - var desc = Object.getOwnPropertyDescriptor(Function,"length"); - if(desc.value === 1 && - desc.writable === false && - desc.enumerable === false && - desc.configurable === false) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.3.2-1 +description: Function.length - data property with value 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var desc = Object.getOwnPropertyDescriptor(Function,"length"); + if(desc.value === 1 && + desc.writable === false && + desc.enumerable === false && + desc.configurable === false) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.3/S15.3.3_A1.js b/test/suite/ch15/15.3/15.3.3/S15.3.3_A1.js index 668a9ab246..05200e2125 100644 --- a/test/suite/ch15/15.3/15.3.3/S15.3.3_A1.js +++ b/test/suite/ch15/15.3/15.3.3/S15.3.3_A1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function constructor has the property "prototype" - * - * @path ch15/15.3/15.3.3/S15.3.3_A1.js - * @description Checking existence of the property "prototype" - */ +/*--- +info: The Function constructor has the property "prototype" +es5id: 15.3.3_A1 +description: Checking existence of the property "prototype" +---*/ if(!Function.hasOwnProperty("prototype")){ $ERROR('#1: The Function constructor has the property "prototype"'); } - - diff --git a/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T1.js b/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T1.js index 70a280e726..42bfb3c1a0 100644 --- a/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Function constructor - * is the Function prototype object - * - * @path ch15/15.3/15.3.3/S15.3.3_A2_T1.js - * @description Checking prototype of Function - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Function constructor + is the Function prototype object +es5id: 15.3.3_A2_T1 +description: Checking prototype of Function +---*/ // CHECK# if (!(Function.prototype.isPrototypeOf(Function))) { $ERROR('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.'); } - diff --git a/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T2.js b/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T2.js index a067cf202e..eff7fe7d54 100644 --- a/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.3/S15.3.3_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Function constructor - * is the Function prototype object - * - * @path ch15/15.3/15.3.3/S15.3.3_A2_T2.js - * @description Add new property to Function.prototype and check it - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Function constructor + is the Function prototype object +es5id: 15.3.3_A2_T2 +description: Add new property to Function.prototype and check it +---*/ Function.prototype.indicator = 1; @@ -15,4 +15,3 @@ Function.prototype.indicator = 1; if (Function.indicator != 1) { $ERROR('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.'); } - diff --git a/test/suite/ch15/15.3/15.3.3/S15.3.3_A3.js b/test/suite/ch15/15.3/15.3.3/S15.3.3_A3.js index 5e2ae99f95..a22a560d0f 100644 --- a/test/suite/ch15/15.3/15.3.3/S15.3.3_A3.js +++ b/test/suite/ch15/15.3/15.3.3/S15.3.3_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function constructor has length property whose value is 1 - * - * @path ch15/15.3/15.3.3/S15.3.3_A3.js - * @description Checking Function.length property - */ +/*--- +info: Function constructor has length property whose value is 1 +es5id: 15.3.3_A3 +description: Checking Function.length property +---*/ //CHECK#1 if (!Function.hasOwnProperty("length")){ @@ -17,4 +16,3 @@ if (!Function.hasOwnProperty("length")){ if (Function.length !== 1) { $ERROR('#2: Function constructor length property value is 1'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A10.js index a48f8a86a0..f9fdde310f 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.toString.length property has the attribute ReadOnly - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A10.js - * @description Checking if varying the Function.prototype.toString.length property fails - */ +/*--- +info: The Function.prototype.toString.length property has the attribute ReadOnly +es5id: 15.3.4.2_A10 +description: > + Checking if varying the Function.prototype.toString.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Function.prototype.toString.hasOwnProperty('length'))) { @@ -21,4 +23,3 @@ Function.prototype.toString.length = function(){return "shifted";}; if (Function.prototype.toString.length !== obj) { $ERROR('#2: the Function.prototype.toString length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A11.js index b5c98b1319..620234a03a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toString method is 0 - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A11.js - * @description Checking Function.prototype.toString.length - */ +/*--- +info: The length property of the toString method is 0 +es5id: 15.3.4.2_A11 +description: Checking Function.prototype.toString.length +---*/ //CHECK#1 if (!(Function.prototype.toString.hasOwnProperty("length"))) { @@ -17,4 +16,3 @@ if (!(Function.prototype.toString.hasOwnProperty("length"))) { if (Function.prototype.toString.length !== 0) { $ERROR('#2: The length property of the toString method is 0'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A12.js index 73f979d52f..b477b441eb 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A12.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A12.js - * @description The Function.prototype.toString function is not generic; it throws a TypeError exception if its this value is not a Function object. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.2_A12 +description: > + The Function.prototype.toString function is not generic; it throws + a TypeError exception if its this value is not a Function object. +negative: TypeError +---*/ Function.prototype.toString.call(undefined); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A13.js index fe4e6a0201..b45110ce95 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A13.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A13.js - * @description The toString function is not generic; it throws a TypeError exception if its this value is not a Function object. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.2_A13 +description: > + The toString function is not generic; it throws a TypeError + exception if its this value is not a Function object. +negative: TypeError +---*/ Function.prototype.toString.call(null); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A14.js index 4f7fe886df..09e247a14b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A14.js @@ -1,11 +1,12 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A14.js - * @description The toString function is not generic; it throws a TypeError exception if its this value is not a Function object. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.2_A14 +description: > + The toString function is not generic; it throws a TypeError + exception if its this value is not a Function object. +negative: TypeError +---*/ Function.prototype.toString.call({}); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A15.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A15.js index 20e2f4362a..3ade4c1988 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A15.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A15.js @@ -1,13 +1,15 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic; it throws a TypeError exception if its this value is not a Function object. - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A15.js - * @description Whether or not they are callable, RegExp objects are not Function objects, so toString should throw a TypeError. - * @negative TypeError - */ +/*--- +info: > + The toString function is not generic; it throws a TypeError exception if + its this value is not a Function object. +es5id: 15.3.4.2_A15 +description: > + Whether or not they are callable, RegExp objects are not Function + objects, so toString should throw a TypeError. +negative: TypeError +---*/ Function.prototype.toString.call(/x/); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A16.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A16.js index 141465ba3c..83da50d87a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A16.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A16.js @@ -1,15 +1,18 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic; it throws a TypeError exception if its this value is not a Function object. - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A16.js - * @description The String constructor, given an object, should invoke that object's toString method as a method, i.e., with its this value bound to that object. - * @negative TypeError - */ +/*--- +info: > + The toString function is not generic; it throws a TypeError exception if + its this value is not a Function object. +es5id: 15.3.4.2_A16 +description: > + The String constructor, given an object, should invoke that + object's toString method as a method, i.e., with its this value + bound to that object. +negative: TypeError +---*/ var obj = {toString: Function.prototype.toString}; String(obj); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A6.js index fd3578e46a..a3d4e3b160 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.toString has not prototype property - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A6.js - * @description Checking if obtaining the prototype property of Function.prototype.toString fails - */ +/*--- +info: Function.prototype.toString has not prototype property +es5id: 15.3.4.2_A6 +description: > + Checking if obtaining the prototype property of + Function.prototype.toString fails +---*/ //CHECK#1 if (Function.prototype.toString.prototype !== undefined) { $ERROR('#1: Function.prototype.toString has not prototype property'+Function.prototype.toString.prototype); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A7.js index c7b2d48569..26fe9ccd94 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.toString can't be used as constructor - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A7.js - * @description Checking if creating "new Function.prototype.toString" fails - */ +/*--- +info: Function.prototype.toString can't be used as constructor +es5id: 15.3.4.2_A7 +description: Checking if creating "new Function.prototype.toString" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var FACTORY = Function.prototype.toString; @@ -16,4 +18,3 @@ try { } catch (e) { $PRINT(e); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A8.js index 1b81b603ba..7134f47087 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.toString.length property has the attribute DontEnum - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A8.js - * @description Checking if enumerating the Function.prototype.toString.length property fails - */ +/*--- +info: The Function.prototype.toString.length property has the attribute DontEnum +es5id: 15.3.4.2_A8 +description: > + Checking if enumerating the Function.prototype.toString.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Function.prototype.toString.hasOwnProperty('length'))) { @@ -24,4 +26,3 @@ for (p in Function.prototype.toString){ if (p==="length") $ERROR('#2: the Function.prototype.toString.length property has the attributes DontEnum'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A9.js index 296ca7ca06..421345f46c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.toString.length property has the attribute DontDelete - * - * @path ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A9.js - * @description Checking if deleting the Function.prototype.toString.length property fails - */ +/*--- +info: > + The Function.prototype.toString.length property has the attribute + DontDelete +es5id: 15.3.4.2_A9 +description: > + Checking if deleting the Function.prototype.toString.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Function.prototype.toString.hasOwnProperty('length'))) { @@ -22,4 +26,3 @@ if (delete Function.prototype.toString.length) { if (!(Function.prototype.toString.hasOwnProperty('length'))) { $FAIL('#2: The Function.prototype.toString.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-1-s.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-1-s.js index c90d4942e7..bafd844a87 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-1-s.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-1-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-1-s.js - * @description Strict Mode - 'this' value is a string which cannot be converted to wrapper objects when the function is called with an array of arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function fun() { - return (this instanceof String); - } - return !fun.apply("", Array); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.3-1-s +description: > + Strict Mode - 'this' value is a string which cannot be converted + to wrapper objects when the function is called with an array of + arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + function fun() { + return (this instanceof String); + } + return !fun.apply("", Array); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-2-s.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-2-s.js index 7f03675a3a..ac81a2ed69 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-2-s.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-2-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-2-s.js - * @description Strict Mode - 'this' value is a number which cannot be converted to wrapper objects when the function is called with an array of arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function fun() { - return (this instanceof Number); - } - return !fun.apply(-12, Array); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.3-2-s +description: > + Strict Mode - 'this' value is a number which cannot be converted + to wrapper objects when the function is called with an array of + arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function fun() { + return (this instanceof Number); + } + return !fun.apply(-12, Array); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-3-s.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-3-s.js index 7ae40757df..5250c403dc 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-3-s.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-3-s.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.3/15.3.4.3-3-s.js - * @description Strict Mode - 'this' value is a boolean which cannot be converted to wrapper objects when the function is called with an array of arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - - function fun() { - return (this instanceof Boolean); - } - return !fun.apply(false, Array); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.3-3-s +description: > + Strict Mode - 'this' value is a boolean which cannot be converted + to wrapper objects when the function is called with an array of + arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + + function fun() { + return (this instanceof Boolean); + } + return !fun.apply(false, Array); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A10.js index 71c3710fea..8e85216f0c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.apply.length property has the attribute ReadOnly - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A10.js - * @description Checking if varying the Function.prototype.apply.length property fails - */ +/*--- +info: The Function.prototype.apply.length property has the attribute ReadOnly +es5id: 15.3.4.3_A10 +description: > + Checking if varying the Function.prototype.apply.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Function.prototype.apply.hasOwnProperty('length'))) { @@ -21,4 +23,3 @@ Function.prototype.apply.length = function(){return "shifted";}; if (Function.prototype.apply.length !== obj) { $ERROR('#2: the Function.prototype.apply length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A11.js index 8f088e62eb..02a5ca95f6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.apply.length property has the attribute DontEnum - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A11.js - * @description TChecking if enumerating the Function.prototype.apply.length property fails - */ +/*--- +info: The Function.prototype.apply.length property has the attribute DontEnum +es5id: 15.3.4.3_A11 +description: > + TChecking if enumerating the Function.prototype.apply.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Function.prototype.apply.hasOwnProperty('length'))) { @@ -24,4 +26,3 @@ for (var p in Function.prototype.apply){ if (p==="length") $ERROR('#2: the Function.prototype.apply.length property has the attributes DontEnum'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A12.js index 85455d5bba..c84faf7766 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A12.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply has not prototype property - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A12.js - * @description Checking if obtaining the prototype property of Function.prototype.apply fails - */ +/*--- +info: Function.prototype.apply has not prototype property +es5id: 15.3.4.3_A12 +description: > + Checking if obtaining the prototype property of + Function.prototype.apply fails +---*/ //CHECK#1 if (Function.prototype.apply.prototype !== undefined) { $ERROR('#1: Function.prototype.apply has not prototype property'+Function.prototype.apply.prototype); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A13.js index 0f1f087c3a..dec7ed6a84 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A13.js @@ -1,11 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A13.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.3_A13 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.apply.call(undefined, {}, []); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A14.js index a87c26d432..a9a78a79b4 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A14.js @@ -1,11 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A14.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.3_A14 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.apply.call(null, {}, []); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A15.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A15.js index d4c6c1c65f..e3f9442cab 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A15.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A15.js @@ -1,11 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A15.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.3_A15 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.apply.call({}, {}, []); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A16.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A16.js index 75b0af2877..257801885b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A16.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A16.js @@ -1,12 +1,15 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If IsCallable(func) is false, then throw a TypeError exception. - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A16.js - * @description A RegExp is not a function, but it may be callable. Iff it is, it's typeof should be 'function', in which case apply should accept it as a valid this value. - */ +/*--- +info: If IsCallable(func) is false, then throw a TypeError exception. +es5id: 15.3.4.3_A16 +description: > + A RegExp is not a function, but it may be callable. Iff it is, + it's typeof should be 'function', in which case apply should + accept it as a valid this value. +includes: [$FAIL.js] +---*/ var re = (/x/); if (typeof re === 'function') { @@ -22,4 +25,3 @@ if (typeof re === 'function') { } } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T1.js index 0a612b7d1a..800dbdaa08 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T1.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The apply method performs a function call using the [[Call]] property of the object. If the object does not have a [[Call]] property, a TypeError exception is thrown - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T1.js - * @description Calling "apply" method of the object that does not have a [[Call]] property. - * Prototype of the object is Function() - */ +/*--- +info: > + The apply method performs a function call using the [[Call]] property of + the object. If the object does not have a [[Call]] property, a TypeError + exception is thrown +es5id: 15.3.4.3_A1_T1 +description: > + Calling "apply" method of the object that does not have a [[Call]] + property. Prototype of the object is Function() +includes: [$FAIL.js] +---*/ var proto=Function(); @@ -31,4 +35,3 @@ try { $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T2.js index 406c5c5783..ae07e58381 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T2.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The apply method performs a function call using the [[Call]] property of the object. If the object does not have a [[Call]] property, a TypeError exception is thrown - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A1_T2.js - * @description Calling "apply" method of the object that does not have a [[Call]] property. - * Prototype of the object is Function.prototype - */ +/*--- +info: > + The apply method performs a function call using the [[Call]] property of + the object. If the object does not have a [[Call]] property, a TypeError + exception is thrown +es5id: 15.3.4.3_A1_T2 +description: > + Calling "apply" method of the object that does not have a [[Call]] + property. Prototype of the object is Function.prototype +includes: [$FAIL.js] +---*/ function FACTORY(){}; @@ -29,4 +33,3 @@ try { $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T1.js index 9e771fc829..7a5bb8ac94 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the apply method is 2 - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T1.js - * @description Checking Function.prototype.apply.length - */ +/*--- +info: The length property of the apply method is 2 +es5id: 15.3.4.3_A2_T1 +description: Checking Function.prototype.apply.length +---*/ //CHECK#1 if (typeof Function.prototype.apply !== "function") { @@ -22,4 +21,3 @@ if (typeof Function.prototype.apply.length === "undefined") { if (Function.prototype.apply.length !== 2) { $ERROR('#3: The length property of the apply method is 2'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T2.js index f714a10c7b..a56a6b4d10 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the apply method is 2 - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A2_T2.js - * @description Checking f.apply.length, where f is new Function - */ +/*--- +info: The length property of the apply method is 2 +es5id: 15.3.4.3_A2_T2 +description: Checking f.apply.length, where f is new Function +---*/ var f=new Function; @@ -24,4 +23,3 @@ if (typeof f.apply.length === "undefined") { if (f.apply.length !== 2) { $ERROR('#3: The length property of the apply method is 2'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T1.js index 0b5908aa47..10a773197c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T1.js - * @description Not any arguments at apply function - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T1 +description: Not any arguments at apply function +---*/ Function("this.field=\"strawberry\"").apply(); @@ -14,4 +15,3 @@ Function("this.field=\"strawberry\"").apply(); if (this["field"] !== "strawberry") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T10.js index 4e7e7b2a98..04aec4e16c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T10.js - * @description Checking by using eval, no any arguments at apply function - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T10 +description: Checking by using eval, no any arguments at apply function +---*/ eval(" (function(){this.feat=1}).apply()"); @@ -14,4 +15,3 @@ eval(" (function(){this.feat=1}).apply()"); if (this["feat"] !== 1) { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T2.js index 9118b69eb9..36147d5b45 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T2.js - * @description Argument at apply function is null - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T2 +description: Argument at apply function is null +---*/ Function("this.field=\"green\"").apply(null); @@ -14,4 +15,3 @@ Function("this.field=\"green\"").apply(null); if (this["field"] !== "green") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T3.js index 279a70ef73..f3397b3e71 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T3.js - * @description Argument at apply function is void 0 - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T3 +description: Argument at apply function is void 0 +---*/ Function("this.field=\"battle\"").apply(void 0); @@ -14,4 +15,3 @@ Function("this.field=\"battle\"").apply(void 0); if (this["field"] !== "battle") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T4.js index bba4b3d455..8b29b02ea2 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T4.js - * @description Argument at apply function is undefined - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T4 +description: Argument at apply function is undefined +---*/ Function("this.field=\"oil\"").apply(undefined); @@ -14,4 +15,3 @@ Function("this.field=\"oil\"").apply(undefined); if (this["field"] !== "oil") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T5.js index 608c81f630..3f45679673 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T5.js - * @description No any arguments at apply function and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T5 +description: > + No any arguments at apply function and it called inside function + declaration +---*/ function FACTORY(){ Function("this.feat=\"in da haus\"").apply(); @@ -23,4 +26,3 @@ if (this["feat"] !== "in da haus") { if (typeof obj.feat !== "undefined") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T6.js index c02bcd81c0..018e2d3b25 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T6.js - * @description Argument at apply function is null and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T6 +description: > + Argument at apply function is null and it called inside function + declaration +---*/ function FACTORY(){ (function(){this.feat="kamon beyba"}).apply(null); @@ -23,4 +26,3 @@ if (this["feat"] !== "kamon beyba") { if (typeof obj.feat !== "undefined") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T7.js index ca8b3248f0..2f2af0bc43 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T7.js - * @description Argument at apply function is void 0 and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T7 +description: > + Argument at apply function is void 0 and it called inside function + declaration +---*/ (function FACTORY(){ Function("this.feat=\"in da haus\"").apply(void 0); @@ -17,4 +20,3 @@ if (this["feat"] !== "in da haus") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T8.js index 07a7313962..3da82a0b91 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T8.js - * @description Argument at apply function is undefined and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T8 +description: > + Argument at apply function is undefined and it called inside + function declaration +---*/ (function FACTORY(){ (function(){this.feat="kamon beyba"}).apply(undefined); @@ -16,4 +19,3 @@ if (this["feat"] !== "kamon beyba") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T9.js index 2c4d250ac1..29f63f7ce5 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A3_T9.js - * @description Checking by using eval, argument at apply function is void 0 - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.3_A3_T9 +description: Checking by using eval, argument at apply function is void 0 +---*/ eval( " Function(\"this.feat=1\").apply(void 0) " ); @@ -14,4 +15,3 @@ eval( " Function(\"this.feat=1\").apply(void 0) " ); if (this["feat"] !== 1) { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T1.js index 0ac56c9e7c..53cbf1c0ce 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T1.js - * @description thisArg is number - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T1 +description: thisArg is number +---*/ var obj=1; diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T2.js index 32d22bd0f7..577d30d7f0 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T2.js - * @description thisArg is boolean true - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T2 +description: thisArg is boolean true +---*/ var obj=true; @@ -21,5 +22,3 @@ if (typeof obj.touched !== "undefined") { if (!(retobj["touched"])) { $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T3.js index a2b9ae6011..5273af8562 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T3.js - * @description thisArg is string - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T3 +description: thisArg is string +---*/ var obj="soap"; @@ -21,5 +22,3 @@ if (typeof obj.touched !== "undefined") { if (!(retobj["touched"])) { $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T4.js index 956f43e7e5..8e53383fe5 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T4.js - * @description thisArg is function variable that return this - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T4 +description: thisArg is function variable that return this +---*/ f = function(){this.touched= true; return this;}; @@ -23,4 +24,3 @@ if (!(retobj["touched"])) { } var obj; - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T5.js index 871b74c454..76385fbaf3 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T5.js - * @description thisArg is function variable - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T5 +description: thisArg is function variable +---*/ var f = function(){this.touched= true;}; @@ -18,4 +19,3 @@ f.apply(obj); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T6.js index 31f57cb3d0..23bc74de4e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T6.js - * @description thisArg is new String() - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T6 +description: thisArg is new String() +---*/ var obj=new String("soap"); @@ -16,4 +17,3 @@ var obj=new String("soap"); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T7.js index 4c0e95e891..fab59dcbd2 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T7.js - * @description thisArg is new Number() - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T7 +description: thisArg is new Number() +---*/ var obj=new Number(1); @@ -16,5 +17,3 @@ Function("this.touched= true;").apply(obj); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T8.js index c0dca08ebb..78e1b101c8 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A5_T8.js - * @description thisArg is Function() - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.3_A5_T8 +description: thisArg is Function() +---*/ var obj=Function(); @@ -16,4 +17,3 @@ new Function("this.touched= true; return this;").apply(obj); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T2.js index d9e7ee3610..62f597c8df 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T2.js - * @description argArray is (null,1) - */ +/*--- +info: > + if argArray is neither an array nor an arguments object (see 10.1.8), a + TypeError exception is thrown +es5id: 15.3.4.3_A6_T2 +description: argArray is (null,1) +includes: [$FAIL.js] +---*/ //CHECK#1 try { @@ -17,4 +19,3 @@ try { $ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T3.js index c7b57c7c79..2b848bf92a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A6_T3.js - * @description argArray is (object,"1,3,4") - */ +/*--- +info: > + if argArray is neither an array nor an arguments object (see 10.1.8), a + TypeError exception is thrown +es5id: 15.3.4.3_A6_T3 +description: argArray is (object,"1,3,4") +includes: [$FAIL.js] +---*/ obj={}; @@ -19,4 +21,3 @@ try { $ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T1.js index d888ffb4d8..1abfa0f142 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T1.js - * @description argArray is (null,[1]) - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T1 +description: argArray is (null,[1]) +---*/ Function("a1,a2,a3","this.shifted=a1;").apply(null,[1]); @@ -15,5 +15,3 @@ Function("a1,a2,a3","this.shifted=a1;").apply(null,[1]); if (this["shifted"] !== 1) { $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T10.js index 254ccb5e50..82604e3e3c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T10.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T10.js - * @description argArray is (empty object, arguments), inside function call without declaration used - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T10 +description: > + argArray is (empty object, arguments), inside function call + without declaration used +---*/ var obj={}; @@ -24,5 +26,3 @@ if (obj["shifted"] !== "42") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T2.js index ef8ee5f545..fc924b3e9c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T2.js - * @description argArray is (null,[1,2,3]) - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T2 +description: argArray is (null,[1,2,3]) +---*/ new Function("a1,a2","a3","this.shifted=a2;").apply(null,[1,2,3]); @@ -15,5 +15,3 @@ new Function("a1,a2","a3","this.shifted=a2;").apply(null,[1,2,3]); if (this["shifted"] !== 2) { $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T3.js index cf003fe4b3..b7cf12465a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T3.js - * @description argArray is (empty object, new Array("nine","inch","nails")) - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T3 +description: argArray is (empty object, new Array("nine","inch","nails")) +---*/ i=0; @@ -26,5 +26,3 @@ if (obj["shifted"] !== "nine") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T4.js index 35db7b9c29..92a60ce1ba 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T4.js - * @description argArray is (empty object, ( function(){return arguments;}) ("a","b","c")) - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T4 +description: > + argArray is (empty object, ( function(){return arguments;}) + ("a","b","c")) +---*/ i=0; @@ -26,5 +28,3 @@ if (obj["shifted"] !== "c") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T5.js index ee656e882a..960d5677ba 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T5.js - * @description argArray is (null, arguments), inside function declaration used - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T5 +description: argArray is (null, arguments), inside function declaration used +---*/ function FACTORY(){ Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(null,arguments); @@ -24,5 +24,3 @@ if (this["shifted"] !== "12") { if (typeof obj.shifted !== "undefined") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T6.js index 90ac74272b..2ba276d6cb 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T6.js - * @description argArray is (this, arguments), inside function declaration used - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T6 +description: argArray is (this, arguments), inside function declaration used +---*/ function FACTORY(){ Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(this,arguments); @@ -24,5 +24,3 @@ if (obj["shifted"] !== "42") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T7.js index ff85f3462a..864f1e054c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T7.js - * @description argArray is (null, arguments), inside function call without declaration used - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T7 +description: > + argArray is (null, arguments), inside function call without + declaration used +---*/ (function (){ Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(null,arguments); @@ -17,4 +19,3 @@ if (this["shifted"] !== "12") { $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T8.js index 031b407f72..d55f3e60ef 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T8.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T8.js - * @description argArray is (this, arguments), inside function call without declaration used - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T8 +description: > + argArray is (this, arguments), inside function call without + declaration used +---*/ (function (){ Function("a1,a2,a3","this.shifted=a1+a2+a3;").apply(this,arguments); @@ -17,5 +19,3 @@ if (this["shifted"] !== "42") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T9.js index 39ee456457..ff2090d75f 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If argArray is either an array or an arguments object, - * the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A7_T9.js - * @description argArray is (empty object, arguments), inside function declaration used - */ +/*--- +info: > + If argArray is either an array or an arguments object, + the function is passed the (ToUint32(argArray.length)) arguments argArray[0], argArray[1],...,argArray[ToUint32(argArray.length)-1] +es5id: 15.3.4.3_A7_T9 +description: > + argArray is (empty object, arguments), inside function declaration + used +---*/ function FACTORY(){ var obj = {}; @@ -26,5 +28,3 @@ if (typeof this["shifted"] !== "undefined") { if (obj.shifted !== "12") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T1.js index 6db73fc758..90b56a4e0f 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply can`t be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T1.js - * @description Checking if creating "new Function.prototype.apply" fails - */ +/*--- +info: Function.prototype.apply can`t be used as [[create]] caller +es5id: 15.3.4.3_A8_T1 +description: Checking if creating "new Function.prototype.apply" fails +---*/ try { obj = new Function.prototype.apply; @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T2.js index 05cab52c54..120bf37b3f 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply can`t be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T2.js - * @description Checking if creating "new Function.prototype.apply()" fails - */ +/*--- +info: Function.prototype.apply can`t be used as [[create]] caller +es5id: 15.3.4.3_A8_T2 +description: Checking if creating "new Function.prototype.apply()" fails +---*/ try { obj = new Function.prototype.apply(); @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T3.js index 123948135d..b96c91f568 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply can`t be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T3.js - * @description Checking if creating "new Function.apply" fails - */ +/*--- +info: Function.prototype.apply can`t be used as [[create]] caller +es5id: 15.3.4.3_A8_T3 +description: Checking if creating "new Function.apply" fails +---*/ try { obj = new Function.apply; @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T4.js index 7512409208..329ca1bb07 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply can`t be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T4.js - * @description Checking if creating "new (Function("this.p1=1").apply)" fails - */ +/*--- +info: Function.prototype.apply can`t be used as [[create]] caller +es5id: 15.3.4.3_A8_T4 +description: Checking if creating "new (Function("this.p1=1").apply)" fails +---*/ try { obj = new (Function("this.p1=1").apply); @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T5.js index a69cae1d3c..b212190e4a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply can`t be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T5.js - * @description Checking if creating "new Function("this.p1=1").apply" fails - */ +/*--- +info: Function.prototype.apply can`t be used as [[create]] caller +es5id: 15.3.4.3_A8_T5 +description: Checking if creating "new Function("this.p1=1").apply" fails +---*/ try { FACTORY = Function("this.p1=1").apply; @@ -17,4 +16,3 @@ try { $ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T6.js index 9e44a4ab5a..3768247e5e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.apply can`t be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T6.js - * @description Checking if creating "new (Function("function f(){this.p1=1;};return f").apply())" fails - */ +/*--- +info: Function.prototype.apply can`t be used as [[create]] caller +es5id: 15.3.4.3_A8_T6 +description: > + Checking if creating "new (Function("function + f(){this.p1=1;};return f").apply())" fails +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ try { if (obj.p1!== 1) { $ERROR('#2: Function.prototype.apply can\'t be used as [[create]] caller'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A9.js index 9ebf423aaf..3aaca1ff5c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.apply.length property has the attribute DontDelete - * - * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A9.js - * @description Checking if deleting the Function.prototype.apply.length property fails - */ +/*--- +info: The Function.prototype.apply.length property has the attribute DontDelete +es5id: 15.3.4.3_A9 +description: > + Checking if deleting the Function.prototype.apply.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Function.prototype.apply.hasOwnProperty('length'))) { @@ -22,4 +24,3 @@ if (delete Function.prototype.apply.length) { if (!(Function.prototype.apply.hasOwnProperty('length'))) { $FAIL('#2: The Function.prototype.apply.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-1-s.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-1-s.js index 9db726a1fa..f226310521 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-1-s.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-1-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-1-s.js - * @description Strict Mode - 'this' value is a string which cannot be converted to wrapper objects when the function is called without an array of arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function fun() { - return (this instanceof String); - } - return !fun.call(""); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.4-1-s +description: > + Strict Mode - 'this' value is a string which cannot be converted + to wrapper objects when the function is called without an array of + arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function fun() { + return (this instanceof String); + } + return !fun.call(""); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-2-s.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-2-s.js index 7848d3c7b6..9d7f6b8b70 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-2-s.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-2-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-2-s.js - * @description Strict Mode - 'this' value is a number which cannot be converted to wrapper objects when the function is called without an array argument - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function fun() { - return (this instanceof Number); - } - return !fun.call(-12); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.4-2-s +description: > + Strict Mode - 'this' value is a number which cannot be converted + to wrapper objects when the function is called without an array + argument +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function fun() { + return (this instanceof Number); + } + return !fun.call(-12); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-3-s.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-3-s.js index 0d965fb677..96e810434d 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-3-s.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-3-s.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.4/15.3.4.4-3-s.js - * @description Strict Mode - 'this' value is a boolean which cannot be converted to wrapper objects when the function is called without an array of arguments - * @onlyStrict - */ - - -function testcase() { - "use strict"; - function fun() { - return (this instanceof Boolean); - } - return !fun.call(false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.4-3-s +description: > + Strict Mode - 'this' value is a boolean which cannot be converted + to wrapper objects when the function is called without an array of + arguments +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + "use strict"; + function fun() { + return (this instanceof Boolean); + } + return !fun.call(false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A10.js index ee76d447f4..d539d906db 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.call.length property has the attribute ReadOnly - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A10.js - * @description Checking if varying the Function.prototype.call.length property fails - */ +/*--- +info: The Function.prototype.call.length property has the attribute ReadOnly +es5id: 15.3.4.4_A10 +description: > + Checking if varying the Function.prototype.call.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#1 if (!(Function.prototype.call.hasOwnProperty('length'))) { @@ -21,4 +23,3 @@ Function.prototype.call.length = function(){return "shifted";}; if (Function.prototype.call.length !== obj) { $ERROR('#2: the Function.prototype.call length property has the attributes ReadOnly.'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A11.js index 987f9ee3ee..26183e0086 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.call.length property has the attribute DontEnum - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A11.js - * @description Checking if enumerating the Function.prototype.call.length property fails - */ +/*--- +info: The Function.prototype.call.length property has the attribute DontEnum +es5id: 15.3.4.4_A11 +description: > + Checking if enumerating the Function.prototype.call.length + property fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Function.prototype.call.hasOwnProperty('length'))) { @@ -24,4 +26,3 @@ for (p in Function.prototype.call){ if (p==="length") $ERROR('#2: the Function.prototype.call.length property has the attributes DontEnum'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A12.js index c8fbff69a0..a75e65fcb2 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A12.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call has not prototype property - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A12.js - * @description Checking if obtaining the prototype property of Function.prototype.call fails - */ +/*--- +info: Function.prototype.call has not prototype property +es5id: 15.3.4.4_A12 +description: > + Checking if obtaining the prototype property of + Function.prototype.call fails +---*/ //CHECK#1 if (Function.prototype.call.prototype !== undefined) { $ERROR('#1: Function.prototype.call has not prototype property'+Function.prototype.call.prototype); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A13.js index 5b08ca2182..9dcc96f0f6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A13.js @@ -1,11 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A13.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.4_A13 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.call.call(undefined, {}); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A14.js index 9fde7ac607..f02e8438e9 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A14.js @@ -1,11 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A14.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.4_A14 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.call.call(null, {}); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A15.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A15.js index 56624d8fd9..a3823f7abc 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A15.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A15.js @@ -1,11 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A15.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.4_A15 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.call.call({}, {}); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A16.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A16.js index c32a02957d..96e1a16237 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A16.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A16.js @@ -1,12 +1,15 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If IsCallable(func) is false, then throw a TypeError exception. - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A16.js - * @description A RegExp is not a function, but it may be callable. Iff it is, it's typeof should be 'function', in which case call should accept it as a valid this value. - */ +/*--- +info: If IsCallable(func) is false, then throw a TypeError exception. +es5id: 15.3.4.4_A16 +description: > + A RegExp is not a function, but it may be callable. Iff it is, + it's typeof should be 'function', in which case call should accept + it as a valid this value. +includes: [$FAIL.js] +---*/ var re = (/x/); if (typeof re === 'function') { @@ -22,4 +25,3 @@ if (typeof re === 'function') { } } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T1.js index e9bec03205..a4f7da20f9 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T1.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method performs a function call using the [[Call]] property of the object. If the object does not have a [[Call]] property, a TypeError exception is thrown - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T1.js - * @description Call "call" method of the object that does not have a [[Call]] property. - * Prototype of the object is Function() - */ +/*--- +info: > + The call method performs a function call using the [[Call]] property of + the object. If the object does not have a [[Call]] property, a TypeError + exception is thrown +es5id: 15.3.4.4_A1_T1 +description: > + Call "call" method of the object that does not have a [[Call]] + property. Prototype of the object is Function() +includes: [$FAIL.js] +---*/ var proto=Function(); @@ -31,4 +35,3 @@ try { $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T2.js index 637cf20d1e..44c00bbc18 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T2.js @@ -1,13 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method performs a function call using the [[Call]] property of the object. If the object does not have a [[Call]] property, a TypeError exception is thrown - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A1_T2.js - * @description Calling "call" method of the object that does not have a [[Call]] property. - * Prototype of the object is Function.prototype - */ +/*--- +info: > + The call method performs a function call using the [[Call]] property of + the object. If the object does not have a [[Call]] property, a TypeError + exception is thrown +es5id: 15.3.4.4_A1_T2 +description: > + Calling "call" method of the object that does not have a [[Call]] + property. Prototype of the object is Function.prototype +includes: [$FAIL.js] +---*/ function FACTORY(){}; @@ -29,4 +33,3 @@ try { $ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T1.js index c8282a2698..17113616d3 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the call method is 1 - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T1.js - * @description Checking Function.prototype.call.length - */ +/*--- +info: The length property of the call method is 1 +es5id: 15.3.4.4_A2_T1 +description: Checking Function.prototype.call.length +---*/ //CHECK#1 if (typeof Function.prototype.call !== "function") { @@ -22,4 +21,3 @@ if (typeof Function.prototype.call.length === "undefined") { if (Function.prototype.call.length !== 1) { $ERROR('#3: The length property of the call method is 1'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T2.js index f76bdc230a..45f06ff71a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the call method is 1 - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A2_T2.js - * @description Checking f.call.length, where f is new Function - */ +/*--- +info: The length property of the call method is 1 +es5id: 15.3.4.4_A2_T2 +description: Checking f.call.length, where f is new Function +---*/ var f=new Function; @@ -24,4 +23,3 @@ if (typeof f.call.length === "undefined") { if (f.call.length !== 1) { $ERROR('#3: The length property of the call method is 1'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T1.js index 6dcf5ccca5..33721f41b6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T1.js - * @description Not any arguments at call function - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T1 +description: Not any arguments at call function +---*/ Function("this.field=\"strawberry\"").call(); @@ -14,4 +15,3 @@ Function("this.field=\"strawberry\"").call(); if (this["field"] !== "strawberry") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T10.js index 1a8a625694..425eff43e9 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T10.js - * @description Checking by using eval, no any arguments at call function - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T10 +description: Checking by using eval, no any arguments at call function +---*/ eval(" (function(){this.feat=1}).call()"); @@ -14,4 +15,3 @@ eval(" (function(){this.feat=1}).call()"); if (this["feat"] !== 1) { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T2.js index c356ff4aa4..cfd38e7cfc 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T2.js - * @description Argument at call function is null - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T2 +description: Argument at call function is null +---*/ Function("this.field=\"green\"").call(null); @@ -14,4 +15,3 @@ Function("this.field=\"green\"").call(null); if (this["field"] !== "green") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T3.js index 5eb42018e2..c7b73cdfaf 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T3.js - * @description Argument at call function is void 0 - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T3 +description: Argument at call function is void 0 +---*/ Function("this.field=\"battle\"").call(void 0); @@ -14,4 +15,3 @@ Function("this.field=\"battle\"").call(void 0); if (this["field"] !== "battle") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T4.js index f643ac4295..cb0addf93e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T4.js - * @description Argument at call function is undefined - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T4 +description: Argument at call function is undefined +---*/ Function("this.field=\"oil\"").call(undefined); @@ -14,4 +15,3 @@ Function("this.field=\"oil\"").call(undefined); if (this["field"] !== "oil") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T5.js index 47f35a67e2..13ae455659 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T5.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T5.js - * @description No any arguments at call function and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T5 +description: > + No any arguments at call function and it called inside function + declaration +---*/ function FACTORY(){ Function("this.feat=\"in da haus\"").call(); @@ -23,4 +26,3 @@ if (this["feat"] !== "in da haus") { if (typeof obj.feat !== "undefined") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T6.js index 25c8fa0709..66284e8428 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T6.js - * @description Argument at call function is null and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T6 +description: > + Argument at call function is null and it called inside function + declaration +---*/ function FACTORY(){ (function(){this.feat="kamon beyba"}).call(null); @@ -23,4 +26,3 @@ if (this["feat"] !== "kamon beyba") { if (typeof obj.feat !== "undefined") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T7.js index 6fa6551a7b..320edca60b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T7.js - * @description Argument at call function is void 0 and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T7 +description: > + Argument at call function is void 0 and it called inside function + declaration +---*/ (function FACTORY(){ Function("this.feat=\"in da haus\"").call(void 0); @@ -17,4 +20,3 @@ if (this["feat"] !== "in da haus") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T8.js index 575230da8d..92016f1be2 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T8.js - * @description Argument at call function is undefined and it called inside function declaration - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T8 +description: > + Argument at call function is undefined and it called inside + function declaration +---*/ (function FACTORY(){ (function(){this.feat="kamon beyba"}).call(undefined); @@ -17,4 +20,3 @@ if (this["feat"] !== "kamon beyba") { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T9.js index 4efc2e7712..3c4aeb5f00 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is null or undefined, the called function is passed the global object as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A3_T9.js - * @description Checking by using eval, argument at call function is void 0 - */ +/*--- +info: > + If thisArg is null or undefined, the called function is passed the global + object as the this value +es5id: 15.3.4.4_A3_T9 +description: Checking by using eval, argument at call function is void 0 +---*/ eval( " Function(\"this.feat=1\").call(void 0) " ); @@ -15,4 +16,3 @@ eval( " Function(\"this.feat=1\").call(void 0) " ); if (this["feat"] !== 1) { $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T1.js index f274db0835..266d022248 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T1.js - * @description thisArg is number - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T1 +description: thisArg is number +---*/ var obj=1; @@ -21,5 +22,3 @@ if (typeof obj.touched !== "undefined") { if (!(retobj["touched"])) { $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T2.js index 1e594dd96b..0797953d0a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T2.js - * @description thisArg is boolean true - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T2 +description: thisArg is boolean true +---*/ var obj=true; @@ -21,5 +22,3 @@ if (typeof obj.touched !== "undefined") { if (!(retobj["touched"])) { $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T3.js index 665bf1010a..05cbffe39d 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T3.js - * @description thisArg is string - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T3 +description: thisArg is string +---*/ var obj="soap"; @@ -21,5 +22,3 @@ if (typeof obj.touched !== "undefined") { if (!(retobj["touched"])) { $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T4.js index 05cff1df0c..47c2a75dd4 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T4.js - * @description thisArg is function variable that return this - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T4 +description: thisArg is function variable that return this +---*/ var f = function(){this.touched= true; return this;}; @@ -23,4 +24,3 @@ if (!(retobj["touched"])) { } var obj; - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T5.js index 96795e1508..867a043392 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T5.js - * @description thisArg is function variable - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T5 +description: thisArg is function variable +---*/ var f = function(){this.touched= true;}; @@ -18,4 +19,3 @@ f.call(obj); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T6.js index 127954e68c..2b77c87acd 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T6.js - * @description thisArg is new String() - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T6 +description: thisArg is new String() +---*/ var obj=new String("soap"); @@ -16,4 +17,3 @@ var obj=new String("soap"); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T7.js index f6166f31a3..0ba6fe8248 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T7.js - * @description thisArg is new Number() - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T7 +description: thisArg is new Number() +---*/ var obj=new Number(1); @@ -16,5 +17,3 @@ Function("this.touched= true;").call(obj); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T8.js index f3f6cf18b3..ca3ce2a1d6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A5_T8.js - * @description thisArg is Function() - */ +/*--- +info: > + If thisArg is not null(defined) the called function is passed + ToObject(thisArg) as the this value +es5id: 15.3.4.4_A5_T8 +description: thisArg is Function() +---*/ var obj=Function(); @@ -16,4 +17,3 @@ new Function("this.touched= true; return this;").call(obj); if (!(obj.touched)) { $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T1.js index 04b21e57a4..11c34b635b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T1.js - * @description Argunemts of call function is (null,[1]) - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T1 +description: Argunemts of call function is (null,[1]) +---*/ Function("a1,a2,a3","this.shifted=a1;").call(null,[1]); @@ -25,5 +25,3 @@ if (this["shifted"].length !== 1) { if (this["shifted"][0] !== 1) { $ERROR('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T10.js index b9b00d1c4c..32d8befffa 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T10.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T10.js - * @description Argunemts of call function is (empty object, "", arguments,2), inside function call without declaration used - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T10 +description: > + Argunemts of call function is (empty object, "", arguments,2), + inside function call without declaration used +---*/ var obj={}; @@ -24,5 +26,3 @@ if (obj["shifted"] !== "42") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T2.js index 27afbee730..c27067c779 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T2.js - * @description Argunemts of call function is (null,[3,2,1]) - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T2 +description: Argunemts of call function is (null,[3,2,1]) +---*/ new Function("a1,a2","a3","this.shifted=a1;").call(null,[3,2,1]); @@ -20,5 +20,3 @@ if (this["shifted"].length !== 3) { if ((this["shifted"][0] !== 3)||(this["shifted"][1] !== 2)||(this["shifted"][2] !== 1)) { $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T3.js index cc51c178df..406d3958c0 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T3.js - * @description Argunemts of call function is (empty object, new Array("nine","inch","nails")) - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T3 +description: > + Argunemts of call function is (empty object, new + Array("nine","inch","nails")) +---*/ var i=0; @@ -31,5 +33,3 @@ if ((obj["shifted"][0] !== "nine")||(obj["shifted"][1] !== "inch")||(obj["shifte if (typeof this["shifted"] !== "undefined") { $ERROR('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T4.js index 90311787bb..5f88a9451c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T4.js - * @description Argunemts of call function is (empty object, ( function(){return arguments;})("a","b","c","d"),"",2) - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T4 +description: > + Argunemts of call function is (empty object, ( function(){return + arguments;})("a","b","c","d"),"",2) +---*/ var i=0; @@ -26,5 +28,3 @@ if (obj["shifted"] !== "24") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T5.js index 35a6fd8460..bcd8b63f68 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T5.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T5.js - * @description Argunemts of call function is (null, arguments,"",2), inside function declaration used - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T5 +description: > + Argunemts of call function is (null, arguments,"",2), inside + function declaration used +---*/ function FACTORY(){ Function("a1,a2,a3","this.shifted=a1.length+a2+a3;").call(null,arguments,"",2); @@ -24,5 +26,3 @@ if (this["shifted"] !== "42") { if (typeof obj.shifted !== "undefined") { $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T6.js index 609c8de876..b8a78380e6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T6.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T6.js - * @description Argunemts of call function is (this, arguments,"",2), inside function declaration used - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T6 +description: > + Argunemts of call function is (this, arguments,"",2), inside + function declaration used +---*/ function FACTORY(){ Function("a1,a2,a3","this.shifted=a1.length+a2+a3;").call(this,arguments,"",2); @@ -24,5 +26,3 @@ if (obj["shifted"] !== "42") { if (typeof this["shifted"] !== "undefined") { $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T7.js index 7738e09e04..4ae40ec20e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T7.js - * @description Argunemts of call function is (null, arguments,"",2), inside function call without declaration used - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T7 +description: > + Argunemts of call function is (null, arguments,"",2), inside + function call without declaration used +---*/ (function (){ Function("a1,a2,a3","this.shifted=a1.length+a2+a3;").call(null,arguments,"",2); @@ -17,4 +19,3 @@ if (this["shifted"] !== "42") { $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T8.js index eb00e7f055..8f25540b51 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T8.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T8.js - * @description Argunemts of call function is (this, arguments,"",2), inside function call without declaration used - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T8 +description: > + Argunemts of call function is (this, arguments,"",2), inside + function call without declaration used +---*/ (function (){ Function("a1,a2,a3","this.shifted=a1.length+a2+a3;").call(this,arguments,"",2); @@ -17,5 +19,3 @@ if (this["shifted"] !== "42") { $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T9.js index ae2abe1cc0..029978f700 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs - * a function call using the [[Call]] property of the object - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A6_T9.js - * @description Argunemts of call function is (empty object, "", arguments,2), inside function declaration used - */ +/*--- +info: > + The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs + a function call using the [[Call]] property of the object +es5id: 15.3.4.4_A6_T9 +description: > + Argunemts of call function is (empty object, "", arguments,2), + inside function declaration used +---*/ function FACTORY(){ var obj = {}; @@ -26,5 +28,3 @@ if (typeof this["shifted"] !== "undefined") { if (obj.shifted !== "42") { $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...'); } - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T1.js index 1c02dbea7d..6b0987bc35 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call can't be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T1.js - * @description Checking if creating "new Function.prototype.call" fails - */ +/*--- +info: Function.prototype.call can't be used as [[create]] caller +es5id: 15.3.4.4_A7_T1 +description: Checking if creating "new Function.prototype.call" fails +---*/ try { var obj = new Function.prototype.call; @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T2.js index 2e62668898..bda73bde2e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call can't be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T2.js - * @description Checking if creating "new Function.prototype.call()" fails - */ +/*--- +info: Function.prototype.call can't be used as [[create]] caller +es5id: 15.3.4.4_A7_T2 +description: Checking if creating "new Function.prototype.call()" fails +---*/ try { var FACTORY = Function.prototype.call; @@ -17,4 +16,3 @@ try { $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T3.js index 003e84f1c2..dc9261f278 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call can't be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T3.js - * @description Checking if creating "new Function.call" fails - */ +/*--- +info: Function.prototype.call can't be used as [[create]] caller +es5id: 15.3.4.4_A7_T3 +description: Checking if creating "new Function.call" fails +---*/ try { var obj = new Function.call; @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T4.js index 34b6a43632..9ba7a315ed 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call can't be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T4.js - * @description Checking if creating "new (Function("this.p1=1").call)" fails - */ +/*--- +info: Function.prototype.call can't be used as [[create]] caller +es5id: 15.3.4.4_A7_T4 +description: Checking if creating "new (Function("this.p1=1").call)" fails +---*/ try { var obj = new (Function("this.p1=1").call); @@ -16,4 +15,3 @@ try { $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T5.js index 316ac58153..8242b79541 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call can't be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T5.js - * @description Checking if creating "new Function("this.p1=1").call" fails - */ +/*--- +info: Function.prototype.call can't be used as [[create]] caller +es5id: 15.3.4.4_A7_T5 +description: Checking if creating "new Function("this.p1=1").call" fails +---*/ try { var FACTORY = Function("this.p1=1").call; @@ -17,4 +16,3 @@ try { $ERROR('#1.1: Function.prototype.call can\'t be used as [[create]] caller'); } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T6.js index 0911558c41..451f257c95 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function.prototype.call can't be used as [[create]] caller - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A7_T6.js - * @description Checking if creating "new (Function("function f(){this.p1=1;};return f").call())" fails - */ +/*--- +info: Function.prototype.call can't be used as [[create]] caller +es5id: 15.3.4.4_A7_T6 +description: > + Checking if creating "new (Function("function + f(){this.p1=1;};return f").call())" fails +---*/ //CHECK#1 try { @@ -19,4 +20,3 @@ try { if (obj.p1!== 1) { $ERROR('#2: Function.prototype.call can\'t be used as [[create]] caller'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A9.js index 8176bb2f81..607a7fdad8 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function.prototype.call.length property has the attribute DontDelete - * - * @path ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A9.js - * @description Checking if deleting the Function.prototype.call.length property fails - */ +/*--- +info: The Function.prototype.call.length property has the attribute DontDelete +es5id: 15.3.4.4_A9 +description: > + Checking if deleting the Function.prototype.call.length property + fails +includes: [$FAIL.js] +---*/ //CHECK#0 if (!(Function.prototype.call.hasOwnProperty('length'))) { @@ -22,4 +24,3 @@ if (delete Function.prototype.call.length) { if (!(Function.prototype.call.hasOwnProperty('length'))) { $FAIL('#2: The Function.prototype.call.length property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-1.js index ba29c8188c..a08985e266 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-1.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-1.js - * @description [[Call]] - 'F''s [[BoundArgs]] is used as the former part of arguments of calling the [[Call]] internal method of 'F''s [[TargetFunction]] when 'F' is called - */ - - -function testcase() { - var func = function (x, y, z) { - return x + y + z; - }; - - var newFunc = Function.prototype.bind.call(func, {}, "a", "b", "c"); - - return newFunc() === "abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-1 +description: > + [[Call]] - 'F''s [[BoundArgs]] is used as the former part of + arguments of calling the [[Call]] internal method of 'F''s + [[TargetFunction]] when 'F' is called +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x, y, z) { + return x + y + z; + }; + + var newFunc = Function.prototype.bind.call(func, {}, "a", "b", "c"); + + return newFunc() === "abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-10.js index 48e266cdc0..e659fa7932 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-10.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-10.js - * @description [[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function (x) { - return this === obj && typeof x === "undefined"; - }; - - var newFunc = Function.prototype.bind.call(func, obj); - - return newFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-10 +description: > + [[Call]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function (x) { + return this === obj && typeof x === "undefined"; + }; + + var newFunc = Function.prototype.bind.call(func, obj); + + return newFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-11.js index 17f074e4ce..71c396ad3a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-11.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-11.js - * @description [[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function (x) { - return this === obj && x === 1 && arguments[0] === 1 && arguments.length === 1 && this.prop === "abc"; - }; - - var newFunc = Function.prototype.bind.call(func, obj); - - return newFunc(1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-11 +description: > + [[Call]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 1, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function (x) { + return this === obj && x === 1 && arguments[0] === 1 && arguments.length === 1 && this.prop === "abc"; + }; + + var newFunc = Function.prototype.bind.call(func, obj); + + return newFunc(1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-12.js index 4a9b5956dc..a5e40410b6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-12.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-12.js - * @description [[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 2, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function (x) { - return this === obj && x === 1 && arguments[1] === 2 && - arguments[0] === 1 && arguments.length === 2 && this.prop === "abc"; - }; - - var newFunc = Function.prototype.bind.call(func, obj); - - return newFunc(1, 2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-12 +description: > + [[Call]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 2, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function (x) { + return this === obj && x === 1 && arguments[1] === 2 && + arguments[0] === 1 && arguments.length === 2 && this.prop === "abc"; + }; + + var newFunc = Function.prototype.bind.call(func, obj); + + return newFunc(1, 2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-13.js index 9757b867ad..edcd2d87c4 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-13.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-13.js - * @description [[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function (x) { - return this === obj && x === 1 && - arguments[0] === 1 && arguments.length === 1 && this.prop === "abc"; - }; - - var newFunc = Function.prototype.bind.call(func, obj, 1); - - return newFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-13 +description: > + [[Call]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 0, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function (x) { + return this === obj && x === 1 && + arguments[0] === 1 && arguments.length === 1 && this.prop === "abc"; + }; + + var newFunc = Function.prototype.bind.call(func, obj, 1); + + return newFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-14.js index 8468ad1ef7..9434d42d52 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-14.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-14.js - * @description [[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function (x) { - return this === obj && x === 1 && arguments[1] === 2 - arguments[0] === 1 && arguments.length === 2 && this.prop === "abc"; - }; - - var newFunc = Function.prototype.bind.call(func, obj, 1); - - return newFunc(2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-14 +description: > + [[Call]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 1, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function (x) { + return this === obj && x === 1 && arguments[1] === 2 + arguments[0] === 1 && arguments.length === 2 && this.prop === "abc"; + }; + + var newFunc = Function.prototype.bind.call(func, obj, 1); + + return newFunc(2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-15.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-15.js index c5e81944fa..0ae85cb436 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-15.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-15.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-15.js - * @description [[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 2, length of 'ExtraArgs' is 0, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function (x) { - return this === obj && x === 1 && arguments[1] === 2 && - arguments[0] === 1 && arguments.length === 2 && this.prop === "abc"; - }; - - var newFunc = Function.prototype.bind.call(func, obj, 1, 2); - - return newFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-15 +description: > + [[Call]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 2, length of 'ExtraArgs' is 0, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function (x) { + return this === obj && x === 1 && arguments[1] === 2 && + arguments[0] === 1 && arguments.length === 2 && this.prop === "abc"; + }; + + var newFunc = Function.prototype.bind.call(func, obj, 1, 2); + + return newFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-2.js index 1f2d6da24a..6ba09f9347 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-2.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-2.js - * @description [[Call]] - 'F''s [[BoundThis]] is used as the 'this' value of calling the [[Call]] internal method of 'F''s [[TargetFunction]] when 'F' is called - */ - - -function testcase() { - var obj = { "prop": "a" }; - - var func = function () { - return this; - }; - - var newFunc = Function.prototype.bind.call(func, obj); - - return newFunc() === obj; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-2 +description: > + [[Call]] - 'F''s [[BoundThis]] is used as the 'this' value of + calling the [[Call]] internal method of 'F''s [[TargetFunction]] + when 'F' is called +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { "prop": "a" }; + + var func = function () { + return this; + }; + + var newFunc = Function.prototype.bind.call(func, obj); + + return newFunc() === obj; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-3.js index 41128642e2..1b6441dfaa 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-3.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-3.js - * @description [[Call]] - the provided arguments is used as the latter part of arguments of calling the [[Call]] internal method of 'F''s [[TargetFunction]] when 'F' is called - */ - - -function testcase() { - var func = function (x, y, z) { - return z; - }; - - var newFunc = Function.prototype.bind.call(func, {}, "a", "b"); - - return newFunc("c") === "c"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-3 +description: > + [[Call]] - the provided arguments is used as the latter part of + arguments of calling the [[Call]] internal method of 'F''s + [[TargetFunction]] when 'F' is called +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x, y, z) { + return z; + }; + + var newFunc = Function.prototype.bind.call(func, {}, "a", "b"); + + return newFunc("c") === "c"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-4.js index e1ef7406c0..74bc5fff02 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-4.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-4.js - * @description [[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and without 'boundThis' - */ - - -function testcase() { - var func = function () { - return arguments.length === 0; - }; - - var newFunc = Function.prototype.bind.call(func); - - return newFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-4 +description: > + [[Call]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 0, and without + 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return arguments.length === 0; + }; + + var newFunc = Function.prototype.bind.call(func); + + return newFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-5.js index 2f5e6b5d38..f02f0f73da 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-5.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-5.js - * @description [[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and without 'boundThis' - */ - - -function testcase() { - var func = function () { - return arguments[0] === 1; - }; - - var newFunc = Function.prototype.bind.call(func); - - return newFunc(1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-5 +description: > + [[Call]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 1, and without + 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return arguments[0] === 1; + }; + + var newFunc = Function.prototype.bind.call(func); + + return newFunc(1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-6.js index b96fba0859..1c5c3cef60 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-6.js - * @description [[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function () { - return this === obj && arguments.length === 0; - }; - - var newFunc = Function.prototype.bind.call(func, obj); - - return newFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-6 +description: > + [[Call]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function () { + return this === obj && arguments.length === 0; + }; + + var newFunc = Function.prototype.bind.call(func, obj); + + return newFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-7.js index bc9559ad39..0704ea6fa1 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-7.js - * @description [[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function () { - return this === obj && arguments[0] === 1; - }; - - var newFunc = Function.prototype.bind.call(func, obj, 1); - - return newFunc(); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-7 +description: > + [[Call]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 0, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function () { + return this === obj && arguments[0] === 1; + }; + + var newFunc = Function.prototype.bind.call(func, obj, 1); + + return newFunc(); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-8.js index f24aa0f4bc..4a9fd41b20 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-8.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-8.js - * @description [[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function () { - return this === obj && arguments[0] === 1; - }; - - var newFunc = Function.prototype.bind.call(func, obj); - - return newFunc(1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-8 +description: > + [[Call]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 1, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function () { + return this === obj && arguments[0] === 1; + }; + + var newFunc = Function.prototype.bind.call(func, obj); + + return newFunc(1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-9.js index e65169ec14..012150b41e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-9.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-9.js - * @description [[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - var func = function () { - return this === obj && arguments[0] === 1 && arguments[1] === 2; - }; - - var newFunc = Function.prototype.bind.call(func, obj, 1); - - return newFunc(2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.1-4-9 +description: > + [[Call]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 1, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + var func = function () { + return this === obj && arguments[0] === 1 && arguments[1] === 2; + }; + + var newFunc = Function.prototype.bind.call(func, obj, 1); + + return newFunc(2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-1.js index 4064793c04..2c482be09a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-1.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-1.js - * @description [[Construct]] - 'F''s [[BoundArgs]] is used as the former part of arguments of calling the [[Construct]] internal method of 'F''s [[TargetFunction]] when 'F' is called as constructor - */ - - -function testcase() { - var func = function (x, y, z) { - var objResult = {}; - objResult.returnValue = x + y + z; - objResult.returnVerifyResult = arguments[0] === "a" && arguments.length === 3; - return objResult; - }; - - var NewFunc = Function.prototype.bind.call(func, {}, "a", "b", "c"); - - var newInstance = new NewFunc(); - - return newInstance.hasOwnProperty("returnValue") && newInstance.returnValue === "abc" && - newInstance.hasOwnProperty("returnVerifyResult") && newInstance.returnVerifyResult === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-1 +description: > + [[Construct]] - 'F''s [[BoundArgs]] is used as the former part of + arguments of calling the [[Construct]] internal method of 'F''s + [[TargetFunction]] when 'F' is called as constructor +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x, y, z) { + var objResult = {}; + objResult.returnValue = x + y + z; + objResult.returnVerifyResult = arguments[0] === "a" && arguments.length === 3; + return objResult; + }; + + var NewFunc = Function.prototype.bind.call(func, {}, "a", "b", "c"); + + var newInstance = new NewFunc(); + + return newInstance.hasOwnProperty("returnValue") && newInstance.returnValue === "abc" && + newInstance.hasOwnProperty("returnVerifyResult") && newInstance.returnVerifyResult === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-10.js index 1e797a3a26..9b7d31e9d4 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-10.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-10.js - * @description [[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1 - */ - - -function testcase() { - var func = function (x) { - return new Boolean(arguments.length === 1 && x === 1 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}); - - var newInstance = new NewFunc(1); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-10 +description: > + [[Construct]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x) { + return new Boolean(arguments.length === 1 && x === 1 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}); + + var newInstance = new NewFunc(1); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-11.js index 7df4357440..9455306e8b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-11.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-11.js - * @description [[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 2 - */ - - -function testcase() { - var func = function (x) { - return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}); - - var newInstance = new NewFunc(1, 2); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-11 +description: > + [[Construct]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x) { + return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}); + + var newInstance = new NewFunc(1, 2); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-12.js index 5003a213f1..e112e9b7e7 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-12.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-12.js - * @description [[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0 - */ - - -function testcase() { - var func = function (x) { - return new Boolean(arguments.length === 1 && x === 1 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}, 1); - - var newInstance = new NewFunc(); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-12 +description: > + [[Construct]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x) { + return new Boolean(arguments.length === 1 && x === 1 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}, 1); + + var newInstance = new NewFunc(); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-13.js index 24ca939c6d..59d55b6342 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-13.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-13.js - * @description [[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1 - */ - - -function testcase() { - var func = function (x) { - return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}, 1); - - var newInstance = new NewFunc(2); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-13 +description: > + [[Construct]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x) { + return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}, 1); + + var newInstance = new NewFunc(2); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-14.js index 9489475f33..06739cc916 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-14.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-14.js - * @description [[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 2, length of 'ExtraArgs' is 0 - */ - - -function testcase() { - var func = function (x) { - return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}, 1, 2); - - var newInstance = new NewFunc(); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-14 +description: > + [[Construct]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 2, length of 'ExtraArgs' is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x) { + return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}, 1, 2); + + var newInstance = new NewFunc(); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-2.js index 44d424561c..18bce648b6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-2.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-2.js - * @description [[Construct]] - the provided arguments is used as the latter part of arguments of calling the [[Construct]] internal method of 'F''s [[TargetFunction]] when 'F' is called as constructor - */ - - -function testcase() { - var func = function (x, y, z) { - var objResult = {}; - objResult.returnValue = x + y + z; - objResult.returnVerifyResult = arguments[0] === "a" && arguments.length === 3; - return objResult; - }; - - var NewFunc = Function.prototype.bind.call(func, {}); - - var newInstance = new NewFunc("a", "b", "c"); - - return newInstance.hasOwnProperty("returnValue") && newInstance.returnValue === "abc" && - newInstance.hasOwnProperty("returnVerifyResult") && newInstance.returnVerifyResult === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-2 +description: > + [[Construct]] - the provided arguments is used as the latter part + of arguments of calling the [[Construct]] internal method of 'F''s + [[TargetFunction]] when 'F' is called as constructor +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x, y, z) { + var objResult = {}; + objResult.returnValue = x + y + z; + objResult.returnVerifyResult = arguments[0] === "a" && arguments.length === 3; + return objResult; + }; + + var NewFunc = Function.prototype.bind.call(func, {}); + + var newInstance = new NewFunc("a", "b", "c"); + + return newInstance.hasOwnProperty("returnValue") && newInstance.returnValue === "abc" && + newInstance.hasOwnProperty("returnVerifyResult") && newInstance.returnVerifyResult === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-3.js index b355e499eb..fb75087980 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-3.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-3.js - * @description [[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and without 'boundThis' - */ - - -function testcase() { - var func = function () { - return new Boolean(arguments.length === 0); - }; - - var NewFunc = Function.prototype.bind.call(func); - - var newInstance = new NewFunc(); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-3 +description: > + [[Construct]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 0, and without + 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return new Boolean(arguments.length === 0); + }; + + var NewFunc = Function.prototype.bind.call(func); + + var newInstance = new NewFunc(); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-4.js index 64c97830e1..0eed3b2458 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-4.js @@ -1,23 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-4.js - * @description [[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and without 'boundThis' - */ - - -function testcase() { - var func = function () { - return new Boolean(arguments[0] === 1 && arguments.length === 1); - }; - - var NewFunc = Function.prototype.bind.call(func); - - var newInstance = new NewFunc(1); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-4 +description: > + [[Construct]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 1, and without + 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return new Boolean(arguments[0] === 1 && arguments.length === 1); + }; + + var NewFunc = Function.prototype.bind.call(func); + + var newInstance = new NewFunc(1); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-5.js index 338256f0af..0d7993f958 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-5.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-5.js - * @description [[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis' - */ - - -function testcase() { - var obj = { prop: "abc" }; - - try { - Object.prototype.verifyThis = "verifyThis"; - var func = function () { - return new Boolean(arguments.length === 0 && Object.prototype.toString.call(this) === "[object Object]" && - this.verifyThis === "verifyThis"); - }; - - var NewFunc = Function.prototype.bind.call(func, obj); - - var newInstance = new NewFunc(); - - return newInstance.valueOf(); - } finally { - delete Object.prototype.verifyThis; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-5 +description: > + [[Construct]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis' +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { prop: "abc" }; + + try { + Object.prototype.verifyThis = "verifyThis"; + var func = function () { + return new Boolean(arguments.length === 0 && Object.prototype.toString.call(this) === "[object Object]" && + this.verifyThis === "verifyThis"); + }; + + var NewFunc = Function.prototype.bind.call(func, obj); + + var newInstance = new NewFunc(); + + return newInstance.valueOf(); + } finally { + delete Object.prototype.verifyThis; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-6.js index a2e0fcd77e..209e76e08c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-6.js - * @description [[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0 - */ - - -function testcase() { - var func = function () { - return new Boolean(arguments.length === 1 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}, 1); - - var newInstance = new NewFunc(); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-6 +description: > + [[Construct]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return new Boolean(arguments.length === 1 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}, 1); + + var newInstance = new NewFunc(); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-7.js index 867308baad..27360a1490 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-7.js - * @description [[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1 - */ - - -function testcase() { - var func = function () { - return new Boolean(arguments.length === 1 && arguments[0] === 1); - }; - - var NewFunc = Function.prototype.bind.call(func, {}); - - var newInstance = new NewFunc(1); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-7 +description: > + [[Construct]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return new Boolean(arguments.length === 1 && arguments[0] === 1); + }; + + var NewFunc = Function.prototype.bind.call(func, {}); + + var newInstance = new NewFunc(1); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-8.js index a0ec6fc0cd..0652b30ffb 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-8.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-8.js - * @description [[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1 - */ - - -function testcase() { - var func = function () { - return new Boolean(arguments.length === 2 && arguments[0] === 1 && arguments[1] === 2); - }; - - var NewFunc = Function.prototype.bind.call(func, {}, 1); - - var newInstance = new NewFunc(2); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-8 +description: > + [[Construct]] - length of parameters of 'target' is 0, length of + 'boundArgs' is 1, length of 'ExtraArgs' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function () { + return new Boolean(arguments.length === 2 && arguments[0] === 1 && arguments[1] === 2); + }; + + var NewFunc = Function.prototype.bind.call(func, {}, 1); + + var newInstance = new NewFunc(2); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-9.js index 89b4439239..f58d9ffe32 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-9.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-9.js - * @description [[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0 - */ - - -function testcase() { - var func = function (x) { - return new Boolean(arguments.length === 0 && typeof x === "undefined"); - }; - - var NewFunc = Function.prototype.bind.call(func, {}); - - var newInstance = new NewFunc(); - - return newInstance.valueOf() === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5.2-4-9 +description: > + [[Construct]] - length of parameters of 'target' is 1, length of + 'boundArgs' is 0, length of 'ExtraArgs' is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var func = function (x) { + return new Boolean(arguments.length === 0 && typeof x === "undefined"); + }; + + var NewFunc = Function.prototype.bind.call(func, {}); + + var newInstance = new NewFunc(); + + return newInstance.valueOf() === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js index 5dba58d7e7..3a3574a411 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js - * @description Function.prototype.bind must exist as a function - */ - - -function testcase() { - var f = Function.prototype.bind; - - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-0-1 +description: Function.prototype.bind must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Function.prototype.bind; + + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js index bef4b7b1bd..bacb3f1528 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js - * @description Function.prototype.bind must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Function.prototype.bind.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-0-2 +description: Function.prototype.bind must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Function.prototype.bind.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-10-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-10-1.js index d440104dfc..3ad7142f84 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-10-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-10-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-10-1.js - * @description Function.prototype.bind - internal property [[Class]] of 'F' is set as Function - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - return Object.prototype.toString.call(obj) === "[object Function]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-10-1 +description: > + Function.prototype.bind - internal property [[Class]] of 'F' is + set as Function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + return Object.prototype.toString.call(obj) === "[object Function]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-11-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-11-1.js index cb2777e7a4..ddd09672ed 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-11-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-11-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-11-1.js - * @description Function.prototype.bind - internal property [[Prototype]] of 'F' is set as Function.prototype - */ - - -function testcase() { - - var foo = function () { }; - try { - Function.prototype.property = 12; - var obj = foo.bind({}); - - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-11-1 +description: > + Function.prototype.bind - internal property [[Prototype]] of 'F' + is set as Function.prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + try { + Function.prototype.property = 12; + var obj = foo.bind({}); + + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js index 63a59b19fe..dbc93102ee 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js - * @description Function.prototype.bind, bound fn has a 'length' own property - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - if (bf.hasOwnProperty('length')) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-13.b-1 +description: Function.prototype.bind, bound fn has a 'length' own property +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + if (bf.hasOwnProperty('length')) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js index f2291dac39..67582da643 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js - * @description Function.prototype.bind, 'length' set to remaining number of expected args - */ - - -function testcase() { - function foo(x, y) { } - var o = {}; - - var bf = foo.bind(o); - if (bf.length === 2) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-13.b-2 +description: > + Function.prototype.bind, 'length' set to remaining number of + expected args +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(x, y) { } + var o = {}; + + var bf = foo.bind(o); + if (bf.length === 2) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js index 8a1925dec4..30f9a0aa58 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js - * @description Function.prototype.bind, 'length' set to remaining number of expected args (all args prefilled) - */ - - -function testcase() { - function foo(x, y) { } - var o = {}; - - var bf = foo.bind(o, 42, 101); - if (bf.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-13.b-3 +description: > + Function.prototype.bind, 'length' set to remaining number of + expected args (all args prefilled) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(x, y) { } + var o = {}; + + var bf = foo.bind(o, 42, 101); + if (bf.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js index 3fe65667ee..b47fee1126 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js - * @description Function.prototype.bind, 'length' set to remaining number of expected args (target takes 0 args) - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - if (bf.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-13.b-4 +description: > + Function.prototype.bind, 'length' set to remaining number of + expected args (target takes 0 args) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + if (bf.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js index 2269348f3d..32c448f328 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js - * @description Function.prototype.bind, 'length' set to remaining number of expected args (target provided extra args) - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o, 42); - if (bf.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-13.b-5 +description: > + Function.prototype.bind, 'length' set to remaining number of + expected args (target provided extra args) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o, 42); + if (bf.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-6.js index bf61a2d464..a22aabaabe 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-6.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-6.js - * @description Function.prototype.bind, 'length' set to remaining number of expected args - */ - - -function testcase() { - function foo(x, y) { } - var o = {}; - - var bf = foo.bind(o, 42); - if (bf.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-13.b-6 +description: > + Function.prototype.bind, 'length' set to remaining number of + expected args +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo(x, y) { } + var o = {}; + + var bf = foo.bind(o, 42); + if (bf.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js index 34e4eef144..51aecbf416 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js - * @description Function.prototype.bind, 'length' is a data valued own property - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - var desc = Object.getOwnPropertyDescriptor(bf, 'length'); - if (desc.hasOwnProperty('value') === true && - desc.hasOwnProperty('get') === false && - desc.hasOwnProperty('set') === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-15-1 +description: Function.prototype.bind, 'length' is a data valued own property +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + var desc = Object.getOwnPropertyDescriptor(bf, 'length'); + if (desc.hasOwnProperty('value') === true && + desc.hasOwnProperty('get') === false && + desc.hasOwnProperty('set') === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js index 2297286a7b..198b9531a2 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js - * @description Function.prototype.bind, 'length' is a data valued own property with default attributes (false) - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - var desc = Object.getOwnPropertyDescriptor(bf, 'length'); - if (desc.value === 0 && - desc.enumerable === false && - desc.writable === false && - desc.configurable == false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-15-2 +description: > + Function.prototype.bind, 'length' is a data valued own property + with default attributes (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + var desc = Object.getOwnPropertyDescriptor(bf, 'length'); + if (desc.value === 0 && + desc.enumerable === false && + desc.writable === false && + desc.configurable == false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-3.js index e5e332c7fc..9dcc35ed8b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-3.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-3.js - * @description Function.prototype.bind - The [[Writable]] attribute of length property in F set as false - */ - - -function testcase() { - - var canWritable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("length"); - obj.length = 100; - canWritable = (obj.length === 100); - return hasProperty && !canWritable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-15-3 +description: > + Function.prototype.bind - The [[Writable]] attribute of length + property in F set as false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canWritable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("length"); + obj.length = 100; + canWritable = (obj.length === 100); + return hasProperty && !canWritable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-4.js index 954e03c689..e01a80a46d 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-4.js - * @description Function.prototype.bind - The [[Enumerable]] attribute of length property in F set as false - */ - - -function testcase() { - - var canEnumerable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("length"); - for (var prop in obj) { - if (prop === "length") { - canEnumerable = true; - } - } - return hasProperty && !canEnumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-15-4 +description: > + Function.prototype.bind - The [[Enumerable]] attribute of length + property in F set as false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canEnumerable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("length"); + for (var prop in obj) { + if (prop === "length") { + canEnumerable = true; + } + } + return hasProperty && !canEnumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-5.js index ba9d7d5ab5..b16074acdc 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-5.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-5.js - * @description Function.prototype.bind - The [[Configurable]] attribute of length property in F set as false - */ - - -function testcase() { - - var canConfigurable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("length"); - delete obj.caller; - canConfigurable = !obj.hasOwnProperty("length"); - return hasProperty && !canConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-15-5 +description: > + Function.prototype.bind - The [[Configurable]] attribute of length + property in F set as false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canConfigurable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("length"); + delete obj.caller; + canConfigurable = !obj.hasOwnProperty("length"); + return hasProperty && !canConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js index db2db95135..d7a4386e53 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js - * @description Function.prototype.bind, [[Extensible]] of the bound fn is true - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - var ex = Object.isExtensible(bf); - if (ex === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-16-1 +description: Function.prototype.bind, [[Extensible]] of the bound fn is true +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + var ex = Object.isExtensible(bf); + if (ex === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-2.js index b7412d54fb..d930c08c50 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-2.js - * @description Function.prototype.bind - The [[Extensible]] attribute of internal property in F set as true - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - obj.property = 12; - return obj.hasOwnProperty("property"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-16-2 +description: > + Function.prototype.bind - The [[Extensible]] attribute of internal + property in F set as true +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + obj.property = 12; + return obj.hasOwnProperty("property"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js index 3c6157285f..6b6f660c55 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js - * @description Function.prototype.bind throws TypeError if the Target is not callable (but an instance of Function) - */ - - -function testcase() { - foo.prototype = Function.prototype; - // dummy function - function foo() {} - var f = new foo(); - - try { - f.bind(); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-1 +description: > + Function.prototype.bind throws TypeError if the Target is not + callable (but an instance of Function) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = Function.prototype; + // dummy function + function foo() {} + var f = new foo(); + + try { + f.bind(); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-10.js index 33ccf9e8c5..337ade538b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-10.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-10.js - * @description Function.prototype.bind throws TypeError if 'Target' is undefined - */ -function testcase() { - try { - Function.prototype.bind.call(undefined); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-10 +description: Function.prototype.bind throws TypeError if 'Target' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function.prototype.bind.call(undefined); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-11.js index 84425babe9..619bfff3b1 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-11.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-11.js - * @description Function.prototype.bind throws TypeError if 'Target' is NULL - */ -function testcase() { - try { - Function.prototype.bind.call(null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-11 +description: Function.prototype.bind throws TypeError if 'Target' is NULL +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function.prototype.bind.call(null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-12.js index 64be86e105..3985165ad6 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-12.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-12.js - * @description Function.prototype.bind throws TypeError if 'Target' is a boolean - */ -function testcase() { - try { - Function.prototype.bind.call(true); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-12 +description: Function.prototype.bind throws TypeError if 'Target' is a boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function.prototype.bind.call(true); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-13.js index c0dabe21f9..a7c0dad35e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-13.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-13.js - * @description Function.prototype.bind throws TypeError if 'Target' is a number - */ -function testcase() { - try { - Function.prototype.bind.call(5); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-13 +description: Function.prototype.bind throws TypeError if 'Target' is a number +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function.prototype.bind.call(5); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-14.js index 51ac5f9438..590d7e249c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-14.js @@ -1,19 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-14.js - * @description Function.prototype.bind throws TypeError if 'Target' is a string - */ -function testcase() { - try { - Function.prototype.bind.call("abc"); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-14 +description: Function.prototype.bind throws TypeError if 'Target' is a string +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function.prototype.bind.call("abc"); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-15.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-15.js index 486e77a3f4..49eab367f0 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-15.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-15.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-15.js - * @description Function.prototype.bind throws TypeError if 'Target' is Object without Call internal method - */ - - -function testcase() { - try { - Function.prototype.bind.call({}); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-15 +description: > + Function.prototype.bind throws TypeError if 'Target' is Object + without Call internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Function.prototype.bind.call({}); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-16.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-16.js index 9af2678146..76ad7fd3fb 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-16.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-16.js @@ -1,22 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-16.js - * @description Function.prototype.bind - 'Target' is a function - */ - - -function testcase() { - function testFunc() {} - try { - testFunc.bind(); - return true; - } catch (e) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-16 +description: Function.prototype.bind - 'Target' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + function testFunc() {} + try { + testFunc.bind(); + return true; + } catch (e) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js index cadeefde88..61f9751e80 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js - * @description Function.prototype.bind throws TypeError if the Target is not callable (bind attached to object) - */ - - -function testcase() { - // dummy function - function foo() {} - var f = new foo(); - f.bind = Function.prototype.bind; - - try { - f.bind(); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-2 +description: > + Function.prototype.bind throws TypeError if the Target is not + callable (bind attached to object) +includes: [runTestCase.js] +---*/ + +function testcase() { + // dummy function + function foo() {} + var f = new foo(); + f.bind = Function.prototype.bind; + + try { + f.bind(); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js index a59b76a22a..198060516b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js - * @description Function.prototype.bind allows Target to be a constructor (Number) - */ - - -function testcase() { - var bnc = Number.bind(null); - var n = bnc(42); - if (n === 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-3 +description: Function.prototype.bind allows Target to be a constructor (Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var bnc = Number.bind(null); + var n = bnc(42); + if (n === 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js index 9595be5805..dfa24a64dc 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js - * @description Function.prototype.bind allows Target to be a constructor (String) - */ - - -function testcase() { - var bsc = String.bind(null); - var s = bsc("hello world"); - if (s === "hello world") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-4 +description: Function.prototype.bind allows Target to be a constructor (String) +includes: [runTestCase.js] +---*/ + +function testcase() { + var bsc = String.bind(null); + var s = bsc("hello world"); + if (s === "hello world") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js index 760b7bad31..a1608b2ca9 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js - * @description Function.prototype.bind allows Target to be a constructor (Boolean) - */ - - -function testcase() { - var bbc = Boolean.bind(null); - var b = bbc(true); - if (b === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-5 +description: Function.prototype.bind allows Target to be a constructor (Boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var bbc = Boolean.bind(null); + var b = bbc(true); + if (b === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js index c58f76684c..ee8e966783 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js - * @description Function.prototype.bind allows Target to be a constructor (Object) - */ - - -function testcase() { - var boc = Object.bind(null); - var o = boc(42); - if (o == 42) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-6 +description: Function.prototype.bind allows Target to be a constructor (Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var boc = Object.bind(null); + var o = boc(42); + if (o == 42) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js index f403852470..eb75ecef0a 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js @@ -1,24 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js - * @description Function.prototype.bind throws TypeError if the Target is not callable (JSON) - */ - - -function testcase() { - try { - JSON.bind(); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-7 +description: > + Function.prototype.bind throws TypeError if the Target is not + callable (JSON) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + JSON.bind(); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js index 96b3d395f8..d4106f3d92 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable. - * - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js - * @description Function.prototype.bind allows Target to be a constructor (Array) - */ - - -function testcase() { - var bac = Array.bind(null); - var a = bac(42); - a.prop = "verifyPropertyExist"; - a[41] = 41; - - return a.prop === "verifyPropertyExist" && a[41] === 41 && a.length === 42; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target + is not callable. +es5id: 15.3.4.5-2-8 +description: Function.prototype.bind allows Target to be a constructor (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var bac = Array.bind(null); + var a = bac(42); + a.prop = "verifyPropertyExist"; + a[41] = 41; + + return a.prop === "verifyPropertyExist" && a[41] === 41 && a.length === 42; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js index 35994e6136..af55537937 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js - * @description Function.prototype.bind allows Target to be a constructor (Date) - */ - - -function testcase() { - var bdc = Date.bind(null); - var s = bdc(0, 0, 0); - if (typeof(s) === 'string') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-2-9 +description: Function.prototype.bind allows Target to be a constructor (Date) +includes: [runTestCase.js] +---*/ + +function testcase() { + var bdc = Date.bind(null); + var s = bdc(0, 0, 0); + if (typeof(s) === 'string') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js index 6baa890d9a..1123db048e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js - * @description Function.prototype.bind - 'caller' is defined as one property of 'F' - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - return obj.hasOwnProperty("caller"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-20-1 +description: > + Function.prototype.bind - 'caller' is defined as one property of + 'F' +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + return obj.hasOwnProperty("caller"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-2.js index 97352a8ac8..bc56529999 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-2.js - * @description Function.prototype.bind - [[Get]] attribute of 'caller' property in 'F' is thrower - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - try { - return obj.caller && false; - } catch (ex) { - return (ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-20-2 +description: > + Function.prototype.bind - [[Get]] attribute of 'caller' property + in 'F' is thrower +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + try { + return obj.caller && false; + } catch (ex) { + return (ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-3.js index d627779a30..cf1263cf0e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-3.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-3.js - * @description Function.prototype.bind - [[Set]] attribute of 'caller' property in 'F' is thrower - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - try { - obj.caller = 12; - return false; - } catch (ex) { - return (ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-20-3 +description: > + Function.prototype.bind - [[Set]] attribute of 'caller' property + in 'F' is thrower +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + try { + obj.caller = 12; + return false; + } catch (ex) { + return (ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js index df5c636811..2b5713cf15 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js - * @description Function.prototype.bind - The [[Enumerable]] attribute of 'caller' property in 'F' is false - */ - - -function testcase() { - - var canEnumerable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("caller"); - for (var prop in obj) { - if (prop === "caller") { - canEnumerable = true; - } - } - return hasProperty && !canEnumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-20-4 +description: > + Function.prototype.bind - The [[Enumerable]] attribute of 'caller' + property in 'F' is false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canEnumerable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("caller"); + for (var prop in obj) { + if (prop === "caller") { + canEnumerable = true; + } + } + return hasProperty && !canEnumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js index e5ff885378..4651967335 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js - * @description Function.prototype.bind - The [[Configurable]] attribute of 'caller' property in 'F' is false - */ - - -function testcase() { - - var canConfigurable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("caller"); - delete obj.caller; - canConfigurable = obj.hasOwnProperty("caller"); - return hasProperty && canConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-20-5 +description: > + Function.prototype.bind - The [[Configurable]] attribute of + 'caller' property in 'F' is false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canConfigurable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("caller"); + delete obj.caller; + canConfigurable = obj.hasOwnProperty("caller"); + return hasProperty && canConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js index 2f4f76dff4..5a5c0f9590 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js - * @description Function.prototype.bind - 'arguments' is defined as one property of 'F' - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - return obj.hasOwnProperty("arguments"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-21-1 +description: > + Function.prototype.bind - 'arguments' is defined as one property + of 'F' +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + return obj.hasOwnProperty("arguments"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-2.js index 79b87cd9ef..96717f24cc 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-2.js - * @description Function.prototype.bind - [[Get]] attribute of 'arguments' property in 'F' is thrower - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - try { - return obj.arguments && false; - } catch (ex) { - return (ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-21-2 +description: > + Function.prototype.bind - [[Get]] attribute of 'arguments' + property in 'F' is thrower +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + try { + return obj.arguments && false; + } catch (ex) { + return (ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-3.js index 859b996fc0..734506ba70 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-3.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-3.js - * @description Function.prototype.bind - [[Set]] attribute of 'arguments' property in 'F' is thrower - */ - - -function testcase() { - - function foo() { } - var obj = foo.bind({}); - try { - obj.arguments = 12; - return false; - } catch (ex) { - return (ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-21-3 +description: > + Function.prototype.bind - [[Set]] attribute of 'arguments' + property in 'F' is thrower +includes: [runTestCase.js] +---*/ + +function testcase() { + + function foo() { } + var obj = foo.bind({}); + try { + obj.arguments = 12; + return false; + } catch (ex) { + return (ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js index 1f2b9b5af1..bf9565b1ab 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js - * @description Function.prototype.bind - The [[Enumerable]] attribute of 'arguments' property in 'F' is false - */ - - -function testcase() { - - var canEnumerable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("arguments"); - for (var prop in obj) { - if (prop === "arguments") { - canEnumerable = true; - } - } - return hasProperty && !canEnumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-21-4 +description: > + Function.prototype.bind - The [[Enumerable]] attribute of + 'arguments' property in 'F' is false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canEnumerable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("arguments"); + for (var prop in obj) { + if (prop === "arguments") { + canEnumerable = true; + } + } + return hasProperty && !canEnumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js index fb5772d60a..12f2a163da 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js - * @description Function.prototype.bind - The [[Configurable]] attribute of 'arguments' property in 'F' is false - */ - - -function testcase() { - - var canConfigurable = false; - var hasProperty = false; - function foo() { } - var obj = foo.bind({}); - hasProperty = obj.hasOwnProperty("arguments"); - delete obj.caller; - canConfigurable = !obj.hasOwnProperty("arguments"); - return hasProperty && !canConfigurable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-21-5 +description: > + Function.prototype.bind - The [[Configurable]] attribute of + 'arguments' property in 'F' is false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var canConfigurable = false; + var hasProperty = false; + function foo() { } + var obj = foo.bind({}); + hasProperty = obj.hasOwnProperty("arguments"); + delete obj.caller; + canConfigurable = !obj.hasOwnProperty("arguments"); + return hasProperty && !canConfigurable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-3-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-3-1.js index 919b1a01f4..9a8d3f1169 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-3-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-3-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-3-1.js - * @description Function.prototype.bind - each arg is defined in A in list order - */ - - -function testcase() { - - var foo = function (x, y) { - return new Boolean((x + y) === "ab" && arguments[0] === "a" && - arguments[1] === "b" && arguments.length === 2); - }; - - var obj = foo.bind({}, "a", "b"); - return obj()==true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-3-1 +description: Function.prototype.bind - each arg is defined in A in list order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function (x, y) { + return new Boolean((x + y) === "ab" && arguments[0] === "a" && + arguments[1] === "b" && arguments.length === 2); + }; + + var obj = foo.bind({}, "a", "b"); + return obj()==true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-1.js index acc8643580..b97175d094 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-1.js - * @description Function.prototype.bind - F can get own data property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - obj.property = 12; - return obj.property === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-1 +description: Function.prototype.bind - F can get own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + obj.property = 12; + return obj.property === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-10.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-10.js index 32f349895b..25a03f5d58 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-10.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-10.js - * @description Function.prototype.bind - F can get own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Object.defineProperty(Function.prototype, "property", { - get: function () { - return 3; - }, - configurable: true - }); - - Object.defineProperty(obj, "property", { - set: function () { } - }); - return typeof (obj.property) === "undefined"; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-10 +description: > + Function.prototype.bind - F can get own accessor property without + a get function that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Object.defineProperty(Function.prototype, "property", { + get: function () { + return 3; + }, + configurable: true + }); + + Object.defineProperty(obj, "property", { + set: function () { } + }); + return typeof (obj.property) === "undefined"; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-11.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-11.js index ec08f1129b..76f18eca35 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-11.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-11.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-11.js - * @description Function.prototype.bind - F can get inherited accessor property without a get function - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Object.defineProperty(Function.prototype, "property", { - set: function () { }, - configurable: true - }); - return typeof (obj.property) === "undefined"; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-11 +description: > + Function.prototype.bind - F can get inherited accessor property + without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Object.defineProperty(Function.prototype, "property", { + set: function () { }, + configurable: true + }); + return typeof (obj.property) === "undefined"; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-12.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-12.js index 1071f64621..08ffa3e4b7 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-12.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-12.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-12.js - * @description Function.prototype.bind - F cannot get property which doesn't exist - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - return typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-12 +description: Function.prototype.bind - F cannot get property which doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + return typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-2.js index 4653229185..18b928866d 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-2.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-2.js - * @description Function.prototype.bind - F can get inherited data property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Function.prototype.property = 12; - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-2 +description: Function.prototype.bind - F can get inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Function.prototype.property = 12; + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-3.js index 18570e2736..f9f2f17a38 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-3.js - * @description Function.prototype.bind - F can get own data property that overrides an inherited data property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - - try { - Function.prototype.property = 3; - obj.property = 12; - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-3 +description: > + Function.prototype.bind - F can get own data property that + overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + + try { + Function.prototype.property = 3; + obj.property = 12; + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-4.js index ef687d6fd2..90cac12f30 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-4.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-4.js - * @description Function.prototype.bind - F can get own data property that overrides an inherited accessor property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Object.defineProperty(Function.prototype, "property", { - get: function () { - return 3; - }, - configurable: true - }); - - Object.defineProperty(obj, "property", { - value: 12 - }); - - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-4 +description: > + Function.prototype.bind - F can get own data property that + overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Object.defineProperty(Function.prototype, "property", { + get: function () { + return 3; + }, + configurable: true + }); + + Object.defineProperty(obj, "property", { + value: 12 + }); + + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-5.js index c983257938..65b9e7f93b 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-5.js - * @description Function.prototype.bind - F can get own accessor property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - Object.defineProperty(obj, "property", { - get: function () { - return 12; - } - }); - return obj.property === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-5 +description: Function.prototype.bind - F can get own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + Object.defineProperty(obj, "property", { + get: function () { + return 12; + } + }); + return obj.property === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-6.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-6.js index 3cff59da8e..30ff538ea2 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-6.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-6.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-6.js - * @description Function.prototype.bind - F can get inherited accessor property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Object.defineProperty(Function.prototype, "property", { - get: function () { - return 12; - }, - configurable: true - }); - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-6 +description: Function.prototype.bind - F can get inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Object.defineProperty(Function.prototype, "property", { + get: function () { + return 12; + }, + configurable: true + }); + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-7.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-7.js index f41fe83a2e..b7907cfddf 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-7.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-7.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-7.js - * @description Function.prototype.bind - F can get own accessor property that overrides an inherited data property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Function.prototype.property = 3; - Object.defineProperty(obj, "property", { - get: function () { - return 12; - } - }); - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-7 +description: > + Function.prototype.bind - F can get own accessor property that + overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Function.prototype.property = 3; + Object.defineProperty(obj, "property", { + get: function () { + return 12; + } + }); + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-8.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-8.js index 2165355ccf..9166769f16 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-8.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-8.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-8.js - * @description Function.prototype.bind - F can get own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - try { - Object.defineProperty(Function.prototype, "property", { - get: function () { - return 3; - }, - configurable: true - }); - - Object.defineProperty(obj, "property", { - get: function () { - return 12; - } - }); - return obj.property === 12; - } finally { - delete Function.prototype.property; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-8 +description: > + Function.prototype.bind - F can get own accessor property that + overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + try { + Object.defineProperty(Function.prototype, "property", { + get: function () { + return 3; + }, + configurable: true + }); + + Object.defineProperty(obj, "property", { + get: function () { + return 12; + } + }); + return obj.property === 12; + } finally { + delete Function.prototype.property; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-9.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-9.js index 8c2d6fd24f..26650a9d91 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-9.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-9.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-9.js - * @description Function.prototype.bind - F can get own accessor property without a get function - */ - - -function testcase() { - - var foo = function () { }; - - var obj = foo.bind({}); - Object.defineProperty(obj, "property", { - set: function () {} - }); - return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-6-9 +description: > + Function.prototype.bind - F can get own accessor property without + a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var foo = function () { }; + + var obj = foo.bind({}); + Object.defineProperty(obj, "property", { + set: function () {} + }); + return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js index 4b6b7ded44..041edec3da 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js - * @description Function.prototype.bind, type of bound function must be 'function' - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - if (typeof(bf) === 'function') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-8-1 +description: Function.prototype.bind, type of bound function must be 'function' +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + if (typeof(bf) === 'function') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js index 65db6d625c..cdfc5c6c96 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js - * @description Function.prototype.bind, [[Class]] of bound function must be 'Function' - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - var s = Object.prototype.toString.call(bf); - if (s === '[object Function]') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-8-2 +description: > + Function.prototype.bind, [[Class]] of bound function must be + 'Function' +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + var s = Object.prototype.toString.call(bf); + if (s === '[object Function]') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js index b0fa316069..55fe4c797f 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js - * @description Function.prototype.bind, [[Prototype]] is Function.prototype - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - if (Function.prototype.isPrototypeOf(bf)) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-9-1 +description: Function.prototype.bind, [[Prototype]] is Function.prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + if (Function.prototype.isPrototypeOf(bf)) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js index 8cff9369ae..366107df37 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js - * @description Function.prototype.bind, [[Prototype]] is Function.prototype (using getPrototypeOf) - */ - - -function testcase() { - function foo() { } - var o = {}; - - var bf = foo.bind(o); - if (Object.getPrototypeOf(bf) === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.4.5-9-2 +description: > + Function.prototype.bind, [[Prototype]] is Function.prototype + (using getPrototypeOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + function foo() { } + var o = {}; + + var bf = foo.bind(o); + if (Object.getPrototypeOf(bf) === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A1.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A1.js index 65af32d2b0..25939c1221 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A1.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A1.js @@ -1,16 +1,14 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "caller" of bound function is poisoned (step 20) - * - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A1.js - * @description A bound function should fail to find its "caller" - * @negative TypeError - */ +/*--- +info: "\"caller\" of bound function is poisoned (step 20)" +es5id: 15.3.4.5_A1 +description: A bound function should fail to find its "caller" +negative: TypeError +---*/ function foo() { return bar.caller; } var bar = foo.bind({}); function baz() { return bar(); } baz(); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A13.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A13.js index 93892e868e..0e5a864860 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A13.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A13.js @@ -1,12 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A13.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.5_A13 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.bind.call(undefined, {}); - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A14.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A14.js index 3fae6b26b7..df2211364c 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A14.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A14.js @@ -1,12 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A14.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.5_A14 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.bind.call(null, {}); - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A15.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A15.js index 25ac3d72a4..4154448c9e 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A15.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A15.js @@ -1,12 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A15.js - * @description If IsCallable(func) is false, then throw a TypeError exception. - * @negative TypeError - */ +/*--- +es5id: 15.3.4.5_A15 +description: If IsCallable(func) is false, then throw a TypeError exception. +negative: TypeError +---*/ Function.prototype.bind.call({}, {}); - - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A16.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A16.js index d3336de717..53b26df697 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A16.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A16.js @@ -1,12 +1,15 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If IsCallable(func) is false, then throw a TypeError exception. - * - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A16.js - * @description A RegExp is not a function, but it may be callable. Iff it is, it's typeof should be 'function', in which case bind should accept it as a valid this value. - */ +/*--- +info: If IsCallable(func) is false, then throw a TypeError exception. +es5id: 15.3.4.5_A16 +description: > + A RegExp is not a function, but it may be callable. Iff it is, + it's typeof should be 'function', in which case bind should accept + it as a valid this value. +includes: [$FAIL.js] +---*/ var re = (/x/); if (typeof re === 'function') { @@ -22,4 +25,3 @@ if (typeof re === 'function') { } } } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A2.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A2.js index 7d94c7755e..76339dabb1 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A2.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A2.js @@ -1,16 +1,14 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * "arguments" of bound function is poisoned (step 21) - * - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A2.js - * @description a bound function should fail to find the bound function "arguments" - * @negative TypeError - */ +/*--- +info: "\"arguments\" of bound function is poisoned (step 21)" +es5id: 15.3.4.5_A2 +description: a bound function should fail to find the bound function "arguments" +negative: TypeError +---*/ function foo() { return bar.arguments; } var bar = foo.bind({}); function baz() { return bar(); } baz(); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A3.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A3.js index d0cd6bbaf5..4987f5074d 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A3.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A3.js @@ -1,12 +1,11 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A3.js - * @description Function.prototype.bind must exist - */ +/*--- +es5id: 15.3.4.5_A3 +description: Function.prototype.bind must exist +---*/ if (!('bind' in Function.prototype)) { $ERROR('Function.prototype.bind is missing'); } - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A4.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A4.js index 719fdb5314..1dd42541df 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A4.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A4.js @@ -1,11 +1,12 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A4.js - * @description Function.prototype.bind call the original's internal - * [[Call]] method rather than its .apply method. - */ +/*--- +es5id: 15.3.4.5_A4 +description: > + Function.prototype.bind call the original's internal [[Call]] + method rather than its .apply method. +---*/ function foo() {} @@ -14,4 +15,3 @@ foo.apply = function() { $ERROR("Function.prototype.bind called original's .apply method"); }; b(55, 66); - diff --git a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js index c80624e163..00f22db706 100644 --- a/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js +++ b/test/suite/ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js @@ -1,11 +1,12 @@ // Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.3/15.3.4/15.3.4.5/S15.3.4.5_A5.js - * @description Function.prototype.bind must curry [[Construct]] as - * well as [[Call]]. - */ +/*--- +es5id: 15.3.4.5_A5 +description: > + Function.prototype.bind must curry [[Construct]] as well as + [[Call]]. +---*/ function construct(f, args) { var bound = Function.prototype.bind.apply(f, [null].concat(args)); diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4.1_A1_T1.js b/test/suite/ch15/15.3/15.3.4/S15.3.4.1_A1_T1.js index f41d2d94a7..4a5fd95eed 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4.1_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4.1_A1_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Function.prototype.constructor is the built-in Function constructor - * - * @path ch15/15.3/15.3.4/S15.3.4.1_A1_T1.js - * @description Checking Function.prototype.constructor - */ +/*--- +info: > + The initial value of Function.prototype.constructor is the built-in + Function constructor +es5id: 15.3.4.1_A1_T1 +description: Checking Function.prototype.constructor +---*/ //CHECK#1 if (Function.prototype.constructor !== Function) { $ERROR('#1: The initial value of Function.prototype.constructor is the built-in Function constructor'); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A1.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A1.js index f73e867b74..fb1728ff38 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A1.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function prototype object is itself a Function object (its [[Class]] is "Function") - * - * @path ch15/15.3/15.3.4/S15.3.4_A1.js - * @description Object.prototype.toString returns [object+[[Class]]+] - */ +/*--- +info: > + The Function prototype object is itself a Function object (its [[Class]] + is "Function") +es5id: 15.3.4_A1 +description: Object.prototype.toString returns [object+[[Class]]+] +---*/ if (Object.prototype.toString.call(Function.prototype) !== "[object Function]") { $ERROR('#2: The Function prototype object is itself a Function ' + 'object (its [[Class]] is "Function") (15.3.4)'); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T1.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T1.js index 8a9e9cf66f..a9a35980f1 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined - * - * @path ch15/15.3/15.3.4/S15.3.4_A2_T1.js - * @description Call Function.prototype() - */ +/*--- +info: > + The Function prototype object is itself a Function object that, when + invoked, accepts any arguments and returns undefined +es5id: 15.3.4_A2_T1 +description: Call Function.prototype() +---*/ //CHECK#1 try { @@ -16,4 +17,3 @@ try { } catch (e) { $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: '+e); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T2.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T2.js index bbf5ac5ef9..f252347907 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined - * - * @path ch15/15.3/15.3.4/S15.3.4_A2_T2.js - * @description Call Function.prototype(null,void 0) - */ +/*--- +info: > + The Function prototype object is itself a Function object that, when + invoked, accepts any arguments and returns undefined +es5id: 15.3.4_A2_T2 +description: Call Function.prototype(null,void 0) +---*/ //CHECK#1 try { @@ -16,4 +17,3 @@ try { } catch (e) { $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: '+e); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T3.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T3.js index d01ed8e37e..8ffa44d5b4 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T3.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A2_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined - * - * @path ch15/15.3/15.3.4/S15.3.4_A2_T3.js - * @description Call Function.prototype(x), where x is undefined variable - */ +/*--- +info: > + The Function prototype object is itself a Function object that, when + invoked, accepts any arguments and returns undefined +es5id: 15.3.4_A2_T3 +description: Call Function.prototype(x), where x is undefined variable +---*/ //CHECK#1 try { @@ -17,5 +18,3 @@ try { } catch (e) { $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: '+e); } - - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T1.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T1.js index 0c0dd8bf4c..61b3f96de6 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.4) - * - * @path ch15/15.3/15.3.4/S15.3.4_A3_T1.js - * @description Checking prototype of Function.prototype - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Function + prototype object is the Object prototype object (15.3.4) +es5id: 15.3.4_A3_T1 +description: Checking prototype of Function.prototype +---*/ if (Object.getPrototypeOf(Function.prototype) !== Object.prototype) { $ERROR('#1: The value of the internal [[Prototype]] property of ' + 'the Function prototype object is the Object prototype ' + 'object (15.3.4)'); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T2.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T2.js index c76ebc759e..3666252c62 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A3_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1) - * - * @path ch15/15.3/15.3.4/S15.3.4_A3_T2.js - * @description Add new property to Object.prototype and check it at Function.prototype - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Function + prototype object is the Object prototype object (15.3.2.1) +es5id: 15.3.4_A3_T2 +description: > + Add new property to Object.prototype and check it at + Function.prototype +---*/ Object.prototype.indicator = 1; @@ -14,4 +17,3 @@ Object.prototype.indicator = 1; if (Function.prototype.indicator!==1) { $ERROR('#1: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)'); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A4.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A4.js index 39b96039ae..c45acf8514 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A4.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function prototype object does not have a valueOf property of its own. however, it inherits the valueOf property from the Object prototype Object - * - * @path ch15/15.3/15.3.4/S15.3.4_A4.js - * @description Checking valueOf property at Function.prototype - */ +/*--- +info: > + The Function prototype object does not have a valueOf property of its + own. however, it inherits the valueOf property from the Object prototype + Object +es5id: 15.3.4_A4 +description: Checking valueOf property at Function.prototype +---*/ //CHECK#1 if (Function.prototype.hasOwnProperty("valueOf") !== false) { @@ -22,4 +24,3 @@ if (typeof Function.prototype.valueOf === "undefined") { if (Function.prototype.valueOf !== Object.prototype.valueOf) { $ERROR('#3: however, it inherits the valueOf property from the Object prototype Object'); } - diff --git a/test/suite/ch15/15.3/15.3.4/S15.3.4_A5.js b/test/suite/ch15/15.3/15.3.4/S15.3.4_A5.js index d26add206f..fd0a6d3491 100644 --- a/test/suite/ch15/15.3/15.3.4/S15.3.4_A5.js +++ b/test/suite/ch15/15.3/15.3.4/S15.3.4_A5.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Function prototype object is itself a Function object without [[create]] property - * - * @path ch15/15.3/15.3.4/S15.3.4_A5.js - * @description Checking if creating "new Function.prototype object" fails - */ +/*--- +info: > + The Function prototype object is itself a Function object without + [[create]] property +es5id: 15.3.4_A5 +description: Checking if creating "new Function.prototype object" fails +includes: + - $PRINT.js + - $FAIL.js +---*/ //CHECK# try { @@ -16,4 +20,3 @@ try { $PRINT("#1.1: The Function prototype object is itself a Function object without [[create]] property "+e); } - diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5-1gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5-1gs.js index 87e1cf11d0..5cbf456d72 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5-1gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5-1gs.js @@ -1,18 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.5/15.3.5-1gs.js - * @description StrictMode - error is thrown when reading the 'caller' property of a function object - * @onlyStrict - * @negative NotEarlyError - */ - -"use strict"; -function _15_3_5_1_gs() {} -throw NotEarlyError; -_15_3_5_1_gs.caller; - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5-1gs +description: > + StrictMode - error is thrown when reading the 'caller' property of + a function object +negative: Test262Error +flags: [onlyStrict] +includes: [Test262Error.js] +---*/ + +"use strict"; +function _15_3_5_1_gs() {} +throw new Test262Error(); +_15_3_5_1_gs.caller; diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5-2gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5-2gs.js index c173e44139..f4895b2657 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5-2gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5-2gs.js @@ -1,17 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.3/15.3.5/15.3.5-2gs.js - * @description StrictMode - error is thrown when reading the 'caller' property of a function object - * @onlyStrict - * @negative ^((?!NotEarlyError).)*$ - */ - -"use strict"; -function _15_3_5_1_gs() {} -_15_3_5_1_gs.caller; -throw NotEarlyError; +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5-2gs +description: > + StrictMode - error is thrown when reading the 'caller' property of + a function object +negative: ^((?!NotEarlyError).)*$ +flags: [onlyStrict] +---*/ + +"use strict"; +function _15_3_5_1_gs() {} +_15_3_5_1_gs.caller; +throw NotEarlyError; diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-10gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-10gs.js index e4709e980b..6f20e83a7f 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-10gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-10gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-10gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (New'ed Function constructor includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f = new Function("\"use strict\";\nreturn gNonStrict();"); -f(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-10gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (New'ed Function constructor includes strict + directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f = new Function("\"use strict\";\nreturn gNonStrict();"); +f(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-11gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-11gs.js index e36af1df9a..93e0183efb 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-11gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-11gs.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-11gs.js - * @description Strict mode - checking access to strict function caller from strict function (eval used within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -eval("gNonStrict();"); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-11gs +description: > + Strict mode - checking access to strict function caller from + strict function (eval used within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +eval("gNonStrict();"); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-12gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-12gs.js index 9d72fbbe49..1b6dfa8d0f 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-12gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-12gs.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-12gs.js - * @description Strict mode - checking access to non-strict function caller from non-strict function (eval includes strict directive prologue) - * @noStrict - */ - - -eval("\"use strict\";\ngNonStrict();"); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-12gs +description: > + Strict mode - checking access to non-strict function caller from + non-strict function (eval includes strict directive prologue) +flags: [noStrict] +---*/ + +eval("\"use strict\";\ngNonStrict();"); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-13gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-13gs.js index 65b6ea64ac..12de77758e 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-13gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-13gs.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-13gs.js - * @description Strict mode - checking access to non-strict function caller from strict function (indirect eval used within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var my_eval = eval; -my_eval("gNonStrict();"); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-13gs +description: > + Strict mode - checking access to non-strict function caller from + strict function (indirect eval used within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var my_eval = eval; +my_eval("gNonStrict();"); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-14gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-14gs.js index d7dcf1c4db..30a4c2b1e1 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-14gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-14gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-14gs.js - * @description Strict mode - checking access to non-strict function caller from non-strict function (indirect eval includes strict directive prologue) - * @noStrict - */ - - -var my_eval = eval; -my_eval("\"use strict\";\ngNonStrict();"); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-14gs +description: > + Strict mode - checking access to non-strict function caller from + non-strict function (indirect eval includes strict directive + prologue) +flags: [noStrict] +---*/ + +var my_eval = eval; +my_eval("\"use strict\";\ngNonStrict();"); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-15gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-15gs.js index f98fef128f..f0c7033878 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-15gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-15gs.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-15gs.js - * @description Strict mode - checking access to strict function caller from strict function (New'ed object from FunctionDeclaration defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -function f() { - return gNonStrict(); -} -new f(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-15gs +description: > + Strict mode - checking access to strict function caller from + strict function (New'ed object from FunctionDeclaration defined + within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +function f() { + return gNonStrict(); +} +new f(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-16gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-16gs.js index 7e2bddb40e..7a8a62e6aa 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-16gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-16gs.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-16gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (New'ed object from FunctionDeclaration includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -function f() { - "use strict"; - return gNonStrict(); -} -new f(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-16gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (New'ed object from FunctionDeclaration + includes strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { + "use strict"; + return gNonStrict(); +} +new f(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-17gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-17gs.js index 4052e0aefb..0f0bf72b07 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-17gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-17gs.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-17gs.js - * @description Strict mode - checking access to strict function caller from strict function (New'ed object from FunctionExpression defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f = function () { - return gNonStrict(); -} -new f(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-17gs +description: > + Strict mode - checking access to strict function caller from + strict function (New'ed object from FunctionExpression defined + within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f = function () { + return gNonStrict(); +} +new f(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-18gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-18gs.js index 9282dfb624..27144a2b66 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-18gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-18gs.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-18gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (New'ed object from FunctionExpression includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f = function () { - "use strict"; - return gNonStrict(); -} -new f(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-18gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (New'ed object from FunctionExpression + includes strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f = function () { + "use strict"; + return gNonStrict(); +} +new f(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-19gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-19gs.js index 79adcf1ba8..5b596753de 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-19gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-19gs.js @@ -1,23 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-19gs.js - * @description Strict mode - checking access to strict function caller from strict function (New'ed object from Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var obj = new (function () { - return gNonStrict(); -}); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-19gs +description: > + Strict mode - checking access to strict function caller from + strict function (New'ed object from Anonymous FunctionExpression + defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var obj = new (function () { + return gNonStrict(); +}); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-1gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-1gs.js index 4bb11ea8ea..d0e104c5d0 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-1gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-1gs.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-1gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -function f() { - return gNonStrict(); -} -f(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-1gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionDeclaration defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +function f() { + return gNonStrict(); +} +f(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-20gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-20gs.js index 654b3ead78..971f563351 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-20gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-20gs.js @@ -1,23 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-20gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (New'ed object from Anonymous FunctionExpression includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var obj = new (function () { - "use strict"; - return gNonStrict(); -}); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-20gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (New'ed object from Anonymous + FunctionExpression includes strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var obj = new (function () { + "use strict"; + return gNonStrict(); +}); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-21gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-21gs.js index a62912ede0..e2beb1edf1 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-21gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-21gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-21gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -function f1() { - function f() { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-21gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionDeclaration defined within a + FunctionDeclaration inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +function f1() { + function f() { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-22gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-22gs.js index d710c5ef79..f5b355d556 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-22gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-22gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-22gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -function f1() { - var f = function () { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-22gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionExpression defined within a + FunctionDeclaration inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +function f1() { + var f = function () { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-23gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-23gs.js index 8497d91fce..c363fa3cd7 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-23gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-23gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-23gs.js - * @description Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -function f1() { - return (function () { - return gNonStrict(); - })(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-23gs +description: > + Strict mode - checking access to strict function caller from + strict function (Anonymous FunctionExpression defined within a + FunctionDeclaration inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +function f1() { + return (function () { + return gNonStrict(); + })(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-24gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-24gs.js index 4d0c4f658b..bb45e393be 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-24gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-24gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-24gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within a FunctionExpression inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f1 = function () { - function f() { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-24gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionDeclaration defined within a + FunctionExpression inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f1 = function () { + function f() { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-25gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-25gs.js index 85e6f5b24f..e6080020bb 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-25gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-25gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-25gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f1 = function () { - var f = function () { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-25gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionExpression defined within a + FunctionExpression inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f1 = function () { + var f = function () { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-26gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-26gs.js index b1f23423b5..149f2a5573 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-26gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-26gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-26gs.js - * @description Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f1 = function () { - return (function () { - return gNonStrict(); - })(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-26gs +description: > + Strict mode - checking access to strict function caller from + strict function (Anonymous FunctionExpression defined within a + FunctionExpression inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f1 = function () { + return (function () { + return gNonStrict(); + })(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-27gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-27gs.js index 451a699658..9483b22cb1 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-27gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-27gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-27gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -(function () { - function f() { - return gNonStrict(); - } - return f(); -})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-27gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionDeclaration defined within an Anonymous + FunctionExpression inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +(function () { + function f() { + return gNonStrict(); + } + return f(); +})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-28gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-28gs.js index 12abaf5810..d27c2531a5 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-28gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-28gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-28gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -(function () { - var f = function () { - return gNonStrict(); - } - return f(); -})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-28gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionExpression defined within an Anonymous + FunctionExpression inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +(function () { + var f = function () { + return gNonStrict(); + } + return f(); +})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-29gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-29gs.js index 47a3091e1e..132364c4d2 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-29gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-29gs.js @@ -1,25 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-29gs.js - * @description Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -(function () { - return (function () { - return gNonStrict(); - })(); -})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-29gs +description: > + Strict mode - checking access to strict function caller from + strict function (Anonymous FunctionExpression defined within an + Anonymous FunctionExpression inside strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +(function () { + return (function () { + return gNonStrict(); + })(); +})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-2gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-2gs.js index ac0a73919c..fd5ac04813 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-2gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-2gs.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-2gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -function f() { - "use strict"; - return gNonStrict(); -} -f(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-2gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { + "use strict"; + return gNonStrict(); +} +f(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-30gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-30gs.js index 8928186ac8..ac0b1a15d4 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-30gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-30gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-30gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -function f1() { - "use strict"; - function f() { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-30gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration defined within a + FunctionDeclaration with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +function f1() { + "use strict"; + function f() { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-31gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-31gs.js index eae0589548..d42b29487a 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-31gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-31gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-31gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -function f1() { - "use strict"; - var f = function () { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-31gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression defined within a + FunctionDeclaration with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +function f1() { + "use strict"; + var f = function () { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-32gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-32gs.js index 68e6e8e5f6..d68ad78f80 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-32gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-32gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-32gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -function f1() { - "use strict"; - return (function () { - return gNonStrict(); - })(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-32gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression defined within a + FunctionDeclaration with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +function f1() { + "use strict"; + return (function () { + return gNonStrict(); + })(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-33gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-33gs.js index 5186ef4a36..d20b91948d 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-33gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-33gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-33gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f1 = function () { - "use strict"; - function f() { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-33gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration defined within a + FunctionExpression with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f1 = function () { + "use strict"; + function f() { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-34gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-34gs.js index 728330d49e..746402fce0 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-34gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-34gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-34gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f1 = function () { - "use strict"; - var f = function () { - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-34gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression defined within a + FunctionExpression with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f1 = function () { + "use strict"; + var f = function () { + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-35gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-35gs.js index f78ae96e94..793a368bc7 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-35gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-35gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-35gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f1 = function () { - "use strict"; - return (function () { - return gNonStrict(); - })(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-35gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression defined within a + FunctionExpression with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f1 = function () { + "use strict"; + return (function () { + return gNonStrict(); + })(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-36gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-36gs.js index 4dca56c3bc..b8ead04987 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-36gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-36gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-36gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -(function () { - "use strict"; - function f() { - return gNonStrict(); - } - return f(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-36gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration defined within an + Anonymous FunctionExpression with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + "use strict"; + function f() { + return gNonStrict(); + } + return f(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-37gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-37gs.js index 866802a24e..40fdde3b89 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-37gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-37gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-37gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -(function () { - "use strict"; - var f = function () { - return gNonStrict(); - } - return f(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-37gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression defined within an + Anonymous FunctionExpression with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + "use strict"; + var f = function () { + return gNonStrict(); + } + return f(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-38gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-38gs.js index aa9734eb5c..a674f347ed 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-38gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-38gs.js @@ -1,25 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-38gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -(function () { - "use strict"; - return (function () { - return gNonStrict(); - })(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-38gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression defined within + an Anonymous FunctionExpression with a strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + "use strict"; + return (function () { + return gNonStrict(); + })(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-39gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-39gs.js index a607066230..d6136d3928 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-39gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-39gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-39gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - * @negative TypeError - */ - - -function f1() { - function f() { - "use strict"; - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-39gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration with a strict directive + prologue defined within a FunctionDeclaration) +negative: TypeError +flags: [noStrict] +---*/ + +function f1() { + function f() { + "use strict"; + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-3gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-3gs.js index 4f89d3727a..3232163782 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-3gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-3gs.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-3gs.js - * @description Strict mode - checking access to strict function caller from strict function (FunctionExpression defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f = function () { - return gNonStrict(); -} -f(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-3gs +description: > + Strict mode - checking access to strict function caller from + strict function (FunctionExpression defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f = function () { + return gNonStrict(); +} +f(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-40gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-40gs.js index e96e2440e8..e101888c7d 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-40gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-40gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-40gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - * @negative TypeError - */ - - -function f1() { - var f = function () { - "use strict"; - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-40gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression with a strict directive + prologue defined within a FunctionDeclaration) +negative: TypeError +flags: [noStrict] +---*/ + +function f1() { + var f = function () { + "use strict"; + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-41gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-41gs.js index f6c72bea73..4a27308687 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-41gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-41gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-41gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) - * @noStrict - * @negative TypeError - */ - - -function f1() { - return (function () { - "use strict"; - return gNonStrict(); - })(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-41gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression with a strict + directive prologue defined within a FunctionDeclaration) +negative: TypeError +flags: [noStrict] +---*/ + +function f1() { + return (function () { + "use strict"; + return gNonStrict(); + })(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-42gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-42gs.js index 32efa27930..c3aa7954db 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-42gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-42gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-42gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) - * @noStrict - * @negative TypeError - */ - - -var f1 = function () { - function f() { - "use strict"; - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-42gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration with a strict directive + prologue defined within a FunctionExpression) +negative: TypeError +flags: [noStrict] +---*/ + +var f1 = function () { + function f() { + "use strict"; + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-43gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-43gs.js index 3dd7ff941d..4f7c3f279b 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-43gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-43gs.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-43gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - * @negative TypeError - */ - - -var f1 = function () { - var f = function () { - "use strict"; - return gNonStrict(); - } - return f(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-43gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression with a strict directive + prologue defined within a FunctionExpression) +negative: TypeError +flags: [noStrict] +---*/ + +var f1 = function () { + var f = function () { + "use strict"; + return gNonStrict(); + } + return f(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-44gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-44gs.js index 354c354e0b..f3cdde554a 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-44gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-44gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-44gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) - * @noStrict - * @negative TypeError - */ - - -var f1 = function () { - return (function () { - "use strict"; - return gNonStrict(); - })(); -} -f1(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-44gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression with a strict + directive prologue defined within a FunctionExpression) +negative: TypeError +flags: [noStrict] +---*/ + +var f1 = function () { + return (function () { + "use strict"; + return gNonStrict(); + })(); +} +f1(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-45gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-45gs.js index 16b05ee241..d5144c7ffd 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-45gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-45gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-45gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - * @negative TypeError - */ - - -(function () { - function f() { - "use strict"; - return gNonStrict(); - } - return f(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-45gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionDeclaration with a strict directive + prologue defined within an Anonymous FunctionExpression) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + function f() { + "use strict"; + return gNonStrict(); + } + return f(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-46gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-46gs.js index 93e0beda41..e946f1cb21 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-46gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-46gs.js @@ -1,26 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-46gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - * @negative TypeError - */ - - -(function () { - var f = function () { - "use strict"; - return gNonStrict(); - } - return f(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-46gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression with a strict directive + prologue defined within an Anonymous FunctionExpression) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + var f = function () { + "use strict"; + return gNonStrict(); + } + return f(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-47gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-47gs.js index b68de18d7f..856cc23685 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-47gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-47gs.js @@ -1,25 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-47gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) - * @noStrict - * @negative TypeError - */ - - -(function () { - return (function () { - "use strict"; - return gNonStrict(); - })(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-47gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression with a strict + directive prologue defined within an Anonymous FunctionExpression) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + return (function () { + "use strict"; + return gNonStrict(); + })(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-48gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-48gs.js index 0fb987cd2b..276d1e4d47 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-48gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-48gs.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-48gs.js - * @description Strict mode - checking access to strict function caller from strict function (Literal getter defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var o = { get foo() { return gNonStrict(); } } -o.foo; - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-48gs +description: > + Strict mode - checking access to strict function caller from + strict function (Literal getter defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var o = { get foo() { return gNonStrict(); } } +o.foo; + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-49gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-49gs.js index 3eae7b11d7..09bd2b8c36 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-49gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-49gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-49gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Literal getter includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var o = { get foo() { "use strict"; return gNonStrict(); } } -o.foo; - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-49gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Literal getter includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var o = { get foo() { "use strict"; return gNonStrict(); } } +o.foo; + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-4gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-4gs.js index f6fd1036dc..03aa0b5271 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-4gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-4gs.js @@ -1,24 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-4gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (FunctionExpression includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f = function () { - "use strict"; - return gNonStrict(); -} -f(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-4gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (FunctionExpression includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f = function () { + "use strict"; + return gNonStrict(); +} +f(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-50gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-50gs.js index 433bceb56b..b594277f1c 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-50gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-50gs.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-50gs.js - * @description Strict mode - checking access to strict function caller from strict function (Literal setter defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var o = { set foo(stuff) { return gNonStrict(); } } -o.foo = 7; - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-50gs +description: > + Strict mode - checking access to strict function caller from + strict function (Literal setter defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var o = { set foo(stuff) { return gNonStrict(); } } +o.foo = 7; + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-51gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-51gs.js index 49b69f4b9a..f42f183e24 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-51gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-51gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-51gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Literal setter includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var o = { set foo(stuff) { "use strict"; return gNonStrict(); } } -o.foo = 8; - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-51gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Literal setter includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var o = { set foo(stuff) { "use strict"; return gNonStrict(); } } +o.foo = 8; + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-52gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-52gs.js index 6f49e6cddc..41239b805e 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-52gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-52gs.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-52gs.js - * @description Strict mode - checking access to strict function caller from strict function (Injected getter defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var o = {}; -Object.defineProperty(o, "foo", { get: function() { return gNonStrict(); } }); -o.foo; - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-52gs +description: > + Strict mode - checking access to strict function caller from + strict function (Injected getter defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var o = {}; +Object.defineProperty(o, "foo", { get: function() { return gNonStrict(); } }); +o.foo; + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-53gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-53gs.js index 6c6bd48a82..290912cad0 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-53gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-53gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-53gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Injected getter includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var o = {}; -Object.defineProperty(o, "foo", { get: function() { "use strict"; return gNonStrict(); } }); -o.foo; - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-53gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Injected getter includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var o = {}; +Object.defineProperty(o, "foo", { get: function() { "use strict"; return gNonStrict(); } }); +o.foo; + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-54gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-54gs.js index 9e7b792d85..beee4bb36a 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-54gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-54gs.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-54gs.js - * @description Strict mode - checking access to strict function caller from strict function (Injected setter defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var o = {}; -Object.defineProperty(o, "foo", { set: function(stuff) { return gNonStrict(); } }); -o.foo = 9; - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-54gs +description: > + Strict mode - checking access to strict function caller from + strict function (Injected setter defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var o = {}; +Object.defineProperty(o, "foo", { set: function(stuff) { return gNonStrict(); } }); +o.foo = 9; + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-55gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-55gs.js index 2739fa9e0e..9c083fa5f2 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-55gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-55gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-55gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Injected setter includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var o = {}; -Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; return gNonStrict(); } }); -o.foo = 10; - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-55gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Injected setter includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var o = {}; +Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; return gNonStrict(); } }); +o.foo = 10; + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-56gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-56gs.js index 0b58b94538..1b580cc0e0 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-56gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-56gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-56gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict function declaration) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -function foo() { return f();} -foo(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-56gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + non-strict function declaration) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +function foo() { return f();} +foo(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-57gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-57gs.js index b13890cd31..d37d5bf8f6 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-57gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-57gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-57gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict eval) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -eval("f();"); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-57gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + non-strict eval) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +eval("f();"); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-58gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-58gs.js index e418493a15..83d4eb2def 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-58gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-58gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-58gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict Function constructor) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -Function("return f();")(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-58gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + non-strict Function constructor) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +Function("return f();")(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-59gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-59gs.js index a66ea00cad..fec005f16b 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-59gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-59gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-59gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by non-strict new'ed Function constructor) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -new Function("return f();")(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-59gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + non-strict new'ed Function constructor) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +new Function("return f();")(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-5gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-5gs.js index ce651dd22b..54c3a5242e 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-5gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-5gs.js @@ -1,23 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-5gs.js - * @description Strict mode - checking access to strict function caller from strict function (Anonymous FunctionExpression defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -(function () { - return gNonStrict(); -})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-5gs +description: > + Strict mode - checking access to strict function caller from + strict function (Anonymous FunctionExpression defined within + strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +(function () { + return gNonStrict(); +})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-60gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-60gs.js index aaf42d98ae..830aeab7cc 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-60gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-60gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-60gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.apply(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-60gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.apply()) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.apply(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-61gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-61gs.js index 9c100aef07..614ead17e5 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-61gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-61gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-61gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(null)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.apply(null); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-61gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.apply(null)) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.apply(null); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-62gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-62gs.js index fe4cfd6581..2122928e97 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-62gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-62gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-62gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(undefined)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.apply(undefined); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-62gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.apply(undefined)) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.apply(undefined); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-63gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-63gs.js index 6a77440dd2..7d411a22aa 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-63gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-63gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-63gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(someObject)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -var o = {}; -f.apply(o); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-63gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.apply(someObject)) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +var o = {}; +f.apply(o); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-64gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-64gs.js index 5d630796ed..0f57ff132a 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-64gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-64gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-64gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.apply(globalObject)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.apply(fnGlobalObject()); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-64gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.apply(globalObject)) +negative: TypeError +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.apply(fnGlobalObject()); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-65gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-65gs.js index 5447227df0..bcd94c7464 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-65gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-65gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-65gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.call(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-65gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.call()) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.call(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-66gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-66gs.js index b6a287d97c..5a4949c657 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-66gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-66gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-66gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(null)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.call(null); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-66gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.call(null)) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.call(null); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-67gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-67gs.js index 27bf71a063..b822d4efa0 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-67gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-67gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-67gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(undefined)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.call(undefined); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-67gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.call(undefined)) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.call(undefined); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-68gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-68gs.js index a6f6d9e621..ecd4176423 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-68gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-68gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-68gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(someObject)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -var o = {}; -f.call(o); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-68gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.call(someObject)) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +var o = {}; +f.call(o); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-69gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-69gs.js index 124c0d09a7..508c9e2947 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-69gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-69gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-69gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.call(globalObject)) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.call(fnGlobalObject()); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-69gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.call(globalObject)) +negative: TypeError +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.call(fnGlobalObject()); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-6gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-6gs.js index 7a46ca1a79..85f528ba35 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-6gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-6gs.js @@ -1,23 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-6gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Anonymous FunctionExpression includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -(function () { - "use strict"; - return gNonStrict(); -})(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-6gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Anonymous FunctionExpression includes strict + directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +(function () { + "use strict"; + return gNonStrict(); +})(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-70gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-70gs.js index 587cd4d3d6..9812eb537c 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-70gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-70gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-70gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind()()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.bind()(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-70gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.bind()()) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.bind()(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-71gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-71gs.js index 6a931da779..fa35d63433 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-71gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-71gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-71gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(null)()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.bind(null)(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-71gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.bind(null)()) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.bind(null)(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-72gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-72gs.js index 03c60ba4ff..a8ff4c733f 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-72gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-72gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-72gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(undefined)()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.bind(undefined)(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-72gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.bind(undefined)()) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.bind(undefined)(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-73gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-73gs.js index 9ba3661714..050f105e80 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-73gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-73gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-73gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(someObject)()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -var o = {}; -f.bind(o)(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-73gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.bind(someObject)()) +negative: TypeError +flags: [noStrict] +---*/ + +function f() { "use strict"; return gNonStrict();}; +var o = {}; +f.bind(o)(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-74gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-74gs.js index dcd3a636dd..0c51e6e8bd 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-74gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-74gs.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-74gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (strict function declaration called by Function.prototype.bind(globalObject)()) - * @noStrict - * @negative TypeError - */ - - -function f() { "use strict"; return gNonStrict();}; -f.bind(fnGlobalObject())(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-74gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (strict function declaration called by + Function.prototype.bind(globalObject)()) +negative: TypeError +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { "use strict"; return gNonStrict();}; +f.bind(fnGlobalObject())(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-75gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-75gs.js index cda7c03241..ef2d47e241 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-75gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-75gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-75gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict function declaration) - * @noStrict - */ - - -function f() { return gNonStrict();}; -function foo() { "use strict"; return f();} -foo(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-75gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict function declaration) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +function foo() { "use strict"; return f();} +foo(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-76gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-76gs.js index 89c794699e..f0c8194a71 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-76gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-76gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-76gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict eval) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return eval("f();"); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-76gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict eval) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return eval("f();"); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-77gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-77gs.js index 572122575a..eb911917d3 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-77gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-77gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-77gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function constructor) - * @noStrict - */ - - -function f() {return gNonStrict();}; -(function () {"use strict"; return Function("return f();")(); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-77gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function constructor) +flags: [noStrict] +---*/ + +function f() {return gNonStrict();}; +(function () {"use strict"; return Function("return f();")(); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-78gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-78gs.js index 56e51c18dc..d1eea5b2db 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-78gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-78gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-78gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict new'ed Function constructor) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return new Function("return f();")(); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-78gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict new'ed Function constructor) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return new Function("return f();")(); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-79gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-79gs.js index 845d4a0dca..13aca14d98 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-79gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-79gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-79gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.apply()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.apply();})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-79gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.apply()) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.apply();})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-7gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-7gs.js index a75e3f030e..90328fbedc 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-7gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-7gs.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-7gs.js - * @description Strict mode - checking access to non-strict function caller from strict function (Function constructor defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f = Function("return gNonStrict();"); -f(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-7gs +description: > + Strict mode - checking access to non-strict function caller from + strict function (Function constructor defined within strict mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f = Function("return gNonStrict();"); +f(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-80gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-80gs.js index 839c4ec6c9..cbc51da18b 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-80gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-80gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-80gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.apply(null)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.apply(null); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-80gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.apply(null)) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.apply(null); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-81gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-81gs.js index 0425bd0564..648206085f 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-81gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-81gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-81gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.apply(undefined)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.apply(undefined); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-81gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.apply(undefined)) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.apply(undefined); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-82gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-82gs.js index 43d35835a7..992082f22d 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-82gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-82gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-82gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.apply(someObject)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -var o = {}; -(function () {"use strict"; return f.apply(o); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-82gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.apply(someObject)) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +var o = {}; +(function () {"use strict"; return f.apply(o); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-83gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-83gs.js index 0428553b72..6ed4ada3af 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-83gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-83gs.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-83gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.apply(globalObject)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.apply(fnGlobalObject()); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-83gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.apply(globalObject)) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.apply(fnGlobalObject()); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-84gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-84gs.js index 9984ceec7a..58ad5d8955 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-84gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-84gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-84gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.call()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.call();})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-84gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.call()) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.call();})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-85gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-85gs.js index 0eb29a5732..7571f69a55 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-85gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-85gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-85gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.call(null)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.call(null);})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-85gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.call(null)) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.call(null);})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-86gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-86gs.js index 87c216ae27..89f6a81a4a 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-86gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-86gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-86gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.call(undefined)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.call(undefined); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-86gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.call(undefined)) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.call(undefined); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-87gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-87gs.js index 7936c1be2f..691c70e13b 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-87gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-87gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-87gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.call(someObject)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -var o = {}; -(function () {"use strict"; return f.call(o); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-87gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.call(someObject)) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +var o = {}; +(function () {"use strict"; return f.call(o); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-88gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-88gs.js index 30b8bc4b57..d6cc45660e 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-88gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-88gs.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-88gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.call(globalObject)) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.call(fnGlobalObject()); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-88gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.call(globalObject)) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.call(fnGlobalObject()); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-89gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-89gs.js index 459cc0c23a..26e641d119 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-89gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-89gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-89gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.bind()()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.bind()();})(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-89gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.bind()()) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.bind()();})(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-8gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-8gs.js index ccaa39bc91..5b4048602c 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-8gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-8gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-8gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (Function constructor includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - - -var f = Function("\"use strict\";\nreturn gNonStrict();"); -f(); - - -function gNonStrict() { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-8gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (Function constructor includes strict + directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var f = Function("\"use strict\";\nreturn gNonStrict();"); +f(); + + +function gNonStrict() { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-90gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-90gs.js index ba624e0c24..e0ad6159b8 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-90gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-90gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-90gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.bind(null)()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.bind(null)(); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-90gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.bind(null)()) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.bind(null)(); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-91gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-91gs.js index cbb93f37fd..e0ce1ce4b4 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-91gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-91gs.js @@ -1,20 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-91gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.bind(undefined)()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.bind(undefined)(); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-91gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.bind(undefined)()) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.bind(undefined)(); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-92gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-92gs.js index 96b7b1a28e..19e7a2570a 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-92gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-92gs.js @@ -1,21 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-92gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.bind(someObject)()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -var o = {}; -(function () {"use strict"; return f.bind(o)(); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-92gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.bind(someObject)()) +flags: [noStrict] +---*/ + +function f() { return gNonStrict();}; +var o = {}; +(function () {"use strict"; return f.bind(o)(); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-93gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-93gs.js index 76fd8610cf..7c5248b8da 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-93gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-93gs.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-93gs.js - * @description Strict mode - checking access to strict function caller from non-strict function (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) - * @noStrict - */ - - -function f() { return gNonStrict();}; -(function () {"use strict"; return f.bind(fnGlobalObject())(); })(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-93gs +description: > + Strict mode - checking access to strict function caller from + non-strict function (non-strict function declaration called by + strict Function.prototype.bind(globalObject)()) +flags: [noStrict] +includes: [fnGlobalObject.js] +---*/ + +function f() { return gNonStrict();}; +(function () {"use strict"; return f.bind(fnGlobalObject())(); })(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-94gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-94gs.js index 1bfe4693f1..87fa7dda6c 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-94gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-94gs.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-94gs.js - * @description Strict mode - checking access to strict function caller from non-strict function expression (FunctionDeclaration includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - -var gNonStrict = function () { - return gNonStrict.caller || gNonStrict.caller.throwTypeError; -} - -function f() { - "use strict"; - return gNonStrict(); -} -f(); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-94gs +description: > + Strict mode - checking access to strict function caller from + non-strict function expression (FunctionDeclaration includes + strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var gNonStrict = function () { + return gNonStrict.caller || gNonStrict.caller.throwTypeError; +} + +function f() { + "use strict"; + return gNonStrict(); +} +f(); diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-95gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-95gs.js index 52c3a2e8ab..86765e2a81 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-95gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-95gs.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-95gs.js - * @description Strict mode - checking access to strict function caller from non-strict, constructor-based function (FunctionDeclaration includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - -var gNonStrict = Function("return gNonStrict.caller || gNonStrict.caller.throwTypeError;"); - -function f() { - "use strict"; - return gNonStrict(); -} -f(); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-95gs +description: > + Strict mode - checking access to strict function caller from + non-strict, constructor-based function (FunctionDeclaration + includes strict directive prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var gNonStrict = Function("return gNonStrict.caller || gNonStrict.caller.throwTypeError;"); + +function f() { + "use strict"; + return gNonStrict(); +} +f(); diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-96gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-96gs.js index 27562fada9..aa8f24ba69 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-96gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-96gs.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-96gs.js - * @description Strict mode - checking access to strict function caller from non-strict property (FunctionDeclaration includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - -var o = { - get gNonStrict() { - var tmp = Object.getOwnPropertyDescriptor(o, "gNonStrict").get; - return tmp.caller || tmp.caller.throwTypeError; - } -}; - - -function f() { - "use strict"; - return o.gNonStrict; -} -f(); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-96gs +description: > + Strict mode - checking access to strict function caller from + non-strict property (FunctionDeclaration includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var o = { + get gNonStrict() { + var tmp = Object.getOwnPropertyDescriptor(o, "gNonStrict").get; + return tmp.caller || tmp.caller.throwTypeError; + } +}; + + +function f() { + "use strict"; + return o.gNonStrict; +} +f(); diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-97gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-97gs.js index 30b57a5897..75548534a2 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-97gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-97gs.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-97gs.js - * @description Strict mode - checking access to strict function caller from bound non-strict function (FunctionDeclaration includes strict directive prologue) - * @noStrict - * @negative TypeError - */ - -var gNonStrict = gNonStrictBindee.bind(null); - -function f() { - "use strict"; - return gNonStrict(); -} -f(); - - -function gNonStrictBindee() { - return gNonStrictBindee.caller || gNonStrictBindee.caller.throwTypeError; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-97gs +description: > + Strict mode - checking access to strict function caller from bound + non-strict function (FunctionDeclaration includes strict directive + prologue) +negative: TypeError +flags: [noStrict] +---*/ + +var gNonStrict = gNonStrictBindee.bind(null); + +function f() { + "use strict"; + return gNonStrict(); +} +f(); + + +function gNonStrictBindee() { + return gNonStrictBindee.caller || gNonStrictBindee.caller.throwTypeError; +} diff --git a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-9gs.js b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-9gs.js index b41bb2ef48..c69efc3b82 100644 --- a/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-9gs.js +++ b/test/suite/ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-9gs.js @@ -1,22 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.3/15.3.5/15.3.5.4/15.3.5.4_2-9gs.js - * @description Strict mode - checking access to non-strict function caller from strict function (New'ed Function constructor defined within strict mode) - * @onlyStrict - * @negative TypeError - */ - - -"use strict"; -var f = new Function("return gNonStrict();"); -f(); - - -function gNonStrict() { - return gNonStrict.caller; -} - +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.3.5.4_2-9gs +description: > + Strict mode - checking access to non-strict function caller from + strict function (New'ed Function constructor defined within strict + mode) +negative: TypeError +flags: [onlyStrict] +---*/ + +"use strict"; +var f = new Function("return gNonStrict();"); +f(); + + +function gNonStrict() { + return gNonStrict.caller; +} diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T1.js index dba019d990..11b34296ea 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the length property is usually an integer that indicates the 'typical' number of arguments expected by the function - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A1_T1.js - * @description Checking length property of Function("arg1,arg2,arg3", null) - */ +/*--- +info: > + The value of the length property is usually an integer that indicates the + 'typical' number of arguments expected by the function +es5id: 15.3.5.1_A1_T1 +description: Checking length property of Function("arg1,arg2,arg3", null) +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3", null); @@ -19,4 +21,3 @@ if (!(f.hasOwnProperty('length'))) { if (f.length !== 3) { $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T2.js index e7ee6c2d14..7bc6120047 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T2.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the length property is usually an integer that indicates the 'typical' number of arguments expected by the function - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A1_T2.js - * @description Checking length property of Function("arg1,arg2,arg3","arg4,arg5", null) - */ +/*--- +info: > + The value of the length property is usually an integer that indicates the + 'typical' number of arguments expected by the function +es5id: 15.3.5.1_A1_T2 +description: > + Checking length property of Function("arg1,arg2,arg3","arg4,arg5", + null) +includes: [$FAIL.js] +---*/ f = Function("arg1,arg2,arg3","arg4,arg5", null); @@ -19,4 +23,3 @@ if (!(f.hasOwnProperty('length'))) { if (f.length !== 5) { $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T3.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T3.js index ebabb31a07..28f0c45471 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T3.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A1_T3.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the length property is usually an integer that indicates the 'typical' number of arguments expected by the function - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A1_T3.js - * @description Checking length property of Function("arg1,arg2,arg3","arg1,arg2","arg3", null) - */ +/*--- +info: > + The value of the length property is usually an integer that indicates the + 'typical' number of arguments expected by the function +es5id: 15.3.5.1_A1_T3 +description: > + Checking length property of + Function("arg1,arg2,arg3","arg1,arg2","arg3", null) +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); @@ -19,4 +23,3 @@ if (!(f.hasOwnProperty('length'))) { if (f.length !== 6) { $ERROR('#2: The value of the length property is usually an integer that indicates the "typical" number of arguments expected by the function'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T1.js index 2029841db3..c17d11d494 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { DontDelete } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A2_T1.js - * @description Checking if deleting the length property of Function("arg1,arg2,arg3", null) fails - */ +/*--- +info: the length property has the attributes { DontDelete } +es5id: 15.3.5.1_A2_T1 +description: > + Checking if deleting the length property of + Function("arg1,arg2,arg3", null) fails +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3", null); @@ -29,4 +31,3 @@ if (!(f.hasOwnProperty('length'))) { if (f.length !== 3) { $ERROR('#4: the length property has the attributes { DontDelete }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T2.js index a430c4d0f7..de3e38087f 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { DontDelete } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A2_T2.js - * @description Checking if deleting the length property of Function("arg1,arg2,arg3","arg4,arg5", null) fails - */ +/*--- +info: the length property has the attributes { DontDelete } +es5id: 15.3.5.1_A2_T2 +description: > + Checking if deleting the length property of + Function("arg1,arg2,arg3","arg4,arg5", null) fails +includes: [$FAIL.js] +---*/ f = Function("arg1,arg2,arg3","arg4,arg5", null); @@ -26,4 +28,3 @@ if (!(f.hasOwnProperty('length'))) { if (f.length !== 5) { $ERROR('#3: the length property has the attributes { DontDelete }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T3.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T3.js index 7c769946d0..bbaedacccc 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T3.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { DontDelete } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A2_T3.js - * @description Checking if deleting the length property of Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails - */ +/*--- +info: the length property has the attributes { DontDelete } +es5id: 15.3.5.1_A2_T3 +description: > + Checking if deleting the length property of + Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); @@ -26,4 +28,3 @@ if (!(f.hasOwnProperty('length'))) { if (f.length !== 6) { $ERROR('#3: the length property has the attributes { DontDelete }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T1.js index c11f1e6204..acc5228121 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { ReadOnly } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A3_T1.js - * @description Checking if varying the length property of Function("arg1,arg2,arg3","arg4,arg5", null) fails - */ +/*--- +info: the length property has the attributes { ReadOnly } +es5id: 15.3.5.1_A3_T1 +description: > + Checking if varying the length property of + Function("arg1,arg2,arg3","arg4,arg5", null) fails +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3","arg4,arg5", null); @@ -36,4 +38,3 @@ try { if (f.length !== 5) { $ERROR('#4: the length property has the attributes { ReadOnly }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T2.js index 36e16ada4d..826e3af6a6 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { ReadOnly } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A3_T2.js - * @description Checking if varying the length property of Function("arg1,arg2,arg3", null) fails - */ +/*--- +info: the length property has the attributes { ReadOnly } +es5id: 15.3.5.1_A3_T2 +description: > + Checking if varying the length property of + Function("arg1,arg2,arg3", null) fails +includes: [$FAIL.js] +---*/ f = Function("arg1,arg2,arg3", null); @@ -36,4 +38,3 @@ try { if (f.length !== 3) { $ERROR('#4: the length property has the attributes { ReadOnly }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T3.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T3.js index 3eb47a8b17..dc4f6c3b3e 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T3.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A3_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { ReadOnly } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A3_T3.js - * @description Checking if varying the length property of Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails - */ +/*--- +info: the length property has the attributes { ReadOnly } +es5id: 15.3.5.1_A3_T3 +description: > + Checking if varying the length property of + Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); @@ -36,4 +38,3 @@ try { if (f.length !== 6) { $ERROR('#4: the length property has the attributes { ReadOnly }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T1.js index 6ac1f63dc6..aa8cc67a42 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { DontEnum } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A4_T1.js - * @description Checking if enumerating the length property of Function("arg1,arg2,arg3", null) fails - */ +/*--- +info: the length property has the attributes { DontEnum } +es5id: 15.3.5.1_A4_T1 +description: > + Checking if enumerating the length property of + Function("arg1,arg2,arg3", null) fails +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3", null); @@ -23,4 +25,3 @@ for(key in f) if (lengthenumed) { $ERROR('#2: the length property has the attributes { DontEnum }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T2.js index ae7d5f5518..457a3e08b6 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { DontEnum } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A4_T2.js - * @description Checking if enumerating the length property of Function("arg1,arg2,arg3","arg4,arg5", null) fails - */ +/*--- +info: the length property has the attributes { DontEnum } +es5id: 15.3.5.1_A4_T2 +description: > + Checking if enumerating the length property of + Function("arg1,arg2,arg3","arg4,arg5", null) fails +includes: [$FAIL.js] +---*/ f = Function("arg1,arg2,arg3","arg5,arg4", null); @@ -23,4 +25,3 @@ for(key in f) if (lengthenumed) { $ERROR('#2: the length property has the attributes { DontEnum }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T3.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T3.js index a5287e5414..366190ab5c 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T3.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A4_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the length property has the attributes { DontEnum } - * - * @path ch15/15.3/15.3.5/S15.3.5.1_A4_T3.js - * @description Checking if enumerating the length property of Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails - */ +/*--- +info: the length property has the attributes { DontEnum } +es5id: 15.3.5.1_A4_T3 +description: > + Checking if enumerating the length property of + Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails +includes: [$FAIL.js] +---*/ f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null); @@ -23,4 +25,3 @@ for(key in f) if (lengthenumed) { $ERROR('#2: the length property has the attributes { DontEnum }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T1.js index d58f7c76cf..a1dfb9bac1 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the prototype property has the attributes { DontDelete } - * - * @path ch15/15.3/15.3.5/S15.3.5.2_A1_T1.js - * @description Checking if deleting the prototype property of Function("", null) fails - */ +/*--- +info: the prototype property has the attributes { DontDelete } +es5id: 15.3.5.2_A1_T1 +description: > + Checking if deleting the prototype property of Function("", null) + fails +includes: [$FAIL.js] +---*/ f = new Function("", null); @@ -26,4 +28,3 @@ if (delete f.prototype) { if (f.prototype !== fproto) { $ERROR('#3: the prototype property has the attributes { DontDelete }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T2.js index cd8e1e4bd9..fe63c883ef 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.2_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * the prototype property has the attributes { DontDelete } - * - * @path ch15/15.3/15.3.5/S15.3.5.2_A1_T2.js - * @description Checking if deleting the prototype property of Function(void 0, "") fails - */ +/*--- +info: the prototype property has the attributes { DontDelete } +es5id: 15.3.5.2_A1_T2 +description: > + Checking if deleting the prototype property of Function(void 0, + "") fails +includes: [$FAIL.js] +---*/ f = Function(void 0, ""); @@ -26,4 +28,3 @@ if (delete f.prototype) { if (f.prototype !== fproto) { $ERROR('#3: the prototype property has the attributes { DontDelete }'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T1.js index b90326eec7..4b817a2160 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T1.js - * @description V is number - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T1 +description: V is number +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if ((1 instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T2.js index 79454b8fea..cf93a6dc11 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T2.js - * @description V is string - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T2 +description: V is string +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if (("1" instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T3.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T3.js index 9b7ebad281..ce515e4252 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T3.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T3.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T3.js - * @description V is boolean true - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T3 +description: V is boolean true +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if ((true instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T4.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T4.js index 364294e17d..287877b3b9 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T4.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T4.js - * @description V is boolean false - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T4 +description: V is boolean false +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if ((false instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T5.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T5.js index ab5221bdf6..ba9d71d030 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T5.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T5.js - * @description V is void 0 - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T5 +description: V is void 0 +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if ((void 0 instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T6.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T6.js index ac62538d8a..6124c4c575 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T6.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T6.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T6.js - * @description V is null - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T6 +description: V is null +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if ((null instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T7.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T7.js index 2ddb306ebc..89962be679 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T7.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T7.js - * @description V is undefined - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T7 +description: V is undefined +---*/ FACTORY = Function("name","this.name=name;"); @@ -14,4 +16,3 @@ FACTORY = Function("name","this.name=name;"); if ((undefined instanceof FACTORY)!==false) { $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T8.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T8.js index 72cd6e7acb..0727b3f0c1 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T8.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A1_T8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A1_T8.js - * @description V is undefined variable - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is + called with value V, the following steps are taken: i) If V is not an + object, return false +es5id: 15.3.5.3_A1_T8 +description: V is undefined variable +---*/ FACTORY = Function("name","this.name=name;"); @@ -16,4 +18,3 @@ if ((x instanceof FACTORY)!==false) { } var x; - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T2.js index 1a76931b92..1bfc025c55 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken: - * i) Call the [[Get]] method of F with property name "prototype". - * ii) Let O be Result(i). - * iii) O is not an object, throw a TypeError exception - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A2_T2.js - * @description F.prototype is undefined, and V is empty object - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken: + i) Call the [[Get]] method of F with property name "prototype". + ii) Let O be Result(i). + iii) O is not an object, throw a TypeError exception +es5id: 15.3.5.3_A2_T2 +description: F.prototype is undefined, and V is empty object +includes: [$FAIL.js] +---*/ FACTORY = new Function; @@ -26,6 +27,3 @@ try { $ERROR('#1.1: O is not an object, throw a TypeError exception'); } } - - - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T5.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T5.js index c84ed748e5..045a9b3ab4 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T5.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T5.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of - * F is called with value V and V is an object, the following steps - * are taken: i) Call the [[Get]] method of F with property name - * "prototype". ii) Let O be Result(i). iii) O is not an object, - * throw a TypeError exception - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A2_T5.js - * @description F.prototype is void 0, and V is new F - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of + F is called with value V and V is an object, the following steps + are taken: i) Call the [[Get]] method of F with property name + "prototype". ii) Let O be Result(i). iii) O is not an object, + throw a TypeError exception +es5id: 15.3.5.3_A2_T5 +description: F.prototype is void 0, and V is new F +includes: [$FAIL.js] +---*/ FACTORY = Function("this.prop=1;"); @@ -34,4 +35,3 @@ try { if ((instance.constructor !== FACTORY) || (instance.name !== "fairy")) { $ERROR('#2: instance.constructor === FACTORY'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T6.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T6.js index 1ec347709c..3e08d96600 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T6.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A2_T6.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of - * F is called with value V and V is an object, the following steps - * are taken: i) Call the [[Get]] method of F with property name - * "prototype". ii) Let O be Result(i). iii) O is not an object, - * throw a TypeError exception - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A2_T6.js - * @description F.prototype is string, and V is function - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of + F is called with value V and V is an object, the following steps + are taken: i) Call the [[Get]] method of F with property name + "prototype". ii) Let O be Result(i). iii) O is not an object, + throw a TypeError exception +es5id: 15.3.5.3_A2_T6 +description: F.prototype is string, and V is function +includes: [$FAIL.js] +---*/ FACTORY = new Function; @@ -26,4 +27,3 @@ try { $ERROR('#1.1: O is not an object, throw a TypeError exception'); } } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T1.js index 93779f8ff0..b560659f26 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T1.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken: - * i) Call the [[Get]] method of F with property name "prototype". - * ii) Let O be Result(i) and O is an object. - * iii) Let V be the value of the [[Prototype]] property of V. - * iv) If V is null, return false. - * v) If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true. - * vi) Go to step iii) - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A3_T1.js - * @description F.prototype.type is 1, and V is new F - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken: + i) Call the [[Get]] method of F with property name "prototype". + ii) Let O be Result(i) and O is an object. + iii) Let V be the value of the [[Prototype]] property of V. + iv) If V is null, return false. + v) If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true. + vi) Go to step iii) +es5id: 15.3.5.3_A3_T1 +description: F.prototype.type is 1, and V is new F +---*/ FACTORY = Function("this.name=\"root\""); @@ -24,4 +24,3 @@ instance = new FACTORY; if (!(instance instanceof FACTORY)) { $ERROR('#1: If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T2.js index d3f2cc7e32..c6dc601d04 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5.3_A3_T2.js @@ -1,18 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken: - * i) Call the [[Get]] method of F with property name "prototype". - * ii) Let O be Result(i) and O is an object. - * iii) Let V be the value of the [[Prototype]] property of V. - * iv) If V is null, return false. - * v) If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true. - * vi) Go to step iii) - * - * @path ch15/15.3/15.3.5/S15.3.5.3_A3_T2.js - * @description F.prototype is Object.prototype, and V is empty object - */ +/*--- +info: > + Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken: + i) Call the [[Get]] method of F with property name "prototype". + ii) Let O be Result(i) and O is an object. + iii) Let V be the value of the [[Prototype]] property of V. + iv) If V is null, return false. + v) If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true. + vi) Go to step iii) +es5id: 15.3.5.3_A3_T2 +description: F.prototype is Object.prototype, and V is empty object +---*/ FAKEFACTORY = Function(); @@ -29,4 +29,3 @@ FAKEFACTORY.prototype=Object.prototype; if (!(fakeinstance instanceof FAKEFACTORY)) { $ERROR('#2: If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T1.js index 792eb4920a..1d664f053a 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the [[Class]] property is "Function" - * - * @path ch15/15.3/15.3.5/S15.3.5_A1_T1.js - * @description For testing use variable f = new Function - */ +/*--- +info: The value of the [[Class]] property is "Function" +es5id: 15.3.5_A1_T1 +description: For testing use variable f = new Function +---*/ var f = new Function; if (Object.prototype.toString.call(f) !== "[object Function]") { $ERROR('#1: The value of the [[Class]] property is "Function"'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T2.js index 1d33ccc16a..6eb4cc32b4 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5_A1_T2.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the [[Class]] property is "Function" - * - * @path ch15/15.3/15.3.5/S15.3.5_A1_T2.js - * @description For testing use variable f = Function() - */ +/*--- +info: The value of the [[Class]] property is "Function" +es5id: 15.3.5_A1_T2 +description: For testing use variable f = Function() +---*/ var f = Function(); if (Object.prototype.toString.call(f) !== "[object Function]") { $ERROR('#1: The value of the [[Class]] property is "Function"'); } - - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T1.js index a4c5c74f03..5889c52875 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every function instance has a [[Call]] property - * - * @path ch15/15.3/15.3.5/S15.3.5_A2_T1.js - * @description For testing call Function("var x =1; this.y=2;return \"OK\";")() - */ +/*--- +info: Every function instance has a [[Call]] property +es5id: 15.3.5_A2_T1 +description: For testing call Function("var x =1; this.y=2;return \"OK\";")() +---*/ //CHECK#1 if (Function("var x =1; this.y=2;return \"OK\";")() !== "OK") { @@ -22,4 +21,3 @@ if (typeof x !== "undefined") { if (y !== 2) { $ERROR('#3: Every function instance has a [[Call]] property'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T2.js index 86d2ea801e..16f1e7ae39 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every function instance has a [[Call]] property - * - * @path ch15/15.3/15.3.5/S15.3.5_A2_T2.js - * @description For testing call (new Function("arg1,arg2","var x =arg1; this.y=arg2;return arg1+arg2;"))("1",2) - */ +/*--- +info: Every function instance has a [[Call]] property +es5id: 15.3.5_A2_T2 +description: > + For testing call (new Function("arg1,arg2","var x =arg1; + this.y=arg2;return arg1+arg2;"))("1",2) +---*/ //CHECK#1 if ((new Function("arg1,arg2","var x =arg1; this.y=arg2;return arg1+arg2;"))("1",2) !== "12") { @@ -22,4 +23,3 @@ if (typeof x !== "undefined") { if (y !== 2) { $ERROR('#3: Every function instance has a [[Call]] property'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T1.js b/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T1.js index 357eb0c152..33759bb062 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T1.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * every function instance has a [[Construct]] property - * - * @path ch15/15.3/15.3.5/S15.3.5_A3_T1.js - * @description As constructor use Function("var x =1; this.y=2;return \"OK\";") - */ +/*--- +info: every function instance has a [[Construct]] property +es5id: 15.3.5_A3_T1 +description: As constructor use Function("var x =1; this.y=2;return \"OK\";") +---*/ FACTORY = Function("var x =1; this.y=2;return \"OK\";"); obj = new FACTORY; @@ -25,4 +24,3 @@ if (obj.constructor !== FACTORY) { if (obj.y !== 2) { $ERROR('#3: every function instance has a [[Construct]] property'); } - diff --git a/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T2.js b/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T2.js index ef8607eeec..b3959cbc95 100644 --- a/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T2.js +++ b/test/suite/ch15/15.3/15.3.5/S15.3.5_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * every function instance has a [[Construct]] property - * - * @path ch15/15.3/15.3.5/S15.3.5_A3_T2.js - * @description As constructor use new Function("arg1,arg2","var x =1; this.y=arg1+arg2;return \"OK\";") - */ +/*--- +info: every function instance has a [[Construct]] property +es5id: 15.3.5_A3_T2 +description: > + As constructor use new Function("arg1,arg2","var x =1; + this.y=arg1+arg2;return \"OK\";") +---*/ FACTORY = new Function("arg1,arg2","var x =1; this.y=arg1+arg2;return \"OK\";"); obj = new FACTORY("1",2); @@ -25,4 +26,3 @@ if (obj.constructor !== FACTORY) { if (obj.y !== "12") { $ERROR('#3: every function instance has a [[Construct]] property'); } - diff --git a/test/suite/ch15/15.3/S15.3.1_A1_T1.js b/test/suite/ch15/15.3/S15.3.1_A1_T1.js index 5031ad0e61..64442ac143 100644 --- a/test/suite/ch15/15.3/S15.3.1_A1_T1.js +++ b/test/suite/ch15/15.3/S15.3.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The function call Function(…) is equivalent to the object creation expression - * new Function(…) with the same arguments. - * - * @path ch15/15.3/S15.3.1_A1_T1.js - * @description Create simple functions and check returned values - */ +/*--- +info: > + The function call Function(…) is equivalent to the object creation expression + new Function(…) with the same arguments. +es5id: 15.3.1_A1_T1 +description: Create simple functions and check returned values +---*/ var f = Function("return arguments[0];"); @@ -38,4 +38,3 @@ if (g("A") !== "A") { if (g("A") !== f("A")) { $ERROR('#5: g("A") !== f("A")'); } - diff --git a/test/suite/ch15/15.3/S15.3_A1.js b/test/suite/ch15/15.3/S15.3_A1.js index 0b7f12e623..a7b1a8a1da 100644 --- a/test/suite/ch15/15.3/S15.3_A1.js +++ b/test/suite/ch15/15.3/S15.3_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Function is the property of global - * - * @path ch15/15.3/S15.3_A1.js - * @description Compare Function with this.Function - */ +/*--- +info: Function is the property of global +es5id: 15.3_A1 +description: Compare Function with this.Function +---*/ var obj = Function; @@ -15,4 +14,3 @@ var thisobj = this.Function; if (obj !== thisobj) { $ERROR('Function is the property of global'); } - diff --git a/test/suite/ch15/15.3/S15.3_A2_T1.js b/test/suite/ch15/15.3/S15.3_A2_T1.js index 3b7b329952..408226ca67 100644 --- a/test/suite/ch15/15.3/S15.3_A2_T1.js +++ b/test/suite/ch15/15.3/S15.3_A2_T1.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since applying the "call" method to Function constructor themself leads to creating a new function instance, the second argument must be a valid function body - * - * @path ch15/15.3/S15.3_A2_T1.js - * @description Checking if executing "Function.call(this, "var x / = 1;")" fails - */ +/*--- +info: > + Since applying the "call" method to Function constructor themself leads + to creating a new function instance, the second argument must be a valid + function body +es5id: 15.3_A2_T1 +description: Checking if executing "Function.call(this, "var x / = 1;")" fails +---*/ //CHECK# try{ @@ -15,6 +17,4 @@ try{ if (!(e instanceof SyntaxError)) { $ERROR('#1: function body must be valid'); } -} - - +} diff --git a/test/suite/ch15/15.3/S15.3_A2_T2.js b/test/suite/ch15/15.3/S15.3_A2_T2.js index c2797b5402..2e8c9e4dd7 100644 --- a/test/suite/ch15/15.3/S15.3_A2_T2.js +++ b/test/suite/ch15/15.3/S15.3_A2_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since applying the "call" method to Function constructor themself leads to creating a new function instance, the second argument must be a valid function body - * - * @path ch15/15.3/S15.3_A2_T2.js - * @description Checking if executing "Function.call(this, "var #x = 1;")" fails - */ +/*--- +info: > + Since applying the "call" method to Function constructor themself leads + to creating a new function instance, the second argument must be a valid + function body +es5id: 15.3_A2_T2 +description: Checking if executing "Function.call(this, "var #x = 1;")" fails +---*/ //CHECK# try{ @@ -15,6 +17,4 @@ try{ if (!(e instanceof SyntaxError)) { $ERROR('#1: function body must be valid'); } -} - - +} diff --git a/test/suite/ch15/15.3/S15.3_A3_T1.js b/test/suite/ch15/15.3/S15.3_A3_T1.js index ad10b97e44..c9e46e96bc 100644 --- a/test/suite/ch15/15.3/S15.3_A3_T1.js +++ b/test/suite/ch15/15.3/S15.3_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since when call is used for Function constructor themself new function instance creates - * and then first argument(thisArg) should be ignored - * - * @path ch15/15.3/S15.3_A3_T1.js - * @description First argument is object - */ +/*--- +info: > + Since when call is used for Function constructor themself new function instance creates + and then first argument(thisArg) should be ignored +es5id: 15.3_A3_T1 +description: First argument is object +---*/ //CHECK#1 - does not throw var f = Function.call(mars, "return name;"); @@ -26,4 +26,3 @@ if (about_mars !== undefined) { if (this.godname !== "ares" && mars.godname===undefined) { $ERROR('#3: When applied to the Function object itself, thisArg should be ignored'); } - diff --git a/test/suite/ch15/15.3/S15.3_A3_T2.js b/test/suite/ch15/15.3/S15.3_A3_T2.js index cb4cb57409..7a9e16a490 100644 --- a/test/suite/ch15/15.3/S15.3_A3_T2.js +++ b/test/suite/ch15/15.3/S15.3_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since when call is used for Function constructor themself new function instance creates - * and then first argument(thisArg) should be ignored - * - * @path ch15/15.3/S15.3_A3_T2.js - * @description First argument is string and null - */ +/*--- +info: > + Since when call is used for Function constructor themself new function instance creates + and then first argument(thisArg) should be ignored +es5id: 15.3_A3_T2 +description: First argument is string and null +---*/ this.color="red"; var name="mars"; @@ -25,5 +25,3 @@ var g = Function.call(null, "return this.name;"); if (g() !== "mars") { $ERROR('#2: '); } - - diff --git a/test/suite/ch15/15.3/S15.3_A3_T3.js b/test/suite/ch15/15.3/S15.3_A3_T3.js index 8f352b54c3..e5970dbd6a 100644 --- a/test/suite/ch15/15.3/S15.3_A3_T3.js +++ b/test/suite/ch15/15.3/S15.3_A3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since when call is used for Function constructor themself new function instance creates - * and then first argument(thisArg) should be ignored - * - * @path ch15/15.3/S15.3_A3_T3.js - * @description First argument is this, and this don`t have needed variable - */ +/*--- +info: > + Since when call is used for Function constructor themself new function instance creates + and then first argument(thisArg) should be ignored +es5id: 15.3_A3_T3 +description: First argument is this, and this don`t have needed variable +---*/ var f=Function.call(this, "return planet;"); var g=Function.call(this, "return color;"); @@ -39,4 +39,3 @@ this.color="red"; if (g() !== "red") { $ERROR('#4: '); } - diff --git a/test/suite/ch15/15.3/S15.3_A3_T4.js b/test/suite/ch15/15.3/S15.3_A3_T4.js index 871c3762ab..89add5cb81 100644 --- a/test/suite/ch15/15.3/S15.3_A3_T4.js +++ b/test/suite/ch15/15.3/S15.3_A3_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since when call is used for Function constructor themself new function instance creates - * and then first argument(thisArg) should be ignored - * - * @path ch15/15.3/S15.3_A3_T4.js - * @description First argument is this, and this have needed variable - */ +/*--- +info: > + Since when call is used for Function constructor themself new function instance creates + and then first argument(thisArg) should be ignored +es5id: 15.3_A3_T4 +description: First argument is this, and this have needed variable +---*/ var f=Function.call(this, "return planet;"); @@ -22,4 +22,3 @@ var planet="mars"; if (f() !== "mars") { $ERROR('#2: '); } - diff --git a/test/suite/ch15/15.3/S15.3_A3_T5.js b/test/suite/ch15/15.3/S15.3_A3_T5.js index 9d1df2adee..74b33b5aa0 100644 --- a/test/suite/ch15/15.3/S15.3_A3_T5.js +++ b/test/suite/ch15/15.3/S15.3_A3_T5.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since when call is used for Function constructor themself new function instance creates - * and then first argument(thisArg) should be ignored - * - * @path ch15/15.3/S15.3_A3_T5.js - * @description First argument is this, and this don`t have needed variable. Function return this.var_name - */ +/*--- +info: > + Since when call is used for Function constructor themself new function instance creates + and then first argument(thisArg) should be ignored +es5id: 15.3_A3_T5 +description: > + First argument is this, and this don`t have needed variable. + Function return this.var_name +---*/ var f=Function.call(this, "return this.planet;"); var g=Function.call(this, "return this.color;"); @@ -35,4 +37,3 @@ this.color="red"; if (g() !== "red") { $ERROR('#4: '); } - diff --git a/test/suite/ch15/15.3/S15.3_A3_T6.js b/test/suite/ch15/15.3/S15.3_A3_T6.js index 4e324f8b6e..e20361df75 100644 --- a/test/suite/ch15/15.3/S15.3_A3_T6.js +++ b/test/suite/ch15/15.3/S15.3_A3_T6.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since when call is used for Function constructor themself new function instance creates - * and then first argument(thisArg) should be ignored - * - * @path ch15/15.3/S15.3_A3_T6.js - * @description First argument is this, and this have needed variable. Function return this.var_name - */ +/*--- +info: > + Since when call is used for Function constructor themself new function instance creates + and then first argument(thisArg) should be ignored +es5id: 15.3_A3_T6 +description: > + First argument is this, and this have needed variable. Function + return this.var_name +---*/ var f=Function.call(this, "return this.planet;"); @@ -22,4 +24,3 @@ var planet="mars"; if (f() !== "mars") { $ERROR('#2: '); } - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T1.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T1.js index 2ee5698d18..156c2a242c 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.1/S15.4.1_A1.1_T1.js - * @description Create new property of Array.prototype. When new Array object has this property - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.1_A1.1_T1 +description: > + Create new property of Array.prototype. When new Array object has + this property +---*/ //CHECK#1 Array.prototype.myproperty = 1; @@ -21,4 +23,3 @@ if (x.myproperty !== 1) { if (x.hasOwnProperty('myproperty') !== false) { $ERROR('#2: Array.prototype.myproperty = 1; var x = Array(); x.hasOwnProperty(\'myproperty\') === false. Actual: ' + (x.hasOwnProperty('myproperty'))); } - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T2.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T2.js index 6c9b78575b..e88b5f91fb 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.1/S15.4.1_A1.1_T2.js - * @description Array.prototype.toString = Object.prototype.toString - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.1_A1.1_T2 +description: Array.prototype.toString = Object.prototype.toString +---*/ //CHECK#1 Array.prototype.toString = Object.prototype.toString; @@ -23,5 +23,3 @@ var x = Array(0,1,2); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#2: Array.prototype.toString = Object.prototype.toString; var x = Array(0,1,2); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } - - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T3.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T3.js index 7bede3baf3..46bc184a01 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.1_T3.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.1/S15.4.1_A1.1_T3.js - * @description Checking use isPrototypeOf - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.1_A1.1_T3 +description: Checking use isPrototypeOf +---*/ //CHECK#1 if (Array.prototype.isPrototypeOf(Array()) !== true) { $ERROR('#1: Array.prototype.isPrototypeOf(Array()) === true. Actual: ' + (Array.prototype.isPrototypeOf(Array()))); } - - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.2_T1.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.2_T1.js index 24685612ec..424f8eb9b4 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "Array" - * - * @path ch15/15.4/15.4.1/S15.4.1_A1.2_T1.js - * @description Checking use Object.prototype.toString - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "Array" +es5id: 15.4.1_A1.2_T1 +description: Checking use Object.prototype.toString +---*/ //CHECK#1 var x = Array(); @@ -21,4 +20,3 @@ x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#2: var x = Array(0,1,2); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); } - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.3_T1.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.3_T1.js index 8d69a5263a..d20b714a9f 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * This description of Array constructor applies if and only if - * the Array constructor is given no arguments or at least two arguments - * - * @path ch15/15.4/15.4.1/S15.4.1_A1.3_T1.js - * @description Checking case when Array constructor is given one argument - */ +/*--- +info: > + This description of Array constructor applies if and only if + the Array constructor is given no arguments or at least two arguments +es5id: 15.4.1_A1.3_T1 +description: Checking case when Array constructor is given one argument +---*/ var x = Array(2); @@ -20,4 +20,3 @@ if (x.length === 1) { if (x[0] === 2) { $ERROR('#2: var x = Array(2); x[0] !== 2'); } - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.1_T1.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.1_T1.js index ea58f69bff..4304c5eba3 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the newly constructed object; - * is set to the number of arguments - * - * @path ch15/15.4/15.4.1/S15.4.1_A2.1_T1.js - * @description Array constructor is given no arguments or at least two arguments - */ +/*--- +info: > + The length property of the newly constructed object; + is set to the number of arguments +es5id: 15.4.1_A2.1_T1 +description: Array constructor is given no arguments or at least two arguments +---*/ //CHECK#1 if (Array().length !== 0) { @@ -23,4 +23,3 @@ if (Array(0,1,0,1).length !== 4) { if (Array(undefined, undefined).length !== 2) { $ERROR('#3: (Array(undefined, undefined).length === 2. Actual: ' + (Array(undefined, undefined).length)); } - diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.2_T1.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.2_T1.js index b817a6abf8..0cf678dff6 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A2.2_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The 0 property of the newly constructed object is set to item0 - * (if supplied); the 1 property of the newly constructed object is set to item1 - * (if supplied); and, in general, for as many arguments as there are, the k property - * of the newly constructed object is set to argument k, where the first argument is - * considered to be argument number 0 - * - * @path ch15/15.4/15.4.1/S15.4.1_A2.2_T1.js - * @description Checking correct work this algorithm - */ +/*--- +info: > + The 0 property of the newly constructed object is set to item0 + (if supplied); the 1 property of the newly constructed object is set to item1 + (if supplied); and, in general, for as many arguments as there are, the k property + of the newly constructed object is set to argument k, where the first argument is + considered to be argument number 0 +es5id: 15.4.1_A2.2_T1 +description: Checking correct work this algorithm +---*/ //CHECK# var x = Array( @@ -35,5 +35,4 @@ for (var i = 0; i < 100; i++) { if (result !== true) { $ERROR('#1: x[i] === i. Actual: ' + (x[i])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.1/S15.4.1_A3.1_T1.js b/test/suite/ch15/15.4/15.4.1/S15.4.1_A3.1_T1.js index 2e0c369763..ecfce93d8a 100644 --- a/test/suite/ch15/15.4/15.4.1/S15.4.1_A3.1_T1.js +++ b/test/suite/ch15/15.4/15.4.1/S15.4.1_A3.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Array is called as a function rather than as a constructor, - * it creates and initialises a new Array object - * - * @path ch15/15.4/15.4.1/S15.4.1_A3.1_T1.js - * @description Checking use typeof, instanceof - */ +/*--- +info: > + When Array is called as a function rather than as a constructor, + it creates and initialises a new Array object +es5id: 15.4.1_A3.1_T1 +description: Checking use typeof, instanceof +---*/ //CHECK#1 if (typeof Array() !== "object") { @@ -17,5 +17,4 @@ if (typeof Array() !== "object") { //CHECK#2 if ((Array() instanceof Array) !== true) { $ERROR('#2: (Array() instanceof Array) === true. Actual: ' + (Array() instanceof Array)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T1.js index d833ddf9a2..ada18b0408 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T1.js - * @description Create new property of Array.prototype. When new Array object has this property - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.2.1_A1.1_T1 +description: > + Create new property of Array.prototype. When new Array object has + this property +---*/ //CHECK#1 Array.prototype.myproperty = 1; @@ -21,4 +23,3 @@ if (x.myproperty !== 1) { if (x.hasOwnProperty('myproperty') !== false) { $ERROR('#2: Array.prototype.myproperty = 1; var x = new Array(); x.hasOwnProperty(\'myproperty\') === false. Actual: ' + (x.hasOwnProperty('myproperty'))); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T2.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T2.js index 3c3098d0b7..c60a262a27 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T2.js - * @description Array.prototype.toString = Object.prototype.toString - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.2.1_A1.1_T2 +description: Array.prototype.toString = Object.prototype.toString +---*/ //CHECK#1 Array.prototype.toString = Object.prototype.toString; @@ -23,5 +23,3 @@ var x = new Array(0,1,2); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#2: Array.prototype.toString = Object.prototype.toString; var x = new Array(0,1,2); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } - - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T3.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T3.js index 6e5e9ea3de..4568905ffc 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T3.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.1_T3.js - * @description Checking use isPrototypeOf - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.2.1_A1.1_T3 +description: Checking use isPrototypeOf +---*/ //CHECK#1 if (Array.prototype.isPrototypeOf(new Array()) !== true) { $ERROR('#1: Array.prototype.isPrototypeOf(new Array()) === true. Actual: ' + (Array.prototype.isPrototypeOf(new Array()))); } - - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.2_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.2_T1.js index 0046b69553..59b528f6a3 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "Array" - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.2_T1.js - * @description Checking use Object.prototype.toString - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "Array" +es5id: 15.4.2.1_A1.2_T1 +description: Checking use Object.prototype.toString +---*/ //CHECK#1 var x = new Array(); @@ -21,4 +20,3 @@ x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#2: var x = new Array(0,1,2); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.3_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.3_T1.js index e6d11bca85..b3ae5cedd9 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * This description of Array constructor applies if and only if - * the Array constructor is given no arguments or at least two arguments - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A1.3_T1.js - * @description Checking case when Array constructor is given one argument - */ +/*--- +info: > + This description of Array constructor applies if and only if + the Array constructor is given no arguments or at least two arguments +es5id: 15.4.2.1_A1.3_T1 +description: Checking case when Array constructor is given one argument +---*/ var x = new Array(2); @@ -20,4 +20,3 @@ if (x.length === 1) { if (x[0] === 2) { $ERROR('#2: var x = new Array(2); x[0] !== 2'); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.1_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.1_T1.js index 5bdd8828bb..31335960c4 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the newly constructed object; - * is set to the number of arguments - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.1_T1.js - * @description Array constructor is given no arguments or at least two arguments - */ +/*--- +info: > + The length property of the newly constructed object; + is set to the number of arguments +es5id: 15.4.2.1_A2.1_T1 +description: Array constructor is given no arguments or at least two arguments +---*/ //CHECK#1 if (new Array().length !== 0) { @@ -23,4 +23,3 @@ if (new Array(0,1,0,1).length !== 4) { if (new Array(undefined, undefined).length !== 2) { $ERROR('#3: new Array(undefined, undefined).length === 2. Actual: ' + (new Array(undefined, undefined).length)); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.2_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.2_T1.js index 9e6371253d..81d50ed750 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.2_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The 0 property of the newly constructed object is set to item0 - * (if supplied); the 1 property of the newly constructed object is set to item1 - * (if supplied); and, in general, for as many arguments as there are, the k property - * of the newly constructed object is set to argument k, where the first argument is - * considered to be argument number 0 - * - * @path ch15/15.4/15.4.2/15.4.2.1/S15.4.2.1_A2.2_T1.js - * @description Checking correct work this algorithm - */ +/*--- +info: > + The 0 property of the newly constructed object is set to item0 + (if supplied); the 1 property of the newly constructed object is set to item1 + (if supplied); and, in general, for as many arguments as there are, the k property + of the newly constructed object is set to argument k, where the first argument is + considered to be argument number 0 +es5id: 15.4.2.1_A2.2_T1 +description: Checking correct work this algorithm +---*/ //CHECK# var x = new Array( @@ -35,5 +35,4 @@ for (var i = 0; i < 100; i++) { if (result !== true) { $ERROR('#1: x[i] === i. Actual: ' + (x[i])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T1.js index 597a294671..62c4a7000b 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T1.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T1.js - * @description Create new property of Array.prototype. When new Array object has this property - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.2.2_A1.1_T1 +description: > + Create new property of Array.prototype. When new Array object has + this property +---*/ //CHECK#1 Array.prototype.myproperty = 1; @@ -16,4 +18,3 @@ var x = new Array(0); if (x.myproperty !== 1) { $ERROR('#1: Array.prototype.myproperty = 1; var x = new Array(0); x.myproperty === 1. Actual: ' + (x.myproperty)); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T2.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T2.js index 2ae3fccaa4..dbfbfad13f 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T2.js - * @description Array.prototype.toString = Object.prototype.toString - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.2.2_A1.1_T2 +description: Array.prototype.toString = Object.prototype.toString +---*/ //CHECK#1 Array.prototype.toString = Object.prototype.toString; @@ -16,4 +16,3 @@ var x = new Array(0); if (x.toString() !== "[object " + "Array" + "]") { $ERROR('#1: Array.prototype.toString = Object.prototype.toString; var x = new Array(0); x.toString() === "[object " + "Array" + "]". Actual: ' + (x.toString())); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T3.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T3.js index 679ff68769..8e033e7d2c 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T3.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Array prototype object, the one that - * is the initial value of Array.prototype - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.1_T3.js - * @description Checking use isPrototypeOf - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Array prototype object, the one that + is the initial value of Array.prototype +es5id: 15.4.2.2_A1.1_T3 +description: Checking use isPrototypeOf +---*/ //CHECK#1 if (Array.prototype.isPrototypeOf(new Array(0)) !== true) { $ERROR('#1: Array.prototype.isPrototypeOf(new Array(0)) === true. Actual: ' + (Array.prototype.isPrototypeOf(new Array(0)))); } - - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.2_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.2_T1.js index 3cc17dd171..18c9ca35f6 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "Array" - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A1.2_T1.js - * @description Checking use Object.prototype.toString - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "Array" +es5id: 15.4.2.2_A1.2_T1 +description: Checking use Object.prototype.toString +---*/ //CHECK#1 var x = new Array(0); @@ -14,4 +13,3 @@ x.getClass = Object.prototype.toString; if (x.getClass() !== "[object " + "Array" + "]") { $ERROR('#1: var x = new Array(0); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass())); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.1_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.1_T1.js index 7d9a9952c6..1196d067d9 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is a Number and ToUint32(len) is equal to len, - * then the length property of the newly constructed object is set to ToUint32(len) - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.1_T1.js - * @description Array constructor is given one argument - */ +/*--- +info: > + If the argument len is a Number and ToUint32(len) is equal to len, + then the length property of the newly constructed object is set to ToUint32(len) +es5id: 15.4.2.2_A2.1_T1 +description: Array constructor is given one argument +---*/ //CHECK#1 var x = new Array(0); @@ -25,5 +25,4 @@ if (x.length !== 1) { var x = new Array(4294967295); if (x.length !== 4294967295) { $ERROR('#3: var x = new Array(4294967295); x.length === 4294967295. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T1.js index 244cdb1780..de44c79df8 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is a Number and ToUint32(len) is not equal to len, - * a RangeError exception is thrown - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T1.js - * @description Use try statement. len = -1, 4294967296, 4294967297 - */ +/*--- +info: > + If the argument len is a Number and ToUint32(len) is not equal to len, + a RangeError exception is thrown +es5id: 15.4.2.2_A2.2_T1 +description: Use try statement. len = -1, 4294967296, 4294967297 +---*/ //CHECK#1 try { @@ -38,4 +38,3 @@ try { $ERROR('#3.2: new Array(4294967297) throw RangeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T2.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T2.js index 6b2419d6a6..04ad60b3a9 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T2.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is a Number and ToUint32(len) is not equal to len, - * a RangeError exception is thrown - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T2.js - * @description Use try statement. len = NaN, +/-Infinity - */ +/*--- +info: > + If the argument len is a Number and ToUint32(len) is not equal to len, + a RangeError exception is thrown +es5id: 15.4.2.2_A2.2_T2 +description: Use try statement. len = NaN, +/-Infinity +---*/ //CHECK#1 try { @@ -38,4 +38,3 @@ try { $ERROR('#3.2: new Array(Number.NEGATIVE_INFINITY) throw RangeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T3.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T3.js index 8e4a21486a..89760b5d3b 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T3.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is a Number and ToUint32(len) is not equal to len, - * a RangeError exception is thrown - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.2_T3.js - * @description Use try statement. len = 1.5, Number.MAX_VALUE, Number.MIN_VALUE - */ +/*--- +info: > + If the argument len is a Number and ToUint32(len) is not equal to len, + a RangeError exception is thrown +es5id: 15.4.2.2_A2.2_T3 +description: Use try statement. len = 1.5, Number.MAX_VALUE, Number.MIN_VALUE +---*/ //CHECK#1 try { @@ -38,4 +38,3 @@ try { $ERROR('#3.2: new Array(Number.MIN_VALUE) throw RangeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T1.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T1.js index d5b4b53337..3d36f5d060 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T1.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is not a Number, then the length property of - * the newly constructed object is set to 1 and the 0 property of - * the newly constructed object is set to len - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T1.js - * @description Checking for null and undefined - */ +/*--- +info: > + If the argument len is not a Number, then the length property of + the newly constructed object is set to 1 and the 0 property of + the newly constructed object is set to len +es5id: 15.4.2.2_A2.3_T1 +description: Checking for null and undefined +---*/ var x = new Array(null); @@ -33,4 +33,3 @@ if (x.length !== 1) { if (x[0] !== undefined) { $ERROR('#4: var x = new Array(undefined); x[0] === undefined. Actual: ' + (x[0])); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T2.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T2.js index 5f4f26d05c..9de1a7a942 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T2.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is not a Number, then the length property of - * the newly constructed object is set to 1 and the 0 property of - * the newly constructed object is set to len - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T2.js - * @description Checking for boolean primitive and Boolean object - */ +/*--- +info: > + If the argument len is not a Number, then the length property of + the newly constructed object is set to 1 and the 0 property of + the newly constructed object is set to len +es5id: 15.4.2.2_A2.3_T2 +description: Checking for boolean primitive and Boolean object +---*/ var x = new Array(true); @@ -34,4 +34,3 @@ if (x.length !== 1) { if (x[0] !== obj) { $ERROR('#4: var obj = new Boolean(false); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0])); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T3.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T3.js index 4fe1311f90..1f048cd0b4 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T3.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is not a Number, then the length property of - * the newly constructed object is set to 1 and the 0 property of - * the newly constructed object is set to len - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T3.js - * @description Checking for boolean primitive and Boolean object - */ +/*--- +info: > + If the argument len is not a Number, then the length property of + the newly constructed object is set to 1 and the 0 property of + the newly constructed object is set to len +es5id: 15.4.2.2_A2.3_T3 +description: Checking for boolean primitive and Boolean object +---*/ var x = new Array("1"); @@ -34,4 +34,3 @@ if (x.length !== 1) { if (x[0] !== obj) { $ERROR('#4: var obj = new String("0"); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0])); } - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T4.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T4.js index 5565e216de..f02639f331 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T4.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is not a Number, then the length property of - * the newly constructed object is set to 1 and the 0 property of - * the newly constructed object is set to len - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T4.js - * @description Checking for Number object - */ +/*--- +info: > + If the argument len is not a Number, then the length property of + the newly constructed object is set to 1 and the 0 property of + the newly constructed object is set to len +es5id: 15.4.2.2_A2.3_T4 +description: Checking for Number object +---*/ var obj = new Number(0); var x = new Array(obj); @@ -48,5 +48,3 @@ if (x.length !== 1) { if (x[0] !== obj) { $ERROR('#6: var obj = new Number(4294967295); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0])); } - - diff --git a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T5.js b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T5.js index 10355f3bd0..3f10ef1255 100644 --- a/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T5.js +++ b/test/suite/ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the argument len is not a Number, then the length property of - * the newly constructed object is set to 1 and the 0 property of - * the newly constructed object is set to len - * - * @path ch15/15.4/15.4.2/15.4.2.2/S15.4.2.2_A2.3_T5.js - * @description Checking for Number object - */ +/*--- +info: > + If the argument len is not a Number, then the length property of + the newly constructed object is set to 1 and the 0 property of + the newly constructed object is set to len +es5id: 15.4.2.2_A2.3_T5 +description: Checking for Number object +---*/ var obj = new Number(-1); var x = new Array(obj); @@ -48,5 +48,3 @@ if (x.length !== 1) { if (x[0] !== obj) { $ERROR('#6: var obj = new Number(4294967297); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0])); } - - diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A1.js b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A1.js index 55388ecde3..448420536a 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A1.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Array has property prototype - * - * @path ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A1.js - * @description Checking use hasOwnProperty - */ +/*--- +info: The Array has property prototype +es5id: 15.4.3.1_A1 +description: Checking use hasOwnProperty +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.hasOwnProperty('prototype') !== true) { $FAIL('#1: Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype'))); } - - diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A2.js b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A2.js index 1381160894..96f894a1ff 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A2.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Array.prototype property has the attribute DontEnum - * - * @path ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A2.js - * @description Checking if enumerating the Array.prototype property fails - */ +/*--- +info: The Array.prototype property has the attribute DontEnum +es5id: 15.4.3.1_A2 +description: Checking if enumerating the Array.prototype property fails +---*/ //CHECK#1 if (Array.propertyIsEnumerable('prototype') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "prototype") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A3.js b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A3.js index 12d2d914b6..5b432b4abe 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A3.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Array.prototype property has the attribute DontDelete - * - * @path ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A3.js - * @description Checking if deleting the Array.prototype property fails - * @noStrict - */ +/*--- +info: The Array.prototype property has the attribute DontDelete +es5id: 15.4.3.1_A3 +description: Checking if deleting the Array.prototype property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.hasOwnProperty('prototype') !== true) { @@ -25,6 +25,3 @@ if (Array.hasOwnProperty('prototype') !== true) { if (Array.prototype === undefined) { $ERROR('#3: delete Array.prototype; Array.prototype !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A4.js b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A4.js index 40c4140f81..f077df9d6c 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A4.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Array.prototype property has the attribute ReadOnly - * - * @path ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A4.js - * @description Checking if varying the Array.prototype property fails - * @noStrict - */ +/*--- +info: The Array.prototype property has the attribute ReadOnly +es5id: 15.4.3.1_A4 +description: Checking if varying the Array.prototype property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype; @@ -15,5 +14,3 @@ Array.prototype = 1; if (Array.prototype !== x) { $ERROR('#1: x = Array.prototype; Array.prototype = 1; Array.prototype === x. Actual: ' + (Array.prototype)); } - - diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A5.js b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A5.js index bd9f87f0a8..e0f25204c0 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A5.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of Array.prototype is 0 - * - * @path ch15/15.4/15.4.3/15.4.3.1/S15.4.3.1_A5.js - * @description Array.prototype.length === 0 - */ +/*--- +info: The length property of Array.prototype is 0 +es5id: 15.4.3.1_A5 +description: Array.prototype.length === 0 +---*/ //CHECK#1 if (Array.prototype.length !== 0) { @@ -15,6 +14,4 @@ if (Array.prototype.length !== 0) { if (1 / Array.prototype.length !== Number.POSITIVE_INFINITY) { $ERROR('#1.2: Array.prototype.length === +0. Actual: -' + (Array.prototype.length)); } -} - - +} diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js index ee5d7d5e48..61ee266ebe 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js - * @description Array.isArray must exist as a function - */ - - -function testcase() { - var f = Array.isArray; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-1 +description: Array.isArray must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.isArray; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js index c213e3be2a..a1c347ac08 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js - * @description Array.isArray must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Array.isArray.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-2 +description: Array.isArray must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.isArray.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js index 7aff2e755a..8c6e75440b 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js - * @description Array.isArray return true if its argument is an Array - */ - - -function testcase() { - var a = []; - var b = Array.isArray(a); - if (b === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-3 +description: Array.isArray return true if its argument is an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = []; + var b = Array.isArray(a); + if (b === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js index 0c3b7b5334..9499ba7fb0 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js - * @description Array.isArray return false if its argument is not an Array - */ - - -function testcase() { - var b_num = Array.isArray(42); - var b_undef = Array.isArray(undefined); - var b_bool = Array.isArray(true); - var b_str = Array.isArray("abc"); - var b_obj = Array.isArray({}); - var b_null = Array.isArray(null); - - if (b_num === false && - b_undef === false && - b_bool === false && - b_str === false && - b_obj === false && - b_null === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-4 +description: Array.isArray return false if its argument is not an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var b_num = Array.isArray(42); + var b_undef = Array.isArray(undefined); + var b_bool = Array.isArray(true); + var b_str = Array.isArray("abc"); + var b_obj = Array.isArray({}); + var b_null = Array.isArray(null); + + if (b_num === false && + b_undef === false && + b_bool === false && + b_str === false && + b_obj === false && + b_null === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js index 3e32f06ade..2434737072 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js - * @description Array.isArray return true if its argument is an Array (Array.prototype) - */ - - -function testcase() { - var b = Array.isArray(Array.prototype); - if (b === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-5 +description: > + Array.isArray return true if its argument is an Array + (Array.prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = Array.isArray(Array.prototype); + if (b === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js index b827c30e42..a4444db14a 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js - * @description Array.isArray return true if its argument is an Array (new Array()) - */ - - -function testcase() { - var a = new Array(10); - var b = Array.isArray(a); - if (b === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-6 +description: Array.isArray return true if its argument is an Array (new Array()) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(10); + var b = Array.isArray(a); + if (b === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js index 7ddb7e14d5..967206db4a 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js - * @description Array.isArray returns false if its argument is not an Array - */ - - -function testcase() { - var o = new Object(); - o[12] = 13; - var b = Array.isArray(o); - if (b === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-0-7 +description: Array.isArray returns false if its argument is not an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = new Object(); + o[12] = 13; + var b = Array.isArray(o); + if (b === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-1.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-1.js index e42ce7e28d..84f151be69 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-1.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-1.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-1.js - * @description Array.isArray applied to boolean primitive - */ - - -function testcase() { - - return !Array.isArray(true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-1 +description: Array.isArray applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-10.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-10.js index 5aa9edd0c8..dc8b440596 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-10.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-10.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-10.js - * @description Array.isArray applied to RegExp object - */ - - -function testcase() { - - return !Array.isArray(new RegExp()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-10 +description: Array.isArray applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(new RegExp()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-11.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-11.js index a14b3c3d53..8faa8ed532 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-11.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-11.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-11.js - * @description Array.isArray applied to the JSON object - */ - - -function testcase() { - - return !Array.isArray(JSON); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-11 +description: Array.isArray applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(JSON); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-12.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-12.js index ab1dbb6127..4eca08f7a6 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-12.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-12.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-12.js - * @description Array.isArray applied to Error object - */ - - -function testcase() { - - return !Array.isArray(new SyntaxError()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-12 +description: Array.isArray applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(new SyntaxError()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-13.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-13.js index e623d1d369..efd563237b 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-13.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-13.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-13.js - * @description Array.isArray applied to Arguments object - */ - - -function testcase() { - - var arg; - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - return !Array.isArray(arg); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-13 +description: Array.isArray applied to Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + return !Array.isArray(arg); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-15.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-15.js index 113f390db6..8fb108b4df 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-15.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-15.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-15.js - * @description Array.isArray applied to the global object - */ - - -function testcase() { - - return !Array.isArray(fnGlobalObject()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-15 +description: Array.isArray applied to the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + return !Array.isArray(fnGlobalObject()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-2.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-2.js index 66b7dd25be..ad5a28b1f3 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-2.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-2.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-2.js - * @description Array.isArray applied to Boolean Object - */ - - -function testcase() { - - return !Array.isArray(new Boolean(false)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-2 +description: Array.isArray applied to Boolean Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(new Boolean(false)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-3.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-3.js index 343ddc43ee..32f2585216 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-3.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-3.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-3.js - * @description Array.isArray applied to number primitive - */ - - -function testcase() { - - return !Array.isArray(5); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-3 +description: Array.isArray applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(5); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-4.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-4.js index 7f18706712..f06018baf4 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-4.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-4.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-4.js - * @description Array.isArray applied to Number object - */ - - -function testcase() { - - return !Array.isArray(new Number(-3)); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-4 +description: Array.isArray applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(new Number(-3)); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-5.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-5.js index bb517c45e2..3c1b32f8f2 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-5.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-5.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-5.js - * @description Array.isArray applied to string primitive - */ - - -function testcase() { - - return !Array.isArray("abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-5 +description: Array.isArray applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray("abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-6.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-6.js index 5a2a723d76..47b84b6ebd 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-6.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-6.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-6.js - * @description Array.isArray applied to String object - */ - - -function testcase() { - - return !Array.isArray(new String("hello\nworld\\!")); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-6 +description: Array.isArray applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(new String("hello\nworld\\!")); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-7.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-7.js index ce564de446..3469df1c7c 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-7.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-7.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-7.js - * @description Array.isArray applied to Function object - */ - - -function testcase() { - - return !Array.isArray(function () { }); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-7 +description: Array.isArray applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(function () { }); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-8.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-8.js index c296bd373a..25628ef413 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-8.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-8.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-8.js - * @description Array.isArray applied to the Math object - */ - - -function testcase() { - - return !Array.isArray(Math); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-8 +description: Array.isArray applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(Math); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-9.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-9.js index e535d20830..08ab501389 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-9.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-9.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-9.js - * @description Array.isArray applied to Date object - */ - - -function testcase() { - - return !Array.isArray(new Date()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-1-9 +description: Array.isArray applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray(new Date()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-1.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-1.js index 69c642e888..3ef94c31ed 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-1.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-1.js - * @description Array.isArray applied to an object with an array as the prototype - */ - - -function testcase() { - - var proto = []; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - return !Array.isArray(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-2-1 +description: Array.isArray applied to an object with an array as the prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = []; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + return !Array.isArray(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-2.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-2.js index 493f4c7606..39ea4546a1 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-2.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-2.js - * @description Array.isArray applied to an object with Array.prototype as the prototype - */ - - -function testcase() { - - var proto = Array.prototype; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - return !Array.isArray(child); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-2-2 +description: > + Array.isArray applied to an object with Array.prototype as the + prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = Array.prototype; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + return !Array.isArray(child); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-3.js b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-3.js index 67e8881e7c..8b1d22e44a 100644 --- a/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-3.js +++ b/test/suite/ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-3.js - * @description Array.isArray applied to an Array-like object with length and some indexed properties - */ - - -function testcase() { - - return !Array.isArray({ 0: 12, 1: 9, length: 2 }); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.3.2-2-3 +description: > + Array.isArray applied to an Array-like object with length and some + indexed properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + return !Array.isArray({ 0: 12, 1: 9, length: 2 }); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T1.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T1.js index afb16971fb..69a32f8905 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of - * the Array constructor is the Function prototype object - * - * @path ch15/15.4/15.4.3/S15.4.3_A1.1_T1.js - * @description Create new property of Function.prototype. When Array constructor has this property - */ +/*--- +info: > + The value of the internal [[Prototype]] property of + the Array constructor is the Function prototype object +es5id: 15.4.3_A1.1_T1 +description: > + Create new property of Function.prototype. When Array constructor + has this property +---*/ Function.prototype.myproperty = 1; @@ -20,4 +22,3 @@ if (Array.myproperty !== 1) { if (Array.hasOwnProperty('myproperty') !== false) { $ERROR('#2: Function.prototype.myproperty = 1; Array.hasOwnProperty(\'myproperty\') === false. Actual: ' + (Array.hasOwnProperty('myproperty'))); } - diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T2.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T2.js index ef6ab6b971..a0110f2df8 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T2.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of - * the Array constructor is the Function prototype object - * - * @path ch15/15.4/15.4.3/S15.4.3_A1.1_T2.js - * @description Function.prototype.toString = Object.prototype.toString - */ +/*--- +info: > + The value of the internal [[Prototype]] property of + the Array constructor is the Function prototype object +es5id: 15.4.3_A1.1_T2 +description: Function.prototype.toString = Object.prototype.toString +---*/ //CHECK#1 Function.prototype.toString = Object.prototype.toString; if (Array.toString() !== "[object " + "Function" + "]") { $ERROR('#1: Function.prototype.toString = Object.prototype.toString; Array.toString() === "[object " + "Function" + "]". Actual: ' + (Array.toString())); } - diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T3.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T3.js index 4ef0ea0206..75b983b588 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A1.1_T3.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of - * the Array constructor is the Function prototype object - * - * @path ch15/15.4/15.4.3/S15.4.3_A1.1_T3.js - * @description Checking use isPrototypeOf - */ +/*--- +info: > + The value of the internal [[Prototype]] property of + the Array constructor is the Function prototype object +es5id: 15.4.3_A1.1_T3 +description: Checking use isPrototypeOf +---*/ //CHECK#1 if (Function.prototype.isPrototypeOf(Array) !== true) { $ERROR('#1: Function.prototype.isPrototypeOf(Array) === true. Actual: ' + (Function.prototype.isPrototypeOf(Array))); } - diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.1.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.1.js index ace47db448..0574d29e50 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.1.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.3/S15.4.3_A2.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of Array has the attribute DontEnum +es5id: 15.4.3_A2.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.slice) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.2.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.2.js index 9fc73527dd..173e08a0d9 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.2.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of Array has the attribute DontDelete - * - * @path ch15/15.4/15.4.3/S15.4.3_A2.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of Array has the attribute DontDelete +es5id: 15.4.3_A2.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.hasOwnProperty('length') !== true) { @@ -24,6 +24,3 @@ if (Array.hasOwnProperty('length') !== true) { if (Array.length === undefined) { $ERROR('#3: delete Array.length; Array.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.3.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.3.js index f7b6323a2c..201ffb59b7 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.3.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of Array has the attribute ReadOnly - * - * @path ch15/15.4/15.4.3/S15.4.3_A2.3.js - * @description Checking if varying the length property fails - */ +/*--- +info: The length property of Array has the attribute ReadOnly +es5id: 15.4.3_A2.3 +description: Checking if varying the length property fails +---*/ //CHECK#1 x = Array.length; @@ -14,5 +13,3 @@ Array.length = Infinity; if (Array.length !== x) { $ERROR('#1: x = Array.length; Array.length = Infinity; Array.length === x. Actual: ' + (Array.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.4.js b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.4.js index 40bdaf796b..7106f12990 100644 --- a/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.4.js +++ b/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of Array is 1 - * - * @path ch15/15.4/15.4.3/S15.4.3_A2.4.js - * @description Array.length === 1 - */ +/*--- +info: The length property of Array is 1 +es5id: 15.4.3_A2.4 +description: Array.length === 1 +---*/ //CHECK#1 if (Array.length !== 1) { $ERROR('#1: Array.length === 1. Actual: ' + (Array.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A1_T1.js index 7cc8bfb9e2..eaf8d65a59 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A1_T1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Array.prototype.constructor is - * the built-in Array constructor - * - * @path ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A1_T1.js - * @description Array.prototype.constructor === Array - */ +/*--- +info: > + The initial value of Array.prototype.constructor is + the built-in Array constructor +es5id: 15.4.4.1_A1_T1 +description: Array.prototype.constructor === Array +---*/ //CHECK#1 if (Array.prototype.constructor !== Array) { $ERROR('#1: Array.prototype.constructor === Array. Actual: ' + (Array.prototype.constructor)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A2.js index 53adaaaeb2..b870952046 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The constructor property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.1/S15.4.4.1_A2.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The constructor property of Array has the attribute DontEnum +es5id: 15.4.4.1_A2 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('constructor') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "constructor") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js index 75630b888f..7cb7b8e78b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js - * @description Array.prototype.slice will slice a string from start to end when index property (read-only) exists in Array.prototype (Step 10.c.ii) - */ - - -function testcase() { - var arrObj = [1, 2, 3]; - try { - Object.defineProperty(Array.prototype, "0", { - value: "test", - writable: false, - configurable: true - }); - - var newArr = arrObj.slice(0, 1); - return newArr.hasOwnProperty("0") && newArr[0] === 1 && typeof newArr[1] === "undefined"; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.10-10-c-ii-1 +description: > + Array.prototype.slice will slice a string from start to end when + index property (read-only) exists in Array.prototype (Step 10.c.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [1, 2, 3]; + try { + Object.defineProperty(Array.prototype, "0", { + value: "test", + writable: false, + configurable: true + }); + + var newArr = arrObj.slice(0, 1); + return newArr.hasOwnProperty("0") && newArr[0] === 1 && typeof newArr[1] === "undefined"; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js index 21b48b7d9e..cf7c65ca1f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js - * @description length > end > start = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T1 +description: length > end > start = 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,3); @@ -41,5 +41,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js index 1a1bf27c00..0f308f6bae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js - * @description length > end = start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T2 +description: length > end = start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3,3); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js index 4f5ec0535a..056f7448fd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js - * @description length > start > end > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T3 +description: length > start > end > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(4,3); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js index b9f2a3addf..ddb8105818 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js - * @description length = end = start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T4 +description: length = end = start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(5,5); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js index cb527e80c9..8e3d6fbe50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js - * @description length = end > start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T5 +description: length = end > start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3,5); @@ -36,5 +36,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js index e69330f064..7d017f49d3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js - * @description length > end > start > 0; - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T6 +description: length > end > start > 0; +---*/ var x = [0,1,2,3,4]; var arr = x.slice(2,4); @@ -36,5 +36,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js index 8e170e400d..4f23518ce5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js - * @description end > length > start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.1_T7 +description: end > length > start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3,6); @@ -36,5 +36,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js index 1daab4f56a..289a3dd345 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js - * @description length > end = abs(start), start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.2_T1 +description: length > end = abs(start), start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-3,3); @@ -31,5 +31,4 @@ if (arr[0] !== 2) { //CHECK#4 if (arr[1] !== undefined) { $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr[1] === undefined. Actual: ' + (arr[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js index f0e65869f4..8cfc14cccf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js - * @description length = end > abs(start), start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.2_T2 +description: length = end > abs(start), start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-1,5); @@ -31,5 +31,4 @@ if (arr[0] !== 4) { //CHECK#4 if (arr[1] !== undefined) { $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr[1] === undefined. Actual: ' + (arr[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js index c72c1f7505..a1b69a6a08 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js - * @description abs(start) = length > end > 0, start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.2_T3 +description: abs(start) = length > end > 0, start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-5,1); @@ -31,5 +31,4 @@ if (arr[0] !== 0) { //CHECK#4 if (arr[1] !== undefined) { $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr[1] === undefined. Actual: ' + (arr[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js index d15388ee08..4f1f95b32f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js - * @description abs(start) > length = end > 0, start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +es5id: 15.4.4.10_A1.2_T4 +description: abs(start) > length = end > 0, start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-9,5); @@ -51,5 +51,4 @@ if (arr[4] !== 4) { //CHECK#8 if (arr[5] !== undefined) { $ERROR('#8: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[5] === undefined. Actual: ' + (arr[5])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js index b23bd94821..3a5ca0a527 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js - * @description length > abs(end) > start = 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.3_T1 +description: length > abs(end) > start = 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,-2); @@ -41,5 +41,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js index d5348427fb..3e1e1e0891 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js - * @description length > abs(end) > start > 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.3_T2 +description: length > abs(end) > start > 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(1,-4); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js index 87928d765b..18659a18e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js - * @description length = abs(end) > start = 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.3_T3 +description: length = abs(end) > start = 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,-5); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js index 7844830a0f..059c9cabad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js - * @description abs(end) > length > start > 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.3_T4 +description: abs(end) > length > start > 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(4,-9); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js index a79ced38f4..0ae2c789fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js - * @description -length = start < end < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.4_T1 +description: -length = start < end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); @@ -41,5 +41,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js index 385ec10289..f7c958d3b3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js - * @description -length < start < end < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.4_T2 +description: -length < start < end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); @@ -36,5 +36,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[2] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[2] === undefined. Actual: ' + (arr[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js index 5038a3248c..05f9f193e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js - * @description start < -length < end < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.4_T3 +description: start < -length < end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); @@ -46,5 +46,4 @@ if (arr[3] !== 3) { //CHECK#7 if (arr[4] !== undefined) { $ERROR('#7: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[4] === undefined. Actual: ' + (arr[4])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js index c43ac02a2e..4448883d94 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js - * @description start = end < -length - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +es5id: 15.4.4.10_A1.4_T4 +description: start = end < -length +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); @@ -27,4 +27,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js index dba873ddc7..793dbe7292 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If end is undefined use length - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js - * @description end === undefined - */ +/*--- +info: If end is undefined use length +es5id: 15.4.4.10_A1.5_T1 +description: end === undefined +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); @@ -35,5 +34,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[2] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[2] === undefined. Actual: ' + (arr[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js index 764374ef31..33fb10e0d8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If end is undefined use length - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js - * @description end is absent - */ +/*--- +info: If end is undefined use length +es5id: 15.4.4.10_A1.5_T2 +description: end is absent +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-2); @@ -35,5 +34,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[2] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[2] === undefined. Actual: ' + (arr[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js index 9995f993ce..7e069f0c40 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js - * @description start is not integer - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.10_A2.1_T1 +description: start is not integer +---*/ var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); @@ -35,5 +34,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js index 1cb7b0fd7a..74ce071108 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js - * @description start = NaN - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.10_A2.1_T2 +description: start = NaN +---*/ var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); @@ -40,5 +39,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js index 171df839fd..38966ad6af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js - * @description start = Infinity - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.10_A2.1_T3 +description: start = Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); @@ -26,4 +25,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js index 451a4fba0b..079f0e473c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js - * @description start = -Infinity - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.10_A2.1_T4 +description: start = -Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); @@ -40,5 +39,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js index 7be769570f..afdb2e4293 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js - * @description ToInteger use ToNumber - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.10_A2.1_T5 +description: ToInteger use ToNumber +---*/ var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); @@ -40,5 +39,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js index 51209eb720..6a5ba7644d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js - * @description end is not integer - */ +/*--- +info: Operator use ToInteger from end +es5id: 15.4.4.10_A2.2_T1 +description: end is not integer +---*/ var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); @@ -35,5 +34,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js index 1b29e02e4f..9f1b697ee3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js - * @description end = NaN - */ +/*--- +info: Operator use ToInteger from end +es5id: 15.4.4.10_A2.2_T2 +description: end = NaN +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); @@ -26,4 +25,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js index 988cd1e905..908be05ec0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js - * @description end = Infinity - */ +/*--- +info: Operator use ToInteger from end +es5id: 15.4.4.10_A2.2_T3 +description: end = Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); @@ -50,5 +49,4 @@ if (arr[4] !== 4) { //CHECK#8 if (arr[5] !== undefined) { $ERROR('#8: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[5] === undefined. Actual: ' + (arr[5])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js index 3d98fe7f09..ad709f9f7e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js - * @description end = -Infinity - */ +/*--- +info: Operator use ToInteger from end +es5id: 15.4.4.10_A2.2_T4 +description: end = -Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); @@ -26,4 +25,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js index 8c27e16c4f..c2e147a02b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js - * @description ToInteger use ToNumber - */ +/*--- +info: Operator use ToInteger from end +es5id: 15.4.4.10_A2.2_T5 +description: ToInteger use ToNumber +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); @@ -40,5 +39,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js index c0a7592920..4c175f9196 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js - * @description If start is positive, use min(start, length). - * If end is positive, use min(end, length) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.10_A2_T1 +description: > + If start is positive, use min(start, length). If end is positive, + use min(end, length) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +50,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js index 04a45b79a6..d962c639f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js - * @description If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.10_A2_T2 +description: > + If start is negative, use max(start + length, 0). If end is + positive, use min(end, length) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +50,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js index 6a542bd6a2..ea423607ab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js - * @description If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.10_A2_T3 +description: > + If start is positive, use min(start, length). If end is negative, + use max(end + length, 0) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +50,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js index 01a4e4f60a..1d3e9bc41c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js - * @description If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.10_A2_T4 +description: > + If start is negative, use max(start + length, 0). If end is + negative, use max(end + length, 0) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +50,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js index 2a91560112..1ca45ac797 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js - * @description If end is undefined use length - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.10_A2_T5 +description: If end is undefined use length +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -48,5 +48,4 @@ if (arr[2] !== 4) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js index e0c304a000..9030e47dba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js - * @description If end is undefined use length - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.10_A2_T6 +description: If end is undefined use length +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -48,5 +48,4 @@ if (arr[2] !== 4) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js index f32a977067..5656f89983 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.10_A3_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -28,5 +27,4 @@ if (arr[0] !== undefined) { //CHECK#3 if (arr[4294967295] !== undefined) { $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); arr[4294967295] === undefined. Actual: ' + (arr[4294967295])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js index 63810d3c96..520ae9b920 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js - * @description length = 4294967297 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.10_A3_T2 +description: length = 4294967297 +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -28,5 +27,4 @@ if (arr[0] !== "x") { //CHECK#3 if (arr[4294967296] !== undefined) { $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); arr[4294967296] === undefined. Actual: ' + (arr[4294967296])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js index ab663fc2c0..2071530ffa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js - * @description length = -1 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.10_A3_T3 +description: length = -1 +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -22,5 +21,4 @@ if (arr.length !== 1) { //CHECK#3 if (arr[0] !== "x") { $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr[0] === "x". Actual: ' + (arr[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js index b77d26b314..690e63fc03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.10_A4_T1 +description: "[[Prototype]] of Array instance is Array.prototype" +---*/ Array.prototype[1] = 1; var x = [0]; @@ -27,4 +26,3 @@ if (arr[1] !== 1) { if (arr.hasOwnProperty('1') !== true) { $ERROR('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr.hasOwnProperty(\'1\') === true. Actual: ' + (arr.hasOwnProperty('1'))); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js index a48d1f8469..9d58a386df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of slice has the attribute DontEnum +es5id: 15.4.4.10_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.slice.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.slice){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.slice) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js index 88cfc51349..0237712b39 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of slice has the attribute DontDelete +es5id: 15.4.4.10_A5.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.slice.hasOwnProperty('length') !== true) { @@ -24,6 +24,3 @@ if (Array.prototype.slice.hasOwnProperty('length') !== true) { if (Array.prototype.slice.length === undefined) { $ERROR('#3: delete Array.prototype.slice.length; Array.prototype.slice.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js index f03ef81b2f..b2f7114179 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of slice has the attribute ReadOnly +es5id: 15.4.4.10_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.slice.length; @@ -15,5 +14,3 @@ Array.prototype.slice.length = Infinity; if (Array.prototype.slice.length !== x) { $ERROR('#1: x = Array.prototype.slice.length; Array.prototype.slice.length = Infinity; Array.prototypeslice.length === x. Actual: ' + (Array.prototypeslice.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js index d0dca33969..b166d1f5b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice is 2 - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js - * @description slice.length === 2 - */ +/*--- +info: The length property of slice is 2 +es5id: 15.4.4.10_A5.4 +description: slice.length === 2 +---*/ //CHECK#1 if (Array.prototype.slice.length !== 2) { $ERROR('#1: Array.prototype.slice.length === 2. Actual: ' + (Array.prototype.slice.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js index fac778af68..631d05cfae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The slice property of Array has the attribute DontEnum +es5id: 15.4.4.10_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('slice') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "slice") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js index 6570b06ff6..529cb789fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js - * @description Checking Array.prototype.slice.prototype - */ +/*--- +info: The slice property of Array has not prototype property +es5id: 15.4.4.10_A5.6 +description: Checking Array.prototype.slice.prototype +---*/ //CHECK#1 if (Array.prototype.slice.prototype !== undefined) { $ERROR('#1: Array.prototype.slice.prototype === undefined. Actual: ' + (Array.prototype.slice.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js index 0935af478e..95f2765f98 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The slice property of Array can't be used as constructor +es5id: 15.4.4.10_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.slice() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.1_T1.js index fe46045b68..13b71e3b83 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If this object does not have a property named by ToString(j), - * and this object does not have a property named by ToString(k), return +0 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.1_T1.js - * @description If comparefn is undefined, use SortCompare operator - */ +/*--- +info: > + If this object does not have a property named by ToString(j), + and this object does not have a property named by ToString(k), return +0 +es5id: 15.4.4.11_A1.1_T1 +description: If comparefn is undefined, use SortCompare operator +---*/ var x = new Array(2); x.sort(); @@ -25,5 +25,4 @@ if (x[0] !== undefined) { //CHECK#3 if (x[1] !== undefined) { $ERROR('#3: var x = new Array(2); x.sort(); x[1] === undefined. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T1.js index d1e818de06..485de2ed03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If this object does not have a property named by - * ToString(j), return 1. If this object does not have a property - * named by ToString(k), return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T1.js - * @description If comparefn is undefined, use SortCompare operator - */ +/*--- +info: > + If this object does not have a property named by + ToString(j), return 1. If this object does not have a property + named by ToString(k), return -1 +es5id: 15.4.4.11_A1.2_T1 +description: If comparefn is undefined, use SortCompare operator +---*/ var x = new Array(2); x[1] = 1; @@ -46,5 +46,4 @@ if (x[0] !== 1) { //CHECK#6 if (x[1] !== undefined) { $ERROR('#6: var x = new Array(2); x[0] = 1; x.sort(); x[1] === undefined. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T2.js index 6b551359c5..9f87f332da 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If this object does not have a property named by - * ToString(j), return 1. If this object does not have a property - * named by ToString(k), return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.2_T2.js - * @description If comparefn is not undefined - */ +/*--- +info: > + If this object does not have a property named by + ToString(j), return 1. If this object does not have a property + named by ToString(k), return -1 +es5id: 15.4.4.11_A1.2_T2 +description: If comparefn is not undefined +---*/ var myComparefn = function(x,y) { if (x === undefined) return -1; @@ -52,5 +52,4 @@ if (x[0] !== 1) { //CHECK#6 if (x[1] !== undefined) { $ERROR('#6: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.3_T1.js index 44a1d548ad..b5ee616c27 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If [[Get]] ToString(j) and [[Get]] ToString(k) - * are both undefined, return +0 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.3_T1.js - * @description If comparefn is undefined, use SortCompare operator - */ +/*--- +info: > + If [[Get]] ToString(j) and [[Get]] ToString(k) + are both undefined, return +0 +es5id: 15.4.4.11_A1.3_T1 +description: If comparefn is undefined, use SortCompare operator +---*/ var x = new Array(undefined, undefined); x.sort(); @@ -25,5 +25,4 @@ if (x[0] !== undefined) { //CHECK#3 if (x[1] !== undefined) { $ERROR('#3: var x = new Array(undefined, undefined); x.sort(); x[1] === undefined. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T1.js index 2341ae248f..37882b0446 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If [[Get]] ToString(j) is undefined, return 1. - * If [[]Get] ToString(k) is undefined, return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T1.js - * @description If comparefn is undefined, use SortCompare operator - */ +/*--- +info: > + If [[Get]] ToString(j) is undefined, return 1. + If [[]Get] ToString(k) is undefined, return -1 +es5id: 15.4.4.11_A1.4_T1 +description: If comparefn is undefined, use SortCompare operator +---*/ var x = new Array(undefined, 1); x.sort(); @@ -43,5 +43,4 @@ if (x[0] !== 1) { //CHECK#6 if (x[1] !== undefined) { $ERROR('#6: var x = new Array(1, undefined); x.sort(); x[1] === undefined. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T2.js index 377d34649f..4c7f9c6c38 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If [[Get]] ToString(j) is undefined, return 1. - * If [[]Get] ToString(k) is undefined, return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.4_T2.js - * @description If comparefn is not undefined - */ +/*--- +info: > + If [[Get]] ToString(j) is undefined, return 1. + If [[]Get] ToString(k) is undefined, return -1 +es5id: 15.4.4.11_A1.4_T2 +description: If comparefn is not undefined +---*/ var myComparefn = function(x,y) { if (x === undefined) return -1; @@ -49,5 +49,4 @@ if (x[0] !== 1) { //CHECK#6 if (x[1] !== undefined) { $ERROR('#6: var x = new Array(1, undefined); x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.5_T1.js index af706b7285..b7bea4d0d2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If comparefn is undefined, use SortCompare operator - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A1.5_T1.js - * @description Checking sort() and sort(undefined) - */ +/*--- +info: If comparefn is undefined, use SortCompare operator +es5id: 15.4.4.11_A1.5_T1 +description: Checking sort() and sort(undefined) +---*/ var x = new Array(1,0); x.sort(); @@ -43,4 +42,3 @@ if (x[0] !== 0) { if (x[1] !== 1) { $ERROR('#6: var x = new Array(1,0); x.sort(undefined); x[1] === 1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T1.js index 305ca44c2b..0f922c3946 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * * If ToString([[Get]] ToString(j)) < ToString([[Get]] ToString(k)), return -1. - * If ToString([[Get]] ToString(j)) > ToString([[Get]] ToString(k)), return 1; - * return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T1.js - * @description Checking ENGLISH ALPHABET - */ +/*--- +info: > + If ToString([[Get]] ToString(j)) < ToString([[Get]] ToString(k)), return -1. + If ToString([[Get]] ToString(j)) > ToString([[Get]] ToString(k)), return 1; + return -1 +es5id: 15.4.4.11_A2.1_T1 +description: Checking ENGLISH ALPHABET +---*/ var alphabetR = ["z", "y", "x", "w", "v", "u", "t", "s", "r", "q", "p", "o", "n", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"]; var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; @@ -23,4 +23,3 @@ for (var i = 0; i < 26; i++) { if (result !== true) { $ERROR('#1: CHECK ENGLISH ALPHABET'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T2.js index 53ee4656bf..528baca2df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * * If ToString([[Get]] ToString(j)) < ToString([[Get]] ToString(k)), return -1. - * If ToString([[Get]] ToString(j)) > ToString([[Get]] ToString(k)), return 1; - * return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T2.js - * @description Checking RUSSIAN ALPHABET - */ +/*--- +info: > + If ToString([[Get]] ToString(j)) < ToString([[Get]] ToString(k)), return -1. + If ToString([[Get]] ToString(j)) > ToString([[Get]] ToString(k)), return 1; + return -1 +es5id: 15.4.4.11_A2.1_T2 +description: Checking RUSSIAN ALPHABET +---*/ var alphabetR = ["ё", "я", "ю", "э", "ь", "ы", "ъ", "щ", "ш", "ч", "ц", "х", "ф", "у", "т", "с", "р", "П", "О", "Н", "М", "Л", "К", "Й", "И", "З", "Ж", "Е", "Д", "Г", "В", "Б", "А"]; var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; @@ -23,4 +23,3 @@ for (var i = 0; i < 26; i++) { if (result !== true) { $ERROR('#1: CHECK RUSSIAN ALPHABET'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T3.js index 50a138c1e7..1b8d4c3148 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * * If ToString([[Get]] ToString(j)) < ToString([[Get]] ToString(k)), return -1. - * If ToString([[Get]] ToString(j)) > ToString([[Get]] ToString(k)), return 1; - * return -1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.1_T3.js - * @description Checking ToString operator - */ +/*--- +info: > + If ToString([[Get]] ToString(j)) < ToString([[Get]] ToString(k)), return -1. + If ToString([[Get]] ToString(j)) > ToString([[Get]] ToString(k)), return 1; + return -1 +es5id: 15.4.4.11_A2.1_T3 +description: Checking ToString operator +---*/ var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; var alphabetR = [undefined, 2, 1, "X", -1, "a", true, obj, NaN, Infinity]; @@ -26,4 +26,3 @@ for (var i = 0; i < 10; i++) { if (result !== true) { $ERROR('#1: Check ToString operator'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T1.js index e228074ed5..85944a6009 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * My comparefn is inverse implementation comparefn - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T1.js - * @description Checking ENGLISH ALPHABET - */ +/*--- +info: My comparefn is inverse implementation comparefn +es5id: 15.4.4.11_A2.2_T1 +description: Checking ENGLISH ALPHABET +---*/ var alphabetR = ["z", "y", "x", "w", "v", "u", "t", "s", "r", "q", "p", "o", "n", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"]; var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; @@ -28,5 +27,4 @@ for (var i = 0; i < 26; i++) { if (result !== true) { $ERROR('#1: CHECK ENGLISH ALPHABET'); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T2.js index 031df25aea..2be51f8ecb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * My comparefn is inverse implementation comparefn - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T2.js - * @description Checking RUSSIAN ALPHABET - */ +/*--- +info: My comparefn is inverse implementation comparefn +es5id: 15.4.4.11_A2.2_T2 +description: Checking RUSSIAN ALPHABET +---*/ var alphabetR = ["ё", "я", "ю", "э", "ь", "ы", "ъ", "щ", "ш", "ч", "ц", "х", "ф", "у", "т", "с", "р", "П", "О", "Н", "М", "Л", "К", "Й", "И", "З", "Ж", "Е", "Д", "Г", "В", "Б", "А"]; var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; @@ -29,4 +28,3 @@ for (var i = 0; i < 26; i++) { if (result !== true) { $ERROR('#1: CHECK RUSSIAN ALPHABET'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T3.js index e628e0da87..9a546b227b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * My comparefn is inverse implementation comparefn - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A2.2_T3.js - * @description Checking ToString operator - */ +/*--- +info: My comparefn is inverse implementation comparefn +es5id: 15.4.4.11_A2.2_T3 +description: Checking ToString operator +---*/ var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; var alphabetR = [undefined, 2, 1, "X", -1, "a", true, obj, NaN, Infinity]; @@ -32,4 +31,3 @@ for (var i = 0; i < 10; i++) { if (result !== true) { $ERROR('#1: Check ToString operator'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T1.js index e3b985d03d..c74278f6ab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The sort function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T1.js - * @description If comparefn is undefined, use SortCompare operator - */ +/*--- +info: > + The sort function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.11_A3_T1 +description: If comparefn is undefined, use SortCompare operator +---*/ var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; var alphabetR = {0:undefined, 1:2, 2:1, 3:"X", 4:-1, 5:"a", 6:true, 7:obj, 8:NaN, 9:Infinity}; @@ -33,5 +33,4 @@ for (var i = 0; i < 10; i++) { if (result !== true) { $ERROR('#1: Check ToString operator'); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T2.js index eeadc37297..97f3b3b298 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The sort function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A3_T2.js - * @description If comparefn is not undefined - */ +/*--- +info: > + The sort function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.11_A3_T2 +description: If comparefn is not undefined +---*/ var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; var alphabetR = {0:undefined, 1:2, 2:1, 3:"X", 4:-1, 5:"a", 6:true, 7:obj, 8:NaN, 9:Infinity}; @@ -41,5 +41,4 @@ for (var i = 0; i < 10; i++) { if (result !== true) { $ERROR('#1: Check ToString operator'); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T1.js index 0f63d801c7..0d6524abf8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.11_A4_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.sort = Array.prototype.sort; @@ -33,4 +32,3 @@ if (obj[0] !== "x") { if (obj[4294967295] !== "y") { $ERROR('#4: var obj = {}; obj.sort = Array.prototype.sort; obj[] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.sort(); obj[4294967295] == "y"'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T2.js index 4116c648f6..94e4d5074b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T2.js - * @description length = 4294967298 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.11_A4_T2 +description: length = 4294967298 +---*/ var obj = {}; obj.sort = Array.prototype.sort; @@ -38,5 +37,4 @@ if (obj[1] !== "z") { //CHECK#5 if (obj[4294967297] !== "x") { $ERROR('#5: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[4294967297] = "x"; obj.length = 4294967298; obj.sort(); obj[4294967297] === "x". Actual: ' + (obj[4294967297])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T3.js index fe5d5de941..dd018a4ad7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T3.js - * @description length = -4294967294 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.11_A4_T3 +description: length = -4294967294 +---*/ var obj = {}; obj.sort = Array.prototype.sort; @@ -38,5 +37,4 @@ if (obj[1] !== "z") { //CHECK#5 if (obj[2] !== "x") { $ERROR('#5: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; obj.sort(); obj[2] === "x". Actual: ' + (obj[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A5_T1.js index a7e363e73b..0d22934314 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Array.sort should not eat exceptions - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A5_T1.js - * @description comparefn function throw "error" - */ +/*--- +info: Array.sort should not eat exceptions +es5id: 15.4.4.11_A5_T1 +description: comparefn function throw "error" +---*/ //CHECK#1 var myComparefn = function(x,y) { @@ -20,5 +19,4 @@ try { if (e !== "error") { $ERROR('#1.2: Array.sort should not eat exceptions'); } -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A6_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A6_T2.js index af563e6757..40cc57b603 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A6_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A6_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A6_T2.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.11_A6_T2 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = -1; var x = [1,0]; @@ -63,4 +64,3 @@ if (x[0] !== undefined) { if (x[1] !== -1) { $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); delete x[0]; delete x[1]; x[1] === -1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.1.js index bd12a9c230..9351108970 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of sort has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of sort has the attribute DontEnum +es5id: 15.4.4.11_A7.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.sort.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.sort){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.sort) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.2.js index 8916435508..edb2de70b1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of sort has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of sort has the attribute DontDelete +es5id: 15.4.4.11_A7.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.sort.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.sort.hasOwnProperty('length') !== true) { if (Array.prototype.sort.length === undefined) { $ERROR('#3: delete Array.prototype.sort.length; Array.prototype.sort.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.3.js index 927d9e050a..cf12ce9f0f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of sort has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.3.js - * @description Checking if varying the length fails - * @noStrict - */ +/*--- +info: The length property of sort has the attribute ReadOnly +es5id: 15.4.4.11_A7.3 +description: Checking if varying the length fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.sort.length; @@ -15,5 +14,3 @@ Array.prototype.sort.length = Infinity; if (Array.prototype.sort.length !== x) { $ERROR('#1: x = Array.prototype.sort.length; Array.prototype.sort.length = Infinity; Array.prototype.sort.length === x. Actual: ' + (Array.prototype.sort.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.4.js index 6f52f6c1f8..fb6fb92fd0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of sort is 1 - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.4.js - * @description sort.length === 1 - */ +/*--- +info: The length property of sort is 1 +es5id: 15.4.4.11_A7.4 +description: sort.length === 1 +---*/ //CHECK#1 if (Array.prototype.sort.length !== 1) { $ERROR('#1: Array.prototype.sort.length === 1. Actual: ' + (Array.prototype.sort.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.5.js index 989680b751..dbe7289dda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The sort property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The sort property of Array has the attribute DontEnum +es5id: 15.4.4.11_A7.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('sort') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "sort") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.6.js index cacf2c7d32..9d37b15b7a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The sort property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.6.js - * @description Checking Array.prototype.sort.prototype - */ +/*--- +info: The sort property of Array has not prototype property +es5id: 15.4.4.11_A7.6 +description: Checking Array.prototype.sort.prototype +---*/ //CHECK#1 if (Array.prototype.sort.prototype !== undefined) { $ERROR('#1: Array.prototype.sort.prototype === undefined. Actual: ' + (Array.prototype.sort.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.7.js index f43c0eba0f..b843543074 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The sort property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The sort property of Array can't be used as constructor +es5id: 15.4.4.11_A7.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.sort() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A8.js index 8d4169ade4..73fa20f11b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A8.js @@ -1,13 +1,13 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Call the comparefn passing undefined as the this value (step 13b) - * - * @path ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A8.js - * @description comparefn tests that its this value is undefined - * @onlyStrict - */ +/*--- +info: Call the comparefn passing undefined as the this value (step 13b) +es5id: 15.4.4.11_A8 +description: comparefn tests that its this value is undefined +flags: [onlyStrict] +includes: [$FAIL.js] +---*/ var global = this; [2,3].sort(function(x,y) { @@ -22,4 +22,3 @@ var global = this; } return x - y; }); - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-a-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-a-1.js index f3785760e0..89f2b48c23 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-a-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-a-1.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-a-1.js - * @description Array.prototype.splice - 'from' is the result of ToString(actualStart+k) in an Array - */ - - -function testcase() { - var arrObj = [1, 2, 3]; - var newArrObj = arrObj.splice(-2, 1); - return newArrObj.length === 1 && newArrObj[0] === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.12-9-a-1 +description: > + Array.prototype.splice - 'from' is the result of + ToString(actualStart+k) in an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [1, 2, 3]; + var newArrObj = arrObj.splice(-2, 1); + return newArrObj.length === 1 && newArrObj[0] === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-c-ii-1.js index f2906231d5..1d9575a65f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-c-ii-1.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-c-ii-1.js - * @description Array.prototype.splice will splice an array even when Array.prototype has index '0' set to read-only and 'fromPresent' less than 'actualDeleteCount (Step 9.c.ii) - */ - - -function testcase() { - try { - var arr = ["a", "b", "c"]; - Array.prototype[0] = "test"; - var newArr = arr.splice(2, 1, "d"); - - var verifyValue = false; - verifyValue = arr.length === 3 && arr[0] === "a" && arr[1] === "b" && arr[2] === "d" - && newArr[0] === "c" && newArr.length === 1; - - var verifyEnumerable = false; - for (var p in newArr) { - if (newArr.hasOwnProperty("0") && p === "0") { - verifyEnumerable = true; - } - } - - var verifyWritable = false; - newArr[0] = 12; - verifyWritable = newArr[0] === 12; - - var verifyConfigurable = false; - delete newArr[0]; - verifyConfigurable = newArr.hasOwnProperty("0"); - - return verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.12-9-c-ii-1 +description: > + Array.prototype.splice will splice an array even when + Array.prototype has index '0' set to read-only and 'fromPresent' + less than 'actualDeleteCount (Step 9.c.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var arr = ["a", "b", "c"]; + Array.prototype[0] = "test"; + var newArr = arr.splice(2, 1, "d"); + + var verifyValue = false; + verifyValue = arr.length === 3 && arr[0] === "a" && arr[1] === "b" && arr[2] === "d" + && newArr[0] === "c" && newArr.length === 1; + + var verifyEnumerable = false; + for (var p in newArr) { + if (newArr.hasOwnProperty("0") && p === "0") { + verifyEnumerable = true; + } + } + + var verifyWritable = false; + newArr[0] = 12; + verifyWritable = newArr[0] === 12; + + var verifyConfigurable = false; + delete newArr[0]; + verifyConfigurable = newArr.hasOwnProperty("0"); + + return verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T1.js index 1c036ffefc..6e35e6f85d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T1.js - * @description length > deleteCount > start = 0, itemCount = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.1_T1 +description: length > deleteCount > start = 0, itemCount = 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(0,3); @@ -46,5 +46,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,3); x[0] === 3. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T2.js index f3e165735b..17af0fa92e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T2.js - * @description length > deleteCount > start = 0, itemCount > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.1_T2 +description: length > deleteCount > start = 0, itemCount > 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); @@ -56,5 +56,4 @@ if (x[1] !== 5) { //CHECK#9 if (x[2] !== 3) { $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[2] === 3. Actual: ' + (x[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T3.js index 2632b0fee1..3d29e493b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T3.js - * @description length = deleteCount > start = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.1_T3 +description: length = deleteCount > start = 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(0,4); @@ -46,5 +46,4 @@ if (arr[3] !== 3) { //CHECK#7 if (x.length !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,4); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T4.js index ac33a5f1e6..39b8876250 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T4.js - * @description length > deleteCount > start > 0, itemCount > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.1_T4 +description: length > deleteCount > start > 0, itemCount > 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); @@ -56,5 +56,4 @@ if (x[1] !== 4) { //CHECK#9 if (x[2] !== 5) { $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[2] === 5. Actual: ' + (x[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T5.js index d371e5c7d2..535be4efda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T5.js - * @description deleteCount > length > start = 0, itemCount = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.1_T5 +description: deleteCount > length > start = 0, itemCount = 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(0,5); @@ -46,5 +46,4 @@ if (arr[3] !== 3) { //CHECK#7 if (x.length !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,5); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T6.js index 09592280fc..75ae5c562b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.1_T6.js - * @description length = deleteCount > start > 0, itemCount > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.1_T6 +description: length = deleteCount > start > 0, itemCount > 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); @@ -56,5 +56,4 @@ if (x[1] !== 4) { //CHECK#9 if (x[2] !== 5) { $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[2] === 5. Actual: ' + (x[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T1.js index e99e11eaed..71f0abc8bb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T1.js - * @description -length = start < deleteCount < 0, itemCount = 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.2_T1 +description: -length = start < deleteCount < 0, itemCount = 0 +---*/ var x = [0,1]; var arr = x.splice(-2,-1); @@ -36,5 +36,4 @@ if (x[0] !== 0) { //CHECK#4 if (x[1] !== 1) { $ERROR('#4: var x = [0,1]; var arr = x.splice(-2,-1); x[1] === 1. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T2.js index c8dfd41098..aaa63c5926 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T2.js - * @description -length < start = deleteCount < 0, itemCount = 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.2_T2 +description: -length < start = deleteCount < 0, itemCount = 0 +---*/ var x = [0,1]; var arr = x.splice(-1,-1); @@ -36,5 +36,4 @@ if (x[0] !== 0) { //CHECK#4 if (x[1] !== 1) { $ERROR('#4: var x = [0,1]; var arr = x.splice(-1,-1); x[1] === 1. Actual: ' + (x[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T3.js index c79725d484..9daad3bd86 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T3.js - * @description -length = start < deleteCount < 0, itemCount > 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.2_T3 +description: -length = start < deleteCount < 0, itemCount > 0 +---*/ var x = [0,1]; var arr = x.splice(-2,-1,2,3); @@ -46,5 +46,4 @@ if (x[2] !== 0) { //CHECK#6 if (x[3] !== 1) { $ERROR('#6: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[3] === 1. Actual: ' + (x[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T4.js index af66e8da6b..3ffe580936 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T4.js - * @description -length < start = deleteCount < 0, itemCount > 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.2_T4 +description: -length < start = deleteCount < 0, itemCount > 0 +---*/ var x = [0,1]; var arr = x.splice(-1,-1,2,3); @@ -46,5 +46,4 @@ if (x[2] !== 3) { //CHECK#6 if (x[3] !== 1) { $ERROR('#6: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[3] === 1. Actual: ' + (x[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T5.js index 5b78dee45c..45ce48a505 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.2_T5.js - * @description start < -length < deleteCount < 0, itemCount > 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.2_T5 +description: start < -length < deleteCount < 0, itemCount > 0 +---*/ var x = [0,1]; var arr = x.splice(-3,-1,2,3); @@ -46,5 +46,4 @@ if (x[2] !== 0) { //CHECK#6 if (x[3] !== 1) { $ERROR('#6: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[3] === 1. Actual: ' + (x[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T1.js index bd66019f72..9dbced30cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T1.js - * @description -length < deleteCount < start = 0, itemCount = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.3_T1 +description: -length < deleteCount < start = 0, itemCount = 0 +---*/ var x = [0,1]; var arr = x.splice(0,-1); @@ -37,4 +37,3 @@ if (x[0] !== 0) { if (x[1] !== 1) { $ERROR('#4: var x = [0,1]; var arr = x.splice(0,-1); x[1] === 1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T2.js index ba563cdddb..0cf8fd473f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T2.js - * @description -length = -start < deleteCount < 0, itemCount = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.3_T2 +description: -length = -start < deleteCount < 0, itemCount = 0 +---*/ var x = [0,1]; var arr = x.splice(2,-1); @@ -37,4 +37,3 @@ if (x[0] !== 0) { if (x[1] !== 1) { $ERROR('#4: var x = [0,1]; var arr = x.splice(2,-1); x[1] === 1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T3.js index 9171acf7e4..0cafe6e31d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T3.js - * @description -length < deleteCount < start = 0, itemCount > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.3_T3 +description: -length < deleteCount < start = 0, itemCount > 0 +---*/ var x = [0,1]; var arr = x.splice(0,-1,2,3); @@ -47,4 +47,3 @@ if (x[2] !== 0) { if (x[3] !== 1) { $ERROR('#6: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[3] === 1. Actual: ' + (x[3])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T4.js index d51559feb7..2a42f10f33 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T4.js - * @description -length = -start < deleteCount < 0, itemCount > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.3_T4 +description: -length = -start < deleteCount < 0, itemCount > 0 +---*/ var x = [0,1]; var arr = x.splice(2,-1,2,3); @@ -47,4 +47,3 @@ if (x[2] !== 2) { if (x[3] !== 3) { $ERROR('#6: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[3] === 3. Actual: ' + (x[3])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T5.js index 747f1472fd..ff9c6b6b14 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If deleteCount is negative, use 0 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.3_T5.js - * @description -start < -length < deleteCount < 0, itemCount > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If deleteCount is negative, use 0 +es5id: 15.4.4.12_A1.3_T5 +description: -start < -length < deleteCount < 0, itemCount > 0 +---*/ var x = [0,1]; var arr = x.splice(3,-1,2,3); @@ -47,4 +47,3 @@ if (x[2] !== 2) { if (x[3] !== 3) { $ERROR('#6: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[3] === 3. Actual: ' + (x[3])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T1.js index 0d2902b715..2c3a3cb276 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T1.js - * @description length = -start > deleteCount > 0, itemCount = 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.4_T1 +description: length = -start > deleteCount > 0, itemCount = 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(-4,3); @@ -46,5 +46,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-4,3); x[0] === 3. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T2.js index be94553db6..f8b7530dba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T2.js - * @description length = -start > deleteCount > 0, itemCount > 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.4_T2 +description: length = -start > deleteCount > 0, itemCount > 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); @@ -56,5 +56,4 @@ if (x[1] !== 5) { //CHECK#9 if (x[2] !== 3) { $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[2] === 3. Actual: ' + (x[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T3.js index 9aee37d7fa..a7b825f837 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T3.js - * @description -start > length = deleteCount > 0, itemCount = 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.4_T3 +description: -start > length = deleteCount > 0, itemCount = 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(-5,4); @@ -46,5 +46,4 @@ if (arr[3] !== 3) { //CHECK#7 if (x.length !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-5,4); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T4.js index d5605307d8..007b494b93 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T4.js - * @description length > -start = deleteCount > 0, itemCount > 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.4_T4 +description: length > -start = deleteCount > 0, itemCount > 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); @@ -56,5 +56,4 @@ if (x[1] !== 4) { //CHECK#9 if (x[2] !== 5) { $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[2] === 5. Actual: ' + (x[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T5.js index cf5bd46cd5..f4f50d376e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T5.js - * @description -start > deleteCount > length > 0, itemCount = 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.4_T5 +description: -start > deleteCount > length > 0, itemCount = 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(-9,5); @@ -46,5 +46,4 @@ if (arr[3] !== 3) { //CHECK#7 if (x.length !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-9,5); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T6.js index ec84cd9de5..6fb7238b72 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.4_T6.js - * @description length = deleteCount > -start > 0, itemCount > 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If deleteCount is positive, use min(deleteCount, length - start) +es5id: 15.4.4.12_A1.4_T6 +description: length = deleteCount > -start > 0, itemCount > 0 +---*/ var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); @@ -56,5 +56,4 @@ if (x[1] !== 4) { //CHECK#9 if (x[2] !== 5) { $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[2] === 5. Actual: ' + (x[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T1.js index f86b12a1f2..c343664ecd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Splice with undefined arguments - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T1.js - * @description start === undefined, end === undefined - */ +/*--- +info: Splice with undefined arguments +es5id: 15.4.4.12_A1.5_T1 +description: start === undefined, end === undefined +---*/ var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); @@ -46,4 +45,3 @@ if (x[2] !== 2) { if (x[3] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[3] === 3. Actual: ' + (x[3])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T2.js index 2d7ae20ab8..dfac56d559 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Splice with undefined arguments - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A1.5_T2.js - * @description end === undefined - */ +/*--- +info: Splice with undefined arguments +es5id: 15.4.4.12_A1.5_T2 +description: end === undefined +---*/ var x = [0,1,2,3]; var arr = x.splice(1,undefined); @@ -45,5 +44,4 @@ if (x[2] !== 2) { //CHECK#7 if (x[3] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[3] === 3. Actual: ' + (x[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T1.js index cd82bdfbfa..5f055e3d96 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T1.js - * @description start is not integer - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.12_A2.1_T1 +description: start is not integer +---*/ var x = [0,1,2,3]; var arr = x.splice(1.5,3); @@ -45,5 +44,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1.5,3); x[0] === 0. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T2.js index cf448affad..e8062156e0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T2.js - * @description start = NaN - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.12_A2.1_T2 +description: start = NaN +---*/ var x = [0,1,2,3]; var arr = x.splice(NaN,3); @@ -45,5 +44,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(NaN,3); x[0] === 3. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T3.js index 0a797623f0..c76d1d6c5c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T3.js - * @description start = Infinity - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.12_A2.1_T3 +description: start = Infinity +---*/ var x = [0,1,2,3]; var arr = x.splice(Number.POSITIVE_INFINITY,3); @@ -40,5 +39,4 @@ if (x[2] !== 2) { //CHECK#6 if (x[3] !== 3) { $ERROR('#6: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[3] === 3. Actual: ' + (x[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T4.js index cb0f5fc5aa..e90b0815d6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T4.js - * @description start = -Infinity - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.12_A2.1_T4 +description: start = -Infinity +---*/ var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); @@ -45,5 +44,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); x[0] === 3. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T5.js index 61a93ccff7..0103c83aa4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.1_T5.js - * @description ToInteger use ToNumber - */ +/*--- +info: Operator use ToInteger from start +es5id: 15.4.4.12_A2.1_T5 +description: ToInteger use ToNumber +---*/ var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); @@ -46,4 +45,3 @@ if (x.length !== 1) { if (x[0] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); x[0] === 3. Actual: ' + (x[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T1.js index 7bf393e855..d24f599b18 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from deleteCount - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T1.js - * @description deleteCount is not integer - */ +/*--- +info: Operator use ToInteger from deleteCount +es5id: 15.4.4.12_A2.2_T1 +description: deleteCount is not integer +---*/ var x = [0,1,2,3]; var arr = x.splice(1,3.5); @@ -45,5 +44,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1,3.5); x[0] === 0. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T2.js index 51250571e5..7e7aea1da3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from deleteCount - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T2.js - * @description deleteCount = NaN - */ +/*--- +info: Operator use ToInteger from deleteCount +es5id: 15.4.4.12_A2.2_T2 +description: deleteCount = NaN +---*/ var x = [0,1]; var arr = x.splice(0,NaN); @@ -36,4 +35,3 @@ if (x[0] !== 0) { if (x[1] !== 1) { $ERROR('#4: var x = [0,1]; var arr = x.splice(0,NaN); x[1] === 1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T3.js index ebbe0c6056..dcb3d2281d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from deleteCount - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T3.js - * @description deleteCount = Infinity - */ +/*--- +info: Operator use ToInteger from deleteCount +es5id: 15.4.4.12_A2.2_T3 +description: deleteCount = Infinity +---*/ var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); @@ -45,5 +44,4 @@ if (arr[3] !== 3) { //CHECK#7 if (x.length !== 0) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T4.js index fdac7ca533..d53cae68af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from deleteCount - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T4.js - * @description deleteCount = -Infinity - */ +/*--- +info: Operator use ToInteger from deleteCount +es5id: 15.4.4.12_A2.2_T4 +description: deleteCount = -Infinity +---*/ var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); @@ -36,4 +35,3 @@ if (x[0] !== 0) { if (x[1] !== 1) { $ERROR('#4: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x[1] === 1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T5.js index ad988fd2e7..41c4815642 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from deleteCount - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2.2_T5.js - * @description ToInteger use ToNumber - */ +/*--- +info: Operator use ToInteger from deleteCount +es5id: 15.4.4.12_A2.2_T5 +description: ToInteger use ToNumber +---*/ var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); @@ -45,5 +44,4 @@ if (x.length !== 1) { //CHECK#7 if (x[0] !== 3) { $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); x[0] === 3. Actual: ' + (x[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T1.js index 24af0b05e6..44d672a988 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T1.js - * @description If start is positive, use min(start, length). - * If deleteCount is positive, use min(deleteCount, length - start) - */ +/*--- +info: > + The splice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.12_A2_T1 +description: > + If start is positive, use min(start, length). If deleteCount is + positive, use min(deleteCount, length - start) +---*/ var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; @@ -65,4 +66,3 @@ if (obj[2] !== 3) { if (obj[3] !== undefined) { $ERROR('#10: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[3] === undefined. Actual: ' + (obj[3])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T2.js index 8201da5b9b..8d4a9eb8bf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T2.js - * @description If start is negative, use max(start + length, 0). - * If deleteCount is negative, use 0 - */ +/*--- +info: > + The splice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.12_A2_T2 +description: > + If start is negative, use max(start + length, 0). If deleteCount + is negative, use 0 +---*/ var obj = {0:0,1:1}; obj.length = 2; @@ -54,5 +55,4 @@ if (obj[3] !== 1) { //CHECK#7 if (obj[4] !== undefined) { $ERROR('#7: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[4] === undefined. Actual: ' + (obj[4])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T3.js index 69cd2f3958..cb07f339a1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T3.js - * @description If start is positive, use min(start, length). - * If deleteCount is negative, use 0 - */ +/*--- +info: > + The splice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.12_A2_T3 +description: > + If start is positive, use min(start, length). If deleteCount is + negative, use 0 +---*/ var obj = {0:0,1:1}; obj.length = 2; @@ -54,5 +55,4 @@ if (obj[3] !== 1) { //CHECK#7 if (obj[4] !== undefined) { $ERROR('#7: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[4] === undefined. Actual: ' + (obj[4])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T4.js index 38d037d1e2..a37077ed38 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A2_T4.js - * @description If start is negative, use max(start + length, 0). - * If deleteCount is positive, use min(deleteCount, length - start) - */ +/*--- +info: > + The splice function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.12_A2_T4 +description: > + If start is negative, use max(start + length, 0). If deleteCount + is positive, use min(deleteCount, length - start) +---*/ var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; @@ -65,4 +66,3 @@ if (obj[2] !== 3) { if (obj[3] !== undefined) { $ERROR('#10: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[3] === undefined. Actual: ' + (obj[3])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T1.js index a6645085fc..eedc9fddc6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T1.js - * @description length is arbitrarily - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.12_A3_T1 +description: length is arbitrarily +---*/ var obj = {}; obj.splice = Array.prototype.splice; @@ -33,5 +32,4 @@ if (obj[0] !== "x") { //CHECK#4 if (obj[4294967295] !== "y") { $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[4294967295] === "y". Actual: ' + (obj[4294967295])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T2.js index 15893b8375..7d30b3b0ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T2.js - * @description length is arbitrarily - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.12_A3_T2 +description: length is arbitrarily +---*/ var obj = {}; obj.splice = Array.prototype.splice; @@ -32,5 +31,4 @@ if (obj.length !== 0) { //CHECK#4 if (obj[0] !== undefined) { $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[0] = "y"; obj.length = 1; var arr = obj.splice(0,1); obj[0] === undefined. Actual: ' + (obj[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T3.js index 5c0dce77d1..11d1daa206 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T3.js - * @description length is arbitrarily - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.12_A3_T3 +description: length is arbitrarily +---*/ var obj = {}; obj.splice = Array.prototype.splice; @@ -32,5 +31,4 @@ if (obj.length !== 4294967294) { //CHECK#4 if (obj[4294967294] !== undefined) { $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj[4294967294] === undefined. Actual: ' + (obj[4294967294])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T1.js index ec2fb89370..a6736f48da 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.12_A4_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = -1; var x = [0,1]; @@ -78,4 +79,3 @@ if (x[0] !== 0) { if (x[1] !== -1) { $ERROR('#12: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x[1] === -1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T2.js index 3096402c32..2a4e1c9c56 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T2.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.12_A4_T2 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = -1; var x = [0,1]; @@ -78,4 +79,3 @@ if (x[0] !== 0) { if (x[1] !== 2) { $ERROR('#12: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x[1] === 2. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T3.js index 381d3ce761..49424acf81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A4_T3.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.12_A4_T3 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[0] = -1; var x = []; @@ -72,4 +73,3 @@ if (x.length !== 0) { if (x[0] !== -1) { $ERROR('#10: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); x[0] === -1. Actual: ' + (x[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.1.js index d3db326da4..21bb149a16 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of splice has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of splice has the attribute DontEnum +es5id: 15.4.4.12_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.splice.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.splice){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.splice) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js index 4730b6a4ba..d9247a03cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of splice has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of splice has the attribute DontDelete +es5id: 15.4.4.12_A5.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.splice.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.splice.hasOwnProperty('length') !== true) { if (Array.prototype.splice.length === undefined) { $ERROR('#3: delete Array.prototype.splice.length; Array.prototype.splice.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.3.js index a5d06d59d2..75f002ea06 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of splice has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of splice has the attribute ReadOnly +es5id: 15.4.4.12_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.splice.length; @@ -15,5 +14,3 @@ Array.prototype.splice.length = Infinity; if (Array.prototype.splice.length !== x) { $ERROR('#1: x = Array.prototype.splice.length; Array.prototype.splice.length = Infinity; Array.prototype.splice.length === x. Actual: ' + (Array.prototype.splice.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.4.js index b71c37c109..43cccec64b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of splice is 2 - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.4.js - * @description splice.length === 1 - */ +/*--- +info: The length property of splice is 2 +es5id: 15.4.4.12_A5.4 +description: splice.length === 1 +---*/ //CHECK#1 if (Array.prototype.splice.length !== 2) { $ERROR('#1: Array.prototype.splice.length === 2. Actual: ' + (Array.prototype.splice.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.5.js index e2276b47a6..8249396400 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The splice property of Array has the attribute DontEnum +es5id: 15.4.4.12_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('splice') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "splice") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.6.js index 621b83307f..ba2034ba63 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.6.js - * @description Checking Array.prototype.splice.prototype - */ +/*--- +info: The splice property of Array has not prototype property +es5id: 15.4.4.12_A5.6 +description: Checking Array.prototype.splice.prototype +---*/ //CHECK#1 if (Array.prototype.splice.prototype !== undefined) { $ERROR('#1: Array.prototype.splice.prototype === undefined. Actual: ' + (Array.prototype.splice.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.7.js index 28344c811c..bd4084b05d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The splice property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The splice property of Array can't be used as constructor +es5id: 15.4.4.12_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.splice() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T1.js index 01fe026bd8..103966de88 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The arguments are prepended to the start of the array, such that - * their order within the array is the same as the order in which they appear in - * the argument list - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T1.js - * @description Checking case when unsift is given no arguments or one argument - */ +/*--- +info: > + The arguments are prepended to the start of the array, such that + their order within the array is the same as the order in which they appear in + the argument list +es5id: 15.4.4.13_A1_T1 +description: Checking case when unsift is given no arguments or one argument +---*/ //CHECK#1 var x = new Array(); @@ -52,5 +52,4 @@ if (x[1] !== 1) { //CHECK#8 if (x.length !== 2) { $ERROR('#8: x = new Array(); x.unshift(1); x.unshift(); x.unshift(-1); x.length === 2. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T2.js index 55be061ccc..30afd3e972 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The arguments are prepended to the start of the array, such that - * their order within the array is the same as the order in which they appear in - * the argument list - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A1_T2.js - * @description Checking case when unsift is given many arguments - */ +/*--- +info: > + The arguments are prepended to the start of the array, such that + their order within the array is the same as the order in which they appear in + the argument list +es5id: 15.4.4.13_A1_T2 +description: Checking case when unsift is given many arguments +---*/ //CHECK#1 var x = []; @@ -57,4 +57,3 @@ if (x[4] !== -1) { if (x.length !== 6) { $ERROR('#9: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x.length === 6. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T1.js index 50d180ba22..f10dcfa7f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T1.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The unshift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T1.js - * @description The arguments are prepended to the start of the array, such that - * their order within the array is the same as the order in which they appear in - * the argument list - */ +/*--- +info: > + The unshift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.13_A2_T1 +description: > + The arguments are prepended to the start of the array, such that + their order within the array is the same as the order in which + they appear in the argument list +---*/ var obj = {}; obj.unshift = Array.prototype.unshift; @@ -65,4 +66,3 @@ if (obj.length !== 1) { if (obj["0"] !== -7) { $ERROR('#9: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj["0"] === -7. Actual: ' + (obj["0"])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T2.js index c5850c6d8b..69724423ab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The unshift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T2.js - * @description The arguments are prepended to the start of the array, such that - * their order within the array is the same as the order in which they appear in - * the argument list - */ +/*--- +info: > + The unshift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.13_A2_T2 +description: > + The arguments are prepended to the start of the array, such that + their order within the array is the same as the order in which + they appear in the argument list +---*/ var obj = {}; obj.unshift = Array.prototype.unshift; @@ -114,5 +115,4 @@ if (obj.length !== 1) { //CHECK#18 if (obj["0"] !== -16) { $ERROR('#18: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16); obj["0"] === -16. Actual: ' + (obj["0"])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T3.js index fe31fcc583..35d7b56f35 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The unshift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A2_T3.js - * @description Operator use ToNumber from length. - * If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: > + The unshift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.13_A2_T3 +description: > + Operator use ToNumber from length. If Type(value) is Object, + evaluate ToPrimitive(value, Number) +---*/ var obj = {}; obj.unshift = Array.prototype.unshift; @@ -89,4 +90,3 @@ catch (e) { $ERROR('#8.2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.unshift() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T1.js index 579b45ce88..4878af2fca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.13_A3_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.unshift = Array.prototype.unshift; @@ -51,5 +50,4 @@ if (unshift !== 0) { //CHECK#7 if (obj.length !== 0) { $ERROR('#7: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(); obj.length === 0. Actual: ' + (obj.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T2.js index 4fd6cbfa48..9aacd01148 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T2.js - * @description length = -4294967295 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.13_A3_T2 +description: length = -4294967295 +---*/ var obj = {}; obj.unshift = Array.prototype.unshift; @@ -42,5 +41,4 @@ if (obj[2] !== "z") { //CHECK#6 if (obj[3] !== "") { $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[3] === "". Actual: ' + (obj[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T3.js index 226d341621..4faa900c52 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T3.js - * @description length = 4294967297 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.13_A3_T3 +description: length = 4294967297 +---*/ var obj = {}; obj.unshift = Array.prototype.unshift; @@ -42,5 +41,4 @@ if (obj[2] !== "z") { //CHECK#6 if (obj[3] !== "") { $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = 4294967297; obj.unshift("x", "y", "z"); obj[3] === "". Actual: ' + (obj[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T1.js index 964e95ca9d..be74c1b3f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.13_A4_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[0] = -1; x = [1]; @@ -73,4 +74,3 @@ delete x.length; if (x.length !== 1) { $ERROR('#10: Object.prototype[1] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); delete x; x.length === 1. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T2.js index 1bdd2d4a02..81bede5c94 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A4_T2.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.13_A4_T2 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[0] = 1; var x = []; @@ -73,4 +74,3 @@ delete x.length; if (x.length !== 1) { $ERROR('#10: Object.prototype[1] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); delete x; x.length === 1. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.1.js index d7fbf1619f..fdb530687f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of unshift has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of unshift has the attribute DontEnum +es5id: 15.4.4.13_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.unshift.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.unshift){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.unshift) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.2.js index 372ffd37db..db99253442 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of unshift has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of unshift has the attribute DontDelete +es5id: 15.4.4.13_A5.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.unshift.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.unshift.hasOwnProperty('length') !== true) { if (Array.prototype.unshift.length === undefined) { $ERROR('#3: delete Array.prototype.unshift.length; Array.prototype.unshift.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.3.js index 85ea8a162c..dcc17cc0ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of unshift has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of unshift has the attribute ReadOnly +es5id: 15.4.4.13_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.unshift.length; @@ -15,5 +14,3 @@ Array.prototype.unshift.length = Infinity; if (Array.prototype.unshift.length !== x) { $ERROR('#1: x = Array.prototype.unshift.length; Array.prototype.unshift.length = Infinity; Array.prototype.unshift.length === x. Actual: ' + (Array.prototype.unshift.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.4.js index 68e1e48ee2..6fd20772b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of unshift is 1 - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.4.js - * @description unshift.length === 1 - */ +/*--- +info: The length property of unshift is 1 +es5id: 15.4.4.13_A5.4 +description: unshift.length === 1 +---*/ //CHECK#1 if (Array.prototype.unshift.length !== 1) { $ERROR('#1: Array.prototype.unshift.length === 1. Actual: ' + (Array.prototype.unshift.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.5.js index d19b56b83f..f1897540a5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The unshift property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The unshift property of Array has the attribute DontEnum +es5id: 15.4.4.13_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('unshift') !== false) { @@ -24,4 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "unshift") result = false; } result === true;'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.6.js index ae279b38b5..086b283df1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The unshift property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.6.js - * @description Checking Array.prototype.unshift.prototype - */ +/*--- +info: The unshift property of Array has not prototype property +es5id: 15.4.4.13_A5.6 +description: Checking Array.prototype.unshift.prototype +---*/ //CHECK#1 if (Array.prototype.unshift.prototype !== undefined) { $ERROR('#1: Array.prototype.unshift.prototype === undefined. Actual: ' + (Array.prototype.unshift.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.7.js index 9baa5cffba..7f191b2f5b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The unshift property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The unshift property of Array can't be used as constructor +es5id: 15.4.4.13_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.unshift() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js index 4aecf8981a..be408968d6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js - * @description Array.prototype.indexOf must exist as a function - */ - - -function testcase() { - var f = Array.prototype.indexOf; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-0-1 +description: Array.prototype.indexOf must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.indexOf; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js index 15b39cac03..c50f5009a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js - * @description Array.prototype.indexOf has a length property whose value is 1. - */ - - -function testcase() { - if (Array.prototype.indexOf.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-0-2 +description: Array.prototype.indexOf has a length property whose value is 1. +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.indexOf.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js index 1e7a5a270d..7d2bc83a66 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js - * @description Array.prototype.indexOf applied to undefined throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.indexOf.call(undefined); - return false; - } - catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-1 +description: Array.prototype.indexOf applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.indexOf.call(undefined); + return false; + } + catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js index c39c62c64f..49ce20bbb0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js - * @description Array.prototype.indexOf applied to the Math object - */ - - -function testcase() { - try { - Math[1] = true; - Math.length = 2; - return Array.prototype.indexOf.call(Math, true) === 1; - } finally { - delete Math[1]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-10 +description: Array.prototype.indexOf applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Math[1] = true; + Math.length = 2; + return Array.prototype.indexOf.call(Math, true) === 1; + } finally { + delete Math[1]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js index 8b74af87c1..f2927190b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js - * @description Array.prototype.indexOf applied to Date object - */ - - -function testcase() { - - var obj = new Date(); - obj.length = 2; - obj[1] = true; - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-11 +description: Array.prototype.indexOf applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Date(); + obj.length = 2; + obj[1] = true; + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js index c619cc3512..0d39457421 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js - * @description Array.prototype.indexOf applied to RegExp object - */ - - -function testcase() { - - var obj = new RegExp(); - obj.length = 2; - obj[1] = true; - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-12 +description: Array.prototype.indexOf applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new RegExp(); + obj.length = 2; + obj[1] = true; + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js index 8e9797dc2d..2d060f078d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js - * @description Array.prototype.indexOf applied to the JSON object - */ - - -function testcase() { - var targetObj = {}; - try { - JSON[3] = targetObj; - JSON.length = 5; - return Array.prototype.indexOf.call(JSON, targetObj) === 3; - } finally { - delete JSON[3]; - delete JSON.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-13 +description: Array.prototype.indexOf applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + try { + JSON[3] = targetObj; + JSON.length = 5; + return Array.prototype.indexOf.call(JSON, targetObj) === 3; + } finally { + delete JSON[3]; + delete JSON.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js index bcd7cd3de4..daae58e426 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js - * @description Array.prototype.indexOf applied to Error object - */ - - -function testcase() { - - var obj = new SyntaxError(); - obj[1] = true; - obj.length = 2; - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-14 +description: Array.prototype.indexOf applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new SyntaxError(); + obj[1] = true; + obj.length = 2; + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js index 11926dffc3..57162affd2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js - * @description Array.prototype.indexOf applied to Arguments object - */ - - -function testcase() { - - function fun() { - return arguments; - } - var obj = fun(1, true, 3); - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-15 +description: Array.prototype.indexOf applied to Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function fun() { + return arguments; + } + var obj = fun(1, true, 3); + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-17.js index a66609cd78..a69074d60c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-17.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-17.js - * @description Array.prototype.indexOf applied to the global object - */ - - -function testcase() { - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[1] = true; - fnGlobalObject().length = 2; - return Array.prototype.indexOf.call(fnGlobalObject(), true) === 1; - } finally { - delete fnGlobalObject()[1]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-17 +description: Array.prototype.indexOf applied to the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[1] = true; + fnGlobalObject().length = 2; + return Array.prototype.indexOf.call(fnGlobalObject(), true) === 1; + } finally { + delete fnGlobalObject()[1]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js index 944ef47d05..37f338f59e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js - * @description Array.prototype.indexOf applied to null throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.indexOf.call(null); - return false; - } - catch (e) { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-2 +description: Array.prototype.indexOf applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.indexOf.call(null); + return false; + } + catch (e) { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js index 45077ae0e4..07bffcf4d7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js - * @description Array.prototype.indexOf applied to boolean primitive - */ - - -function testcase() { - var targetObj = {}; - try { - Boolean.prototype[1] = targetObj; - Boolean.prototype.length = 2; - - return Array.prototype.indexOf.call(true, targetObj) === 1; - } finally { - delete Boolean.prototype[1]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-3 +description: Array.prototype.indexOf applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + try { + Boolean.prototype[1] = targetObj; + Boolean.prototype.length = 2; + + return Array.prototype.indexOf.call(true, targetObj) === 1; + } finally { + delete Boolean.prototype[1]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js index a91e92170b..611bb56f4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js - * @description Array.prototype.indexOf applied to Boolean Object - */ - - -function testcase() { - - var obj = new Boolean(false); - obj.length = 2; - obj[1] = true; - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-4 +description: Array.prototype.indexOf applied to Boolean Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Boolean(false); + obj.length = 2; + obj[1] = true; + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js index 1be433cc42..67e5dfb594 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js - * @description Array.prototype.indexOf applied to number primitive - */ - - -function testcase() { - var targetObj = {}; - try { - Number.prototype[1] = targetObj; - Number.prototype.length = 2; - - return Array.prototype.indexOf.call(5, targetObj) === 1; - } finally { - delete Number.prototype[1]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-5 +description: Array.prototype.indexOf applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + try { + Number.prototype[1] = targetObj; + Number.prototype.length = 2; + + return Array.prototype.indexOf.call(5, targetObj) === 1; + } finally { + delete Number.prototype[1]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js index 988a3fc52d..cca839a5ca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js - * @description Array.prototype.indexOf applied to Number object - */ - - -function testcase() { - - var obj = new Number(-3); - obj.length = 2; - obj[1] = true; - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-6 +description: Array.prototype.indexOf applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Number(-3); + obj.length = 2; + obj[1] = true; + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js index 928309c729..63608bbece 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js - * @description Array.prototype.indexOf applied to string primitive - */ - - -function testcase() { - - return Array.prototype.indexOf.call("abc", "b") === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-7 +description: Array.prototype.indexOf applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + return Array.prototype.indexOf.call("abc", "b") === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js index de9cf17aa8..f55086918d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js - * @description Array.prototype.indexOf applied to String object - */ - - -function testcase() { - - var obj = new String("null"); - - return Array.prototype.indexOf.call(obj, 'l') === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-8 +description: Array.prototype.indexOf applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new String("null"); + + return Array.prototype.indexOf.call(obj, 'l') === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js index f0acdce256..4ea15d8469 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js - * @description Array.prototype.indexOf applied to Function object - */ - - -function testcase() { - - var obj = function (a, b) { - return a + b; - }; - obj[1] = true; - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-1-9 +description: Array.prototype.indexOf applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function (a, b) { + return a + b; + }; + obj[1] = true; + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js index 80519f0e60..de58abfdef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js - * @description Array.prototype.indexOf returns -1 for elements not present in array - */ - - -function testcase() { - var a = new Array(); - a[100] = 1; - a[99999] = ""; - a[10] = new Object(); - a[5555] = 5.5; - a[123456] = "str"; - a[5] = 1E+309; - if (a.indexOf(1) !== 100 || - a.indexOf("") !== 99999 || - a.indexOf("str") !== 123456 || - a.indexOf(1E+309) !== 5 || //Infinity - a.indexOf(5.5) !== 5555 ) - { - return false; - } - if (a.indexOf(true) === -1 && - a.indexOf(5) === -1 && - a.indexOf("str1") === -1 && - a.indexOf(null) === -1 && - a.indexOf(new Object()) === -1) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-10-1 +description: > + Array.prototype.indexOf returns -1 for elements not present in + array +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(); + a[100] = 1; + a[99999] = ""; + a[10] = new Object(); + a[5555] = 5.5; + a[123456] = "str"; + a[5] = 1E+309; + if (a.indexOf(1) !== 100 || + a.indexOf("") !== 99999 || + a.indexOf("str") !== 123456 || + a.indexOf(1E+309) !== 5 || //Infinity + a.indexOf(5.5) !== 5555 ) + { + return false; + } + if (a.indexOf(true) === -1 && + a.indexOf(5) === -1 && + a.indexOf("str1") === -1 && + a.indexOf(null) === -1 && + a.indexOf(new Object()) === -1) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-2.js index 841814c92d..c688afb8c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-2.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 and does not access any other properties - */ - - -function testcase() { - var accessed = false; - var f = {length: 0}; - Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); - - - var i = Array.prototype.indexOf.call(f,1); - - if (i === -1 && accessed==false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-10-2 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 and does not + access any other properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var f = {length: 0}; + Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); + + + var i = Array.prototype.indexOf.call(f,1); + + if (i === -1 && accessed==false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js index 9c93172ce4..d8668f742b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js - * @description Array.prototype.indexOf - 'length' is own data property on an Array-like object - */ - - -function testcase() { - var objOne = { 1: true, length: 2 }; - var objTwo = { 2: true, length: 2 }; - return Array.prototype.indexOf.call(objOne, true) === 1 && - Array.prototype.indexOf.call(objTwo, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-1 +description: > + Array.prototype.indexOf - 'length' is own data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var objOne = { 1: true, length: 2 }; + var objTwo = { 2: true, length: 2 }; + return Array.prototype.indexOf.call(objOne, true) === 1 && + Array.prototype.indexOf.call(objTwo, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js index f6632c7d6a..115863586c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js - * @description Array.prototype.indexOf - 'length' is inherited accessor property - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var childOne = new Con(); - childOne[1] = true; - var childTwo = new Con(); - childTwo[2] = true; - - return Array.prototype.indexOf.call(childOne, true) === 1 && - Array.prototype.indexOf.call(childTwo, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-10 +description: Array.prototype.indexOf - 'length' is inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var childOne = new Con(); + childOne[1] = true; + var childTwo = new Con(); + childTwo[2] = true; + + return Array.prototype.indexOf.call(childOne, true) === 1 && + Array.prototype.indexOf.call(childTwo, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js index 6de1bd2af4..19cd825a0c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js - * @description Array.prototype.indexOf - 'length' is own accessor property without a get function - */ - - -function testcase() { - - var obj = { 1: true }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-11 +description: > + Array.prototype.indexOf - 'length' is own accessor property + without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: true }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.indexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js index 0755c25bd3..f4130f74a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js - * @description Array.prototype.indexOf - 'length' is own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 20; - }, - configurable: true - }); - - var obj = { 1: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.indexOf.call(obj, 1) === -1; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-12 +description: > + Array.prototype.indexOf - 'length' is own accessor property + without a get function that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 20; + }, + configurable: true + }); + + var obj = { 1: 1 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.indexOf.call(obj, 1) === -1; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js index fc0ea45e65..942c15daf2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js - * @description Array.prototype.indexOf - 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = true; - - return Array.prototype.indexOf.call(child, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-13 +description: > + Array.prototype.indexOf - 'length' is inherited accessor property + without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = true; + + return Array.prototype.indexOf.call(child, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js index 1da6bd1945..4defde7801 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js - * @description Array.prototype.indexOf - 'length' is undefined property - */ - - -function testcase() { - - var obj = { 0: true, 1: true }; - - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-14 +description: Array.prototype.indexOf - 'length' is undefined property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: true, 1: true }; + + return Array.prototype.indexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-15.js index f5df7954f4..053c01f69b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-15.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-15.js - * @description Array.prototype.indexOf - 'length' is property of the global object - */ - - -function testcase() { - var targetObj = {}; - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject().length = 2; - - fnGlobalObject()[1] = targetObj; - if (Array.prototype.indexOf.call(fnGlobalObject(), targetObj) !== 1) { - return false; - } - - fnGlobalObject()[1] = {}; - fnGlobalObject()[2] = targetObj; - - return Array.prototype.indexOf.call(fnGlobalObject(), targetObj) === -1; - } finally { - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-15 +description: Array.prototype.indexOf - 'length' is property of the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var targetObj = {}; + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject().length = 2; + + fnGlobalObject()[1] = targetObj; + if (Array.prototype.indexOf.call(fnGlobalObject(), targetObj) !== 1) { + return false; + } + + fnGlobalObject()[1] = {}; + fnGlobalObject()[2] = targetObj; + + return Array.prototype.indexOf.call(fnGlobalObject(), targetObj) === -1; + } finally { + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js index a20500339b..498376340b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js - * @description Array.prototype.indexOf applied to Arguments object which implements its own property get method - */ - - -function testcase() { - - var func = function (a, b) { - arguments[2] = false; - return Array.prototype.indexOf.call(arguments, true) === 1 && - Array.prototype.indexOf.call(arguments, false) === -1; - }; - - return func(0, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-17 +description: > + Array.prototype.indexOf applied to Arguments object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + arguments[2] = false; + return Array.prototype.indexOf.call(arguments, true) === 1 && + Array.prototype.indexOf.call(arguments, false) === -1; + }; + + return func(0, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js index 883d30cb41..f00663b075 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js - * @description Array.prototype.indexOf applied to String object, which implements its own property get method - */ - - -function testcase() { - var str = new String("012"); - try { - String.prototype[3] = "3"; - return Array.prototype.indexOf.call(str, "2") === 2 && - Array.prototype.indexOf.call(str, "3") === -1; - } finally { - delete String.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-18 +description: > + Array.prototype.indexOf applied to String object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = new String("012"); + try { + String.prototype[3] = "3"; + return Array.prototype.indexOf.call(str, "2") === 2 && + Array.prototype.indexOf.call(str, "3") === -1; + } finally { + delete String.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js index c874b88631..2cf040e46c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js - * @description Array.prototype.indexOf applied to Function object which implements its own property get method - */ - - -function testcase() { - - var obj = function (a, b) { - return a + b; - }; - obj[1] = "b"; - obj[2] = "c"; - - return Array.prototype.indexOf.call(obj, obj[1]) === 1 && - Array.prototype.indexOf.call(obj, obj[2]) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-19 +description: > + Array.prototype.indexOf applied to Function object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function (a, b) { + return a + b; + }; + obj[1] = "b"; + obj[2] = "c"; + + return Array.prototype.indexOf.call(obj, obj[1]) === 1 && + Array.prototype.indexOf.call(obj, obj[2]) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js index d14fff919c..961263a120 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js - * @description Array.prototype.indexOf - 'length' is own data property on an Array - */ - - -function testcase() { - var targetObj = {}; - try { - Array.prototype[2] = targetObj; - - return [0, targetObj].indexOf(targetObj) === 1 && - [0, 1].indexOf(targetObj) === -1; - - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-2 +description: Array.prototype.indexOf - 'length' is own data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + try { + Array.prototype[2] = targetObj; + + return [0, targetObj].indexOf(targetObj) === 1 && + [0, 1].indexOf(targetObj) === -1; + + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js index caf68f7713..b9bbcf9010 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js - * @description Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var proto = { length: 0 }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[1] = true; - - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-3 +description: > + Array.prototype.indexOf - 'length' is own data property that + overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { length: 0 }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[1] = true; + + return Array.prototype.indexOf.call(child, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js index 5f6e8dd38a..6639e12644 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js - * @description Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var targetObj = {}; - var arrProtoLen; - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - - return [0, targetObj].indexOf(targetObj) === 1; - - } finally { - - Array.prototype.length = arrProtoLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-4 +description: > + Array.prototype.indexOf - 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var targetObj = {}; + var arrProtoLen; + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + + return [0, targetObj].indexOf(targetObj) === 1; + + } finally { + + Array.prototype.length = arrProtoLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js index 3a9f693f62..58e42ad268 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js - * @description Array.prototype.indexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[1] = true; - - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-5 +description: > + Array.prototype.indexOf - 'length' is own data property that + overrides an inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[1] = true; + + return Array.prototype.indexOf.call(child, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js index 9261c7d691..2d1f710d53 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js - * @description Array.prototype.indexOf - 'length' is an inherited data property - */ - - -function testcase() { - var proto = { length: 2 }; - - var Con = function () {}; - Con.prototype = proto; - - var childOne = new Con(); - childOne[1] = true; - var childTwo = new Con(); - childTwo[2] = true; - - return Array.prototype.indexOf.call(childOne, true) === 1 && - Array.prototype.indexOf.call(childTwo, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-6 +description: Array.prototype.indexOf - 'length' is an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = { length: 2 }; + + var Con = function () {}; + Con.prototype = proto; + + var childOne = new Con(); + childOne[1] = true; + var childTwo = new Con(); + childTwo[2] = true; + + return Array.prototype.indexOf.call(childOne, true) === 1 && + Array.prototype.indexOf.call(childTwo, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js index 17ad5a70c5..2cda4b612c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js - * @description Array.prototype.indexOf - 'length' is own accessor property - */ - - -function testcase() { - var objOne = { 1: true }; - var objTwo = { 2: true }; - Object.defineProperty(objOne, "length", { - get: function () { - return 2; - }, - configurable: true - }); - Object.defineProperty(objTwo, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.indexOf.call(objOne, true) === 1 && - Array.prototype.indexOf.call(objTwo, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-7 +description: Array.prototype.indexOf - 'length' is own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var objOne = { 1: true }; + var objTwo = { 2: true }; + Object.defineProperty(objOne, "length", { + get: function () { + return 2; + }, + configurable: true + }); + Object.defineProperty(objTwo, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.indexOf.call(objOne, true) === 1 && + Array.prototype.indexOf.call(objTwo, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js index 697d50f16c..e76e7e0272 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js - * @description Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited data property - */ - - -function testcase() { - - var proto = { length: 0 }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = true; - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-8 +description: > + Array.prototype.indexOf - 'length' is own accessor property that + overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { length: 0 }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = true; + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.indexOf.call(child, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js index 5c56b328e3..58fc2e5b77 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js - * @description Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = true; - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-2-9 +description: > + Array.prototype.indexOf - 'length' is own accessor property that + overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = true; + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.indexOf.call(child, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js index b7f2e2d81f..45818879e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js - * @description Array.prototype.indexOf - value of 'length' is undefined - */ - - -function testcase() { - - var obj = { 0: 1, 1: 1, length: undefined }; - - return Array.prototype.indexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-1 +description: Array.prototype.indexOf - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 1, 1: 1, length: undefined }; + + return Array.prototype.indexOf.call(obj, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js index 65828b96c7..4512a3d476 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js - * @description Array.prototype.indexOf - value of 'length' is number primitive (value is NaN) - */ - - -function testcase() { - - var obj = { 0: 0, length: NaN }; - - return Array.prototype.indexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-10 +description: > + Array.prototype.indexOf - value of 'length' is number primitive + (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, length: NaN }; + + return Array.prototype.indexOf.call(obj, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js index 2203405391..1b1004af73 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js - * @description Array.prototype.indexOf - 'length' is a string containing a positive number - */ - - -function testcase() { - - var obj = { 1: 1, 2: 2, length: "2" }; - - return Array.prototype.indexOf.call(obj, 1) === 1 && - Array.prototype.indexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-11 +description: > + Array.prototype.indexOf - 'length' is a string containing a + positive number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: 1, 2: 2, length: "2" }; + + return Array.prototype.indexOf.call(obj, 1) === 1 && + Array.prototype.indexOf.call(obj, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js index 0315be5f28..d3579368da 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js - * @description Array.prototype.indexOf - 'length' is a string containing a negative number - */ - - -function testcase() { - - var obj = { 1: "true", 2: "2", length: "-4294967294" }; - - return Array.prototype.indexOf.call(obj, "true") === 1 && - Array.prototype.indexOf.call(obj, "2") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-12 +description: > + Array.prototype.indexOf - 'length' is a string containing a + negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: "true", 2: "2", length: "-4294967294" }; + + return Array.prototype.indexOf.call(obj, "true") === 1 && + Array.prototype.indexOf.call(obj, "2") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js index bdf22f0a4c..dcd5cb4983 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js - * @description Array.prototype.indexOf - 'length' is a string containing a decimal number - */ - - -function testcase() { - - var obj = { 199: true, 200: "200.59", length: "200.59" }; - - return Array.prototype.indexOf.call(obj, true) === 199 && - Array.prototype.indexOf.call(obj, "200.59") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-13 +description: > + Array.prototype.indexOf - 'length' is a string containing a + decimal number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 199: true, 200: "200.59", length: "200.59" }; + + return Array.prototype.indexOf.call(obj, true) === 199 && + Array.prototype.indexOf.call(obj, "200.59") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js index 14b89f5140..7d8fef351d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js - * @description Array.prototype.indexOf - 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var objOne = { 0: true, 1: true, length: "Infinity" }; - var objTwo = { 0: true, 1: true, length: "+Infinity" }; - var objThree = { 0: true, 1: true, length: "-Infinity" }; - - return Array.prototype.indexOf.call(objOne, true) === -1 && - Array.prototype.indexOf.call(objTwo, true) === -1 && - Array.prototype.indexOf.call(objThree, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-14 +description: > + Array.prototype.indexOf - 'length' is a string containing + +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objOne = { 0: true, 1: true, length: "Infinity" }; + var objTwo = { 0: true, 1: true, length: "+Infinity" }; + var objThree = { 0: true, 1: true, length: "-Infinity" }; + + return Array.prototype.indexOf.call(objOne, true) === -1 && + Array.prototype.indexOf.call(objTwo, true) === -1 && + Array.prototype.indexOf.call(objThree, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js index a5b0a8150d..e6932a85d7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js - * @description Array.prototype.indexOf - 'length' is a string containing an exponential number - */ - - -function testcase() { - - var obj = { 1: true, 2: "2E0", length: "2E0" }; - - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, "2E0") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-15 +description: > + Array.prototype.indexOf - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: true, 2: "2E0", length: "2E0" }; + + return Array.prototype.indexOf.call(obj, true) === 1 && + Array.prototype.indexOf.call(obj, "2E0") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js index 1922df6df3..50fec681e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js - * @description Array.prototype.indexOf - 'length' is a string containing a hex number - */ - - -function testcase() { - - var obj = { 10: true, 11: "0x00B", length: "0x00B" }; - - return Array.prototype.indexOf.call(obj, true) === 10 && - Array.prototype.indexOf.call(obj, "0x00B") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-16 +description: > + Array.prototype.indexOf - 'length' is a string containing a hex + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 10: true, 11: "0x00B", length: "0x00B" }; + + return Array.prototype.indexOf.call(obj, true) === 10 && + Array.prototype.indexOf.call(obj, "0x00B") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js index 3cda52758f..d88316318c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js - * @description Array.prototype.indexOf - 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - - var obj = { 1: true, 2: "0002.0", length: "0002.0" }; - - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, "0002.0") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-17 +description: > + Array.prototype.indexOf - 'length' is a string containing a number + with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: true, 2: "0002.0", length: "0002.0" }; + + return Array.prototype.indexOf.call(obj, true) === 1 && + Array.prototype.indexOf.call(obj, "0002.0") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js index d7d30b11ef..31e2bae259 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js - * @description Array.prototype.indexOf - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var obj = { 0: true, 100: true, length: "one" }; - - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-18 +description: > + Array.prototype.indexOf - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: true, 100: true, length: "one" }; + + return Array.prototype.indexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js index e09845de8e..7152856380 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js - * @description Array.prototype.indexOf - value of 'length' is an Object which has an own toString method. - */ - - -function testcase() { - - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - var obj = { - 1: true, - 2: 2, - - length: { - toString: function () { - return '2'; - } - } - }; - - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-19 +description: > + Array.prototype.indexOf - value of 'length' is an Object which has + an own toString method. +includes: [runTestCase.js] +---*/ + +function testcase() { + + // objects inherit the default valueOf() method from Object + // that simply returns itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + var obj = { + 1: true, + 2: 2, + + length: { + toString: function () { + return '2'; + } + } + }; + + return Array.prototype.indexOf.call(obj, true) === 1 && + Array.prototype.indexOf.call(obj, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js index a82ef2706e..1da2a4ab11 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js - * @description Array.prototype.indexOf return -1 when 'length' is a boolean (value is true) - */ - - -function testcase() { - var obj = { 0: 0, 1: 1, length: true }; - return Array.prototype.indexOf.call(obj, 0) === 0 && - Array.prototype.indexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-2 +description: > + Array.prototype.indexOf return -1 when 'length' is a boolean + (value is true) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 0: 0, 1: 1, length: true }; + return Array.prototype.indexOf.call(obj, 0) === 0 && + Array.prototype.indexOf.call(obj, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js index 8f70eb6a2e..af4464380c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js - * @description Array.prototype.indexOf - value of 'length' is an Object which has an own valueOf method. - */ - - -function testcase() { - - //valueOf method will be invoked first, since hint is Number - var obj = { - 1: true, - 2: 2, - length: { - valueOf: function () { - return 2; - } - } - }; - - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-20 +description: > + Array.prototype.indexOf - value of 'length' is an Object which has + an own valueOf method. +includes: [runTestCase.js] +---*/ + +function testcase() { + + //valueOf method will be invoked first, since hint is Number + var obj = { + 1: true, + 2: 2, + length: { + valueOf: function () { + return 2; + } + } + }; + + return Array.prototype.indexOf.call(obj, true) === 1 && + Array.prototype.indexOf.call(obj, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js index ceb8228116..cf0737007d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js - * @description Array.prototype.indexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var obj = { - 1: true, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; - - return Array.prototype.indexOf.call(obj, true) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-21 +description: > + Array.prototype.indexOf - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var obj = { + 1: true, + length: { + toString: function () { + toStringAccessed = true; + return '2'; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + }; + + return Array.prototype.indexOf.call(obj, true) === 1 && toStringAccessed && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js index 19c806f596..7e3d8fde96 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js - * @description Array.prototype.indexOf throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var obj = { - length: { - toString: function () { - toStringAccessed = true; - return {}; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; - - try { - Array.prototype.indexOf.call(obj); - return false; - } catch (e) { - return toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-22 +description: > + Array.prototype.indexOf throws TypeError exception when 'length' + is an object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var obj = { + length: { + toString: function () { + toStringAccessed = true; + return {}; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + }; + + try { + Array.prototype.indexOf.call(obj); + return false; + } catch (e) { + return toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js index 3bd5f57fbd..75ccc0a623 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js - * @description Array.prototype.indexOf uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; - - var obj = { - 1: true, - length: child - }; - - return Array.prototype.indexOf.call(obj, true) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-23 +description: > + Array.prototype.indexOf uses inherited valueOf method when + 'length' is an object with an own toString and inherited valueOf + methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child.toString = function () { + toStringAccessed = true; + return 2; + }; + + var obj = { + 1: true, + length: child + }; + + return Array.prototype.indexOf.call(obj, true) === 1 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js index eaf2794b1b..5a160ec58a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js - * @description Array.prototype.indexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally - - return Array.prototype.indexOf.call(obj, true) === 122 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-24 +description: > + Array.prototype.indexOf - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally + + return Array.prototype.indexOf.call(obj, true) === 122 && + Array.prototype.indexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js index 0c562a54ee..5b37a18966 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js - * @description Array.prototype.indexOf - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 2 finally - - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-25 +description: > + Array.prototype.indexOf - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 2 finally + + return Array.prototype.indexOf.call(obj, true) === 1 && + Array.prototype.indexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js index 8528a66fb1..7bc0b8b5b3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js - * @description Array.prototype.indexOf - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - var targetObj = {}; - var obj = { - 0: targetObj, - 4294967294: targetObj, - 4294967295: targetObj, - length: 4294967296 - }; - - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-28 +description: > + Array.prototype.indexOf - value of 'length' is boundary value + (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + var obj = { + 0: targetObj, + 4294967294: targetObj, + 4294967295: targetObj, + length: 4294967296 + }; + + return Array.prototype.indexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js index ddadd4d889..407655eb58 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js - * @description Array.prototype.indexOf - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - var targetObj = {}; - var obj = { - 0: targetObj, - 1: 4294967297, - length: 4294967297 - }; - - return Array.prototype.indexOf.call(obj, targetObj) === 0 && - Array.prototype.indexOf.call(obj, 4294967297) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-29 +description: > + Array.prototype.indexOf - value of 'length' is boundary value + (2^32 + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + var obj = { + 0: targetObj, + 1: 4294967297, + length: 4294967297 + }; + + return Array.prototype.indexOf.call(obj, targetObj) === 0 && + Array.prototype.indexOf.call(obj, 4294967297) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js index 8aa187847f..47c1619604 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var obj = { 0: true, length: 0 }; - - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-3 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: true, length: 0 }; + + return Array.prototype.indexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js index 75fcfc5a4a..d51e5e02e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var obj = { 0: true, length: +0 }; - - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-4 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: true, length: +0 }; + + return Array.prototype.indexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js index 04a795cb60..d83be33dd4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var obj = { 0: true, length: -0 }; - - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-5 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: true, length: -0 }; + + return Array.prototype.indexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js index af913fdb24..cb04c9a2eb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is positive) - */ - - -function testcase() { - - var obj = { 3: true, 4: false, length: 4 }; - - return Array.prototype.indexOf.call(obj, true) === 3 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-6 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 3: true, 4: false, length: 4 }; + + return Array.prototype.indexOf.call(obj, true) === 3 && + Array.prototype.indexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js index 7c170b67b9..045d80ae75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is negative) - */ - - -function testcase() { - - var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) }; - - return Array.prototype.indexOf.call(obj, true) === 4 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-7 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) }; + + return Array.prototype.indexOf.call(obj, true) === 4 && + Array.prototype.indexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js index 4eec4a6f59..9f9f16d9c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var obj = { 0: 0, length: Infinity }; - - return Array.prototype.indexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-8 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, length: Infinity }; + + return Array.prototype.indexOf.call(obj, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js index 49e652d9a6..8ff0487921 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js - * @description Array.prototype.indexOf - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var obj = { 0: 0, length: -Infinity }; - - return Array.prototype.indexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-3-9 +description: > + Array.prototype.indexOf - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, length: -Infinity }; + + return Array.prototype.indexOf.call(obj, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js index 4996ea8fbc..fab5362ca9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 (empty array) - */ - - -function testcase() { - var i = [].indexOf(42); - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-1 +description: Array.prototype.indexOf returns -1 if 'length' is 0 (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var i = [].indexOf(42); + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js index 1e70eaa9e6..5d4e4e6f99 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js - * @description Array.prototype.indexOf - 'length' is a number of value -6e-1 - */ - - -function testcase() { - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-10 +description: Array.prototype.indexOf - 'length' is a number of value -6e-1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = []; + var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; + return Array.prototype.indexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js index ea99de8bac..684ccc5729 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js - * @description Array.prototype.indexOf - 'length' is an empty string - */ - - -function testcase() { - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: "" }; - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-11 +description: Array.prototype.indexOf - 'length' is an empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = []; + var obj = { 0: targetObj, 100: targetObj, length: "" }; + return Array.prototype.indexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js index bed15ed817..2fc6f57e45 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion)) - */ - - -function testcase() { - - var i = Array.prototype.indexOf.call({length: null}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-2 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 ( length + overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.indexOf.call({length: null}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js index 294d9d7261..92cc87dac3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 (length overridden to false (type conversion)) - */ - - -function testcase() { - - var i = Array.prototype.indexOf.call({length: false}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-3 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 (length + overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.indexOf.call({length: false}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js index fe838c8309..78c923dbef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 (generic 'array' with length 0 ) - */ - - -function testcase() { - - var i = Array.prototype.lastIndexOf.call({length: 0}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-4 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 (generic + 'array' with length 0 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.lastIndexOf.call({length: 0}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js index 386f92a204..be4595b193 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion)) - */ - - -function testcase() { - - var i = Array.prototype.indexOf.call({length: '0'}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-5 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 ( length + overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.indexOf.call({length: '0'}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js index aafac4e059..c41ecd3813 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - - var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-6 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 (subclassed + Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js index f543d575a6..07edda706b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-7 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 ( length is + object overridden with obj w/o valueOf (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js index 124278a54a..2bc1d47aab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js - * @description Array.prototype.indexOf returns -1 if 'length' is 0 (length is an empty array) - */ - - -function testcase() { - - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var i = Array.prototype.indexOf.call({length: [ ]}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-8 +description: > + Array.prototype.indexOf returns -1 if 'length' is 0 (length is an + empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + var i = Array.prototype.indexOf.call({length: [ ]}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js index ad1aefef3c..f5dd4a8a35 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js - * @description Array.prototype.indexOf - 'length' is a number of value 0.1 - */ - - -function testcase() { - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-4-9 +description: Array.prototype.indexOf - 'length' is a number of value 0.1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = []; + var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; + return Array.prototype.indexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js index 55e7fa66db..1aca5363dc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js - * @description Array.prototype.indexOf when fromIndex is string - */ - - -function testcase() { - var a = [1,2,1,2,1,2]; - if (a.indexOf(2,"2") === 3 && // "2" resolves to 2 - a.indexOf(2,"one") === 1) { // "one" resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-1 +description: Array.prototype.indexOf when fromIndex is string +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = [1,2,1,2,1,2]; + if (a.indexOf(2,"2") === 3 && // "2" resolves to 2 + a.indexOf(2,"one") === 1) { // "one" resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js index 169eba1be8..1cec7737c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is positive number) - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, 2) === -1 && - [0, 1, targetObj].indexOf(targetObj, 2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-10 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, 2].indexOf(targetObj, 2) === -1 && + [0, 1, targetObj].indexOf(targetObj, 2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js index 39c93be14f..58c13743f8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is negative number) - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, -1) === -1 && - [0, 1, targetObj].indexOf(targetObj, -1) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-11 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, 2].indexOf(targetObj, -1) === -1 && + [0, 1, targetObj].indexOf(targetObj, -1) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js index de0e282c04..2e7a0939af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is Infinity) - */ - - -function testcase() { - var arr = []; - arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type - return arr.indexOf(true, Infinity) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-12 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type + return arr.indexOf(true, Infinity) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js index 11be6b95e7..a0751e31d7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is -Infinity) - */ - - -function testcase() { - - return [true].indexOf(true, -Infinity) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-13 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].indexOf(true, -Infinity) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js index 88c78e1e55..0ed9981bb3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is NaN) - */ - - -function testcase() { - - return [true].indexOf(true, NaN) === 0 && [true].indexOf(true, -NaN) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-14 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].indexOf(true, NaN) === 0 && [true].indexOf(true, -NaN) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js index 8f39cda4e8..c84299644d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a string containing a negative number - */ - - -function testcase() { - - return [0, true, 2].indexOf(true, "-1") === -1 && - [0, 1, true].indexOf(true, "-1") === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-15 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a string + containing a negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, true, 2].indexOf(true, "-1") === -1 && + [0, 1, true].indexOf(true, "-1") === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js index 8b8e91e0b9..af0be01796 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a string containing Infinity - */ - - -function testcase() { - var arr = []; - arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type - return arr.indexOf(true, "Infinity") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-16 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a string + containing Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type + return arr.indexOf(true, "Infinity") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js index 1fa680a322..5f8ec8413c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a string containing -Infinity - */ - - -function testcase() { - - return [true].indexOf(true, "-Infinity") === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-17 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a string + containing -Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].indexOf(true, "-Infinity") === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js index a630df56ec..cbdf1ae326 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a string containing an exponential number - */ - - -function testcase() { - var targetObj = {}; - return [0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0") === -1 && - [0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0") === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-18 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a string + containing an exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0") === -1 && + [0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0") === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js index d917045f74..f28450f0bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a string containing a hex number - */ - - -function testcase() { - var targetObj = {}; - return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003") === -1 && - [0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003") === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-19 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a string + containing a hex number +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003") === -1 && + [0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003") === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js index e059edb20b..800797003f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js - * @description Array.prototype.indexOf when fromIndex is floating point number - */ - - -function testcase() { - var a = new Array(1,2,3); - if (a.indexOf(3,0.49) === 2 && // 0.49 resolves to 0 - a.indexOf(1,0.51) === 0 && // 0.51 resolves to 0 - a.indexOf(1,1.51) === -1) { // 1.01 resolves to 1 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-2 +description: Array.prototype.indexOf when fromIndex is floating point number +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,3); + if (a.indexOf(3,0.49) === 2 && // 0.49 resolves to 0 + a.indexOf(1,0.51) === 0 && // 0.51 resolves to 0 + a.indexOf(1,1.51) === -1) { // 1.01 resolves to 1 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js index 109c380418..d810a76bf7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js - * @description Array.prototype.indexOf - value of 'fromIndex' which is a string containing a number with leading zeros - */ - - -function testcase() { - var targetObj = {}; - return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10") === -1 && - [0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10") === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-20 +description: > + Array.prototype.indexOf - value of 'fromIndex' which is a string + containing a number with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10") === -1 && + [0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10") === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js index 1a80e71009..b9f38ec887 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js - * @description Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own toString method - */ - - -function testcase() { - - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var fromIndex = { - toString: function () { - return '1'; - } - }; - - return [0, true].indexOf(true, fromIndex) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-21 +description: > + Array.prototype.indexOf - value of 'fromIndex' is an Object, which + has an own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + + // objects inherit the default valueOf() method from Object + // that simply returns itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + var fromIndex = { + toString: function () { + return '1'; + } + }; + + return [0, true].indexOf(true, fromIndex) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js index f4b7f410cc..cc818c382b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js - * @description Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own valueOf method - */ - - -function testcase() { - - var fromIndex = { - valueOf: function () { - return 1; - } - }; - - - return [0, true].indexOf(true, fromIndex) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-22 +description: > + Array.prototype.indexOf - value of 'fromIndex' is an Object, which + has an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var fromIndex = { + valueOf: function () { + return 1; + } + }; + + + return [0, true].indexOf(true, fromIndex) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js index aec49eab46..64da0ce639 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js - * @description Array.prototype.indexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var fromIndex = { - toString: function () { - toStringAccessed = true; - return '1'; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; - - return [0, true].indexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-23 +description: > + Array.prototype.indexOf - value of 'fromIndex' is an object that + has an own valueOf method that returns an object and toString + method that returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var fromIndex = { + toString: function () { + toStringAccessed = true; + return '1'; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + }; + + return [0, true].indexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js index af7e04be85..b49c139700 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js - * @description Array.prototype.indexOf throws TypeError exception when value of 'fromIndex' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - var fromIndex = { - toString: function () { - toStringAccessed = true; - return {}; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; - - try { - [0, true].indexOf(true, fromIndex); - return false; - } catch (e) { - return toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-24 +description: > + Array.prototype.indexOf throws TypeError exception when value of + 'fromIndex' is an object with toString and valueOf methods that + don�t return primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + var fromIndex = { + toString: function () { + toStringAccessed = true; + return {}; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + }; + + try { + [0, true].indexOf(true, fromIndex); + return false; + } catch (e) { + return toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js index 210ff59e16..dad482b057 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js - * @description Array.prototype.indexOf uses inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 1; - } - }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; - - return [0, true].indexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-25 +description: > + Array.prototype.indexOf uses inherited valueOf method when value + of 'fromIndex' is an object with an own toString and inherited + valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 1; + } + }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child.toString = function () { + toStringAccessed = true; + return 2; + }; + + return [0, true].indexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js index 69574ff010..a0161ab054 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js - * @description Array.prototype.indexOf - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - var stepTwoOccurs = false; - var stepFiveOccurs = false; - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - stepTwoOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.indexOf.call(obj, undefined, fromIndex); - return stepTwoOccurs && stepFiveOccurs; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-26 +description: > + Array.prototype.indexOf - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + var stepTwoOccurs = false; + var stepFiveOccurs = false; + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + stepTwoOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.indexOf.call(obj, undefined, fromIndex); + return stepTwoOccurs && stepFiveOccurs; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js index 98ff90761c..56999c41e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js - * @description Array.prototype.indexOf - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - var stepThreeOccurs = false; - var stepFiveOccurs = false; - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - stepThreeOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - } - }; - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.indexOf.call(obj, undefined, fromIndex); - return stepThreeOccurs && stepFiveOccurs; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-27 +description: > + Array.prototype.indexOf - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + var stepThreeOccurs = false; + var stepFiveOccurs = false; + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return { + valueOf: function () { + stepThreeOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + } + }; + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.indexOf.call(obj, undefined, fromIndex); + return stepThreeOccurs && stepFiveOccurs; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js index be603a1b99..aa27c5a755 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js - * @description Array.prototype.indexOf - side effects produced by step 1 are visible when an exception occurs - */ - - -function testcase() { - - var stepFiveOccurs = false; - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.indexOf.call(undefined, undefined, fromIndex); - return false; - } catch (e) { - return (e instanceof TypeError) && !stepFiveOccurs; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-28 +description: > + Array.prototype.indexOf - side effects produced by step 1 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepFiveOccurs = false; + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.indexOf.call(undefined, undefined, fromIndex); + return false; + } catch (e) { + return (e instanceof TypeError) && !stepFiveOccurs; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js index ce0e9739ee..cc5bd35ea1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js - * @description Array.prototype.indexOf - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var stepFiveOccurs = false; - - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new RangeError(); - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.indexOf.call(obj, undefined, fromIndex); - return false; - } catch (e) { - return (e instanceof RangeError) && !stepFiveOccurs; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-29 +description: > + Array.prototype.indexOf - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepFiveOccurs = false; + + var obj = {}; + Object.defineProperty(obj, "length", { + get: function () { + throw new RangeError(); + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.indexOf.call(obj, undefined, fromIndex); + return false; + } catch (e) { + return (e instanceof RangeError) && !stepFiveOccurs; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js index 6b646e64dc..3fc08e1fdd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js - * @description Array.prototype.indexOf when fromIndex is boolean - */ - - -function testcase() { - var a = [1,2,3]; - if (a.indexOf(1,true) === -1 && // true resolves to 1 - a.indexOf(1,false) === 0 ) { // false resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-3 +description: Array.prototype.indexOf when fromIndex is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = [1,2,3]; + if (a.indexOf(1,true) === -1 && // true resolves to 1 + a.indexOf(1,false) === 0 ) { // false resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js index 8724c75c0f..239403cca2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js - * @description Array.prototype.indexOf - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var stepFiveOccurs = false; - - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - throw new TypeError(); - } - }; - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.indexOf.call(obj, undefined, fromIndex); - return false; - } catch (e) { - return (e instanceof TypeError) && !stepFiveOccurs; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-30 +description: > + Array.prototype.indexOf - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepFiveOccurs = false; + + var obj = {}; + Object.defineProperty(obj, "length", { + get: function () { + return { + valueOf: function () { + throw new TypeError(); + } + }; + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.indexOf.call(obj, undefined, fromIndex); + return false; + } catch (e) { + return (e instanceof TypeError) && !stepFiveOccurs; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js index 3caf29be47..bbc6acefe1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js - * @description Array.prototype.indexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, 2.5) === -1 && - [0, 1, targetObj].indexOf(targetObj, 2.5) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-31 +description: > + Array.prototype.indexOf - 'fromIndex' is a positive non-integer, + verify truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, 2].indexOf(targetObj, 2.5) === -1 && + [0, 1, targetObj].indexOf(targetObj, 2.5) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js index 66a1643218..8ee38614bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js - * @description Array.prototype.indexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, -1.5) === -1 && - [0, 1, targetObj].indexOf(targetObj, -1.5) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-32 +description: > + Array.prototype.indexOf - 'fromIndex' is a negative non-integer, + verify truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, 2].indexOf(targetObj, -1.5) === -1 && + [0, 1, targetObj].indexOf(targetObj, -1.5) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js index 965c2cee33..04a07d73c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js - * @description Array.prototype.indexOf match on the first element, a middle element and the last element when 'fromIndex' is passed - */ - - -function testcase() { - - return [0, 1, 2, 3, 4].indexOf(0, 0) === 0 && - [0, 1, 2, 3, 4].indexOf(2, 1) === 2 && - [0, 1, 2, 3, 4].indexOf(2, 2) === 2 && - [0, 1, 2, 3, 4].indexOf(4, 2) === 4 && - [0, 1, 2, 3, 4].indexOf(4, 4) === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-33 +description: > + Array.prototype.indexOf match on the first element, a middle + element and the last element when 'fromIndex' is passed +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, 1, 2, 3, 4].indexOf(0, 0) === 0 && + [0, 1, 2, 3, 4].indexOf(2, 1) === 2 && + [0, 1, 2, 3, 4].indexOf(2, 2) === 2 && + [0, 1, 2, 3, 4].indexOf(4, 2) === 4 && + [0, 1, 2, 3, 4].indexOf(4, 4) === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js index e9a9b1c96e..002d7c931d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js - * @description Array.prototype.indexOf returns 0 if fromIndex is 'undefined' - */ - - -function testcase() { - var a = [1,2,3]; - if (a.indexOf(1,undefined) === 0) { // undefined resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-4 +description: Array.prototype.indexOf returns 0 if fromIndex is 'undefined' +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = [1,2,3]; + if (a.indexOf(1,undefined) === 0) { // undefined resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js index 55abcec918..4568301d52 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js - * @description Array.prototype.indexOf returns 0 if fromIndex is null - */ - - -function testcase() { - var a = [1,2,3]; - if (a.indexOf(1,null) === 0 ) { // null resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-5 +description: Array.prototype.indexOf returns 0 if fromIndex is null +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = [1,2,3]; + if (a.indexOf(1,null) === 0 ) { // null resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js index 7d3dae2567..1eb79c7977 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js - * @description Array.prototype.indexOf - 'fromIndex' isn't passed - */ - - -function testcase() { - var arr = [0, 1, 2, 3, 4]; - //'fromIndex' will be set as 0 if not passed by default - return arr.indexOf(0) === arr.indexOf(0, 0) && - arr.indexOf(2) === arr.indexOf(2, 0) && - arr.indexOf(4) === arr.indexOf(4, 0); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-6 +description: Array.prototype.indexOf - 'fromIndex' isn't passed +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [0, 1, 2, 3, 4]; + //'fromIndex' will be set as 0 if not passed by default + return arr.indexOf(0) === arr.indexOf(0, 0) && + arr.indexOf(2) === arr.indexOf(2, 0) && + arr.indexOf(4) === arr.indexOf(4, 0); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js index dcb784bea2..eb8c1d1256 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is 0) - */ - - -function testcase() { - - return [true].indexOf(true, 0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-7 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].indexOf(true, 0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js index 47aebb3fc0..634928b0f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is +0) - */ - - -function testcase() { - - return [true].indexOf(true, +0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-8 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].indexOf(true, +0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js index 268569f936..66fb9e3447 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js - * @description Array.prototype.indexOf - value of 'fromIndex' is a number (value is -0) - */ - - -function testcase() { - - return [true].indexOf(true, -0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-5-9 +description: > + Array.prototype.indexOf - value of 'fromIndex' is a number (value + is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].indexOf(true, -0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js index d21c122b54..d35c8a7439 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js - * @description Array.prototype.indexOf returns -1 if fromIndex is greater than Array length - */ - - -function testcase() { - var a = [1,2,3]; - if (a.indexOf(1,5) === -1 && - a.indexOf(1,3) === -1 && - [ ].indexOf(1,0) === -1 ){ - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-6-1 +description: > + Array.prototype.indexOf returns -1 if fromIndex is greater than + Array length +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = [1,2,3]; + if (a.indexOf(1,5) === -1 && + a.indexOf(1,3) === -1 && + [ ].indexOf(1,0) === -1 ){ + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js index c641b2d7fa..6a53bc3b6e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js - * @description Array.prototype.indexOf returns -1 when 'fromIndex' is length of array - 1 - */ - - -function testcase() { - - return [1, 2, 3].indexOf(1, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-7-1 +description: > + Array.prototype.indexOf returns -1 when 'fromIndex' is length of + array - 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].indexOf(1, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js index f701c93a49..c3494043b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js - * @description Array.prototype.indexOf returns correct index when 'fromIndex' is length of array - 1 - */ - - -function testcase() { - - return [1, 2, 3].indexOf(3, 2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-7-2 +description: > + Array.prototype.indexOf returns correct index when 'fromIndex' is + length of array - 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].indexOf(3, 2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js index 36178b5858..dfe4694407 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js - * @description Array.prototype.indexOf returns -1 when 'fromIndex' and 'length' are both 0 - */ - - -function testcase() { - - return [].indexOf(1, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-7-3 +description: > + Array.prototype.indexOf returns -1 when 'fromIndex' and 'length' + are both 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [].indexOf(1, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js index fea341fdde..0923487ad1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js - * @description Array.prototype.indexOf returns -1 when 'fromIndex' is 1 - */ - - -function testcase() { - - return [1, 2, 3].indexOf(1, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-7-4 +description: Array.prototype.indexOf returns -1 when 'fromIndex' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].indexOf(1, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js index 0036b298b2..526297c12f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js - * @description Array.prototype.indexOf returns correct index when 'fromIndex' is 1 - */ - - -function testcase() { - - return [1, 2, 3].indexOf(2, 1) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-7-5 +description: Array.prototype.indexOf returns correct index when 'fromIndex' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].indexOf(2, 1) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js index 8e00f731d0..fb7bc1ee28 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js - * @description Array.prototype.indexOf with negative fromIndex - */ - - -function testcase() { - var a = new Array(1,2,3); - - if (a.indexOf(2,-1) === -1 && - a.indexOf(2,-2) === 1 && - a.indexOf(1,-3) === 0 && - a.indexOf(1,-5.3) === 0 ) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-8-1 +description: Array.prototype.indexOf with negative fromIndex +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,3); + + if (a.indexOf(2,-1) === -1 && + a.indexOf(2,-2) === 1 && + a.indexOf(1,-3) === 0 && + a.indexOf(1,-5.3) === 0 ) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js index d749ecc7d6..8932428b3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js - * @description Array.prototype.indexOf returns correct index when 'fromIndex' is -1 - */ - - -function testcase() { - - return [1, 2, 3, 4].indexOf(4, -1) === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-8-2 +description: > + Array.prototype.indexOf returns correct index when 'fromIndex' is + -1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3, 4].indexOf(4, -1) === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js index 09155bb002..64ad22ce6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js - * @description Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array - 1 - */ - - -function testcase() { - - return [1, 2, 3, 4].indexOf(1, -3) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-8-3 +description: > + Array.prototype.indexOf returns -1 when abs('fromIndex') is length + of array - 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3, 4].indexOf(1, -3) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js index 188aa57ee0..0a99d824c2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js - * @description Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array - */ - - -function testcase() { - - return [1, 2, 3, 4].indexOf(0, -4) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-8-4 +description: > + Array.prototype.indexOf returns -1 when abs('fromIndex') is length + of array +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3, 4].indexOf(0, -4) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js index 07c3fa630a..023cc9d0ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js - * @description Array.prototype.indexOf must return correct index (boolean) - */ - - -function testcase() { - var obj = {toString:function (){return true}}; - var _false = false; - var a = [obj,"true", undefined,0,_false,null,1,"str",0,1,true,false,true,false]; - if (a.indexOf(true) === 10 && //a[10]=true - a.indexOf(false) === 4) //a[4] =_false - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-1 +description: Array.prototype.indexOf must return correct index (boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return true}}; + var _false = false; + var a = [obj,"true", undefined,0,_false,null,1,"str",0,1,true,false,true,false]; + if (a.indexOf(true) === 10 && //a[10]=true + a.indexOf(false) === 4) //a[4] =_false + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js index 9147f4a09e..190eb10c01 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * note that prior to the finally ES5 draft SameValue was used for comparisions - * and hence NaNs could be found using indexOf * - * - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js - * @description Array.prototype.indexOf must return correct index (NaN) - */ - - -function testcase() { - var _NaN = NaN; - var a = new Array("NaN",undefined,0,false,null,{toString:function (){return NaN}},"false",_NaN,NaN); - if (a.indexOf(NaN) === -1) // NaN is equal to nothing, including itself. - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + note that prior to the finally ES5 draft SameValue was used for comparisions + and hence NaNs could be found using indexOf * +es5id: 15.4.4.14-9-10 +description: Array.prototype.indexOf must return correct index (NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var _NaN = NaN; + var a = new Array("NaN",undefined,0,false,null,{toString:function (){return NaN}},"false",_NaN,NaN); + if (a.indexOf(NaN) === -1) // NaN is equal to nothing, including itself. + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-11.js index 82b0b08fa8..e139518fef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-11.js - * @description Array.prototype.indexOf - the length of iteration isn't changed by adding elements to the array during iteration - */ - - -function testcase() { - - var arr = [20]; - - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 1; - return 0; - }, - configurable: true - }); - - return arr.indexOf(1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-11 +description: > + Array.prototype.indexOf - the length of iteration isn't changed by + adding elements to the array during iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [20]; + + Object.defineProperty(arr, "0", { + get: function () { + arr[1] = 1; + return 0; + }, + configurable: true + }); + + return arr.indexOf(1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js index 688093ce96..3c60b72f8f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js - * @description Array.prototype.indexOf must return correct index (Number) - */ - - -function testcase() { - var obj = {toString:function (){return 0}}; - var one = 1; - var _float = -(4/3); - var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); - if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) - a.indexOf(0) === 7 && // a[7] = +0, 0===+0 - a.indexOf(-0) === 7 && // a[7] = +0, -0===+0 - a.indexOf(1) === 10 ) // a[10] =one=== 1 - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-2 +description: Array.prototype.indexOf must return correct index (Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return 0}}; + var one = 1; + var _float = -(4/3); + var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); + if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) + a.indexOf(0) === 7 && // a[7] = +0, 0===+0 + a.indexOf(-0) === 7 && // a[7] = +0, -0===+0 + a.indexOf(1) === 10 ) // a[10] =one=== 1 + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js index 47ab354776..f223cf7040 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js - * @description Array.prototype.indexOf must return correct index(string) - */ - - -function testcase() { - var obj = {toString:function (){return "false"}}; - var szFalse = "false"; - var a = new Array("false1",undefined,0,false,null,1,obj,0,szFalse, "false"); - if (a.indexOf("false") === 8) //a[8]=szFalse - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-3 +description: Array.prototype.indexOf must return correct index(string) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return "false"}}; + var szFalse = "false"; + var a = new Array("false1",undefined,0,false,null,1,obj,0,szFalse, "false"); + if (a.indexOf("false") === 8) //a[8]=szFalse + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js index 8dbf466b1a..ba6a84b6a0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js - * @description Array.prototype.indexOf must return correct index(undefined) - */ - - -function testcase() { - var obj = {toString:function (){return undefined;}}; - var _undefined1 = undefined; - var _undefined2; - var a = new Array(true,0,false,null,1,"undefined",obj,1,_undefined2,_undefined1,undefined); - if (a.indexOf(undefined) === 8) //a[8]=_undefined2 - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-4 +description: Array.prototype.indexOf must return correct index(undefined) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return undefined;}}; + var _undefined1 = undefined; + var _undefined2; + var a = new Array(true,0,false,null,1,"undefined",obj,1,_undefined2,_undefined1,undefined); + if (a.indexOf(undefined) === 8) //a[8]=_undefined2 + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js index c54e53629d..faf63d4dd9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js - * @description Array.prototype.indexOf must return correct index (Object) - */ - - -function testcase() { - var obj1 = {toString:function (){return "false"}}; - var obj2 = {toString:function (){return "false"}}; - var obj3 = obj1; - var a = new Array(false,undefined,0,false,null,{toString:function (){return "false"}},"false",obj2,obj1,obj3); - if (a.indexOf(obj3) === 8) //a[8] = obj1; - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-5 +description: Array.prototype.indexOf must return correct index (Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj1 = {toString:function (){return "false"}}; + var obj2 = {toString:function (){return "false"}}; + var obj3 = obj1; + var a = new Array(false,undefined,0,false,null,{toString:function (){return "false"}},"false",obj2,obj1,obj3); + if (a.indexOf(obj3) === 8) //a[8] = obj1; + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js index 7fd3f5b5ec..a8b76b7f88 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js - * @description Array.prototype.indexOf must return correct index(null) - */ - - -function testcase() { - var obj = {toString:function (){return null}}; - var _null = null; - var a = new Array(true,undefined,0,false,_null,1,"str",0,1,obj,true,false,null); - if (a.indexOf(null) === 4 ) //a[4]=_null - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-6 +description: Array.prototype.indexOf must return correct index(null) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return null}}; + var _null = null; + var a = new Array(true,undefined,0,false,_null,1,"str",0,1,obj,true,false,null); + if (a.indexOf(null) === 4 ) //a[4]=_null + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js index d91e3d086a..19cf396d75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js - * @description Array.prototype.indexOf must return correct index (self reference) - */ - - -function testcase() { - var a = new Array(0,1,2,3); - a[2] = a; - if (a.indexOf(a) === 2 && - a.indexOf(3) === 3 ) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-7 +description: Array.prototype.indexOf must return correct index (self reference) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(0,1,2,3); + a[2] = a; + if (a.indexOf(a) === 2 && + a.indexOf(3) === 3 ) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js index 7dd751c783..e77178a335 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js - * @description Array.prototype.indexOf must return correct index (Array) - */ - - -function testcase() { - var b = new Array("0,1"); - var a = new Array(0,b,"0,1",3); - if (a.indexOf(b.toString()) === 2 && - a.indexOf("0,1") === 2 ) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-8 +description: Array.prototype.indexOf must return correct index (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = new Array("0,1"); + var a = new Array(0,b,"0,1",3); + if (a.indexOf(b.toString()) === 2 && + a.indexOf("0,1") === 2 ) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js index bd811ae03f..8596e56428 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js - * @description Array.prototype.indexOf must return correct index (Sparse Array) - */ - - -function testcase() { - var a = new Array(0,1); - a[4294967294] = 2; // 2^32-2 - is max array element - a[4294967295] = 3; // 2^32-1 added as non-array element property - a[4294967296] = 4; // 2^32 added as non-array element property - a[4294967297] = 5; // 2^32+1 added as non-array element property - - // start searching near the end so in case implementation actually tries to test all missing elements!! - return (a.indexOf(2,4294967290 ) === 4294967294 && - a.indexOf(3,4294967290) === -1 && - a.indexOf(4,4294967290) === -1 && - a.indexOf(5,4294967290) === -1 ) ; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-9 +description: Array.prototype.indexOf must return correct index (Sparse Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(0,1); + a[4294967294] = 2; // 2^32-2 - is max array element + a[4294967295] = 3; // 2^32-1 added as non-array element property + a[4294967296] = 4; // 2^32 added as non-array element property + a[4294967297] = 5; // 2^32+1 added as non-array element property + + // start searching near the end so in case implementation actually tries to test all missing elements!! + return (a.indexOf(2,4294967290 ) === 4294967294 && + a.indexOf(3,4294967290) === -1 && + a.indexOf(4,4294967290) === -1 && + a.indexOf(5,4294967290) === -1 ) ; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js index 54c7923bd5..4b277d5641 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js - * @description Array.prototype.indexOf - added properties in step 2 are visible here - */ - - -function testcase() { - - var arr = { }; - - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); - - return 2 === Array.prototype.indexOf.call(arr, "length"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-1 +description: > + Array.prototype.indexOf - added properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { }; + + Object.defineProperty(arr, "length", { + get: function () { + arr[2] = "length"; + return 3; + }, + configurable: true + }); + + return 2 === Array.prototype.indexOf.call(arr, "length"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-10.js index acc2ebc4c3..b50c81449e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-10.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-10.js - * @description Array.prototype.indexOf - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return arr.indexOf(6.99) === 1; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-10 +description: > + Array.prototype.indexOf - properties can be added to prototype + after current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return arr.indexOf(6.99) === 1; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-11.js index 66126dc259..15ae536a2c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-11.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-11.js - * @description Array.prototype.indexOf - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - - var arr = { length: 2 }; - - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return -1 === Array.prototype.indexOf.call(arr, 6.99); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-11 +description: > + Array.prototype.indexOf - deleting own property causes index + property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 2 }; + + Object.defineProperty(arr, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return -1 === Array.prototype.indexOf.call(arr, 6.99); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-12.js index 256ad2671f..07f991ebba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-12.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-12.js - * @description Array.prototype.indexOf - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - - var arr = [1, 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return -1 === arr.indexOf("6.99"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-12 +description: > + Array.prototype.indexOf - deleting own property causes index + property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [1, 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return -1 === arr.indexOf("6.99"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-13.js index 33f4f928dd..0ccea311ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-13.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-13.js - * @description Array.prototype.indexOf - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var arr = { 2: 2, length: 20 }; - - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return -1 === Array.prototype.indexOf.call(arr, 1); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-13 +description: > + Array.prototype.indexOf - deleting property of prototype causes + prototype index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 2: 2, length: 20 }; + + Object.defineProperty(arr, "0", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return -1 === Array.prototype.indexOf.call(arr, 1); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-14.js index 2761b6a99f..62cc9cfa08 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-14.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-14.js - * @description Array.prototype.indexOf - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return -1 === arr.indexOf(1); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-14 +description: > + Array.prototype.indexOf - deleting property of prototype causes + prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return -1 === arr.indexOf(1); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-15.js index 6aee39a24e..100f495748 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-15.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-15.js - * @description Array.prototype.indexOf - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return 1 === Array.prototype.indexOf.call(arr, 1); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-15 +description: > + Array.prototype.indexOf - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return 1 === Array.prototype.indexOf.call(arr, 1); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-16.js index 23696e159d..339b50d12f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-16.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-16.js - * @description Array.prototype.indexOf - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var arr = [0, 111, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return 1 === arr.indexOf(1); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-16 +description: > + Array.prototype.indexOf - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 111, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return 1 === arr.indexOf(1); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-17.js index cbf849792b..a89e3a1b90 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-17.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-17.js - * @description Array.prototype.indexOf - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - - var arr = [0, 1, 2, "last"]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - return -1 === arr.indexOf("last"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-17 +description: > + Array.prototype.indexOf - decreasing length of array causes index + property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, "last"]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + return -1 === arr.indexOf("last"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-18.js index dae72c99f2..5523ef289d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-18.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-18.js - * @description Array.prototype.indexOf - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - - var arr = [0, 1, 2]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return 2 === arr.indexOf("prototype"); - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-18 +description: > + Array.prototype.indexOf - decreasing length of array with + prototype property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return 2 === arr.indexOf("prototype"); + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-19.js index bb919355f0..82276d2c30 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-19.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-19.js - * @description Array.prototype.indexOf - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return 2 === arr.indexOf("unconfigurable"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-19 +description: > + Array.prototype.indexOf - decreasing length of array does not + delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return 2 === arr.indexOf("unconfigurable"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js index fe4c97ecd3..1e9c7f0478 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js - * @description Array.prototype.indexOf - added properties in step 5 are visible here on an Array-like object - */ - - -function testcase() { - - var arr = { length: 30 }; - var targetObj = function () { }; - - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 3; - } - }; - - return 4 === Array.prototype.indexOf.call(arr, targetObj, fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-2 +description: > + Array.prototype.indexOf - added properties in step 5 are visible + here on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 30 }; + var targetObj = function () { }; + + var fromIndex = { + valueOf: function () { + arr[4] = targetObj; + return 3; + } + }; + + return 4 === Array.prototype.indexOf.call(arr, targetObj, fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js index 510a091347..1bf7dcb498 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js - * @description Array.prototype.indexOf - added properties in step 5 are visible here on an Array - */ - - -function testcase() { - - var arr = []; - arr.length = 30; - var targetObj = function () { }; - - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 3; - } - }; - - return 4 === arr.indexOf(targetObj, fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-3 +description: > + Array.prototype.indexOf - added properties in step 5 are visible + here on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + arr.length = 30; + var targetObj = function () { }; + + var fromIndex = { + valueOf: function () { + arr[4] = targetObj; + return 3; + } + }; + + return 4 === arr.indexOf(targetObj, fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js index 8518f8cba4..6cfcaf513e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js - * @description Array.prototype.indexOf - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var arr = { 2: 6.99 }; - - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 3; - }, - configurable: true - }); - - return -1 === Array.prototype.indexOf.call(arr, 6.99); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-4 +description: > + Array.prototype.indexOf - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 2: 6.99 }; + + Object.defineProperty(arr, "length", { + get: function () { + delete arr[2]; + return 3; + }, + configurable: true + }); + + return -1 === Array.prototype.indexOf.call(arr, 6.99); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js index 5a49af4d2e..fa453663a5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js - * @description Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array-like object - */ - - -function testcase() { - - var arr = { 10: false, length: 30 }; - - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 3; - } - }; - - return -1 === Array.prototype.indexOf.call(arr, false, fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-5 +description: > + Array.prototype.indexOf - deleted properties in step 5 are visible + here on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 10: false, length: 30 }; + + var fromIndex = { + valueOf: function () { + delete arr[10]; + return 3; + } + }; + + return -1 === Array.prototype.indexOf.call(arr, false, fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js index 51d633b34a..097255f167 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js - * @description Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array - */ - - -function testcase() { - - var arr = []; - arr[10] = "10"; - arr.length = 20; - - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 3; - } - }; - - return -1 === arr.indexOf("10", fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-6 +description: > + Array.prototype.indexOf - deleted properties in step 5 are visible + here on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + arr[10] = "10"; + arr.length = 20; + + var fromIndex = { + valueOf: function () { + delete arr[10]; + return 3; + } + }; + + return -1 === arr.indexOf("10", fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-7.js index 736e108439..bab390acb8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-7.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-7.js - * @description Array.prototype.indexOf - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - var arr = { length: 2 }; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return Array.prototype.indexOf.call(arr, 1) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-7 +description: > + Array.prototype.indexOf - properties added into own object after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 2 }; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return Array.prototype.indexOf.call(arr, 1) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-8.js index f4f6c3e0c3..1a612e2884 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-8.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-8.js - * @description Array.prototype.indexOf - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return arr.indexOf(1) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-8 +description: > + Array.prototype.indexOf - properties added into own object after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return arr.indexOf(1) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-9.js index c2b57d4025..95adffc717 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-9.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-9.js - * @description Array.prototype.indexOf - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - - var arr = { length: 2 }; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return Array.prototype.indexOf.call(arr, 6.99) === 1; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-a-9 +description: > + Array.prototype.indexOf - properties can be added to prototype + after current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 2 }; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return Array.prototype.indexOf.call(arr, 6.99) === 1; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js index 70d59948fc..2d9d11f2d8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js - * @description Array.prototype.indexOf - non-existent property wouldn't be called - */ - - -function testcase() { - - return [0, , 2].indexOf(undefined) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-1 +description: Array.prototype.indexOf - non-existent property wouldn't be called +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, , 2].indexOf(undefined) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js index 57aea0a34d..5b1f767f11 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js - * @description Array.prototype.indexOf - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; - return Array.prototype.indexOf.call(obj, 0) === 0 && - Array.prototype.indexOf.call(obj, 1) === 1 && - Array.prototype.indexOf.call(obj, 2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-1 +description: > + Array.prototype.indexOf - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; + return Array.prototype.indexOf.call(obj, 0) === 0 && + Array.prototype.indexOf.call(obj, 1) === 1 && + Array.prototype.indexOf.call(obj, 2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-10.js index 7fa23f0c83..2c6f4f5eb6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-10.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-10.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var obj = { length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - return 0 === Array.prototype.indexOf.call(obj, 0) && - 1 === Array.prototype.indexOf.call(obj, 1) && - 2 === Array.prototype.indexOf.call(obj, 2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-10 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 3 }; + Object.defineProperty(obj, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + return 0 === Array.prototype.indexOf.call(obj, 0) && + 1 === Array.prototype.indexOf.call(obj, 1) && + 2 === Array.prototype.indexOf.call(obj, 2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-11.js index ac64a33c3c..8e978aff20 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-11.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-11.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var arr = []; - try { - Array.prototype[0] = false; - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === arr.indexOf(true); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-11 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + try { + Array.prototype[0] = false; + Object.defineProperty(arr, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === arr.indexOf(true); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-12.js index 5e268ce326..13e189983c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-12.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-12.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - var obj = { length: 1 }; - - try { - Object.prototype[0] = false; - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === Array.prototype.indexOf.call(obj, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-12 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { length: 1 }; + + try { + Object.prototype[0] = false; + Object.defineProperty(obj, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === Array.prototype.indexOf.call(obj, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-13.js index 06450b83e1..ecd26ca209 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-13.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-13.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var arr = []; - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === arr.indexOf(true); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-13 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === arr.indexOf(true); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-14.js index 72417e9ffe..8b9bfd0dc8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-14.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-14.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var obj = { length: 1 }; - - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === Array.prototype.indexOf.call(obj, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-14 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 1 }; + + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === Array.prototype.indexOf.call(obj, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-15.js index 9093071c33..88c333593c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-15.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-15.js - * @description Array.prototype.indexOf - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); - - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); - - return 0 === [, , , ].indexOf(10) && - 1 === [, , , ].indexOf(20) && - 2 === [, , , ].indexOf(30); - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-15 +description: > + Array.prototype.indexOf - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 20; + }, + configurable: true + }); + + Object.defineProperty(Array.prototype, "2", { + get: function () { + return 30; + }, + configurable: true + }); + + return 0 === [, , , ].indexOf(10) && + 1 === [, , , ].indexOf(20) && + 2 === [, , , ].indexOf(30); + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-16.js index 64e58f6663..570705cb0e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-16.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-16.js - * @description Array.prototype.indexOf - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); - - Object.defineProperty(Object.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); - - return 0 === Array.prototype.indexOf.call({ length: 3 }, 10) && - 1 === Array.prototype.indexOf.call({ length: 3 }, 20) && - 2 === Array.prototype.indexOf.call({ length: 3 }, 30); - } finally { - delete Object.prototype[0]; - delete Object.prototype[1]; - delete Object.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-16 +description: > + Array.prototype.indexOf - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 20; + }, + configurable: true + }); + + Object.defineProperty(Object.prototype, "2", { + get: function () { + return 30; + }, + configurable: true + }); + + return 0 === Array.prototype.indexOf.call({ length: 3 }, 10) && + 1 === Array.prototype.indexOf.call({ length: 3 }, 20) && + 2 === Array.prototype.indexOf.call({ length: 3 }, 30); + } finally { + delete Object.prototype[0]; + delete Object.prototype[1]; + delete Object.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-17.js index 58fef54ff0..5b744bc0be 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-17.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-17.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - return arr.indexOf(undefined) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-17 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + return arr.indexOf(undefined) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-18.js index 8912be8eed..ee6483722d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-18.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-18.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var obj = { length: 1 }; - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); - - return 0 === Array.prototype.indexOf.call(obj, undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-18 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 1 }; + Object.defineProperty(obj, "0", { + set: function () { }, + configurable: true + }); + + return 0 === Array.prototype.indexOf.call(obj, undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-19.js index 3694765708..518d20dde1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-19.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-19.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 2; - }, - configurable: true - }); - - return arr.indexOf(undefined) === 0; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-19 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 2; + }, + configurable: true + }); + + return arr.indexOf(undefined) === 0; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js index b74ea0e087..998406f020 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js - * @description Array.prototype.indexOf - element to be retrieved is own data property on an Array - */ - - -function testcase() { - return [true, true, true].indexOf(true) === 0 && - [false, true, true].indexOf(true) === 1 && - [false, false, true].indexOf(true) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-2 +description: > + Array.prototype.indexOf - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + return [true, true, true].indexOf(true) === 0 && + [false, true, true].indexOf(true) === 1 && + [false, false, true].indexOf(true) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-20.js index 865d0cb0d0..6087091108 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-20.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-20.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 1; - - Object.defineProperty(child, "0", { - set: function () { }, - configurable: true - }); - - return Array.prototype.indexOf.call(child, undefined) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-20 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "0", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 1; + + Object.defineProperty(child, "0", { + set: function () { }, + configurable: true + }); + + return Array.prototype.indexOf.call(child, undefined) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-21.js index b58131bf5a..6a7d9febae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-21.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-21.js - * @description Array.prototype.indexOf - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - return 0 === [, ].indexOf(undefined); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-21 +description: > + Array.prototype.indexOf - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + return 0 === [, ].indexOf(undefined); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-22.js index 418abf42b0..dd300a9b94 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-22.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-22.js - * @description Array.prototype.indexOf - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - try { - Object.defineProperty(Object.prototype, "0", { - set: function () { }, - configurable: true - }); - return 0 === Array.prototype.indexOf.call({ length: 1 }, undefined); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-22 +description: > + Array.prototype.indexOf - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Object.prototype, "0", { + set: function () { }, + configurable: true + }); + return 0 === Array.prototype.indexOf.call({ length: 1 }, undefined); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-23.js index 624c2ea43f..8f9d4939c4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-23.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-23.js - * @description Array.prototype.indexOf - This object is the global object - */ - - -function testcase() { - - var targetObj = {}; - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = targetObj; - fnGlobalObject()[100] = "100"; - fnGlobalObject()[200] = "200"; - fnGlobalObject().length = 200; - return 0 === Array.prototype.indexOf.call(fnGlobalObject(), targetObj) && - 100 === Array.prototype.indexOf.call(fnGlobalObject(), "100") && - -1 === Array.prototype.indexOf.call(fnGlobalObject(), "200"); - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[100]; - delete fnGlobalObject()[200]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-23 +description: Array.prototype.indexOf - This object is the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var targetObj = {}; + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = targetObj; + fnGlobalObject()[100] = "100"; + fnGlobalObject()[200] = "200"; + fnGlobalObject().length = 200; + return 0 === Array.prototype.indexOf.call(fnGlobalObject(), targetObj) && + 100 === Array.prototype.indexOf.call(fnGlobalObject(), "100") && + -1 === Array.prototype.indexOf.call(fnGlobalObject(), "200"); + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[100]; + delete fnGlobalObject()[200]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js index c42475ef83..b783584faa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js - * @description Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[1]); - }; - - return func(true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-25 +description: > + Array.prototype.indexOf applied to Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[1]); + }; + + return func(true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js index 1dd42a99c3..1633f0eaa6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js - * @description Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters) - */ - - -function testcase() { - - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[2]); - }; - - return func(0, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-26 +description: > + Array.prototype.indexOf applied to Arguments object which + implements its own property get method (number of arguments equals + to number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[2]); + }; + + return func(0, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js index 52097dffae..ecabd18f17 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js - * @description Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var func = function (a, b) { - return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && - 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && - -1 === Array.prototype.indexOf.call(arguments, arguments[4]); - }; - - return func(0, false, 0, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-27 +description: > + Array.prototype.indexOf applied to Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && + 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && + -1 === Array.prototype.indexOf.call(arguments, arguments[4]); + }; + + return func(0, false, 0, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-28.js index 554516c25d..34e0bfb7d0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-28.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-28.js - * @description Array.prototype.indexOf - side-effects are visible in subsequent iterations on an Array - */ - - -function testcase() { - - var preIterVisible = false; - var arr = []; - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); - - return arr.indexOf(true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-28 +description: > + Array.prototype.indexOf - side-effects are visible in subsequent + iterations on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var arr = []; + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return false; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true + }); + + return arr.indexOf(true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-29.js index bef85f25c6..6d333922f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-29.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-29.js - * @description Array.prototype.indexOf - side-effects are visible in subsequent iterations on an Array-like object - */ - - -function testcase() { - - var preIterVisible = false; - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); - - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-29 +description: > + Array.prototype.indexOf - side-effects are visible in subsequent + iterations on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return false; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true + }); + + return Array.prototype.indexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js index 0c453edfe8..b321126b6d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js - * @description Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - try { - Array.prototype[0] = false; - return [true].indexOf(true) === 0; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-3 +description: > + Array.prototype.indexOf - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype[0] = false; + return [true].indexOf(true) === 0; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-30.js index 20c2f0fefa..1a8f401b88 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-30.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-30.js - * @description Array.prototype.indexOf - terminates iteration on unhandled exception on an Array - */ - - -function testcase() { - - var accessed = false; - var arr = []; - - Object.defineProperty(arr, "0", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); - - try { - arr.indexOf(true); - return false; - } catch (e) { - return (e instanceof TypeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-30 +description: > + Array.prototype.indexOf - terminates iteration on unhandled + exception on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arr = []; + + Object.defineProperty(arr, "0", { + get: function () { + throw new TypeError(); + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + accessed = true; + return true; + }, + configurable: true + }); + + try { + arr.indexOf(true); + return false; + } catch (e) { + return (e instanceof TypeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-31.js index 5ac4092d5d..0aeab6b9c4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-31.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-31.js - * @description Array.prototype.indexOf - terminates iteration on unhandled exception on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); - - try { - Array.prototype.indexOf.call(obj, true); - return false; - } catch (e) { - return (e instanceof TypeError) && !accessed; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-31 +description: > + Array.prototype.indexOf - terminates iteration on unhandled + exception on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + throw new TypeError(); + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + accessed = true; + return true; + }, + configurable: true + }); + + try { + Array.prototype.indexOf.call(obj, true); + return false; + } catch (e) { + return (e instanceof TypeError) && !accessed; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js index c02809cb01..4b1ff81dad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js - * @description Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - try { - Object.prototype[0] = false; - return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-4 +description: > + Array.prototype.indexOf - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.prototype[0] = false; + return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-5.js index 921a001c6a..a6a0db3d36 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-5.js - * @description Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - return 0 === [true].indexOf(true); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-5 +description: > + Array.prototype.indexOf - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + return 0 === [true].indexOf(true); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-6.js index 97710df6c3..c82728cf85 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-6.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-6.js - * @description Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-6 +description: > + Array.prototype.indexOf - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js index 4b320c21dc..49d9f5f7f0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js - * @description Array.prototype.indexOf - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - try { - Array.prototype[0] = true; - Array.prototype[1] = false; - Array.prototype[2] = "true"; - return 0 === [, , , ].indexOf(true) && - 1 === [, , , ].indexOf(false) && - 2 === [, , , ].indexOf("true"); - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-7 +description: > + Array.prototype.indexOf - element to be retrieved is inherited + data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype[0] = true; + Array.prototype[1] = false; + Array.prototype[2] = "true"; + return 0 === [, , , ].indexOf(true) && + 1 === [, , , ].indexOf(false) && + 2 === [, , , ].indexOf("true"); + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js index 82cf0242ef..d087613a40 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js - * @description Array.prototype.indexOf - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - try { - Object.prototype[0] = true; - Object.prototype[1] = false; - Object.prototype[2] = "true"; - return 0 === Array.prototype.indexOf.call({ length: 3 }, true) && - 1 === Array.prototype.indexOf.call({ length: 3 }, false) && - 2 === Array.prototype.indexOf.call({ length: 3 }, "true"); - } finally { - delete Object.prototype[0]; - delete Object.prototype[1]; - delete Object.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-8 +description: > + Array.prototype.indexOf - element to be retrieved is inherited + data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.prototype[0] = true; + Object.prototype[1] = false; + Object.prototype[2] = "true"; + return 0 === Array.prototype.indexOf.call({ length: 3 }, true) && + 1 === Array.prototype.indexOf.call({ length: 3 }, false) && + 2 === Array.prototype.indexOf.call({ length: 3 }, "true"); + } finally { + delete Object.prototype[0]; + delete Object.prototype[1]; + delete Object.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-9.js index f25525686c..bc96614778 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-9.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-9.js - * @description Array.prototype.indexOf - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var arr = [, , , ]; - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - return arr.indexOf(0) === 0 && arr.indexOf(1) === 1 && arr.indexOf(2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-i-9 +description: > + Array.prototype.indexOf - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [, , , ]; + Object.defineProperty(arr, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + return arr.indexOf(0) === 0 && arr.indexOf(1) === 1 && arr.indexOf(2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js index 40130e6c28..777d7f53b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js - * @description Array.prototype.indexOf - type of array element is different from type of search element - */ - - -function testcase() { - - return ["true"].indexOf(true) === -1 && - ["0"].indexOf(0) === -1 && - [false].indexOf(0) === -1 && - [undefined].indexOf(0) === -1 && - [null].indexOf(0) === -1 && - [[]].indexOf(0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-1 +description: > + Array.prototype.indexOf - type of array element is different from + type of search element +includes: [runTestCase.js] +---*/ + +function testcase() { + + return ["true"].indexOf(true) === -1 && + ["0"].indexOf(0) === -1 && + [false].indexOf(0) === -1 && + [undefined].indexOf(0) === -1 && + [null].indexOf(0) === -1 && + [[]].indexOf(0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js index 4434cc59bb..2a9a926f3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js - * @description Array.prototype.indexOf - both array element and search element are Boolean type, and they have same value - */ - - -function testcase() { - - return [false, true].indexOf(true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-10 +description: > + Array.prototype.indexOf - both array element and search element + are Boolean type, and they have same value +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [false, true].indexOf(true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js index 835f5859d8..125f9403f3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js - * @description Array.prototype.indexOf - both array element and search element are Object type, and they refer to the same object - */ - - -function testcase() { - - var obj1 = {}; - var obj2 = {}; - var obj3 = obj2; - return [{}, obj1, obj2].indexOf(obj3) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-11 +description: > + Array.prototype.indexOf - both array element and search element + are Object type, and they refer to the same object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj1 = {}; + var obj2 = {}; + var obj3 = obj2; + return [{}, obj1, obj2].indexOf(obj3) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js index b6d245e6e7..f9ace5aeff 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js - * @description Array.prototype.indexOf - both type of array element and type of search element are Undefined - */ - - -function testcase() { - - return [undefined].indexOf() === 0 && [undefined].indexOf(undefined) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-2 +description: > + Array.prototype.indexOf - both type of array element and type of + search element are Undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [undefined].indexOf() === 0 && [undefined].indexOf(undefined) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js index 4468c69e00..1e11b82369 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js - * @description Array.prototype.indexOf - both type of array element and type of search element are null - */ - - -function testcase() { - - return [null].indexOf(null) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-3 +description: > + Array.prototype.indexOf - both type of array element and type of + search element are null +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [null].indexOf(null) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js index 1c02cef3eb..bc0a7f7552 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js - * @description Array.prototype.indexOf - search element is NaN - */ - - -function testcase() { - - return [+NaN, NaN, -NaN].indexOf(NaN) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-4 +description: Array.prototype.indexOf - search element is NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [+NaN, NaN, -NaN].indexOf(NaN) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js index 3727b52898..91c3dfd9e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js - * @description Array.prototype.indexOf - search element is -NaN - */ - - -function testcase() { - - return [+NaN, NaN, -NaN].indexOf(-NaN) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-5 +description: Array.prototype.indexOf - search element is -NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [+NaN, NaN, -NaN].indexOf(-NaN) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js index bcb7d59af9..faca0e33fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js - * @description Array.prototype.indexOf - array element is +0 and search element is -0 - */ - - -function testcase() { - - return [+0].indexOf(-0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-6 +description: > + Array.prototype.indexOf - array element is +0 and search element + is -0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [+0].indexOf(-0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js index e85a7b228d..7545bf9599 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js - * @description Array.prototype.indexOf - array element is -0 and search element is +0 - */ - - -function testcase() { - - return [-0].indexOf(+0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-7 +description: > + Array.prototype.indexOf - array element is -0 and search element + is +0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [-0].indexOf(+0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js index eecaaa28d8..f57e0f8c38 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js - * @description Array.prototype.indexOf - both array element and search element are Number, and they have same value - */ - - -function testcase() { - - return [-1, 0, 1].indexOf(1) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-8 +description: > + Array.prototype.indexOf - both array element and search element + are Number, and they have same value +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [-1, 0, 1].indexOf(1) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js index b6a72a3739..24d3bb0cbe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js - * @description Array.prototype.indexOf - both array element and search element are String, and they have exactly the same sequence of characters - */ - - -function testcase() { - - return ["", "ab", "bca", "abc"].indexOf("abc") === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-ii-9 +description: > + Array.prototype.indexOf - both array element and search element + are String, and they have exactly the same sequence of characters +includes: [runTestCase.js] +---*/ + +function testcase() { + + return ["", "ab", "bca", "abc"].indexOf("abc") === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js index 78a042b12f..2474698d48 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js - * @description Array.prototype.indexOf - returns index of last one when more than two elements in array are eligible - */ - - -function testcase() { - - return [1, 2, 2, 1, 2].indexOf(2) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-iii-1 +description: > + Array.prototype.indexOf - returns index of last one when more than + two elements in array are eligible +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 2, 1, 2].indexOf(2) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-2.js index 6c7b3e617e..d7d4e6ff4b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-2.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-2.js - * @description Array.prototype.indexOf - returns without visiting subsequent element once search value is found - */ - - -function testcase() { - var arr = [1, 2, , 1, 2]; - var elementThirdAccessed = false; - var elementFifthAccessed = false; - - Object.defineProperty(arr, "2", { - get: function () { - elementThirdAccessed = true; - return 2; - }, - configurable: true - }); - Object.defineProperty(arr, "4", { - get: function () { - elementFifthAccessed = true; - return 2; - }, - configurable: true - }); - - arr.indexOf(2); - return !elementThirdAccessed && !elementFifthAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.14-9-b-iii-2 +description: > + Array.prototype.indexOf - returns without visiting subsequent + element once search value is found +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [1, 2, , 1, 2]; + var elementThirdAccessed = false; + var elementFifthAccessed = false; + + Object.defineProperty(arr, "2", { + get: function () { + elementThirdAccessed = true; + return 2; + }, + configurable: true + }); + Object.defineProperty(arr, "4", { + get: function () { + elementFifthAccessed = true; + return 2; + }, + configurable: true + }); + + arr.indexOf(2); + return !elementThirdAccessed && !elementFifthAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js index 90f3b8f8b4..c5efa44bf3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js - * @description Array.prototype.lastIndexOf must exist as a function - */ - - -function testcase() { - var f = Array.prototype.lastIndexOf; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-0-1 +description: Array.prototype.lastIndexOf must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.lastIndexOf; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js index baf04e91e5..d3fd10e14b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js - * @description Array.prototype.lastIndexOf has a length property whose value is 1. - */ - - -function testcase() { - if (Array.prototype.lastIndexOf.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-0-2 +description: Array.prototype.lastIndexOf has a length property whose value is 1. +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.lastIndexOf.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js index c80cb05486..f951c919a0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js - * @description Array.prototype.lastIndexOf applied to undefined throws a TypeError - */ - - -function testcase() { - - try { - Array.prototype.lastIndexOf.call(undefined); - return false; - } catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-1 +description: Array.prototype.lastIndexOf applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Array.prototype.lastIndexOf.call(undefined); + return false; + } catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js index 17f2838b55..9dd8c9e7ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js - * @description Array.prototype.lastIndexOf applied to the Math object - */ - - -function testcase() { - - try { - Math.length = 2; - Math[1] = 100; - return 1 === Array.prototype.lastIndexOf.call(Math, 100); - } finally { - delete Math.length; - delete Math[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-10 +description: Array.prototype.lastIndexOf applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Math.length = 2; + Math[1] = 100; + return 1 === Array.prototype.lastIndexOf.call(Math, 100); + } finally { + delete Math.length; + delete Math[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js index 5492798c9e..fa08460cd1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js - * @description Array.prototype.lastIndexOf applied to Date object - */ - - -function testcase() { - - var obj = new Date(); - obj.length = 2; - obj[1] = true; - - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-11 +description: Array.prototype.lastIndexOf applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Date(); + obj.length = 2; + obj[1] = true; + + return Array.prototype.lastIndexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js index 55949f407e..d2cf236d7c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js - * @description Array.prototype.lastIndexOf applied to RegExp object - */ - - -function testcase() { - - var obj = new RegExp("afdasf"); - obj.length = 100; - obj[1] = "afdasf"; - - return Array.prototype.lastIndexOf.call(obj, "afdasf") === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-12 +description: Array.prototype.lastIndexOf applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new RegExp("afdasf"); + obj.length = 100; + obj[1] = "afdasf"; + + return Array.prototype.lastIndexOf.call(obj, "afdasf") === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js index 35e6aff514..74ce99c97d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js - * @description Array.prototype.lastIndexOf applied to the JSON object - */ - - -function testcase() { - - var targetObj = {}; - try { - JSON[3] = targetObj; - JSON.length = 5; - return 3 === Array.prototype.lastIndexOf.call(JSON, targetObj); - } finally { - delete JSON[3]; - delete JSON.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-13 +description: Array.prototype.lastIndexOf applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var targetObj = {}; + try { + JSON[3] = targetObj; + JSON.length = 5; + return 3 === Array.prototype.lastIndexOf.call(JSON, targetObj); + } finally { + delete JSON[3]; + delete JSON.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js index 82278e2bd0..a0014654ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js - * @description Array.prototype.lastIndexOf applied to Error object - */ - - -function testcase() { - - var obj = new SyntaxError(); - obj.length = 2; - obj[1] = Infinity; - - return Array.prototype.lastIndexOf.call(obj, Infinity) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-14 +description: Array.prototype.lastIndexOf applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new SyntaxError(); + obj.length = 2; + obj[1] = Infinity; + + return Array.prototype.lastIndexOf.call(obj, Infinity) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js index 0b1eedb590..46eaac5c49 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js - * @description Array.prototype.lastIndexOf applied to the Arguments object - */ - - -function testcase() { - - var obj = (function fun() { - return arguments; - }(1, 2, 3)); - - return Array.prototype.lastIndexOf.call(obj, 2) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-15 +description: Array.prototype.lastIndexOf applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = (function fun() { + return arguments; + }(1, 2, 3)); + + return Array.prototype.lastIndexOf.call(obj, 2) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-17.js index da75a413e4..85cf257df2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-17.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-17.js - * @description Array.prototype.lastIndexOf applied to the global object - */ - - -function testcase() { - var targetObj = ["global"]; - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[1] = targetObj; - fnGlobalObject().length = 3; - return 1 === Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj); - } finally { - delete fnGlobalObject()[1]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-17 +description: Array.prototype.lastIndexOf applied to the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var targetObj = ["global"]; + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[1] = targetObj; + fnGlobalObject().length = 3; + return 1 === Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj); + } finally { + delete fnGlobalObject()[1]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js index 5365ac0da0..1c580af6bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js - * @description Array.prototype.lastIndexOf applied to null throws a TypeError - */ - - -function testcase() { - - try { - Array.prototype.lastIndexOf.call(null); - return false; - } catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-2 +description: Array.prototype.lastIndexOf applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Array.prototype.lastIndexOf.call(null); + return false; + } catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js index 6a050fd2a4..12973e6a43 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js - * @description Array.prototype.lastIndexOf applied to boolean primitive - */ - - -function testcase() { - - try { - Boolean.prototype[1] = true; - Boolean.prototype.length = 2; - - return 1 === Array.prototype.lastIndexOf.call(true, true); - } finally { - delete Boolean.prototype[1]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-3 +description: Array.prototype.lastIndexOf applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Boolean.prototype[1] = true; + Boolean.prototype.length = 2; + + return 1 === Array.prototype.lastIndexOf.call(true, true); + } finally { + delete Boolean.prototype[1]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js index 6112e7830b..d89dec5bfb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js - * @description Array.prototype.lastIndexOf applied to Boolean object - */ - - -function testcase() { - - var obj = new Boolean(false); - obj.length = 2; - obj[1] = true; - - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-4 +description: Array.prototype.lastIndexOf applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Boolean(false); + obj.length = 2; + obj[1] = true; + + return Array.prototype.lastIndexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js index 4adfdb470f..d2c3bf25cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js - * @description Array.prototype.lastIndexOf applied to number primitive - */ - - -function testcase() { - - try { - Number.prototype[1] = isNaN; - Number.prototype.length = 2; - return 1 === Array.prototype.lastIndexOf.call(5, isNaN); - } finally { - delete Number.prototype[1]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-5 +description: Array.prototype.lastIndexOf applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Number.prototype[1] = isNaN; + Number.prototype.length = 2; + return 1 === Array.prototype.lastIndexOf.call(5, isNaN); + } finally { + delete Number.prototype[1]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js index 33e2791dfc..2d4df4a1c2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js - * @description Array.prototype.lastIndexOf applied to Number object - */ - - -function testcase() { - - var obj = new Number(-3); - obj.length = 2; - obj[1] = true; - - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-6 +description: Array.prototype.lastIndexOf applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Number(-3); + obj.length = 2; + obj[1] = true; + + return Array.prototype.lastIndexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js index 8d0b871dcb..ae4eff6aab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js - * @description Array.prototype.lastIndexOf applied to string primitive - */ - - -function testcase() { - - return Array.prototype.lastIndexOf.call("abc", "c") === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-7 +description: Array.prototype.lastIndexOf applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + return Array.prototype.lastIndexOf.call("abc", "c") === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js index 70b73d38bd..5e0fb607a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js - * @description Array.prototype.lastIndexOf applied to String object - */ - - -function testcase() { - - var obj = new String("undefined"); - - return Array.prototype.lastIndexOf.call(obj, "f") === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-8 +description: Array.prototype.lastIndexOf applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new String("undefined"); + + return Array.prototype.lastIndexOf.call(obj, "f") === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js index df55f36e88..b6a379bee0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js - * @description Array.prototype.lastIndexOf applied to Function object - */ - - -function testcase() { - - var obj = function (a, b) { - return a + b; - }; - obj[1] = true; - - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-1-9 +description: Array.prototype.lastIndexOf applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function (a, b) { + return a + b; + }; + obj[1] = true; + + return Array.prototype.lastIndexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js index 102b1d1ca5..11993ee0a0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js - * @description Array.prototype.lastIndexOf - 'length' is own data property on an Array-like object - */ - - -function testcase() { - var obj = { 1: null, 2: undefined, length: 2 }; - - return Array.prototype.lastIndexOf.call(obj, null) === 1 && - Array.prototype.lastIndexOf.call(obj, undefined) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-1 +description: > + Array.prototype.lastIndexOf - 'length' is own data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 1: null, 2: undefined, length: 2 }; + + return Array.prototype.lastIndexOf.call(obj, null) === 1 && + Array.prototype.lastIndexOf.call(obj, undefined) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js index 935c5ba711..95fe8874da 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js - * @description Array.prototype.lastIndexOf - 'length' is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = 1; - child[2] = 2; - - return Array.prototype.lastIndexOf.call(child, 1) === 1 && - Array.prototype.lastIndexOf.call(child, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-10 +description: > + Array.prototype.lastIndexOf - 'length' is inherited accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = 1; + child[2] = 2; + + return Array.prototype.lastIndexOf.call(child, 1) === 1 && + Array.prototype.lastIndexOf.call(child, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js index 37247be7d5..69077c291c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js - * @description Array.prototype.lastIndexOf - 'length' is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var obj = { 0: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-11 +description: > + Array.prototype.lastIndexOf - 'length' is own accessor property + without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 1 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(obj, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js index 3df74f6061..fd450cdd45 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js - * @description Array.prototype.lastIndexOf - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 20; - }, - configurable: true - }); - - var obj = { 1: 1 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(obj, 1) === -1; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-12 +description: > + Array.prototype.lastIndexOf - 'length' is own accessor property + without a get function that overrides an inherited accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 20; + }, + configurable: true + }); + + var obj = { 1: 1 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(obj, 1) === -1; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js index ff0aab23c3..f1838f0ea5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js - * @description Array.prototype.lastIndexOf - 'length' is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[0] = true; - - return Array.prototype.lastIndexOf.call(child, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-13 +description: > + Array.prototype.lastIndexOf - 'length' is inherited accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[0] = true; + + return Array.prototype.lastIndexOf.call(child, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js index 5ad1375b27..887afabc53 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js - * @description Array.prototype.lastIndexOf - 'length' is undefined property on an Array-like object - */ - - -function testcase() { - - var obj = { 0: null, 1: undefined }; - - return Array.prototype.lastIndexOf.call(obj, null) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-14 +description: > + Array.prototype.lastIndexOf - 'length' is undefined property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: null, 1: undefined }; + + return Array.prototype.lastIndexOf.call(obj, null) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-15.js index 5f50bfff6b..bcd6079026 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-15.js @@ -1,33 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-15.js - * @description Array.prototype.lastIndexOf - 'length' is property of the global object - */ - - -function testcase() { - var targetObj = {}; - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject().length = 2; - - fnGlobalObject()[1] = targetObj; - if (Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) !== 1) { - return false; - } - - fnGlobalObject()[1] = {}; - fnGlobalObject()[2] = targetObj; - - return Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) === -1; - } finally { - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-15 +description: > + Array.prototype.lastIndexOf - 'length' is property of the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var targetObj = {}; + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject().length = 2; + + fnGlobalObject()[1] = targetObj; + if (Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) !== 1) { + return false; + } + + fnGlobalObject()[1] = {}; + fnGlobalObject()[2] = targetObj; + + return Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) === -1; + } finally { + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js index 2a910d8d4a..d6967645a5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js - * @description Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method - */ - - -function testcase() { - - var targetObj = function () { }; - var func = function (a, b) { - arguments[2] = function () { }; - return Array.prototype.lastIndexOf.call(arguments, targetObj) === 1 && - Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1; - }; - - return func(0, targetObj); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-17 +description: > + Array.prototype.lastIndexOf applied to Arguments object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var targetObj = function () { }; + var func = function (a, b) { + arguments[2] = function () { }; + return Array.prototype.lastIndexOf.call(arguments, targetObj) === 1 && + Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1; + }; + + return func(0, targetObj); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js index 1608f1b39b..7d87f3b49a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js - * @description Array.prototype.lastIndexOf applied to String object which implements its own property get method - */ - - -function testcase() { - - var str = new String("012"); - try { - String.prototype[3] = "3"; - return Array.prototype.lastIndexOf.call(str, "2") === 2 && - Array.prototype.lastIndexOf.call(str, "3") === -1; - } finally { - delete String.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-18 +description: > + Array.prototype.lastIndexOf applied to String object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = new String("012"); + try { + String.prototype[3] = "3"; + return Array.prototype.lastIndexOf.call(str, "2") === 2 && + Array.prototype.lastIndexOf.call(str, "3") === -1; + } finally { + delete String.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js index 35a7b79bb7..640097ae6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js - * @description Array.prototype.lastIndexOf applied to String object which implements its own property get method - */ - - -function testcase() { - - var obj = function (a, b) { - return a + b; - }; - obj[1] = "b"; - obj[2] = "c"; - - return Array.prototype.lastIndexOf.call(obj, obj[1]) === 1 && - Array.prototype.lastIndexOf.call(obj, obj[2]) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-19 +description: > + Array.prototype.lastIndexOf applied to String object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function (a, b) { + return a + b; + }; + obj[1] = "b"; + obj[2] = "c"; + + return Array.prototype.lastIndexOf.call(obj, obj[1]) === 1 && + Array.prototype.lastIndexOf.call(obj, obj[2]) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js index f8e4c834e8..e4c8f2fede 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js - * @description Array.prototype.lastIndexOf - 'length' is own data property on an Array - */ - - -function testcase() { - var targetObj = {}; - try { - Array.prototype[2] = targetObj; - - return [0, targetObj].lastIndexOf(targetObj) === 1 && - [0, 1].lastIndexOf(targetObj) === -1; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-2 +description: > + Array.prototype.lastIndexOf - 'length' is own data property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + try { + Array.prototype[2] = targetObj; + + return [0, targetObj].lastIndexOf(targetObj) === 1 && + [0, 1].lastIndexOf(targetObj) === -1; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js index 97b8b2b410..b886e443fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js - * @description Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var proto = {length: 0}; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[1] = child; - - return Array.prototype.lastIndexOf.call(child, child) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-3 +description: > + Array.prototype.lastIndexOf - 'length' is own data property that + overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = {length: 0}; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[1] = child; + + return Array.prototype.lastIndexOf.call(child, child) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js index 6b32c7ba74..6dc613ff7b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js - * @description Array.prototype.lastIndexOf when 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var targetObj = {}; - var arrProtoLen; - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - return [0, targetObj, 2].lastIndexOf(targetObj) === 1; - } finally { - Array.prototype.length = arrProtoLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-4 +description: > + Array.prototype.lastIndexOf when 'length' is own data property + that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var targetObj = {}; + var arrProtoLen; + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + return [0, targetObj, 2].lastIndexOf(targetObj) === 1; + } finally { + Array.prototype.length = arrProtoLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js index 79da9a4678..5552efda74 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js - * @description Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[1] = null; - - return Array.prototype.lastIndexOf.call(child, null) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-5 +description: > + Array.prototype.lastIndexOf - 'length' is own data property that + overrides an inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[1] = null; + + return Array.prototype.lastIndexOf.call(child, null) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js index 98caba2ee5..61910e9204 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js - * @description Array.prototype.lastIndexOf - 'length' is an inherited data property on an Array-like object - */ - - -function testcase() { - - var proto = { length: 2 }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = "x"; - child[2] = "y"; - - return Array.prototype.lastIndexOf.call(child, "x") === 1 && - Array.prototype.lastIndexOf.call(child, "y") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-6 +description: > + Array.prototype.lastIndexOf - 'length' is an inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { length: 2 }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = "x"; + child[2] = "y"; + + return Array.prototype.lastIndexOf.call(child, "x") === 1 && + Array.prototype.lastIndexOf.call(child, "y") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js index d5320c3d5c..cc458628c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js - * @description Array.prototype.lastIndexOf - 'length' is own accessor property on an Array-like object - */ - - -function testcase() { - - var obj = { 1: true, 2: false }; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-7 +description: > + Array.prototype.lastIndexOf - 'length' is own accessor property on + an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: true, 2: false }; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(obj, true) === 1 && + Array.prototype.lastIndexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js index 4948d4c43e..5a09e09ad6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js - * @description Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var proto = { length: 0 }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = eval; - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(child, eval) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-8 +description: > + Array.prototype.lastIndexOf - 'length' is own accessor property + that overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var proto = { length: 0 }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = eval; + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(child, eval) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js index 2fc602265a..208a47e8a3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js - * @description Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child[1] = true; - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(child, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-2-9 +description: > + Array.prototype.lastIndexOf - 'length' is own accessor property + that overrides an inherited accessor property on an Array-like + object +includes: [runTestCase.js] +---*/ + +function testcase() { + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child[1] = true; + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(child, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js index 5d08d458a5..360c87ba0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js - * @description Array.prototype.lastIndexOf - value of 'length' is undefined - */ - - -function testcase() { - - var obj = { 0: 1, 1: 1, length: undefined }; - - return Array.prototype.lastIndexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-1 +description: Array.prototype.lastIndexOf - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 1, 1: 1, length: undefined }; + + return Array.prototype.lastIndexOf.call(obj, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js index 4b680a5a47..3a99201dcf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - - var obj = { 0: 0, length: NaN }; - - return Array.prototype.lastIndexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-10 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, length: NaN }; + + return Array.prototype.lastIndexOf.call(obj, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js index 38c8861d60..965fda0f50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string containing positive number - */ - - -function testcase() { - - var obj = {1: true, 2: false, length: "2"}; - - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-11 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string + containing positive number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {1: true, 2: false, length: "2"}; + + return Array.prototype.lastIndexOf.call(obj, true) === 1 && + Array.prototype.lastIndexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js index c8f5ea3e08..967680c500 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string containing negative number - */ - - -function testcase() { - - var obj = {1: null, 2: undefined, length: "-4294967294"}; - - return Array.prototype.lastIndexOf.call(obj, null) === 1 && - Array.prototype.lastIndexOf.call(obj, undefined) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-12 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string + containing negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {1: null, 2: undefined, length: "-4294967294"}; + + return Array.prototype.lastIndexOf.call(obj, null) === 1 && + Array.prototype.lastIndexOf.call(obj, undefined) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js index 00bd45fbd1..54ac8882c3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string containing a decimal number - */ - - -function testcase() { - - var obj = { 4: 4, 5: 5, length: "5.512345" }; - - return Array.prototype.lastIndexOf.call(obj, 4) === 4 && - Array.prototype.lastIndexOf.call(obj, 5) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-13 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string + containing a decimal number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 4: 4, 5: 5, length: "5.512345" }; + + return Array.prototype.lastIndexOf.call(obj, 4) === 4 && + Array.prototype.lastIndexOf.call(obj, 5) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js index e75f1cbac3..4bd755f3ef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var objOne = { 0: true, 1: true, length: "Infinity" }; - var objTwo = { 0: true, 1: true, length: "+Infinity" }; - var objThree = { 0: true, 1: true, length: "-Infinity" }; - - return Array.prototype.lastIndexOf.call(objOne, true) === -1 && - Array.prototype.lastIndexOf.call(objTwo, true) === -1 && - Array.prototype.lastIndexOf.call(objThree, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-14 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string + containing +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objOne = { 0: true, 1: true, length: "Infinity" }; + var objTwo = { 0: true, 1: true, length: "+Infinity" }; + var objThree = { 0: true, 1: true, length: "-Infinity" }; + + return Array.prototype.lastIndexOf.call(objOne, true) === -1 && + Array.prototype.lastIndexOf.call(objTwo, true) === -1 && + Array.prototype.lastIndexOf.call(objThree, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js index a2a8e3cbc1..4afbb4d2a5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string containing an exponential number - */ - - -function testcase() { - - var obj = {229: 229, 230: 2.3E2, length: "2.3E2"}; - - return Array.prototype.lastIndexOf.call(obj, 229) === 229 && - Array.prototype.lastIndexOf.call(obj, 2.3E2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-15 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string + containing an exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {229: 229, 230: 2.3E2, length: "2.3E2"}; + + return Array.prototype.lastIndexOf.call(obj, 229) === 229 && + Array.prototype.lastIndexOf.call(obj, 2.3E2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js index ddee9b9168..79e1227971 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string which is able to be converted into hex number - */ - - -function testcase() { - - var obj = { 2573: 2573, 2574: 0x000A0E, length: "0x000A0E" }; - - return Array.prototype.lastIndexOf.call(obj, 2573) === 2573 && - Array.prototype.lastIndexOf.call(obj, 0x000A0E) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-16 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string which + is able to be converted into hex number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 2573: 2573, 2574: 0x000A0E, length: "0x000A0E" }; + + return Array.prototype.lastIndexOf.call(obj, 2573) === 2573 && + Array.prototype.lastIndexOf.call(obj, 0x000A0E) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js index 8c19a878a5..486cdd96f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - - var obj = { 1: 1, 2: 2, length: "0002.0" }; - - return Array.prototype.lastIndexOf.call(obj, 1) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-17 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string + containing a number with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: 1, 2: 2, length: "0002.0" }; + + return Array.prototype.lastIndexOf.call(obj, 1) === 1 && + Array.prototype.lastIndexOf.call(obj, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js index 6bca436442..9cc13f4f49 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js - * @description Array.prototype.lastIndexOf - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - var targetObj = new String("123abc123"); - var obj = { 0: targetObj, length: "123abc123" }; - - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-18 +description: > + Array.prototype.lastIndexOf - value of 'length' is a string that + can't convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = new String("123abc123"); + var obj = { 0: targetObj, length: "123abc123" }; + + return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js index 970f8c5d10..43e324481a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js - * @description Array.prototype.lastIndexOf - value of 'length' is an Object which has an own toString method - */ - - -function testcase() { - - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - var targetObj = fnGlobalObject(); - var obj = { - 1: targetObj, - 2: 2, - - length: { - toString: function () { - return '2'; - } - } - }; - - return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-19 +description: > + Array.prototype.lastIndexOf - value of 'length' is an Object which + has an own toString method +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + // objects inherit the default valueOf() method from Object + // that simply returns itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + var targetObj = fnGlobalObject(); + var obj = { + 1: targetObj, + 2: 2, + + length: { + toString: function () { + return '2'; + } + } + }; + + return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && + Array.prototype.lastIndexOf.call(obj, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js index eb1f473b85..2e431b9e3c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js - * @description Array.prototype.lastIndexOf return -1 when value of 'length' is a boolean (value is true) - */ - - -function testcase() { - var obj = { 0: 0, 1: 1, length: true }; - return Array.prototype.lastIndexOf.call(obj, 0) === 0 && - Array.prototype.lastIndexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-2 +description: > + Array.prototype.lastIndexOf return -1 when value of 'length' is a + boolean (value is true) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 0: 0, 1: 1, length: true }; + return Array.prototype.lastIndexOf.call(obj, 0) === 0 && + Array.prototype.lastIndexOf.call(obj, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js index 51add47e6b..885961c36c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js - * @description Array.prototype.lastIndexOf - value of 'length' is an Object which has an own valueOf method - */ - - -function testcase() { - - //valueOf method will be invoked first, since hint is Number - var obj = { - 1: true, - 2: 2, - - length: { - valueOf: function () { - return 2; - } - } - }; - - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-20 +description: > + Array.prototype.lastIndexOf - value of 'length' is an Object which + has an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + + //valueOf method will be invoked first, since hint is Number + var obj = { + 1: true, + 2: 2, + + length: { + valueOf: function () { + return 2; + } + } + }; + + return Array.prototype.lastIndexOf.call(obj, true) === 1 && + Array.prototype.lastIndexOf.call(obj, 2) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js index 8dc121efca..c86c0821d8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js - * @description Array.prototype.lastIndexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var targetObj = this; - var obj = { - 1: targetObj, - length: { - toString: function () { - toStringAccessed = true; - return '3'; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; - - return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-21 +description: > + Array.prototype.lastIndexOf - 'length' is an object that has an + own valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var targetObj = this; + var obj = { + 1: targetObj, + length: { + toString: function () { + toStringAccessed = true; + return '3'; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + }; + + return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && toStringAccessed && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js index ae009540e9..c9244211f7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js - * @description Array.prototype.lastIndexOf throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var obj = { - 1: true, - length: { - toString: function () { - toStringAccessed = true; - return {}; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - } - }; - - try { - Array.prototype.lastIndexOf.call(obj, true); - return false; - } catch (e) { - return toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-22 +description: > + Array.prototype.lastIndexOf throws TypeError exception when + 'length' is an object with toString and valueOf methods that don�t + return primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var obj = { + 1: true, + length: { + toString: function () { + toStringAccessed = true; + return {}; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + } + }; + + try { + Array.prototype.lastIndexOf.call(obj, true); + return false; + } catch (e) { + return toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js index fce75d9f26..d6d6a00271 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js - * @description Array.prototype.lastIndexOf uses inherited valueOf method when 'length' is an object with an own toString and an inherited valueOf methods - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 2; - }; - - var obj = { - 1: child, - length: child - }; - - return Array.prototype.lastIndexOf.call(obj, child) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-23 +description: > + Array.prototype.lastIndexOf uses inherited valueOf method when + 'length' is an object with an own toString and an inherited + valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child.toString = function () { + toStringAccessed = true; + return 2; + }; + + var obj = { + 1: child, + length: child + }; + + return Array.prototype.lastIndexOf.call(obj, child) === 1 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js index f3f94d3fbf..2765933615 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js - * @description Array.prototype.lastIndexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var obj = { 122: true, 123: false, length: 123.5 }; - - return Array.prototype.lastIndexOf.call(obj, true) === 122 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-24 +description: > + Array.prototype.lastIndexOf - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 122: true, 123: false, length: 123.5 }; + + return Array.prototype.lastIndexOf.call(obj, true) === 122 && + Array.prototype.lastIndexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js index c15573aa42..e22cc2b061 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js - * @description Array.prototype.lastIndexOf - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var obj = { 1: true, 2: false, length: -4294967294.5 }; - - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-25 +description: > + Array.prototype.lastIndexOf - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: true, 2: false, length: -4294967294.5 }; + + return Array.prototype.lastIndexOf.call(obj, true) === 1 && + Array.prototype.lastIndexOf.call(obj, false) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js index a893151b40..4e9748739a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js - * @description Array.prototype.lastIndexOf - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var targetObj = {}; - var obj = { - 0: targetObj, - 4294967294: targetObj, - 4294967295: targetObj, - length: 4294967296 - }; - - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; //verify length is 0 finally - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-28 +description: > + Array.prototype.lastIndexOf - value of 'length' is boundary value + (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var targetObj = {}; + var obj = { + 0: targetObj, + 4294967294: targetObj, + 4294967295: targetObj, + length: 4294967296 + }; + + return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; //verify length is 0 finally + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js index c0fd45ecec..65ddbb1fe2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js - * @description Array.prototype.lastIndexOf - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - - var targetObj = {}; - var obj = { - 0: targetObj, - 1: 4294967297, - length: 4294967297 - }; - - return Array.prototype.lastIndexOf.call(obj, targetObj) === 0 && - Array.prototype.lastIndexOf.call(obj, 4294967297) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-29 +description: > + Array.prototype.lastIndexOf - value of 'length' is boundary value + (2^32 + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var targetObj = {}; + var obj = { + 0: targetObj, + 1: 4294967297, + length: 4294967297 + }; + + return Array.prototype.lastIndexOf.call(obj, targetObj) === 0 && + Array.prototype.lastIndexOf.call(obj, 4294967297) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js index 9e0186af93..69be7d26dc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var obj = { 0: "undefined", length: 0 }; - - return Array.prototype.lastIndexOf.call(obj, "undefined") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-3 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: "undefined", length: 0 }; + + return Array.prototype.lastIndexOf.call(obj, "undefined") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js index 0f1c2bbfff..1a1e6c7b78 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var obj = { 0: true, length: -0 }; - - return Array.prototype.lastIndexOf.call(obj, true) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-4 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: true, length: -0 }; + + return Array.prototype.lastIndexOf.call(obj, true) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js index d6031ef6e6..fae37befb6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var obj = { 0: +0, length: +0 }; - - return Array.prototype.lastIndexOf.call(obj, +0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-5 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: +0, length: +0 }; + + return Array.prototype.lastIndexOf.call(obj, +0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js index ed166929ef..6a84474d1d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is a positive number) - */ - - -function testcase() { - - var obj = { 99: true, 100: 100, length: 100 }; - - return Array.prototype.lastIndexOf.call(obj, true) === 99 && - Array.prototype.lastIndexOf.call(obj, 100) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-6 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is a positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 99: true, 100: 100, length: 100 }; + + return Array.prototype.lastIndexOf.call(obj, true) === 99 && + Array.prototype.lastIndexOf.call(obj, 100) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js index 995d60ec7f..b72126cfc8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is a negative number) - */ - - -function testcase() { - - var obj = { 4: -Infinity, 5: Infinity, length: 5 - Math.pow(2, 32) }; - - return Array.prototype.lastIndexOf.call(obj, -Infinity) === 4 && - Array.prototype.lastIndexOf.call(obj, Infinity) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-7 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is a negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 4: -Infinity, 5: Infinity, length: 5 - Math.pow(2, 32) }; + + return Array.prototype.lastIndexOf.call(obj, -Infinity) === 4 && + Array.prototype.lastIndexOf.call(obj, Infinity) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js index 62daa6fda7..93d4f2523b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var obj = { 0: 0, length: Infinity }; - - return Array.prototype.lastIndexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-8 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, length: Infinity }; + + return Array.prototype.lastIndexOf.call(obj, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js index 514b1753b5..b687d20153 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js - * @description Array.prototype.lastIndexOf - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var obj = { 0: 0, length: -Infinity }; - - return Array.prototype.lastIndexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-3-9 +description: > + Array.prototype.lastIndexOf - value of 'length' is a number (value + is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, length: -Infinity }; + + return Array.prototype.lastIndexOf.call(obj, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js index c80d4b4c1a..551ca78777 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 (empty array) - */ - - -function testcase() { - var i = [].lastIndexOf(42); - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-1 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 (empty + array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var i = [].lastIndexOf(42); + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js index 252d68448f..d7888c837a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js - * @description Array.prototype.lastIndexOf - 'length' is a number of value -6e-1 - */ - - -function testcase() { - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-10 +description: Array.prototype.lastIndexOf - 'length' is a number of value -6e-1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = []; + var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; + return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js index c8148f6abe..9636cd58f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js - * @description Array.prototype.lastIndexOf - 'length' is an empty string - */ - - -function testcase() { - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: "" }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-11 +description: Array.prototype.lastIndexOf - 'length' is an empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = []; + var obj = { 0: targetObj, 100: targetObj, length: "" }; + return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js index 596c724441..aa53a30a45 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion)) - */ - - -function testcase() { - - var i = Array.prototype.lastIndexOf.call({length: null}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-2 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length + overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.lastIndexOf.call({length: null}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js index d2684a546c..e6c4ba7ad9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length overridden to false (type conversion)) - */ - - -function testcase() { - - var i = Array.prototype.lastIndexOf.call({length: false}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-3 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length + overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.lastIndexOf.call({length: false}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js index d1e98e2cf3..2f9c0b8b1d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 (generic 'array' with length 0 ) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - var i = Array.prototype.lastIndexOf.call({length: 0}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-4 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 (generic + 'array' with length 0 ) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + var i = Array.prototype.lastIndexOf.call({length: 0}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js index 8a8076b1a1..a8b9130a44 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion)) - */ - - -function testcase() { - - var i = Array.prototype.lastIndexOf.call({length: '0'}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-5 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length + overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.lastIndexOf.call({length: '0'}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js index de4dd5de76..e74e5bfca6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - - var i = Array.prototype.lastIndexOf.call({length: { valueOf: function () { return 0;}}}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-6 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 + (subclassed Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var i = Array.prototype.lastIndexOf.call({length: { valueOf: function () { return 0;}}}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js index afdb47845e..b4d755a393 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var i = Array.prototype.lastIndexOf.call({length: { toString: function () { return '0';}}}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-7 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length + is object overridden with obj w/o valueOf (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + var i = Array.prototype.lastIndexOf.call({length: { toString: function () { return '0';}}}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js index ddff751eeb..4063463e9c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length is an empty array) - */ - - -function testcase() { - - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var i = Array.prototype.lastIndexOf.call({length: [ ]}, 1); - - if (i === -1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-8 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length is + an empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + var i = Array.prototype.lastIndexOf.call({length: [ ]}, 1); + + if (i === -1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js index 64b26786f0..3289051666 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js - * @description Array.prototype.lastIndexOf - 'length' is a number of value 0.1 - */ - - -function testcase() { - var targetObj = []; - var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-4-9 +description: Array.prototype.lastIndexOf - 'length' is a number of value 0.1 +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = []; + var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; + return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js index b62f173395..772fc4f97c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js - * @description Array.prototype.lastIndexOf when fromIndex is string - */ - - -function testcase() { - var a = new Array(0,1,1); - if (a.lastIndexOf(1,"1") === 1 && // "1" resolves to 1 - a.lastIndexOf(1,"one") === -1) { // NaN string resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-1 +description: Array.prototype.lastIndexOf when fromIndex is string +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(0,1,1); + if (a.lastIndexOf(1,"1") === 1 && // "1" resolves to 1 + a.lastIndexOf(1,"one") === -1) { // NaN string resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js index a251946048..7459fa5e87 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is positive number) - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-10 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 && + [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js index 466cabd3a5..12fdff2e32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is negative number) - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-11 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 && + [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js index 5a1109638f..0e48c7c3a7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is Infinity) - */ - - -function testcase() { - var arr = []; - arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type - return arr.lastIndexOf(null, Infinity) === (Math.pow(2, 32) - 2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-12 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type + return arr.lastIndexOf(null, Infinity) === (Math.pow(2, 32) - 2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js index ca513c6ec1..c27f87d17d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -Infinity) - */ - - -function testcase() { - - return [true].lastIndexOf(true, -Infinity) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-13 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].lastIndexOf(true, -Infinity) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js index 7941302bb9..54f6e3ef49 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is NaN) - */ - - -function testcase() { - - return [0, true].lastIndexOf(true, NaN) === -1 && // from Index will be convert to +0 - [true, 0].lastIndexOf(true, NaN) === 0 && - [0, true].lastIndexOf(true, -NaN) === -1 && - [true, 0].lastIndexOf(true, -NaN) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-14 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, true].lastIndexOf(true, NaN) === -1 && // from Index will be convert to +0 + [true, 0].lastIndexOf(true, NaN) === 0 && + [0, true].lastIndexOf(true, -NaN) === -1 && + [true, 0].lastIndexOf(true, -NaN) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js index 9c6c391972..3f137ec946 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a negative number - */ - - -function testcase() { - - return [0, "-2", 2].lastIndexOf("-2", "-2") === 1 && - [0, 2, "-2"].lastIndexOf("-2", "-2") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-15 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a string + containing a negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, "-2", 2].lastIndexOf("-2", "-2") === 1 && + [0, 2, "-2"].lastIndexOf("-2", "-2") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js index c3c9b82a05..f6285111ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing Infinity - */ - - -function testcase() { - var arr = []; - arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type - return arr.lastIndexOf(true, "Infinity") === (Math.pow(2, 32) - 2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-16 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a string + containing Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = []; + arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type + return arr.lastIndexOf(true, "Infinity") === (Math.pow(2, 32) - 2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js index 7b963a75ae..69b149c914 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing -Infinity - */ - - -function testcase() { - - return [true].lastIndexOf(true, "-Infinity") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-17 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a string + containing -Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [true].lastIndexOf(true, "-Infinity") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js index 0140305e2b..b8d5864f3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing an exponential number - */ - - -function testcase() { - var targetObj = {}; - return [0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0") === 2 && - [0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-18 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a string + containing an exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0") === 2 && + [0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js index 797e6e07bb..a2c630a9b0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a hex number - */ - - -function testcase() { - var targetObj = {}; - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002") === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-19 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a string + containing a hex number +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002") === 2 && + [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js index 309f0e5008..0b48619f4e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js - * @description Array.prototype.lastIndexOf when fromIndex is floating point number - */ - - -function testcase() { - var a = new Array(1,2,1); - if (a.lastIndexOf(2,1.49) === 1 && // 1.49 resolves to 1 - a.lastIndexOf(2,0.51) === -1 && // 0.51 resolves to 0 - a.lastIndexOf(1,0.51) === 0){ // 0.51 resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-2 +description: Array.prototype.lastIndexOf when fromIndex is floating point number +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,1); + if (a.lastIndexOf(2,1.49) === 1 && // 1.49 resolves to 1 + a.lastIndexOf(2,0.51) === -1 && // 0.51 resolves to 0 + a.lastIndexOf(1,0.51) === 0){ // 0.51 resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js index a7a265e8aa..2a623d74dc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' which is a string containing a number with leading zeros - */ - - -function testcase() { - var targetObj = {}; - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10") === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10") === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-20 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' which is a + string containing a number with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10") === 2 && + [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10") === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js index db0abbc9f1..5b43d0d8d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' which is an Object, and has an own toString method - */ - - -function testcase() { - - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var fromIndex = { - toString: function () { - return '2'; - } - }; - var targetObj = new RegExp(); - - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-21 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' which is an + Object, and has an own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + + // objects inherit the default valueOf() method from Object + // that simply returns itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + var fromIndex = { + toString: function () { + return '2'; + } + }; + var targetObj = new RegExp(); + + return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 && + [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js index a8a1cbf9e3..630e6ea7da 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' which is an object, and has an own valueOf method - */ - - -function testcase() { - - var fromIndex = { - valueOf: function () { - return 2; - } - }; - - var targetObj = function () {}; - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-22 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' which is an + object, and has an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var fromIndex = { + valueOf: function () { + return 2; + } + }; + + var targetObj = function () {}; + return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 && + [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js index 913d37aba5..0f120b6c50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var fromIndex = { - toString: function () { - toStringAccessed = true; - return '1'; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; - - return [0, true].lastIndexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-23 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is an object + that has an own valueOf method that returns an object and toString + method that returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var fromIndex = { + toString: function () { + toStringAccessed = true; + return '1'; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + }; + + return [0, true].lastIndexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js index 5e71efdafc..5224d6146a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js - * @description Array.prototype.lastIndexOf throws TypeError exception when value of 'fromIndex' is an object that both toString and valueOf methods than don't return primitive value - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var fromIndex = { - toString: function () { - toStringAccessed = true; - return {}; - }, - - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; - - try { - [0, null].lastIndexOf(null, fromIndex); - return false; - } catch (e) { - return toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-24 +description: > + Array.prototype.lastIndexOf throws TypeError exception when value + of 'fromIndex' is an object that both toString and valueOf methods + than don't return primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var fromIndex = { + toString: function () { + toStringAccessed = true; + return {}; + }, + + valueOf: function () { + valueOfAccessed = true; + return {}; + } + }; + + try { + [0, null].lastIndexOf(null, fromIndex); + return false; + } catch (e) { + return toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js index ccb155fad7..6684389dff 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js - * @description Array.prototype.lastIndexOf use inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 1; - } - }; - - var Con = function () {}; - Con.prototype = proto; - - var child = new Con(); - child.toString = function () { - toStringAccessed = true; - return 1; - }; - - return [0, true].lastIndexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-25 +description: > + Array.prototype.lastIndexOf use inherited valueOf method when + value of 'fromIndex' is an object with an own toString and + inherited valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 1; + } + }; + + var Con = function () {}; + Con.prototype = proto; + + var child = new Con(); + child.toString = function () { + toStringAccessed = true; + return 1; + }; + + return [0, true].lastIndexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js index d46a21b051..18337b87ed 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js - * @description Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var stepTwoOccurs = false; - var stepFiveOccurs = false; - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - stepTwoOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); - return stepTwoOccurs && stepFiveOccurs; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-26 +description: > + Array.prototype.lastIndexOf - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepTwoOccurs = false; + var stepFiveOccurs = false; + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + stepTwoOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); + return stepTwoOccurs && stepFiveOccurs; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js index 60c5c74d03..45e7bb485d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js - * @description Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var stepThreeOccurs = false; - var stepFiveOccurs = false; - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - stepThreeOccurs = true; - if (stepFiveOccurs) { - throw new Error("Step 5 occurred out of order"); - } - return 20; - } - }; - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); - return stepThreeOccurs && stepFiveOccurs; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-27 +description: > + Array.prototype.lastIndexOf - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepThreeOccurs = false; + var stepFiveOccurs = false; + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return { + valueOf: function () { + stepThreeOccurs = true; + if (stepFiveOccurs) { + throw new Error("Step 5 occurred out of order"); + } + return 20; + } + }; + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); + return stepThreeOccurs && stepFiveOccurs; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js index ca77bf187b..00b1ee394d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js - * @description Array.prototype.lastIndexOf - side effects produced by step 1 are visible when an exception occurs - */ - - -function testcase() { - - var stepFiveOccurs = false; - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.lastIndexOf.call(undefined, undefined, fromIndex); - return false; - } catch (e) { - return (e instanceof TypeError) && !stepFiveOccurs; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-28 +description: > + Array.prototype.lastIndexOf - side effects produced by step 1 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepFiveOccurs = false; + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.lastIndexOf.call(undefined, undefined, fromIndex); + return false; + } catch (e) { + return (e instanceof TypeError) && !stepFiveOccurs; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js index ef395c6f1a..8359f3c2b1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js - * @description Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var stepFiveOccurs = false; - - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - throw new RangeError(); - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); - return false; - } catch (e) { - return (e instanceof RangeError) && !stepFiveOccurs; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-29 +description: > + Array.prototype.lastIndexOf - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepFiveOccurs = false; + + var obj = {}; + Object.defineProperty(obj, "length", { + get: function () { + throw new RangeError(); + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); + return false; + } catch (e) { + return (e instanceof RangeError) && !stepFiveOccurs; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js index ec34d4e700..416be1b085 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js - * @description Array.prototype.lastIndexOf when fromIndex is boolean - */ - - -function testcase() { - var a = new Array(1,2,1); - if (a.lastIndexOf(2,true) === 1 && // true resolves to 1 - a.lastIndexOf(2,false) === -1 ) { // false resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-3 +description: Array.prototype.lastIndexOf when fromIndex is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,1); + if (a.lastIndexOf(2,true) === 1 && // true resolves to 1 + a.lastIndexOf(2,false) === -1 ) { // false resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js index d64eb33e8c..f1cd6b2367 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js - * @description Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var stepFiveOccurs = false; - - var obj = {}; - Object.defineProperty(obj, "length", { - get: function () { - return { - valueOf: function () { - throw new TypeError(); - } - }; - }, - configurable: true - }); - - var fromIndex = { - valueOf: function () { - stepFiveOccurs = true; - return 0; - } - }; - - try { - Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); - return false; - } catch (e) { - return (e instanceof TypeError) && !stepFiveOccurs; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-30 +description: > + Array.prototype.lastIndexOf - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var stepFiveOccurs = false; + + var obj = {}; + Object.defineProperty(obj, "length", { + get: function () { + return { + valueOf: function () { + throw new TypeError(); + } + }; + }, + configurable: true + }); + + var fromIndex = { + valueOf: function () { + stepFiveOccurs = true; + return 0; + } + }; + + try { + Array.prototype.lastIndexOf.call(obj, undefined, fromIndex); + return false; + } catch (e) { + return (e instanceof TypeError) && !stepFiveOccurs; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js index 9788dd52ab..c52524a050 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js - * @description Array.prototype.lastIndexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-31 +description: > + Array.prototype.lastIndexOf - 'fromIndex' is a positive + non-integer, verify truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 && + [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js index e2fa1284e1..50b4773224 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js - * @description Array.prototype.lastIndexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction - */ - - -function testcase() { - var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-32 +description: > + Array.prototype.lastIndexOf - 'fromIndex' is a negative + non-integer, verify truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + var targetObj = {}; + return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 && + [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js index 3db396c41d..f2819c23d7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js - * @description Array.prototype.lastIndexOf - match on the first element, a middle element and the last element when 'fromIndex' is passed - */ - - -function testcase() { - - return [0, 1, 2, 3, 4].lastIndexOf(0, 0) === 0 && - [0, 1, 2, 3, 4].lastIndexOf(0, 2) === 0 && - [0, 1, 2, 3, 4].lastIndexOf(2, 2) === 2 && - [0, 1, 2, 3, 4].lastIndexOf(2, 4) === 2 && - [0, 1, 2, 3, 4].lastIndexOf(4, 4) === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-33 +description: > + Array.prototype.lastIndexOf - match on the first element, a middle + element and the last element when 'fromIndex' is passed +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, 1, 2, 3, 4].lastIndexOf(0, 0) === 0 && + [0, 1, 2, 3, 4].lastIndexOf(0, 2) === 0 && + [0, 1, 2, 3, 4].lastIndexOf(2, 2) === 2 && + [0, 1, 2, 3, 4].lastIndexOf(2, 4) === 2 && + [0, 1, 2, 3, 4].lastIndexOf(4, 4) === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js index fcbae77c22..c4ab9a1065 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js - * @description Array.prototype.lastIndexOf when fromIndex is undefined - */ - - -function testcase() { - var a = new Array(1,2,1); - if (a.lastIndexOf(2,undefined) === -1 && - a.lastIndexOf(1,undefined) === 0 && - a.lastIndexOf(1) === 2) { // undefined resolves to 0, no second argument resolves to len - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-4 +description: Array.prototype.lastIndexOf when fromIndex is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,1); + if (a.lastIndexOf(2,undefined) === -1 && + a.lastIndexOf(1,undefined) === 0 && + a.lastIndexOf(1) === 2) { // undefined resolves to 0, no second argument resolves to len + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js index b9ac2cc157..46de9a984b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js - * @description Array.prototype.lastIndexOf when fromIndex is null - */ - - -function testcase() { - var a = new Array(1,2,1); - if (a.lastIndexOf(2,null) === -1 && a.lastIndexOf(1,null) === 0) { // null resolves to 0 - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-5 +description: Array.prototype.lastIndexOf when fromIndex is null +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,1); + if (a.lastIndexOf(2,null) === -1 && a.lastIndexOf(1,null) === 0) { // null resolves to 0 + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js index 87247f2086..bc8629241e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js - * @description Array.prototype.lastIndexOf when 'fromIndex' isn't passed - */ - - -function testcase() { - var arr = [0, 1, 2, 3, 4]; - //'fromIndex' will be set as 4 if not passed by default - return arr.lastIndexOf(0) === arr.lastIndexOf(0, 4) && - arr.lastIndexOf(2) === arr.lastIndexOf(2, 4) && - arr.lastIndexOf(4) === arr.lastIndexOf(4, 4); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-6 +description: Array.prototype.lastIndexOf when 'fromIndex' isn't passed +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [0, 1, 2, 3, 4]; + //'fromIndex' will be set as 4 if not passed by default + return arr.lastIndexOf(0) === arr.lastIndexOf(0, 4) && + arr.lastIndexOf(2) === arr.lastIndexOf(2, 4) && + arr.lastIndexOf(4) === arr.lastIndexOf(4, 4); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js index 204f02d4c8..861d044a4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is 0) - */ - - -function testcase() { - - return [0, 100].lastIndexOf(100, 0) === -1 && // verify fromIndex is not more than 0 - [200, 0].lastIndexOf(200, 0) === 0; // verify fromIndex is not less than 0 - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-7 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, 100].lastIndexOf(100, 0) === -1 && // verify fromIndex is not more than 0 + [200, 0].lastIndexOf(200, 0) === 0; // verify fromIndex is not less than 0 + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js index dde37f435c..fcabdb070b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is +0) - */ - - -function testcase() { - - return [0, true].lastIndexOf(true, +0) === -1 && - [true, 0].lastIndexOf(true, +0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-8 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, true].lastIndexOf(true, +0) === -1 && + [true, 0].lastIndexOf(true, +0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js index be6bb788b6..d8e5454579 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js - * @description Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -0) - */ - - -function testcase() { - - return [0, true].lastIndexOf(true, -0) === -1 && - [true, 0].lastIndexOf(true, -0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-5-9 +description: > + Array.prototype.lastIndexOf - value of 'fromIndex' is a number + (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, true].lastIndexOf(true, -0) === -1 && + [true, 0].lastIndexOf(true, -0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js index dd686d1e3f..0dfce1dcf8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js - * @description Array.prototype.lastIndexOf when fromIndex greater than Array.length - */ - - -function testcase() { - var a = new Array(1,2,3); - if (a.lastIndexOf(3,5.4) === 2 && - a.lastIndexOf(3,3.1) === 2 ) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-6-1 +description: > + Array.prototype.lastIndexOf when fromIndex greater than + Array.length +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,3); + if (a.lastIndexOf(3,5.4) === 2 && + a.lastIndexOf(3,3.1) === 2 ) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js index a27e2b7dc4..37ba26211e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js - * @description Array.prototype.lastIndexOf returns correct index when 'fromIndex' is length of array - 1 - */ - - -function testcase() { - - return [1, 2, 3].lastIndexOf(3, 2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-6-2 +description: > + Array.prototype.lastIndexOf returns correct index when 'fromIndex' + is length of array - 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].lastIndexOf(3, 2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js index b530954764..68abb2b79d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js - * @description Array.prototype.lastIndexOf returns -1 when 'fromIndex' is length of array - 1 - */ - - -function testcase() { - - return [1, 2, 3].lastIndexOf(3, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-6-3 +description: > + Array.prototype.lastIndexOf returns -1 when 'fromIndex' is length + of array - 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].lastIndexOf(3, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js index 2cc5c1f196..6cfea88f5e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js - * @description Array.prototype.lastIndexOf returns -1 when 'fromIndex' and 'length' are both 0 - */ - - -function testcase() { - - return [].lastIndexOf(1, 0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-6-4 +description: > + Array.prototype.lastIndexOf returns -1 when 'fromIndex' and + 'length' are both 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [].lastIndexOf(1, 0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js index f4de9a7f7c..a64fdf7c2b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js - * @description Array.prototype.lastIndexOf returns -1 when 'fromIndex' is 1 - */ - - -function testcase() { - - return [1, 2, 3].lastIndexOf(3, 1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-6-5 +description: Array.prototype.lastIndexOf returns -1 when 'fromIndex' is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].lastIndexOf(3, 1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js index 3f39207a14..b99c8691a7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js - * @description Array.prototype.lastIndexOf returns correct index when 'fromIndex' is 1 - */ - - -function testcase() { - - return [1, 2, 3].lastIndexOf(2, 1) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-6-6 +description: > + Array.prototype.lastIndexOf returns correct index when 'fromIndex' + is 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3].lastIndexOf(2, 1) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js index adfb892f49..d668337752 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js - * @description Array.prototype.lastIndexOf with negative fromIndex - */ - - -function testcase() { - var a = new Array(1,2,3); - - if (a.lastIndexOf(2,-2) === 1 && - a.lastIndexOf(2,-3) === -1 && - a.lastIndexOf(1,-5.3) === -1 ) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-7-1 +description: Array.prototype.lastIndexOf with negative fromIndex +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(1,2,3); + + if (a.lastIndexOf(2,-2) === 1 && + a.lastIndexOf(2,-3) === -1 && + a.lastIndexOf(1,-5.3) === -1 ) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js index 7c886f80ec..b96a7dd528 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js - * @description Array.prototype.lastIndexOf returns correct index when 'fromIndex' is -1 - */ - - -function testcase() { - - return [1, 2, 3, 4].lastIndexOf(4, -1) === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-7-2 +description: > + Array.prototype.lastIndexOf returns correct index when 'fromIndex' + is -1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3, 4].lastIndexOf(4, -1) === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js index 2b8d631eb0..d55a8585fe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js - * @description Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array - 1 - */ - - -function testcase() { - - return [1, 2, 3, 4].lastIndexOf(3, -3) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-7-3 +description: > + Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is + length of array - 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3, 4].lastIndexOf(3, -3) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js index cfb2247d05..5931fd844a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js - * @description Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array - */ - - -function testcase() { - - return [1, 2, 3, 4].lastIndexOf(2, -4) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-7-4 +description: > + Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is + length of array +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [1, 2, 3, 4].lastIndexOf(2, -4) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js index e53e1a9792..6fe57010e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js - * @description Array.prototype.lastIndexOf must return correct index(boolean) - */ - - -function testcase() { - var obj = {toString:function (){return true}}; - var _false = false; - var a = new Array(false,true,false,obj,_false,true,"true", undefined,0,null,1,"str",0,1); - if (a.lastIndexOf(true) === 5 && //a[5]=true - a.lastIndexOf(false) === 4) //a[4] =_false - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-1 +description: Array.prototype.lastIndexOf must return correct index(boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return true}}; + var _false = false; + var a = new Array(false,true,false,obj,_false,true,"true", undefined,0,null,1,"str",0,1); + if (a.lastIndexOf(true) === 5 && //a[5]=true + a.lastIndexOf(false) === 4) //a[4] =_false + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js index 0032bd3f0b..436c1cde86 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * note that prior to the finally ES5 draft SameValue was used for comparisions - * and hence NaNs could be found using lastIndexOf * - * - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js - * @description Array.prototype.lastIndexOf must return correct index (NaN) - */ - - -function testcase() { - var _NaN = NaN; - var a = new Array("NaN",_NaN,NaN, undefined,0,false,null,{toString:function (){return NaN}},"false"); - if (a.lastIndexOf(NaN) === -1) // NaN matches nothing, not even itself - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + note that prior to the finally ES5 draft SameValue was used for comparisions + and hence NaNs could be found using lastIndexOf * +es5id: 15.4.4.15-8-10 +description: Array.prototype.lastIndexOf must return correct index (NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + var _NaN = NaN; + var a = new Array("NaN",_NaN,NaN, undefined,0,false,null,{toString:function (){return NaN}},"false"); + if (a.lastIndexOf(NaN) === -1) // NaN matches nothing, not even itself + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-11.js index 7b300fa0bc..fd726913b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-11.js - * @description Array.prototype.lastIndexOf - the length of iteration isn't changed by adding elements to the array during iteration - */ - - -function testcase() { - - var arr = [20]; - - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 1; - return 0; - }, - configurable: true - }); - - return arr.lastIndexOf(1) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-11 +description: > + Array.prototype.lastIndexOf - the length of iteration isn't + changed by adding elements to the array during iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [20]; + + Object.defineProperty(arr, "0", { + get: function () { + arr[1] = 1; + return 0; + }, + configurable: true + }); + + return arr.lastIndexOf(1) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js index 384aef3b1a..1d07c89879 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js - * @description Array.prototype.lastIndexOf must return correct index(Number) - */ - - -function testcase() { - var obj = {toString:function (){return 0}}; - var one = 1; - var _float = -(4/3); - var a = new Array(+0,true,0,-0, false,undefined,null,"0",obj, _float,-(4/3),-1.3333333333333,"str",one, 1, false); - if (a.lastIndexOf(-(4/3)) === 10 && // a[10]=-(4/3) - a.lastIndexOf(0) === 3 && // a[3] = -0, but using === -0 and 0 are equal - a.lastIndexOf(-0) ===3 && // a[3] = -0 - a.lastIndexOf(1) === 14 ) // a[14] = 1 - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-2 +description: Array.prototype.lastIndexOf must return correct index(Number) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return 0}}; + var one = 1; + var _float = -(4/3); + var a = new Array(+0,true,0,-0, false,undefined,null,"0",obj, _float,-(4/3),-1.3333333333333,"str",one, 1, false); + if (a.lastIndexOf(-(4/3)) === 10 && // a[10]=-(4/3) + a.lastIndexOf(0) === 3 && // a[3] = -0, but using === -0 and 0 are equal + a.lastIndexOf(-0) ===3 && // a[3] = -0 + a.lastIndexOf(1) === 14 ) // a[14] = 1 + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js index ceedbf100e..537763a5e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js - * @description Array.prototype.lastIndexOf must return correct index(string) - */ - - -function testcase() { - var obj = {toString:function (){return "false"}}; - var szFalse = "false"; - var a = new Array(szFalse, "false","false1",undefined,0,false,null,1,obj,0); - if (a.lastIndexOf("false") === 1) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-3 +description: Array.prototype.lastIndexOf must return correct index(string) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return "false"}}; + var szFalse = "false"; + var a = new Array(szFalse, "false","false1",undefined,0,false,null,1,obj,0); + if (a.lastIndexOf("false") === 1) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js index 8c86d3be54..3e8263060d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js - * @description Array.prototype.lastIndexOf must return correct index(undefined) - */ - - -function testcase() { - var obj = {toString:function (){return undefined;}}; - var _undefined1 = undefined; - var _undefined2; - var a = new Array(_undefined1,_undefined2,undefined,true,0,false,null,1,"undefined",obj,1); - if (a.lastIndexOf(undefined) === 2) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-4 +description: Array.prototype.lastIndexOf must return correct index(undefined) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return undefined;}}; + var _undefined1 = undefined; + var _undefined2; + var a = new Array(_undefined1,_undefined2,undefined,true,0,false,null,1,"undefined",obj,1); + if (a.lastIndexOf(undefined) === 2) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js index cc4db92ef0..57a53666bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js - * @description Array.prototype.lastIndexOf must return correct index(Object) - */ - - -function testcase() { - var obj1 = {toString:function (){return "false"}}; - var obj2 = {toString:function (){return "false"}}; - var obj3 = obj1; - var a = new Array(obj2,obj1,obj3,false,undefined,0,false,null,{toString:function (){return "false"}},"false"); - if (a.lastIndexOf(obj3) === 2) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-5 +description: Array.prototype.lastIndexOf must return correct index(Object) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj1 = {toString:function (){return "false"}}; + var obj2 = {toString:function (){return "false"}}; + var obj3 = obj1; + var a = new Array(obj2,obj1,obj3,false,undefined,0,false,null,{toString:function (){return "false"}},"false"); + if (a.lastIndexOf(obj3) === 2) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js index 6cbde571ed..9e02f76b12 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js - * @description Array.prototype.lastIndexOf must return correct index(null) - */ - - -function testcase() { - var obj = {toString:function (){return null}}; - var _null = null; - var a = new Array(true,undefined,0,false,null,1,"str",0,1,null,true,false,undefined,_null,"null",undefined,"str",obj); - if (a.lastIndexOf(null) === 13 ) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-6 +description: Array.prototype.lastIndexOf must return correct index(null) +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {toString:function (){return null}}; + var _null = null; + var a = new Array(true,undefined,0,false,null,1,"str",0,1,null,true,false,undefined,_null,"null",undefined,"str",obj); + if (a.lastIndexOf(null) === 13 ) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js index 9f2d329e6c..6ecfc054b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js - * @description Array.prototype.lastIndexOf must return correct index (self reference) - */ - - -function testcase() { - var a = new Array(0,1,2,3); - a[2] = a; - if (a.lastIndexOf(a) === 2 && - a.lastIndexOf(3) === 3 ) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-7 +description: > + Array.prototype.lastIndexOf must return correct index (self + reference) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(0,1,2,3); + a[2] = a; + if (a.lastIndexOf(a) === 2 && + a.lastIndexOf(3) === 3 ) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js index d2dafcf112..a06d69cb45 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js - * @description Array.prototype.lastIndexOf must return correct index (Array) - */ - - -function testcase() { - var b = new Array("0,1"); - var a = new Array(0,b,"0,1",3); - if (a.lastIndexOf(b.toString()) === 2 && - a.lastIndexOf("0,1") === 2 ) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-8 +description: Array.prototype.lastIndexOf must return correct index (Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var b = new Array("0,1"); + var a = new Array(0,b,"0,1",3); + if (a.lastIndexOf(b.toString()) === 2 && + a.lastIndexOf("0,1") === 2 ) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js index f4bfc196a5..74d27ae795 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js - * @description Array.prototype.lastIndexOf must return correct index (Sparse Array) - */ - - -function testcase() { - var a = new Array(0,1); - a[4294967294] = 2; // 2^32-2 - is max array element index - a[4294967295] = 3; // 2^32-1 added as non-array element property - a[4294967296] = 4; // 2^32 added as non-array element property - a[4294967297] = 5; // 2^32+1 added as non-array element property - // stop searching near the end in case implementation actually tries to test all missing elements!! - a[4294967200] = 3; - a[4294967201] = 4; - a[4294967202] = 5; - - - return (a.lastIndexOf(2) === 4294967294 && - a.lastIndexOf(3) === 4294967200 && - a.lastIndexOf(4) === 4294967201 && - a.lastIndexOf(5) === 4294967202) ; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-9 +description: > + Array.prototype.lastIndexOf must return correct index (Sparse + Array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(0,1); + a[4294967294] = 2; // 2^32-2 - is max array element index + a[4294967295] = 3; // 2^32-1 added as non-array element property + a[4294967296] = 4; // 2^32 added as non-array element property + a[4294967297] = 5; // 2^32+1 added as non-array element property + // stop searching near the end in case implementation actually tries to test all missing elements!! + a[4294967200] = 3; + a[4294967201] = 4; + a[4294967202] = 5; + + + return (a.lastIndexOf(2) === 4294967294 && + a.lastIndexOf(3) === 4294967200 && + a.lastIndexOf(4) === 4294967201 && + a.lastIndexOf(5) === 4294967202) ; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js index 571d687dbe..11e971b2a6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js - * @description Array.prototype.lastIndexOf - added properties in step 2 are visible here - */ - - -function testcase() { - - var arr = { }; - - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); - - return 2 === Array.prototype.lastIndexOf.call(arr, "length"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-1 +description: > + Array.prototype.lastIndexOf - added properties in step 2 are + visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { }; + + Object.defineProperty(arr, "length", { + get: function () { + arr[2] = "length"; + return 3; + }, + configurable: true + }); + + return 2 === Array.prototype.lastIndexOf.call(arr, "length"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-10.js index 885f57487a..97114dd435 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-10.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-10.js - * @description Array.prototype.lastIndexOf - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - - var arr = [0, , 2]; - - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return arr.lastIndexOf(6.99) === 1; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-10 +description: > + Array.prototype.lastIndexOf - properties can be added to prototype + after current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + Object.defineProperty(arr, "2", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return arr.lastIndexOf(6.99) === 1; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-11.js index 301f4c0b67..694f389eb2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-11.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-11.js - * @description Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - - var arr = { length: 200 }; - - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(arr, "100", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return -1 === Array.prototype.lastIndexOf.call(arr, 6.99); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-11 +description: > + Array.prototype.lastIndexOf - deleting own property causes index + property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 200 }; + + Object.defineProperty(arr, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(arr, "100", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return -1 === Array.prototype.lastIndexOf.call(arr, 6.99); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-12.js index 52ca2b2fdb..1490689a87 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-12.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-12.js - * @description Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - - var arr = [1, 2, 3, 4]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "3", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return -1 === arr.lastIndexOf("6.99"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-12 +description: > + Array.prototype.lastIndexOf - deleting own property causes index + property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [1, 2, 3, 4]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "3", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return -1 === arr.lastIndexOf("6.99"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-13.js index 057e1d1d6c..84b419d392 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-13.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-13.js - * @description Array.prototype.lastIndexOf - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var arr = { 2: 2, length: 20 }; - - Object.defineProperty(arr, "3", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return -1 === Array.prototype.lastIndexOf.call(arr, 1); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-13 +description: > + Array.prototype.lastIndexOf - deleting property of prototype + causes prototype index property not to be visited on an Array-like + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 2: 2, length: 20 }; + + Object.defineProperty(arr, "3", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return -1 === Array.prototype.lastIndexOf.call(arr, 1); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-14.js index 85f549919c..99cf5ef826 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-14.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-14.js - * @description Array.prototype.lastIndexOf - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - - var arr = [0, , 2]; - - Object.defineProperty(arr, "20", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return -1 === arr.lastIndexOf(1); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-14 +description: > + Array.prototype.lastIndexOf - deleting property of prototype + causes prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + Object.defineProperty(arr, "20", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return -1 === arr.lastIndexOf(1); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-15.js index c88fa86292..2f477bf35d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-15.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-15.js - * @description Array.prototype.lastIndexOf - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; - - Object.defineProperty(arr, "6", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return 1 === Array.prototype.lastIndexOf.call(arr, 1); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-15 +description: > + Array.prototype.lastIndexOf - deleting own property with + prototype property causes prototype index property to be visited + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; + + Object.defineProperty(arr, "6", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return 1 === Array.prototype.lastIndexOf.call(arr, 1); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-16.js index 51488600e4..6494ff607f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-16.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-16.js - * @description Array.prototype.lastIndexOf - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var arr = [0, 111, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return 1 === arr.lastIndexOf(1); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-16 +description: > + Array.prototype.lastIndexOf - deleting own property with + prototype property causes prototype index property to be visited + on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 111, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return 1 === arr.lastIndexOf(1); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-17.js index 4cdf2cbdac..048753bf52 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-17.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-17.js - * @description Array.prototype.lastIndexOf - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - - var arr = [0, 1, 2, "last", 4]; - - Object.defineProperty(arr, "4", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - return -1 === arr.lastIndexOf("last"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-17 +description: > + Array.prototype.lastIndexOf - decreasing length of array causes + index property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, "last", 4]; + + Object.defineProperty(arr, "4", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + return -1 === arr.lastIndexOf("last"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-18.js index 5a7bcdc88e..f94839091a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-18.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-18.js - * @description Array.prototype.lastIndexOf - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return 2 === arr.lastIndexOf("prototype"); - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-18 +description: > + Array.prototype.lastIndexOf - decreasing length of array with + prototype property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return 2 === arr.lastIndexOf("prototype"); + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js index 785ec810d4..41b762e266 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js - * @description Array.prototype.lastIndexOf - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return 2 === arr.lastIndexOf("unconfigurable"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-19 +description: > + Array.prototype.lastIndexOf - decreasing length of array does not + delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return 2 === arr.lastIndexOf("unconfigurable"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js index 18006bb77b..86e7b43b32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js - * @description Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array-like object - */ - - -function testcase() { - - var arr = { length: 30 }; - var targetObj = function () { }; - - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 10; - } - }; - - return 4 === Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-2 +description: > + Array.prototype.lastIndexOf - added properties in step 5 are + visible here on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 30 }; + var targetObj = function () { }; + + var fromIndex = { + valueOf: function () { + arr[4] = targetObj; + return 10; + } + }; + + return 4 === Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js index bad040b18f..22deca482c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js - * @description Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array - */ - - -function testcase() { - - var arr = []; - arr.length = 30; - var targetObj = function () { }; - - var fromIndex = { - valueOf: function () { - arr[4] = targetObj; - return 11; - } - }; - - return 4 === arr.lastIndexOf(targetObj, fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-3 +description: > + Array.prototype.lastIndexOf - added properties in step 5 are + visible here on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + arr.length = 30; + var targetObj = function () { }; + + var fromIndex = { + valueOf: function () { + arr[4] = targetObj; + return 11; + } + }; + + return 4 === arr.lastIndexOf(targetObj, fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js index 3e99faeb13..4d8acca6cd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js - * @description Array.prototype.lastIndexOf - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var arr = { 2: 6.99 }; - - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 3; - }, - configurable: true - }); - - return -1 === Array.prototype.lastIndexOf.call(arr, 6.99); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-4 +description: > + Array.prototype.lastIndexOf - deleted properties in step 2 are + visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 2: 6.99 }; + + Object.defineProperty(arr, "length", { + get: function () { + delete arr[2]; + return 3; + }, + configurable: true + }); + + return -1 === Array.prototype.lastIndexOf.call(arr, 6.99); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js index 2892d1475f..6491116da0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js - * @description Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array-like object - */ - - -function testcase() { - - var arr = { 10: false, length: 30 }; - - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 15; - } - }; - - return -1 === Array.prototype.lastIndexOf.call(arr, false, fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-5 +description: > + Array.prototype.lastIndexOf - deleted properties of step 5 are + visible here on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { 10: false, length: 30 }; + + var fromIndex = { + valueOf: function () { + delete arr[10]; + return 15; + } + }; + + return -1 === Array.prototype.lastIndexOf.call(arr, false, fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js index 1fc4c98c15..f865353d24 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js - * @description Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array - */ - - -function testcase() { - - var arr = []; - arr[10] = "10"; - arr.length = 20; - - var fromIndex = { - valueOf: function () { - delete arr[10]; - return 11; - } - }; - - return -1 === arr.lastIndexOf("10", fromIndex); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-6 +description: > + Array.prototype.lastIndexOf - deleted properties of step 5 are + visible here on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + arr[10] = "10"; + arr.length = 20; + + var fromIndex = { + valueOf: function () { + delete arr[10]; + return 11; + } + }; + + return -1 === arr.lastIndexOf("10", fromIndex); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-7.js index 1c14fd2fd7..ca40d25318 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-7.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-7.js - * @description Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - var arr = { length: 8 }; - - Object.defineProperty(arr, "4", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(arr, 1) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-7 +description: > + Array.prototype.lastIndexOf - properties added into own object + after current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 8 }; + + Object.defineProperty(arr, "4", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(arr, 1) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-8.js index 3564e04886..fba54fb2b1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-8.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-8.js - * @description Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - - var arr = [0, , 2]; - - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return arr.lastIndexOf(1) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-8 +description: > + Array.prototype.lastIndexOf - properties added into own object + after current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, , 2]; + + Object.defineProperty(arr, "2", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return arr.lastIndexOf(1) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-9.js index a86244a21d..9adff9cc3f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-9.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-9.js - * @description Array.prototype.lastIndexOf - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - - var arr = { length: 9 }; - - Object.defineProperty(arr, "4", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return Infinity; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return Array.prototype.lastIndexOf.call(arr, Infinity) === 1; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-a-9 +description: > + Array.prototype.lastIndexOf - properties can be added to + prototype after current position are visited on an Array-like + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = { length: 9 }; + + Object.defineProperty(arr, "4", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return Infinity; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return Array.prototype.lastIndexOf.call(arr, Infinity) === 1; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js index 12d5496402..8fc875bd7f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js - * @description Array.prototype.lastIndexOf - undefined property wouldn't be called - */ - - -function testcase() { - - return [0, , 2].lastIndexOf(undefined) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-1 +description: Array.prototype.lastIndexOf - undefined property wouldn't be called +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [0, , 2].lastIndexOf(undefined) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js index 2fdce2c32e..d38c3a7711 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; - - return Array.prototype.lastIndexOf.call(obj, 0) === 0 && - Array.prototype.lastIndexOf.call(obj, 1) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-1 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; + + return Array.prototype.lastIndexOf.call(obj, 0) === 0 && + Array.prototype.lastIndexOf.call(obj, 1) === 1 && + Array.prototype.lastIndexOf.call(obj, 2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-10.js index 9fb4250026..d17322e1fc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-10.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-10.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var obj = { length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - return 0 === Array.prototype.lastIndexOf.call(obj, 0) && - 1 === Array.prototype.lastIndexOf.call(obj, 1) && - 2 === Array.prototype.lastIndexOf.call(obj, 2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-10 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 3 }; + Object.defineProperty(obj, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + return 0 === Array.prototype.lastIndexOf.call(obj, 0) && + 1 === Array.prototype.lastIndexOf.call(obj, 1) && + 2 === Array.prototype.lastIndexOf.call(obj, 2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-11.js index 1d0e5458ab..b69e8eeb62 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-11.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-11.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var arr = []; - try { - Array.prototype[0] = false; - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === arr.lastIndexOf(true); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-11 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property that overrides an inherited data property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + try { + Array.prototype[0] = false; + Object.defineProperty(arr, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === arr.lastIndexOf(true); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-12.js index 8698c16e94..3fcb260912 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-12.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-12.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - var obj = { length: 1 }; - - try { - Object.prototype[0] = false; - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === Array.prototype.lastIndexOf.call(obj, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-12 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { length: 1 }; + + try { + Object.prototype[0] = false; + Object.defineProperty(obj, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === Array.prototype.lastIndexOf.call(obj, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-13.js index 682098e31c..2fb299130f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-13.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-13.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var arr = []; - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === arr.lastIndexOf(true); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-13 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property that overrides an inherited accessor property on + an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === arr.lastIndexOf(true); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-14.js index d7d9d9c6a6..be22437d3c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-14.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-14.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var obj = { length: 1 }; - - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - return true; - }, - configurable: true - }); - - return 0 === Array.prototype.lastIndexOf.call(obj, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-14 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property that overrides an inherited accessor property on + an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 1 }; + + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + return true; + }, + configurable: true + }); + + return 0 === Array.prototype.lastIndexOf.call(obj, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-15.js index 6c489a8cad..54cb517af2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-15.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-15.js - * @description Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); - - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); - - return 0 === [, , , ].lastIndexOf(10) && - 1 === [, , , ].lastIndexOf(20) && - 2 === [, , , ].lastIndexOf(30); - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-15 +description: > + Array.prototype.lastIndexOf - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 20; + }, + configurable: true + }); + + Object.defineProperty(Array.prototype, "2", { + get: function () { + return 30; + }, + configurable: true + }); + + return 0 === [, , , ].lastIndexOf(10) && + 1 === [, , , ].lastIndexOf(20) && + 2 === [, , , ].lastIndexOf(30); + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-16.js index 5e147f31a8..2b2205dbb6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-16.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-16.js - * @description Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 10; - }, - configurable: true - }); - - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 20; - }, - configurable: true - }); - - Object.defineProperty(Object.prototype, "2", { - get: function () { - return 30; - }, - configurable: true - }); - - return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, 10) && - 1 === Array.prototype.lastIndexOf.call({ length: 3 }, 20) && - 2 === Array.prototype.lastIndexOf.call({ length: 3 }, 30); - } finally { - delete Object.prototype[0]; - delete Object.prototype[1]; - delete Object.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-16 +description: > + Array.prototype.lastIndexOf - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return 10; + }, + configurable: true + }); + + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 20; + }, + configurable: true + }); + + Object.defineProperty(Object.prototype, "2", { + get: function () { + return 30; + }, + configurable: true + }); + + return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, 10) && + 1 === Array.prototype.lastIndexOf.call({ length: 3 }, 20) && + 2 === Array.prototype.lastIndexOf.call({ length: 3 }, 30); + } finally { + delete Object.prototype[0]; + delete Object.prototype[1]; + delete Object.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-17.js index 1d946ca4bb..5981e67d0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-17.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-17.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - return arr.lastIndexOf(undefined) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-17 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = []; + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + return arr.lastIndexOf(undefined) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-18.js index 6416522413..9e4738e54a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-18.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-18.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var obj = { length: 1 }; - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); - - return 0 === Array.prototype.lastIndexOf.call(obj, undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-18 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 1 }; + Object.defineProperty(obj, "0", { + set: function () { }, + configurable: true + }); + + return 0 === Array.prototype.lastIndexOf.call(obj, undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-19.js index 46600cc575..2d998ab9e8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-19.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-19.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var obj = { length: 1 }; - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); - - return obj.hasOwnProperty(0) && 0 === Array.prototype.lastIndexOf.call(obj, undefined); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-19 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property without a get function that overrides an + inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { length: 1 }; + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return 20; + }, + configurable: true + }); + Object.defineProperty(obj, "0", { + set: function () { }, + configurable: true + }); + + return obj.hasOwnProperty(0) && 0 === Array.prototype.lastIndexOf.call(obj, undefined); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js index 01e66dc81c..b7b642bbad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array - */ - - -function testcase() { - return [true, true, true].lastIndexOf(true) === 2 && - [true, true, false].lastIndexOf(true) === 1 && - [true, false, false].lastIndexOf(true) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-2 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + return [true, true, true].lastIndexOf(true) === 2 && + [true, true, false].lastIndexOf(true) === 1 && + [true, false, false].lastIndexOf(true) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-20.js index 58952fa4e8..5df347ac18 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-20.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-20.js - * @description Array.prototype.lastIndexOf - element to be retrieved is an own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var arr = [, 1]; - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 100; - }, - configurable: true - }); - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - return arr.hasOwnProperty(0) && arr.lastIndexOf(undefined) === 0; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-20 +description: > + Array.prototype.lastIndexOf - element to be retrieved is an own + accessor property without a get function that overrides an + inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [, 1]; + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 100; + }, + configurable: true + }); + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + return arr.hasOwnProperty(0) && arr.lastIndexOf(undefined) === 0; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-21.js index 62e193fce7..1d7845f78b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-21.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-21.js - * @description Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - return [, ].lastIndexOf(undefined) === 0; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-21 +description: > + Array.prototype.lastIndexOf - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + return [, ].lastIndexOf(undefined) === 0; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-22.js index b552263159..fbc7425c7d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-22.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-22.js - * @description Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - try { - Object.defineProperty(Object.prototype, "0", { - set: function () { }, - configurable: true - }); - return 0 === Array.prototype.lastIndexOf.call({ length: 1 }, undefined); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-22 +description: > + Array.prototype.lastIndexOf - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Object.prototype, "0", { + set: function () { }, + configurable: true + }); + return 0 === Array.prototype.lastIndexOf.call({ length: 1 }, undefined); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-23.js index 867c59185f..30403d9145 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-23.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-23.js - * @description Array.prototype.lastIndexOf - This object is the global object - */ - - -function testcase() { - - var targetObj = {}; - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = targetObj; - fnGlobalObject()[100] = "100"; - fnGlobalObject()[200] = "200"; - fnGlobalObject().length = 200; - return 0 === Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) && - 100 === Array.prototype.lastIndexOf.call(fnGlobalObject(), "100") && - -1 === Array.prototype.lastIndexOf.call(fnGlobalObject(), "200"); - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[100]; - delete fnGlobalObject()[200]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-23 +description: Array.prototype.lastIndexOf - This object is the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var targetObj = {}; + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = targetObj; + fnGlobalObject()[100] = "100"; + fnGlobalObject()[200] = "200"; + fnGlobalObject().length = 200; + return 0 === Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) && + 100 === Array.prototype.lastIndexOf.call(fnGlobalObject(), "100") && + -1 === Array.prototype.lastIndexOf.call(fnGlobalObject(), "200"); + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[100]; + delete fnGlobalObject()[200]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js index b33d89fd83..b6c2c629d3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js - * @description Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var func = function (a, b) { - return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && - -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]); - }; - - return func(true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-25 +description: > + Array.prototype.lastIndexOf applied to Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && + -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]); + }; + + return func(true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js index 3f948599ec..e296c43204 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js - * @description Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters) - */ - - -function testcase() { - - var func = function (a, b) { - return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && - 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) && - -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]); - }; - - return func(0, true); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-26 +description: > + Array.prototype.lastIndexOf applied to Arguments object which + implements its own property get method (number of arguments equals + to number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && + 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) && + -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]); + }; + + return func(0, true); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js index b2a2152137..5f50dcee30 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js - * @description Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var func = function (a, b) { - return 2 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && - 3 === Array.prototype.lastIndexOf.call(arguments, arguments[3]) && - -1 === Array.prototype.lastIndexOf.call(arguments, arguments[4]); - }; - - return func(0, arguments, 0, Object.prototype); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-27 +description: > + Array.prototype.lastIndexOf applied to Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var func = function (a, b) { + return 2 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && + 3 === Array.prototype.lastIndexOf.call(arguments, arguments[3]) && + -1 === Array.prototype.lastIndexOf.call(arguments, arguments[4]); + }; + + return func(0, arguments, 0, Object.prototype); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-28.js index 8c4a117112..f491ee6804 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-28.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-28.js - * @description Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array - */ - - -function testcase() { - - var preIterVisible = false; - var arr = []; - - Object.defineProperty(arr, "2", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); - - return arr.lastIndexOf(true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-28 +description: > + Array.prototype.lastIndexOf - side-effects are visible in + subsequent iterations on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var arr = []; + + Object.defineProperty(arr, "2", { + get: function () { + preIterVisible = true; + return false; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true + }); + + return arr.lastIndexOf(true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-29.js index fb85b2877b..21c01338fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-29.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-29.js - * @description Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array-like object - */ - - -function testcase() { - - var preIterVisible = false; - var obj = { length: 3 }; - - Object.defineProperty(obj, "2", { - get: function () { - preIterVisible = true; - return false; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return true; - } else { - return false; - } - }, - configurable: true - }); - - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-29 +description: > + Array.prototype.lastIndexOf - side-effects are visible in + subsequent iterations on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var obj = { length: 3 }; + + Object.defineProperty(obj, "2", { + get: function () { + preIterVisible = true; + return false; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return true; + } else { + return false; + } + }, + configurable: true + }); + + return Array.prototype.lastIndexOf.call(obj, true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js index e7c20a5151..bd8d114485 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - try { - Array.prototype[0] = Object; - return [Object.prototype].lastIndexOf(Object.prototype) === 0; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-3 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype[0] = Object; + return [Object.prototype].lastIndexOf(Object.prototype) === 0; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-30.js index fad93dcf51..dcddd5a9ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-30.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-30.js - * @description Array.prototype.lastIndexOf terminates iteration on unhandled exception on an Array - */ - - -function testcase() { - - var accessed = false; - var arr = []; - - Object.defineProperty(arr, "2", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); - - try { - arr.lastIndexOf(true); - return false; - } catch (e) { - return (e instanceof TypeError) && !accessed; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-30 +description: > + Array.prototype.lastIndexOf terminates iteration on unhandled + exception on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arr = []; + + Object.defineProperty(arr, "2", { + get: function () { + throw new TypeError(); + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + accessed = true; + return true; + }, + configurable: true + }); + + try { + arr.lastIndexOf(true); + return false; + } catch (e) { + return (e instanceof TypeError) && !accessed; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-31.js index fa491307f1..f260bc4aed 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-31.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-31.js - * @description Array.prototype.lastIndexOf terminates iteration on unhandled exception on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var obj = { length: 3 }; - - Object.defineProperty(obj, "2", { - get: function () { - throw new TypeError(); - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - accessed = true; - return true; - }, - configurable: true - }); - - try { - Array.prototype.lastIndexOf.call(obj, true); - return false; - } catch (e) { - return (e instanceof TypeError) && !accessed; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-31 +description: > + Array.prototype.lastIndexOf terminates iteration on unhandled + exception on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { length: 3 }; + + Object.defineProperty(obj, "2", { + get: function () { + throw new TypeError(); + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + accessed = true; + return true; + }, + configurable: true + }); + + try { + Array.prototype.lastIndexOf.call(obj, true); + return false; + } catch (e) { + return (e instanceof TypeError) && !accessed; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js index 8ba62506c3..12a12abf6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - try { - Object.prototype[0] = false; - return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-4 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.prototype[0] = false; + return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-5.js index 4f6071186b..5a7b34fe65 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-5.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - return 0 === [Number].lastIndexOf(Number); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-5 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + return 0 === [Number].lastIndexOf(Number); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-6.js index b087664b2c..edec1b95fd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-6.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-6.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - try { - Object.defineProperty(Object.prototype, "0", { - get: function () { - return false; - }, - configurable: true - }); - return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true); - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-6 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.defineProperty(Object.prototype, "0", { + get: function () { + return false; + }, + configurable: true + }); + return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true); + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js index ae582912e2..027b5e1546 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js - * @description Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - try { - Array.prototype[0] = true; - Array.prototype[1] = false; - Array.prototype[2] = "true"; - return 0 === [, , , ].lastIndexOf(true) && - 1 === [, , , ].lastIndexOf(false) && - 2 === [, , , ].lastIndexOf("true"); - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-7 +description: > + Array.prototype.lastIndexOf - element to be retrieved is inherited + data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Array.prototype[0] = true; + Array.prototype[1] = false; + Array.prototype[2] = "true"; + return 0 === [, , , ].lastIndexOf(true) && + 1 === [, , , ].lastIndexOf(false) && + 2 === [, , , ].lastIndexOf("true"); + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js index 6edfb7fcfa..b612ec2095 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js - * @description Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - try { - Object.prototype[0] = true; - Object.prototype[1] = false; - Object.prototype[2] = "true"; - return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, true) && - 1 === Array.prototype.lastIndexOf.call({ length: 3 }, false) && - 2 === Array.prototype.lastIndexOf.call({ length: 3 }, "true"); - } finally { - delete Object.prototype[0]; - delete Object.prototype[1]; - delete Object.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-8 +description: > + Array.prototype.lastIndexOf - element to be retrieved is inherited + data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Object.prototype[0] = true; + Object.prototype[1] = false; + Object.prototype[2] = "true"; + return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, true) && + 1 === Array.prototype.lastIndexOf.call({ length: 3 }, false) && + 2 === Array.prototype.lastIndexOf.call({ length: 3 }, "true"); + } finally { + delete Object.prototype[0]; + delete Object.prototype[1]; + delete Object.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-9.js index 93137e0526..a59d42786e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-9.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-9.js - * @description Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var arr = [, , , ]; - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - return arr.lastIndexOf(0) === 0 && arr.lastIndexOf(1) === 1 && arr.lastIndexOf(2) === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-i-9 +description: > + Array.prototype.lastIndexOf - element to be retrieved is own + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [, , , ]; + Object.defineProperty(arr, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + return arr.lastIndexOf(0) === 0 && arr.lastIndexOf(1) === 1 && arr.lastIndexOf(2) === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js index 120e8edc44..0fcd3eae8b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js - * @description Array.prototype.lastIndexOf - type of array element is different from type of search element - */ - - -function testcase() { - - return ["true"].lastIndexOf(true) === -1 && - ["0"].lastIndexOf(0) === -1 && - [false].lastIndexOf(0) === -1 && - [undefined].lastIndexOf(0) === -1 && - [null].lastIndexOf(0) === -1 && - [[]].lastIndexOf(0) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-1 +description: > + Array.prototype.lastIndexOf - type of array element is different + from type of search element +includes: [runTestCase.js] +---*/ + +function testcase() { + + return ["true"].lastIndexOf(true) === -1 && + ["0"].lastIndexOf(0) === -1 && + [false].lastIndexOf(0) === -1 && + [undefined].lastIndexOf(0) === -1 && + [null].lastIndexOf(0) === -1 && + [[]].lastIndexOf(0) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js index 200c718059..3d241d68f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js - * @description Array.prototype.lastIndexOf - both array element and search element are booleans, and they have same value - */ - - -function testcase() { - - return [false, true].lastIndexOf(true) === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-10 +description: > + Array.prototype.lastIndexOf - both array element and search + element are booleans, and they have same value +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [false, true].lastIndexOf(true) === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js index 1c80e56698..3e1f8975d2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js - * @description Array.prototype.lastIndexOf - both array element and search element are Objects, and they refer to the same object - */ - - -function testcase() { - - var obj1 = {}; - var obj2 = {}; - var obj3 = obj2; - return [obj2, obj1].lastIndexOf(obj3) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-11 +description: > + Array.prototype.lastIndexOf - both array element and search + element are Objects, and they refer to the same object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj1 = {}; + var obj2 = {}; + var obj3 = obj2; + return [obj2, obj1].lastIndexOf(obj3) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js index 3326149bf5..67695ea25a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js - * @description Array.prototype.lastIndexOf - both type of array element and type of search element are Undefined - */ - - -function testcase() { - - return [undefined].lastIndexOf() === 0 && [undefined].lastIndexOf(undefined) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-2 +description: > + Array.prototype.lastIndexOf - both type of array element and type + of search element are Undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [undefined].lastIndexOf() === 0 && [undefined].lastIndexOf(undefined) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js index 2d029cdcc2..bd024b8d3c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js - * @description Array.prototype.lastIndexOf - both type of array element and type of search element are Null - */ - - -function testcase() { - - return [null].lastIndexOf(null) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-3 +description: > + Array.prototype.lastIndexOf - both type of array element and type + of search element are Null +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [null].lastIndexOf(null) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js index 1917259038..04f3b2c345 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js - * @description Array.prototype.lastIndexOf - search element is NaN - */ - - -function testcase() { - - return [+NaN, NaN, -NaN].lastIndexOf(NaN) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-4 +description: Array.prototype.lastIndexOf - search element is NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [+NaN, NaN, -NaN].lastIndexOf(NaN) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js index fbc668f49c..a733fbe1af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js - * @description Array.prototype.lastIndexOf - search element is -NaN - */ - - -function testcase() { - return [+NaN, NaN, -NaN].lastIndexOf(-NaN) === -1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-5 +description: Array.prototype.lastIndexOf - search element is -NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + return [+NaN, NaN, -NaN].lastIndexOf(-NaN) === -1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js index 408395950b..f646f1736e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js - * @description Array.prototype.lastIndexOf - array element is +0 and search element is -0 - */ - - -function testcase() { - - return [+0].lastIndexOf(-0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-6 +description: > + Array.prototype.lastIndexOf - array element is +0 and search + element is -0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [+0].lastIndexOf(-0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js index ee2df51c04..939702567c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js - * @description Array.prototype.lastIndexOf - array element is -0 and search element is +0 - */ - - -function testcase() { - - return [-0].lastIndexOf(+0) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-7 +description: > + Array.prototype.lastIndexOf - array element is -0 and search + element is +0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [-0].lastIndexOf(+0) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js index bc32ceecb5..e5ae0ffd2f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js - * @description Array.prototype.lastIndexOf - both array element and search element are numbers, and they have same value - */ - - -function testcase() { - - return [-1, 0, 1].lastIndexOf(-1) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-8 +description: > + Array.prototype.lastIndexOf - both array element and search + element are numbers, and they have same value +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [-1, 0, 1].lastIndexOf(-1) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js index b14aec8d63..7187ba94a7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js @@ -1,16 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js - * @description Array.prototype.lastIndexOf - both array element and search element are strings, and they have exactly the same sequence of characters - */ - - -function testcase() { - - return ["abc", "ab", "bca", ""].lastIndexOf("abc") === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-ii-9 +description: > + Array.prototype.lastIndexOf - both array element and search + element are strings, and they have exactly the same sequence of + characters +includes: [runTestCase.js] +---*/ + +function testcase() { + + return ["abc", "ab", "bca", ""].lastIndexOf("abc") === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js index f4a690473a..c30aa673b3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js - * @description Array.prototype.lastIndexOf returns index of last one when more than two elements in array are eligible - */ - - -function testcase() { - - return [2, 1, 2, 2, 1].lastIndexOf(2) === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-iii-1 +description: > + Array.prototype.lastIndexOf returns index of last one when more + than two elements in array are eligible +includes: [runTestCase.js] +---*/ + +function testcase() { + + return [2, 1, 2, 2, 1].lastIndexOf(2) === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-2.js index bdd887ea4b..05aed78a76 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-2.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-2.js - * @description Array.prototype.lastIndexOf returns without visiting subsequent element once search value is found - */ - - -function testcase() { - var arr = [2, 1, , 1, 2]; - var elementFirstAccessed = false; - var elementThirdAccessed = false; - - Object.defineProperty(arr, "2", { - get: function () { - elementThirdAccessed = true; - return 2; - }, - configurable: true - }); - Object.defineProperty(arr, "0", { - get: function () { - elementFirstAccessed = true; - return 2; - }, - configurable: true - }); - - arr.lastIndexOf(2); - return !elementThirdAccessed && !elementFirstAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-8-b-iii-2 +description: > + Array.prototype.lastIndexOf returns without visiting subsequent + element once search value is found +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [2, 1, , 1, 2]; + var elementFirstAccessed = false; + var elementThirdAccessed = false; + + Object.defineProperty(arr, "2", { + get: function () { + elementThirdAccessed = true; + return 2; + }, + configurable: true + }); + Object.defineProperty(arr, "0", { + get: function () { + elementFirstAccessed = true; + return 2; + }, + configurable: true + }); + + arr.lastIndexOf(2); + return !elementThirdAccessed && !elementFirstAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js index 9aacf744bf..8e879dc542 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js @@ -1,37 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js - * @description Array.prototype.lastIndexOf returns -1 for elements not present - */ - - -function testcase() { - var a = new Array(); - a[100] = 1; - a[99999] = ""; - a[10] = new Object(); - a[5555] = 5.5; - a[123456] = "str"; - a[5] = 1E+309; - if (a.lastIndexOf(1) !== 100 || - a.lastIndexOf("") !== 99999 || - a.lastIndexOf("str") !== 123456 || - a.lastIndexOf(5.5) !== 5555 || - a.lastIndexOf(1E+309) !== 5 ) - { - return false; - } - if (a.lastIndexOf(true) === -1 && - a.lastIndexOf(5) === -1 && - a.lastIndexOf("str1") === -1 && - a.lastIndexOf(null) === -1 && - a.lastIndexOf(new Object()) === -1 ) - { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-9-1 +description: Array.prototype.lastIndexOf returns -1 for elements not present +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = new Array(); + a[100] = 1; + a[99999] = ""; + a[10] = new Object(); + a[5555] = 5.5; + a[123456] = "str"; + a[5] = 1E+309; + if (a.lastIndexOf(1) !== 100 || + a.lastIndexOf("") !== 99999 || + a.lastIndexOf("str") !== 123456 || + a.lastIndexOf(5.5) !== 5555 || + a.lastIndexOf(1E+309) !== 5 ) + { + return false; + } + if (a.lastIndexOf(true) === -1 && + a.lastIndexOf(5) === -1 && + a.lastIndexOf("str1") === -1 && + a.lastIndexOf(null) === -1 && + a.lastIndexOf(new Object()) === -1 ) + { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-2.js index a1135345cf..9ed3ffc06d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-2.js - * @description Array.prototype.lastIndexOf returns -1 if 'length' is 0 and does not access any other properties - */ - - -function testcase() { - var accessed = false; - var f = {length: 0}; - Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); - - var i = Array.prototype.lastIndexOf.call(f,1); - - if (i === -1 && accessed==false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.15-9-2 +description: > + Array.prototype.lastIndexOf returns -1 if 'length' is 0 and does + not access any other properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var f = {length: 0}; + Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); + + var i = Array.prototype.lastIndexOf.call(f,1); + + if (i === -1 && accessed==false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js index 202325ceda..27d3828e15 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js - * @description Array.prototype.every must exist as a function - */ - - -function testcase() { - var f = Array.prototype.every; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-0-1 +description: Array.prototype.every must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.every; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js index 89356994b7..97e103f458 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js - * @description Array.prototype.every.length must be 1 - */ - - -function testcase() { - if (Array.prototype.every.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-0-2 +description: Array.prototype.every.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.every.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js index e00a61f350..5bec644550 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js - * @description Array.prototype.every applied to undefined throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.every.call(undefined); // TypeError is thrown if value is undefined - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-1 +description: Array.prototype.every applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.every.call(undefined); // TypeError is thrown if value is undefined + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js index 1d8467b7cc..ead52e8424 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js - * @description Array.prototype.every applied to the Math object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return ('[object Math]' !== Object.prototype.toString.call(obj)); - } - - try { - Math.length = 1; - Math[0] = 1; - return !Array.prototype.every.call(Math, callbackfn); - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-10 +description: Array.prototype.every applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return ('[object Math]' !== Object.prototype.toString.call(obj)); + } + + try { + Math.length = 1; + Math[0] = 1; + return !Array.prototype.every.call(Math, callbackfn); + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js index d561607216..2d5ce21100 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js - * @description Array.prototype.every applied to Date object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return !(obj instanceof Date); - } - - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-11 +description: Array.prototype.every applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return !(obj instanceof Date); + } + + var obj = new Date(); + obj.length = 1; + obj[0] = 1; + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js index 111d4213bb..f6e33d09ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js - * @description Array.prototype.every applied to RegExp object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return !(obj instanceof RegExp); - } - - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-12 +description: Array.prototype.every applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return !(obj instanceof RegExp); + } + + var obj = new RegExp(); + obj.length = 1; + obj[0] = 1; + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js index 1d7e4c66ab..a9b843faf0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js - * @description Array.prototype.every applied to the JSON object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return ('[object JSON]' !== Object.prototype.toString.call(obj)); - } - - try { - JSON.length = 1; - JSON[0] = 1; - return !Array.prototype.every.call(JSON, callbackfn); - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-13 +description: Array.prototype.every applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return ('[object JSON]' !== Object.prototype.toString.call(obj)); + } + + try { + JSON.length = 1; + JSON[0] = 1; + return !Array.prototype.every.call(JSON, callbackfn); + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js index d5a43740c3..50da514fe8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js - * @description Array.prototype.every applied to Error object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return !(obj instanceof Error); - } - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-14 +description: Array.prototype.every applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return !(obj instanceof Error); + } + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js index 3a6d4257cb..d6858f9a86 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js - * @description Array.prototype.every applied to the Arguments object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return ('[object Arguments]' !== Object.prototype.toString.call(obj)); - } - - var obj = (function fun() { - return arguments; - }("a", "b")); - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-15 +description: Array.prototype.every applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return ('[object Arguments]' !== Object.prototype.toString.call(obj)); + } + + var obj = (function fun() { + return arguments; + }("a", "b")); + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js index a3f519be6c..205b605190 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js - * @description Array.prototype.every applied to null throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.every.call(null); // TypeError is thrown if value is null - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-2 +description: Array.prototype.every applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.every.call(null); // TypeError is thrown if value is null + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js index fdf5a733d5..dd6e7a75d2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js - * @description Array.prototype.every applied to boolean primitive - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = 1; - Boolean.prototype.length = 1; - return Array.prototype.every.call(false, callbackfn) && accessed; - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-3 +description: Array.prototype.every applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = 1; + Boolean.prototype.length = 1; + return Array.prototype.every.call(false, callbackfn) && accessed; + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js index dc14e9db89..085e5ab704 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js - * @description Array.prototype.every applied to Boolean object - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return obj instanceof Boolean; - } - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-4 +description: Array.prototype.every applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return obj instanceof Boolean; + } + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js index 648f521790..b245605b11 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js - * @description Array.prototype.every applied to number primitive - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return obj instanceof Number; - } - - try { - Number.prototype[0] = 1; - Number.prototype.length = 1; - return Array.prototype.every.call(2.5, callbackfn) && accessed; - } finally { - delete Number.prototype[0]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-5 +description: Array.prototype.every applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return obj instanceof Number; + } + + try { + Number.prototype[0] = 1; + Number.prototype.length = 1; + return Array.prototype.every.call(2.5, callbackfn) && accessed; + } finally { + delete Number.prototype[0]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js index e65991479e..e18aae599b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js - * @description Array.prototype.every applied to Number object - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return obj instanceof Number; - } - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-6 +description: Array.prototype.every applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return obj instanceof Number; + } + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js index 12f4f13a6e..2dddd318bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js - * @description Array.prototype.every applied to string primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return !(obj instanceof String); - } - - return !Array.prototype.every.call("hello\nworld\\!", callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-7 +description: Array.prototype.every applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return !(obj instanceof String); + } + + return !Array.prototype.every.call("hello\nworld\\!", callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js index a9bc6bbd68..0b3da17282 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js - * @description Array.prototype.every applied to String object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return !(obj instanceof String); - } - - var obj = new String("hello\nworld\\!"); - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-8 +description: Array.prototype.every applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return !(obj instanceof String); + } + + var obj = new String("hello\nworld\\!"); + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js index af993b24af..0e7eeb5003 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js - * @description Array.prototype.every applied to Function object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return !(obj instanceof Function); - } - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-1-9 +description: Array.prototype.every applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return !(obj instanceof Function); + } + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js index 96ba5b09bd..222187f955 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own data property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-1 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 + }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js index fb95486d05..3e34f59975 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js - * @description Array.prototype.every applied to Array-like object, 'length' is an inherited accessor property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { }; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-10 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { }; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.every.call(child, callbackfn1) && + !Array.prototype.every.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js index b732044afe..d3b8b1c0f7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { - 0: 9, - 1: 8 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-11 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { + 0: 9, + 1: 8 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js index b3e31392ff..6680e0c429 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js - * @description Array.prototype.every - 'length' is own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 9, 1: 8 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } finally { - delete Object.prototype.length; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-12 +description: > + Array.prototype.every - 'length' is own accessor property without + a get function that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 9, 1: 8 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } finally { + delete Object.prototype.length; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js index ca6752a873..c4e44b93df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js - * @description Array.prototype.every applied to the Array-like object that 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 9; - child[1] = 8; - - return Array.prototype.every.call(child, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-13 +description: > + Array.prototype.every applied to the Array-like object that + 'length' is inherited accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 9; + child[1] = 8; + + return Array.prototype.every.call(child, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js index 00440e9d94..5c0f58ccd6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js - * @description Array.prototype.every applied to the Array-like object that 'length' property doesn't exist - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 12 }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-14 +description: > + Array.prototype.every applied to the Array-like object that + 'length' property doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 12 }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-15.js index 88302b28b7..6d0058ff88 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-15.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-15.js - * @description Array.prototype.every - 'length' is property of the global object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; - return Array.prototype.every.call(fnGlobalObject(), callbackfn1) && - !Array.prototype.every.call(fnGlobalObject(), callbackfn2); - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-15 +description: Array.prototype.every - 'length' is property of the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 12; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 9; + fnGlobalObject().length = 2; + return Array.prototype.every.call(fnGlobalObject(), callbackfn1) && + !Array.prototype.every.call(fnGlobalObject(), callbackfn2); + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js index 14335ecc45..1968a03a61 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js - * @description Array.prototype.every applied to the Arguments object, which implements its own property get method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var func = function (a, b) { - arguments[2] = 9; - return Array.prototype.every.call(arguments, callbackfn1) && - !Array.prototype.every.call(arguments, callbackfn2); - }; - - return func(12, 11); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-17 +description: > + Array.prototype.every applied to the Arguments object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var func = function (a, b) { + arguments[2] = 9; + return Array.prototype.every.call(arguments, callbackfn1) && + !Array.prototype.every.call(arguments, callbackfn2); + }; + + return func(12, 11); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js index 467d05ef24..bbbdd0be4f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js - * @description Array.prototype.every applied to String object, which implements its own property get method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return parseInt(val, 10) > 1; - } - - function callbackfn2(val, idx, obj) { - return parseInt(val, 10) > 2; - } - - var str = new String("432"); - try { - String.prototype[3] = "1"; - return Array.prototype.every.call(str, callbackfn1) && - !Array.prototype.every.call(str, callbackfn2); - } finally { - delete String.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-18 +description: > + Array.prototype.every applied to String object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return parseInt(val, 10) > 1; + } + + function callbackfn2(val, idx, obj) { + return parseInt(val, 10) > 2; + } + + var str = new String("432"); + try { + String.prototype[3] = "1"; + return Array.prototype.every.call(str, callbackfn1) && + !Array.prototype.every.call(str, callbackfn2); + } finally { + delete String.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js index 78513f58a1..44babd44b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js - * @description Array.prototype.every applied to Function object, which implements its own property get method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; - - return Array.prototype.every.call(fun, callbackfn1) && - !Array.prototype.every.call(fun, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-19 +description: > + Array.prototype.every applied to Function object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var fun = function (a, b) { + return a + b; + }; + fun[0] = 12; + fun[1] = 11; + fun[2] = 9; + + return Array.prototype.every.call(fun, callbackfn1) && + !Array.prototype.every.call(fun, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js index ec89f5c37a..8c98facbf9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js - * @description Array.prototype.every - 'length' is own data property on an Array - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - try { - Array.prototype[2] = 9; - - return [12, 11].every(callbackfn1) && - ![12, 11].every(callbackfn2); - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-2 +description: Array.prototype.every - 'length' is own data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + try { + Array.prototype[2] = 9; + + return [12, 11].every(callbackfn1) && + ![12, 11].every(callbackfn2); + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js index 58e7cbd381..2f5c2e382f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited data property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-3 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own data property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.every.call(child, callbackfn1) && + !Array.prototype.every.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js index 094f388cc4..6ebb995a80 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js - * @description Array.prototype.every - 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - var arrProtoLen = 0; - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - Array.prototype[2] = 9; - - return [12, 11].every(callbackfn1) && - ![12, 11].every(callbackfn2); - } finally { - Array.prototype.length = arrProtoLen; - delete Array.prototype[2]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-4 +description: > + Array.prototype.every - 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrProtoLen = 0; + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + Array.prototype[2] = 9; + + return [12, 11].every(callbackfn1) && + ![12, 11].every(callbackfn2); + } finally { + Array.prototype.length = arrProtoLen; + delete Array.prototype[2]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js index fb1ccb7d14..9cfe79ae98 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { }; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-5 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own data property that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { }; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + + return Array.prototype.every.call(child, callbackfn1) && + !Array.prototype.every.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js index f865dbc61d..3e35e28c66 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js - * @description Array.prototype.every applied to Array-like object, 'length' is an inherited data property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-6 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.every.call(child, callbackfn1) && + !Array.prototype.every.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js index 8f96e425b7..609099b71e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own accessor property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { }; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-7 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { }; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + obj[0] = 12; + obj[1] = 11; + obj[2] = 9; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js index cc1374c6ca..efaeb40298 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-8 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own accessor property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.every.call(child, callbackfn1) && + !Array.prototype.every.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js index 0bcdd9417b..5031c7b98e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js @@ -1,49 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js - * @description Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-2-9 +description: > + Array.prototype.every applied to Array-like object, 'length' is an + own accessor property that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.every.call(child, callbackfn1) && + !Array.prototype.every.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js index e7602a3598..367b57ea97 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js - * @description Array.prototype.every - value of 'length' is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: undefined }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-1 +description: Array.prototype.every - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: undefined }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js index bc14649dcb..2e7f2e7d19 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js - * @description Array.prototype.every - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: NaN }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-10 +description: > + Array.prototype.every - value of 'length' is a number (value is + NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: NaN }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js index b720970d94..5a05ef33c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js - * @description Array.prototype.every - 'length' is a string containing a positive number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-11 +description: > + Array.prototype.every - 'length' is a string containing a positive + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js index 9eac9bcf9a..694c1ad522 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js - * @description Array.prototype.every - 'length' is a string containing a negative number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-12 +description: > + Array.prototype.every - 'length' is a string containing a negative + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js index eb93388d00..eaf6fdcb7e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js - * @description Array.prototype.every - 'length' is a string containing a decimal number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-13 +description: > + Array.prototype.every - 'length' is a string containing a decimal + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js index 4466ce7364..d3a0d67652 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js - * @description Array.prototype.every - 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var objOne = { 0: 9, length: "Infinity" }; - var objTwo = { 0: 9, length: "+Infinity" }; - var objThree = { 0: 9, length: "-Infinity" }; - - return Array.prototype.every.call(objOne, callbackfn) && - Array.prototype.every.call(objTwo, callbackfn) && - Array.prototype.every.call(objThree, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-14 +description: Array.prototype.every - 'length' is a string containing +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var objOne = { 0: 9, length: "Infinity" }; + var objTwo = { 0: 9, length: "+Infinity" }; + var objThree = { 0: 9, length: "-Infinity" }; + + return Array.prototype.every.call(objOne, callbackfn) && + Array.prototype.every.call(objTwo, callbackfn) && + Array.prototype.every.call(objThree, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js index 39691c69dc..b6d9ca3271 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js - * @description Array.prototype.every - 'length' is a string containing an exponential number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-15 +description: > + Array.prototype.every - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js index dd5d83a602..6d110225b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js - * @description Array.prototype.every - 'length' is a string containing a hex number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-16 +description: > + Array.prototype.every - 'length' is a string containing a hex + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js index 5ffbd5764d..1769edda81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js - * @description Array.prototype.every - 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-17 +description: > + Array.prototype.every - 'length' is a string containing a number + with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js index ea4e188b89..e7d1790e10 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js - * @description Array.prototype.every - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, 1: 8, length: "two" }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-18 +description: > + Array.prototype.every - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, 1: 8, length: "two" }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js index 2d802f9c4e..76053715f1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js - * @description Array.prototype.every - value of 'length' is an Object which has an own toString method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var toStringAccessed = false; - var obj = { - 0: 12, - 1: 11, - 2: 9, - - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; - - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-19 +description: > + Array.prototype.every - value of 'length' is an Object which has + an own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var toStringAccessed = false; + var obj = { + 0: 12, + 1: 11, + 2: 9, + + length: { + toString: function () { + toStringAccessed = true; + return '2'; + } + } + }; + + // objects inherit the default valueOf() method from Object + // that simply returns itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2) && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js index 182e4fcc6d..76b3220501 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js - * @description Array.prototype.every on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) - */ - - -function testcase() { - - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 11, 1: 9, length: true }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-2 +description: > + Array.prototype.every on an Array-like object if 'length' is 1 + (length overridden to true(type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 11, 1: 9, length: true }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js index 8561a55f5a..2f41e47d53 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js - * @description Array.prototype.every - value of 'length' is an Object which has an own valueOf method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var valueOfAccessed = false; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - } - }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-20 +description: > + Array.prototype.every - value of 'length' is an Object which has + an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var valueOfAccessed = false; + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + } + }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2) && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js index d1584c9892..4cffb91e9a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js - * @description Array.prototype.every - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var toStringAccessed = false; - var valueOfAccessed = false; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && - valueOfAccessed && - toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-21 +description: > + Array.prototype.every - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var toStringAccessed = false; + var valueOfAccessed = false; + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return '2'; + } + } + }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2) && + valueOfAccessed && + toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js index 89125fc38a..beba77ca4a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js - * @description Array.prototype.every throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var callbackfnAccessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; - - function callbackfn(val, idx, obj) { - callbackfnAccessed = true; - return val > 10; - } - - var obj = { - 0: 11, - 1: 12, - - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; - - try { - Array.prototype.every.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-22 +description: > + Array.prototype.every throws TypeError exception when 'length' is + an object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callbackfnAccessed = false; + var toStringAccessed = false; + var valueOfAccessed = false; + + function callbackfn(val, idx, obj) { + callbackfnAccessed = true; + return val > 10; + } + + var obj = { + 0: 11, + 1: 12, + + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return {}; + } + } + }; + + try { + Array.prototype.every.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js index ecbd5f7fb1..935fb452e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js @@ -1,53 +1,56 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js - * @description Array.prototype.every uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var valueOfAccessed = false; - var toStringAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: child - }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && - valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-23 +description: > + Array.prototype.every uses inherited valueOf method when 'length' + is an object with an own toString and inherited valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var valueOfAccessed = false; + var toStringAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: child + }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2) && + valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js index af70d8aef7..8d10e9b208 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js - * @description Array.prototype.every - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-24 +description: > + Array.prototype.every - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js index 456513fc61..d2d8b62ab0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js - * @description Array.prototype.every - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: -4294967294.5 - }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-25 +description: > + Array.prototype.every - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294.5 + }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js index bda837ad72..a3bd124bd6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js - * @description Array.prototype.every - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-28 +description: Array.prototype.every - value of 'length' is boundary value (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js index 38e4125c03..b3a932779f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js - * @description Array.prototype.every - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-29 +description: > + Array.prototype.every - value of 'length' is boundary value (2^32 + + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 11, + 1: 9, + length: 4294967297 + }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js index f8b8d670f8..f08743b80e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js - * @description Array.prototype.every - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: 0 }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-3 +description: Array.prototype.every - value of 'length' is a number (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: 0 }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js index 1e38fee961..2dfe939205 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js - * @description Array.prototype.every - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: +0 }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-4 +description: Array.prototype.every - value of 'length' is a number (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: +0 }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js index ec1f85f0b4..1bb349005a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js - * @description Array.prototype.every - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: -0 }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-5 +description: Array.prototype.every - value of 'length' is a number (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: -0 }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js index a6b3529cf8..73e03b31c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js - * @description Array.prototype.every - value of 'length' is a number (value is positive) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: 2 }; - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-6 +description: > + Array.prototype.every - value of 'length' is a number (value is + positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: 2 }; + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js index fb37633ff6..55cf938894 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js - * @description Array.prototype.every - value of 'length' is a number (value is negative) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 2 - - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-7 +description: > + Array.prototype.every - value of 'length' is a number (value is + negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 2 + + return Array.prototype.every.call(obj, callbackfn1) && + !Array.prototype.every.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js index 3bd8e4e075..79c313e35d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js - * @description Array.prototype.every - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: Infinity }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-8 +description: > + Array.prototype.every - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: Infinity }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js index c55c0ba9c2..0b597951e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js - * @description Array.prototype.every - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 9, length: -Infinity }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-3-9 +description: > + Array.prototype.every - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 9, length: -Infinity }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js index 6a4b597933..91ede12076 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js - * @description Array.prototype.every throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.every(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-1 +description: Array.prototype.every throws TypeError if callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.every(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js index 90914dacb9..fd32a1e8e5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js - * @description Array.prototype.every - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.every.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-10 +description: > + Array.prototype.every - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.every.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js index 6c3ab2f113..81c4f58e5f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js - * @description Array.prototype.every - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.every.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-11 +description: > + Array.prototype.every - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.every.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js index ce9f3f2b45..4277389d19 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js - * @description Array.prototype.every - 'callbackfn' is a function - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - return ![11, 9].every(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-12 +description: Array.prototype.every - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + return ![11, 9].every(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-15.js index 6dd27eb72b..9f4c6a7c8d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-15.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-15.js - * @description Array.prototype.every - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.every.call(obj); - return false; - } catch (ex) { - return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-15 +description: > + Array.prototype.every - calling with no callbackfn is the same as + passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 10: 10 }; + var lengthAccessed = false; + var loopAccessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.every.call(obj); + return false; + } catch (ex) { + return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js index 25a7528e2d..9e67a3cfdc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js - * @description Array.prototype.every throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.every(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-3 +description: Array.prototype.every throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.every(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js index 3aff4785fa..da904187f4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js - * @description Array.prototype.every throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.every(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-4 +description: Array.prototype.every throws TypeError if callbackfn is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.every(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js index df3bae0ee2..7d999a136e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js - * @description Array.prototype.every throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.every(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-5 +description: Array.prototype.every throws TypeError if callbackfn is number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.every(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js index e6d43f3843..8006f38d4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js - * @description Array.prototype.every throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.every("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-6 +description: Array.prototype.every throws TypeError if callbackfn is string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.every("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js index 5985e97fab..654628d6b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js - * @description Array.prototype.every throws TypeError if callbackfn is Object without a Call internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.every( {} ); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-7 +description: > + Array.prototype.every throws TypeError if callbackfn is Object + without a Call internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.every( {} ); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js index 29eba260b2..1e66026ae5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js - * @description Array.prototype.every - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.every.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-8 +description: > + Array.prototype.every - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.every.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js index 636b911e9f..82b67c3770 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js - * @description Array.prototype.every - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.every.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-4-9 +description: > + Array.prototype.every - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.every.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1-s.js index df1adeb1fe..3cf9a18549 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1-s.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1-s.js - * @description Array.prototype.every - thisArg not passed to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - - [1].every(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-1-s +description: Array.prototype.every - thisArg not passed to strict callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + + function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + + [1].every(callbackfn); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js index 5cce3ee95a..7c9e628bd9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js - * @description Array.prototype.every - thisArg not passed - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return this === fnGlobalObject(); - } - - var arr = [1]; - if(arr.every(callbackfn) === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-1 +description: Array.prototype.every - thisArg not passed +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return this === fnGlobalObject(); + } + + var arr = [1]; + if(arr.every(callbackfn) === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js index 4298dfbf47..e9be89a8d1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js - * @description Array.prototype.every - Array Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objArray = []; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objArray; - } - - - - return [11].every(callbackfn, objArray) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-10 +description: Array.prototype.every - Array Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objArray = []; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objArray; + } + + + + return [11].every(callbackfn, objArray) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js index 0e5e3c0f55..cc9593d878 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js - * @description Array.prototype.every - String Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objString = new String(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objString; - } - - - - return [11].every(callbackfn, objString) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-11 +description: Array.prototype.every - String Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objString = new String(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objString; + } + + + + return [11].every(callbackfn, objString) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js index 3b184dccc8..13e41c8eb0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js - * @description Array.prototype.every - Boolean Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objBoolean = new Boolean(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objBoolean; - } - - - - return [11].every(callbackfn, objBoolean) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-12 +description: Array.prototype.every - Boolean Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objBoolean = new Boolean(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objBoolean; + } + + + + return [11].every(callbackfn, objBoolean) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js index 7370d6a964..b42b149700 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js - * @description Array.prototype.every - Number Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objNumber = new Number(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objNumber; - } - - return [11].every(callbackfn, objNumber) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-13 +description: Array.prototype.every - Number Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objNumber = new Number(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objNumber; + } + + return [11].every(callbackfn, objNumber) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js index f489916971..acee10713c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js - * @description Array.prototype.every - the Math object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === Math; - } - - return [11].every(callbackfn, Math) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-14 +description: Array.prototype.every - the Math object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === Math; + } + + return [11].every(callbackfn, Math) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js index 2dcd9b45c8..c4449a96c2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js - * @description Array.prototype.every - Date Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objDate = new Date(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objDate; - } - - return [11].every(callbackfn, objDate) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-15 +description: Array.prototype.every - Date Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objDate = new Date(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objDate; + } + + return [11].every(callbackfn, objDate) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js index 278548936c..e8cb42451b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js - * @description Array.prototype.every - RegExp Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objRegExp = new RegExp(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objRegExp; - } - - return [11].every(callbackfn, objRegExp) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-16 +description: Array.prototype.every - RegExp Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objRegExp = new RegExp(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objRegExp; + } + + return [11].every(callbackfn, objRegExp) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js index da9862f3e2..d452a7ad07 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js - * @description Array.prototype.every - the JSON object can be used as thisArg - */ - - -function testcase() { - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === JSON; - } - - return [11].every(callbackfn, JSON) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-17 +description: Array.prototype.every - the JSON object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === JSON; + } + + return [11].every(callbackfn, JSON) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js index 9d52c1573b..449c021697 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js - * @description Array.prototype.every - Error Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objError = new RangeError(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objError; - } - - return [11].every(callbackfn, objError) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-18 +description: Array.prototype.every - Error Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objError = new RangeError(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objError; + } + + return [11].every(callbackfn, objError) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js index cea453384c..63baf6aee8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js - * @description Array.prototype.every - the Arguments object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var arg; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === arg; - } - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - return [11].every(callbackfn, arg) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-19 +description: Array.prototype.every - the Arguments object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arg; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === arg; + } + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + return [11].every(callbackfn, arg) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js index 5981dcbe8d..092f0ba998 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js - * @description Array.prototype.every - thisArg is Object - */ - - -function testcase() { - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var arr = [1]; - if(arr.every(callbackfn, o) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-2 +description: Array.prototype.every - thisArg is Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var o = new Object(); + o.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var arr = [1]; + if(arr.every(callbackfn, o) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-21.js index e9c971545d..2f6888717a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-21.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-21.js - * @description Array.prototype.every - the global object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === fnGlobalObject(); - } - - return [11].every(callbackfn, fnGlobalObject()) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-21 +description: Array.prototype.every - the global object can be used as thisArg +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === fnGlobalObject(); + } + + return [11].every(callbackfn, fnGlobalObject()) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js index 3023de2de1..6ab3e498b6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js - * @description Array.prototype.every - boolean primitive can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === false; - } - - return [11].every(callbackfn, false) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-22 +description: Array.prototype.every - boolean primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === false; + } + + return [11].every(callbackfn, false) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js index 664f4fb376..674c28b0a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js - * @description Array.prototype.every - number primitive can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === 101; - } - - return [11].every(callbackfn, 101) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-23 +description: Array.prototype.every - number primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === 101; + } + + return [11].every(callbackfn, 101) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js index 064e13a33c..10a0389188 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js - * @description Array.prototype.every - string primitive can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === "abc"; - } - - return [11].every(callbackfn, "abc") && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-24 +description: Array.prototype.every - string primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === "abc"; + } + + return [11].every(callbackfn, "abc") && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js index 3a323cc905..fa2d645c25 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js - * @description Array.prototype.every - thisArg is Array - */ - - -function testcase() { - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var arr = [1]; - - if(arr.every(callbackfn, a) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-3 +description: Array.prototype.every - thisArg is Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var a = new Array(); + a.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var arr = [1]; + + if(arr.every(callbackfn, a) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js index 7031d0385c..e0f71641ee 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js - * @description Array.prototype.every - thisArg is object from object template(prototype) - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; - - if(arr.every(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-4 +description: > + Array.prototype.every - thisArg is object from object + template(prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.prototype.res = true; + var f = new foo(); + var arr = [1]; + + if(arr.every(callbackfn,f) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js index 69db130818..f165fc0c2a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js - * @description Array.prototype.every - thisArg is object from object template - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - var f = new foo(); - f.res = true; - var arr = [1]; - - if(arr.every(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-5 +description: Array.prototype.every - thisArg is object from object template +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + var f = new foo(); + f.res = true; + var arr = [1]; + + if(arr.every(callbackfn,f) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js index af19433d20..edb6c20cda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js - * @description Array.prototype.every - thisArg is function - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.res = true; - var arr = [1]; - - if(arr.every(callbackfn,foo) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-6 +description: Array.prototype.every - thisArg is function +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.res = true; + var arr = [1]; + + if(arr.every(callbackfn,foo) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js index eafa339a97..05e62c2de9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js - * @description Array.prototype.every - built-in functions can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === eval; - } - - return [11].every(callbackfn, eval) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-7 +description: Array.prototype.every - built-in functions can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === eval; + } + + return [11].every(callbackfn, eval) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js index aff4cbc2d4..86ab5d0db4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js - * @description Array.prototype.every - Function Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objFunction = function () { }; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objFunction; - } - - return [11].every(callbackfn, objFunction) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-5-9 +description: Array.prototype.every - Function Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objFunction = function () { }; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objFunction; + } + + return [11].every(callbackfn, objFunction) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js index 722bb54e63..6a9bcf2df0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js - * @description Array.prototype.every considers new elements added to array after the call - */ - - -function testcase() { - - var calledForThree = false; - - function callbackfn(val, Idx, obj) - { - arr[2] = 3; - if(val == 3) - calledForThree = true; - return true; - } - - var arr = [1,2,,4,5]; - - var res = arr.every(callbackfn); - - return calledForThree; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-1 +description: > + Array.prototype.every considers new elements added to array after + the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + var calledForThree = false; + + function callbackfn(val, Idx, obj) + { + arr[2] = 3; + if(val == 3) + calledForThree = true; + return true; + } + + var arr = [1,2,,4,5]; + + var res = arr.every(callbackfn); + + return calledForThree; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js index 88ea60e715..f9473eddda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js - * @description Array.prototype.every considers new value of elements in array after the call - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - arr[4] = 6; - if(val < 6) - return true; - else - return false; - } - - var arr = [1,2,3,4,5]; - - if(arr.every(callbackfn) === false) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-2 +description: > + Array.prototype.every considers new value of elements in array + after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + arr[4] = 6; + if(val < 6) + return true; + else + return false; + } + + var arr = [1,2,3,4,5]; + + if(arr.every(callbackfn) === false) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js index 8274ba6484..6188212a00 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js - * @description Array.prototype.every doesn't visit deleted elements in array after the call - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - delete arr[2]; - if(val == 3) - return false; - else - return true; - } - - var arr = [1,2,3,4,5]; - - if(arr.every(callbackfn) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-3 +description: > + Array.prototype.every doesn't visit deleted elements in array + after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + delete arr[2]; + if(val == 3) + return false; + else + return true; + } + + var arr = [1,2,3,4,5]; + + if(arr.every(callbackfn) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js index 7d1be54aeb..7237d75fb5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js - * @description Array.prototype.every doesn't visit deleted elements when Array.length is decreased - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - arr.length = 3; - if(val < 4) - return true; - else - return false; - } - - var arr = [1,2,3,4,6]; - - if(arr.every(callbackfn) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-4 +description: > + Array.prototype.every doesn't visit deleted elements when + Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + arr.length = 3; + if(val < 4) + return true; + else + return false; + } + + var arr = [1,2,3,4,6]; + + if(arr.every(callbackfn) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js index 903505af00..e8efc8369b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js - * @description Array.prototype.every doesn't consider newly added elements in sparse array - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - arr[1000] = 3; - if(val < 3) - return true; - else - return false; - } - - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; - - if(arr.every(callbackfn) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-5 +description: > + Array.prototype.every doesn't consider newly added elements in + sparse array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + arr[1000] = 3; + if(val < 3) + return true; + else + return false; + } + + var arr = new Array(10); + arr[1] = 1; + arr[2] = 2; + + if(arr.every(callbackfn) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js index 7bafd4c2b9..1d04dd8270 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js - * @description Array.prototype.every visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - delete arr[2]; - if(val == 3) - return false; - else - return true; - } - - Array.prototype[2] = 3; - var arr = [1,2,3,4,5]; - - var res = arr.every(callbackfn); - delete Array.prototype[2]; - - if(res === false) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-6 +description: > + Array.prototype.every visits deleted element in array after the + call when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + delete arr[2]; + if(val == 3) + return false; + else + return true; + } + + Array.prototype[2] = 3; + var arr = [1,2,3,4,5]; + + var res = arr.every(callbackfn); + delete Array.prototype[2]; + + if(res === false) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-7.js index 1c403e4724..6f5e8eac28 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-7.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-7.js - * @description Array.prototype.every - Deleting the array itself within the callbackfn of Array.prototype.every is successful once Array.prototype.every is called for all elements - */ - - -function testcase() { - var o = new Object(); - o.arr = [1, 2, 3, 4, 5]; - - function callbackfn(val, Idx, obj) { - delete o.arr; - if (val === Idx + 1) - return true; - else - return false; - } - - return o.arr.every(callbackfn) && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-7 +description: > + Array.prototype.every - Deleting the array itself within the + callbackfn of Array.prototype.every is successful once + Array.prototype.every is called for all elements +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = new Object(); + o.arr = [1, 2, 3, 4, 5]; + + function callbackfn(val, Idx, obj) { + delete o.arr; + if (val === Idx + 1) + return true; + else + return false; + } + + return o.arr.every(callbackfn) && !o.hasOwnProperty("arr"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js index aaf68c18b1..2a18c414bb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js - * @description Array.prototype.every - no observable effects occur if len is 0 - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 12, length: 0 }; - - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-8 +description: Array.prototype.every - no observable effects occur if len is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 12, length: 0 }; + + return Array.prototype.every.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-9.js index 1455b30a70..0f9913f227 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-9.js - * @description Array.prototype.every - modifications to length don't change number of iterations - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } - - var obj = { 1: 12, 2: 9, length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); - - return Array.prototype.every.call(obj, callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-9 +description: > + Array.prototype.every - modifications to length don't change + number of iterations +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val > 10; + } + + var obj = { 1: 12, 2: 9, length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + obj.length = 3; + return 11; + }, + configurable: true + }); + + return Array.prototype.every.call(obj, callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js index fb92d17faa..09b764af79 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js - * @description Array.prototype.every - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0.; - function callbackfn(val, Idx, obj) - { - callCnt++; - return true; - } - - var arr = new Array(10); - arr[1] = undefined; - arr.every(callbackfn); - if( callCnt === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-1 +description: > + Array.prototype.every - callbackfn not called for indexes never + been assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0.; + function callbackfn(val, Idx, obj) + { + callCnt++; + return true; + } + + var arr = new Array(10); + arr[1] = undefined; + arr.every(callbackfn); + if( callCnt === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-10.js index 8cea83ec4b..1f1eed28ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-10.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-10.js - * @description Array.prototype.every - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = { 2: 2, length: 20 }; - - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return Array.prototype.every.call(arr, callbackfn) && accessed; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-10 +description: > + Array.prototype.every - deleting property of prototype causes + prototype index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; + } + var arr = { 2: 2, length: 20 }; + + Object.defineProperty(arr, "0", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return Array.prototype.every.call(arr, callbackfn) && accessed; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-11.js index e441502687..e211a8c131 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-11.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-11.js - * @description Array.prototype.every - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return arr.every(callbackfn) && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-11 +description: > + Array.prototype.every - deleting property of prototype causes + prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; + } + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return arr.every(callbackfn) && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-12.js index c1ab418329..4e722676fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-12.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-12.js - * @description Array.prototype.every - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return !Array.prototype.every.call(arr, callbackfn); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-12 +description: > + Array.prototype.every - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } + } + var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return !Array.prototype.every.call(arr, callbackfn); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-13.js index a58582ac33..0c29a1eec6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-13.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-13.js - * @description Array.prototype.every - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - var arr = [0, 111, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return !arr.every(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-13 +description: > + Array.prototype.every - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } + } + var arr = [0, 111, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return !arr.every(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-14.js index 0651f541cf..c47a6ee391 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-14.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-14.js - * @description Array.prototype.every - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 3; - } - var arr = [0, 1, 2, "last"]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - return arr.every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-14 +description: > + Array.prototype.every - decreasing length of array causes index + property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 3; + } + var arr = [0, 1, 2, "last"]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + return arr.every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-15.js index 1049ebfd83..4bc15d378f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-15.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-15.js - * @description Array.prototype.every - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return !arr.every(callbackfn); - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-15 +description: > + Array.prototype.every - decreasing length of array with prototype + property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return false; + } else { + return true; + } + } + var arr = [0, 1, 2]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return !arr.every(callbackfn); + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-16.js index dee1b45e3e..eda4865cd1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-16.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-16.js - * @description Array.prototype.every - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return false; - } else { - return true; - } - } - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return !arr.every(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-16 +description: > + Array.prototype.every - decreasing length of array does not delete + non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return false; + } else { + return true; + } + } + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return !arr.every(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js index 00e6690640..363fa33a1c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js - * @description Array.prototype.every - added properties in step 2 are visible here - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return false; - } else { - return true; - } - } - - var arr = { }; - - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); - - return !Array.prototype.every.call(arr, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-2 +description: Array.prototype.every - added properties in step 2 are visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return false; + } else { + return true; + } + } + + var arr = { }; + + Object.defineProperty(arr, "length", { + get: function () { + arr[2] = "length"; + return 3; + }, + configurable: true + }); + + return !Array.prototype.every.call(arr, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js index 07c640c4e8..990b3b2244 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js - * @description Array.prototype.every - deleted properties in step 2 are visible here - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 2; - } - var arr = { 2: 6.99, 8: 19}; - - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 10; - }, - configurable: true - }); - - return Array.prototype.every.call(arr, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-3 +description: > + Array.prototype.every - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 2; + } + var arr = { 2: 6.99, 8: 19}; + + Object.defineProperty(arr, "length", { + get: function () { + delete arr[2]; + return 10; + }, + configurable: true + }); + + return Array.prototype.every.call(arr, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-4.js index 65968ab564..8bab5fe084 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-4.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-4.js - * @description Array.prototype.every - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - - var arr = { length: 2 }; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return !Array.prototype.every.call(arr, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-4 +description: > + Array.prototype.every - properties added into own object after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } + } + + var arr = { length: 2 }; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return !Array.prototype.every.call(arr, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-5.js index 188de1c84c..9c966108a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-5.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-5.js - * @description Array.prototype.every - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return !arr.every(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-5 +description: > + Array.prototype.every - properties added into own object after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return !arr.every(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-6.js index 72c7eb8211..2b043766b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-6.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-6.js - * @description Array.prototype.every - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = { length: 2 }; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return !Array.prototype.every.call(arr, callbackfn); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-6 +description: > + Array.prototype.every - properties can be added to prototype after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } + } + var arr = { length: 2 }; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return !Array.prototype.every.call(arr, callbackfn); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-7.js index 70545d9c2a..363e28ce88 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-7.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-7.js - * @description Array.prototype.every - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return !arr.every(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-7 +description: > + Array.prototype.every - properties can be added to prototype after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } + } + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return !arr.every(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-8.js index c67bc611bd..268ee463d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-8.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-8.js - * @description Array.prototype.every - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-8 +description: > + Array.prototype.every - deleting own property causes index + property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; + } + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-9.js index 1f012cd38d..e10a6e000e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-9.js - * @description Array.prototype.every - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = [1, 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return arr.every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-b-9 +description: > + Array.prototype.every - deleting own property causes index + property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; + } + var arr = [1, 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return arr.every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js index 660529b7eb..3c6935880f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js - * @description Array.prototype.every - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var kValue = { }; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val !== kValue; - } else { - return true; - } - } - - var obj = { 5: kValue, length: 100 }; - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-1 +description: > + Array.prototype.every - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = { }; + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val !== kValue; + } else { + return true; + } + } + + var obj = { 5: kValue, length: 100 }; + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-10.js index fa9d14d375..55adfd1083 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-10.js - * @description Array.prototype.every - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 2) { - return val !== 12; - } else { - return true; - } - } - - var arr = []; - - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); - - return !arr.every(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-10 +description: > + Array.prototype.every - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 2) { + return val !== 12; + } else { + return true; + } + } + + var arr = []; + + Object.defineProperty(arr, "2", { + get: function () { + return 12; + }, + configurable: true + }); + + return !arr.every(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-11.js index 3ad37ec430..30de14910f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-11.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-11.js - * @description Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } - - var proto = { 0: 5, 1: 6 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-11 +description: > + Array.prototype.every - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } + } + + var proto = { 0: 5, 1: 6 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + return !Array.prototype.every.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-12.js index c2cb3466d6..4fc61779c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-12.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-12.js - * @description Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 10; - } else { - return true; - } - } - - var arr = []; - try { - Array.prototype[0] = 10; - - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); - - return !arr.every(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-12 +description: > + Array.prototype.every - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 10; + } else { + return true; + } + } + + var arr = []; + try { + Array.prototype[0] = 10; + + Object.defineProperty(arr, "0", { + get: function () { + return 111; + }, + configurable: true + }); + + return !arr.every(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-13.js index 8b637ebdd8..15878cc259 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-13.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-13.js - * @description Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 6; - } else { - return true; - } - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); - - - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-13 +description: > + Array.prototype.every - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 6; + } else { + return true; + } + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 6; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "1", { + get: function () { + return 12; + }, + configurable: true + }); + + + return !Array.prototype.every.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-14.js index ddfa7b28ac..40e4ae626f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-14.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-14.js - * @description Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } - - var arr = []; - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - return !arr.every(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-14 +description: > + Array.prototype.every - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } + } + + var arr = []; + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + return !arr.every(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-15.js index 9eee7c2044..a191e7be75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-15.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-15.js - * @description Array.prototype.every - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val !== 11; - } else { - return true; - } - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 20; - - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-15 +description: > + Array.prototype.every - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val !== 11; + } else { + return true; + } + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 20; + + return !Array.prototype.every.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-16.js index a0097043a4..1d8c7fc714 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-16.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-16.js - * @description Array.prototype.every - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - return ![, , , ].every(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-16 +description: > + Array.prototype.every - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + return ![, , , ].every(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-17.js index 3cd607b476..bc2e6f635d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-17.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-17.js - * @description Array.prototype.every - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-17 +description: > + Array.prototype.every - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-18.js index 3195af8f5c..2537efc2d1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-18.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-18.js - * @description Array.prototype.every - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - return arr.every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-18 +description: > + Array.prototype.every - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + return arr.every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-19.js index 6442061907..2834c1f1be 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-19.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-19.js - * @description Array.prototype.every - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - try { - Object.prototype[1] = 10; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-19 +description: > + Array.prototype.every - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + try { + Object.prototype[1] = 10; + return Array.prototype.every.call(obj, callbackfn) && accessed; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js index 6f1140e643..1ac9ddf8cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js - * @description Array.prototype.every - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } - - return [11].every(callbackfn) && 1 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-2 +description: > + Array.prototype.every - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val === 11; + } + + return [11].every(callbackfn) && 1 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-20.js index 8d89d32a89..97f8edb61d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-20.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-20.js - * @description Array.prototype.every - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - try { - Array.prototype[0] = 100; - return arr.every(callbackfn) && accessed; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-20 +description: > + Array.prototype.every - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + try { + Array.prototype[0] = 100; + return arr.every(callbackfn) && accessed; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-21.js index 7f94ab642d..338ccad6f1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-21.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-21.js - * @description Array.prototype.every - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } - - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - - return Array.prototype.every.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-21 +description: > + Array.prototype.every - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; + } + + var proto = {}; + Object.defineProperty(proto, "1", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + + return Array.prototype.every.call(child, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-22.js index 9e98110eec..6bdb6276c8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-22.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-22.js - * @description Array.prototype.every - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } - - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - - return [, ].every(callbackfn) && accessed; - } finally { - delete Array.prototype[0]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-22 +description: > + Array.prototype.every - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; + } + + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + + return [, ].every(callbackfn) && accessed; + } finally { + delete Array.prototype[0]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-23.js index 3d95484aad..8d2e789618 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-23.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-23.js - * @description Array.prototype.every - This object is an global object which contains index property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 11; - fnGlobalObject().length = 1; - return !Array.prototype.every.call(fnGlobalObject(), callbackfn); - } finally { - delete fnGlobalObject()[0]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-23 +description: > + Array.prototype.every - This object is an global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 11; + fnGlobalObject().length = 1; + return !Array.prototype.every.call(fnGlobalObject(), callbackfn); + } finally { + delete fnGlobalObject()[0]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js index 270449f018..45e244c7ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js - * @description Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } - - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; - - return func(11) && called === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-25 +description: > + Array.prototype.every - This object is the Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val === 11; + } + + var func = function (a, b) { + return Array.prototype.every.call(arguments, callbackfn); + }; + + return func(11) && called === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js index 21e7ad64cd..94e2a4b181 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js - * @description Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } - - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; - - return func(11, 9) && called === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-26 +description: > + Array.prototype.every - This object is the Arguments object which + implements its own property get method (number of arguments equals + number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } + } + + var func = function (a, b) { + return Array.prototype.every.call(arguments, callbackfn); + }; + + return func(11, 9) && called === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js index bd09c08dfa..cc7daf4eaa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js - * @description Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - if (idx < 2) { - return val > 10; - } else if (idx === 2) { - return val < 10; - } else { - return false; - } - } - - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; - - return func(11, 12, 9) && called === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-27 +description: > + Array.prototype.every - This object is the Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + if (idx < 2) { + return val > 10; + } else if (idx === 2) { + return val < 10; + } else { + return false; + } + } + + var func = function (a, b) { + return Array.prototype.every.call(arguments, callbackfn); + }; + + return func(11, 12, 9) && called === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-28.js index 60c27f81d0..c7dfdb7da5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-28.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-28.js - * @description Array.prototype.every - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - var preIterVisible = false; - var arr = []; - - function callbackfn(val, idx, obj) { - return val > 10; - } - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); - - return !arr.every(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-28 +description: > + Array.prototype.every - element changed by getter on previous + iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var arr = []; + + function callbackfn(val, idx, obj) { + return val > 10; + } + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true + }); + + return !arr.every(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-29.js index 3028f3b38d..88f21c3d2e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-29.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-29.js - * @description Array.prototype.every - element changed by getter on previous iterations is observed on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var preIterVisible = false; - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-29 +description: > + Array.prototype.every - element changed by getter on previous + iterations is observed on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var preIterVisible = false; + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true + }); + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js index 6d9cdc8990..be9a1cd3f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js - * @description Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === 100; - } else { - return true; - } - } - - var proto = { 0: 11, 5: 100 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[5] = "abc"; - child.length = 10; - - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-3 +description: > + Array.prototype.every - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === 100; + } else { + return true; + } + } + + var proto = { 0: 11, 5: 100 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[5] = "abc"; + child.length = 10; + + return !Array.prototype.every.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-30.js index fb56eeec13..fb47fc4ce5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-30.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-30.js - * @description Array.prototype.every - unnhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } - - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.every.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-30 +description: > + Array.prototype.every - unnhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; + } + + var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.every.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-31.js index f5dd6a9824..f681fd45a8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-31.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-31.js - * @description Array.prototype.every - unhandled exceptions happened in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } - - var arr = []; - arr[5] = 10; - arr[10] = 100; - - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.every(callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-31 +description: > + Array.prototype.every - unhandled exceptions happened in getter + terminate iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; + } + + var arr = []; + arr[5] = 10; + arr[10] = 100; + + Object.defineProperty(arr, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.every(callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js index b499215e76..1cca3c3729 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js - * @description Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 12; - } - - try { - Array.prototype[0] = 11; - Array.prototype[1] = 11; - - return [12, 12].every(callbackfn) && called === 2; - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-4 +description: > + Array.prototype.every - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = 0; + function callbackfn(val, idx, obj) { + called++; + return val === 12; + } + + try { + Array.prototype[0] = 11; + Array.prototype[1] = 11; + + return [12, 12].every(callbackfn) && called === 2; + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-5.js index ef1ee6eadd..58153111a1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-5.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-5.js - * @description Array.prototype.every - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); - child[1] = 12; - - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-5 +description: > + Array.prototype.every - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "0", { + value: 11, + configurable: true + }); + child[1] = 12; + + return !Array.prototype.every.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-6.js index c0e73495fb..5ab84aea25 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-6.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-6.js - * @description Array.prototype.every - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val === 11; - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); - return [11].every(callbackfn) && accessed; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-6 +description: > + Array.prototype.every - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val === 11; + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 9; + }, + configurable: true + }); + return [11].every(callbackfn) && accessed; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js index feaab41420..78ad3fb793 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js - * @description Array.prototype.every - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = 'abc'; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val !== kValue; - } else { - return true; - } - } - - var proto = { 5: kValue }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-7 +description: > + Array.prototype.every - element to be retrieved is inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = 'abc'; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val !== kValue; + } else { + return true; + } + } + + var proto = { 5: kValue }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + return !Array.prototype.every.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js index d962e92a5f..40f0e30499 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js - * @description Array.prototype.every - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val !== 13; - } else { - return true; - } - } - - try { - Array.prototype[1] = 13; - return ![, , , ].every(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-8 +description: > + Array.prototype.every - element to be retrieved is inherited data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val !== 13; + } else { + return true; + } + } + + try { + Array.prototype[1] = 13; + return ![, , , ].every(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-9.js index f033399f95..adedfa98ab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-9.js - * @description Array.prototype.every - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } - - var obj = { 10: 10, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-i-9 +description: > + Array.prototype.every - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } + } + + var obj = { 10: 10, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js index a085be83d1..98323fc474 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js - * @description Array.prototype.every - callbackfn called with correct parameters - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - if(obj[Idx] === val) - return true; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - - if(arr.every(callbackfn) === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-1 +description: Array.prototype.every - callbackfn called with correct parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + if(obj[Idx] === val) + return true; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + + if(arr.every(callbackfn) === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js index 1fb1fc95ed..b942344bf3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js - * @description Array.prototype.every - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val) { - called++; - return val > 10; - } - - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-10 +description: > + Array.prototype.every - callbackfn is called with 1 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val) { + called++; + return val > 10; + } + + return [11, 12].every(callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js index 82c2a1fd4e..d73d1cbd48 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js - * @description Array.prototype.every - callbackfn is called with 2 formal parameter - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx) { - called++; - return val > 10 && arguments[2][idx] === val; - } - - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-11 +description: > + Array.prototype.every - callbackfn is called with 2 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx) { + called++; + return val > 10 && arguments[2][idx] === val; + } + + return [11, 12].every(callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js index 362a6d1c07..917f325711 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js - * @description Array.prototype.every - callbackfn is called with 3 formal parameter - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val > 10 && obj[idx] === val; - } - - return [11, 12, 13].every(callbackfn) && 3 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-12 +description: > + Array.prototype.every - callbackfn is called with 3 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val > 10 && obj[idx] === val; + } + + return [11, 12, 13].every(callbackfn) && 3 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js index 9f9660e843..785c079741 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js - * @description Array.prototype.every - callbackfn that uses arguments object to get parameter value - */ - - -function testcase() { - - var called = 0; - - function callbackfn() { - called++; - return arguments[2][arguments[1]] === arguments[0]; - } - - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-13 +description: > + Array.prototype.every - callbackfn that uses arguments object to + get parameter value +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn() { + called++; + return arguments[2][arguments[1]] === arguments[0]; + } + + return [11, 12].every(callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js index a7f57b31c4..04be3263d5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js - * @description Array.prototype.every - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean primitive) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() !== false; - } - - var obj = { 0: 11, length: 2 }; - - return !Array.prototype.every.call(obj, callbackfn, false) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-16 +description: > + Array.prototype.every - 'this' of 'callbackfn' is a Boolean object + when T is not an object (T is a boolean primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() !== false; + } + + var obj = { 0: 11, length: 2 }; + + return !Array.prototype.every.call(obj, callbackfn, false) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js index 72c098617b..a8a36d1ae3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js - * @description Array.prototype.every -'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, o) { - accessed = true; - return 5 === this.valueOf(); - } - - var obj = { 0: 11, length: 2 }; - - return Array.prototype.every.call(obj, callbackfn, 5) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-17 +description: > + Array.prototype.every -'this' of 'callbackfn' is a Number object + when T is not an object (T is a number primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, o) { + accessed = true; + return 5 === this.valueOf(); + } + + var obj = { 0: 11, length: 2 }; + + return Array.prototype.every.call(obj, callbackfn, 5) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js index 59701ad018..1ccc5de64e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js - * @description Array.prototype.every - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return 'hello' === this.valueOf(); - } - - var obj = { 0: 11, length: 2 }; - - return Array.prototype.every.call(obj, callbackfn, "hello") && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-18 +description: > + Array.prototype.every - 'this' of 'callbackfn' is an String object + when T is not an object (T is a string primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return 'hello' === this.valueOf(); + } + + var obj = { 0: 11, length: 2 }; + + return Array.prototype.every.call(obj, callbackfn, "hello") && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js index 018764d60a..0f72c7786f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js - * @description Array.prototype.every - non-indexed properties are not called - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val !== 8; - } - - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; - - return Array.prototype.every.call(obj, callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-19 +description: Array.prototype.every - non-indexed properties are not called +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val !== 8; + } + + var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; + + return Array.prototype.every.call(obj, callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js index 23e61035e0..cf6143a6ec 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js - * @description Array.prototype.every - callbackfn takes 3 arguments - */ - - -function testcase() { - - function callbackfn(val, Idx, obj) - { - if(arguments.length === 3) //verify if callbackfn was called with 3 parameters - return true; - } - - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; - - if(arr.every(callbackfn) === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-2 +description: Array.prototype.every - callbackfn takes 3 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, Idx, obj) + { + if(arguments.length === 3) //verify if callbackfn was called with 3 parameters + return true; + } + + var arr = [0,1,true,null,new Object(),"five"]; + arr[999999] = -6.6; + + if(arr.every(callbackfn) === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js index f60cc9c270..ae4b4ee820 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js - * @description Array.prototype.every - callbackfn called with correct parameters (thisArg is correct) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return 10 === this.threshold; - } - - var thisArg = { threshold: 10 }; - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.every.call(obj, callbackfn, thisArg); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-20 +description: > + Array.prototype.every - callbackfn called with correct parameters + (thisArg is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return 10 === this.threshold; + } + + var thisArg = { threshold: 10 }; + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.every.call(obj, callbackfn, thisArg); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js index bff61017a9..4881aeb01e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js - * @description Array.prototype.every - callbackfn called with correct parameters (kValue is correct) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 0) { - return val === 11; - } - - if (idx === 1) { - return val === 12; - } - - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-21 +description: > + Array.prototype.every - callbackfn called with correct parameters + (kValue is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 0) { + return val === 11; + } + + if (idx === 1) { + return val === 12; + } + + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js index a2a159f831..6290624f72 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js - * @description Array.prototype.every - callbackfn called with correct parameters (the index k is correct) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - if (val === 11) { - return idx === 0; - } - - if (val === 12) { - return idx === 1; - } - - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-22 +description: > + Array.prototype.every - callbackfn called with correct parameters + (the index k is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + if (val === 11) { + return idx === 0; + } + + if (val === 12) { + return idx === 1; + } + + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js index 75393fe6f3..ffb6540ec7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js - * @description Array.prototype.every - callbackfn called with correct parameters (this object O is correct) - */ - - -function testcase() { - - var called = 0; - var obj = { 0: 11, 1: 12, length: 2 }; - - function callbackfn(val, idx, o) { - called++; - return obj === o; - } - - return Array.prototype.every.call(obj, callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-23 +description: > + Array.prototype.every - callbackfn called with correct parameters + (this object O is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var obj = { 0: 11, 1: 12, length: 2 }; + + function callbackfn(val, idx, o) { + called++; + return obj === o; + } + + return Array.prototype.every.call(obj, callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js index 1eaaa8df29..17deea8f9e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js - * @description Array.prototype.every immediately returns false if callbackfn returns false - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - if(idx > 5) - return false; - else - return true; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - - if(arr.every(callbackfn) === false && callCnt === 7) - return true; - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-3 +description: > + Array.prototype.every immediately returns false if callbackfn + returns false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + if(idx > 5) + return false; + else + return true; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + + if(arr.every(callbackfn) === false && callCnt === 7) + return true; + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js index 6b69fe61b6..86a19a6c67 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js - * @description Array.prototype.every - k values are passed in ascending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return false; - } else { - lastIdx++; - return true; - } - } - - return arr.every(callbackfn) && arr.length === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-4 +description: > + Array.prototype.every - k values are passed in ascending numeric + order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4, 5]; + var lastIdx = 0; + var called = 0; + function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return false; + } else { + lastIdx++; + return true; + } + } + + return arr.every(callbackfn) && arr.length === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js index b99d6490e3..5490b3c180 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js - * @description Array.prototype.every - k values are accessed during each iteration and not prior to starting the loop on an Array - */ - - -function testcase() { - var called = 0; - var kIndex = []; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return false; - } - kIndex[idx] = 1; - return true; - } else { - return false; - } - } - - return [11, 12, 13, 14].every(callbackfn, undefined) && 4 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-5 +description: > + Array.prototype.every - k values are accessed during each + iteration and not prior to starting the loop on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = 0; + var kIndex = []; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return false; + } + kIndex[idx] = 1; + return true; + } else { + return false; + } + } + + return [11, 12, 13, 14].every(callbackfn, undefined) && 4 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js index 0158c684bb..25f4ecde83 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js - * @description Array.prototype.every - arguments to callbackfn are self consistent - */ - - -function testcase() { - - var accessed = false; - var thisArg = {}; - var obj = { 0: 11, length: 1 }; - - function callbackfn() { - accessed = true; - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } - - return Array.prototype.every.call(obj, callbackfn, thisArg) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-6 +description: Array.prototype.every - arguments to callbackfn are self consistent +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var thisArg = {}; + var obj = { 0: 11, length: 1 }; + + function callbackfn() { + accessed = true; + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; + } + + return Array.prototype.every.call(obj, callbackfn, thisArg) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js index 8c1ded32cb..9abfa61eaa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js - * @description Array.prototype.every - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - if (called === 1) { - throw new Error("Exception occurred in callbackfn"); - } - return true; - } - - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; - - try { - Array.prototype.every.call(obj, callbackfn); - return false; - } catch (ex) { - return 1 === called; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-7 +description: > + Array.prototype.every - unhandled exceptions happened in + callbackfn terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + if (called === 1) { + throw new Error("Exception occurred in callbackfn"); + } + return true; + } + + var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; + + try { + Array.prototype.every.call(obj, callbackfn); + return false; + } catch (ex) { + return 1 === called; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js index 3b8d9a0079..1f218d6e86 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js - * @description Array.prototype.every - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12, length: 2 }; - - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } - - - - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-8 +description: > + Array.prototype.every - element changed by callbackfn on previous + iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12, length: 2 }; + + function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; + } + + + + return !Array.prototype.every.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js index ae260680c4..90411bc978 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js - * @description Array.prototype.every - callbackfn is called with 0 formal parameter - */ - - -function testcase() { - - var called = 0; - - function callbackfn() { - called++; - return true; - } - - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-ii-9 +description: > + Array.prototype.every - callbackfn is called with 0 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn() { + called++; + return true; + } + + return [11, 12].every(callbackfn) && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js index f7b5079a4d..6df587b032 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js - * @description Array.prototype.every - return value of callbackfn is undefined - */ - - -function testcase() { - - var accessed = false; - var obj = { 0: 11, length: 1 }; - - function callbackfn(val, idx, o) { - accessed = true; - return undefined; - } - - - - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-1 +description: Array.prototype.every - return value of callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { 0: 11, length: 1 }; + + function callbackfn(val, idx, o) { + accessed = true; + return undefined; + } + + + + return !Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js index 40a7eea0a5..131a3a4265 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js - * @description Array.prototype.every - return value of callbackfn is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return Infinity; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-10 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return Infinity; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js index 5d04caf7af..680ddcaca5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js - * @description Array.prototype.every - return value of callbackfn is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return -Infinity; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-11 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return -Infinity; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js index 89c350f600..6180b75199 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js - * @description Array.prototype.every - return value of callbackfn is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } - - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-12 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return NaN; + } + + return ![11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js index eee43dc787..e208cae353 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js - * @description Array.prototype.every - return value of callbackfn is an empty string - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } - - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-13 +description: > + Array.prototype.every - return value of callbackfn is an empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return ""; + } + + return ![11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js index d0953adb86..87bb0e969d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js - * @description Array.prototype.every - return value of callbackfn is a non-empty string - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return "non-empty string"; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-14 +description: > + Array.prototype.every - return value of callbackfn is a non-empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return "non-empty string"; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js index 88ef24589d..605ecc42f8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js - * @description Array.prototype.every - return value of callbackfn is a Function object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return function () { }; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-15 +description: > + Array.prototype.every - return value of callbackfn is a Function + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return function () { }; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js index 94db56a59d..c6bfc08b7c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js - * @description Array.prototype.every - return value of callbackfn is an Array object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return []; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-16 +description: > + Array.prototype.every - return value of callbackfn is an Array + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return []; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js index a8be539fbe..5294caa324 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js - * @description Array.prototype.every - return value of callbackfn is a String object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new String(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-17 +description: > + Array.prototype.every - return value of callbackfn is a String + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new String(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js index 6a5f5a26e7..609815fe63 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js - * @description Array.prototype.every - return value of callbackfn is a Boolean object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new Boolean(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-18 +description: > + Array.prototype.every - return value of callbackfn is a Boolean + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new Boolean(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js index 9213835e17..fde1bd2012 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js - * @description Array.prototype.every - return value of callbackfn is a Number object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new Number(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-19 +description: > + Array.prototype.every - return value of callbackfn is a Number + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new Number(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js index 295a48a19b..3b8f1157db 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js - * @description Array.prototype.every - return value of callbackfn is null - */ - - -function testcase() { - - var accessed = false; - var obj = { 0: 11, length: 1 }; - - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } - - - - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-2 +description: Array.prototype.every - return value of callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { 0: 11, length: 1 }; + + function callbackfn(val, idx, obj) { + accessed = true; + return null; + } + + + + return !Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js index d6be359d9e..e94a9025c6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js - * @description Array.prototype.every - return value of callbackfn is the Math object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return Math; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-20 +description: > + Array.prototype.every - return value of callbackfn is the Math + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return Math; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js index 2a2de745cc..e55b817081 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js - * @description Array.prototype.every - return value of callbackfn is a Date object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new Date(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-21 +description: Array.prototype.every - return value of callbackfn is a Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new Date(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js index 32ecf03de2..0a279fc5d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js - * @description Array.prototype.every - return value of callbackfn is a RegExp object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new RegExp(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-22 +description: > + Array.prototype.every - return value of callbackfn is a RegExp + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new RegExp(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js index a516b03281..540bdf6925 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js - * @description Array.prototype.every - return value of callbackfn is the JSON object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return JSON; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-23 +description: > + Array.prototype.every - return value of callbackfn is the JSON + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return JSON; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js index e156f91fd9..1d089cc933 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js - * @description Array.prototype.every - return value of callbackfn is an Error object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new EvalError(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-24 +description: > + Array.prototype.every - return value of callbackfn is an Error + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new EvalError(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js index 989d2540c2..e0be184f8d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js - * @description Array.prototype.every - return value of callbackfn is the Arguments object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return arguments; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-25 +description: > + Array.prototype.every - return value of callbackfn is the + Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return arguments; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-27.js index be454f6e17..2669d60d82 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-27.js @@ -1,23 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-27.js - * @description Array.prototype.every - return value of callbackfn is the global object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return fnGlobalObject(); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-27 +description: > + Array.prototype.every - return value of callbackfn is the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return fnGlobalObject(); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-28.js index 4fb9b1fee3..07acd09e41 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-28.js @@ -1,48 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-28.js - * @description Array.prototype.every - false prevents further side effects - */ - - -function testcase() { - - var result = false; - var obj = { length: 20 }; - - function callbackfn(val, idx, obj) { - if (idx > 1) { - result = true; - } - return val > 10; - } - - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - return 8; - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - result = true; - return 8; - }, - configurable: true - }); - - return !Array.prototype.every.call(obj, callbackfn) && !result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-28 +description: Array.prototype.every - false prevents further side effects +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var obj = { length: 20 }; + + function callbackfn(val, idx, obj) { + if (idx > 1) { + result = true; + } + return val > 10; + } + + Object.defineProperty(obj, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + return 8; + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + result = true; + return 8; + }, + configurable: true + }); + + return !Array.prototype.every.call(obj, callbackfn) && !result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js index 36b1cd4f0c..dacfa37d83 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js - * @description Array.prototype.every - return value (new Boolean(false)) of callbackfn is treated as true value - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return new Boolean(false); - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-29 +description: > + Array.prototype.every - return value (new Boolean(false)) of + callbackfn is treated as true value +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return new Boolean(false); + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js index 1edc288b38..064da5b50c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js - * @description Array.prototype.every - return value of callbackfn is a boolean (value is false) - */ - - -function testcase() { - - var accessed = false; - var obj = { 0: 11, length: 1 }; - - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } - - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-3 +description: > + Array.prototype.every - return value of callbackfn is a boolean + (value is false) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { 0: 11, length: 1 }; + + function callbackfn(val, idx, obj) { + accessed = true; + return false; + } + + return !Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js index 943362a47a..6f24b6ce4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js - * @description Array.prototype.every - return value of callbackfn is a boolean (value is true) - */ - - -function testcase() { - - var accessed = false; - var obj = { 0: 11, length: 1 }; - - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - - - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-4 +description: > + Array.prototype.every - return value of callbackfn is a boolean + (value is true) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { 0: 11, length: 1 }; + + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + + + return Array.prototype.every.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js index e4c77b8c2e..982bdd97ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js - * @description Array.prototype.every - return value of callbackfn is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } - - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-5 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return 0; + } + + return ![11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js index a37260d987..1f41f227ce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js - * @description Array.prototype.every - return value of callbackfn is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } - - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-6 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return +0; + } + + return ![11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js index df841893b7..54dc5c3e8a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js - * @description Array.prototype.every - return value of callbackfn is a nunmber (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } - - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-7 +description: > + Array.prototype.every - return value of callbackfn is a nunmber + (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return -0; + } + + return ![11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js index 57ad287810..3725c2c785 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js - * @description Array.prototype.every - return value of callbackfn is a number (value is positive number) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return 5; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-8 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return 5; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js index 744edc2415..2ffea0f69b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js - * @description Array.prototype.every - return value of callbackfn is a number (value is negative number) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return -5; - } - - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-7-c-iii-9 +description: > + Array.prototype.every - return value of callbackfn is a number + (value is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return -5; + } + + return [11].every(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js index d04bd3cbbd..b8b126e1f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js - * @description Array.prototype.every returns true if 'length' is 0 (empty array) - */ - - -function testcase() { - function cb() {} - var i = [].every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-1 +description: Array.prototype.every returns true if 'length' is 0 (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb() {} + var i = [].every(cb); + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js index 5d3f8df5d5..e925a01d5d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js - * @description Array.prototype.every - subclassed array when length is reduced - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 2; - - function cb(val) - { - if(val>2) - return false; - else - return true; - } - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-10 +description: Array.prototype.every - subclassed array when length is reduced +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 2; + + function cb(val) + { + if(val>2) + return false; + else + return true; + } + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js index 27a88b17c6..cfbc79e39d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js - * @description Array.prototype.every returns true when all calls to callbackfn return true - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return true; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - - if(arr.every(callbackfn) === true && callCnt === 10) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-11 +description: > + Array.prototype.every returns true when all calls to callbackfn + return true +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return true; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + + if(arr.every(callbackfn) === true && callCnt === 10) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js index d83f22e683..9423b2fe4a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js - * @description Array.prototype.every doesn't mutate the array on which it is called on - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.every(callbackfn); - if(arr[0] === 1 && - arr[1] === 2 && - arr[2] === 3 && - arr[3] === 4 && - arr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-12 +description: > + Array.prototype.every doesn't mutate the array on which it is + called on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return true; + } + var arr = [1,2,3,4,5]; + arr.every(callbackfn); + if(arr[0] === 1 && + arr[1] === 2 && + arr[2] === 3 && + arr[3] === 4 && + arr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js index 3b2738f8d3..36ff527021 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js - * @description Array.prototype.every doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return true; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr["i"] = 10; - arr[true] = 11; - - if(arr.every(callbackfn) === true && callCnt === 10) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-13 +description: Array.prototype.every doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return true; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + arr["i"] = 10; + arr[true] = 11; + + if(arr.every(callbackfn) === true && callCnt === 10) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js index e280084ba3..dc22fc7e04 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-2 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js index d8cb6c0541..b256cb3ae2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-3 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js index bafe6b3145..a43495b42c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-4 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden to 0 (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js index 90c138c76b..18e8871194 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-5 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js index 5f6eedc05a..b28372ab0d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-6 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js index 4ac9c094b8..481326b245 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-7 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden with obj w/o valueOf (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js index a7b560b47e..be178c944e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js - * @description Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with [] - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - var i = f.every(cb); - - if (i === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.16-8-8 +description: > + Array.prototype.every returns true if 'length' is 0 (subclassed + Array, length overridden with [] +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + var i = f.every(cb); + + if (i === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js index d5cfd8392e..fc7d6edb98 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js - * @description Array.prototype.some must exist as a function - */ - - -function testcase() { - var f = Array.prototype.some; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-0-1 +description: Array.prototype.some must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.some; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js index 7dd7cbd4cb..54cf00f722 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js - * @description Array.prototype.some.length must be 1 - */ - - -function testcase() { - if (Array.prototype.some.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-0-2 +description: Array.prototype.some.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.some.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js index 386fdaa9d9..441f201f58 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js - * @description Array.prototype.some applied to undefined throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.some.call(undefined); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-1 +description: Array.prototype.some applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.some.call(undefined); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js index f255d37a1a..eda8da1069 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js - * @description Array.prototype.some applied to the Math object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return '[object Math]' === Object.prototype.toString.call(obj); - } - - try { - Math.length = 1; - Math[0] = 1; - return Array.prototype.some.call(Math, callbackfn); - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-10 +description: Array.prototype.some applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return '[object Math]' === Object.prototype.toString.call(obj); + } + + try { + Math.length = 1; + Math[0] = 1; + return Array.prototype.some.call(Math, callbackfn); + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js index 37d08eed8b..e1b2ab89ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js - * @description Array.prototype.some applied to Date object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Date; - } - - var obj = new Date(); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-11 +description: Array.prototype.some applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Date; + } + + var obj = new Date(); + obj.length = 2; + obj[0] = 11; + obj[1] = 9; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js index dc8e9aafc8..46236a5bbd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js - * @description Array.prototype.some applied to RegExp object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof RegExp; - } - - var obj = new RegExp(); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-12 +description: Array.prototype.some applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof RegExp; + } + + var obj = new RegExp(); + obj.length = 2; + obj[0] = 11; + obj[1] = 9; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js index 8f06254c28..f96a2e7b35 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js - * @description Array.prototype.some applied to the JSON object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return '[object JSON]' === Object.prototype.toString.call(obj); - } - - try { - JSON.length = 1; - JSON[0] = 1; - return Array.prototype.some.call(JSON, callbackfn); - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-13 +description: Array.prototype.some applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return '[object JSON]' === Object.prototype.toString.call(obj); + } + + try { + JSON.length = 1; + JSON[0] = 1; + return Array.prototype.some.call(JSON, callbackfn); + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js index 8adadc150a..efee722c98 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js - * @description Array.prototype.some applied to Error object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Error; - } - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-14 +description: Array.prototype.some applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Error; + } + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js index 8edabbce6c..43ca8228a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js - * @description Array.prototype.some applied to the Arguments object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return '[object Arguments]' === Object.prototype.toString.call(obj); - } - - var obj = (function () { - return arguments; - }("a", "b")); - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-15 +description: Array.prototype.some applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return '[object Arguments]' === Object.prototype.toString.call(obj); + } + + var obj = (function () { + return arguments; + }("a", "b")); + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js index b9b6ace52f..5e4c6a6666 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js - * @description Array.prototype.some applied to null throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.some.call(null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-2 +description: Array.prototype.some applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.some.call(null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js index 464db23a4a..243be865b0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js - * @description Array.prototype.some applied to boolean primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = 1; - Boolean.prototype.length = 1; - return Array.prototype.some.call(false, callbackfn); - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-3 +description: Array.prototype.some applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = 1; + Boolean.prototype.length = 1; + return Array.prototype.some.call(false, callbackfn); + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js index ea1cc1d1c2..dfa3f3598b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js - * @description Array.prototype.some applied to Boolean object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-4 +description: Array.prototype.some applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Boolean; + } + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 9; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js index 4891b48b05..bedf6273cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js - * @description Array.prototype.some applied to number primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } - - try { - Number.prototype[1] = true; - Number.prototype.length = 2; - - return Array.prototype.some.call(5, callbackfn); - } finally { - delete Number.prototype[1]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-5 +description: Array.prototype.some applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Number; + } + + try { + Number.prototype[1] = true; + Number.prototype.length = 2; + + return Array.prototype.some.call(5, callbackfn); + } finally { + delete Number.prototype[1]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js index a88ffa3299..7c43cd2353 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js - * @description Array.prototype.some applied to Number object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 9; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-6 +description: Array.prototype.some applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Number; + } + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 9; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js index b516a22681..81be019e0f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js - * @description Array.prototype.some applied to applied to string primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof String; - } - - return Array.prototype.some.call("hello\nw_orld\\!", callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-7 +description: Array.prototype.some applied to applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof String; + } + + return Array.prototype.some.call("hello\nw_orld\\!", callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js index f9dc1b2c56..3a5231b863 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js - * @description Array.prototype.some applied to String object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof String; - } - - var obj = new String("hello\nw_orld\\!"); - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-8 +description: Array.prototype.some applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof String; + } + + var obj = new String("hello\nw_orld\\!"); + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js index 1009d7650f..9e4a3fc997 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js - * @description Array.prototype.some applied to Function object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Function; - } - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-1-9 +description: Array.prototype.some applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Function; + } + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js index 1ad5c6d1ed..d53e9121ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js - * @description Array.prototype.some - 'length' is own data property on an Array-like object - */ - - -function testcase() { - - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: 2 - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-1 +description: > + Array.prototype.some - 'length' is own data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 9, + 1: 11, + 2: 12, + length: 2 + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js index 89bc36615d..b4d951aafd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js - * @description Array.prototype.some - 'length' is an inherited accessor property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 9; - child[1] = 11; - child[2] = 12; - - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-10 +description: > + Array.prototype.some - 'length' is an inherited accessor property + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 9; + child[1] = 11; + child[2] = 12; + + return Array.prototype.some.call(child, callbackfn1) && + !Array.prototype.some.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js index 96bf7e815a..476eedf19f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js - * @description Array.prototype.some - 'length' is an own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-11 +description: > + Array.prototype.some - 'length' is an own accessor property + without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { + 0: 11, + 1: 12 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js index d0b5c31e31..2647920661 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js - * @description Array.prototype.some - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 11, 1: 12 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } finally { - delete Object.prototype.length; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-12 +description: > + Array.prototype.some - 'length' is own accessor property without a + get function that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 11, 1: 12 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } finally { + delete Object.prototype.length; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js index 5fc7a68da6..0eeaa86f40 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js - * @description Array.prototype.some - 'length' is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 11; - child[1] = 12; - - return !Array.prototype.some.call(child, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-13 +description: > + Array.prototype.some - 'length' is inherited accessor property + without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 11; + child[1] = 12; + + return !Array.prototype.some.call(child, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js index 98e0b09bb5..0db8d6e75c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js - * @description Array.prototype.some - 'length' property doesn't exist on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 12 }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-14 +description: > + Array.prototype.some - 'length' property doesn't exist on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 12 }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-15.js index 2b711ada21..88649a687a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-15.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-15.js - * @description Array.prototype.some - 'length' is property of the global object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 9; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 12; - fnGlobalObject().length = 2; - return Array.prototype.some.call(fnGlobalObject(), callbackfn1) && - !Array.prototype.some.call(fnGlobalObject(), callbackfn2); - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-15 +description: Array.prototype.some - 'length' is property of the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 9; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 12; + fnGlobalObject().length = 2; + return Array.prototype.some.call(fnGlobalObject(), callbackfn1) && + !Array.prototype.some.call(fnGlobalObject(), callbackfn2); + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js index 486f6ae83b..ca435a822f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js - * @description Array.prototype.some applied to the Arguments object which implements its own property get method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var func = function (a, b) { - arguments[2] = 12; - return Array.prototype.some.call(arguments, callbackfn1) && - !Array.prototype.some.call(arguments, callbackfn2); - }; - - return func(9, 11); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-17 +description: > + Array.prototype.some applied to the Arguments object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var func = function (a, b) { + arguments[2] = 12; + return Array.prototype.some.call(arguments, callbackfn1) && + !Array.prototype.some.call(arguments, callbackfn2); + }; + + return func(9, 11); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js index 75ceff7b8a..d0bfcf9183 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js - * @description Array.prototype.some applied to String object which implements its own property get method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return parseInt(val, 10) > 1; - } - - function callbackfn2(val, idx, obj) { - return parseInt(val, 10) > 2; - } - - var str = new String("12"); - try { - String.prototype[2] = "3"; - return Array.prototype.some.call(str, callbackfn1) && - !Array.prototype.some.call(str, callbackfn2); - } finally { - delete String.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-18 +description: > + Array.prototype.some applied to String object which implements its + own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return parseInt(val, 10) > 1; + } + + function callbackfn2(val, idx, obj) { + return parseInt(val, 10) > 2; + } + + var str = new String("12"); + try { + String.prototype[2] = "3"; + return Array.prototype.some.call(str, callbackfn1) && + !Array.prototype.some.call(str, callbackfn2); + } finally { + delete String.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js index 29c3a95650..ea8d2d50c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js - * @description Array.prototype.some applied to Function object which implements its own property get method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var fun = function (a, b) { - return a + b; - }; - fun[0] = 9; - fun[1] = 11; - fun[2] = 12; - - return Array.prototype.some.call(fun, callbackfn1) && - !Array.prototype.some.call(fun, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-19 +description: > + Array.prototype.some applied to Function object which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var fun = function (a, b) { + return a + b; + }; + fun[0] = 9; + fun[1] = 11; + fun[2] = 12; + + return Array.prototype.some.call(fun, callbackfn1) && + !Array.prototype.some.call(fun, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js index 0fe7333088..67f05c67a4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js - * @description Array.prototype.some - 'length' is own data property on an Array - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - try { - Array.prototype[2] = 12; - - return [9, 11].some(callbackfn1) && - ![9, 11].some(callbackfn2); - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-2 +description: Array.prototype.some - 'length' is own data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + try { + Array.prototype[2] = 12; + + return [9, 11].some(callbackfn1) && + ![9, 11].some(callbackfn2); + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js index 389e73d6ee..75126f08e4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js - * @description Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 9; - child[1] = 11; - child[2] = 12; - - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-3 +description: > + Array.prototype.some - 'length' is an own data property that + overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 9; + child[1] = 11; + child[2] = 12; + + return Array.prototype.some.call(child, callbackfn1) && + !Array.prototype.some.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js index 4d255e1673..d2c57016a6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js - * @description Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an array - */ - - -function testcase() { - var arrProtoLen = 0; - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - Array.prototype[2] = 12; - - return [9, 11].some(callbackfn1) && - ![9, 11].some(callbackfn2); - } finally { - Array.prototype.length = arrProtoLen; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-4 +description: > + Array.prototype.some - 'length' is an own data property that + overrides an inherited data property on an array +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrProtoLen = 0; + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + Array.prototype[2] = 12; + + return [9, 11].some(callbackfn1) && + ![9, 11].some(callbackfn2); + } finally { + Array.prototype.length = arrProtoLen; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js index 99fa415066..6b3f45909c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js - * @description Array.prototype.some - 'length' is an own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - - child[0] = 9; - child[1] = 11; - child[2] = 12; - - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-5 +description: > + Array.prototype.some - 'length' is an own data property that + overrides an inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + + child[0] = 9; + child[1] = 11; + child[2] = 12; + + return Array.prototype.some.call(child, callbackfn1) && + !Array.prototype.some.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js index faf766a323..dc6dd265a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js - * @description Array.prototype.some - 'length' is an inherited data property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 9; - child[1] = 11; - child[2] = 12; - - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-6 +description: > + Array.prototype.some - 'length' is an inherited data property on + an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 9; + child[1] = 11; + child[2] = 12; + + return Array.prototype.some.call(child, callbackfn1) && + !Array.prototype.some.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js index c4ea2cdab7..330b7c9b75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js - * @description Array.prototype.some - 'length' is an own accessor property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { }; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - obj[0] = 9; - obj[1] = 11; - obj[2] = 12; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-7 +description: > + Array.prototype.some - 'length' is an own accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { }; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + obj[0] = 9; + obj[1] = 11; + obj[2] = 12; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js index bbb7d2d560..d387cfb9a7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js - * @description Array.prototype.some - 'length' is an own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 9; - child[1] = 11; - child[2] = 12; - - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-8 +description: > + Array.prototype.some - 'length' is an own accessor property that + overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 9; + child[1] = 11; + child[2] = 12; + + return Array.prototype.some.call(child, callbackfn1) && + !Array.prototype.some.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js index bd5c177665..477fb42a6a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js @@ -1,49 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js - * @description Array.prototype.some - 'length' is an own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 9; - child[1] = 11; - child[2] = 12; - - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-2-9 +description: > + Array.prototype.some - 'length' is an own accessor property that + overrides an inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 9; + child[1] = 11; + child[2] = 12; + + return Array.prototype.some.call(child, callbackfn1) && + !Array.prototype.some.call(child, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js index 7d1d42a63b..b446eea3c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js - * @description Array.prototype.some - value of 'length' is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: undefined }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-1 +description: Array.prototype.some - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: undefined }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js index d532386d67..a6cb4a58e8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js - * @description Array.prototype.some - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: NaN }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-10 +description: Array.prototype.some - value of 'length' is a number (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: NaN }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js index b254d22be8..1f54539861 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js - * @description Array.prototype.some - 'length' is a string containing a positive number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: "2" }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-11 +description: > + Array.prototype.some - 'length' is a string containing a positive + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: "2" }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js index 83d280f6dc..1816512861 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js - * @description Array.prototype.some - 'length' is a string containing a negative number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: "-4294967294" }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-12 +description: > + Array.prototype.some - 'length' is a string containing a negative + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: "-4294967294" }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js index 85c3efb6c9..6cee1f01e0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js - * @description Array.prototype.some - 'length' is a string containing a decimal number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: "2.5" }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-13 +description: > + Array.prototype.some - 'length' is a string containing a decimal + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: "2.5" }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js index 4d42107cb0..0756b321ca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js - * @description Array.prototype.some - 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var objOne = { 0: 11, length: "Infinity" }; - var objTwo = { 0: 11, length: "+Infinity" }; - var objThree = { 0: 11, length: "-Infinity" }; - - return !Array.prototype.some.call(objOne, callbackfn) && - !Array.prototype.some.call(objTwo, callbackfn) && - !Array.prototype.some.call(objThree, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-14 +description: Array.prototype.some - 'length' is a string containing +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var objOne = { 0: 11, length: "Infinity" }; + var objTwo = { 0: 11, length: "+Infinity" }; + var objThree = { 0: 11, length: "-Infinity" }; + + return !Array.prototype.some.call(objOne, callbackfn) && + !Array.prototype.some.call(objTwo, callbackfn) && + !Array.prototype.some.call(objThree, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js index fe2815d485..ccf95a5258 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js - * @description Array.prototype.some - 'length' is a string containing an exponential number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: "2E0" }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-15 +description: > + Array.prototype.some - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: "2E0" }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js index 96bf6c4e7c..afce873cf3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js - * @description Array.prototype.some - 'length' is a string containing a hex number - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: "0x0002" }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-16 +description: Array.prototype.some - 'length' is a string containing a hex number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: "0x0002" }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js index b620c5ee1b..4f3cbf4bea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js - * @description Array.prototype.some - 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: "0002.00" }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-17 +description: > + Array.prototype.some - 'length' is a string containing a number + with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: "0002.00" }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js index d03e440a55..5a7f539ffe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js - * @description Array.prototype.some - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 21, length: "two" }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-18 +description: > + Array.prototype.some - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 21, length: "two" }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js index d5b69fa62d..e633642e0c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js - * @description Array.prototype.some - value of 'length' is an Object which has an own toString method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var toStringAccessed = false; - var obj = { - 0: 9, - 1: 11, - 2: 12, - - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-19 +description: > + Array.prototype.some - value of 'length' is an Object which has an + own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var toStringAccessed = false; + var obj = { + 0: 9, + 1: 11, + 2: 12, + + length: { + toString: function () { + toStringAccessed = true; + return '2'; + } + } + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2) && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js index c72d55cd5c..e3d74e9b4f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js - * @description Array.prototype.some on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 11, 1: 12, length: true }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-2 +description: > + Array.prototype.some on an Array-like object if 'length' is 1 + (length overridden to true(type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 11, 1: 12, length: true }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js index 698a10b666..28ab6f7da0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js - * @description Array.prototype.some - value of 'length' is an Object which has an own valueOf method - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var valueOfAccessed = false; - - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - } - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-20 +description: > + Array.prototype.some - value of 'length' is an Object which has an + own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var valueOfAccessed = false; + + var obj = { + 0: 9, + 1: 11, + 2: 12, + length: { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + } + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2) && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js index b6f1f2e824..6a29a73301 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js - * @description Array.prototype.some - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var toStringAccessed = false; - var valueOfAccessed = false; - - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && - valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-21 +description: > + Array.prototype.some - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var toStringAccessed = false; + var valueOfAccessed = false; + + var obj = { + 0: 9, + 1: 11, + 2: 12, + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return '2'; + } + } + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2) && + valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js index e8726b5723..fdca3da71e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js - * @description Array.prototype.some throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var callbackfnAccessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; - - function callbackfn(val, idx, obj) { - callbackfnAccessed = true; - return val > 10; - } - - var obj = { - 0: 11, - 1: 12, - - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; - - try { - Array.prototype.some.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-22 +description: > + Array.prototype.some throws TypeError exception when 'length' is + an object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callbackfnAccessed = false; + var toStringAccessed = false; + var valueOfAccessed = false; + + function callbackfn(val, idx, obj) { + callbackfnAccessed = true; + return val > 10; + } + + var obj = { + 0: 11, + 1: 12, + + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return {}; + } + } + }; + + try { + Array.prototype.some.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js index 0d3e710878..901b735add 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js @@ -1,52 +1,55 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js - * @description Array.prototype.some uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var valueOfAccessed = false; - var toStringAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: child - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && - valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-23 +description: > + Array.prototype.some uses inherited valueOf method when 'length' + is an object with an own toString and inherited valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var valueOfAccessed = false; + var toStringAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 0: 9, + 1: 11, + 2: 12, + length: child + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2) && + valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js index 412c09c023..c41d37d7d0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js - * @description Array.prototype.some - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 9, - 10: 11, - 11: 12, - length: 11.5 - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-24 +description: > + Array.prototype.some - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 9, + 10: 11, + 11: 12, + length: 11.5 + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js index e4b327eaa9..840c21c99e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js - * @description Array.prototype.some - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 9, - 1: 11, - 2: 12, - length: -4294967294.5 - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-25 +description: > + Array.prototype.some - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 9, + 1: 11, + 2: 12, + length: -4294967294.5 + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js index b32cd4b4c3..3cc8f859b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js - * @description Array.prototype.some - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-28 +description: Array.prototype.some - value of 'length' is boundary value (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js index 129eccf436..3b35e122e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js - * @description Array.prototype.some - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { - 0: 11, - 1: 12, - length: 4294967297 - }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-29 +description: > + Array.prototype.some - value of 'length' is boundary value (2^32 + + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { + 0: 11, + 1: 12, + length: 4294967297 + }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js index cb55d4f01b..ce1c18ea48 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js - * @description Array.prototype.some - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: 0 }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-3 +description: Array.prototype.some - value of 'length' is a number (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: 0 }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js index 49e795c86a..908f3e6910 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js - * @description Array.prototype.some - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: +0 }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-4 +description: Array.prototype.some - value of 'length' is a number (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: +0 }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js index fb04529ff2..6a744622e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js - * @description Array.prototype.some - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: -0 }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-5 +description: Array.prototype.some - value of 'length' is a number (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: -0 }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js index df5ae24376..4f6d5f7a40 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js - * @description Array.prototype.some - value of 'length' is a number (value is positive) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: 2 }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-6 +description: > + Array.prototype.some - value of 'length' is a number (value is + positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: 2 }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js index e6d6387086..9070335b1b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js - * @description Array.prototype.some - value of 'length' is a number (value is negative) - */ - - -function testcase() { - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var obj = { 0: 9, 1: 11, 2: 12, length: -4294967294 }; - - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-7 +description: > + Array.prototype.some - value of 'length' is a number (value is + negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn1(val, idx, obj) { + return val > 10; + } + + function callbackfn2(val, idx, obj) { + return val > 11; + } + + var obj = { 0: 9, 1: 11, 2: 12, length: -4294967294 }; + + return Array.prototype.some.call(obj, callbackfn1) && + !Array.prototype.some.call(obj, callbackfn2); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js index fff966b22a..e1ca567c91 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js - * @description Array.prototype.some - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: Infinity }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-8 +description: > + Array.prototype.some - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: Infinity }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js index 88d1e3f6cb..c5851dec5a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js - * @description Array.prototype.some - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, length: -Infinity }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-3-9 +description: > + Array.prototype.some - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, length: -Infinity }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js index ea7aeddadb..e2623b702d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js - * @description Array.prototype.some throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-1 +description: Array.prototype.some throws TypeError if callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js index 10e455696a..37a2227b00 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js - * @description Array.prototype.some - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.some.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-10 +description: > + Array.prototype.some - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.some.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js index a25f6772b7..9adafe6f6f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js - * @description Array.prototype.some - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.some.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-11 +description: > + Array.prototype.some - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.some.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js index 9c641109c6..dd7d933d05 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js - * @description Array.prototype.some - 'callbackfn' is a function - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - return [9, 11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-12 +description: Array.prototype.some - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + return [9, 11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-15.js index 477232ab36..717c409167 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-15.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-15.js - * @description Array.prototype.some - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - var obj = { }; - var lengthAccessed = false; - var loopAccessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.some.call(obj); - return false; - } catch (ex) { - return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-15 +description: > + Array.prototype.some - calling with no callbackfn is the same as + passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { }; + var lengthAccessed = false; + var loopAccessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.some.call(obj); + return false; + } catch (ex) { + return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js index c2f9ec7b0c..70989fe868 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js - * @description Array.prototype.some throws ReferenceError if callbackfn is unreferenced - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some(foo); - } - catch(e) { - if(e instanceof ReferenceError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-2 +description: > + Array.prototype.some throws ReferenceError if callbackfn is + unreferenced +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some(foo); + } + catch(e) { + if(e instanceof ReferenceError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js index 2d38ca538b..3fd1a0c7e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js - * @description Array.prototype.some throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-3 +description: Array.prototype.some throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js index 52f5381ba8..d8974a2231 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js - * @description Array.prototype.some throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-4 +description: Array.prototype.some throws TypeError if callbackfn is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js index 6136442d4e..1716b87142 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js - * @description Array.prototype.some throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-5 +description: Array.prototype.some throws TypeError if callbackfn is number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js index 7172568f94..644fa980c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js - * @description Array.prototype.some throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-6 +description: Array.prototype.some throws TypeError if callbackfn is string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js index cce973d6d3..1e201e3d24 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js - * @description Array.prototype.some throws TypeError if callbackfn is Object without a Call internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.some(new Object()); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-7 +description: > + Array.prototype.some throws TypeError if callbackfn is Object + without a Call internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.some(new Object()); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js index d6147908dc..73cbf3a006 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js - * @description Array.prototype.some - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.some.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-8 +description: > + Array.prototype.some - side effects produced by step 2 are visible + when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.some.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js index 9e89187b41..fee3aa0fb2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js - * @description Array.prototype.some - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.some.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-4-9 +description: > + Array.prototype.some - side effects produced by step 3 are visible + when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.some.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1-s.js index 336c375144..c98340abf3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1-s.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1-s.js - * @description Array.prototype.some - thisArg not passed to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - - [1].some(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-1-s +description: Array.prototype.some - thisArg not passed to strict callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + + function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + + [1].some(callbackfn); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js index 9c7fe55eb4..ab0578853c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js - * @description Array.prototype.some - thisArg is passed - */ - - -function testcase() { - this._15_4_4_17_5_1 = false; - var _15_4_4_17_5_1 = true; - - function callbackfn(val, idx, obj) { - return this._15_4_4_17_5_1; - } - var arr = [1]; - return !arr.some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-1 +description: Array.prototype.some - thisArg is passed +includes: [runTestCase.js] +---*/ + +function testcase() { + this._15_4_4_17_5_1 = false; + var _15_4_4_17_5_1 = true; + + function callbackfn(val, idx, obj) { + return this._15_4_4_17_5_1; + } + var arr = [1]; + return !arr.some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js index f27bb7abce..3ef6d45962 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js - * @description Array.prototype.some - Array Object can be used as thisArg - */ - - -function testcase() { - - var objArray = []; - - function callbackfn(val, idx, obj) { - return this === objArray; - } - - return [11].some(callbackfn, objArray); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-10 +description: Array.prototype.some - Array Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objArray = []; + + function callbackfn(val, idx, obj) { + return this === objArray; + } + + return [11].some(callbackfn, objArray); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js index 21cf5d02b2..c15205f2df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js - * @description Array.prototype.some - String object can be used as thisArg - */ - - -function testcase() { - - var objString = new String(); - - function callbackfn(val, idx, obj) { - return this === objString; - } - - return [11].some(callbackfn, objString); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-11 +description: Array.prototype.some - String object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objString = new String(); + + function callbackfn(val, idx, obj) { + return this === objString; + } + + return [11].some(callbackfn, objString); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js index 5d168528ec..2e1c8aa412 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js - * @description Array.prototype.some - Boolean object can be used as thisArg - */ - - -function testcase() { - - var objBoolean = new Boolean(); - - function callbackfn(val, idx, obj) { - return this === objBoolean; - } - - return [11].some(callbackfn, objBoolean); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-12 +description: Array.prototype.some - Boolean object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objBoolean = new Boolean(); + + function callbackfn(val, idx, obj) { + return this === objBoolean; + } + + return [11].some(callbackfn, objBoolean); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js index 1373243848..08368b08dd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js - * @description Array.prototype.some - Number object can be used as thisArg - */ - - -function testcase() { - - var objNumber = new Number(); - - function callbackfn(val, idx, obj) { - return this === objNumber; - } - - return [11].some(callbackfn, objNumber); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-13 +description: Array.prototype.some - Number object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objNumber = new Number(); + + function callbackfn(val, idx, obj) { + return this === objNumber; + } + + return [11].some(callbackfn, objNumber); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js index d26f0cf3f9..2155f6932b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js - * @description Array.prototype.some - the Math object can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === Math; - } - - return [11].some(callbackfn, Math); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-14 +description: Array.prototype.some - the Math object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === Math; + } + + return [11].some(callbackfn, Math); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js index cad92a2dc8..671d696c42 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js - * @description Array.prototype.some - Date object can be used as thisArg - */ - - -function testcase() { - - var objDate = new Date(); - - function callbackfn(val, idx, obj) { - return this === objDate; - } - - return [11].some(callbackfn, objDate); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-15 +description: Array.prototype.some - Date object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objDate = new Date(); + + function callbackfn(val, idx, obj) { + return this === objDate; + } + + return [11].some(callbackfn, objDate); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js index e3fcd32cd5..0dea2599be 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js - * @description Array.prototype.some - RegExp object can be used as thisArg - */ - - -function testcase() { - - var objRegExp = new RegExp(); - - function callbackfn(val, idx, obj) { - return this === objRegExp; - } - - return [11].some(callbackfn, objRegExp); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-16 +description: Array.prototype.some - RegExp object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objRegExp = new RegExp(); + + function callbackfn(val, idx, obj) { + return this === objRegExp; + } + + return [11].some(callbackfn, objRegExp); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js index 1c3bfd14d7..3c3feadbe9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js - * @description Array.prototype.some - the JSON object can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === JSON; - } - - return [11].some(callbackfn, JSON); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-17 +description: Array.prototype.some - the JSON object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === JSON; + } + + return [11].some(callbackfn, JSON); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js index ff31799726..51fb655a5c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js - * @description Array.prototype.some - Error object can be used as thisArg - */ - - -function testcase() { - - var objError = new RangeError(); - - function callbackfn(val, idx, obj) { - return this === objError; - } - - return [11].some(callbackfn, objError); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-18 +description: Array.prototype.some - Error object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objError = new RangeError(); + + function callbackfn(val, idx, obj) { + return this === objError; + } + + return [11].some(callbackfn, objError); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js index 598f9e777c..766dec1dcf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js - * @description Array.prototype.some - the Arguments object can be used as thisArg - */ - - -function testcase() { - - var arg; - - function callbackfn(val, idx, obj) { - return this === arg; - } - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - return [11].some(callbackfn, arg); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-19 +description: Array.prototype.some - the Arguments object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + function callbackfn(val, idx, obj) { + return this === arg; + } + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + return [11].some(callbackfn, arg); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js index 1519a2f697..bdd429b3b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js - * @description Array.prototype.some - thisArg is Object - */ - - -function testcase() { - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var arr = [1]; - if(arr.some(callbackfn, o) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-2 +description: Array.prototype.some - thisArg is Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var o = new Object(); + o.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var arr = [1]; + if(arr.some(callbackfn, o) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-21.js index d2637f05b0..54c596db07 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-21.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-21.js - * @description Array.prototype.some - the global object can be used as thisArg - */ - - -function testcase() { - - - function callbackfn(val, idx, obj) { - return this === fnGlobalObject(); - } - - return [11].some(callbackfn, fnGlobalObject()); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-21 +description: Array.prototype.some - the global object can be used as thisArg +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + + function callbackfn(val, idx, obj) { + return this === fnGlobalObject(); + } + + return [11].some(callbackfn, fnGlobalObject()); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js index 8983ffe33d..88fad4f0b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js - * @description Array.prototype.some - boolean primitive can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } - - return [11].some(callbackfn, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-22 +description: Array.prototype.some - boolean primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === false; + } + + return [11].some(callbackfn, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js index 9c44b24416..0a500a7b01 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js - * @description Array.prototype.some - number primitive can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === 101; - } - - return [11].some(callbackfn, 101); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-23 +description: Array.prototype.some - number primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === 101; + } + + return [11].some(callbackfn, 101); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js index a23fa3d177..a4f186982b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js - * @description Array.prototype.some - string primitive can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === "abc"; - } - - return [11].some(callbackfn, "abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-24 +description: Array.prototype.some - string primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === "abc"; + } + + return [11].some(callbackfn, "abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-25.js index 7daa878b9d..0e7cf9ff9f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-25.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-25.js - * @description Array.prototype.some - thisArg not passed - */ - - -function testcase() { - function innerObj() { - this._15_4_4_17_5_25 = true; - var _15_4_4_17_5_25 = false; - - function callbackfn(val, idx, obj) { - return this._15_4_4_17_5_25; - } - var arr = [1]; - this.retVal = !arr.some(callbackfn); - } - return new innerObj().retVal; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-25 +description: Array.prototype.some - thisArg not passed +includes: [runTestCase.js] +---*/ + +function testcase() { + function innerObj() { + this._15_4_4_17_5_25 = true; + var _15_4_4_17_5_25 = false; + + function callbackfn(val, idx, obj) { + return this._15_4_4_17_5_25; + } + var arr = [1]; + this.retVal = !arr.some(callbackfn); + } + return new innerObj().retVal; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js index dc0560fecd..3a4b3762f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js - * @description Array.prototype.some - thisArg is Array - */ - - -function testcase() { - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var arr = [1]; - - if(arr.some(callbackfn, a) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-3 +description: Array.prototype.some - thisArg is Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var a = new Array(); + a.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var arr = [1]; + + if(arr.some(callbackfn, a) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js index 80b7f542f4..df3fabe756 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js - * @description Array.prototype.some - thisArg is object from object template(prototype) - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; - - if(arr.some(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-4 +description: > + Array.prototype.some - thisArg is object from object + template(prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.prototype.res = true; + var f = new foo(); + var arr = [1]; + + if(arr.some(callbackfn,f) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js index 5cbebe8929..c2b30ba209 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js - * @description Array.prototype.some - thisArg is object from object template - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - var f = new foo(); - f.res = true; - var arr = [1]; - - if(arr.some(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-5 +description: Array.prototype.some - thisArg is object from object template +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + var f = new foo(); + f.res = true; + var arr = [1]; + + if(arr.some(callbackfn,f) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js index 62c8f8b587..730cc5c47a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js - * @description Array.prototype.some - thisArg is function - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.res = true; - var arr = [1]; - - if(arr.some(callbackfn,foo) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-6 +description: Array.prototype.some - thisArg is function +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.res = true; + var arr = [1]; + + if(arr.some(callbackfn,foo) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js index 3606d8912c..7106a8431a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js - * @description Array.prototype.some - built-in functions can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === eval; - } - - return [11].some(callbackfn, eval); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-7 +description: Array.prototype.some - built-in functions can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === eval; + } + + return [11].some(callbackfn, eval); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js index 45ccbf7461..919b2880e5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js - * @description Array.prototype.some - Function Object can be used as thisArg - */ - - -function testcase() { - - var objFunction = function () { }; - - function callbackfn(val, idx, obj) { - return this === objFunction; - } - - return [11].some(callbackfn, objFunction); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-5-9 +description: Array.prototype.some - Function Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objFunction = function () { }; + + function callbackfn(val, idx, obj) { + return this === objFunction; + } + + return [11].some(callbackfn, objFunction); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js index 6917c74910..5e973b3daf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js - * @description Array.prototype.some considers new elements added to array after it is called - */ - - -function testcase() { - var calledForThree = false; - - function callbackfn(val, idx, obj) - { - arr[2] = 3; - if(val !== 3) - calledForThree = true; - - return false; - } - - var arr = [1,2,,4,5]; - - var val = arr.some(callbackfn); - return calledForThree; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-1 +description: > + Array.prototype.some considers new elements added to array after + it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + var calledForThree = false; + + function callbackfn(val, idx, obj) + { + arr[2] = 3; + if(val !== 3) + calledForThree = true; + + return false; + } + + var arr = [1,2,,4,5]; + + var val = arr.some(callbackfn); + return calledForThree; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js index 6761964aa6..a2b2cbebdf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js - * @description Array.prototype.some considers new value of elements in array after it is called - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - arr[4] = 6; - if(val < 6) - return false; - else - return true; - } - - var arr = [1,2,3,4,5]; - - if(arr.some(callbackfn) === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-2 +description: > + Array.prototype.some considers new value of elements in array + after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + arr[4] = 6; + if(val < 6) + return false; + else + return true; + } + + var arr = [1,2,3,4,5]; + + if(arr.some(callbackfn) === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js index 7f07194de6..ee9ae1c486 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js - * @description Array.prototype.some doesn't visit deleted elements in array after it is called - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - delete arr[2]; - if(val !== 3) - return false; - else - return true; - } - - var arr = [1,2,3,4,5]; - - if(arr.some(callbackfn) === false) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-3 +description: > + Array.prototype.some doesn't visit deleted elements in array after + it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + delete arr[2]; + if(val !== 3) + return false; + else + return true; + } + + var arr = [1,2,3,4,5]; + + if(arr.some(callbackfn) === false) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js index 32a97f5d01..a0c5bbc69f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js - * @description Array.prototype.some doesn't visit deleted elements when Array.length is decreased - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - arr.length = 3; - if(val < 4) - return false; - else - return true; - } - - var arr = [1,2,3,4,6]; - - if(arr.some(callbackfn) === false) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-4 +description: > + Array.prototype.some doesn't visit deleted elements when + Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + arr.length = 3; + if(val < 4) + return false; + else + return true; + } + + var arr = [1,2,3,4,6]; + + if(arr.some(callbackfn) === false) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js index 46b5f6508b..c281e353fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js - * @description Array.prototype.some doesn't consider newly added elements in sparse array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - arr[1000] = 5; - if(val < 5) - return false; - else - return true; - } - - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; - - if(arr.some(callbackfn) === false) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-5 +description: > + Array.prototype.some doesn't consider newly added elements in + sparse array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + arr[1000] = 5; + if(val < 5) + return false; + else + return true; + } + + var arr = new Array(10); + arr[1] = 1; + arr[2] = 2; + + if(arr.some(callbackfn) === false) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js index 91c75fa1a5..b7982c04c5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js - * @description Array.prototype.some visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - delete arr[4]; - if(val < 5) - return false; - else - return true; - } - - - Array.prototype[4] = 5; - var arr = [1,2,3,4,5]; - - var res = arr.some(callbackfn) ; - delete Array.prototype[4]; - if(res === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-6 +description: > + Array.prototype.some visits deleted element in array after the + call when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + delete arr[4]; + if(val < 5) + return false; + else + return true; + } + + + Array.prototype[4] = 5; + var arr = [1,2,3,4,5]; + + var res = arr.some(callbackfn) ; + delete Array.prototype[4]; + if(res === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-8.js index 576e39f562..a2ad80a9be 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-8.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-8.js - * @description Array.prototype.some - no observable effects occur if length is 0 - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 12, length: 0 }; - - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-8 +description: Array.prototype.some - no observable effects occur if length is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 12, length: 0 }; + + return !Array.prototype.some.call(obj, callbackfn) && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-9.js index 9e8956d273..866a7242fc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-9.js - * @description Array.prototype.some - modifications to length don't change number of iterations - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } - - var obj = { 0: 9, 2: 12, length: 3 }; - - Object.defineProperty(obj, "1", { - get: function () { - obj.length = 2; - return 8; - }, - configurable: true - }); - - return Array.prototype.some.call(obj, callbackfn) && called === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-9 +description: > + Array.prototype.some - modifications to length don't change number + of iterations +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val > 10; + } + + var obj = { 0: 9, 2: 12, length: 3 }; + + Object.defineProperty(obj, "1", { + get: function () { + obj.length = 2; + return 8; + }, + configurable: true + }); + + return Array.prototype.some.call(obj, callbackfn) && called === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js index ea8974ec79..1a91196605 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js - * @description Array.prototype.some - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } - - var arr = new Array(10); - arr[1] = undefined; - arr.some(callbackfn); - if(callCnt === 1) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-1 +description: > + Array.prototype.some - callbackfn not called for indexes never + been assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return false; + } + + var arr = new Array(10); + arr[1] = undefined; + arr.some(callbackfn); + if(callCnt === 1) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-10.js index a0d8953409..c68c67d619 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-10.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-10.js - * @description Array.prototype.some - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = { 2: 2, length: 20 }; - - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return !Array.prototype.some.call(arr, callbackfn) && accessed; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-10 +description: > + Array.prototype.some - deleting property of prototype causes + prototype index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; + } + var arr = { 2: 2, length: 20 }; + + Object.defineProperty(arr, "0", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return !Array.prototype.some.call(arr, callbackfn) && accessed; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-11.js index 756c274fb8..11952adf4b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-11.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-11.js - * @description Array.prototype.some - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return !arr.some(callbackfn) && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-11 +description: > + Array.prototype.some - deleting property of prototype causes + prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; + } + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return !arr.some(callbackfn) && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-12.js index efe23f1b32..ab9a757235 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-12.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-12.js - * @description Array.prototype.some - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - return Array.prototype.some.call(arr, callbackfn); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-12 +description: > + Array.prototype.some - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } + } + var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + return Array.prototype.some.call(arr, callbackfn); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-13.js index fd808a2408..db7221542e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-13.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-13.js - * @description Array.prototype.some - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } - var arr = [0, 111, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - return arr.some(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-13 +description: > + Array.prototype.some - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } + } + var arr = [0, 111, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + return arr.some(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-14.js index cb559d4841..59bd58716e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-14.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-14.js - * @description Array.prototype.some - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 3; - } - var arr = [0, 1, 2, "last"]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - return !arr.some(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-14 +description: > + Array.prototype.some - decreasing length of array causes index + property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx === 3; + } + var arr = [0, 1, 2, "last"]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + return !arr.some(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-15.js index 0450276188..6f6b7df839 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-15.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-15.js - * @description Array.prototype.some - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return true; - } else { - return false; - } - } - var arr = [0, 1, 2]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return arr.some(callbackfn); - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-15 +description: > + Array.prototype.some - decreasing length of array with prototype + property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return true; + } else { + return false; + } + } + var arr = [0, 1, 2]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return arr.some(callbackfn); + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-16.js index f339237a43..36091e6739 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-16.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-16.js - * @description Array.prototype.some - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return true; - } else { - return false; - } - } - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - return arr.some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-16 +description: > + Array.prototype.some - decreasing length of array does not delete + non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return true; + } else { + return false; + } + } + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + return arr.some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js index 51da53bdcc..209f93e352 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js - * @description Array.prototype.some - added properties in step 2 are visible here - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return true; - } else { - return false; - } - } - - var arr = { }; - - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); - - return Array.prototype.some.call(arr, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-2 +description: Array.prototype.some - added properties in step 2 are visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return true; + } else { + return false; + } + } + + var arr = { }; + + Object.defineProperty(arr, "length", { + get: function () { + arr[2] = "length"; + return 3; + }, + configurable: true + }); + + return Array.prototype.some.call(arr, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js index 242420ecff..db63e956f5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js - * @description Array.prototype.some - deleted properties in step 2 are visible here - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 2; - } - var arr = { 2: 6.99, 8: 19}; - - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 10; - }, - configurable: true - }); - - return !Array.prototype.some.call(arr, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-3 +description: > + Array.prototype.some - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx === 2; + } + var arr = { 2: 6.99, 8: 19}; + + Object.defineProperty(arr, "length", { + get: function () { + delete arr[2]; + return 10; + }, + configurable: true + }); + + return !Array.prototype.some.call(arr, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-4.js index f683102454..60a68a2133 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-4.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-4.js - * @description Array.prototype.some - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } - - var arr = { length: 2 }; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return Array.prototype.some.call(arr, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-4 +description: > + Array.prototype.some - properties added into own object after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } + } + + var arr = { length: 2 }; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return Array.prototype.some.call(arr, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-5.js index 49cae2ad67..1bd29602a0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-5.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-5.js - * @description Array.prototype.some - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return true; - } else { - return false; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - return arr.some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-5 +description: > + Array.prototype.some - properties added into own object after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return true; + } else { + return false; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + return arr.some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-6.js index 5e6be59630..865bd5ec7c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-6.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-6.js - * @description Array.prototype.some - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return true; - } else { - return false; - } - } - var arr = { length: 2 }; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return Array.prototype.some.call(arr, callbackfn); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-6 +description: > + Array.prototype.some - properties can be added to prototype after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return true; + } else { + return false; + } + } + var arr = { length: 2 }; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return Array.prototype.some.call(arr, callbackfn); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-7.js index 295e7cd61e..188c36dfef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-7.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-7.js - * @description Array.prototype.some - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return true; - } else { - return false; - } - } - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - return arr.some(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-7 +description: > + Array.prototype.some - properties can be added to prototype after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return true; + } else { + return false; + } + } + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + return arr.some(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-8.js index 36ffa98fd6..46c9a4fae2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-8.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-8.js - * @description Array.prototype.some - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = { length: 2 }; - - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return !Array.prototype.some.call(arr, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-8 +description: > + Array.prototype.some - deleting own property causes index property + not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; + } + var arr = { length: 2 }; + + Object.defineProperty(arr, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return !Array.prototype.some.call(arr, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-9.js index 50dba00d95..0ab75a6ebc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-9.js - * @description Array.prototype.some - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx === 1; - } - var arr = [1, 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - return !arr.some(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-b-9 +description: > + Array.prototype.some - deleting own property causes index property + not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return idx === 1; + } + var arr = [1, 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + return !arr.some(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js index e066f74d7f..80a028311a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js - * @description Array.prototype.some - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var kValue = {}; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } - - var obj = { 5: kValue, length: 100 }; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-1 +description: > + Array.prototype.some - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = {}; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; + } + + var obj = { 5: kValue, length: 100 }; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-10.js index 3fd874265f..37be655c92 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-10.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-10.js - * @description Array.prototype.some - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 10) { - return val === kValue; - } - return false; - } - - var arr = []; - - Object.defineProperty(arr, "10", { - get: function () { - return kValue; - }, - configurable: true - }); - - return arr.some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-10 +description: > + Array.prototype.some - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 10) { + return val === kValue; + } + return false; + } + + var arr = []; + + Object.defineProperty(arr, "10", { + get: function () { + return kValue; + }, + configurable: true + }); + + return arr.some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-11.js index a438404388..6f87fa215e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-11.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-11.js - * @description Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - var proto = { 1: 6 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return kValue; - }, - configurable: true - }); - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-11 +description: > + Array.prototype.some - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; + } + + var proto = { 1: 6 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "1", { + get: function () { + return kValue; + }, + configurable: true + }); + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-12.js index 2c84c818e0..7e58cc213f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-12.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-12.js - * @description Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - var arr = []; - try { - Array.prototype[1] = 100; - Object.defineProperty(arr, "1", { - get: function () { - return kValue; - }, - configurable: true - }); - - return arr.some(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-12 +description: > + Array.prototype.some - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; + } + + var arr = []; + try { + Array.prototype[1] = 100; + Object.defineProperty(arr, "1", { + get: function () { + return kValue; + }, + configurable: true + }); + + return arr.some(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-13.js index a268dea26e..fe0a001968 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-13.js @@ -1,48 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-13.js - * @description Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 5; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return kValue; - }, - configurable: true - }); - - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-13 +description: > + Array.prototype.some - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 5; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "1", { + get: function () { + return kValue; + }, + configurable: true + }); + + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-14.js index cc24841ee2..e40ea1dd85 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-14.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-14.js - * @description Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - var arr = []; - Object.defineProperty(arr, "1", { - get: function () { - return kValue; - }, - configurable: true - }); - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 10; - }, - configurable: true - }); - - return arr.some(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-14 +description: > + Array.prototype.some - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; + } + + var arr = []; + Object.defineProperty(arr, "1", { + get: function () { + return kValue; + }, + configurable: true + }); + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 10; + }, + configurable: true + }); + + return arr.some(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-15.js index 7a5d565fb4..88dee4074f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-15.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-15.js - * @description Array.prototype.some - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return kValue; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 20; - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-15 +description: > + Array.prototype.some - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return kValue; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 20; + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-16.js index 36adbb2019..049caff491 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-16.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-16.js - * @description Array.prototype.some - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return kValue; - }, - configurable: true - }); - - return [, , ].some(callbackfn); - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-16 +description: > + Array.prototype.some - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return kValue; + }, + configurable: true + }); + + return [, , ].some(callbackfn); + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-17.js index d250054e99..a478f9e4fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-17.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-17.js - * @description Array.prototype.some - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-17 +description: > + Array.prototype.some - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-18.js index 6f99d6ff99..953fbfbca1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-18.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-18.js - * @description Array.prototype.some - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - return arr.some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-18 +description: > + Array.prototype.some - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + return arr.some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-19.js index 86bb7650a9..949a3e83d3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-19.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-19.js - * @description Array.prototype.some - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - try { - Object.prototype[1] = 10; - return Array.prototype.some.call(obj, callbackfn); - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-19 +description: > + Array.prototype.some - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + try { + Object.prototype[1] = 10; + return Array.prototype.some.call(obj, callbackfn); + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js index dc10a8e644..83c1b6380d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js - * @description Array.prototype.some - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var kValue = {}; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return kValue === val; - } - return false; - } - - return [kValue].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-2 +description: > + Array.prototype.some - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = {}; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return kValue === val; + } + return false; + } + + return [kValue].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-20.js index 5f46362937..959267049e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-20.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-20.js - * @description Array.prototype.some - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - try { - Array.prototype[0] = 100; - return arr.some(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-20 +description: > + Array.prototype.some - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + try { + Array.prototype[0] = 100; + return arr.some(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-21.js index fe9014c420..b09009ea13 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-21.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-21.js - * @description Array.prototype.some - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } - - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-21 +description: > + Array.prototype.some - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; + } + + var proto = {}; + Object.defineProperty(proto, "1", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-22.js index 330abe746c..47b74e23c5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-22.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-22.js - * @description Array.prototype.some - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - - return [, ].some(callbackfn); - } finally { - delete Array.prototype[0]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-22 +description: > + Array.prototype.some - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + + return [, ].some(callbackfn); + } finally { + delete Array.prototype[0]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-23.js index 6c4a2eadd7..0322918c66 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-23.js @@ -1,31 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-23.js - * @description Array.prototype.some - This object is an global object which contains index property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - return false; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 11; - fnGlobalObject().length = 1; - return Array.prototype.some.call(fnGlobalObject(), callbackfn); - } finally { - delete fnGlobalObject()[0]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-23 +description: > + Array.prototype.some - This object is an global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } + return false; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 11; + fnGlobalObject().length = 1; + return Array.prototype.some.call(fnGlobalObject(), callbackfn); + } finally { + delete fnGlobalObject()[0]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js index 718887e866..b6c7e90041 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js - * @description Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - return false; - } - - var func = function (a, b) { - return Array.prototype.some.call(arguments, callbackfn); - }; - - return func(11); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-25 +description: > + Array.prototype.some - This object is the Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } + return false; + } + + var func = function (a, b) { + return Array.prototype.some.call(arguments, callbackfn); + }; + + return func(11); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js index b5c29c830a..5598c1e524 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js - * @description Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var firstResult = false; - var secondResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - firstResult = (val === 11); - return false; - } else if (idx === 1) { - secondResult = (val === 9); - return false; - } else { - return true; - } - } - - var func = function (a, b) { - return Array.prototype.some.call(arguments, callbackfn); - }; - - return !func(11, 9) && firstResult && secondResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-26 +description: > + Array.prototype.some - This object is the Arguments object which + implements its own property get method (number of arguments equals + number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var firstResult = false; + var secondResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + firstResult = (val === 11); + return false; + } else if (idx === 1) { + secondResult = (val === 9); + return false; + } else { + return true; + } + } + + var func = function (a, b) { + return Array.prototype.some.call(arguments, callbackfn); + }; + + return !func(11, 9) && firstResult && secondResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js index d82901b60d..42c71b2fa4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js - * @description Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var firstResult = false; - var secondResult = false; - var thirdResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - firstResult = (val === 11); - return false; - } else if (idx === 1) { - secondResult = (val === 12); - return false; - } else if (idx === 2) { - thirdResult = (val === 9); - return false; - } else { - return true; - } - } - - var func = function (a, b) { - return Array.prototype.some.call(arguments, callbackfn); - }; - - return !func(11, 12, 9) && firstResult && secondResult && thirdResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-27 +description: > + Array.prototype.some - This object is the Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var firstResult = false; + var secondResult = false; + var thirdResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + firstResult = (val === 11); + return false; + } else if (idx === 1) { + secondResult = (val === 12); + return false; + } else if (idx === 2) { + thirdResult = (val === 9); + return false; + } else { + return true; + } + } + + var func = function (a, b) { + return Array.prototype.some.call(arguments, callbackfn); + }; + + return !func(11, 12, 9) && firstResult && secondResult && thirdResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-28.js index 047c90172b..dc7636801f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-28.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-28.js - * @description Array.prototype.some - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 12; - } - return false; - } - - var arr = []; - var helpVerifyVar = 11; - - Object.defineProperty(arr, "1", { - get: function () { - return helpVerifyVar; - }, - set: function (args) { - helpVerifyVar = args; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - arr[1] = 12; - return 9; - }, - configurable: true - }); - - return arr.some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-28 +description: > + Array.prototype.some - element changed by getter on previous + iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 12; + } + return false; + } + + var arr = []; + var helpVerifyVar = 11; + + Object.defineProperty(arr, "1", { + get: function () { + return helpVerifyVar; + }, + set: function (args) { + helpVerifyVar = args; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + arr[1] = 12; + return 9; + }, + configurable: true + }); + + return arr.some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-29.js index 8ad58b4ca4..4120a20f09 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-29.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-29.js - * @description Array.prototype.some - element changed by getter on previous iterations on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 12; - } - return false; - } - - var obj = { length: 2 }; - var helpVerifyVar = 11; - - Object.defineProperty(obj, "1", { - get: function () { - return helpVerifyVar; - }, - set: function (args) { - helpVerifyVar = args; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - obj[1] = 12; - return 11; - }, - configurable: true - }); - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-29 +description: > + Array.prototype.some - element changed by getter on previous + iterations on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 12; + } + return false; + } + + var obj = { length: 2 }; + var helpVerifyVar = 11; + + Object.defineProperty(obj, "1", { + get: function () { + return helpVerifyVar; + }, + set: function (args) { + helpVerifyVar = args; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + obj[1] = 12; + return 11; + }, + configurable: true + }); + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js index 009ec31499..317722b96f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js - * @description Array.prototype.some - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } - - var proto = { 5: 100 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[5] = kValue; - child.length = 10; - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-3 +description: > + Array.prototype.some - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; + } + + var proto = { 5: 100 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[5] = kValue; + child.length = 10; + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-30.js index 861c8fdb8b..246d51b85f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-30.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-30.js - * @description Array.prototype.some - unhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } - - var obj = { length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.some.call(obj, callbackfn); - return false; - } catch (ex) { - return ex instanceof RangeError && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-30 +description: > + Array.prototype.some - unhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; + } + + var obj = { length: 20 }; + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.some.call(obj, callbackfn); + return false; + } catch (ex) { + return ex instanceof RangeError && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-31.js index 7f5e6bfabb..8cf57c870d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-31.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-31.js - * @description Array.prototype.some - unhandled exceptions happened in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - return true; - } - - var arr = []; - arr[10] = 100; - Object.defineProperty(arr, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.some(callbackfn); - return false; - } catch (ex) { - return ex instanceof RangeError && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-31 +description: > + Array.prototype.some - unhandled exceptions happened in getter + terminate iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + return true; + } + + var arr = []; + arr[10] = 100; + Object.defineProperty(arr, "0", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.some(callbackfn); + return false; + } catch (ex) { + return ex instanceof RangeError && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js index 8fe393cb37..728bc028a3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js - * @description Array.prototype.some - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - try { - Array.prototype[0] = 11; - - return [kValue].some(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-4 +description: > + Array.prototype.some - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + try { + Array.prototype[0] = 11; + + return [kValue].some(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-5.js index ffd775ab8f..fd32f8b52f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-5.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-5.js - * @description Array.prototype.some - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = 1000; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: kValue, - configurable: true - }); - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-5 +description: > + Array.prototype.some - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = 1000; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "0", { + value: kValue, + configurable: true + }); + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-6.js index 0f29ceff4a..a694b422b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-6.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-6.js - * @description Array.prototype.some - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var kValue = 1000; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); - return [kValue].some(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-6 +description: > + Array.prototype.some - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = 1000; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 9; + }, + configurable: true + }); + return [kValue].some(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js index fe8d2655cd..dc63e94a3e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js - * @description Array.prototype.some - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = 'abc'; - - function callbackfn(val, idx, obj) { - if (5 === idx) { - return kValue === val; - } - return false; - } - - var proto = { 5: kValue }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-7 +description: > + Array.prototype.some - element to be retrieved is inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = 'abc'; + + function callbackfn(val, idx, obj) { + if (5 === idx) { + return kValue === val; + } + return false; + } + + var proto = { 5: kValue }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + return Array.prototype.some.call(child, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js index 05019ff47e..c3a1454100 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js - * @description Array.prototype.some - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - var kValue = {}; - - function callbackfn(val, idx, obj) { - if (0 === idx) { - return kValue === val; - } - return false; - } - - try { - Array.prototype[0] = kValue; - - return [, ].some(callbackfn); - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-8 +description: > + Array.prototype.some - element to be retrieved is inherited data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = {}; + + function callbackfn(val, idx, obj) { + if (0 === idx) { + return kValue === val; + } + return false; + } + + try { + Array.prototype[0] = kValue; + + return [, ].some(callbackfn); + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-9.js index 56968d3bd0..634ae4a0ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-9.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-9.js - * @description Array.prototype.some - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 10) { - return val === kValue; - } - return false; - } - - var obj = { length: 20 }; - - Object.defineProperty(obj, "10", { - get: function () { - return kValue; - }, - configurable: true - }); - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-i-9 +description: > + Array.prototype.some - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 10) { + return val === kValue; + } + return false; + } + + var obj = { length: 20 }; + + Object.defineProperty(obj, "10", { + get: function () { + return kValue; + }, + configurable: true + }); + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js index 7b7034883a..59fc2624b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js - * @description Array.prototype.some - callbackfn called with correct parameters - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - if(obj[idx] === val) - return false; - else - return true; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - - if(arr.some(callbackfn) === false) - return true; - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-1 +description: Array.prototype.some - callbackfn called with correct parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + if(obj[idx] === val) + return false; + else + return true; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + + if(arr.some(callbackfn) === false) + return true; + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js index 0ee7e23405..b98872077a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js - * @description Array.prototype.some - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - function callbackfn(val) { - return val > 10; - } - - return [11, 12].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-10 +description: Array.prototype.some - callbackfn is called with 1 formal parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val) { + return val > 10; + } + + return [11, 12].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js index a519e2d095..a01f833dd7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js - * @description Array.prototype.some - callbackfn is called with 2 formal parameter - */ - - -function testcase() { - function callbackfn(val, idx) { - return val > 10 && arguments[2][idx] === val; - } - - return [9, 12].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-11 +description: Array.prototype.some - callbackfn is called with 2 formal parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx) { + return val > 10 && arguments[2][idx] === val; + } + + return [9, 12].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js index 901055a513..284ee58324 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js - * @description Array.prototype.some - callbackfn is called with 3 formal parameter - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10 && obj[idx] === val; - } - - return [9, 12].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-12 +description: Array.prototype.some - callbackfn is called with 3 formal parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10 && obj[idx] === val; + } + + return [9, 12].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js index bee73a0812..8e880fdd08 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js - * @description Array.prototype.some - callbackfn that uses arguments object to get parameter value - */ - - -function testcase() { - - function callbackfn() { - return arguments[2][arguments[1]] === arguments[0]; - } - - return [9, 12].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-13 +description: > + Array.prototype.some - callbackfn that uses arguments object to + get parameter value +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return arguments[2][arguments[1]] === arguments[0]; + } + + return [9, 12].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js index a1b6579f6c..ec870518eb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js - * @description Array.prototype.some - 'this' of 'callback' is a Boolean object when 'T' is not an object ('T' is a boolean primitive) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.some.call(obj, callbackfn, false); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-16 +description: > + Array.prototype.some - 'this' of 'callback' is a Boolean object + when 'T' is not an object ('T' is a boolean primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === false; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.some.call(obj, callbackfn, false); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js index 68075c6684..ded8689d54 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js - * @description Array.prototype.some - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === 5; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.some.call(obj, callbackfn, 5); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-17 +description: > + Array.prototype.some - 'this' of 'callbackfn' is a Number object + when T is not an object (T is a number primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === 5; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.some.call(obj, callbackfn, 5); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js index 48d8462e0f..cf1473006b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js - * @description Array.prototype.some - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === "hello!"; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - - return Array.prototype.some.call(obj, callbackfn, "hello!"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-18 +description: > + Array.prototype.some - 'this' of 'callbackfn' is an String object + when T is not an object (T is a string primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === "hello!"; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + + return Array.prototype.some.call(obj, callbackfn, "hello!"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js index a8b33cf011..c7945b0180 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js - * @description Array.prototype.some - non-indexed properties are not called - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } - - var obj = { 0: 9, 10: 8, non_index_property: 11, length: 20 }; - - return !Array.prototype.some.call(obj, callbackfn) && (2 === called); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-19 +description: Array.prototype.some - non-indexed properties are not called +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val === 11; + } + + var obj = { 0: 9, 10: 8, non_index_property: 11, length: 20 }; + + return !Array.prototype.some.call(obj, callbackfn) && (2 === called); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js index 2d4f7318f5..c4a357721f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js - * @description Array.prototype.some - callbackfn takes 3 arguments - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - if(arguments.length === 3) //verify if callbackfn was called with 3 parameters - return false; - else - return true; - } - - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; - - if(arr.some(callbackfn) === false) - return true; - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-2 +description: Array.prototype.some - callbackfn takes 3 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + if(arguments.length === 3) //verify if callbackfn was called with 3 parameters + return false; + else + return true; + } + + var arr = [0,1,true,null,new Object(),"five"]; + arr[999999] = -6.6; + + if(arr.some(callbackfn) === false) + return true; + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js index b54dfd16e6..c4d5b7d703 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js - * @description Array.prototype.some - callbackfn called with correct parameters (thisArg is correct) - */ - - -function testcase() { - - var thisArg = { threshold: 10 }; - - function callbackfn(val, idx, obj) { - return this === thisArg; - } - - var obj = { 0: 11, length: 2 }; - - return Array.prototype.some.call(obj, callbackfn, thisArg); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-20 +description: > + Array.prototype.some - callbackfn called with correct parameters + (thisArg is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var thisArg = { threshold: 10 }; + + function callbackfn(val, idx, obj) { + return this === thisArg; + } + + var obj = { 0: 11, length: 2 }; + + return Array.prototype.some.call(obj, callbackfn, thisArg); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js index 58b33eda50..b920006938 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js - * @description Array.prototype.some - callbackfn called with correct parameters (kValue is correct) - */ - - -function testcase() { - - var firstIndex = false; - var secondIndex = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - firstIndex = (val === 11); - return false; - } - if (idx === 1) { - secondIndex = (val === 12); - return false; - } - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-21 +description: > + Array.prototype.some - callbackfn called with correct parameters + (kValue is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var firstIndex = false; + var secondIndex = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + firstIndex = (val === 11); + return false; + } + if (idx === 1) { + secondIndex = (val === 12); + return false; + } + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js index 47e8f135de..a281aa0599 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js - * @description Array.prototype.some - callbackfn called with correct parameters (the index k is correct) - */ - - -function testcase() { - - var firstIndex = false; - var secondIndex = false; - - function callbackfn(val, idx, obj) { - if (val === 11) { - firstIndex = (idx === 0); - return false; - } - if (val === 12) { - secondIndex = (idx === 1); - return false; - } - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-22 +description: > + Array.prototype.some - callbackfn called with correct parameters + (the index k is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var firstIndex = false; + var secondIndex = false; + + function callbackfn(val, idx, obj) { + if (val === 11) { + firstIndex = (idx === 0); + return false; + } + if (val === 12) { + secondIndex = (idx === 1); + return false; + } + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js index 1a78d65aae..e2569eba0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js - * @description Array.prototype.some - callbackfn called with correct parameters (this object O is correct) - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12, length: 2 }; - - function callbackfn(val, idx, o) { - return obj === o; - } - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-23 +description: > + Array.prototype.some - callbackfn called with correct parameters + (this object O is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12, length: 2 }; + + function callbackfn(val, idx, o) { + return obj === o; + } + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js index 1f17b36be8..ff42aceb0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js - * @description Array.prototype.some immediately returns true if callbackfn returns true - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - if(idx > 5) - return true; - else - return false; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - - if(arr.some(callbackfn) === true && callCnt === 7) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-3 +description: > + Array.prototype.some immediately returns true if callbackfn + returns true +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + if(idx > 5) + return true; + else + return false; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + + if(arr.some(callbackfn) === true && callCnt === 7) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js index 4040c38b03..df2a947970 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js - * @description Array.prototype.some - k values are passed in ascending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return true; - } else { - lastIdx++; - return false; - } - } - - return !arr.some(callbackfn) && arr.length === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-4 +description: > + Array.prototype.some - k values are passed in ascending numeric + order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4, 5]; + var lastIdx = 0; + var called = 0; + + function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return true; + } else { + lastIdx++; + return false; + } + } + + return !arr.some(callbackfn) && arr.length === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js index 5fe6816a6b..3d9629e430 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js - * @description Array.prototype.some - k values are accessed during each iteration and not prior to starting the loop - */ - - -function testcase() { - - var kIndex = []; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } - - return ![11, 12, 13, 14].some(callbackfn, undefined); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-5 +description: > + Array.prototype.some - k values are accessed during each iteration + and not prior to starting the loop +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kIndex = []; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } + } + + return ![11, 12, 13, 14].some(callbackfn, undefined); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js index 00ae35c9a4..1879027f13 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js - * @description Array.prototype.some - arguments to callbackfn are self consistent - */ - - -function testcase() { - - var obj = { 0: 11, length: 1 }; - var thisArg = {}; - - function callbackfn() { - return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj; - } - - return Array.prototype.some.call(obj, callbackfn, thisArg); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-6 +description: Array.prototype.some - arguments to callbackfn are self consistent +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, length: 1 }; + var thisArg = {}; + + function callbackfn() { + return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj; + } + + return Array.prototype.some.call(obj, callbackfn, thisArg); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js index 0a2c1a95df..ecb3fae2e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js - * @description Array.prototype.some - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - return false; - } - - var obj = { 0: 9, 1: 100, 10: 11, length: 20 }; - - try { - Array.prototype.some.call(obj, callbackfn); - return false; - } catch (ex) { - return ex instanceof Error && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-7 +description: > + Array.prototype.some - unhandled exceptions happened in callbackfn + terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } + return false; + } + + var obj = { 0: 9, 1: 100, 10: 11, length: 20 }; + + try { + Array.prototype.some.call(obj, callbackfn); + return false; + } catch (ex) { + return ex instanceof Error && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js index 84aa687a57..8ab303443c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js - * @description Array.prototype.some - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - obj[idx + 1] = 11; - } - return val > 10; - } - - var obj = { 0: 9, 1: 8, length: 2 }; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-8 +description: > + Array.prototype.some - element changed by callbackfn on previous + iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + obj[idx + 1] = 11; + } + return val > 10; + } + + var obj = { 0: 9, 1: 8, length: 2 }; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js index bb35f76f44..0476909f1c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js - * @description Array.prototype.some - callbackfn is called with 0 formal parameter - */ - - -function testcase() { - - function callbackfn() { - return true; - } - - return [11, 12].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-ii-9 +description: Array.prototype.some - callbackfn is called with 0 formal parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return true; + } + + return [11, 12].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js index 1706f71f9f..ea9131ad5a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js - * @description Array.prototype.some - return value of callbackfn is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return undefined; - } - - var obj = { 0: 11, length: 2 }; - - return !Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-1 +description: Array.prototype.some - return value of callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return undefined; + } + + var obj = { 0: 11, length: 2 }; + + return !Array.prototype.some.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js index 37f0e47e15..4cd929deb6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js - * @description Array.prototype.some - return value of callbackfn is a number (value is Infinity) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return Infinity; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-10 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return Infinity; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js index 81cc084c3d..f42cc0e68e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js - * @description Array.prototype.some - return value of callbackfn is a number (value is -Infinity) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return -Infinity; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-11 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return -Infinity; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js index 58ba03dfe5..76a5646a26 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js - * @description Array.prototype.some - return value of callbackfn is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } - - return ![11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-12 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return NaN; + } + + return ![11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js index d22da9c928..0416931a6a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js - * @description Array.prototype.some - return value of callbackfn is an empty string - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } - - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-13 +description: > + Array.prototype.some - return value of callbackfn is an empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return ""; + } + + return ![11].some(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js index 57d8c64642..4576c91dea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js - * @description Array.prototype.some - return value of callbackfn is a non-empty string - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return "non-empty string"; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-14 +description: > + Array.prototype.some - return value of callbackfn is a non-empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return "non-empty string"; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js index d09eff068f..24ce61c999 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js - * @description Array.prototype.some - return value of callbackfn is Function object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return function () { }; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-15 +description: > + Array.prototype.some - return value of callbackfn is Function + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return function () { }; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js index 0a3818d5e6..06b7405028 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js - * @description Array.prototype.some - return value of callbackfn is an Array object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Array(10); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-16 +description: > + Array.prototype.some - return value of callbackfn is an Array + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Array(10); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js index 8d7517f2df..1c5d355e81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js - * @description Array.prototype.some - return value of callbackfn is a String object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new String(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-17 +description: > + Array.prototype.some - return value of callbackfn is a String + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new String(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js index 12047df14b..a5e57ea1c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js - * @description Array.prototype.some - return value of callbackfn is a Boolean object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Boolean(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-18 +description: > + Array.prototype.some - return value of callbackfn is a Boolean + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Boolean(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js index a7e06bc885..27f568acdf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js - * @description Array.prototype.some - return value of callbackfn is a Number object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Number(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-19 +description: > + Array.prototype.some - return value of callbackfn is a Number + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Number(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js index eb5a95822f..a02ea0e146 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js - * @description Array.prototype.some - return value of callbackfn is null - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } - - var obj = { 0: 11, length: 2 }; - - return !Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-2 +description: Array.prototype.some - return value of callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return null; + } + + var obj = { 0: 11, length: 2 }; + + return !Array.prototype.some.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js index 335e0dce81..f6a9719088 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js - * @description Array.prototype.some - return value of callbackfn is the Math object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return Math; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-20 +description: > + Array.prototype.some - return value of callbackfn is the Math + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return Math; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js index 82b6e5f586..dbba856d41 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js - * @description Array.prototype.some - return value of callbackfn is a Date object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Date(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-21 +description: Array.prototype.some - return value of callbackfn is a Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Date(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js index 70b9f8b5ed..f68aad7956 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js - * @description Array.prototype.some - return value of callbackfn is a RegExp object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new RegExp(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-22 +description: > + Array.prototype.some - return value of callbackfn is a RegExp + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new RegExp(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js index ec6d3e9fcf..c8bd11c8fe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js - * @description Array.prototype.some - return value of callbackfn is the JSON object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return JSON; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-23 +description: > + Array.prototype.some - return value of callbackfn is the JSON + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return JSON; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js index 69fae88702..93a388b51b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js - * @description Array.prototype.some - return value of callbackfn is an Error object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new EvalError(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-24 +description: > + Array.prototype.some - return value of callbackfn is an Error + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new EvalError(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js index 29fc840077..232b8c01f3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js - * @description Array.prototype.some - return value of callbackfn is the Arguments object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return arguments; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-25 +description: > + Array.prototype.some - return value of callbackfn is the Arguments + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return arguments; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-26.js index f0e5dfe14d..92a844f389 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-26.js @@ -1,20 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-26.js - * @description Array.prototype.some - return value of callbackfn is the global object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return fnGlobalObject(); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-26 +description: > + Array.prototype.some - return value of callbackfn is the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return fnGlobalObject(); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-28.js index 619587d69e..73a9c2fc71 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-28.js @@ -1,47 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-28.js - * @description Array.prototype.some - true prevents further side effects - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - result = true; - } - return val > 10; - } - - var obj = { length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - return 8; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - result = true; - return 11; - }, - configurable: true - }); - - return Array.prototype.some.call(obj, callbackfn) && !result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-28 +description: Array.prototype.some - true prevents further side effects +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + if (idx > 1) { + result = true; + } + return val > 10; + } + + var obj = { length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + return 8; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + result = true; + return 11; + }, + configurable: true + }); + + return Array.prototype.some.call(obj, callbackfn) && !result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js index a33b60fa45..0f2c99abfc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js - * @description Array.prototype.some - return value (new Boolean(false)) of callbackfn is treated as true value - */ - - -function testcase() { - - function callbackfn() { - return new Boolean(false); - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-29 +description: > + Array.prototype.some - return value (new Boolean(false)) of + callbackfn is treated as true value +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return new Boolean(false); + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js index d5df0d0aab..7053698db5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js - * @description Array.prototype.some - return value of callbackfn is a boolean (value is false) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } - - var obj = { 0: 11, length: 2 }; - - return !Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-3 +description: > + Array.prototype.some - return value of callbackfn is a boolean + (value is false) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return false; + } + + var obj = { 0: 11, length: 2 }; + + return !Array.prototype.some.call(obj, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js index 10986750c0..aa9a7dec87 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js - * @description Array.prototype.some - return value of callbackfn is a boolean (value is true) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, length: 2 }; - - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-4 +description: > + Array.prototype.some - return value of callbackfn is a boolean + (value is true) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, length: 2 }; + + return Array.prototype.some.call(obj, callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js index 80c690beaf..f98d6b64fe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js - * @description Array.prototype.some - return value of callbackfn is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } - - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-5 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return 0; + } + + return ![11].some(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js index 15802078e1..6c0293dbaf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js - * @description Array.prototype.some - return value of callbackfn is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } - - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-6 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return +0; + } + + return ![11].some(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js index e918f4d1a8..6cdb5245ce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js - * @description Array.prototype.some - return value of callbackfn is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } - - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-7 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return -0; + } + + return ![11].some(callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js index 6e701e9b76..929b71956e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js - * @description Array.prototype.some - return value of callbackfn is a number (value is positive number) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return 5; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-8 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return 5; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js index 3ed5dbac5b..c3f11afa92 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js - * @description Array.prototype.some - return value of callbackfn is a number (value is negative number) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return -5; - } - - return [11].some(callbackfn); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-7-c-iii-9 +description: > + Array.prototype.some - return value of callbackfn is a number + (value is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return -5; + } + + return [11].some(callbackfn); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js index ef09290080..ae2827da56 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js - * @description Array.prototype.some returns false if 'length' is 0 (empty array) - */ - - -function testcase() { - function cb(){} - var i = [].some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-1 +description: Array.prototype.some returns false if 'length' is 0 (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb(){} + var i = [].some(cb); + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js index a15013d34a..92ec3b3b0d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js - * @description Array.prototype.some - subclassed array when length is reduced - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 2; - - function cb(val) - { - if(val > 2) - return true; - else - return false; - } - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-10 +description: Array.prototype.some - subclassed array when length is reduced +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 2; + + function cb(val) + { + if(val > 2) + return true; + else + return false; + } + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js index 53c4ab32b3..7520fc0d62 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js - * @description Array.prototype.some returns false when all calls to callbackfn return false - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - - if(arr.some(callbackfn) === false && callCnt === 10) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-11 +description: > + Array.prototype.some returns false when all calls to callbackfn + return false +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return false; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + + if(arr.some(callbackfn) === false && callCnt === 10) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js index 280406b791..b42f1f2a9c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js - * @description Array.prototype.some doesn't mutate the array on which it is called on - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.some(callbackfn); - if(arr[0] === 1 && - arr[1] === 2 && - arr[2] === 3 && - arr[3] === 4 && - arr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-12 +description: > + Array.prototype.some doesn't mutate the array on which it is + called on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return true; + } + var arr = [1,2,3,4,5]; + arr.some(callbackfn); + if(arr[0] === 1 && + arr[1] === 2 && + arr[2] === 3 && + arr[3] === 4 && + arr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js index 972789a391..9aea4b6347 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js - * @description Array.prototype.some doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr["i"] = 10; - arr[true] = 11; - - if(arr.some(callbackfn) === false && callCnt === 10) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-13 +description: Array.prototype.some doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return false; + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + arr["i"] = 10; + arr[true] = 11; + + if(arr.some(callbackfn) === false && callCnt === 10) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js index 5d614112d3..e576e65502 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-2 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js index 2a94bd8edd..a27716b7a0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-3 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js index db7ee0b418..ada996035d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-4 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden to 0 (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js index dda22dd235..67b5632fba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-5 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js index 6075d269fc..124803f73f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-6 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js index 6a060f5778..4e6afa69cd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-7 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden with obj w/o valueOf (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js index 92463fb48a..95b115a6b6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js - * @description Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with [] - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - var i = f.some(cb); - - if (i === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.17-8-8 +description: > + Array.prototype.some returns false if 'length' is 0 (subclassed + Array, length overridden with [] +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + var i = f.some(cb); + + if (i === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js index aaace70cd8..daf07423cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js - * @description Array.prototype.forEach must exist as a function - */ - - -function testcase() { - var f = Array.prototype.forEach; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-0-1 +description: Array.prototype.forEach must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.forEach; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js index 0eb353f2b6..8f9bef3e8e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js - * @description Array.prototype.forEach.length must be 1 - */ - - -function testcase() { - if (Array.prototype.forEach.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-0-2 +description: Array.prototype.forEach.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.forEach.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js index 286dbc4125..4ec50a135f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js - * @description Array.prototype.forEach applied to undefined - */ - - -function testcase() { - try { - Array.prototype.forEach.call(undefined); // TypeError is thrown if value is undefined - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-1 +description: Array.prototype.forEach applied to undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.forEach.call(undefined); // TypeError is thrown if value is undefined + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js index b41760d9af..e892581522 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js - * @description Array.prototype.forEach applied to the Math object - */ - - -function testcase() { - var result = false; - - function callbackfn(val, idx, obj) { - result = ('[object Math]' === Object.prototype.toString.call(obj)); - } - - try { - Math.length = 1; - Math[0] = 1; - Array.prototype.forEach.call(Math, callbackfn); - return result; - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-10 +description: Array.prototype.forEach applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + + function callbackfn(val, idx, obj) { + result = ('[object Math]' === Object.prototype.toString.call(obj)); + } + + try { + Math.length = 1; + Math[0] = 1; + Array.prototype.forEach.call(Math, callbackfn); + return result; + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js index e069be2763..9d05ca8a21 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js - * @description Array.prototype.forEach applied to Date object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Date; - } - - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-11 +description: Array.prototype.forEach applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof Date; + } + + var obj = new Date(); + obj.length = 1; + obj[0] = 1; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js index dab1e0f2ba..f98e725b52 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js - * @description Array.prototype.forEach applied to RegExp object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof RegExp; - } - - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-12 +description: Array.prototype.forEach applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof RegExp; + } + + var obj = new RegExp(); + obj.length = 1; + obj[0] = 1; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js index 65b6847d77..0a109b2be8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js - * @description Array.prototype.forEach applied to the JSON object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = ('[object JSON]' === Object.prototype.toString.call(obj)); - } - - try { - JSON.length = 1; - JSON[0] = 1; - Array.prototype.forEach.call(JSON, callbackfn); - return result; - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-13 +description: Array.prototype.forEach applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = ('[object JSON]' === Object.prototype.toString.call(obj)); + } + + try { + JSON.length = 1; + JSON[0] = 1; + Array.prototype.forEach.call(JSON, callbackfn); + return result; + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js index fd042c85f2..82a8723b84 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js - * @description Array.prototype.forEach applied to Error object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Error; - } - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-14 +description: Array.prototype.forEach applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof Error; + } + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js index ed5ac1271d..ff9dcc8970 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js - * @description Array.prototype.forEach applied to the Arguments object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = ('[object Arguments]' === Object.prototype.toString.call(obj)); - } - - var obj = (function () { - return arguments; - }("a", "b")); - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-15 +description: Array.prototype.forEach applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = ('[object Arguments]' === Object.prototype.toString.call(obj)); + } + + var obj = (function () { + return arguments; + }("a", "b")); + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js index e12c85e94b..3911011299 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js - * @description Array.prototype.forEach applied to null - */ - - -function testcase() { - try { - Array.prototype.forEach.call(null); // TypeError is thrown if value is null - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-2 +description: Array.prototype.forEach applied to null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.forEach.call(null); // TypeError is thrown if value is null + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js index 3acafbedff..fbe3de2147 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js - * @description Array.prototype.forEach applied to boolean primitive - */ - - -function testcase() { - var result = false; - - function callbackfn(val, idx, obj) { - result = obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; - - Array.prototype.forEach.call(false, callbackfn); - return result; - - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-3 +description: Array.prototype.forEach applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + + function callbackfn(val, idx, obj) { + result = obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = true; + Boolean.prototype.length = 1; + + Array.prototype.forEach.call(false, callbackfn); + return result; + + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js index b8b20f5c2c..384b7e2661 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js - * @description Array.prototype.forEach applied to Boolean object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Boolean; - } - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-4 +description: Array.prototype.forEach applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof Boolean; + } + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js index 2770825848..e0fab5a44e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js - * @description Array.prototype.forEach applied to number primitive - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Number; - } - - try { - Number.prototype[0] = 1; - Number.prototype.length = 1; - - Array.prototype.forEach.call(2.5, callbackfn); - return result; - } finally { - delete Number.prototype[0]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-5 +description: Array.prototype.forEach applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof Number; + } + + try { + Number.prototype[0] = 1; + Number.prototype.length = 1; + + Array.prototype.forEach.call(2.5, callbackfn); + return result; + } finally { + delete Number.prototype[0]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js index 0e2113ef4a..6dcd5d82f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js - * @description Array.prototype.forEach applied to Number object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Number; - } - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - Array.prototype.forEach.call(obj, callbackfn); - - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-6 +description: Array.prototype.forEach applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof Number; + } + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + Array.prototype.forEach.call(obj, callbackfn); + + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js index 5a71e0fd93..180cf1fd17 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js - * @description Array.prototype.forEach applied to string primitive - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof String; - } - - Array.prototype.forEach.call("abc", callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-7 +description: Array.prototype.forEach applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof String; + } + + Array.prototype.forEach.call("abc", callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js index 3264dd5697..5241b4774a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js - * @description Array.prototype.forEach applied to String object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof String; - } - - var obj = new String("abc"); - Array.prototype.forEach.call(obj, callbackfn); - - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-8 +description: Array.prototype.forEach applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof String; + } + + var obj = new String("abc"); + Array.prototype.forEach.call(obj, callbackfn); + + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js index c5111a8deb..b11575edeb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js - * @description Array.prototype.forEach applied to Function object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = obj instanceof Function; - } - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-1-9 +description: Array.prototype.forEach applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = obj instanceof Function; + } + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js index bc2f653214..ebb7f96578 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js - * @description Array.prototype.forEach - 'length' is own data property on an Array-like object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-1 +description: > + Array.prototype.forEach - 'length' is own data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 + }; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js index a7c2799ac8..b12d7a9efe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an inherited accessor property - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-10 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Array.prototype.forEach.call(child, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js index a5bf38f41e..ed6132bf50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-11 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an own accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { + 0: 11, + 1: 12 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js index b5cfa8e5b4..acd2aaa425 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js - * @description Array.prototype.forEach - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } finally { - delete Object.prototype.length; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-12 +description: > + Array.prototype.forEach - 'length' is own accessor property + without a get function that overrides an inherited accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 12, 1: 11 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + return !accessed; + } finally { + delete Object.prototype.length; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js index 9126374738..38dc83d784 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js - * @description Array.prototype.forEach applied to the Array-like object that 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 11; - child[1] = 12; - - Array.prototype.forEach.call(child, callbackfn); - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-13 +description: > + Array.prototype.forEach applied to the Array-like object that + 'length' is inherited accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 11; + child[1] = 12; + + Array.prototype.forEach.call(child, callbackfn); + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js index 3e49e89640..4976f9b4df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js - * @description Array.prototype.forEach applied to the Array-like object that 'length' property doesn't exist - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 11, 1: 12 }; - - Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-14 +description: > + Array.prototype.forEach applied to the Array-like object that + 'length' property doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 11, 1: 12 }; + + Array.prototype.forEach.call(obj, callbackfn); + return !accessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-15.js index cf0c628674..cb8a268765 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-15.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-15.js - * @description Array.prototype.forEach - 'length' is property of the global object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; - Array.prototype.forEach.call(fnGlobalObject(), callbackfn); - return result; - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-15 +description: Array.prototype.forEach - 'length' is property of the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 12; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 9; + fnGlobalObject().length = 2; + Array.prototype.forEach.call(fnGlobalObject(), callbackfn); + return result; + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js index 052d84dc29..5adbb84e60 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js - * @description Array.prototype.forEach applied to the Arguments object, which implements its own property get method - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var func = function (a, b) { - arguments[2] = 9; - Array.prototype.forEach.call(arguments, callbackfn); - return result; - }; - - return func(12, 11); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-17 +description: > + Array.prototype.forEach applied to the Arguments object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var func = function (a, b) { + arguments[2] = 9; + Array.prototype.forEach.call(arguments, callbackfn); + return result; + }; + + return func(12, 11); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js index 9e879953cc..afca82ded0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js - * @description Array.prototype.forEach applied to String object, which implements its own property get method - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 3); - } - - var str = new String("012"); - - Array.prototype.forEach.call(str, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-18 +description: > + Array.prototype.forEach applied to String object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 3); + } + + var str = new String("012"); + + Array.prototype.forEach.call(str, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js index 91a7c1933a..c5dc9011e4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js - * @description Array.prototype.forEach applied to Function object, which implements its own property get method - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; - - Array.prototype.forEach.call(fun, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-19 +description: > + Array.prototype.forEach applied to Function object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var fun = function (a, b) { + return a + b; + }; + fun[0] = 12; + fun[1] = 11; + fun[2] = 9; + + Array.prototype.forEach.call(fun, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js index d6a859b95c..eb3e47d19d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js - * @description Array.prototype.forEach - 'length' is own data property on an Array - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - [12, 11].forEach(callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-2 +description: Array.prototype.forEach - 'length' is own data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + [12, 11].forEach(callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js index 6991dc4845..0825b68124 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js - * @description Array.prototype.forEach - 'length' is an own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-3 +description: > + Array.prototype.forEach - 'length' is an own data property that + overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Array.prototype.forEach.call(child, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js index 1c3dda70f3..7b1318bf28 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js - * @description Array.prototype.forEach - 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - var result = false; - var arrProtoLen; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - [12, 11].forEach(callbackfn); - return result; - } finally { - Array.prototype.length = arrProtoLen; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-4 +description: > + Array.prototype.forEach - 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + var arrProtoLen; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + [12, 11].forEach(callbackfn); + return result; + } finally { + Array.prototype.length = arrProtoLen; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js index 8a84c6e762..59867fa5f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-5 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an own data property that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Array.prototype.forEach.call(child, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js index 1fa7c99923..3993e31064 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an inherited data property - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var proto = { length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-6 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var proto = { length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Array.prototype.forEach.call(child, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js index 1abf9a291c..f40d2ace0e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-7 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + obj[0] = 12; + obj[1] = 11; + obj[2] = 9; + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js index 20b155cd3e..03f57ab650 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-8 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an own accessor property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Array.prototype.forEach.call(child, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js index 5be4ff9675..49ccfeb988 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js - * @description Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-2-9 +description: > + Array.prototype.forEach applied to Array-like object, 'length' is + an own accessor property that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + function callbackfn(val, idx, obj) { + result = (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + Array.prototype.forEach.call(child, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js index 7a90bd2293..381999ddea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js - * @description Array.prototype.forEach - value of 'length' is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 0, 1: 1, length: undefined }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-1 +description: Array.prototype.forEach - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 0, 1: 1, length: undefined }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js index a9167a61f4..42a26478a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js - * @description Array.prototype.forEach - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: NaN }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-10 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: NaN }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js index ca82357041..4f5e0636cd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js - * @description Array.prototype.forEach - 'length' is a string containing a positive number - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: "2" }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-11 +description: > + Array.prototype.forEach - 'length' is a string containing a + positive number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: "2" }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js index b9379bb8d3..8d7d518dcf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js - * @description Array.prototype.forEach - 'length' is a string containing a negative number - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: "-4294967294" }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-12 +description: > + Array.prototype.forEach - 'length' is a string containing a + negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: "-4294967294" }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js index 13922034c7..3348a4c946 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js - * @description Array.prototype.forEach - 'length' is a string containing a decimal number - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - var obj = { 1: 11, 2: 9, length: "2.5" }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-13 +description: > + Array.prototype.forEach - 'length' is a string containing a + decimal number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + var obj = { 1: 11, 2: 9, length: "2.5" }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js index a3bb7e521e..d478a0e3a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js - * @description Array.prototype.forEach - 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var accessed1 = false; - var accessed2 = false; - var accessed3 = false; - - function callbackfn1(val, idx, obj) { - accessed1 = true; - } - - function callbackfn2(val, idx, obj) { - accessed2 = true; - } - - function callbackfn3(val, idx, obj) { - accessed3 = true; - } - - var obj1 = { 0: 9, length: "Infinity" }; - var obj2 = { 0: 9, length: "-Infinity" }; - var obj3 = { 0: 9, length: "+Infinity" }; - - Array.prototype.forEach.call(obj1, callbackfn1); - Array.prototype.forEach.call(obj2, callbackfn2); - Array.prototype.forEach.call(obj3, callbackfn3); - - return !accessed1 && !accessed2 && !accessed3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-14 +description: > + Array.prototype.forEach - 'length' is a string containing + +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed1 = false; + var accessed2 = false; + var accessed3 = false; + + function callbackfn1(val, idx, obj) { + accessed1 = true; + } + + function callbackfn2(val, idx, obj) { + accessed2 = true; + } + + function callbackfn3(val, idx, obj) { + accessed3 = true; + } + + var obj1 = { 0: 9, length: "Infinity" }; + var obj2 = { 0: 9, length: "-Infinity" }; + var obj3 = { 0: 9, length: "+Infinity" }; + + Array.prototype.forEach.call(obj1, callbackfn1); + Array.prototype.forEach.call(obj2, callbackfn2); + Array.prototype.forEach.call(obj3, callbackfn3); + + return !accessed1 && !accessed2 && !accessed3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js index 824ec11cac..358f3ea9ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js - * @description Array.prototype.forEach - 'length' is a string containing an exponential number - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: "2E0" }; - - Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-15 +description: > + Array.prototype.forEach - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: "2E0" }; + + Array.prototype.forEach.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js index 1c58c53b18..d84c1c4f3e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js - * @description Array.prototype.forEach - 'length' is a string containing a hex number - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: "0x0002" }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-16 +description: > + Array.prototype.forEach - 'length' is a string containing a hex + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: "0x0002" }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js index 60f9a03b29..18712d4632 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js - * @description Array.prototype.forEach - 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: "0002.00" }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-17 +description: > + Array.prototype.forEach - 'length' is a string containing a number + with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: "0002.00" }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js index 7db29a2446..9be3762467 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js - * @description Array.prototype.forEach - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: "asdf!_" }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-18 +description: > + Array.prototype.forEach - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: "asdf!_" }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js index a22d20758a..c39c6bb5de 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js - * @description Array.prototype.forEach - value of 'length' is an Object which has an own toString method. - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { - 1: 11, - 2: 9, - length: { - toString: function () { - return '2'; - } - } - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-19 +description: > + Array.prototype.forEach - value of 'length' is an Object which has + an own toString method. +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { + 1: 11, + 2: 9, + length: { + toString: function () { + return '2'; + } + } + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js index 93416a9c0c..ff428d996b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js - * @description Array.prototype.forEach - value of 'length' is a boolean (value is true) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { 0: 11, 1: 9, length: true }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-2 +description: > + Array.prototype.forEach - value of 'length' is a boolean (value is + true) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { 0: 11, 1: 9, length: true }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js index 98ae5e6a57..2d3e38c937 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js - * @description Array.prototype.forEach - value of 'length' is an Object which has an own valueOf method. - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - return 2; - } - } - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-20 +description: > + Array.prototype.forEach - value of 'length' is an Object which has + an own valueOf method. +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function () { + return 2; + } + } + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js index 30a9dbb2b8..a84bec2d53 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js - * @description Array.prototype.forEach - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var testResult = false; - var firstStepOccured = false; - var secondStepOccured = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return '2'; - } - } - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-21 +description: > + Array.prototype.forEach - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var firstStepOccured = false; + var secondStepOccured = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function () { + firstStepOccured = true; + return {}; + }, + toString: function () { + secondStepOccured = true; + return '2'; + } + } + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult && firstStepOccured && secondStepOccured; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js index 9ee0a83987..05e0352fc2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js - * @description Array.prototype.forEach throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var accessed = false; - var firstStepOccured = false; - var secondStepOccured = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { - 1: 11, - 2: 12, - - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return {}; - } - } - }; - - try { - Array.prototype.forEach.call(obj, callbackfn); - return false; - } catch (ex) { - return ex instanceof TypeError && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-22 +description: > + Array.prototype.forEach throws TypeError exception when 'length' + is an object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var firstStepOccured = false; + var secondStepOccured = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { + 1: 11, + 2: 12, + + length: { + valueOf: function () { + firstStepOccured = true; + return {}; + }, + toString: function () { + secondStepOccured = true; + return {}; + } + } + }; + + try { + Array.prototype.forEach.call(obj, callbackfn); + return false; + } catch (ex) { + return ex instanceof TypeError && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js index 0fb5185f28..289fbd9b04 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js @@ -1,49 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js - * @description Array.prototype.forEach uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var testResult = false; - var valueOfAccessed = false; - var toStringAccessed = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 1: 11, - 2: 9, - length: child - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-23 +description: > + Array.prototype.forEach uses inherited valueOf method when + 'length' is an object with an own toString and inherited valueOf + methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var valueOfAccessed = false; + var toStringAccessed = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 1: 11, + 2: 9, + length: child + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js index 0e69963608..a0d9e85204 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js - * @description Array.prototype.forEach - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { - 1: 11, - 2: 9, - length: 2.685 - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-24 +description: > + Array.prototype.forEach - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { + 1: 11, + 2: 9, + length: 2.685 + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js index 61264d3ba2..badd055c4b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js - * @description Array.prototype.forEach - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { - 1: 11, - 2: 9, - length: -4294967294.5 - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-25 +description: > + Array.prototype.forEach - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { + 1: 11, + 2: 9, + length: -4294967294.5 + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js index 0d20931c2f..3fc30f7ac6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js - * @description Array.prototype.forEach - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-28 +description: > + Array.prototype.forEach - value of 'length' is boundary value + (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js index 5fe2138a02..59f569cba8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js - * @description Array.prototype.forEach - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - testResult = (val > 10); - } - - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-29 +description: > + Array.prototype.forEach - value of 'length' is boundary value + (2^32 + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + testResult = (val > 10); + } + + var obj = { + 0: 11, + 1: 9, + length: 4294967297 + }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js index 2059b02eb7..d38646d3e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js - * @description Array.prototype.forEach - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 1, 1: 1, length: 0 }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-3 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 1, 1: 1, length: 0 }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js index 3726209539..ca21b0e23c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js - * @description Array.prototype.forEach - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 11, length: +0 }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-4 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 11, length: +0 }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js index 471dae7148..1713f28897 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js - * @description Array.prototype.forEach - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 11, length: -0 }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-5 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 11, length: -0 }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js index 96ffec650c..bca740b11c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js - * @description Array.prototype.forEach - value of 'length' is a number (value is positive) - */ - - -function testcase() { - - var testResult1 = false; - - function callbackfn(val, idx, obj) { - testResult1 = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: 2 }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-6 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = false; + + function callbackfn(val, idx, obj) { + testResult1 = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: 2 }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js index 255465da19..3302cc14cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js - * @description Array.prototype.forEach - value of 'length' is a number (value is negative) - */ - - -function testcase() { - - var testResult1 = false; - - function callbackfn(val, idx, obj) { - testResult1 = (val > 10); - } - - var obj = { 1: 11, 2: 9, length: -4294967294 }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-7 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = false; + + function callbackfn(val, idx, obj) { + testResult1 = (val > 10); + } + + var obj = { 1: 11, 2: 9, length: -4294967294 }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js index 187e7af77b..882030d7d0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js - * @description Array.prototype.forEach - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: Infinity }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-8 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: Infinity }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js index 55a7ba6ad5..c848e1eec4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js - * @description Array.prototype.forEach - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: -Infinity }; - - Array.prototype.forEach.call(obj, callbackfn); - - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-3-9 +description: > + Array.prototype.forEach - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: -Infinity }; + + Array.prototype.forEach.call(obj, callbackfn); + + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js index 1d12e60ebe..f0300eed17 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js - * @description Array.prototype.forEach throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-1 +description: Array.prototype.forEach throws TypeError if callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js index 7cd9019358..7dd1ee3753 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js - * @description Array.prototype.forEach - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-10 +description: > + Array.prototype.forEach - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js index 11069b2103..af8c4d5e3e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js - * @description Array.prototype.forEach - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-11 +description: > + Array.prototype.forEach - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js index 3c61e06c32..9e18b9f4c6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js - * @description Array.prototype.forEach - 'callbackfn' is a function - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } - - [11, 9].forEach(callbackfn); - return accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-12 +description: Array.prototype.forEach - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + } + + [11, 9].forEach(callbackfn); + return accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-15.js index 98e15b5c6b..bd262c098e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-15.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-15.js - * @description Array.prototype.forEach - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj); - return false; - } catch (ex) { - return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-15 +description: > + Array.prototype.forEach - calling with no callbackfn is the same + as passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 10: 10 }; + var lengthAccessed = false; + var loopAccessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj); + return false; + } catch (ex) { + return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js index 659651ca32..c803ad0f50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js - * @description Array.prototype.forEach throws ReferenceError if callbackfn is unreferenced - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach(foo); - } - catch(e) { - if(e instanceof ReferenceError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-2 +description: > + Array.prototype.forEach throws ReferenceError if callbackfn is + unreferenced +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach(foo); + } + catch(e) { + if(e instanceof ReferenceError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js index 1fc8e93aae..76cfb1d08a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js - * @description Array.prototype.forEach throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-3 +description: Array.prototype.forEach throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js index ab4ad44581..923ff8685a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js - * @description Array.prototype.forEach throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-4 +description: Array.prototype.forEach throws TypeError if callbackfn is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js index 5075cd500c..8dd50a1bcb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js - * @description Array.prototype.forEach throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-5 +description: Array.prototype.forEach throws TypeError if callbackfn is number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js index 5cbc27b420..840aed6037 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js - * @description Array.prototype.forEach throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-6 +description: Array.prototype.forEach throws TypeError if callbackfn is string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js index 04d5ce8d93..1f5886637e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js - * @description Array.prototype.forEach throws TypeError if callbackfn is Object without Call internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.forEach(new Object()); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-7 +description: > + Array.prototype.forEach throws TypeError if callbackfn is Object + without Call internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.forEach(new Object()); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js index 9a6c649a02..094c91ff4f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js - * @description Array.prototype.forEach - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-8 +description: > + Array.prototype.forEach - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js index 0d2ae0a3e6..4051332fcd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js - * @description Array.prototype.forEach - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-4-9 +description: > + Array.prototype.forEach - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1-s.js index 05a592b7c1..3efa1fb0c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1-s.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1-s.js - * @description Array.prototype.forEach - thisArg not passed to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - - [1].forEach(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-1-s +description: Array.prototype.forEach - thisArg not passed to strict callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + + function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + + [1].forEach(callbackfn); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js index d2ad769bcd..f8f41a9ee9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js - * @description Array.prototype.forEach - thisArg is passed - */ - - -function testcase() { - this._15_4_4_18_5_1 = false; - var _15_4_4_18_5_1 = true; - var result; - function callbackfn(val, idx, obj) { - result = this._15_4_4_18_5_1; - } - var arr = [1]; - arr.forEach(callbackfn) - return !result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-1 +description: Array.prototype.forEach - thisArg is passed +includes: [runTestCase.js] +---*/ + +function testcase() { + this._15_4_4_18_5_1 = false; + var _15_4_4_18_5_1 = true; + var result; + function callbackfn(val, idx, obj) { + result = this._15_4_4_18_5_1; + } + var arr = [1]; + arr.forEach(callbackfn) + return !result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js index 59cf589611..156afaa8e8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js - * @description Array.prototype.forEach - Array Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objArray = []; - - function callbackfn(val, idx, obj) { - result = (this === objArray); - } - - [11].forEach(callbackfn, objArray); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-10 +description: Array.prototype.forEach - Array Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objArray = []; + + function callbackfn(val, idx, obj) { + result = (this === objArray); + } + + [11].forEach(callbackfn, objArray); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js index 3fce7ac5be..7ed1857c75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js - * @description Array.prototype.forEach - String Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objString = new String(); - - function callbackfn(val, idx, obj) { - result = (this === objString); - } - - [11].forEach(callbackfn, objString); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-11 +description: Array.prototype.forEach - String Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objString = new String(); + + function callbackfn(val, idx, obj) { + result = (this === objString); + } + + [11].forEach(callbackfn, objString); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js index 32f66ddf92..ccc9b335ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js - * @description Array.prototype.forEach - Boolean Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objBoolean = new Boolean(); - - function callbackfn(val, idx, obj) { - result = (this === objBoolean); - } - - [11].forEach(callbackfn, objBoolean); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-12 +description: Array.prototype.forEach - Boolean Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objBoolean = new Boolean(); + + function callbackfn(val, idx, obj) { + result = (this === objBoolean); + } + + [11].forEach(callbackfn, objBoolean); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js index d16af30a79..af4cf0bc23 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js - * @description Array.prototype.forEach - Number Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objNumber = new Number(); - - function callbackfn(val, idx, obj) { - result = (this === objNumber); - } - - [11].forEach(callbackfn, objNumber); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-13 +description: Array.prototype.forEach - Number Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objNumber = new Number(); + + function callbackfn(val, idx, obj) { + result = (this === objNumber); + } + + [11].forEach(callbackfn, objNumber); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js index f0f3b10a3e..914b21ebde 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js - * @description Array.prototype.forEach - the Math object can be used as thisArg - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (this === Math); - } - - [11].forEach(callbackfn, Math); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-14 +description: Array.prototype.forEach - the Math object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (this === Math); + } + + [11].forEach(callbackfn, Math); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js index b0f456c469..b87d285a84 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js - * @description Array.prototype.forEach - Date Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objDate = new Date(); - - function callbackfn(val, idx, obj) { - result = (this === objDate); - } - - [11].forEach(callbackfn, objDate); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-15 +description: Array.prototype.forEach - Date Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objDate = new Date(); + + function callbackfn(val, idx, obj) { + result = (this === objDate); + } + + [11].forEach(callbackfn, objDate); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js index 9d2c2e7228..3166240ebe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js - * @description Array.prototype.forEach - RegExp Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objRegExp = new RegExp(); - - function callbackfn(val, idx, obj) { - result = (this === objRegExp); - } - - [11].forEach(callbackfn, objRegExp); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-16 +description: Array.prototype.forEach - RegExp Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objRegExp = new RegExp(); + + function callbackfn(val, idx, obj) { + result = (this === objRegExp); + } + + [11].forEach(callbackfn, objRegExp); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js index b1ce03ff32..b606fe454a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js - * @description Array.prototype.forEach - the JSON object can be used as thisArg - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (this === JSON); - } - - [11].forEach(callbackfn, JSON); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-17 +description: Array.prototype.forEach - the JSON object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (this === JSON); + } + + [11].forEach(callbackfn, JSON); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js index 299ee5ddab..0918a18cf6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js - * @description Array.prototype.forEach - Error Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objError = new RangeError(); - - function callbackfn(val, idx, obj) { - result = (this === objError); - } - - [11].forEach(callbackfn, objError); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-18 +description: Array.prototype.forEach - Error Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objError = new RangeError(); + + function callbackfn(val, idx, obj) { + result = (this === objError); + } + + [11].forEach(callbackfn, objError); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js index 5f9f160506..01b69165ca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js - * @description Array.prototype.forEach - the Arguments object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var arg; - - function callbackfn(val, idx, obj) { - result = (this === arg); - } - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - [11].forEach(callbackfn, arg); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-19 +description: > + Array.prototype.forEach - the Arguments object can be used as + thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var arg; + + function callbackfn(val, idx, obj) { + result = (this === arg); + } + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + [11].forEach(callbackfn, arg); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js index cb3a5df5b4..e539278e6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js - * @description Array.prototype.forEach - thisArg is Object - */ - - -function testcase() { - var res = false; - var o = new Object(); - o.res = true; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } - - var arr = [1]; - arr.forEach(callbackfn,o) - if( result === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-2 +description: Array.prototype.forEach - thisArg is Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var o = new Object(); + o.res = true; + var result; + function callbackfn(val, idx, obj) + { + result = this.res; + } + + var arr = [1]; + arr.forEach(callbackfn,o) + if( result === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-21.js index 397b4bec79..ceb36f8d1e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-21.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-21.js - * @description Array.prototype.forEach - the global object can be used as thisArg - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (this === fnGlobalObject()); - } - - [11].forEach(callbackfn, fnGlobalObject()); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-21 +description: Array.prototype.forEach - the global object can be used as thisArg +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (this === fnGlobalObject()); + } + + [11].forEach(callbackfn, fnGlobalObject()); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js index f53a9402e3..046e63428c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js - * @description Array.prototype.forEach - boolean primitive can be used as thisArg - */ - - -function testcase() { - - var result = false; - - function callbackfn(val, idx, obj) { - result = (this.valueOf() === false); - } - - [11].forEach(callbackfn, false); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-22 +description: Array.prototype.forEach - boolean primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + + function callbackfn(val, idx, obj) { + result = (this.valueOf() === false); + } + + [11].forEach(callbackfn, false); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js index aa162bc936..3f85ffc460 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js - * @description Array.prototype.forEach - number primitive can be used as thisArg - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() === 101); - } - - [11].forEach(callbackfn, 101); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-23 +description: Array.prototype.forEach - number primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (this.valueOf() === 101); + } + + [11].forEach(callbackfn, 101); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js index 24ae537d3c..340c3e8d30 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js - * @description Array.prototype.forEach - string primitive can be used as thisArg - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() === "abc"); - } - - [11].forEach(callbackfn, "abc"); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-24 +description: Array.prototype.forEach - string primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (this.valueOf() === "abc"); + } + + [11].forEach(callbackfn, "abc"); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-25.js index 809c940d29..76a3f4b69e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-25.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-25.js - * @description Array.prototype.forEach - thisArg not passed - */ - - -function testcase() { - function innerObj() { - this._15_4_4_18_5_25 = true; - var _15_4_4_18_5_25 = false; - var result; - function callbackfn(val, idx, obj) { - result = this._15_4_4_18_5_25; - } - var arr = [1]; - arr.forEach(callbackfn) - this.retVal = !result; - } - return new innerObj().retVal; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-25 +description: Array.prototype.forEach - thisArg not passed +includes: [runTestCase.js] +---*/ + +function testcase() { + function innerObj() { + this._15_4_4_18_5_25 = true; + var _15_4_4_18_5_25 = false; + var result; + function callbackfn(val, idx, obj) { + result = this._15_4_4_18_5_25; + } + var arr = [1]; + arr.forEach(callbackfn) + this.retVal = !result; + } + return new innerObj().retVal; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js index 5d3b224ad7..ca379f77e1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js - * @description Array.prototype.forEach - thisArg is Array - */ - - -function testcase() { - var res = false; - var a = new Array(); - a.res = true; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } - - var arr = [1]; - arr.forEach(callbackfn,a) - if( result === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-3 +description: Array.prototype.forEach - thisArg is Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var a = new Array(); + a.res = true; + var result; + function callbackfn(val, idx, obj) + { + result = this.res; + } + + var arr = [1]; + arr.forEach(callbackfn,a) + if( result === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js index 02f578a9ca..c05633dfaa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js - * @description Array.prototype.forEach - thisArg is object from object template(prototype) - */ - - -function testcase() { - var res = false; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } - - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; - arr.forEach(callbackfn,f) - if( result === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-4 +description: > + Array.prototype.forEach - thisArg is object from object + template(prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var result; + function callbackfn(val, idx, obj) + { + result = this.res; + } + + function foo(){} + foo.prototype.res = true; + var f = new foo(); + var arr = [1]; + arr.forEach(callbackfn,f) + if( result === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js index d3f60de44e..d3d0c8e0c8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js - * @description Array.prototype.forEach - thisArg is object from object template - */ - - -function testcase() { - var res = false; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } - - function foo(){} - var f = new foo(); - f.res = true; - - var arr = [1]; - arr.forEach(callbackfn,f) - if( result === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-5 +description: Array.prototype.forEach - thisArg is object from object template +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var result; + function callbackfn(val, idx, obj) + { + result = this.res; + } + + function foo(){} + var f = new foo(); + f.res = true; + + var arr = [1]; + arr.forEach(callbackfn,f) + if( result === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js index 61e45d2303..81e2a710b2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js - * @description Array.prototype.forEach - thisArg is function - */ - - -function testcase() { - var res = false; - var result; - function callbackfn(val, idx, obj) - { - result = this.res; - } - - function foo(){} - foo.res = true; - - var arr = [1]; - arr.forEach(callbackfn,foo) - if( result === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-6 +description: Array.prototype.forEach - thisArg is function +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var result; + function callbackfn(val, idx, obj) + { + result = this.res; + } + + function foo(){} + foo.res = true; + + var arr = [1]; + arr.forEach(callbackfn,foo) + if( result === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js index 47d7181d16..e1af473292 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js - * @description Array.prototype.forEach - built-in functions can be used as thisArg - */ - - -function testcase() { - - var result = false; - - function callbackfn(val, idx, obj) { - result = (this === eval); - } - - [11].forEach(callbackfn, eval); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-7 +description: Array.prototype.forEach - built-in functions can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + + function callbackfn(val, idx, obj) { + result = (this === eval); + } + + [11].forEach(callbackfn, eval); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js index b0d08bc3be..7d31754cba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js - * @description Array.prototype.forEach - Function Object can be used as thisArg - */ - - -function testcase() { - - var result = false; - var objString = function () { }; - - function callbackfn(val, idx, obj) { - result = (this === objString); - } - - [11].forEach(callbackfn, objString); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-5-9 +description: Array.prototype.forEach - Function Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var objString = function () { }; + + function callbackfn(val, idx, obj) { + result = (this === objString); + } + + [11].forEach(callbackfn, objString); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js index 18b48d1d60..bf3e1c0b36 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js - * @description Array.prototype.forEach doesn't consider new elements added to array after the call - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - arr[2] = 3; - arr[5] = 6; - } - - var arr = [1,2,,4,5]; - arr.forEach(callbackfn); - if( callCnt === 5) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-1 +description: > + Array.prototype.forEach doesn't consider new elements added to + array after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + arr[2] = 3; + arr[5] = 6; + } + + var arr = [1,2,,4,5]; + arr.forEach(callbackfn); + if( callCnt === 5) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js index 3363a21c62..a32e10dc69 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js - * @description Array.prototype.forEach doesn't visit deleted elements in array after the call - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - if(callCnt == 0) - delete arr[3]; - callCnt++; - } - - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn) - if( callCnt === 4) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-2 +description: > + Array.prototype.forEach doesn't visit deleted elements in array + after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + if(callCnt == 0) + delete arr[3]; + callCnt++; + } + + var arr = [1,2,3,4,5]; + arr.forEach(callbackfn) + if( callCnt === 4) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js index 9210b60e53..191384f0e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js - * @description Array.prototype.forEach doesn't visit deleted elements when Array.length is decreased - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - arr.length=3; - callCnt++; - } - - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn); - if( callCnt === 3) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-3 +description: > + Array.prototype.forEach doesn't visit deleted elements when + Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + arr.length=3; + callCnt++; + } + + var arr = [1,2,3,4,5]; + arr.forEach(callbackfn); + if( callCnt === 3) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js index 72b756f210..fdf8bf54b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js - * @description Array.prototype.forEach doesn't consider newly added elements in sparse array - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - arr[1000] = 3; - callCnt++; - } - - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; - arr.forEach(callbackfn); - if( callCnt === 2) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-4 +description: > + Array.prototype.forEach doesn't consider newly added elements in + sparse array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + arr[1000] = 3; + callCnt++; + } + + var arr = new Array(10); + arr[1] = 1; + arr[2] = 2; + arr.forEach(callbackfn); + if( callCnt === 2) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js index 0e503543b0..6b2ccff4cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js - * @description Array.prototype.forEach visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - delete arr[4]; - callCnt++; - } - - Array.prototype[4] = 5; - - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn) - delete Array.prototype[4]; - if( callCnt === 5) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-5 +description: > + Array.prototype.forEach visits deleted element in array after the + call when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + delete arr[4]; + callCnt++; + } + + Array.prototype[4] = 5; + + var arr = [1,2,3,4,5]; + arr.forEach(callbackfn) + delete Array.prototype[4]; + if( callCnt === 5) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js index c88e5c5373..5227627e1a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js - * @description Array.prototype.forEach - considers new value of elements in array after the call - */ - - -function testcase() { - - var result = false; - var arr = [1, 2, 3, 4, 5]; - - function callbackfn(val, Idx, obj) { - arr[4] = 6; - if (val >= 6) { - result = true; - } - } - - arr.forEach(callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-7 +description: > + Array.prototype.forEach - considers new value of elements in array + after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var arr = [1, 2, 3, 4, 5]; + + function callbackfn(val, Idx, obj) { + arr[4] = 6; + if (val >= 6) { + result = true; + } + } + + arr.forEach(callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js index 6cf913d41c..ce6ede0465 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js - * @description Array.prototype.forEach - no observable effects occur if len is 0 - */ - - -function testcase() { - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - } - - var obj = { 0: 11, 1: 12, length: 0 }; - - Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-8 +description: Array.prototype.forEach - no observable effects occur if len is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + } + + var obj = { 0: 11, 1: 12, length: 0 }; + + Array.prototype.forEach.call(obj, callbackfn); + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-9.js index b5d031328f..82f8cab3c6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-9.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-9.js - * @description Array.prototype.forEach - modifications to length don't change number of iterations - */ - - -function testcase() { - - var called = 0; - function callbackfn(val, idx, obj) { - called++; - } - - var obj = { 1: 12, 2: 9, length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - return 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-9 +description: > + Array.prototype.forEach - modifications to length don't change + number of iterations +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + function callbackfn(val, idx, obj) { + called++; + } + + var obj = { 1: 12, 2: 9, length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + obj.length = 3; + return 11; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + return 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js index 7e360a99e2..1b96d7ba4c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js - * @description Array.prototype.forEach - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - - var arr = new Array(10); - arr[1] = undefined; - arr.forEach(callbackfn); - if( callCnt === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-1 +description: > + Array.prototype.forEach - callbackfn not called for indexes never + been assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + } + + var arr = new Array(10); + arr[1] = undefined; + arr.forEach(callbackfn); + if( callCnt === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-10.js index 3a0266cf76..85c7e56f58 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-10.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-10.js - * @description Array.prototype.forEach - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } - - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - Array.prototype.forEach.call(obj, callbackfn); - return testResult && accessed; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-10 +description: > + Array.prototype.forEach - deleting property of prototype causes + prototype index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } + } + + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + Array.prototype.forEach.call(obj, callbackfn); + return testResult && accessed; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-11.js index 5e6b89e1cb..e2d2ddda7e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-11.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-11.js - * @description Array.prototype.forEach - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [0, , ]; - - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.forEach(callbackfn); - return testResult && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-11 +description: > + Array.prototype.forEach - deleting property of prototype causes + prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [0, , ]; + + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.forEach(callbackfn); + return testResult && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-12.js index e280b8cb65..9fa4168110 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-12.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-12.js - * @description Array.prototype.forEach - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var obj = { 0: 0, 1: 111, length: 10 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-12 +description: > + Array.prototype.forEach - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var obj = { 0: 0, 1: 111, length: 10 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + Array.prototype.forEach.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-13.js index a32bcdfd8c..83ad465eb1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-13.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-13.js - * @description Array.prototype.forEach - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - var arr = [0, 111]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.forEach(callbackfn); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-13 +description: > + Array.prototype.forEach - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + var arr = [0, 111]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.forEach(callbackfn); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-14.js index f0b1b12ec0..1a7e30647f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-14.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-14.js - * @description Array.prototype.forEach - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } - - var arr = [0, 1, 2, "last"]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-14 +description: > + Array.prototype.forEach - decreasing length of array causes index + property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } + } + + var arr = [0, 1, 2, "last"]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-15.js index 6de0982258..bf77bc0dd5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-15.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-15.js - * @description Array.prototype.forEach - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-15 +description: > + Array.prototype.forEach - decreasing length of array with + prototype property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + testResult = true; + } + } + var arr = [0, 1, 2]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-16.js index e0464b1dc2..326f947e8f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-16.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-16.js - * @description Array.prototype.forEach - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - testResult = true; - } - } - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-16 +description: > + Array.prototype.forEach - decreasing length of array does not + delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + testResult = true; + } + } + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js index 7cd1200060..25aa33e303 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js - * @description Array.prototype.forEach - added properties in step 2 are visible here - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - testResult = true; - } - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "length"; - return 3; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-2 +description: > + Array.prototype.forEach - added properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + testResult = true; + } + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + obj[2] = "length"; + return 3; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js index a6dcb51352..a9eba76759 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js - * @description Array.prototype.forEach - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 8) { - testResult = false; - } - } - var obj = { 2: 6.99, 8: 19 }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[8]; - return 10; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-3 +description: > + Array.prototype.forEach - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 8) { + testResult = false; + } + } + var obj = { 2: 6.99, 8: 19 }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[8]; + return 10; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-4.js index 146ca7ab57..28dc614d4e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-4.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-4.js - * @description Array.prototype.forEach - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-4 +description: > + Array.prototype.forEach - properties added into own object after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(obj, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-5.js index de690b5d5a..6ff64ef1c6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-5.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-5.js - * @description Array.prototype.forEach - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - arr.forEach(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-5 +description: > + Array.prototype.forEach - properties added into own object after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + arr.forEach(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-6.js index 47a05b1dec..10d5fc9394 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-6.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-6.js - * @description Array.prototype.forEach - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-6 +description: > + Array.prototype.forEach - properties can be added to prototype + after current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-7.js index 8836367bac..8b2739c53b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-7.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-7.js - * @description Array.prototype.forEach - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - arr.forEach(callbackfn); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-7 +description: > + Array.prototype.forEach - properties can be added to prototype + after current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + arr.forEach(callbackfn); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-8.js index 178c1f2abe..e0e0db510f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-8.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-8.js - * @description Array.prototype.forEach - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-8 +description: > + Array.prototype.forEach - deleting own property causes index + property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-9.js index 4e6d3d613f..c0f168824e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-9.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-9.js - * @description Array.prototype.forEach - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [1, 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - arr.forEach(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-b-9 +description: > + Array.prototype.forEach - deleting own property causes index + property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [1, 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + arr.forEach(callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js index 9c06e483dc..362135a0a6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js - * @description Array.prototype.forEach - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var kValue = { }; - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - testResult = (val === kValue); - } - } - - var obj = { 5: kValue, length: 100 }; - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-1 +description: > + Array.prototype.forEach - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = { }; + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + testResult = (val === kValue); + } + } + + var obj = { 5: kValue, length: 100 }; + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-10.js index e7548600fb..ed90d18604 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-10.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-10.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 2) { - testResult = (val === 12); - } - } - - var arr = []; - - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-10 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 2) { + testResult = (val === 12); + } + } + + var arr = []; + + Object.defineProperty(arr, "2", { + get: function () { + return 12; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-11.js index afea5de860..3219d9bfd3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-11.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-11.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - var proto = { 0: 5 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-11 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + var proto = { 0: 5 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-12.js index efdafa55f5..2d572ff134 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-12.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-12.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 111); - } - } - - var arr = []; - try { - Array.prototype[0] = 10; - - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-12 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 111); + } + } + + var arr = []; + try { + Array.prototype[0] = 10; + + Object.defineProperty(arr, "0", { + get: function () { + return 111; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-13.js index 46cbb325a7..423ea8844a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-13.js @@ -1,49 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-13.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 12); - } - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); - - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-13 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 12); + } + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 6; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "1", { + get: function () { + return 12; + }, + configurable: true + }); + + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-14.js index 773c09a7d1..ef2a2918ef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-14.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-14.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - var arr = []; - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-14 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + var arr = []; + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-15.js index 0d27c34037..7dce349d61 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-15.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-15.js - * @description Array.prototype.forEach - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 11); - } - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 20; - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-15 +description: > + Array.prototype.forEach - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 11); + } + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 20; + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-16.js index 5be24a005d..6008b1a8fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-16.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-16.js - * @description Array.prototype.forEach - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - [, , , ].forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-16 +description: > + Array.prototype.forEach - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + [, , , ].forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-17.js index 875a75e777..5c1abbb072 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-17.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-17.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-17 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-18.js index 6e1cdb5eeb..dc4484c8b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-18.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-18.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (typeof val === "undefined"); - } - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-18 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (typeof val === "undefined"); + } + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-19.js index d4ce754c0b..487eb97236 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-19.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-19.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - try { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 10; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-19 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + try { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 10; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js index 40e028c55f..5fa87a2715 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js - * @description Array.prototype.forEach - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - [11].forEach(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-2 +description: > + Array.prototype.forEach - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + [11].forEach(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-20.js index cc11fbf945..88609fc427 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-20.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-20.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (typeof val === "undefined"); - } - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 100; - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-20 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (typeof val === "undefined"); + } + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 100; + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-21.js index 43add6a0fc..c7b008007f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-21.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-21.js - * @description Array.prototype.forEach - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (typeof val === "undefined"); - } - } - - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-21 +description: > + Array.prototype.forEach - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (typeof val === "undefined"); + } + } + + var proto = {}; + Object.defineProperty(proto, "1", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-22.js index 646b9b4557..91255f1478 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-22.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-22.js - * @description Array.prototype.forEach - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (typeof val === "undefined"); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - - [, 1].forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-22 +description: > + Array.prototype.forEach - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (typeof val === "undefined"); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + + [, 1].forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-23.js index 6e2fbbdc9b..a5951d117f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-23.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-23.js - * @description Array.prototype.forEach - This object is an global object which contains index property - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 11; - fnGlobalObject().length = 1; - - Array.prototype.forEach.call(fnGlobalObject(), callbackfn); - - return testResult; - } finally { - delete fnGlobalObject()[0]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-23 +description: > + Array.prototype.forEach - This object is an global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 11; + fnGlobalObject().length = 1; + + Array.prototype.forEach.call(fnGlobalObject(), callbackfn); + + return testResult; + } finally { + delete fnGlobalObject()[0]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js index f95c5e9bd1..34cd739f1f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js - * @description Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - var func = function (a, b) { - return Array.prototype.forEach.call(arguments, callbackfn); - }; - - func(11); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-25 +description: > + Array.prototype.forEach - This object is the Arguments object + which implements its own property get method (number of arguments + is less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + var func = function (a, b) { + return Array.prototype.forEach.call(arguments, callbackfn); + }; + + func(11); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js index 879b7d481c..a1ca5010db 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js - * @description Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var called = 0; - var testResult = false; - - function callbackfn(val, idx, obj) { - called++; - if (called !== 1 && !testResult) { - return; - } - if (idx === 0) { - testResult = (val === 11); - } else if (idx === 1) { - testResult = (val === 9); - } else { - testResult = false; - } - } - - var func = function (a, b) { - Array.prototype.forEach.call(arguments, callbackfn); - }; - - func(11, 9); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-26 +description: > + Array.prototype.forEach - This object is the Arguments object + which implements its own property get method (number of arguments + equals number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var testResult = false; + + function callbackfn(val, idx, obj) { + called++; + if (called !== 1 && !testResult) { + return; + } + if (idx === 0) { + testResult = (val === 11); + } else if (idx === 1) { + testResult = (val === 9); + } else { + testResult = false; + } + } + + var func = function (a, b) { + Array.prototype.forEach.call(arguments, callbackfn); + }; + + func(11, 9); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js index 64bec297a0..49ee49bd86 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js - * @description Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var called = 0; - var testResult = false; - - function callbackfn(val, idx, obj) { - called++; - if (called !== 1 && !testResult) { - return; - } - if (idx === 0) { - testResult = (val === 11); - } else if (idx === 1) { - testResult = (val === 12); - } else if (idx === 2) { - testResult = (val === 9); - } else { - testResult = false; - } - } - - var func = function (a, b) { - return Array.prototype.forEach.call(arguments, callbackfn); - }; - - func(11, 12, 9); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-27 +description: > + Array.prototype.forEach - This object is the Arguments object + which implements its own property get method (number of arguments + is greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var testResult = false; + + function callbackfn(val, idx, obj) { + called++; + if (called !== 1 && !testResult) { + return; + } + if (idx === 0) { + testResult = (val === 11); + } else if (idx === 1) { + testResult = (val === 12); + } else if (idx === 2) { + testResult = (val === 9); + } else { + testResult = false; + } + } + + var func = function (a, b) { + return Array.prototype.forEach.call(arguments, callbackfn); + }; + + func(11, 12, 9); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-28.js index e1626e74f4..7cade7ea68 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-28.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-28.js - * @description Array.prototype.forEach - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - var preIterVisible = false; - var arr = []; - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 9); - } - } - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); - - arr.forEach(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-28 +description: > + Array.prototype.forEach - element changed by getter on previous + iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var arr = []; + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 9); + } + } + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true + }); + + arr.forEach(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-29.js index a3e241f0ec..e2559749c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-29.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-29.js - * @description Array.prototype.forEach - element changed by getter on previous iterations is observed on an Array-like object - */ - - -function testcase() { - - var preIterVisible = false; - var obj = { length: 2 }; - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 9); - } - } - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-29 +description: > + Array.prototype.forEach - element changed by getter on previous + iterations is observed on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var obj = { length: 2 }; + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 9); + } + } + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js index 74d590199e..f39a560222 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js - * @description Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - testResult = (val === kValue); - } - } - - var proto = { 5: 100 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[5] = kValue; - child.length = 10; - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-3 +description: > + Array.prototype.forEach - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + testResult = (val === kValue); + } + } + + var proto = { 5: 100 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[5] = kValue; + child.length = 10; + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-30.js index 65a0fa9173..9792a76b81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-30.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-30.js - * @description Array.prototype.forEach - unnhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } - - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); - - try { - Array.prototype.forEach.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-30 +description: > + Array.prototype.forEach - unnhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + } + + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + accessed = true; + return 100; + }, + configurable: true + }); + + try { + Array.prototype.forEach.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-31.js index e041ff16f8..05b5fe5078 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-31.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-31.js - * @description Array.prototype.forEach - unnhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } - - var arr = []; - arr[5] = 10; - arr[10] = 100; - - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); - - try { - arr.forEach(callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-31 +description: > + Array.prototype.forEach - unnhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + } + + var arr = []; + arr[5] = 10; + arr[10] = 100; + + Object.defineProperty(arr, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + accessed = true; + return 100; + }, + configurable: true + }); + + try { + arr.forEach(callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js index 4f8f016f94..23e1d5108e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js - * @description Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 12); - } - } - - try { - Array.prototype[0] = 11; - - [12].forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-4 +description: > + Array.prototype.forEach - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 12); + } + } + + try { + Array.prototype[0] = 11; + + [12].forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-5.js index 4f5962e3eb..4c94e16e1b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-5.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-5.js - * @description Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-5 +description: > + Array.prototype.forEach - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "0", { + value: 11, + configurable: true + }); + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-6.js index e0a2300c3b..0ef8cbcb6b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-6.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-6.js - * @description Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); - - [11].forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-6 +description: > + Array.prototype.forEach - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 9; + }, + configurable: true + }); + + [11].forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js index 3397b227ae..a9b0fa94b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js - * @description Array.prototype.forEach - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = 'abc'; - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - testResult = (val === kValue); - } - } - - var proto = { 5: kValue }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Array.prototype.forEach.call(child, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-7 +description: > + Array.prototype.forEach - element to be retrieved is inherited + data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = 'abc'; + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + testResult = (val === kValue); + } + } + + var proto = { 5: kValue }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Array.prototype.forEach.call(child, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js index 1b1d090528..75699a2b42 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js - * @description Array.prototype.forEach - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - testResult = (val === 13); - } - } - - try { - Array.prototype[1] = 13; - - [, , , ].forEach(callbackfn); - - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-8 +description: > + Array.prototype.forEach - element to be retrieved is inherited + data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 1) { + testResult = (val === 13); + } + } + + try { + Array.prototype[1] = 13; + + [, , , ].forEach(callbackfn); + + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-9.js index f2869ff6d6..f0e5d8d0c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-9.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-9.js - * @description Array.prototype.forEach - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - var obj = { 10: 10, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - Array.prototype.forEach.call(obj, callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-i-9 +description: > + Array.prototype.forEach - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + testResult = (val === 11); + } + } + + var obj = { 10: 10, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + Array.prototype.forEach.call(obj, callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js index 370b848b0b..f16ae070e6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js - * @description Array.prototype.forEach - callbackfn called with correct parameters - */ - - -function testcase() { - - var bPar = true; - var bCalled = false; - function callbackfn(val, idx, obj) - { - bCalled = true; - if(obj[idx] !== val) - bPar = false; - } - - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; - arr.forEach(callbackfn); - if(bCalled === true && bPar === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-1 +description: Array.prototype.forEach - callbackfn called with correct parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + + var bPar = true; + var bCalled = false; + function callbackfn(val, idx, obj) + { + bCalled = true; + if(obj[idx] !== val) + bPar = false; + } + + var arr = [0,1,true,null,new Object(),"five"]; + arr[999999] = -6.6; + arr.forEach(callbackfn); + if(bCalled === true && bPar === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js index 21613ef03d..03b9ec32f5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js - * @description Array.prototype.forEach - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(val) { - result = (val > 10); - } - - [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-10 +description: > + Array.prototype.forEach - callbackfn is called with 1 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val) { + result = (val > 10); + } + + [11].forEach(callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js index b162029095..27b622a3de 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js - * @description Array.prototype.forEach - callbackfn is called with 2 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx) { - result = (val > 10 && arguments[2][idx] === val); - } - - [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-11 +description: > + Array.prototype.forEach - callbackfn is called with 2 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx) { + result = (val > 10 && arguments[2][idx] === val); + } + + [11].forEach(callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js index bf20a006b5..70156fa99c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js - * @description Array.prototype.forEach - callbackfn is called with 3 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (val > 10 && obj[idx] === val); - } - - [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-12 +description: > + Array.prototype.forEach - callbackfn is called with 3 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (val > 10 && obj[idx] === val); + } + + [11].forEach(callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js index 8d0ae41957..6cf9c5d247 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js - * @description Array.prototype.forEach - callbackfn that uses arguments - */ - - -function testcase() { - - var result = false; - function callbackfn() { - result = (arguments[2][arguments[1]] === arguments[0]); - } - - [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-13 +description: Array.prototype.forEach - callbackfn that uses arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn() { + result = (arguments[2][arguments[1]] === arguments[0]); + } + + [11].forEach(callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js index d89d5a5a22..deda1c3d08 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js - * @description Array.prototype.forEach - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean) - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (this.valueOf() !== false); - } - - var obj = { 0: 11, length: 2 }; - - Array.prototype.forEach.call(obj, callbackfn, false); - return !result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-16 +description: > + Array.prototype.forEach - 'this' of 'callbackfn' is a Boolean + object when T is not an object (T is a boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (this.valueOf() !== false); + } + + var obj = { 0: 11, length: 2 }; + + Array.prototype.forEach.call(obj, callbackfn, false); + return !result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js index 35218a9fb2..e8c0861145 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js - * @description Array.prototype.forEach - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number) - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, o) { - result = (5 === this.valueOf()); - } - - var obj = { 0: 11, length: 2 }; - - Array.prototype.forEach.call(obj, callbackfn, 5); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-17 +description: > + Array.prototype.forEach - 'this' of 'callbackfn' is a Number + object when T is not an object (T is a number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, o) { + result = (5 === this.valueOf()); + } + + var obj = { 0: 11, length: 2 }; + + Array.prototype.forEach.call(obj, callbackfn, 5); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js index dc48561c77..638fb7c0f3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js - * @description Array.prototype.forEach - 'this' of 'callbackfn' is an String object when T is not an object (T is a string) - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = ('hello' === this.valueOf()); - } - - var obj = { 0: 11, length: 2 }; - - Array.prototype.forEach.call(obj, callbackfn, "hello"); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-18 +description: > + Array.prototype.forEach - 'this' of 'callbackfn' is an String + object when T is not an object (T is a string) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = ('hello' === this.valueOf()); + } + + var obj = { 0: 11, length: 2 }; + + Array.prototype.forEach.call(obj, callbackfn, "hello"); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js index 59a658afe6..f326393ae0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js - * @description Array.prototype.forEach - non-indexed properties are not called - */ - - -function testcase() { - - var accessed = false; - var result = true; - function callbackfn(val, idx, obj) { - accessed = true; - if (val === 8) { - result = false; - } - } - - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; - - Array.prototype.forEach.call(obj, callbackfn); - return result && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-19 +description: Array.prototype.forEach - non-indexed properties are not called +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var result = true; + function callbackfn(val, idx, obj) { + accessed = true; + if (val === 8) { + result = false; + } + } + + var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; + + Array.prototype.forEach.call(obj, callbackfn); + return result && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js index 301ad0d002..ad20fb40b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js - * @description Array.prototype.forEach - callbackfn takes 3 arguments - */ - - -function testcase() { - - var parCnt = 3; - var bCalled = false - function callbackfn(val, idx, obj) - { - bCalled = true; - if(arguments.length !== 3) - parCnt = arguments.length; //verify if callbackfn was called with 3 parameters - } - - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr.forEach(callbackfn); - if(bCalled === true && parCnt === 3) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-2 +description: Array.prototype.forEach - callbackfn takes 3 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var parCnt = 3; + var bCalled = false + function callbackfn(val, idx, obj) + { + bCalled = true; + if(arguments.length !== 3) + parCnt = arguments.length; //verify if callbackfn was called with 3 parameters + } + + var arr = [0,1,2,3,4,5,6,7,8,9]; + arr.forEach(callbackfn); + if(bCalled === true && parCnt === 3) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js index 176866e5a6..8232390582 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js - * @description Array.prototype.forEach - callbackfn called with correct parameters (thisArg is correct) - */ - - -function testcase() { - - var result = false; - function callbackfn(val, idx, obj) { - result = (10 === this.threshold); - } - - var thisArg = { threshold: 10 }; - - var obj = { 0: 11, length: 1 }; - - Array.prototype.forEach.call(obj, callbackfn, thisArg); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-20 +description: > + Array.prototype.forEach - callbackfn called with correct + parameters (thisArg is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(val, idx, obj) { + result = (10 === this.threshold); + } + + var thisArg = { threshold: 10 }; + + var obj = { 0: 11, length: 1 }; + + Array.prototype.forEach.call(obj, callbackfn, thisArg); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js index aa5432b354..7cad3353d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js - * @description Array.prototype.forEach - callbackfn called with correct parameters (kValue is correct) - */ - - -function testcase() { - - var resultOne = false; - var resultTwo = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - resultOne = (val === 11); - } - - if (idx === 1) { - resultTwo = (val === 12); - } - - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - Array.prototype.forEach.call(obj, callbackfn); - return resultOne && resultTwo; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-21 +description: > + Array.prototype.forEach - callbackfn called with correct + parameters (kValue is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var resultOne = false; + var resultTwo = false; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + resultOne = (val === 11); + } + + if (idx === 1) { + resultTwo = (val === 12); + } + + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + Array.prototype.forEach.call(obj, callbackfn); + return resultOne && resultTwo; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js index fa09807fda..33ec8d1e7a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js - * @description Array.prototype.forEach - callbackfn called with correct parameters (the index k is correct) - */ - - -function testcase() { - - var resultOne = false; - var resultTwo = false; - - function callbackfn(val, idx, obj) { - if (val === 11) { - resultOne = (idx === 0); - } - - if (val === 12) { - resultTwo = (idx === 1); - } - - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - Array.prototype.forEach.call(obj, callbackfn); - return resultOne && resultTwo; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-22 +description: > + Array.prototype.forEach - callbackfn called with correct + parameters (the index k is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var resultOne = false; + var resultTwo = false; + + function callbackfn(val, idx, obj) { + if (val === 11) { + resultOne = (idx === 0); + } + + if (val === 12) { + resultTwo = (idx === 1); + } + + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + Array.prototype.forEach.call(obj, callbackfn); + return resultOne && resultTwo; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js index d4efb25f3d..3d9b654411 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js - * @description Array.prototype.forEach - callbackfn called with correct parameters (this object O is correct) - */ - - -function testcase() { - - var result = false; - var obj = { 0: 11, length: 2 }; - - function callbackfn(val, idx, o) { - result = (obj === o); - } - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-23 +description: > + Array.prototype.forEach - callbackfn called with correct + parameters (this object O is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var obj = { 0: 11, length: 2 }; + + function callbackfn(val, idx, o) { + result = (obj === o); + } + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js index 2937acc1ad..accd571490 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js - * @description Array.prototype.forEach - k values are passed in ascending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - var result = true; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx++; - } - } - - arr.forEach(callbackfn); - return result && arr.length === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-4 +description: > + Array.prototype.forEach - k values are passed in ascending numeric + order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4, 5]; + var lastIdx = 0; + var called = 0; + var result = true; + function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx++; + } + } + + arr.forEach(callbackfn); + return result && arr.length === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js index 005df5350c..3a9a2803c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js - * @description Array.prototype.forEach - k values are accessed during each iteration and not prior to starting the loop on an Array - */ - - -function testcase() { - - var result = true; - var kIndex = []; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - result = false; - } - kIndex[idx] = 1; - } else { - result = false; - } - } - - [11, 12, 13, 14].forEach(callbackfn, undefined); - - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-5 +description: > + Array.prototype.forEach - k values are accessed during each + iteration and not prior to starting the loop on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + var kIndex = []; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + result = false; + } + kIndex[idx] = 1; + } else { + result = false; + } + } + + [11, 12, 13, 14].forEach(callbackfn, undefined); + + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js index aaa79032fc..ebaf548548 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js - * @description Array.prototype.forEach - arguments to callbackfn are self consistent - */ - - -function testcase() { - - var result = false; - var obj = { 0: 11, length: 1 }; - var thisArg = {}; - - function callbackfn() { - result = (this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj); - } - - Array.prototype.forEach.call(obj, callbackfn, thisArg); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-6 +description: > + Array.prototype.forEach - arguments to callbackfn are self + consistent +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var obj = { 0: 11, length: 1 }; + var thisArg = {}; + + function callbackfn() { + result = (this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj); + } + + Array.prototype.forEach.call(obj, callbackfn, thisArg); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js index e916f666c6..0b35659e14 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js - * @description Array.prototype.forEach - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - } - - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; - - try { - Array.prototype.forEach.call(obj, callbackfn); - return false; - } catch (ex) { - return ex instanceof Error && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-7 +description: > + Array.prototype.forEach - unhandled exceptions happened in + callbackfn terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } + } + + var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; + + try { + Array.prototype.forEach.call(obj, callbackfn); + return false; + } catch (ex) { + return ex instanceof Error && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js index 34bc9ea237..2effd91081 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js - * @description Array.prototype.forEach - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - var result = false; - var obj = { 0: 11, 1: 12, length: 2 }; - - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - - if (idx === 1) { - result = (val === 8); - } - } - - Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-8 +description: > + Array.prototype.forEach - element changed by callbackfn on + previous iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + var obj = { 0: 11, 1: 12, length: 2 }; + + function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + + if (idx === 1) { + result = (val === 8); + } + } + + Array.prototype.forEach.call(obj, callbackfn); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js index 29913da33f..0445ffc0ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js - * @description Array.prototype.forEach - callbackfn is called with 0 formal parameter - */ - - -function testcase() { - - var called = 0; - function callbackfn() { - called++; - } - - [11, 12].forEach(callbackfn); - return 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-7-c-ii-9 +description: > + Array.prototype.forEach - callbackfn is called with 0 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + function callbackfn() { + called++; + } + + [11, 12].forEach(callbackfn); + return 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js index 53a6663f11..fd81468b2b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (empty array) - */ - - -function testcase() { - var callCnt = 0; - function cb(){callCnt++} - var i = [].forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-1 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + var callCnt = 0; + function cb(){callCnt++} + var i = [].forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js index be63e955cd..9dbc4fcaa5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js - * @description Array.prototype.forEach - subclassed array when length is reduced - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 1; - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-10 +description: Array.prototype.forEach - subclassed array when length is reduced +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 1; + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js index 5e43d48cd5..06934dfc37 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js - * @description Array.prototype.forEach doesn't mutate the array on which it is called on - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.forEach(callbackfn); - if(arr[0] === 1 && - arr[1] === 2 && - arr[2] === 3 && - arr[3] === 4 && - arr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-11 +description: > + Array.prototype.forEach doesn't mutate the array on which it is + called on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return true; + } + var arr = [1,2,3,4,5]; + arr.forEach(callbackfn); + if(arr[0] === 1 && + arr[1] === 2 && + arr[2] === 3 && + arr[3] === 4 && + arr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js index bb8620a3e8..4eaa6d5469 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js - * @description Array.prototype.forEach doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - var arr = [1,2,3,4,5]; - arr["i"] = 10; - arr[true] = 11; - - arr.forEach(callbackfn); - if(callCnt == 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-12 +description: Array.prototype.forEach doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + } + var arr = [1,2,3,4,5]; + arr["i"] = 10; + arr[true] = 11; + + arr.forEach(callbackfn); + if(callCnt == 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-13.js index 649e2acac7..2422f20548 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-13.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-13.js - * @description Array.prototype.forEach - undefined will be returned when 'len' is 0 - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - } - - var result = [].forEach(callbackfn); - return typeof result === "undefined" && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-13 +description: > + Array.prototype.forEach - undefined will be returned when 'len' is + 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + } + + var result = [].forEach(callbackfn); + return typeof result === "undefined" && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js index c0c9e2375e..d4b7ad70ca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-2 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js index 7858b392ea..5be53fa04a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-3 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js index 6b7fcf2dc7..9f21b4b7d3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-4 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden to 0 (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js index 09d29fe893..b563974391 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-5 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js index 2177459b93..272507a31f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-6 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js index 3259b15abd..b103cc54e6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-7 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden with obj w/o valueOf + (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js index fe25b5c168..de52a58d3c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with [] - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-8 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden with [] +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js index 5b6cffec50..5c6eab6df6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js - * @description Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with [0] - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = [0]; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - var callCnt = 0; - function cb(){callCnt++} - var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.18-8-9 +description: > + Array.prototype.forEach doesn't call callbackfn if 'length' is 0 + (subclassed Array, length overridden with [0] +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = [0]; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + var callCnt = 0; + function cb(){callCnt++} + var i = f.forEach(cb); + if (callCnt === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A1.js index f7c6db33ad..7f63bc158e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A1.js @@ -1,12 +1,10 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * array.forEach can be frozen while in progress - * - * @path ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A1.js - * @description Freezes array.forEach during a forEach to see if it works - */ +/*--- +info: array.forEach can be frozen while in progress +es5id: 15.4.4.18_A1 +description: Freezes array.forEach during a forEach to see if it works +---*/ ['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); }); - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A2.js index bc45d19ab9..2660db23cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A2.js @@ -1,15 +1,13 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * array.forEach can be frozen while in progress - * - * @path ch15/15.4/15.4.4/15.4.4.18/S15.4.4.18_A2.js - * @description Freezes array.forEach during a forEach to see if it works - */ +/*--- +info: array.forEach can be frozen while in progress +es5id: 15.4.4.18_A2 +description: Freezes array.forEach during a forEach to see if it works +---*/ function foo() { ['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); }); } foo(); - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js index 5086ee9e74..d92a5b7a23 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js - * @description Array.prototype.map must exist as a function - */ - - -function testcase() { - var f = Array.prototype.map; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-0-1 +description: Array.prototype.map must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.map; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js index 1a8db88714..3fb1597f42 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js - * @description Array.prototype.map.length must be 1 - */ - - -function testcase() { - if (Array.prototype.map.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-0-2 +description: Array.prototype.map.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.map.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js index 8d5e99473d..ca22d2f571 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js - * @description Array.prototype.map - applied to undefined - */ - - -function testcase() { - try { - Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-1 +description: Array.prototype.map - applied to undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js index a94fdb553d..4d863ab17a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js - * @description Array.prototype.map - applied to the Math object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return ('[object Math]' === Object.prototype.toString.call(obj)); - } - - try { - Math.length = 1; - Math[0] = 1; - var testResult = Array.prototype.map.call(Math, callbackfn); - return testResult[0] === true; - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-10 +description: Array.prototype.map - applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return ('[object Math]' === Object.prototype.toString.call(obj)); + } + + try { + Math.length = 1; + Math[0] = 1; + var testResult = Array.prototype.map.call(Math, callbackfn); + return testResult[0] === true; + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js index 0d8c50c8ca..3cc8353a4a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js - * @description Array.prototype.map - applied to Date object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Date; - } - - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-11 +description: Array.prototype.map - applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Date; + } + + var obj = new Date(); + obj.length = 1; + obj[0] = 1; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js index 3f100dcfe0..b2964fc20d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js - * @description Array.prototype.map - applied to RegExp object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof RegExp; - } - - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-12 +description: Array.prototype.map - applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof RegExp; + } + + var obj = new RegExp(); + obj.length = 1; + obj[0] = 1; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js index 33b5dfb0bd..271e85a91a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js - * @description Array.prototype.map - applied to the JSON object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return ('[object JSON]' === Object.prototype.toString.call(obj)); - } - - try { - JSON.length = 1; - JSON[0] = 1; - var testResult = Array.prototype.map.call(JSON, callbackfn); - return testResult[0] === true; - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-13 +description: Array.prototype.map - applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return ('[object JSON]' === Object.prototype.toString.call(obj)); + } + + try { + JSON.length = 1; + JSON[0] = 1; + var testResult = Array.prototype.map.call(JSON, callbackfn); + return testResult[0] === true; + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js index f195f03001..7856355dbc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js - * @description Array.prototype.map - applied to Error object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Error; - } - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-14 +description: Array.prototype.map - applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Error; + } + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js index b15213fb47..073349bb17 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js - * @description Array.prototype.map - applied to the Arguments object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return ('[object Arguments]' === Object.prototype.toString.call(obj)); - } - - var obj = (function () { - return arguments; - }("a", "b")); - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-15 +description: Array.prototype.map - applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return ('[object Arguments]' === Object.prototype.toString.call(obj)); + } + + var obj = (function () { + return arguments; + }("a", "b")); + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js index dd45552942..7f9b610e73 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js - * @description Array.prototype.map - applied to null - */ - - -function testcase() { - try { - Array.prototype.map.call(null); // TypeError is thrown if value is null - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-2 +description: Array.prototype.map - applied to null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.map.call(null); // TypeError is thrown if value is null + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js index 0a9e6aee32..2142e0a244 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js - * @description Array.prototype.map - applied to boolean primitive - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; - - var testResult = Array.prototype.map.call(false, callbackfn); - return testResult[0] === true; - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-3 +description: Array.prototype.map - applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = true; + Boolean.prototype.length = 1; + + var testResult = Array.prototype.map.call(false, callbackfn); + return testResult[0] === true; + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js index 880a1b3f1d..51f95d58ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js - * @description Array.prototype.map - applied to Boolean object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-4 +description: Array.prototype.map - applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Boolean; + } + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js index 32d4fc48ba..f213f599d4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js - * @description Array.prototype.map - applied to number primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } - - try { - Number.prototype[0] = 1; - Number.prototype.length = 1; - - var testResult = Array.prototype.map.call(2.5, callbackfn); - return testResult[0] === true; - } finally { - delete Number.prototype[0]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-5 +description: Array.prototype.map - applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Number; + } + + try { + Number.prototype[0] = 1; + Number.prototype.length = 1; + + var testResult = Array.prototype.map.call(2.5, callbackfn); + return testResult[0] === true; + } finally { + delete Number.prototype[0]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js index 727d6ac538..6b75a0d8c8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js - * @description Array.prototype.map - applied to Number object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-6 +description: Array.prototype.map - applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Number; + } + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js index cb7a6289ab..54eaa7bc61 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js - * @description Array.prototype.map - applied to string primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof String; - } - - var testResult = Array.prototype.map.call("abc", callbackfn); - - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-7 +description: Array.prototype.map - applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof String; + } + + var testResult = Array.prototype.map.call("abc", callbackfn); + + return testResult[0] === true && testResult[1] === true && testResult[2] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js index d9582dac82..a781f22995 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js - * @description Array.prototype.map - applied to String object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof String; - } - - var obj = new String("abc"); - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-8 +description: Array.prototype.map - applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof String; + } + + var obj = new String("abc"); + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true && testResult[2] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js index 382eeb9106..4abb3c3490 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js - * @description Array.prototype.map - applied to Function object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Function; - } - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-1-9 +description: Array.prototype.map - applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Function; + } + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js index db8ffe25f6..b59542b9d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js - * @description Array.prototype.map - applied to Array-like object when 'length' is an own data property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-1 +description: > + Array.prototype.map - applied to Array-like object when 'length' + is an own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 + }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js index 22db2211c0..5d856a7f85 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js - * @description Array.prototype.map - applied to Array-like object, 'length' is an inherited accessor property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-10 +description: > + Array.prototype.map - applied to Array-like object, 'length' is an + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js index df8573a35d..0135a82ac0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js - * @description Array.prototype.map - applied to Array-like object when 'length' is an own accessor property without a get function - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return 0 === testResult.length; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-11 +description: > + Array.prototype.map - applied to Array-like object when 'length' + is an own accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { + 0: 11, + 1: 12 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return 0 === testResult.length; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js index 56c3570692..45ba5fc12b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js - * @description Array.prototype.map - applied to the Array-like object when 'length' is own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-12 +description: > + Array.prototype.map - applied to the Array-like object when + 'length' is own accessor property without a get function that + overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 12, 1: 11 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 0; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js index d9389bf6b4..f149ec627b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js - * @description Array.prototype.map - applied to the Array-like object when 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 11; - child[1] = 12; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return 0 === testResult.length; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-13 +description: > + Array.prototype.map - applied to the Array-like object when + 'length' is inherited accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 11; + child[1] = 12; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return 0 === testResult.length; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js index 76bf3e2531..2200453482 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js - * @description Array.prototype.map - applied to the Array-like object that 'length' property doesn't exist - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 11, 1: 12 }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return 0 === testResult.length; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-14 +description: > + Array.prototype.map - applied to the Array-like object that + 'length' property doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 11, 1: 12 }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return 0 === testResult.length; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js index c4a3c39c71..5b03fef9cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js @@ -1,32 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js - * @description Array.prototype.map - when 'length' is property of the global object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; - var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn); - return testResult.length === 2; - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-15 +description: > + Array.prototype.map - when 'length' is property of the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 12; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 9; + fnGlobalObject().length = 2; + var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn); + return testResult.length === 2; + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js index f9fe52b753..c0ec135f83 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js - * @description Array.prototype.map - applied to Arguments object, which implements its own property get method - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; - - var testResult = func(12, 11); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-17 +description: > + Array.prototype.map - applied to Arguments object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var func = function (a, b) { + return Array.prototype.map.call(arguments, callbackfn); + }; + + var testResult = func(12, 11); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js index d9aa220b24..6ac3de46a7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js - * @description Array.prototype.map - applied to String object, which implements its own property get method - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return parseInt(val, 10) > 1; - } - - var str = new String("432"); - try { - String.prototype[3] = "1"; - var testResult = Array.prototype.map.call(str, callbackfn); - - return 3 === testResult.length; - } finally { - delete String.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-18 +description: > + Array.prototype.map - applied to String object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return parseInt(val, 10) > 1; + } + + var str = new String("432"); + try { + String.prototype[3] = "1"; + var testResult = Array.prototype.map.call(str, callbackfn); + + return 3 === testResult.length; + } finally { + delete String.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js index 91a99f37a9..9d91b0d83e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js - * @description Array.prototype.map - applied to Function object, which implements its own property get method - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; - - var testResult = Array.prototype.map.call(fun, callbackfn); - - return 2 === testResult.length; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-19 +description: > + Array.prototype.map - applied to Function object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var fun = function (a, b) { + return a + b; + }; + fun[0] = 12; + fun[1] = 11; + fun[2] = 9; + + var testResult = Array.prototype.map.call(fun, callbackfn); + + return 2 === testResult.length; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js index d0098f814a..10819ec55d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js - * @description Array.prototype.map - when 'length' is own data property on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var testResult = [12, 11].map(callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-2 +description: > + Array.prototype.map - when 'length' is own data property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var testResult = [12, 11].map(callbackfn); + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js index 77a92c38dc..9745f144f1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js - * @description Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited data property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-3 +description: > + Array.prototype.map - applied to Array-like object, 'length' is an + own data property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js index 869d93f20a..536df71d8d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js - * @description Array.prototype.map - when 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - var arrProtoLen; - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - var testResult = [12, 11].map(callbackfn); - return testResult.length === 2; - } finally { - Array.prototype.length = arrProtoLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-4 +description: > + Array.prototype.map - when 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + var arrProtoLen; + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + var testResult = [12, 11].map(callbackfn); + return testResult.length === 2; + } finally { + Array.prototype.length = arrProtoLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js index a5663a4b48..f24b5febc1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js - * @description Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-5 +description: > + Array.prototype.map - applied to Array-like object, 'length' is an + own data property that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js index 0178c75207..d436d6ebd5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js - * @description Array.prototype.map - applied to Array-like object, 'length' is an inherited data property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = { length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-6 +description: > + Array.prototype.map - applied to Array-like object, 'length' is an + inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = { length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js index 49376c0580..6e80efcd60 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js - * @description Array.prototype.map - applied to Array-like object, 'length' is an own accessor property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-7 +description: > + Array.prototype.map - applied to Array-like object, 'length' is an + own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + obj[0] = 12; + obj[1] = 11; + obj[2] = 9; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js index 1186f45ecd..5ebbbc5111 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js - * @description Array.prototype.map - applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-8 +description: > + Array.prototype.map - applied to Array-like object, 'length' is an + own accessor property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js index 9f5fc15628..9f7c6f01c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js - * @description Array.prototype.map - applied to Array-like object when 'length' is an own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-2-9 +description: > + Array.prototype.map - applied to Array-like object when 'length' + is an own accessor property that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js index 0d33e85676..82632a5ada 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js - * @description Array.prototype.map - value of 'length' is undefined - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { length: undefined }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-1 +description: Array.prototype.map - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { length: undefined }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js index 3ab5218262..2e16a2835c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js - * @description Array.prototype.map - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 9, length: NaN }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-10 +description: Array.prototype.map - value of 'length' is a number (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 9, length: NaN }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js index 6a43b1a4b3..625277db03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js - * @description Array.prototype.map - 'length' is a string containing a positive number - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 11, 1: 9, 2: 12, length: "2" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-11 +description: > + Array.prototype.map - 'length' is a string containing a positive + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 11, 1: 9, 2: 12, length: "2" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js index bc8a8bd607..e689cb64c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js - * @description Array.prototype.map - 'length' is a string containing a negative number - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 11, 1: 9, 2: 12, length: "-4294967294" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-12 +description: > + Array.prototype.map - 'length' is a string containing a negative + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 11, 1: 9, 2: 12, length: "-4294967294" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js index 6d6dd45167..a7449dcfa3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js - * @description Array.prototype.map - value of 'length' is string that is able to convert to number primitive (value is a decimal number) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 11, 1: 9, 2: 12, length: "2.5" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-13 +description: > + Array.prototype.map - value of 'length' is string that is able to + convert to number primitive (value is a decimal number) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 11, 1: 9, 2: 12, length: "2.5" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js index 12ab69187b..86fe75c6f3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js - * @description Array.prototype.map - 'length' is a string containing Infinity - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 9, length: "Infinity" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-14 +description: Array.prototype.map - 'length' is a string containing Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 9, length: "Infinity" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js index 53ed04cbc5..9891296611 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js - * @description Array.prototype.map - 'length' is a string containing an exponential number - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 11, 1: 9, 2: 12, length: "2E0" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-15 +description: > + Array.prototype.map - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 11, 1: 9, 2: 12, length: "2E0" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js index c02d8a271a..b81dcf26f8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js - * @description Array.prototype.map - 'length' is a string containing a hex number - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 11, 1: 9, 2: 12, length: "0x0002" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-16 +description: Array.prototype.map - 'length' is a string containing a hex number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 11, 1: 9, 2: 12, length: "0x0002" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js index b594f2c034..8eb399fa41 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js - * @description Array.prototype.map - when 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 11, 1: 9, 2: 12, length: "0002.00" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-17 +description: > + Array.prototype.map - when 'length' is a string containing a + number with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 11, 1: 9, 2: 12, length: "0002.00" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js index 19878a1e3c..68a75248bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js - * @description Array.prototype.map - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { length: "asdf!_" }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-18 +description: > + Array.prototype.map - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { length: "asdf!_" }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js index 7804d0442f..dda06d6ec5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js - * @description Array.prototype.map - value of 'length' is an Object which has an own toString method - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { - 0: 11, - 1: 9, - - length: { - toString: function () { - return '2'; - } - } - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-19 +description: > + Array.prototype.map - value of 'length' is an Object which has an + own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { + 0: 11, + 1: 9, + + length: { + toString: function () { + return '2'; + } + } + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js index 9404212884..62f53a0929 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js - * @description Array.prototype.map on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 11, length: true }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-2 +description: > + Array.prototype.map on an Array-like object if 'length' is 1 + (length overridden to true(type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 11, length: true }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js index 62fa55bccf..db416d9ad4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js - * @description Array.prototype.map - value of 'length' is an Object which has an own valueOf method - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { - 0: 11, - 1: 9, - - length: { - valueOf: function () { - return 2; - } - } - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-20 +description: > + Array.prototype.map - value of 'length' is an Object which has an + own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { + 0: 11, + 1: 9, + + length: { + valueOf: function () { + return 2; + } + } + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js index 9af6c7cd86..5552033f4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js - * @description Array.prototype.map - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val < 10; - } - - var firstStepOccured = false; - var secondStepOccured = false; - var obj = { - 0: 11, - 1: 9, - - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return '2'; - } - } - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2 && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-21 +description: > + Array.prototype.map - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val < 10; + } + + var firstStepOccured = false; + var secondStepOccured = false; + var obj = { + 0: 11, + 1: 9, + + length: { + valueOf: function () { + firstStepOccured = true; + return {}; + }, + toString: function () { + secondStepOccured = true; + return '2'; + } + } + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2 && firstStepOccured && secondStepOccured; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js index a424277712..488d0e7fea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js - * @description Array.prototype.map throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { - 1: 11, - 2: 12, - - length: { - valueOf: function () { - return {}; - }, - toString: function () { - return {}; - } - } - }; - - try { - Array.prototype.map.call(obj, callbackfn); - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-22 +description: > + Array.prototype.map throws TypeError exception when 'length' is an + object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { + 1: 11, + 2: 12, + + length: { + valueOf: function () { + return {}; + }, + toString: function () { + return {}; + } + } + }; + + try { + Array.prototype.map.call(obj, callbackfn); + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js index d0a6529cd6..c715f02458 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js - * @description Array.prototype.map uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val < 10; - } - - var valueOfAccessed = false; - var toStringAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 0: 11, - 1: 9, - length: child - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-23 +description: > + Array.prototype.map uses inherited valueOf method when 'length' is + an object with an own toString and inherited valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val < 10; + } + + var valueOfAccessed = false; + var toStringAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 0: 11, + 1: 9, + length: child + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js index e74dfc4170..779d480f2f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js - * @description Array.prototype.map - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { - 0: 11, - 1: 9, - length: 2.685 - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-24 +description: > + Array.prototype.map - value of 'length' is a positive non-integer, + ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { + 0: 11, + 1: 9, + length: 2.685 + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js index fb8650562d..56ee74f0f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js - * @description Array.prototype.map - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { - 0: 11, - 1: 9, - length: -4294967294.5 - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-25 +description: > + Array.prototype.map - value of 'length' is a negative non-integer, + ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { + 0: 11, + 1: 9, + length: -4294967294.5 + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js index 6ec1c9b0cd..a0e4121b47 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js - * @description Array.prototype.map - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-28 +description: Array.prototype.map - value of 'length' is boundary value (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js index 17cc5ec778..235cb8068a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js - * @description Array.prototype.map - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-29 +description: > + Array.prototype.map - value of 'length' is boundary value (2^32 + + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { + 0: 11, + 1: 9, + length: 4294967297 + }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + return newArr.length === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js index 21eaf9a205..7e059c3b3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js - * @description Array.prototype.map - value of 'length' is a number (value is 0) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 11, length: 0 }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-3 +description: Array.prototype.map - value of 'length' is a number (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 11, length: 0 }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js index ddcaa5e8a2..166e104689 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js - * @description Array.prototype.map - value of 'length' is a number (value is +0) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 11, length: +0 }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-4 +description: Array.prototype.map - value of 'length' is a number (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 11, length: +0 }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js index df448ed924..0c508f36b0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js - * @description Array.prototype.map - value of 'length' is a number (value is -0) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 11, length: -0 }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-5 +description: Array.prototype.map - value of 'length' is a number (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 11, length: -0 }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js index 350f8271a0..eac2b6711a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js - * @description Array.prototype.map - 'length' is a string containing a positive number - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 10, 1: 12, 2: 9, length: 2 }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-6 +description: > + Array.prototype.map - 'length' is a string containing a positive + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 10, 1: 12, 2: 9, length: 2 }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js index 2088b90cc0..c74b39246e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js - * @description Array.prototype.map - 'length' is a string containing a negative number - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 10, 1: 12, 2: 9, length: -4294967294 }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-7 +description: > + Array.prototype.map - 'length' is a string containing a negative + number +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 10, 1: 12, 2: 9, length: -4294967294 }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js index 7c6fc4cfaa..0c419594ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js - * @description Array.prototype.map - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 9, length: Infinity }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-8 +description: > + Array.prototype.map - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 9, length: Infinity }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js index 7b3257ed06..e9d935696b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js - * @description Array.prototype.map - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 10; - } - - var obj = { 0: 9, length: -Infinity }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-3-9 +description: > + Array.prototype.map - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 10; + } + + var obj = { 0: 9, length: -Infinity }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js index 148503eb66..0eb5824d5c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js - * @description Array.prototype.map throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-1 +description: Array.prototype.map throws TypeError if callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js index 9fb309af32..50b7b53059 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js - * @description Array.prototype.map - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.map.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-10 +description: > + Array.prototype.map - the exception is not thrown if exception was + thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.map.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js index 539ca88f6f..5660625f3e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js - * @description Array.prototype.map - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.map.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-11 +description: > + Array.prototype.map - the exception is not thrown if exception was + thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.map.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js index 91b6d20f07..c95019e1ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js - * @description Array.prototype.map - 'callbackfn' is a function - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var testResult = [11, 9].map(callbackfn); - return testResult.length === 2 && testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-12 +description: Array.prototype.map - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var testResult = [11, 9].map(callbackfn); + return testResult.length === 2 && testResult[0] === true && testResult[1] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js index 55d5d62d64..f08b72bce3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js - * @description Array.prototype.map - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.map.call(obj); - return false; - } catch (e) { - return e instanceof TypeError && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-15 +description: > + Array.prototype.map - calling with no callbackfn is the same as + passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 10: 10 }; + var lengthAccessed = false; + var loopAccessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.map.call(obj); + return false; + } catch (e) { + return e instanceof TypeError && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js index bfddbb4cef..4d70a8799f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js - * @description Array.prototype.map throws ReferenceError if callbackfn is unreferenced - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map(foo); - } - catch(e) { - if(e instanceof ReferenceError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-2 +description: > + Array.prototype.map throws ReferenceError if callbackfn is + unreferenced +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map(foo); + } + catch(e) { + if(e instanceof ReferenceError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js index 05dfe0f0e6..0553ccc80f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js - * @description Array.prototype.map throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-3 +description: Array.prototype.map throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js index 3427562035..09e535c174 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js - * @description Array.prototype.map throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-4 +description: Array.prototype.map throws TypeError if callbackfn is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js index aca5ee86de..3c3f3d2b81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js - * @description Array.prototype.map throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-5 +description: Array.prototype.map throws TypeError if callbackfn is number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js index a5867eb1f3..5b0089b706 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js - * @description Array.prototype.map throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-6 +description: Array.prototype.map throws TypeError if callbackfn is string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js index ce7b92ead7..02af1d877e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js - * @description Array.prototype.map throws TypeError if callbackfn is Object without Call internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.map(new Object()); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-7 +description: > + Array.prototype.map throws TypeError if callbackfn is Object + without Call internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.map(new Object()); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js index e0d48d431a..12f1297fd3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js - * @description Array.prototype.map - Side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.map.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-8 +description: > + Array.prototype.map - Side effects produced by step 2 are visible + when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.map.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js index 4045a508e1..75c5b1c025 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js - * @description Array.prototype.map - Side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.map.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-4-9 +description: > + Array.prototype.map - Side effects produced by step 3 are visible + when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.map.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1-s.js index ff305673ec..ad5d7d1822 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1-s.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1-s.js - * @description Array.prototype.map - thisArg not passed to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - - [1].map(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-1-s +description: Array.prototype.map - thisArg not passed to strict callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + + function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + + [1].map(callbackfn); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js index fa027e13b2..48e1cac402 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js - * @description Array.prototype.map - thisArg not passed - */ - - -function testcase() { - try { - fnGlobalObject()._15_4_4_19_5_1 = true; - var _15_4_4_19_5_1 = false; - - function callbackfn(val, idx, obj) { - return this._15_4_4_19_5_1; - } - var srcArr = [1]; - var resArr = srcArr.map(callbackfn); - if( resArr[0] === true) - return true; - - return false; - } - finally { - delete fnGlobalObject()._15_4_4_19_5_1; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-1 +description: Array.prototype.map - thisArg not passed +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + try { + fnGlobalObject()._15_4_4_19_5_1 = true; + var _15_4_4_19_5_1 = false; + + function callbackfn(val, idx, obj) { + return this._15_4_4_19_5_1; + } + var srcArr = [1]; + var resArr = srcArr.map(callbackfn); + if( resArr[0] === true) + return true; + + return false; + } + finally { + delete fnGlobalObject()._15_4_4_19_5_1; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js index bb8fe0e19b..82260927c5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js - * @description Array.prototype.map - Array object can be used as thisArg - */ - - -function testcase() { - - var objArray = new Array(2); - - function callbackfn(val, idx, obj) { - return this === objArray; - } - - var testResult = [11].map(callbackfn, objArray); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-10 +description: Array.prototype.map - Array object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objArray = new Array(2); + + function callbackfn(val, idx, obj) { + return this === objArray; + } + + var testResult = [11].map(callbackfn, objArray); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js index fd09a32f5f..46664d663e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js - * @description Array.prototype.map - String object can be used as thisArg - */ - - -function testcase() { - - var objString = new String(); - - function callbackfn(val, idx, obj) { - return this === objString; - } - - var testResult = [11].map(callbackfn, objString); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-11 +description: Array.prototype.map - String object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objString = new String(); + + function callbackfn(val, idx, obj) { + return this === objString; + } + + var testResult = [11].map(callbackfn, objString); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js index e2ec294c38..15f2d526b6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js - * @description Array.prototype.map - Boolean object can be used as thisArg - */ - - -function testcase() { - - var objBoolean = new Boolean(); - - function callbackfn(val, idx, obj) { - return this === objBoolean; - } - - var testResult = [11].map(callbackfn, objBoolean); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-12 +description: Array.prototype.map - Boolean object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objBoolean = new Boolean(); + + function callbackfn(val, idx, obj) { + return this === objBoolean; + } + + var testResult = [11].map(callbackfn, objBoolean); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js index 586165aef4..6bb4566189 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js - * @description Array.prototype.map - Number object can be used as thisArg - */ - - -function testcase() { - - var objNumber = new Number(); - - function callbackfn(val, idx, obj) { - return this === objNumber; - } - - var testResult = [11].map(callbackfn, objNumber); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-13 +description: Array.prototype.map - Number object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objNumber = new Number(); + + function callbackfn(val, idx, obj) { + return this === objNumber; + } + + var testResult = [11].map(callbackfn, objNumber); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js index a266476f45..c7f9c6aec9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js - * @description Array.prototype.map - the Math object can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === Math; - } - - var testResult = [11].map(callbackfn, Math); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-14 +description: Array.prototype.map - the Math object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === Math; + } + + var testResult = [11].map(callbackfn, Math); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js index 408af6ef19..9afbc59e25 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js - * @description Array.prototype.map - Date object can be used as thisArg - */ - - -function testcase() { - - var objDate = new Date(); - - function callbackfn(val, idx, obj) { - return this === objDate; - } - - var testResult = [11].map(callbackfn, objDate); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-15 +description: Array.prototype.map - Date object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objDate = new Date(); + + function callbackfn(val, idx, obj) { + return this === objDate; + } + + var testResult = [11].map(callbackfn, objDate); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js index e71489d424..8fc9f16a81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js - * @description Array.prototype.map - RegExp object can be used as thisArg - */ - - -function testcase() { - - var objRegExp = new RegExp(); - - function callbackfn(val, idx, obj) { - return this === objRegExp; - } - - var testResult = [11].map(callbackfn, objRegExp); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-16 +description: Array.prototype.map - RegExp object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objRegExp = new RegExp(); + + function callbackfn(val, idx, obj) { + return this === objRegExp; + } + + var testResult = [11].map(callbackfn, objRegExp); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js index 12658c6538..483df987c8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js - * @description Array.prototype.map - the JSON object can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === JSON; - } - - var testResult = [11].map(callbackfn, JSON); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-17 +description: Array.prototype.map - the JSON object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === JSON; + } + + var testResult = [11].map(callbackfn, JSON); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js index b00f3a28f3..ead70d39dd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js - * @description Array.prototype.map - Error object can be used as thisArg - */ - - -function testcase() { - - var objError = new RangeError(); - - function callbackfn(val, idx, obj) { - return this === objError; - } - - var testResult = [11].map(callbackfn, objError); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-18 +description: Array.prototype.map - Error object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objError = new RangeError(); + + function callbackfn(val, idx, obj) { + return this === objError; + } + + var testResult = [11].map(callbackfn, objError); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js index f7def993e1..2decbd7f6d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js - * @description Array.prototype.map - the Arguments object can be used as thisArg - */ - - -function testcase() { - - var arg; - - function callbackfn(val, idx, obj) { - return this === arg; - } - - arg = (function () { - return arguments; - }(1, 2, 3)); - - var testResult = [11].map(callbackfn, arg); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-19 +description: Array.prototype.map - the Arguments object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + + function callbackfn(val, idx, obj) { + return this === arg; + } + + arg = (function () { + return arguments; + }(1, 2, 3)); + + var testResult = [11].map(callbackfn, arg); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js index b590aa06cd..b2e94983ce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js - * @description Array.prototype.map - thisArg is Object - */ - - -function testcase() { - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,o); - if( resArr[0] === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-2 +description: Array.prototype.map - thisArg is Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var o = new Object(); + o.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var srcArr = [1]; + var resArr = srcArr.map(callbackfn,o); + if( resArr[0] === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js index c8b41eb1bf..4a9cab9c65 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js - * @description Array.prototype.map - the global object can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === fnGlobalObject(); - } - - var testResult = [11].map(callbackfn, fnGlobalObject()); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-21 +description: Array.prototype.map - the global object can be used as thisArg +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === fnGlobalObject(); + } + + var testResult = [11].map(callbackfn, fnGlobalObject()); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js index e24a201f0f..43fb4667b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js - * @description Array.prototype.map - boolean primitive can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } - - var testResult = [11].map(callbackfn, false); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-22 +description: Array.prototype.map - boolean primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === false; + } + + var testResult = [11].map(callbackfn, false); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js index f476eafb6c..658d7e058c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js - * @description Array.prototype.map - number primitive can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === 101; - } - - var testResult = [11].map(callbackfn, 101); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-23 +description: Array.prototype.map - number primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === 101; + } + + var testResult = [11].map(callbackfn, 101); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js index 72a81d7c69..ee1bc6098d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js - * @description Array.prototype.map - string primitive can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === "abc"; - } - - var testResult = [11].map(callbackfn, "abc"); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-24 +description: Array.prototype.map - string primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === "abc"; + } + + var testResult = [11].map(callbackfn, "abc"); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js index c5f26c12c5..0f28a85d4e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js - * @description Array.prototype.map - thisArg is Array - */ - - -function testcase() { - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,a); - if( resArr[0] === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-3 +description: Array.prototype.map - thisArg is Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var a = new Array(); + a.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var srcArr = [1]; + var resArr = srcArr.map(callbackfn,a); + if( resArr[0] === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js index 00e25c49d1..0bf52e91b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js - * @description Array.prototype.map - thisArg is object from object template(prototype) - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.prototype.res = true; - var f = new foo(); - - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,f); - if( resArr[0] === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-4 +description: > + Array.prototype.map - thisArg is object from object + template(prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.prototype.res = true; + var f = new foo(); + + var srcArr = [1]; + var resArr = srcArr.map(callbackfn,f); + if( resArr[0] === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js index 30c93439e8..e0c4fee39a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js - * @description Array.prototype.map - thisArg is object from object template - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - var f = new foo(); - f.res = true; - - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,f); - if( resArr[0] === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-5 +description: Array.prototype.map - thisArg is object from object template +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + var f = new foo(); + f.res = true; + + var srcArr = [1]; + var resArr = srcArr.map(callbackfn,f); + if( resArr[0] === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js index 51cd1d79cb..ec8d65a293 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js - * @description Array.prototype.map - thisArg is function - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.res = true; - - var srcArr = [1]; - var resArr = srcArr.map(callbackfn,foo); - if( resArr[0] === true) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-6 +description: Array.prototype.map - thisArg is function +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.res = true; + + var srcArr = [1]; + var resArr = srcArr.map(callbackfn,foo); + if( resArr[0] === true) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js index d508321259..e39641a3e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js - * @description Array.prototype.map - built-in functions can be used as thisArg - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this === eval; - } - - var testResult = [11].map(callbackfn, eval); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-7 +description: Array.prototype.map - built-in functions can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this === eval; + } + + var testResult = [11].map(callbackfn, eval); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js index 8977a55797..34d2c6e9b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js - * @description Array.prototype.map - Function object can be used as thisArg - */ - - -function testcase() { - - var objFunction = function () { }; - - function callbackfn(val, idx, obj) { - return this === objFunction; - } - - var testResult = [11].map(callbackfn, objFunction); - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-5-9 +description: Array.prototype.map - Function object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objFunction = function () { }; + + function callbackfn(val, idx, obj) { + return this === objFunction; + } + + var testResult = [11].map(callbackfn, objFunction); + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js index 58cc2d0b02..e48c701499 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js - * @description Array.prototype.map - Array.isArray returns true when input argument is the ourput array - */ - - -function testcase() { - - var newArr = [11].map(function () { }); - - return Array.isArray(newArr); - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-6-1 +description: > + Array.prototype.map - Array.isArray returns true when input + argument is the ourput array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newArr = [11].map(function () { }); + + return Array.isArray(newArr); + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js index f8a1253815..e623ddbe1e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js - * @description Array.prototype.map - the returned array is instanceof Array - */ - - -function testcase() { - - var newArr = [11].map(function () { }); - - return newArr instanceof Array; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-6-2 +description: Array.prototype.map - the returned array is instanceof Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newArr = [11].map(function () { }); + + return newArr instanceof Array; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js index e400b12653..1dee8af971 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js - * @description Array.prototype.map doesn't consider new elements added to array after it is called - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - srcArr[2] = 3; - srcArr[5] = 6; - return 1; - } - - var srcArr = [1,2,,4,5]; - var resArr = srcArr.map(callbackfn); - if(resArr.length === 5) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-1 +description: > + Array.prototype.map doesn't consider new elements added to array + after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + srcArr[2] = 3; + srcArr[5] = 6; + return 1; + } + + var srcArr = [1,2,,4,5]; + var resArr = srcArr.map(callbackfn); + if(resArr.length === 5) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js index 988fa0ae6a..acaf3e51d3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js - * @description Array.prototype.map considers new value of elements in array after it is called - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - srcArr[4] = -1; - if(val > 0) - return 1; - else - return 0; - } - - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && resArr[4] === 0) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-2 +description: > + Array.prototype.map considers new value of elements in array after + it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + srcArr[4] = -1; + if(val > 0) + return 1; + else + return 0; + } + + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.map(callbackfn); + if(resArr.length === 5 && resArr[4] === 0) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js index a355f41a31..692f00a107 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js - * @description Array.prototype.map doesn't visit deleted elements in array after the call - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - delete srcArr[4]; - if(val > 0) - return 1; - else - return 0; - - } - - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && resArr[4] === undefined) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-3 +description: > + Array.prototype.map doesn't visit deleted elements in array after + the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + delete srcArr[4]; + if(val > 0) + return 1; + else + return 0; + + } + + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.map(callbackfn); + if(resArr.length === 5 && resArr[4] === undefined) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js index 6cfd6f2150..31e609e1dd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js - * @description Array.prototype.map doesn't visit deleted elements when Array.length is decreased - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - srcArr.length = 2; - callCnt++; - return 1; - } - - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-4 +description: > + Array.prototype.map doesn't visit deleted elements when + Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + srcArr.length = 2; + callCnt++; + return 1; + } + + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.map(callbackfn); + if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js index 4711eeb117..4cc35b9b29 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js - * @description Array.prototype.map doesn't consider newly added elements in sparse array - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - srcArr[1000] = 3; - callCnt++; - return val; - } - - var srcArr = new Array(10); - srcArr[1] = 1; - srcArr[2] = 2; - var resArr = srcArr.map(callbackfn); - if( resArr.length === 10 && callCnt === 2) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-5 +description: > + Array.prototype.map doesn't consider newly added elements in + sparse array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + srcArr[1000] = 3; + callCnt++; + return val; + } + + var srcArr = new Array(10); + srcArr[1] = 1; + srcArr[2] = 2; + var resArr = srcArr.map(callbackfn); + if( resArr.length === 10 && callCnt === 2) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js index 54f41e8998..efaee44b09 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js - * @description Array.prototype.map visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - delete srcArr[4]; - if(val > 0) - return 1; - else - return 0; - - } - - Array.prototype[4] = 5; - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); - delete Array.prototype[4]; - if(resArr.length === 5 && resArr[4] === 1) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-6 +description: > + Array.prototype.map visits deleted element in array after the call + when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + delete srcArr[4]; + if(val > 0) + return 1; + else + return 0; + + } + + Array.prototype[4] = 5; + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.map(callbackfn); + delete Array.prototype[4]; + if(resArr.length === 5 && resArr[4] === 1) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js index e0edd25cae..98e0966fd2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js - * @description Array.prototype.map successful to delete the object in callbackfn - */ - - -function testcase() { - var obj = {}; - obj.srcArr = [1, 2, 3, 4, 5]; - - function callbackfn(val, idx, obj) { - delete obj.srcArr; - if (val > 0) - return 1; - else - return 0; - } - - var resArr = obj.srcArr.map(callbackfn); - return resArr.toString() === "1,1,1,1,1" && !obj.hasOwnProperty("arr"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-7 +description: Array.prototype.map successful to delete the object in callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = {}; + obj.srcArr = [1, 2, 3, 4, 5]; + + function callbackfn(val, idx, obj) { + delete obj.srcArr; + if (val > 0) + return 1; + else + return 0; + } + + var resArr = obj.srcArr.map(callbackfn); + return resArr.toString() === "1,1,1,1,1" && !obj.hasOwnProperty("arr"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js index f31c5e23b9..77315b37a4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js - * @description Array.prototype.map - no observable effects occur if length is 0 on an Array-like object - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 12, length: 0 }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-8 +description: > + Array.prototype.map - no observable effects occur if length is 0 + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 12, length: 0 }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js index 76d39b4115..dee416950a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js - * @description Array.prototype.map - modifications to length don't change number of iterations on an Array - */ - - -function testcase() { - var called = 0; - function callbackfn(val, idx, obj) { - called += 1; - return val > 10; - } - - var arr = [9, , 12]; - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 8; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult.length === 3 && called === 2 && typeof testResult[2] === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-9 +description: > + Array.prototype.map - modifications to length don't change number + of iterations on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = 0; + function callbackfn(val, idx, obj) { + called += 1; + return val > 10; + } + + var arr = [9, , 12]; + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 8; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult.length === 3 && called === 2 && typeof testResult[2] === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js index be59865229..b8c8cd8a5d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js - * @description Array.prototype.map - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return 1; - } - - var srcArr = new Array(10); - srcArr[1] = undefined; //explicitly assigning a value - var resArr = srcArr.map(callbackfn); - if( resArr.length === 10 && callCnt === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-1 +description: > + Array.prototype.map - callbackfn not called for indexes never been + assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return 1; + } + + var srcArr = new Array(10); + srcArr[1] = undefined; //explicitly assigning a value + var resArr = srcArr.map(callbackfn); + if( resArr.length === 10 && callCnt === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js index 729b4cb76d..005c76e60f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js - * @description Array.prototype.map - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return idx === 1 && typeof val === "undefined"; - } - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 20 && typeof testResult[1] === "undefined"; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-10 +description: > + Array.prototype.map - deleting property of prototype causes + prototype index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return idx === 1 && typeof val === "undefined"; + } + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 20 && typeof testResult[1] === "undefined"; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js index 0f8e4ecfc5..eaa99b2d04 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js - * @description Array.prototype.map - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return idx === 1 && typeof val === "undefined"; - } - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - var testResult = arr.map(callbackfn); - return testResult.length === 3 && typeof testResult[1] === "undefined"; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-11 +description: > + Array.prototype.map - deleting property of prototype causes + prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return idx === 1 && typeof val === "undefined"; + } + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + var testResult = arr.map(callbackfn); + return testResult.length === 3 && typeof testResult[1] === "undefined"; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js index be4b5fdb6b..99fea677c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js - * @description Array.prototype.map - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 3) { - return false; - } else { - return true; - } - } - var obj = { 0: 0, 1: 1, 2: 2, length: 10 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 3; - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === false; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-12 +description: > + Array.prototype.map - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 3) { + return false; + } else { + return true; + } + } + var obj = { 0: 0, 1: 1, 2: 2, length: 10 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 3; + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult[1] === false; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js index 19564a33e0..3fe2cee0c1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js - * @description Array.prototype.map - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 3) { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 3; - var testResult = arr.map(callbackfn); - return testResult[1] === false; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-13 +description: > + Array.prototype.map - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 3) { + return false; + } else { + return true; + } + } + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 3; + var testResult = arr.map(callbackfn); + return testResult[1] === false; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js index ae6b513854..d6df8cb891 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js - * @description Array.prototype.map - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 3 && typeof val === "undefined"; - } - - var arr = [0, 1, 2, "last"]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - return typeof testResult[3] === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-14 +description: > + Array.prototype.map - decreasing length of array causes index + property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 3 && typeof val === "undefined"; + } + + var arr = [0, 1, 2, "last"]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + return typeof testResult[3] === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js index b1efefacb7..ae15a76136 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js - * @description Array.prototype.map - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - return testResult.length === 3 && testResult[2] === false; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-15 +description: > + Array.prototype.map - decreasing length of array with prototype + property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return false; + } else { + return true; + } + } + var arr = [0, 1, 2]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + return testResult.length === 3 && testResult[2] === false; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js index 340679e968..fd6837b72d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js - * @description Array.prototype.map - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return false; - } else { - return true; - } - } - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - return testResult.length === 3 && testResult[2] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-16 +description: > + Array.prototype.map - decreasing length of array does not delete + non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return false; + } else { + return true; + } + } + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + return testResult.length === 3 && testResult[2] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js index 1f9eb92b74..d730d01fd0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js @@ -1,34 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js - * @description Array.prototype.map - added properties in step 2 are visible here - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return false; - } else { - return true; - } - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "length"; - return 3; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[2] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-2 +description: Array.prototype.map - added properties in step 2 are visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return false; + } else { + return true; + } + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + obj[2] = "length"; + return 3; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult[2] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js index 542c8b53e7..7a3c81c7a4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js - * @description Array.prototype.map - deleted properties in step 2 are visible here - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 2) { - return false; - } else { - return true; - } - } - var obj = { 2: 6.99, 8: 19 }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 10; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - return typeof testResult[2] === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-3 +description: Array.prototype.map - deleted properties in step 2 are visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 2) { + return false; + } else { + return true; + } + } + var obj = { 2: 6.99, 8: 19 }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[2]; + return 10; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + return typeof testResult[2] === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js index fbd3f3a2a0..16186472f8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js - * @description Array.prototype.map - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-4 +description: > + Array.prototype.map - properties added into own object after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(obj, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult[0] === true && testResult[1] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js index 288e30201f..f042adcd82 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js - * @description Array.prototype.map - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - return testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-5 +description: > + Array.prototype.map - properties added into own object after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + return testResult[0] === true && testResult[1] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js index 0d4b09edc2..dfd7590337 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js - * @description Array.prototype.map - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === false; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-6 +description: > + Array.prototype.map - properties can be added to prototype after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } + } + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult[0] === true && testResult[1] === false; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js index 3261923d14..d9497885ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js - * @description Array.prototype.map - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = [0, , 2]; - - try { - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - return testResult[0] === true && testResult[1] === false; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-7 +description: > + Array.prototype.map - properties can be added to prototype after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } + } + var arr = [0, , 2]; + + try { + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + return testResult[0] === true && testResult[1] === false; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js index 342bc67dbb..0871ae96e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js - * @description Array.prototype.map - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1) { - return false; - } else { - return true; - } - } - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && typeof testResult[1] === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-8 +description: > + Array.prototype.map - deleting own property causes index property + not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1) { + return false; + } else { + return true; + } + } + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult[0] === true && typeof testResult[1] === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js index d227af7f9d..79693a046d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js - * @description Array.prototype.map - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return false; - } else { - return true; - } - } - var arr = [1, 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - return testResult[0] === true && typeof testResult[1] === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-b-9 +description: > + Array.prototype.map - deleting own property causes index property + not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return false; + } else { + return true; + } + } + var arr = [1, 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + return testResult[0] === true && typeof testResult[1] === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js index 98bfa49bfe..9421aa72c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js - * @description Array.prototype.map - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var kValue = {}; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } - - var obj = { 5: kValue, length: 100 }; - - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr[5] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-1 +description: > + Array.prototype.map - element to be retrieved is own data property + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = {}; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; + } + + var obj = { 5: kValue, length: 100 }; + + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr[5] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js index 40c52743b9..fbc3f43849 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js - * @description Array.prototype.map - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-10 +description: > + Array.prototype.map - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js index 405fd550ef..6f336e4ff0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js - * @description Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var proto = { 0: 5, length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-11 +description: > + Array.prototype.map - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var proto = { 0: 5, length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js index eefb1f9858..179e54efa2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js - * @description Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var arr = []; - - try { - Array.prototype[0] = 11; - - Object.defineProperty(arr, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-12 +description: > + Array.prototype.map - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var arr = []; + + try { + Array.prototype[0] = 11; + + Object.defineProperty(arr, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js index 0ad61ef0d3..520ac942a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js @@ -1,48 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js - * @description Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var proto = { length: 2 }; - - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-13 +description: > + Array.prototype.map - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var proto = { length: 2 }; + + Object.defineProperty(proto, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js index 5afe034fff..6774d8f50e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js - * @description Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var arr = []; - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-14 +description: > + Array.prototype.map - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var arr = []; + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js index 8caa229baf..6529594bf3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js - * @description Array.prototype.map - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var proto = { length: 2 }; - - Object.defineProperty(proto, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-15 +description: > + Array.prototype.map - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var proto = { length: 2 }; + + Object.defineProperty(proto, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js index ece87a0788..556f962aa9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js - * @description Array.prototype.map - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = [, ].map(callbackfn); - - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-16 +description: > + Array.prototype.map - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = [, ].map(callbackfn); + + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js index 307ae70c44..d59022942f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js - * @description Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-17 +description: > + Array.prototype.map - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js index 2e3cab9742..dfa16a5a1a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js - * @description Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return typeof val === "undefined"; - } - return false; - } - - var arr = []; - - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-18 +description: > + Array.prototype.map - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return typeof val === "undefined"; + } + return false; + } + + var arr = []; + + Object.defineProperty(arr, "1", { + set: function () { }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js index 2c82e3086c..aa536676d4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js - * @description Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - var arr = []; - - try { - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 100; - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-19 +description: > + Array.prototype.map - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + var arr = []; + + try { + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 100; + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js index 35fc8b31d4..ee19511df0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js - * @description Array.prototype.map - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var kValue = {}; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var arr = [kValue]; - - var newArr = arr.map(callbackfn); - - return newArr[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-2 +description: > + Array.prototype.map - element to be retrieved is own data property + on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = {}; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var arr = [kValue]; + + var newArr = arr.map(callbackfn); + + return newArr[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js index 3efa5bb8b0..5321e13cc4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js - * @description Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - var proto = {}; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - - Object.defineProperty(child, "0", { - set: function () { }, - configurable: true - }); - - Object.defineProperty(proto, "0", { - get: function () { - return 100; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-20 +description: > + Array.prototype.map - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + var proto = {}; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + + Object.defineProperty(child, "0", { + set: function () { }, + configurable: true + }); + + Object.defineProperty(proto, "0", { + get: function () { + return 100; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js index 30b9674886..75fcf9f1ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js - * @description Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - var proto = { length: 2 }; - Object.defineProperty(proto, "0", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-21 +description: > + Array.prototype.map - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + var proto = { length: 2 }; + Object.defineProperty(proto, "0", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js index 03f98b42b4..6b2fa73eba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js - * @description Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return typeof val === "undefined"; - } - return false; - } - - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - - var testResult = [,].map(callbackfn); - - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-22 +description: > + Array.prototype.map - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return typeof val === "undefined"; + } + return false; + } + + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + + var testResult = [,].map(callbackfn); + + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js index 8281b371e9..5f90329c6a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js @@ -1,36 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js - * @description Array.prototype.map - This object is the global object which contains index property - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = kValue; - fnGlobalObject().length = 2; - - var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn); - - return testResult[0] === true; - } finally { - delete fnGlobalObject()[0]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-23 +description: > + Array.prototype.map - This object is the global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = kValue; + fnGlobalObject().length = 2; + + var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn); + + return testResult[0] === true; + } finally { + delete fnGlobalObject()[0]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js index 0fbb3c3345..c62bae81d6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js - * @description Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 9; - } else { - return false; - } - } - - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; - - var testResult = func(9); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-25 +description: > + Array.prototype.map - This object is the Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 9; + } else { + return false; + } + } + + var func = function (a, b) { + return Array.prototype.map.call(arguments, callbackfn); + }; + + var testResult = func(9); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js index 7e3fc7e370..fe87b73003 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js - * @description Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 9; - } else if (idx === 1) { - return val === 11; - } else { - return false; - } - } - - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; - - var testResult = func(9, 11); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-26 +description: > + Array.prototype.map - This object is the Arguments object which + implements its own property get method (number of arguments equals + number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 9; + } else if (idx === 1) { + return val === 11; + } else { + return false; + } + } + + var func = function (a, b) { + return Array.prototype.map.call(arguments, callbackfn); + }; + + var testResult = func(9, 11); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js index 4ef582ef16..d7104004e1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js - * @description Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 9; - } else if (idx === 1) { - return val === 11; - } else if (idx === 2) { - return val === 12; - } else { - return false; - } - - } - - var func = function (a, b) { - return Array.prototype.map.call(arguments, callbackfn); - }; - - var testResult = func(9, 11, 12); - - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-27 +description: > + Array.prototype.map - This object is the Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 9; + } else if (idx === 1) { + return val === 11; + } else if (idx === 2) { + return val === 12; + } else { + return false; + } + + } + + var func = function (a, b) { + return Array.prototype.map.call(arguments, callbackfn); + }; + + var testResult = func(9, 11, 12); + + return testResult[0] === true && testResult[1] === true && testResult[2] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js index d67e0a3f0f..0c61e162ed 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js @@ -1,50 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js - * @description Array.prototype.map - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - var preIterVisible = false; - var arr = []; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); - - var testResult = arr.map(callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-28 +description: > + Array.prototype.map - element changed by getter on previous + iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var arr = []; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } + } + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true + }); + + var testResult = arr.map(callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js index ee077355c9..b37e1698b0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js @@ -1,50 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js - * @description Array.prototype.map - element changed by getter on previous iterations is observed on an Array-like object - */ - - -function testcase() { - - var preIterVisible = false; - var obj = { length: 2 }; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-29 +description: > + Array.prototype.map - element changed by getter on previous + iterations is observed on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var obj = { length: 2 }; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } + } + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js index c1cab57fd6..471945f597 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js - * @description Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } - - var proto = { 5: 12, length: 10 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[5] = kValue; - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[5] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-3 +description: > + Array.prototype.map - element to be retrieved is own data property + that overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; + } + + var proto = { 5: 12, length: 10 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[5] = kValue; + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[5] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js index b8e2807923..28473eeaeb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js - * @description Array.prototype.map - unhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } - - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); - - try { - Array.prototype.map.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-30 +description: > + Array.prototype.map - unhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + } + + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + accessed = true; + return 100; + }, + configurable: true + }); + + try { + Array.prototype.map.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js index 81068dfdfb..c8dfca27ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js - * @description Array.prototype.map - unhandled exceptions happened in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - } - - var arr = []; - arr[5] = 10; - arr[10] = 100; - - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - accessed = true; - return 100; - }, - configurable: true - }); - - try { - arr.map(callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-31 +description: > + Array.prototype.map - unhandled exceptions happened in getter + terminate iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + } + + var arr = []; + arr[5] = 10; + arr[10] = 100; + + Object.defineProperty(arr, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + accessed = true; + return 100; + }, + configurable: true + }); + + try { + arr.map(callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js index 7994d2bb84..89f211b68f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js - * @description Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - try { - Array.prototype[0] = 11; - - var testResult = [kValue].map(callbackfn); - - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-4 +description: > + Array.prototype.map - element to be retrieved is own data property + that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + try { + Array.prototype[0] = 11; + + var testResult = [kValue].map(callbackfn); + + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js index 13bb10f7b3..802668991f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js - * @description Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } - - var proto = {}; - - Object.defineProperty(proto, "5", { - get: function () { - return 11; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - Object.defineProperty(child, "5", { - value: kValue, - configurable: true - }); - - var testResult = Array.prototype.map.call(child, callbackfn); - - return testResult[5] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-5 +description: > + Array.prototype.map - element to be retrieved is own data property + that overrides an inherited accessor property on an Array-like + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; + } + + var proto = {}; + + Object.defineProperty(proto, "5", { + get: function () { + return 11; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + Object.defineProperty(child, "5", { + value: kValue, + configurable: true + }); + + var testResult = Array.prototype.map.call(child, callbackfn); + + return testResult[5] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js index 78f4afd3c1..a4d85be477 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js - * @description Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); - - var testResult = [kValue].map(callbackfn); - return testResult[0] === true; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-6 +description: > + Array.prototype.map - element to be retrieved is own data property + that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 9; + }, + configurable: true + }); + + var testResult = [kValue].map(callbackfn); + return testResult[0] === true; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js index 4f00964a74..9fca1df8e1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js - * @description Array.prototype.map - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === kValue; - } - return false; - } - - var proto = { 5: kValue, length: 10 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - var newArr = Array.prototype.map.call(child, callbackfn); - - return newArr[5] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-7 +description: > + Array.prototype.map - element to be retrieved is inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === kValue; + } + return false; + } + + var proto = { 5: kValue, length: 10 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + var newArr = Array.prototype.map.call(child, callbackfn); + + return newArr[5] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js index 2b6b466685..7a3c9b0fd9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js - * @description Array.prototype.map - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 13; - } - return false; - } - - try { - Array.prototype[1] = 13; - - var newArr = [, , , ].map(callbackfn); - - return newArr[1] === true; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-8 +description: > + Array.prototype.map - element to be retrieved is inherited data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 13; + } + return false; + } + + try { + Array.prototype[1] = 13; + + var newArr = [, , , ].map(callbackfn); + + return newArr[1] === true; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js index 796e6e541e..8931548742 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js - * @description Array.prototype.map - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - return kValue; - }, - configurable: true - }); - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-i-9 +description: > + Array.prototype.map - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = "abc"; + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === kValue; + } + return false; + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + return kValue; + }, + configurable: true + }); + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js index ed414f8507..84a5c5e60e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js - * @description Array.prototype.map - callbackfn called with correct parameters - */ - - -function testcase() { - - var bPar = true; - var bCalled = false; - function callbackfn(val, idx, obj) - { - bCalled = true; - if(obj[idx] !== val) - bPar = false; - } - - var srcArr = [0,1,true,null,new Object(),"five"]; - srcArr[999999] = -6.6; - resArr = srcArr.map(callbackfn); - - if(bCalled === true && bPar === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-1 +description: Array.prototype.map - callbackfn called with correct parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + + var bPar = true; + var bCalled = false; + function callbackfn(val, idx, obj) + { + bCalled = true; + if(obj[idx] !== val) + bPar = false; + } + + var srcArr = [0,1,true,null,new Object(),"five"]; + srcArr[999999] = -6.6; + resArr = srcArr.map(callbackfn); + + if(bCalled === true && bPar === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js index bfaddec688..a0c8532e7b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js - * @description Array.prototype.map - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - function callbackfn(val) { - return val > 10; - } - - var testResult = [11].map(callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-10 +description: Array.prototype.map - callbackfn is called with 1 formal parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val) { + return val > 10; + } + + var testResult = [11].map(callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js index a39bcc3b85..685a48024e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js - * @description Array.prototype.map - callbackfn is called with 2 formal parameters - */ - - -function testcase() { - function callbackfn(val, idx) { - return (val > 10 && arguments[2][idx] === val); - } - - var testResult = [11].map(callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-11 +description: Array.prototype.map - callbackfn is called with 2 formal parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx) { + return (val > 10 && arguments[2][idx] === val); + } + + var testResult = [11].map(callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js index c5ea2da22a..82272d71bf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js - * @description Array.prototype.map - callbackfn is called with 3 formal parameters - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return (val > 10 && obj[idx] === val); - } - - var testResult = [11].map(callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-12 +description: Array.prototype.map - callbackfn is called with 3 formal parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return (val > 10 && obj[idx] === val); + } + + var testResult = [11].map(callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js index b66463f99d..b9b15eda1c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js - * @description Array.prototype.map - callbackfn that uses arguments object to get parameter value - */ - - -function testcase() { - - function callbackfn() { - return arguments[2][arguments[1]] === arguments[0]; - } - - var testResult = [11].map(callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-13 +description: > + Array.prototype.map - callbackfn that uses arguments object to get + parameter value +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return arguments[2][arguments[1]] === arguments[0]; + } + + var testResult = [11].map(callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js index 6c315797d3..ca9301b1f0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js - * @description Array.prototype.map - 'this' object when T is not an object (T is a boolean primitive) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } - - var obj = { 0: 11, length: 2 }; - - var testResult = Array.prototype.map.call(obj, callbackfn, false); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-16 +description: > + Array.prototype.map - 'this' object when T is not an object (T is + a boolean primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === false; + } + + var obj = { 0: 11, length: 2 }; + + var testResult = Array.prototype.map.call(obj, callbackfn, false); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js index bbb97698f8..08ac33eb76 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js - * @description Array.prototype.map - 'this' object when T is not an object (T is a number) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === 5; - } - - var obj = { 0: 11, length: 2 }; - - var testResult = Array.prototype.map.call(obj, callbackfn, 5); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-17 +description: > + Array.prototype.map - 'this' object when T is not an object (T is + a number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === 5; + } + + var obj = { 0: 11, length: 2 }; + + var testResult = Array.prototype.map.call(obj, callbackfn, 5); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js index 045b9bb984..e520a26dcf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js - * @description Array.prototype.map - 'this' object when T is not an object (T is a string primitive) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === "hello!"; - } - - var obj = { 0: 11, length: 2 }; - - var testResult = Array.prototype.map.call(obj, callbackfn, "hello!"); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-18 +description: > + Array.prototype.map - 'this' object when T is not an object (T is + a string primitive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === "hello!"; + } + + var obj = { 0: 11, length: 2 }; + + var testResult = Array.prototype.map.call(obj, callbackfn, "hello!"); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js index fed11c63fb..5d7e0ee9d7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js - * @description Array.prototype.map - non-indexed properties are not called. - */ - - -function testcase() { - - var called = 0; - var result = false; - - function callbackfn(val, idx, obj) { - called++; - if (val === 11) { - result = true; - } - return true; - } - - var obj = { 0: 9, non_index_property: 11, length: 20 }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return !result && testResult[0] === true && called === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-19 +description: Array.prototype.map - non-indexed properties are not called. +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var result = false; + + function callbackfn(val, idx, obj) { + called++; + if (val === 11) { + result = true; + } + return true; + } + + var obj = { 0: 9, non_index_property: 11, length: 20 }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return !result && testResult[0] === true && called === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js index c9dabd69d2..4f2d252cd1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js - * @description Array.prototype.map - callbackfn takes 3 arguments - */ - - -function testcase() { - - var parCnt = 3; - var bCalled = false - function callbackfn(val, idx, obj) - { - bCalled = true; - if(arguments.length !== 3) - parCnt = arguments.length; //verify if callbackfn was called with 3 parameters - } - - var srcArr = [0,1,2,3,4,5,6,7,8,9]; - var resArr = srcArr.map(callbackfn); - if(bCalled === true && parCnt === 3) - return true; - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-2 +description: Array.prototype.map - callbackfn takes 3 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var parCnt = 3; + var bCalled = false + function callbackfn(val, idx, obj) + { + bCalled = true; + if(arguments.length !== 3) + parCnt = arguments.length; //verify if callbackfn was called with 3 parameters + } + + var srcArr = [0,1,2,3,4,5,6,7,8,9]; + var resArr = srcArr.map(callbackfn); + if(bCalled === true && parCnt === 3) + return true; + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js index b1688283d0..e6fbd1ef6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js - * @description Array.prototype.map - callbackfn called with correct parameters (thisArg is correct) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.threshold === 10; - } - - var thisArg = { threshold: 10 }; - - var obj = { 0: 11, 1: 9, length: 2 }; - - var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-20 +description: > + Array.prototype.map - callbackfn called with correct parameters + (thisArg is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.threshold === 10; + } + + var thisArg = { threshold: 10 }; + + var obj = { 0: 11, 1: 9, length: 2 }; + + var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js index 93a6fbe20a..4c25dff6b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js - * @description Array.prototype.map - callbackfn called with correct parameters (kValue is correct) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - - if (idx === 1) { - return val === 12; - } - - return false; - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-21 +description: > + Array.prototype.map - callbackfn called with correct parameters + (kValue is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } + + if (idx === 1) { + return val === 12; + } + + return false; + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js index 1505e5f08a..085182fe21 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js - * @description Array.prototype.map - callbackfn called with correct parameters (the index k is correct) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (val === 11) { - return idx === 0; - } - - if (val === 12) { - return idx === 1; - } - - return false; - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-22 +description: > + Array.prototype.map - callbackfn called with correct parameters + (the index k is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (val === 11) { + return idx === 0; + } + + if (val === 12) { + return idx === 1; + } + + return false; + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true && testResult[1] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js index ab87c8715c..1fd4423a28 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js - * @description Array.prototype.map - callbackfn called with correct parameters (this object O is correct) - */ - - -function testcase() { - - var obj = { 0: 11, length: 2 }; - - function callbackfn(val, idx, o) { - return obj === o; - } - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-23 +description: > + Array.prototype.map - callbackfn called with correct parameters + (this object O is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, length: 2 }; + + function callbackfn(val, idx, o) { + return obj === o; + } + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js index 5e512111a5..73fe223915 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js - * @description Array.prototype.map - k values are passed in acending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - var result = true; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx++; - } - } - - arr.map(callbackfn); - return result && arr.length === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-4 +description: Array.prototype.map - k values are passed in acending numeric order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4, 5]; + var lastIdx = 0; + var called = 0; + var result = true; + function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx++; + } + } + + arr.map(callbackfn); + return result && arr.length === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js index c37394d4e3..cd710afcf5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js - * @description Array.prototype.map - k values are accessed during each iteration and not prior to starting the loop. - */ - - -function testcase() { - - var kIndex = []; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } - - var testResult = [11, 12, 13, 14].map(callbackfn); - - return testResult.length === 4 && testResult[0] === false && - testResult[1] === false && testResult[2] === false && - testResult[3] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-5 +description: > + Array.prototype.map - k values are accessed during each iteration + and not prior to starting the loop. +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kIndex = []; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(val, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } + } + + var testResult = [11, 12, 13, 14].map(callbackfn); + + return testResult.length === 4 && testResult[0] === false && + testResult[1] === false && testResult[2] === false && + testResult[3] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js index e3378b640e..1e396cfb14 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js - * @description Array.prototype.map - arguments to callbackfn are self consistent. - */ - - -function testcase() { - - var obj = { 0: 11, length: 1 }; - var thisArg = {}; - - function callbackfn() { - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } - - var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-6 +description: Array.prototype.map - arguments to callbackfn are self consistent. +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, length: 1 }; + var thisArg = {}; + + function callbackfn() { + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; + } + + var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js index a0bffca6b5..4836b57b99 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js - * @description Array.prototype.map - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - } - - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; - - try { - Array.prototype.map.call(obj, callbackfn); - return false; - } catch (ex) { - return ex instanceof Error && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-7 +description: > + Array.prototype.map - unhandled exceptions happened in callbackfn + terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } + } + + var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; + + try { + Array.prototype.map.call(obj, callbackfn); + return false; + } catch (ex) { + return ex instanceof Error && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js index ab4c90fc6d..943d7bb12f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js - * @description Array.prototype.map - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - var obj = { 0: 9, 1: 12, length: 2 }; - - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult[1] === false; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-8 +description: > + Array.prototype.map - element changed by callbackfn on previous + iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 9, 1: 12, length: 2 }; + + function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; + } + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult[1] === false; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js index 745ea3f565..fe2703b8c1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js - * @description Array.prototype.map - callbackfn with 0 formal parameter - */ - - -function testcase() { - - function callbackfn() { - return true; - } - - var testResult = [11].map(callbackfn); - - return testResult[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-ii-9 +description: Array.prototype.map - callbackfn with 0 formal parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return true; + } + + var testResult = [11].map(callbackfn); + + return testResult[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js index 491130bca3..4ecbc68496 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js - * @description Array.prototype.map - getOwnPropertyDescriptor(all true) of returned array element - */ - - -function testcase() { - - function callbackfn(val, idx, obj){ - if(val % 2) - return (2 * val + 1); - else - return (val / 2); - } - var srcArr = [0,1,2,3,4]; - var resArr = srcArr.map(callbackfn); - if (resArr.length > 0){ - var desc = Object.getOwnPropertyDescriptor(resArr, 1) - if(desc.value === 3 && //srcArr[1] = 2*1+1 = 3 - desc.writable === true && - desc.enumerable === true && - desc.configurable === true){ - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-iii-1 +description: > + Array.prototype.map - getOwnPropertyDescriptor(all true) of + returned array element +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj){ + if(val % 2) + return (2 * val + 1); + else + return (val / 2); + } + var srcArr = [0,1,2,3,4]; + var resArr = srcArr.map(callbackfn); + if (resArr.length > 0){ + var desc = Object.getOwnPropertyDescriptor(resArr, 1) + if(desc.value === 3 && //srcArr[1] = 2*1+1 = 3 + desc.writable === true && + desc.enumerable === true && + desc.configurable === true){ + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js index c9a22395ce..ff6b3fb87b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js - * @description Array.prototype.map - value of returned array element equals to 'mappedValue' - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); - - return newArr[0] === obj[0] && newArr[1] === obj[1]; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-iii-2 +description: > + Array.prototype.map - value of returned array element equals to + 'mappedValue' +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + var newArr = Array.prototype.map.call(obj, callbackfn); + + return newArr[0] === obj[0] && newArr[1] === obj[1]; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js index 4d7edbc9a4..9581daec5e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js - * @description Array.prototype.map - value of returned array element can be overwritten - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return 11; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); - - try { - var tempVal = newArr[1]; - newArr[1] += 1; - return newArr[1] !== tempVal; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-iii-3 +description: > + Array.prototype.map - value of returned array element can be + overwritten +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return 11; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + var newArr = Array.prototype.map.call(obj, callbackfn); + + try { + var tempVal = newArr[1]; + newArr[1] += 1; + return newArr[1] !== tempVal; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js index dffbb011f3..21e869b4c4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js - * @description Array.prototype.map - value of returned array element can be enumerated - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); - - var prop; - var enumerable = false; - for (prop in newArr) { - if (newArr.hasOwnProperty(prop)) { - if (prop === "0") { - enumerable = true; - } - } - } - - return enumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-iii-4 +description: > + Array.prototype.map - value of returned array element can be + enumerated +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, length: 2 }; + var newArr = Array.prototype.map.call(obj, callbackfn); + + var prop; + var enumerable = false; + for (prop in newArr) { + if (newArr.hasOwnProperty(prop)) { + if (prop === "0") { + enumerable = true; + } + } + } + + return enumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js index 254249f0fc..7f648f9e3e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js - * @description Array.prototype.map - value of returned array element can be changed or deleted - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.map.call(obj, callbackfn); - - try { - var tempVal = newArr[1]; - delete newArr[1]; - return tempVal !== undefined && newArr[1] === undefined; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-8-c-iii-5 +description: > + Array.prototype.map - value of returned array element can be + changed or deleted +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + var newArr = Array.prototype.map.call(obj, callbackfn); + + try { + var tempVal = newArr[1]; + delete newArr[1]; + return tempVal !== undefined && newArr[1] === undefined; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js index 66ca32101f..9e77b1f508 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js - * @description Array.prototype.map doesn't mutate the Array on which it is called on - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return true; - } - var srcArr = [1,2,3,4,5]; - srcArr.map(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-1 +description: > + Array.prototype.map doesn't mutate the Array on which it is called + on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return true; + } + var srcArr = [1,2,3,4,5]; + srcArr.map(callbackfn); + if(srcArr[0] === 1 && + srcArr[1] === 2 && + srcArr[2] === 3 && + srcArr[3] === 4 && + srcArr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js index c7c13cb001..769b44c7ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js - * @description Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = { - valueOf: function () { - return 0; - } - }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-10 +description: > + Array.prototype.map - empty array to be returned if 'length' is 0 + (subclassed Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var Foo = function () { }; + Foo.prototype = [1, 2, 3]; + var obj = new Foo(); + obj.length = { + valueOf: function () { + return 0; + } + }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js index d7ae2792b3..fbfb845657 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js - * @description Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - function Foo() { } - Foo.prototype = [1, 2, 3]; - - var f = new Foo(); - - var o = { - toString: function () { - return '0'; - } - }; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb() { } - var a = Array.prototype.map.call(f, cb); - - if (Array.isArray(a) && a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-11 +description: > + Array.prototype.map - returns an empty array if 'length' is 0 + (subclassed Array, length overridden with obj w/o valueOf + (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + function Foo() { } + Foo.prototype = [1, 2, 3]; + + var f = new Foo(); + + var o = { + toString: function () { + return '0'; + } + }; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb() { } + var a = Array.prototype.map.call(f, cb); + + if (Array.isArray(a) && a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js index 3c2c1549e5..53281f92b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js - * @description Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with []) - */ - - -function testcase() { - function Foo() { } - Foo.prototype = [1, 2, 3]; - var f = new Foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb() { } - var a = Array.prototype.map.call(f, cb); - - if (Array.isArray(a) && a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-12 +description: > + Array.prototype.map - returns an empty array if 'length' is 0 + (subclassed Array, length overridden with []) +includes: [runTestCase.js] +---*/ + +function testcase() { + function Foo() { } + Foo.prototype = [1, 2, 3]; + var f = new Foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb() { } + var a = Array.prototype.map.call(f, cb); + + if (Array.isArray(a) && a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js index 61295822bb..2e27f137cb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js - * @description Array.prototype.map - if there are no side effects of the functions, O is unmodified - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val > 2; - } - - var arr = [1, 2, 3, 4]; - - arr.map(callbackfn); - - return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called; - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-13 +description: > + Array.prototype.map - if there are no side effects of the + functions, O is unmodified +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val > 2; + } + + var arr = [1, 2, 3, 4]; + + arr.map(callbackfn); + + return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called; + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js index dbec9daae3..90f2e434d5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js - * @description Array.prototype.map returns new Array with same number of elements and values the result of callbackfn - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return val + 10; - } - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.map(callbackfn); - if(resArr[0] === 11 && - resArr[1] === 12 && - resArr[2] === 13 && - resArr[3] === 14 && - resArr[4] === 15) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-2 +description: > + Array.prototype.map returns new Array with same number of elements + and values the result of callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return val + 10; + } + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.map(callbackfn); + if(resArr[0] === 11 && + resArr[1] === 12 && + resArr[2] === 13 && + resArr[3] === 14 && + resArr[4] === 15) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js index e187329f75..6fd198a617 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js - * @description Array.prototype.map - subclassed array when length is reduced - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 1; - - function cb(){} - var a = f.map(cb); - - if (Array.isArray(a) && - a.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-3 +description: Array.prototype.map - subclassed array when length is reduced +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 1; + + function cb(){} + var a = f.map(cb); + + if (Array.isArray(a) && + a.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js index 1fbf80b26d..2d727c621e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js - * @description Array.prototype.map doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - var srcArr = [1,2,3,4,5]; - srcArr["i"] = 10; - srcArr[true] = 11; - - var resArr = srcArr.map(callbackfn); - if(callCnt == 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-4 +description: Array.prototype.map doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + } + var srcArr = [1,2,3,4,5]; + srcArr["i"] = 10; + srcArr[true] = 11; + + var resArr = srcArr.map(callbackfn); + if(callCnt == 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js index 2d6641aa4a..95713ebd0a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js - * @description Array.prototype.map - empty array to be returned if 'length' is 0 (empty array) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var obj = { 0: 9, 1: 8, length: 0 }; - - var testResult = Array.prototype.map.call(obj, callbackfn); - - return testResult.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-5 +description: > + Array.prototype.map - empty array to be returned if 'length' is 0 + (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var obj = { 0: 9, 1: 8, length: 0 }; + + var testResult = Array.prototype.map.call(obj, callbackfn); + + return testResult.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js index 0673b91e60..c694944c82 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js - * @description Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10; - } - - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = null; - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-6 +description: > + Array.prototype.map - empty array to be returned if 'length' is 0 + (subclassed Array, length overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10; + } + + var Foo = function () { }; + Foo.prototype = [1, 2, 3]; + var obj = new Foo(); + obj.length = null; + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js index b9c0d86d2d..d0f3449a6b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js - * @description Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = false; - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-7 +description: > + Array.prototype.map - empty array to be returned if 'length' is 0 + (subclassed Array, length overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var Foo = function () { }; + Foo.prototype = [1, 2, 3]; + var obj = new Foo(); + obj.length = false; + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js index d5e85b7192..71bc840268 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js - * @description Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = 0; - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-8 +description: > + Array.prototype.map - empty array to be returned if 'length' is 0 + (subclassed Array, length overridden to 0 (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var Foo = function () { }; + Foo.prototype = [1, 2, 3]; + var obj = new Foo(); + obj.length = 0; + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js index 6734620580..0245565217 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js - * @description Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var Foo = function () { }; - Foo.prototype = [1, 2, 3]; - var obj = new Foo(); - obj.length = '0'; - - var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.19-9-9 +description: > + Array.prototype.map - empty array to be returned if 'length' is 0 + (subclassed Array, length overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var Foo = function () { }; + Foo.prototype = [1, 2, 3]; + var obj = new Foo(); + obj.length = '0'; + + var testResult = Array.prototype.map.call(obj, callbackfn); + return testResult.length === 0; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T1.js index 96e1eeeef8..cfee5fabf0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of calling this function is the same as if - * the built-in join method were invoked for this object with no argument - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T1.js - * @description If Result(2) is zero, return the empty string - */ +/*--- +info: > + The result of calling this function is the same as if + the built-in join method were invoked for this object with no argument +es5id: 15.4.4.2_A1_T1 +description: If Result(2) is zero, return the empty string +---*/ //CHECK#1 var x = new Array(); @@ -29,5 +29,4 @@ if (x.toString() !== x.join()) { if (x.toString() !== "") { $ERROR('#2.2: x = []; x[0] = 1; x.length = 0; x.toString() === "". Actual: ' + (x.toString())); } -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T2.js index e4cfad7704..a279307553 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T2.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of calling this function is the same as if - * the built-in join method were invoked for this object with no argument - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T2.js - * @description The elements of the array are converted to strings, and these strings are - * then concatenated, separated by occurrences of the separator. If no separator is provided, - * a single comma is used as the separator - */ +/*--- +info: > + The result of calling this function is the same as if + the built-in join method were invoked for this object with no argument +es5id: 15.4.4.2_A1_T2 +description: > + The elements of the array are converted to strings, and these + strings are then concatenated, separated by occurrences of the + separator. If no separator is provided, a single comma is used as + the separator +---*/ //CHECK#1 var x = new Array(0,1,2,3); @@ -53,4 +55,3 @@ if (x.toString() !== x.join()) { $ERROR('#4.2: x = []; x[0] = 0; x.toString() === "0". Actual: ' + (x.toString())); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T3.js index 793b503fc2..d891a6a93d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of calling this function is the same as if - * the built-in join method were invoked for this object with no argument - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T3.js - * @description Operator use ToString from array arguments - */ +/*--- +info: > + The result of calling this function is the same as if + the built-in join method were invoked for this object with no argument +es5id: 15.4.4.2_A1_T3 +description: Operator use ToString from array arguments +---*/ //CHECK#0 var x = new Array("","",""); @@ -87,5 +87,4 @@ if (x.toString() !== x.join()) { if (x.toString() !== "NaN,NaN,NaN") { $ERROR('#7.2: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.toString(NaN,NaN,NaN))); } -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T4.js index a68bee58a3..4618b18b3c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The result of calling this function is the same as if - * the built-in join method were invoked for this object with no argument - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A1_T4.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: > + The result of calling this function is the same as if + the built-in join method were invoked for this object with no argument +es5id: 15.4.4.2_A1_T4 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 var object = {valueOf: function() {return "+"}}; @@ -109,4 +109,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.toString() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A3_T1.js index 9b3c038c08..ed2f8e886f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A3_T1.js - * @description [[Prototype]] of Array instance is Array.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.2_A3_T1 +description: "[[Prototype]] of Array instance is Array.prototype" +---*/ //CHECK#1 Array.prototype[1] = 1; @@ -15,4 +14,3 @@ x.length = 2; if (x.toString() !== "0,1") { $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.toString() === "0,1". Actual: ' + (x.toString())); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.1.js index 7fba67be48..bbc5c139f0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toString has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of toString has the attribute DontEnum +es5id: 15.4.4.2_A4.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.toString.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.toString){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.toString) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.2.js index 5731a02aac..1d0e6439fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toString has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of toString has the attribute DontDelete +es5id: 15.4.4.2_A4.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.toString.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.toString.hasOwnProperty('length') !== true) { if (Array.prototype.toString.length === undefined) { $ERROR('#3: delete Array.prototype.toString.length; Array.prototype.toString.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.3.js index 185f848819..f6211ddb8f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toString has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of toString has the attribute ReadOnly +es5id: 15.4.4.2_A4.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.toString.length; @@ -15,5 +14,3 @@ Array.prototype.toString.length = Infinity; if (Array.prototype.toString.length !== x) { $ERROR('#1: x = Array.prototype.toString.length; Array.prototype.toString.length = Infinity; Array.prototype.toString.length === x. Actual: ' + (Array.prototype.toString.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.4.js index 888ef487a7..dc3cbd03de 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toString is 0 - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.4.js - * @description toString.length === 1 - */ +/*--- +info: The length property of toString is 0 +es5id: 15.4.4.2_A4.4 +description: toString.length === 1 +---*/ //CHECK#1 if (Array.prototype.toString.length !== 0) { $ERROR('#1: Array.prototype.toString.length === 0. Actual: ' + (Array.prototype.toString.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.5.js index a49eae5c5e..678e213f67 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The toString property of Array has the attribute DontEnum +es5id: 15.4.4.2_A4.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('toString') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "toString") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.6.js index f24592438e..8a97c2ca75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.6.js - * @description Checking Array.prototype.toString.prototype - */ +/*--- +info: The toString property of Array has not prototype property +es5id: 15.4.4.2_A4.6 +description: Checking Array.prototype.toString.prototype +---*/ //CHECK#1 if (Array.prototype.toString.prototype !== undefined) { $ERROR('#1: Array.prototype.toString.prototype === undefined. Actual: ' + (Array.prototype.toString.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.7.js index fa9d85a8b5..cbd68a3abf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The toString property of Array can't be used as constructor +es5id: 15.4.4.2_A4.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.toString() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js index df1216a65e..5b943921bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js - * @description Array.prototype.filter must exist as a function - */ - - -function testcase() { - var f = Array.prototype.filter; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-0-1 +description: Array.prototype.filter must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.filter; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js index 6ded424048..51a0c9811e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js - * @description Array.prototype.filter.length must be 1 - */ - - -function testcase() { - if (Array.prototype.filter.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-0-2 +description: Array.prototype.filter.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.filter.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js index e14c7f94d4..14346a92c8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js - * @description Array.prototype.filter applied to undefined throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-1 +description: Array.prototype.filter applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js index cd0e7e1c20..80404700f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js - * @description Array.prototype.filter applied to the Math object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return '[object Math]' === Object.prototype.toString.call(obj); - } - - try { - Math.length = 1; - Math[0] = 1; - var newArr = Array.prototype.filter.call(Math, callbackfn); - return newArr[0] === 1; - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-10 +description: Array.prototype.filter applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return '[object Math]' === Object.prototype.toString.call(obj); + } + + try { + Math.length = 1; + Math[0] = 1; + var newArr = Array.prototype.filter.call(Math, callbackfn); + return newArr[0] === 1; + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js index 58fcce06d8..a4f2236d47 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js - * @description Array.prototype.filter applied to Date object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof Date; - } - - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-11 +description: Array.prototype.filter applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof Date; + } + + var obj = new Date(); + obj.length = 1; + obj[0] = 1; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js index 157db3dac4..75c8e75aba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js - * @description Array.prototype.filter applied to RegExp object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof RegExp; - } - - var obj = new RegExp(); - obj.length = 2; - obj[1] = true; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-12 +description: Array.prototype.filter applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof RegExp; + } + + var obj = new RegExp(); + obj.length = 2; + obj[1] = true; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr[0] === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js index b00a43748c..dc5c2e4be8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js - * @description Array.prototype.filter applied to the JSON object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return '[object JSON]' === Object.prototype.toString.call(JSON); - } - - try { - JSON.length = 1; - JSON[0] = 1; - var newArr = Array.prototype.filter.call(JSON, callbackfn); - return newArr[0] === 1; - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-13 +description: Array.prototype.filter applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return '[object JSON]' === Object.prototype.toString.call(JSON); + } + + try { + JSON.length = 1; + JSON[0] = 1; + var newArr = Array.prototype.filter.call(JSON, callbackfn); + return newArr[0] === 1; + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js index ce855f37d6..79cb6a855d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js - * @description Array.prototype.filter applied to Error object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof Error; - } - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-14 +description: Array.prototype.filter applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof Error; + } + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js index 95f8536528..8e95c9e83d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js - * @description Array.prototype.filter applied to the Arguments object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return '[object Arguments]' === Object.prototype.toString.call(obj); - } - - var obj = (function () { - return arguments; - }("a", "b")); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === "a" && newArr[1] === "b"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-15 +description: Array.prototype.filter applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return '[object Arguments]' === Object.prototype.toString.call(obj); + } + + var obj = (function () { + return arguments; + }("a", "b")); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === "a" && newArr[1] === "b"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js index f2f9646e7c..dc0a0d8b3b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js - * @description Array.prototype.filter applied to null throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.filter.call(null); - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-2 +description: Array.prototype.filter applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.filter.call(null); + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js index ee7b9157ec..9d3804b4aa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js - * @description Array.prototype.filter applied to boolean primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; - - var newArr = Array.prototype.filter.call(false, callbackfn); - return newArr[0] === true; - - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-3 +description: Array.prototype.filter applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = true; + Boolean.prototype.length = 1; + + var newArr = Array.prototype.filter.call(false, callbackfn); + return newArr[0] === true; + + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js index 1231de578a..a6b2e612fd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js - * @description Array.prototype.filter applied to Boolean Object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof Boolean; - } - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-4 +description: Array.prototype.filter applied to Boolean Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof Boolean; + } + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === 11 && newArr[1] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js index 12ca2c0880..6d84a77c10 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js - * @description Array.prototype.filter applied to number primitive - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } - - try { - Number.prototype[0] = 1; - Number.prototype.length = 1; - - var newArr = Array.prototype.filter.call(2.5, callbackfn); - return newArr[0] === 1; - } finally { - delete Number.prototype[0]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-5 +description: Array.prototype.filter applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof Number; + } + + try { + Number.prototype[0] = 1; + Number.prototype.length = 1; + + var newArr = Array.prototype.filter.call(2.5, callbackfn); + return newArr[0] === 1; + } finally { + delete Number.prototype[0]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js index 8904040dde..d2fa68107f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js - * @description Array.prototype.filter applied to Number object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof Number; - } - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-6 +description: Array.prototype.filter applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof Number; + } + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr[0] === 11 && newArr[1] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js index bfcba17647..22d8745783 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js - * @description Array.prototype.filter applied to string primitive - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof String; - } - - var newArr = Array.prototype.filter.call("abc", callbackfn); - - return newArr[0] === "a"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-7 +description: Array.prototype.filter applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof String; + } + + var newArr = Array.prototype.filter.call("abc", callbackfn); + + return newArr[0] === "a"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js index ee9b550d6d..5103b43955 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js - * @description Array.prototype.filter applied to String object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return obj instanceof String; - } - - var obj = new String("abc"); - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === "a"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-8 +description: Array.prototype.filter applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return obj instanceof String; + } + + var obj = new String("abc"); + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === "a"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js index ee9ef957f2..c46019c679 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js - * @description Array.prototype.filter applied to Function object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj instanceof Function; - } - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === 11 && newArr[1] === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-1-9 +description: Array.prototype.filter applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj instanceof Function; + } + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === 11 && newArr[1] === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js index 04b67cc347..79ec560bba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js - * @description Array.prototype.filter doesn't mutate the Array on which it is called on - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - return true; - } - var srcArr = [1,2,3,4,5]; - srcArr.filter(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-10-1 +description: > + Array.prototype.filter doesn't mutate the Array on which it is + called on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + return true; + } + var srcArr = [1,2,3,4,5]; + srcArr.filter(callbackfn); + if(srcArr[0] === 1 && + srcArr[1] === 2 && + srcArr[2] === 3 && + srcArr[3] === 4 && + srcArr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js index efbd3cf3f3..1721901b75 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js - * @description Array.prototype.filter returns new Array with length equal to number of true returned by callbackfn - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - if(val % 2) - return true; - else - return false; - } - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); - if(resArr.length === 3 && - resArr[0] === 1 && - resArr[1] === 3 && - resArr[2] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-10-2 +description: > + Array.prototype.filter returns new Array with length equal to + number of true returned by callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + if(val % 2) + return true; + else + return false; + } + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.filter(callbackfn); + if(resArr.length === 3 && + resArr[0] === 1 && + resArr[1] === 3 && + resArr[2] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js index 411e55cd2b..5ff1a3cef6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js - * @description Array.prototype.filter - subclassed array when length is reduced - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 1; - - function cb(){return true;} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-10-3 +description: Array.prototype.filter - subclassed array when length is reduced +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 1; + + function cb(){return true;} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js index fcaf25d7f3..b8727758db 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js - * @description Array.prototype.filter doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - } - var srcArr = [1,2,3,4,5]; - srcArr["i"] = 10; - srcArr[true] = 11; - - var resArr = srcArr.filter(callbackfn); - if(callCnt == 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-10-4 +description: Array.prototype.filter doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + } + var srcArr = [1,2,3,4,5]; + srcArr["i"] = 10; + srcArr[true] = 11; + + var resArr = srcArr.filter(callbackfn); + if(callCnt == 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js index 19661c4a0c..e432bc9ce5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js - * @description Array.prototype.filter applied to Array-like object, 'length' is own data property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-1 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js index e82a59bf58..5d521101fd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js - * @description Array.prototype.filter applied to Array-like object, 'length' is inherited accessor property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-10 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js index cfcc676141..4e3da276fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js - * @description Array.prototype.filter applied to Array-like object, 'length' is own accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-11 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + own accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { + 0: 11, + 1: 12 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js index e70c6efea9..4edf4019c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js - * @description Array.prototype.filter - 'length' is own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-12 +description: > + Array.prototype.filter - 'length' is own accessor property without + a get function that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 12, 1: 11 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 0 && !accessed; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js index 030f0b05c9..9d039996ef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js - * @description Array.prototype.filter applied to the Array-like object that 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 11; - child[1] = 12; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-13 +description: > + Array.prototype.filter applied to the Array-like object that + 'length' is inherited accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 11; + child[1] = 12; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js index 4beb887fbe..58bf8396cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js - * @description Array.prototype.filter applied to the Array-like object that 'length property doesn't exist - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 11, 1: 12 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-14 +description: > + Array.prototype.filter applied to the Array-like object that + 'length property doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 11, 1: 12 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js index 4c283d3103..3a4a621614 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js - * @description Array.prototype.filter - 'length' is property of the global object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; - var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn); - return newArr.length === 2; - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-15 +description: Array.prototype.filter - 'length' is property of the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 12; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 9; + fnGlobalObject().length = 2; + var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn); + return newArr.length === 2; + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js index 7eb84334ac..a24862e914 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js - * @description Array.prototype.filter applied to the Arguments object, which implements its own property get method - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var func = function (a, b) { - var newArr = Array.prototype.filter.call(arguments, callbackfn); - return newArr.length === 2; - }; - - return func(12, 11); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-17 +description: > + Array.prototype.filter applied to the Arguments object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var func = function (a, b) { + var newArr = Array.prototype.filter.call(arguments, callbackfn); + return newArr.length === 2; + }; + + return func(12, 11); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js index 3ae375579a..4fca48d838 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js - * @description Array.prototype.filter applied to String object, which implements its own property get method - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 3; - } - - var str = new String("012"); - - var newArr = Array.prototype.filter.call(str, callbackfn); - return newArr.length === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-18 +description: > + Array.prototype.filter applied to String object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 3; + } + + var str = new String("012"); + + var newArr = Array.prototype.filter.call(str, callbackfn); + return newArr.length === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js index 985494ba07..79be728e92 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js - * @description Array.prototype.filter applied to Function object, which implements its own property get method - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; - - var newArr = Array.prototype.filter.call(fun, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-19 +description: > + Array.prototype.filter applied to Function object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var fun = function (a, b) { + return a + b; + }; + fun[0] = 12; + fun[1] = 11; + fun[2] = 9; + + var newArr = Array.prototype.filter.call(fun, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js index b8168332fa..02d4f5253f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js - * @description Array.prototype.filter - 'length' is own data property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var newArr = [12, 11].filter(callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-2 +description: Array.prototype.filter - 'length' is own data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var newArr = [12, 11].filter(callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js index d6d538c0c0..2da61aa5fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js - * @description Array.prototype.filter applied to Array-like object, 'length' is an own data property that overrides an inherited data property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-3 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + an own data property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js index 9b245fb716..194527a57c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js - * @description Array.prototype.filter - 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var arrProtoLen; - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - var newArr = [12, 11].filter(callbackfn); - return newArr.length === 2; - } finally { - Array.prototype.length = arrProtoLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-4 +description: > + Array.prototype.filter - 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arrProtoLen; + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + var newArr = [12, 11].filter(callbackfn); + return newArr.length === 2; + } finally { + Array.prototype.length = arrProtoLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js index 502f4004d3..4e43726ccd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js - * @description Array.prototype.filter to Array-like object, 'length' is an own data property that overrides an inherited accessor property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-5 +description: > + Array.prototype.filter to Array-like object, 'length' is an own + data property that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js index 556d4eadbb..2b993d793d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js - * @description Array.prototype.filter applied to Array-like object, 'length' is an inherited data property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var proto = { length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-6 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var proto = { length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js index 0f1d1decc6..64e62ab6d5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js - * @description Array.prototype.filter applied to Array-like object, 'length' is an own accessor property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-7 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + an own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + obj[0] = 12; + obj[1] = 11; + obj[2] = 9; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js index 6ccfee9bd8..098bef7a03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js - * @description Array.prototype.filter applied to Array-like object, 'length' is own accessor property that overrides an inherited data property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-8 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + own accessor property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js index da9a066602..56ca09fe8a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js - * @description Array.prototype.filter applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-2-9 +description: > + Array.prototype.filter applied to Array-like object, 'length' is + an own accessor property that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return obj.length === 2; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + var newArr = Array.prototype.filter.call(child, callbackfn); + return newArr.length === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js index 98af5183a6..eb861f11b0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js - * @description Array.prototype.filter - value of 'length' is undefined - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 0, 1: 1, length: undefined }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-1 +description: Array.prototype.filter - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 0, 1: 1, length: undefined }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js index a512cfebd2..2fcfb74ca7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js - * @description Array.prototype.filter - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 9, length: NaN }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-10 +description: > + Array.prototype.filter - value of 'length' is a number (value is + NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 9, length: NaN }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js index a20bc6ec8b..7130def278 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js - * @description Array.prototype.filter - 'length' is a string containing a positive number - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: "2" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-11 +description: > + Array.prototype.filter - 'length' is a string containing a + positive number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: "2" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js index 001eddca5d..186f1a8555 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js - * @description Array.prototype.filter - 'length' is a string containing a negative number - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: "-4294967294" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-12 +description: > + Array.prototype.filter - 'length' is a string containing a + negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: "-4294967294" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js index 081a34ace4..4e15c2fb18 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js - * @description Array.prototype.filter - 'length' is a string containing a decimal number - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: "2.5" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-13 +description: > + Array.prototype.filter - 'length' is a string containing a decimal + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: "2.5" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js index 9c366d1251..96310362e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js - * @description Array.prototype.filter - 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var accessed1 = false; - var accessed2 = false; - var accessed3 = false; - - function callbackfn1(val, idx, obj) { - accessed1 = true; - return true; - } - - function callbackfn2(val, idx, obj) { - accessed2 = true; - return true; - } - - function callbackfn3(val, idx, obj) { - accessed3 = true; - return true; - } - - var obj1 = { 0: 9, length: "Infinity" }; - var obj2 = { 0: 9, length: "-Infinity" }; - var obj3 = { 0: 9, length: "+Infinity" }; - - var newArr1 = Array.prototype.filter.call(obj1, callbackfn1); - var newArr2 = Array.prototype.filter.call(obj2, callbackfn2); - var newArr3 = Array.prototype.filter.call(obj3, callbackfn3); - - return !accessed1 && newArr1.length === 0 && - !accessed2 && newArr2.length === 0 && - !accessed3 && newArr3.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-14 +description: > + Array.prototype.filter - 'length' is a string containing + +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed1 = false; + var accessed2 = false; + var accessed3 = false; + + function callbackfn1(val, idx, obj) { + accessed1 = true; + return true; + } + + function callbackfn2(val, idx, obj) { + accessed2 = true; + return true; + } + + function callbackfn3(val, idx, obj) { + accessed3 = true; + return true; + } + + var obj1 = { 0: 9, length: "Infinity" }; + var obj2 = { 0: 9, length: "-Infinity" }; + var obj3 = { 0: 9, length: "+Infinity" }; + + var newArr1 = Array.prototype.filter.call(obj1, callbackfn1); + var newArr2 = Array.prototype.filter.call(obj2, callbackfn2); + var newArr3 = Array.prototype.filter.call(obj3, callbackfn3); + + return !accessed1 && newArr1.length === 0 && + !accessed2 && newArr2.length === 0 && + !accessed3 && newArr3.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js index 3bb70bf7ad..6ba7568af1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js - * @description Array.prototype.filter - 'length' is a string containing an exponential number - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: "2E0" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-15 +description: > + Array.prototype.filter - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: "2E0" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js index 4614e4e285..44e36fc720 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js - * @description Array.prototype.filter - 'length' is a string containing a hex number - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: "0x0002" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-16 +description: > + Array.prototype.filter - 'length' is a string containing a hex + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: "0x0002" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js index 77aa5f139a..2b7df29a6f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js - * @description Array.prototype.filter - 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: "0002.00" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-17 +description: > + Array.prototype.filter - 'length' is a string containing a number + with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: "0002.00" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js index a51bf00701..1f6222cc53 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js - * @description Array.prototype.filter - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 9, length: "asdf!_" }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return !accessed && newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-18 +description: > + Array.prototype.filter - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 9, length: "asdf!_" }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return !accessed && newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js index c800684f15..5c9ceef713 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js - * @description Array.prototype.filter - value of 'length' is an Object which has an own toString method. - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { - 1: 11, - 2: 9, - length: { - toString: function () { - return '2'; - } - } - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-19 +description: > + Array.prototype.filter - value of 'length' is an Object which has + an own toString method. +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { + 1: 11, + 2: 9, + length: { + toString: function () { + return '2'; + } + } + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js index 547a5dfd73..801d0dc159 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js - * @description Array.prototype.filter applied on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, 1: 9, length: true }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-2 +description: > + Array.prototype.filter applied on an Array-like object if 'length' + is 1 (length overridden to true(type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, 1: 9, length: true }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js index 2f57d4ec0d..9ed1a10c45 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js - * @description Array.prototype.filter - value of 'length' is an Object which has an own valueOf method. - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - return 2; - } - } - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-20 +description: > + Array.prototype.filter - value of 'length' is an Object which has + an own valueOf method. +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function () { + return 2; + } + } + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js index 9ccf1b5665..71f95a5f93 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js - * @description Array.prototype.filter - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var firstStepOccured = false; - var secondStepOccured = false; - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return '2'; - } - } - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-21 +description: > + Array.prototype.filter - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var firstStepOccured = false; + var secondStepOccured = false; + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function () { + firstStepOccured = true; + return {}; + }, + toString: function () { + secondStepOccured = true; + return '2'; + } + } + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js index 46456d64dc..daa26f85f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js - * @description Array.prototype.filter throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var accessed = false; - var firstStepOccured = false; - var secondStepOccured = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { - 1: 11, - 2: 12, - - length: { - valueOf: function () { - firstStepOccured = true; - return {}; - }, - toString: function () { - secondStepOccured = true; - return {}; - } - } - }; - - try { - Array.prototype.filter.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof TypeError) && !accessed && firstStepOccured && secondStepOccured; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-22 +description: > + Array.prototype.filter throws TypeError exception when 'length' is + an object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var firstStepOccured = false; + var secondStepOccured = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { + 1: 11, + 2: 12, + + length: { + valueOf: function () { + firstStepOccured = true; + return {}; + }, + toString: function () { + secondStepOccured = true; + return {}; + } + } + }; + + try { + Array.prototype.filter.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof TypeError) && !accessed && firstStepOccured && secondStepOccured; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js index 10f91bfb92..1b08d0dc45 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js - * @description Array.prototype.filter uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var valueOfAccessed = false; - var toStringAccessed = false; - - function callbackfn(val, idx, obj) { - return true; - } - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 1: 11, - 2: 9, - length: child - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-23 +description: > + Array.prototype.filter uses inherited valueOf method when 'length' + is an object with an own toString and inherited valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var valueOfAccessed = false; + var toStringAccessed = false; + + function callbackfn(val, idx, obj) { + return true; + } + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 1: 11, + 2: 9, + length: child + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js index a36919bc2f..abe43cfa48 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js - * @description Array.prototype.filter - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { - 1: 11, - 2: 9, - length: 2.685 - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-24 +description: > + Array.prototype.filter - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { + 1: 11, + 2: 9, + length: 2.685 + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js index c22a2e3061..2f1dd3d1f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js - * @description Array.prototype.filter - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { - 1: 11, - 2: 9, - length: -4294967294.5 - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-25 +description: > + Array.prototype.filter - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { + 1: 11, + 2: 9, + length: -4294967294.5 + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js index 80ec2fc140..eeba0b85b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js - * @description Array.prototype.filter - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return !accessed && newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-28 +description: Array.prototype.filter - value of 'length' is boundary value (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return !accessed && newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js index be0ebf1a95..cc85138907 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js - * @description Array.prototype.filter - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-29 +description: > + Array.prototype.filter - value of 'length' is boundary value (2^32 + + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { + 0: 11, + 1: 9, + length: 4294967297 + }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js index c7fe704170..e9187a5b80 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js - * @description Array.prototype.filter - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 11, length: 0 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-3 +description: Array.prototype.filter - value of 'length' is a number (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 11, length: 0 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js index 8c23975a13..2ed3a461a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js - * @description Array.prototype.filter - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 11, length: +0 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-4 +description: > + Array.prototype.filter - value of 'length' is a number (value is + +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 11, length: +0 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js index 6a6ad13352..0b9faa807a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js - * @description Array.prototype.filter - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 11, length: -0 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-5 +description: > + Array.prototype.filter - value of 'length' is a number (value is + -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 11, length: -0 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js index cb2fa9e080..413e35eeff 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js - * @description Array.prototype.filter - value of 'length' is a number (value is positive) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: 2 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-6 +description: > + Array.prototype.filter - value of 'length' is a number (value is + positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: 2 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js index 59e1cf19bf..ff0843aad2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js - * @description Array.prototype.filter - value of 'length' is a number (value is negative) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 1: 11, 2: 9, length: -4294967294 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-7 +description: > + Array.prototype.filter - value of 'length' is a number (value is + negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 1: 11, 2: 9, length: -4294967294 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js index dd0e1706f4..b298e3905b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js - * @description Array.prototype.filter - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 9, length: Infinity }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-8 +description: > + Array.prototype.filter - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 9, length: Infinity }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js index 343c6eb9fb..a20245c90d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js - * @description Array.prototype.filter - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } - - var obj = { 0: 9, length: -Infinity }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-3-9 +description: > + Array.prototype.filter - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + accessed = true; + return true; + } + + var obj = { 0: 9, length: -Infinity }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js index 434f4849bd..c7aefe438f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js - * @description Array.prototype.filter throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-1 +description: Array.prototype.filter throws TypeError if callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js index 435bbbe670..1bfc42889b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js - * @description Array.prototype.filter - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.filter.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-10 +description: > + Array.prototype.filter - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.filter.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js index 62fdbdafd5..336e1d3c66 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js - * @description Array.prototype.filter - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.filter.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-11 +description: > + Array.prototype.filter - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.filter.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js index c81a2f28cd..7994ac0f8c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js - * @description Array.prototype.filter - 'callbackfn' is a function - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 9; - } - return false; - } - - var newArr = [11, 9].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-12 +description: Array.prototype.filter - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 9; + } + return false; + } + + var newArr = [11, 9].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js index 3c9fbb82dd..cbc0a2b235 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js - * @description Array.prototype.filter - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.filter.call(obj); - return false; - } catch (ex) { - return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-15 +description: > + Array.prototype.filter - calling with no callbackfn is the same as + passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 10: 10 }; + var lengthAccessed = false; + var loopAccessed = false; + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.filter.call(obj); + return false; + } catch (ex) { + return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js index 14f5c2645b..8c2645ff39 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js - * @description Array.prototype.filter throws ReferenceError if callbackfn is unreferenced - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter(foo); - } - catch(e) { - if(e instanceof ReferenceError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-2 +description: > + Array.prototype.filter throws ReferenceError if callbackfn is + unreferenced +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter(foo); + } + catch(e) { + if(e instanceof ReferenceError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js index 38963334b0..3e9b3ecc63 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js - * @description Array.prototype.filter throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-3 +description: Array.prototype.filter throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js index 01794a5306..329f0c0aed 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js - * @description Array.prototype.filter throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-4 +description: Array.prototype.filter throws TypeError if callbackfn is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js index 3f8a512015..d4dc2b75cb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js - * @description Array.prototype.filter throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-5 +description: Array.prototype.filter throws TypeError if callbackfn is number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js index fd83a8237b..81702d58aa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js - * @description Array.prototype.filter throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-6 +description: Array.prototype.filter throws TypeError if callbackfn is string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js index 3b881d868d..91925bba57 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js - * @description Array.prototype.filter throws TypeError if callbackfn is Object without [[Call]] internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.filter(new Object()); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-7 +description: > + Array.prototype.filter throws TypeError if callbackfn is Object + without [[Call]] internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.filter(new Object()); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js index 9c0da9ad92..f4cf40318a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js - * @description Array.prototype.filter - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.filter.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-8 +description: > + Array.prototype.filter - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.filter.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js index 686a4c5958..7eeac0c1b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js - * @description Array.prototype.filter - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.filter.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-4-9 +description: > + Array.prototype.filter - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.filter.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1-s.js index cff026b7c4..b0198c9d5c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1-s.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1-s.js - * @description Array.prototype.filter - thisArg not passed to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - - [1].filter(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-1-s +description: Array.prototype.filter - thisArg not passed to strict callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + + function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + + [1].filter(callbackfn); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js index 0d39bfd6e2..5deabcf2c1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js - * @description Array.prototype.filter - thisArg is passed - */ - - -function testcase() { - this._15_4_4_20_5_1 = false; - var _15_4_4_20_5_1 = true; - - function callbackfn(val, idx, obj) { - return this._15_4_4_20_5_1; - } - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn); - return resArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-1 +description: Array.prototype.filter - thisArg is passed +includes: [runTestCase.js] +---*/ + +function testcase() { + this._15_4_4_20_5_1 = false; + var _15_4_4_20_5_1 = true; + + function callbackfn(val, idx, obj) { + return this._15_4_4_20_5_1; + } + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn); + return resArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js index 88666e9abb..accc8f87e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js - * @description Array.prototype.filter - Array Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objArray = new Array(10); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objArray; - } - - - var newArr = [11].filter(callbackfn, objArray); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-10 +description: Array.prototype.filter - Array Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objArray = new Array(10); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objArray; + } + + + var newArr = [11].filter(callbackfn, objArray); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js index cd233d0b0e..7eefaefa50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js - * @description Array.prototype.filter - String Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objString = new String(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objString; - } - - var newArr = [11].filter(callbackfn, objString); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-11 +description: Array.prototype.filter - String Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objString = new String(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objString; + } + + var newArr = [11].filter(callbackfn, objString); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js index 068c4248cf..d65987e9b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js - * @description Array.prototype.filter - Boolean Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objBoolean = new Boolean(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objBoolean; - } - - var newArr = [11].filter(callbackfn, objBoolean); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-12 +description: Array.prototype.filter - Boolean Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objBoolean = new Boolean(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objBoolean; + } + + var newArr = [11].filter(callbackfn, objBoolean); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js index 103bb21fc5..25e17554e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js - * @description Array.prototype.filter - Number Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objNumber = new Number(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objNumber; - } - - var newArr = [11].filter(callbackfn, objNumber); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-13 +description: Array.prototype.filter - Number Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objNumber = new Number(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objNumber; + } + + var newArr = [11].filter(callbackfn, objNumber); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js index 396c63d9c8..b1d11cd287 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js - * @description Array.prototype.filter - the Math object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === Math; - } - - var newArr = [11].filter(callbackfn, Math); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-14 +description: Array.prototype.filter - the Math object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === Math; + } + + var newArr = [11].filter(callbackfn, Math); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js index 92ba2038f9..3c4ae3370e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js - * @description Array.prototype.filter - Date Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - var objDate = new Date(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objDate; - } - - var newArr = [11].filter(callbackfn, objDate); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-15 +description: Array.prototype.filter - Date Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var objDate = new Date(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objDate; + } + + var newArr = [11].filter(callbackfn, objDate); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js index 529070b4e0..2eef41cad2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js - * @description Array.prototype.filter - RegExp Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - var objRegExp = new RegExp(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objRegExp; - } - - var newArr = [11].filter(callbackfn, objRegExp); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-16 +description: Array.prototype.filter - RegExp Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var objRegExp = new RegExp(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objRegExp; + } + + var newArr = [11].filter(callbackfn, objRegExp); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js index ab56608aa7..66239fb609 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js - * @description Array.prototype.filter - the JSON object can be used as thisArg - */ - - -function testcase() { - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === JSON; - } - - var newArr = [11].filter(callbackfn, JSON); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-17 +description: Array.prototype.filter - the JSON object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === JSON; + } + + var newArr = [11].filter(callbackfn, JSON); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js index 699a11a848..3ac3d81a1f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js - * @description Array.prototype.filter - Error Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objError = new RangeError(); - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objError; - } - - var newArr = [11].filter(callbackfn, objError); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-18 +description: Array.prototype.filter - Error Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objError = new RangeError(); + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objError; + } + + var newArr = [11].filter(callbackfn, objError); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js index 7fbbcd6db6..0b0d423039 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js - * @description Array.prototype.filter - the Arguments object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var arg; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === arg; - } - - (function fun() { - arg = arguments; - }(1, 2, 3)); - - var newArr = [11].filter(callbackfn, arg); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-19 +description: > + Array.prototype.filter - the Arguments object can be used as + thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arg; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === arg; + } + + (function fun() { + arg = arguments; + }(1, 2, 3)); + + var newArr = [11].filter(callbackfn, arg); + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js index 51f8f6d836..14199644fc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js - * @description Array.prototype.filter - thisArg is Object - */ - - -function testcase() { - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,o); - if( resArr.length === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-2 +description: Array.prototype.filter - thisArg is Object +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var o = new Object(); + o.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn,o); + if( resArr.length === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js index e4f2763de9..ba2d83cb2b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js - * @description Array.prototype.filter - the global object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === fnGlobalObject(); - } - - var newArr = [11].filter(callbackfn, fnGlobalObject()); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-21 +description: Array.prototype.filter - the global object can be used as thisArg +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === fnGlobalObject(); + } + + var newArr = [11].filter(callbackfn, fnGlobalObject()); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js index 08804d5a56..179be7efce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js - * @description Array.prototype.filter - boolean primitive can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === false; - } - - var newArr = [11].filter(callbackfn, false); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-22 +description: Array.prototype.filter - boolean primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === false; + } + + var newArr = [11].filter(callbackfn, false); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js index aa9167d18a..efd7fcda20 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js - * @description Array.prototype.filter - number primitive can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === 101; - } - - var newArr = [11].filter(callbackfn, 101); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-23 +description: Array.prototype.filter - number primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === 101; + } + + var newArr = [11].filter(callbackfn, 101); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js index fd046462cf..8da36dbee2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js - * @description Array.prototype.filter - string primitive can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === "abc"; - } - - var newArr = [11].filter(callbackfn, "abc"); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-24 +description: Array.prototype.filter - string primitive can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === "abc"; + } + + var newArr = [11].filter(callbackfn, "abc"); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js index 2cd66d7d96..4988a2d2e0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js - * @description Array.prototype.filter - Array.isArray(arg) returns true when arg is the returned array - */ - - -function testcase() { - - var newArr = [11].filter(function () { }); - - return Array.isArray(newArr); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-27 +description: > + Array.prototype.filter - Array.isArray(arg) returns true when arg + is the returned array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newArr = [11].filter(function () { }); + + return Array.isArray(newArr); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js index 64cf6a3509..e84c6dd77a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js - * @description Array.prototype.filter - the returned array is instanceof Array - */ - - -function testcase() { - - var newArr = [11].filter(function () { }); - - return newArr instanceof Array; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-28 +description: Array.prototype.filter - the returned array is instanceof Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newArr = [11].filter(function () { }); + + return newArr instanceof Array; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js index b9af889612..ccf5fcc9db 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js - * @description Array.prototype.filter - returns an array whose length is 0 - */ - - -function testcase() { - - var newArr = [11].filter(function () { }); - - return newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-29 +description: Array.prototype.filter - returns an array whose length is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var newArr = [11].filter(function () { }); + + return newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js index 0bd6806dad..887e47b25e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js - * @description Array.prototype.filter - thisArg is Array - */ - - -function testcase() { - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } - - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,a); - if( resArr.length === 1) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-3 +description: Array.prototype.filter - thisArg is Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + var a = new Array(); + a.res = true; + function callbackfn(val, idx, obj) + { + return this.res; + } + + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn,a); + if( resArr.length === 1) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js index e1596a799e..b75b07f440 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js - * @description Array.prototype.filter - thisArg not passed - */ - - -function testcase() { - function innerObj() { - this._15_4_4_20_5_30 = true; - var _15_4_4_20_5_30 = false; - - function callbackfn(val, idx, obj) { - return this._15_4_4_20_5_30; - } - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn); - this.retVal = resArr.length === 0; - } - return new innerObj().retVal; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-30 +description: Array.prototype.filter - thisArg not passed +includes: [runTestCase.js] +---*/ + +function testcase() { + function innerObj() { + this._15_4_4_20_5_30 = true; + var _15_4_4_20_5_30 = false; + + function callbackfn(val, idx, obj) { + return this._15_4_4_20_5_30; + } + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn); + this.retVal = resArr.length === 0; + } + return new innerObj().retVal; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js index dfc8583e3b..3163da069b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js - * @description Array.prototype.filter - thisArg is object from object template(prototype) - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.prototype.res = true; - var f = new foo(); - - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,f); - if( resArr.length === 1) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-4 +description: > + Array.prototype.filter - thisArg is object from object + template(prototype) +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.prototype.res = true; + var f = new foo(); + + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn,f); + if( resArr.length === 1) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js index c86dc51945..94a765b776 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js - * @description Array.prototype.filter - thisArg is object from object template - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - var f = new foo(); - f.res = true; - - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,f); - if( resArr.length === 1) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-5 +description: Array.prototype.filter - thisArg is object from object template +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + var f = new foo(); + f.res = true; + + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn,f); + if( resArr.length === 1) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js index aa9f9b6ffb..1113f36504 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js - * @description Array.prototype.filter - thisArg is function - */ - - -function testcase() { - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } - - function foo(){} - foo.res = true; - - var srcArr = [1]; - var resArr = srcArr.filter(callbackfn,foo); - if( resArr.length === 1) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-6 +description: Array.prototype.filter - thisArg is function +includes: [runTestCase.js] +---*/ + +function testcase() { + var res = false; + function callbackfn(val, idx, obj) + { + return this.res; + } + + function foo(){} + foo.res = true; + + var srcArr = [1]; + var resArr = srcArr.filter(callbackfn,foo); + if( resArr.length === 1) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js index 430bb4238a..30441923ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js - * @description Array.prototype.filter - built-in functions can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === eval; - } - - var newArr = [11].filter(callbackfn, eval); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-7 +description: Array.prototype.filter - built-in functions can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === eval; + } + + var newArr = [11].filter(callbackfn, eval); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js index dd4e331477..2b9db43934 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js - * @description Array.prototype.filter - Function Object can be used as thisArg - */ - - -function testcase() { - - var accessed = false; - var objFunction = function () { }; - - function callbackfn(val, idx, obj) { - accessed = true; - return this === objFunction; - } - - var newArr = [11].filter(callbackfn, objFunction); - - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-5-9 +description: Array.prototype.filter - Function Object can be used as thisArg +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objFunction = function () { }; + + function callbackfn(val, idx, obj) { + accessed = true; + return this === objFunction; + } + + var newArr = [11].filter(callbackfn, objFunction); + + return newArr[0] === 11 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js index fab568d2c5..b29461917b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js @@ -1,20 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (empty array) - */ - - -function testcase() { - function cb(){} - var a = [].filter(cb); - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-1 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb(){} + var a = [].filter(cb); + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js index 1f65e43c9a..868d55124a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-2 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js index de83325a3c..b23bb52186 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-3 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js index 9d65eb3af9..df715e6a0d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-4 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden to 0 (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js index 8ead2217f1..d064836b19 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-5 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js index da854c1d3c..3f2dc87c10 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-6 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js index 43652d6e56..f9a161aafb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-7 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden with obj w/o valueOf + (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js index 2efeab87b0..5e43b9df1f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js - * @description Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with [] - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - var a = f.filter(cb); - - if (Array.isArray(a) && - a.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-6-8 +description: > + Array.prototype.filter returns an empty array if 'length' is 0 + (subclassed Array, length overridden with [] +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + var a = f.filter(cb); + + if (Array.isArray(a) && + a.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js index 69b7498bf2..9756e18374 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js - * @description Array.prototype.filter doesn't consider new elements added to array after it is called - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - srcArr[2] = 3; - srcArr[5] = 6; - return true; - } - - var srcArr = [1, 2, , 4, 5]; - var resArr = srcArr.filter(callbackfn); - return resArr.length === 5; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-1 +description: > + Array.prototype.filter doesn't consider new elements added to + array after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + srcArr[2] = 3; + srcArr[5] = 6; + return true; + } + + var srcArr = [1, 2, , 4, 5]; + var resArr = srcArr.filter(callbackfn); + return resArr.length === 5; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js index b6b5fc3e86..5b24e1f229 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js - * @description Array.prototype.filter considers new value of elements in array after it is called - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - srcArr[2] = -1; - srcArr[4] = -1; - if(val > 0) - return true; - else - return false; - } - - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); - if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-2 +description: > + Array.prototype.filter considers new value of elements in array + after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + srcArr[2] = -1; + srcArr[4] = -1; + if(val > 0) + return true; + else + return false; + } + + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.filter(callbackfn); + if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js index f59db35c73..49153f7f5f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js - * @description Array.prototype.filter doesn't visit deleted elements in array after the call - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - delete srcArr[2]; - delete srcArr[4]; - if(val > 0) - return true; - else - return false; - } - - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); - if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4 ) // two elements deleted - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-3 +description: > + Array.prototype.filter doesn't visit deleted elements in array + after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + delete srcArr[2]; + delete srcArr[4]; + if(val > 0) + return true; + else + return false; + } + + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.filter(callbackfn); + if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4 ) // two elements deleted + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js index 7391b6ac96..90d065ffb7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js - * @description Array.prototype.filter doesn't visit deleted elements when Array.length is decreased - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - srcArr.length = 2; - return true; - } - - var srcArr = [1,2,3,4,6]; - var resArr = srcArr.filter(callbackfn); - if(resArr.length === 2 ) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-4 +description: > + Array.prototype.filter doesn't visit deleted elements when + Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + srcArr.length = 2; + return true; + } + + var srcArr = [1,2,3,4,6]; + var resArr = srcArr.filter(callbackfn); + if(resArr.length === 2 ) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js index 3750be13ec..c6b503dd50 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js - * @description Array.prototype.filter doesn't consider newly added elements in sparse array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - srcArr[1000] = 3; - return true; - } - - var srcArr = new Array(10); - srcArr[1] = 1; - srcArr[2] = 2; - var resArr = srcArr.filter(callbackfn); - if( resArr.length === 2) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-5 +description: > + Array.prototype.filter doesn't consider newly added elements in + sparse array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + srcArr[1000] = 3; + return true; + } + + var srcArr = new Array(10); + srcArr[1] = 1; + srcArr[2] = 2; + var resArr = srcArr.filter(callbackfn); + if( resArr.length === 2) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js index 268b946a37..edc64a29f7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js - * @description Array.prototype.filter visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - function callbackfn(val, idx, obj) - { - delete srcArr[2]; - delete srcArr[4]; - if(val > 0) - return true; - else - return false; - } - - Array.prototype[4] = 5; - var srcArr = [1,2,3,4,5]; - var resArr = srcArr.filter(callbackfn); - delete Array.prototype[4]; - if(resArr.length === 4 && resArr[0] === 1 && resArr[3] == 5) // only one element deleted - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-6 +description: > + Array.prototype.filter visits deleted element in array after the + call when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) + { + delete srcArr[2]; + delete srcArr[4]; + if(val > 0) + return true; + else + return false; + } + + Array.prototype[4] = 5; + var srcArr = [1,2,3,4,5]; + var resArr = srcArr.filter(callbackfn); + delete Array.prototype[4]; + if(resArr.length === 4 && resArr[0] === 1 && resArr[3] == 5) // only one element deleted + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js index 940a89505c..60b1ba1a87 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js - * @description Array.prototype.filter stops calling callbackfn once the array is deleted during the call - */ - - -function testcase() { - var o = new Object(); - o.srcArr = [1, 2, 3, 4, 5]; - - function callbackfn(val, idx, obj) { - delete o.srcArr; - if (val > 0) - return true; - else - return false; - } - - var resArr = o.srcArr.filter(callbackfn); - return resArr.length === 5 && typeof o.srcArr === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-7 +description: > + Array.prototype.filter stops calling callbackfn once the array is + deleted during the call +includes: [runTestCase.js] +---*/ + +function testcase() { + var o = new Object(); + o.srcArr = [1, 2, 3, 4, 5]; + + function callbackfn(val, idx, obj) { + delete o.srcArr; + if (val > 0) + return true; + else + return false; + } + + var resArr = o.srcArr.filter(callbackfn); + return resArr.length === 5 && typeof o.srcArr === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js index cfec8a475a..3724d01340 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js - * @description Array.prototype.filter - no observable effects occur if len is 0 - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } - - var obj = { 0: 11, 1: 12, length: 0 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return accessed === false && obj.length === 0 && newArr.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-8 +description: Array.prototype.filter - no observable effects occur if len is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; + } + + var obj = { 0: 11, 1: 12, length: 0 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return accessed === false && obj.length === 0 && newArr.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js index 34bb276a4a..e710059494 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js - * @description Array.prototype.filter - modifications to length don't change number of iterations - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return true; - } - - var obj = { 1: 12, 2: 9, length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2 && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-9 +description: > + Array.prototype.filter - modifications to length don't change + number of iterations +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return true; + } + + var obj = { 1: 12, 2: 9, length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + obj.length = 3; + return 11; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2 && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js index eeef377736..ccf0703982 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js - * @description Array.prototype.filter - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return false; - } - - var srcArr = new Array(10); - srcArr[1] = undefined; //explicitly assigning a value - var resArr = srcArr.filter(callbackfn); - if( resArr.length === 0 && callCnt === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-1 +description: > + Array.prototype.filter - callbackfn not called for indexes never + been assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(val, idx, obj) + { + callCnt++; + return false; + } + + var srcArr = new Array(10); + srcArr[1] = undefined; //explicitly assigning a value + var resArr = srcArr.filter(callbackfn); + if( resArr.length === 0 && callCnt === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js index d84c01439e..24edfc41bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js - * @description Array.prototype.filter - deleting property of prototype causes prototype index property not to be visited on an Array-like Object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2 && newArr[1] !== 1; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-10 +description: > + Array.prototype.filter - deleting property of prototype causes + prototype index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete Object.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2 && newArr[1] !== 1; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js index 39a19babc9..3ccca064f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js - * @description Array.prototype.filter - deleting property of prototype causes prototype index property not to be visited on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - var newArr = arr.filter(callbackfn); - return newArr.length === 2 && newArr[1] !== 1; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-11 +description: > + Array.prototype.filter - deleting property of prototype causes + prototype index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + var newArr = arr.filter(callbackfn); + return newArr.length === 2 && newArr[1] !== 1; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js index a3f6eb33d0..115b46f7a0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js - * @description Array.prototype.filter - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return true; - } - var obj = { 0: 0, 1: 111, 2: 2, length: 10 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 3 && newArr[1] === 1; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-12 +description: > + Array.prototype.filter - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return true; + } + var obj = { 0: 0, 1: 111, 2: 2, length: 10 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 3 && newArr[1] === 1; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js index e6d30405bf..6fbb081907 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js - * @description Array.prototype.filter - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val < 3 ? true : false; - } - var arr = [0, 111, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - var newArr = arr.filter(callbackfn); - - return newArr.length === 3 && newArr[1] === 1; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-13 +description: > + Array.prototype.filter - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val < 3 ? true : false; + } + var arr = [0, 111, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + var newArr = arr.filter(callbackfn); + + return newArr.length === 3 && newArr[1] === 1; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js index ac233d7985..2b10872dfa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js - * @description Array.prototype.filter - decreasing length of array causes index property not to be visited - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, 1, 2, "last"]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - - return newArr.length === 3 && newArr[2] === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-14 +description: > + Array.prototype.filter - decreasing length of array causes index + property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + var arr = [0, 1, 2, "last"]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 3; + return 0; + }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + + return newArr.length === 3 && newArr[2] === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js index f510e0307a..0e370a4ef0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js - * @description Array.prototype.filter - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, 1, 2]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - return newArr.length === 3 && newArr[2] === "prototype"; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-15 +description: > + Array.prototype.filter - decreasing length of array with prototype + property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return true; + } + var arr = [0, 1, 2]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + return newArr.length === 3 && newArr[2] === "prototype"; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js index af6c29be3a..323bf2e1cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js - * @description Array.prototype.filter - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var arr = [0, 1, 2]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - return newArr.length === 3 && newArr[2] === "unconfigurable"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-16 +description: > + Array.prototype.filter - decreasing length of array does not + delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var arr = [0, 1, 2]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "1", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + return newArr.length === 3 && newArr[2] === "unconfigurable"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js index b561443139..e6dfa69b0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js - * @description Array.prototype.filter - added properties in step 2 are visible here - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "length"; - return 3; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === "length"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-2 +description: > + Array.prototype.filter - added properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + obj[2] = "length"; + return 3; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === "length"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js index 4835685172..80826deee8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js - * @description Array.prototype.filter - deleted properties in step 2 are visible here - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - var obj = { 2: 6.99, 8: 19 }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 10; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] !== 6.99; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-3 +description: > + Array.prototype.filter - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + var obj = { 2: 6.99, 8: 19 }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[2]; + return 10; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] !== 6.99; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js index 9e60ba7f8c..92c46657fc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js - * @description Array.prototype.filter - properties added into own object after current position are visited on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2 && newArr[1] === 6.99; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-4 +description: > + Array.prototype.filter - properties added into own object after + current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2 && newArr[1] === 6.99; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js index 7b5f4073a6..dd7dd0e2ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js - * @description Array.prototype.filter - properties added into own object after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return true; - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - return newArr.length === 3 && newArr[1] === 6.99; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-5 +description: > + Array.prototype.filter - properties added into own object after + current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return true; + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + return newArr.length === 3 && newArr[1] === 6.99; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js index c39fd82ea7..871ea26dd0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js - * @description Array.prototype.filter - properties can be added to prototype after current position are visited on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return true; - } - var obj = { length: 2 }; - - try { - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2 && Array[1] === 6.99; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-6 +description: > + Array.prototype.filter - properties can be added to prototype + after current position are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return true; + } + var obj = { length: 2 }; + + try { + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2 && Array[1] === 6.99; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js index 72c0eb82b1..7713fb301f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js - * @description Array.prototype.filter - properties can be added to prototype after current position are visited on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return true; - } - var arr = [0, , 2]; - - try { - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - return newArr.length === 3 && newArr[1] === 6.99; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-7 +description: > + Array.prototype.filter - properties can be added to prototype + after current position are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return true; + } + var arr = [0, , 2]; + + try { + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + return newArr.length === 3 && newArr[1] === 6.99; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js index 2678ea067f..7ba87b852d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js - * @description Array.prototype.filter - deleting own property causes index property not to be visited on an Array-like object - */ - - -function testcase() { - var accessed = false; - var obj = { length: 2 }; - - function callbackfn(val, idx, o) { - accessed = true; - return true; - } - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-8 +description: > + Array.prototype.filter - deleting own property causes index + property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var accessed = false; + var obj = { length: 2 }; + + function callbackfn(val, idx, o) { + accessed = true; + return true; + } + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js index 5071b8de61..a155261f72 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js - * @description Array.prototype.filter - deleting own property causes index property not to be visited on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - var arr = [1, 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-b-9 +description: > + Array.prototype.filter - deleting own property causes index + property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + var arr = [1, 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js index 8b7f210d4e..77070158df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js - * @description Array.prototype.filter - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var kValue = {}; - function callbackfn(val, idx, obj) { - return (idx === 5) && (val === kValue); - } - - var obj = { 5: kValue, length: 100 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === kValue; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-1 +description: > + Array.prototype.filter - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = {}; + function callbackfn(val, idx, obj) { + return (idx === 5) && (val === kValue); + } + + var obj = { 5: kValue, length: 100 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === kValue; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js index ebcf49e5fc..d30aa1e4bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js - * @description Array.prototype.filter - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 2 && val === 12; - } - - var arr = []; - - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-10 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 2 && val === 12; + } + + var arr = []; + + Object.defineProperty(arr, "2", { + get: function () { + return 12; + }, + configurable: true + }); + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js index 492545e30b..2116a44910 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js - * @description Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } - - var proto = { 0: 5, 1: 6 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-11 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; + } + + var proto = { 0: 5, 1: 6 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "0", { + get: function () { + return 11; + }, + configurable: true + }); + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js index 8bba896343..3016cef2e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js - * @description Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val === 111 && idx === 0; - } - - var arr = []; - try { - Array.prototype[0] = 10; - - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 111; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-12 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val === 111 && idx === 0; + } + + var arr = []; + try { + Array.prototype[0] = 10; + + Object.defineProperty(arr, "0", { + get: function () { + return 111; + }, + configurable: true + }); + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 111; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js index 5523e38982..7d8ba19387 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js - * @description Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return idx === 1 && val === 12; - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-13 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return idx === 1 && val === 12; + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 6; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + Object.defineProperty(child, "1", { + get: function () { + return 12; + }, + configurable: true + }); + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js index 04644b770d..88c94fb6ce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js - * @description Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } - - var arr = []; - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-14 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; + } + + var arr = []; + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + return 11; + }, + configurable: true + }); + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js index 48a65e0724..fd2407dea5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js - * @description Array.prototype.filter - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val === 11 && idx === 1; - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 20; - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-15 +description: > + Array.prototype.filter - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val === 11 && idx === 1; + } + + var proto = {}; + + Object.defineProperty(proto, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 20; + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js index 4180900838..a72d714ce9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js - * @description Array.prototype.filter - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); - var newArr = [, , , ].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-16 +description: > + Array.prototype.filter - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 11; + }, + configurable: true + }); + var newArr = [, , , ].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js index 4b465c1d62..35d12d576b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js - * @description Array.prototype.filter - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return undefined === val && idx === 1; - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-17 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return undefined === val && idx === 1; + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js index ebcd742269..7b6de6edd7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js - * @description Array.prototype.filter - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return undefined === val && idx === 0; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-18 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return undefined === val && idx === 0; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js index 4f3e65879c..ccb46a74ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js - * @description Array.prototype.filter - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return undefined === val && idx === 1; - } - - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - try { - Object.prototype[1] = 10; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === undefined; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-19 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return undefined === val && idx === 1; + } + + var obj = { length: 2 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + try { + Object.prototype[1] = 10; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === undefined; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js index 58e9960a9a..d8766738bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js - * @description Array.prototype.filter - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - } - - var newArr = [11].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-2 +description: > + Array.prototype.filter - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } + } + + var newArr = [11].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js index cf831394bc..f37e153d1d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js - * @description Array.prototype.filter - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return undefined === val && idx === 0; - } - - var arr = []; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - try { - Array.prototype[0] = 100; - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === undefined; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-20 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return undefined === val && idx === 0; + } + + var arr = []; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + try { + Array.prototype[0] = 100; + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === undefined; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js index aa69086293..cea56dc4bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js - * @description Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val === undefined && idx === 1; - } - - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === undefined; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-21 +description: > + Array.prototype.filter - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val === undefined && idx === 1; + } + + var proto = {}; + Object.defineProperty(proto, "1", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === undefined; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js index bcbb1e2425..8895a0b1e6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js - * @description Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return undefined === val && idx === 0; - } - - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - var newArr = [, ].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === undefined; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-22 +description: > + Array.prototype.filter - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return undefined === val && idx === 0; + } + + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + var newArr = [, ].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === undefined; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js index b702c481a4..676ba5a59b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js @@ -1,29 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js - * @description Array.prototype.filter - This object is the global object which contains index property - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 11; - fnGlobalObject().length = 1; - var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } finally { - delete fnGlobalObject()[0]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-23 +description: > + Array.prototype.filter - This object is the global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 11; + fnGlobalObject().length = 1; + var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } finally { + delete fnGlobalObject()[0]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js index f49124ed6c..faeee8f417 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js - * @description Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val === 11 && idx === 0; - } - - var func = function (a, b) { - return Array.prototype.filter.call(arguments, callbackfn); - }; - - var newArr = func(11); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-25 +description: > + Array.prototype.filter - This object is the Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val === 11 && idx === 0; + } + + var func = function (a, b) { + return Array.prototype.filter.call(arguments, callbackfn); + }; + + var newArr = func(11); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js index 656cc0f674..ef5f9b1258 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js - * @description Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } - - var func = function (a, b) { - return Array.prototype.filter.call(arguments, callbackfn); - }; - var newArr = func(11, 9); - - return newArr.length === 2 && newArr[0] === 11 && - newArr[1] === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-26 +description: > + Array.prototype.filter - This object is the Arguments object which + implements its own property get method (number of arguments equals + number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } + } + + var func = function (a, b) { + return Array.prototype.filter.call(arguments, callbackfn); + }; + var newArr = func(11, 9); + + return newArr.length === 2 && newArr[0] === 11 && + newArr[1] === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js index 7527894b93..6cdfb68c21 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js - * @description Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 12; - } else if (idx === 2) { - return val === 9; - } else { - return false; - } - } - - var func = function (a, b) { - return Array.prototype.filter.call(arguments, callbackfn); - }; - var newArr = func(11, 12, 9); - - return newArr.length === 3 && newArr[0] === 11 && - newArr[1] === 12 && newArr[2] === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-27 +description: > + Array.prototype.filter - This object is the Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 12; + } else if (idx === 2) { + return val === 9; + } else { + return false; + } + } + + var func = function (a, b) { + return Array.prototype.filter.call(arguments, callbackfn); + }; + var newArr = func(11, 12, 9); + + return newArr.length === 3 && newArr[0] === 11 && + newArr[1] === 12 && newArr[2] === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js index b8386acb4b..bf0c393a0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js - * @description Array.prototype.filter - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - var preIterVisible = false; - var arr = []; - - function callbackfn(val, idx, obj) { - return idx === 1 && val === 9; - } - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); - var newArr = arr.filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-28 +description: > + Array.prototype.filter - element changed by getter on previous + iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var preIterVisible = false; + var arr = []; + + function callbackfn(val, idx, obj) { + return idx === 1 && val === 9; + } + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true + }); + var newArr = arr.filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js index 9059990a8a..2b7c4274f6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js - * @description Array.prototype.filter - element changed by getter on previous iterations is observed on an Array-like object - */ - - -function testcase() { - function callbackfn(val, idx, obj) { - return val === 9 && idx === 1; - } - - var preIterVisible = false; - var obj = { length: 2 }; - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 9; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-29 +description: > + Array.prototype.filter - element changed by getter on previous + iterations is observed on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(val, idx, obj) { + return val === 9 && idx === 1; + } + + var preIterVisible = false; + var obj = { length: 2 }; + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return 11; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true + }); + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 9; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js index d363c6930a..d2f16a16b1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js @@ -1,31 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js - * @description Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return (idx === 5) && (val === "abc"); - } - - var proto = { 0: 11, 5: 100 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[5] = "abc"; - child.length = 10; - - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === "abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-3 +description: > + Array.prototype.filter - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return (idx === 5) && (val === "abc"); + } + + var proto = { 0: 11, 5: 100 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[5] = "abc"; + child.length = 10; + + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === "abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js index 4a71236d5f..fb660fff54 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js - * @description Array.prototype.filter - unnhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } - - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.filter.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-30 +description: > + Array.prototype.filter - unnhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; + } + + var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.filter.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js index 157f035f77..71126a045b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js - * @description Array.prototype.filter - unnhandled exceptions happened in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } - - var arr = []; - arr[5] = 10; - arr[10] = 100; - - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.filter(callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-31 +description: > + Array.prototype.filter - unnhandled exceptions happened in getter + terminate iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; + } + + var arr = []; + arr[5] = 10; + arr[10] = 100; + + Object.defineProperty(arr, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.filter(callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js index d6afea0012..cf7f87272c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js - * @description Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return (idx === 0) && (val === 12); - } - - try { - Array.prototype[0] = 11; - var newArr = [12].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 12; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-4 +description: > + Array.prototype.filter - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return (idx === 0) && (val === 12); + } + + try { + Array.prototype[0] = 11; + var newArr = [12].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 12; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js index 4226b2c702..45db619a85 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js - * @description Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); - child[1] = 12; - - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-5 +description: > + Array.prototype.filter - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return idx === 0 && val === 11; + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 5; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "0", { + value: 11, + configurable: true + }); + child[1] = 12; + + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js index 72ebc10f81..e4a63298c2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js - * @description Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val === 11; - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); - var newArr = [11].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-6 +description: > + Array.prototype.filter - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val === 11; + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 9; + }, + configurable: true + }); + var newArr = [11].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js index 0bca7870c9..20fd81101a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js - * @description Array.prototype.filter - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var kValue = 'abc'; - - function callbackfn(val, idx, obj) { - return (idx === 5) && (val === kValue); - } - - var proto = { 5: kValue }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - var newArr = Array.prototype.filter.call(child, callbackfn); - - return newArr.length === 1 && newArr[0] === kValue; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-7 +description: > + Array.prototype.filter - element to be retrieved is inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kValue = 'abc'; + + function callbackfn(val, idx, obj) { + return (idx === 5) && (val === kValue); + } + + var proto = { 5: kValue }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 10; + + var newArr = Array.prototype.filter.call(child, callbackfn); + + return newArr.length === 1 && newArr[0] === kValue; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js index ec075a3ee1..d0428c09a6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js - * @description Array.prototype.filter - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return (idx === 1) && (val === 13); - } - - try { - Array.prototype[1] = 13; - var newArr = [, , , ].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 13; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-8 +description: > + Array.prototype.filter - element to be retrieved is inherited data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return (idx === 1) && (val === 13); + } + + try { + Array.prototype[1] = 13; + var newArr = [, , , ].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 13; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js index 50d83fb606..f1b41ef347 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js - * @description Array.prototype.filter - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return (idx === 0) && (val === 11); - } - - var obj = { 10: 10, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-i-9 +description: > + Array.prototype.filter - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return (idx === 0) && (val === 11); + } + + var obj = { 10: 10, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + return 11; + }, + configurable: true + }); + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js index 48d596041b..cf29605660 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js - * @description Array.prototype.filter - callbackfn called with correct parameters - */ - - -function testcase() { - - var bPar = true; - var bCalled = false; - function callbackfn(val, idx, obj) - { - bCalled = true; - if(obj[idx] !== val) - bPar = false; - } - - var srcArr = [0,1,true,null,new Object(),"five"]; - srcArr[999999] = -6.6; - var resArr = srcArr.filter(callbackfn); - - if(bCalled === true && bPar === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-1 +description: Array.prototype.filter - callbackfn called with correct parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + + var bPar = true; + var bCalled = false; + function callbackfn(val, idx, obj) + { + bCalled = true; + if(obj[idx] !== val) + bPar = false; + } + + var srcArr = [0,1,true,null,new Object(),"five"]; + srcArr[999999] = -6.6; + var resArr = srcArr.filter(callbackfn); + + if(bCalled === true && bPar === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js index 6107644fc0..f24a3c1de1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js - * @description Array.prototype.filter - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - function callbackfn(val) { - return val > 10; - } - var newArr = [12].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-10 +description: > + Array.prototype.filter - callbackfn is called with 1 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val) { + return val > 10; + } + var newArr = [12].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js index cad0f9883a..f7f2c11a64 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js - * @description Array.prototype.filter - callbackfn is called with 2 formal parameter - */ - - -function testcase() { - - function callbackfn(val, idx) { - return val > 10 && arguments[2][idx] === val; - } - var newArr = [11].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-11 +description: > + Array.prototype.filter - callbackfn is called with 2 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx) { + return val > 10 && arguments[2][idx] === val; + } + var newArr = [11].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js index 6f2ff59a73..400cc06e3e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js - * @description Array.prototype.filter - callbackfn is called with 3 formal parameter - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return val > 10 && obj[idx] === val; - } - var newArr = [11].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-12 +description: > + Array.prototype.filter - callbackfn is called with 3 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return val > 10 && obj[idx] === val; + } + var newArr = [11].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js index 3061b78c4c..97f77cd1ee 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js - * @description Array.prototype.filter - callbackfn that uses arguments object to get parameter value - */ - - -function testcase() { - - function callbackfn() { - return arguments[2][arguments[1]] === arguments[0]; - } - var newArr = [11].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-13 +description: > + Array.prototype.filter - callbackfn that uses arguments object to + get parameter value +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return arguments[2][arguments[1]] === arguments[0]; + } + var newArr = [11].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js index 327c76b146..a30bc689ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js - * @description Array.prototype.filter - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return this.valueOf() === false; - } - - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, false); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-16 +description: > + Array.prototype.filter - 'this' of 'callbackfn' is a Boolean + object when T is not an object (T is a boolean) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return this.valueOf() === false; + } + + var obj = { 0: 11, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn, false); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js index 19b9daa342..f67b71884e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js - * @description Array.prototype.filter -'this' of 'callbackfn' is a Number object when T is not an object (T is a number) - */ - - -function testcase() { - - function callbackfn(val, idx, o) { - return 5 === this.valueOf(); - } - - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, 5); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-17 +description: > + Array.prototype.filter -'this' of 'callbackfn' is a Number object + when T is not an object (T is a number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, o) { + return 5 === this.valueOf(); + } + + var obj = { 0: 11, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn, 5); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js index fda004d5c9..cd78cd81a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js - * @description Array.prototype.filter - 'this' of 'callbackfn' is an String object when T is not an object (T is a string) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return 'hello' === this.valueOf(); - } - - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, "hello"); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-18 +description: > + Array.prototype.filter - 'this' of 'callbackfn' is an String + object when T is not an object (T is a string) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return 'hello' === this.valueOf(); + } + + var obj = { 0: 11, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn, "hello"); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js index a019570e32..46ebc8b13c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js - * @description Array.prototype.filter - non-indexed properties are not called - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return val === 8; - } - - var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-19 +description: Array.prototype.filter - non-indexed properties are not called +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return val === 8; + } + + var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js index bd1eb409f4..f28b18d4ee 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js - * @description Array.prototype.filter - callbackfn takes 3 arguments - */ - - -function testcase() { - - var parCnt = 3; - var bCalled = false - function callbackfn(val, idx, obj) - { - bCalled = true; - if(arguments.length !== 3) - parCnt = arguments.length; //verify if callbackfn was called with 3 parameters - } - - var srcArr = [0,1,2,3,4,5,6,7,8,9]; - var resArr = srcArr.filter(callbackfn); - if(bCalled === true && parCnt === 3) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-2 +description: Array.prototype.filter - callbackfn takes 3 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var parCnt = 3; + var bCalled = false + function callbackfn(val, idx, obj) + { + bCalled = true; + if(arguments.length !== 3) + parCnt = arguments.length; //verify if callbackfn was called with 3 parameters + } + + var srcArr = [0,1,2,3,4,5,6,7,8,9]; + var resArr = srcArr.filter(callbackfn); + if(bCalled === true && parCnt === 3) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js index be1376e457..d84d14321e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js - * @description Array.prototype.filter - callbackfn called with correct parameters (thisArg is correct) - */ - - -function testcase() { - - var thisArg = { threshold: 10 }; - - function callbackfn(val, idx, obj) { - return this === thisArg; - } - - var obj = { 0: 11, length: 1 }; - var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-20 +description: > + Array.prototype.filter - callbackfn called with correct parameters + (thisArg is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var thisArg = { threshold: 10 }; + + function callbackfn(val, idx, obj) { + return this === thisArg; + } + + var obj = { 0: 11, length: 1 }; + var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js index d52e2ef0e9..e639c6ff95 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js - * @description Array.prototype.filter - callbackfn called with correct parameters (kValue is correct) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - - if (idx === 1) { - return val === 12; - } - - return false; - } - - var obj = { 0: 11, 1: 12, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-21 +description: > + Array.prototype.filter - callbackfn called with correct parameters + (kValue is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 11; + } + + if (idx === 1) { + return val === 12; + } + + return false; + } + + var obj = { 0: 11, 1: 12, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js index bf7a1f9723..3fffc7d9ef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js - * @description Array.prototype.filter - callbackfn called with correct parameters (the index k is correct) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - if (val === 11) { - return idx === 0; - } - - if (val === 12) { - return idx === 1; - } - - return false; - } - - var obj = { 0: 11, 1: 12, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-22 +description: > + Array.prototype.filter - callbackfn called with correct parameters + (the index k is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + if (val === 11) { + return idx === 0; + } + + if (val === 12) { + return idx === 1; + } + + return false; + } + + var obj = { 0: 11, 1: 12, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js index 5f670b467e..b95237dd1e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js - * @description Array.prototype.filter - callbackfn called with correct parameters (this object O is correct) - */ - - -function testcase() { - - var obj = { 0: 11, length: 2 }; - - function callbackfn(val, idx, o) { - return obj === o; - } - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-23 +description: > + Array.prototype.filter - callbackfn called with correct parameters + (this object O is correct) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, length: 2 }; + + function callbackfn(val, idx, o) { + return obj === o; + } + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js index 4d94c159af..41362b9428 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js - * @description Array.prototype.filter - k values are passed in ascending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return false; - } else { - lastIdx++; - return true; - } - } - var newArr = arr.filter(callbackfn); - - return newArr.length === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-4 +description: > + Array.prototype.filter - k values are passed in ascending numeric + order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4, 5]; + var lastIdx = 0; + var called = 0; + function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return false; + } else { + lastIdx++; + return true; + } + } + var newArr = arr.filter(callbackfn); + + return newArr.length === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js index 1027c64057..513f455981 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js - * @description Array.prototype.filter - k values are accessed during each iteration and not prior to starting the loop on an Array - */ - - -function testcase() { - - var kIndex = []; - var called = 0; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means k is accessed one time during iterations. - if (kIndex[idx] === undefined) { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && kIndex[idx - 1] === undefined) { - return true; - } - kIndex[idx] = 1; - return false; - } else { - return true; - } - } - var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); - - return newArr.length === 0 && called === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-5 +description: > + Array.prototype.filter - k values are accessed during each + iteration and not prior to starting the loop on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var kIndex = []; + var called = 0; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means k is accessed one time during iterations. + if (kIndex[idx] === undefined) { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && kIndex[idx - 1] === undefined) { + return true; + } + kIndex[idx] = 1; + return false; + } else { + return true; + } + } + var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); + + return newArr.length === 0 && called === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js index 7e8e210176..5fe8bde58d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js - * @description Array.prototype.filter - arguments to callbackfn are self consistent - */ - - -function testcase() { - - var obj = { 0: 11, length: 1 }; - var thisArg = {}; - - function callbackfn() { - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } - - var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-6 +description: > + Array.prototype.filter - arguments to callbackfn are self + consistent +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, length: 1 }; + var thisArg = {}; + + function callbackfn() { + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; + } + + var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js index 1b4fa8423d..34197d0327 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js - * @description Array.prototype.filter - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - if (called === 1) { - throw new Error("Exception occurred in callbackfn"); - } - return true; - } - - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; - - try { - Array.prototype.filter.call(obj, callbackfn); - return false; - } catch (ex) { - return 1 === called && ex instanceof Error; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-7 +description: > + Array.prototype.filter - unhandled exceptions happened in + callbackfn terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + if (called === 1) { + throw new Error("Exception occurred in callbackfn"); + } + return true; + } + + var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; + + try { + Array.prototype.filter.call(obj, callbackfn); + return false; + } catch (ex) { + return 1 === called && ex instanceof Error; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js index 4c25ec1eef..6e83673763 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js - * @description Array.prototype.filter - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12, length: 2 }; - - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } - - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-8 +description: > + Array.prototype.filter - element changed by callbackfn on previous + iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12, length: 2 }; + + function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; + } + + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js index 34030ff0d4..b3d57a1be2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js - * @description Array.prototype.filter - callbackfn is called with 0 formal parameter - */ - - -function testcase() { - - function callbackfn() { - return true; - } - var newArr = [11].filter(callbackfn); - - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-ii-9 +description: > + Array.prototype.filter - callbackfn is called with 0 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return true; + } + var newArr = [11].filter(callbackfn); + + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js index 2eed950e9d..d05dc2928c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js - * @description Array.prototype.filter - value of returned array element equals to 'kValue' - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - return newArr[0] === obj[0] && newArr[1] === obj[1]; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1-1 +description: > + Array.prototype.filter - value of returned array element equals to + 'kValue' +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + return newArr[0] === obj[0] && newArr[1] === obj[1]; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js index 9e89079fb3..c6cbe0d6cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js - * @description Array.prototype.filter - value of returned array element can be overwritten - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - try { - var tempVal = newArr[1]; - newArr[1] += 1; - return newArr[1] !== tempVal; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1-2 +description: > + Array.prototype.filter - value of returned array element can be + overwritten +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + try { + var tempVal = newArr[1]; + newArr[1] += 1; + return newArr[1] !== tempVal; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js index 1ad2c00bf8..5ac851f5e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js - * @description Array.prototype.filter - value of returned array element can be enumerated - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - var prop; - var enumerable = false; - for (prop in newArr) { - if (newArr.hasOwnProperty(prop)) { - if (prop === "0") { - enumerable = true; - } - } - } - - return enumerable; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1-3 +description: > + Array.prototype.filter - value of returned array element can be + enumerated +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + var prop; + var enumerable = false; + for (prop in newArr) { + if (newArr.hasOwnProperty(prop)) { + if (prop === "0") { + enumerable = true; + } + } + } + + return enumerable; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js index b63a39c44e..a3efc0439d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js - * @description Array.prototype.filter - value of returned array element can be changed or deleted - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, 1: 9, length: 2 }; - var newArr = Array.prototype.filter.call(obj, callbackfn); - - try { - var tempVal = newArr[1]; - delete newArr[1]; - return tempVal !== undefined && newArr[1] === undefined; - } catch (ex) { - return false; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1-4 +description: > + Array.prototype.filter - value of returned array element can be + changed or deleted +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, 1: 9, length: 2 }; + var newArr = Array.prototype.filter.call(obj, callbackfn); + + try { + var tempVal = newArr[1]; + delete newArr[1]; + return tempVal !== undefined && newArr[1] === undefined; + } catch (ex) { + return false; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js index 5db52838fa..b76daa6dfe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js - * @description Array.prototype.filter - values of 'to' are passed in acending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4]; - var lastToIdx = 0; - var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (lastToIdx !== idx) { - return false; - } else { - lastToIdx++; - return true; - } - } - var newArr = arr.filter(callbackfn); - - return newArr.length === 5 && called === 5; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1-5 +description: > + Array.prototype.filter - values of 'to' are passed in acending + numeric order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4]; + var lastToIdx = 0; + var called = 0; + function callbackfn(val, idx, obj) { + called++; + if (lastToIdx !== idx) { + return false; + } else { + lastToIdx++; + return true; + } + } + var newArr = arr.filter(callbackfn); + + return newArr.length === 5 && called === 5; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js index 32b781a64a..13b4628273 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js - * @description Array.prototype.filter - values of 'to' are accessed during each iteration when 'selected' is converted to true and not prior to starting the loop - */ - - -function testcase() { - - var toIndex = []; - var called = 0; - - //By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means 'to' is accessed one time during iterations. - if (toIndex[idx] === undefined) { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && toIndex[idx - 1] === undefined) { - return false; - } - toIndex[idx] = 1; - return true; - } else { - return false; - } - } - var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); - - return newArr.length === 4 && called === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1-6 +description: > + Array.prototype.filter - values of 'to' are accessed during each + iteration when 'selected' is converted to true and not prior to + starting the loop +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toIndex = []; + var called = 0; + + //By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means 'to' is accessed one time during iterations. + if (toIndex[idx] === undefined) { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && toIndex[idx - 1] === undefined) { + return false; + } + toIndex[idx] = 1; + return true; + } else { + return false; + } + } + var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); + + return newArr.length === 4 && called === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js index 7c48aca137..af4c9429f1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js - * @description Array.prototype.filter - getOwnPropertyDescriptor(all true) of returned array element - */ - - -function testcase() { - - function callbackfn(val, idx, obj){ - if(val % 2) - return true; - else - return false; - } - var srcArr = [0,1,2,3,4]; - var resArr = srcArr.filter(callbackfn); - if (resArr.length > 0){ - var desc = Object.getOwnPropertyDescriptor(resArr, 1) - if(desc.value === 3 && //srcArr[1] = true - desc.writable === true && - desc.enumerable === true && - desc.configurable === true){ - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-1 +description: > + Array.prototype.filter - getOwnPropertyDescriptor(all true) of + returned array element +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj){ + if(val % 2) + return true; + else + return false; + } + var srcArr = [0,1,2,3,4]; + var resArr = srcArr.filter(callbackfn); + if (resArr.length > 0){ + var desc = Object.getOwnPropertyDescriptor(resArr, 1) + if(desc.value === 3 && //srcArr[1] = true + desc.writable === true && + desc.enumerable === true && + desc.configurable === true){ + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js index 9cf805a877..6f77818904 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js - * @description Array.prototype.filter return value of callbackfn is a number (value is negative number) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return -5; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-10 +description: > + Array.prototype.filter return value of callbackfn is a number + (value is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return -5; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js index 3680e0a0b9..f23846ef04 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js - * @description Array.prototype.filter return value of callbackfn is a number (value is Infinity) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return Infinity; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-11 +description: > + Array.prototype.filter return value of callbackfn is a number + (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return Infinity; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js index 9d757dd374..d2d1407259 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js - * @description Array.prototype.filter return value of callbackfn is a number (value is -Infinity) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return -Infinity; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-12 +description: > + Array.prototype.filter return value of callbackfn is a number + (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return -Infinity; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js index 31454c215a..c435e08970 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js - * @description Array.prototype.filter return value of callbackfn is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-13 +description: > + Array.prototype.filter return value of callbackfn is a number + (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return NaN; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js index e43b91d12d..8d771f7386 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js - * @description Array.prototype.filter return value of callbackfn is an empty string - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-14 +description: > + Array.prototype.filter return value of callbackfn is an empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return ""; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js index e65a5b2632..236b7fcdba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js - * @description Array.prototype.filter return value of callbackfn is a non-empty string - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return "non-empty string"; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-15 +description: > + Array.prototype.filter return value of callbackfn is a non-empty + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return "non-empty string"; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js index 3cf3545597..2581d98bac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js - * @description Array.prototype.filter return value of callbackfn is a Function object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return function () { }; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-16 +description: > + Array.prototype.filter return value of callbackfn is a Function + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return function () { }; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js index 3043d48e4c..2264721a69 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js - * @description Array.prototype.filter return value of callbackfn is an Array object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Array(10); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-17 +description: > + Array.prototype.filter return value of callbackfn is an Array + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Array(10); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js index 0212755935..e1e944ca0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js - * @description Array.prototype.filter return value of callbackfn is a String object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new String(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-18 +description: > + Array.prototype.filter return value of callbackfn is a String + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new String(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js index 6db0b0e3d7..7a9205da89 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js - * @description Array.prototype.filter return value of callbackfn is a Boolean object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Boolean(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-19 +description: > + Array.prototype.filter return value of callbackfn is a Boolean + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Boolean(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js index 5a2602afc8..7f7211b2af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js - * @description Array.prototype.filter - return value of callbackfn is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, o) { - accessed = true; - return undefined; - } - - var obj = { 0: 11, length: 1 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-2 +description: Array.prototype.filter - return value of callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, o) { + accessed = true; + return undefined; + } + + var obj = { 0: 11, length: 1 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js index 94c8664892..288ccfec10 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js - * @description Array.prototype.filter - return value of callbackfn is a Number object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Number(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-20 +description: > + Array.prototype.filter - return value of callbackfn is a Number + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Number(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js index 3fdf2663e3..a5c272ab0f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js - * @description Array.prototype.filter - return value of callbackfn is the Math object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return Math; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-21 +description: > + Array.prototype.filter - return value of callbackfn is the Math + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return Math; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js index 237bfdae60..93d16ba254 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js - * @description Array.prototype.filter - return value of callbackfn is a Date object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Date(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-22 +description: > + Array.prototype.filter - return value of callbackfn is a Date + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Date(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js index 22e5278964..4f796514ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js - * @description Array.prototype.filter - return value of callbackfn is a RegExp object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new RegExp(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-23 +description: > + Array.prototype.filter - return value of callbackfn is a RegExp + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new RegExp(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js index 24f2b160f6..2e1508041f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js - * @description Array.prototype.filter - return value of callbackfn is the JSON object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return JSON; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-24 +description: > + Array.prototype.filter - return value of callbackfn is the JSON + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return JSON; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js index 5ba073f4a2..1375be0ac5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js - * @description Array.prototype.filter - return value of callbackfn is an Error object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new EvalError(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-25 +description: > + Array.prototype.filter - return value of callbackfn is an Error + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new EvalError(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js index 32437ac18b..a05b442ec3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js - * @description Array.prototype.filter - return value of callbackfn is the Arguments object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return arguments; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-26 +description: > + Array.prototype.filter - return value of callbackfn is the + Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return arguments; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js index 2d4d295a1e..8f621c865d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js @@ -1,21 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js - * @description Array.prototype.filter - return value of callbackfn is the global object - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return fnGlobalObject(); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-28 +description: > + Array.prototype.filter - return value of callbackfn is the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return fnGlobalObject(); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js index c3dbbfd982..f65576a4aa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js - * @description Array.prototype.filter - false prevents element added to output Array - */ - - -function testcase() { - - var called = 0; - - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } - - var obj = { 0: 11, 1: 8, length: 20 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] !== 8 && called === 2; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-29 +description: > + Array.prototype.filter - false prevents element added to output + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(val, idx, obj) { + called++; + return val > 10; + } + + var obj = { 0: 11, 1: 8, length: 20 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 1 && newArr[0] !== 8 && called === 2; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js index b4a887f475..29b418dcfe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js - * @description Array.prototype.filter - return value of callbackfn is null - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } - - var obj = { 0: 11, length: 1 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-3 +description: Array.prototype.filter - return value of callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return null; + } + + var obj = { 0: 11, length: 1 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js index c1e2c4dd6d..e380886ecc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js - * @description Array.prototype.filter - return value (new Boolean(false)) of callbackfn is treated as true value - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return new Boolean(false); - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-30 +description: > + Array.prototype.filter - return value (new Boolean(false)) of + callbackfn is treated as true value +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return new Boolean(false); + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js index 881e964244..3b8b75ff70 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js - * @description Array.prototype.filter - return value of callbackfn is a boolean (value is false) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } - - var obj = { 0: 11, length: 1 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-4 +description: > + Array.prototype.filter - return value of callbackfn is a boolean + (value is false) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return false; + } + + var obj = { 0: 11, length: 1 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js index 819e1290f7..f6f1ac2aad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js - * @description Array.prototype.filter - return value of callbackfn is a boolean (value is true) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return true; - } - - var obj = { 0: 11, length: 1 }; - - var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-5 +description: > + Array.prototype.filter - return value of callbackfn is a boolean + (value is true) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return true; + } + + var obj = { 0: 11, length: 1 }; + + var newArr = Array.prototype.filter.call(obj, callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js index 65c3bd29b5..5269a145b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js - * @description Array.prototype.filter - return value of callbackfn is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-6 +description: > + Array.prototype.filter - return value of callbackfn is a number + (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return 0; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js index 35c88de290..7f5dfdd7a8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js - * @description Array.prototype.filter - return value of callbackfn is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-7 +description: > + Array.prototype.filter - return value of callbackfn is a number + (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return +0; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js index 36e615b0ae..35939d26f7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js - * @description Array.prototype.filter - return value of callbackfn is a nunmber (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-8 +description: > + Array.prototype.filter - return value of callbackfn is a nunmber + (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(val, idx, obj) { + accessed = true; + return -0; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 0 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js index 42ce920fca..5a30ff3033 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js - * @description Array.prototype.filter - return value of callbackfn is a number (value is positive number) - */ - - -function testcase() { - - function callbackfn(val, idx, obj) { - return 5; - } - - var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.20-9-c-iii-9 +description: > + Array.prototype.filter - return value of callbackfn is a number + (value is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(val, idx, obj) { + return 5; + } + + var newArr = [11].filter(callbackfn); + return newArr.length === 1 && newArr[0] === 11; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js index 4752c229bb..2f63c08a16 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js - * @description Array.prototype.reduce must exist as a function - */ - - -function testcase() { - var f = Array.prototype.reduce; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-0-1 +description: Array.prototype.reduce must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.reduce; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js index 963a113502..b602d5515e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js - * @description Array.prototype.reduce.length must be 1 - */ - - -function testcase() { - if (Array.prototype.reduce.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-0-2 +description: Array.prototype.reduce.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.reduce.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js index d16a54e6b5..649751460e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js - * @description Array.prototype.reduce applied to undefined - */ - - -function testcase() { - try { - Array.prototype.reduce.call(undefined); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-1 +description: Array.prototype.reduce applied to undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.reduce.call(undefined); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js index 17105cfc3d..2179a961cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js - * @description Array.prototype.reduce applied to the Math object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return ('[object Math]' === Object.prototype.toString.call(obj)); - } - - try { - Math.length = 1; - Math[0] = 1; - return Array.prototype.reduce.call(Math, callbackfn, 1); - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-10 +description: Array.prototype.reduce applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return ('[object Math]' === Object.prototype.toString.call(obj)); + } + + try { + Math.length = 1; + Math[0] = 1; + return Array.prototype.reduce.call(Math, callbackfn, 1); + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js index 6923a1cad4..5f7244d243 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js - * @description Array.prototype.reduce applied to Date object - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Date; - } - - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-11 +description: Array.prototype.reduce applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Date; + } + + var obj = new Date(); + obj.length = 1; + obj[0] = 1; + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js index e5c7d6e4f4..502afd5584 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js - * @description Array.prototype.reduce applied to RegExp object - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof RegExp; - } - - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-12 +description: Array.prototype.reduce applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof RegExp; + } + + var obj = new RegExp(); + obj.length = 1; + obj[0] = 1; + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js index a18b849d0d..86c83d9b68 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js - * @description Array.prototype.reduce applied to the JSON object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return ('[object JSON]' === Object.prototype.toString.call(obj)); - } - - try { - JSON.length = 1; - JSON[0] = 1; - return Array.prototype.reduce.call(JSON, callbackfn, 1); - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-13 +description: Array.prototype.reduce applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return ('[object JSON]' === Object.prototype.toString.call(obj)); + } + + try { + JSON.length = 1; + JSON[0] = 1; + return Array.prototype.reduce.call(JSON, callbackfn, 1); + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js index 9b78292617..278227c9aa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js - * @description Array.prototype.reduce applied to Error object - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Error; - } - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-14 +description: Array.prototype.reduce applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Error; + } + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js index ab94382151..5d964b2ffb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js - * @description Array.prototype.reduce applied to the Arguments object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return ('[object Arguments]' === Object.prototype.toString.call(obj)); - } - - var obj = (function () { - return arguments; - }("a", "b")); - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-15 +description: Array.prototype.reduce applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return ('[object Arguments]' === Object.prototype.toString.call(obj)); + } + + var obj = (function () { + return arguments; + }("a", "b")); + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js index 6b2598d703..17a4775bda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js - * @description Array.prototype.reduce applied to null - */ - - -function testcase() { - try { - Array.prototype.reduce.call(null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-2 +description: Array.prototype.reduce applied to null +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.reduce.call(null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js index 93ac91aa1a..d9970c651a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js @@ -1,29 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js - * @description Array.prototype.reduce applied to boolean primitive - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = true; - Boolean.prototype.length = 1; - - return Array.prototype.reduce.call(false, callbackfn, 1); - - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-3 +description: Array.prototype.reduce applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = true; + Boolean.prototype.length = 1; + + return Array.prototype.reduce.call(false, callbackfn, 1); + + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js index 274450faf3..8bba43ec5f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js - * @description Array.prototype.reduce applied to Boolean object - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Boolean; - } - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-4 +description: Array.prototype.reduce applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Boolean; + } + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js index 7963db1080..b7550d3f1d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js - * @description Array.prototype.reduce applied to number primitive - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Number; - } - - try { - Number.prototype[0] = 1; - Number.prototype.length = 1; - - return Array.prototype.reduce.call(2.5, callbackfn, 1); - } finally { - delete Number.prototype[0]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-5 +description: Array.prototype.reduce applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Number; + } + + try { + Number.prototype[0] = 1; + Number.prototype.length = 1; + + return Array.prototype.reduce.call(2.5, callbackfn, 1); + } finally { + delete Number.prototype[0]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js index ddfd678075..87bdbf3a65 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js - * @description Array.prototype.reduce applied to Number object - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Number; - } - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-6 +description: Array.prototype.reduce applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Number; + } + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js index 4447edbe3b..bbb2122dfc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js - * @description Array.prototype.reduce applied to string primitive - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof String; - } - - return Array.prototype.reduce.call("abc", callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-7 +description: Array.prototype.reduce applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof String; + } + + return Array.prototype.reduce.call("abc", callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js index 7ca7872e8c..10f00b0062 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js - * @description Array.prototype.reduce applied to String object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof String; - } - - var obj = new String("abc"); - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-8 +description: Array.prototype.reduce applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof String; + } + + var obj = new String("abc"); + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js index dff16be5a8..35e92cdca7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js - * @description Array.prototype.reduce applied to Function object - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return obj instanceof Function; - } - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-1-9 +description: Array.prototype.reduce applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return obj instanceof Function; + } + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js index 1454d62fdb..17b1c2a845 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js - * @description Array.prototype.reduce doesn't mutate the Array on which it is called on - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - return 1; - } - var srcArr = [1,2,3,4,5]; - srcArr.reduce(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-1 +description: > + Array.prototype.reduce doesn't mutate the Array on which it is + called on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + return 1; + } + var srcArr = [1,2,3,4,5]; + srcArr.reduce(callbackfn); + if(srcArr[0] === 1 && + srcArr[1] === 2 && + srcArr[2] === 3 && + srcArr[3] === 4 && + srcArr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js index f1f784512e..97137ef3ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js - * @description Array.prototype.reduce reduces the array in ascending order of indices - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; - if(srcArr.reduce(callbackfn) === '12345') - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-2 +description: > + Array.prototype.reduce reduces the array in ascending order of + indices +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + return prevVal + curVal; + } + var srcArr = ['1','2','3','4','5']; + if(srcArr.reduce(callbackfn) === '12345') + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js index fc44c8a881..1a6a11c864 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js - * @description Array.prototype.reduce - subclassed array of length 1 - */ - - -function testcase() { - foo.prototype = [1]; - function foo() {} - var f = new foo(); - - function cb(){} - if(f.reduce(cb) === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-3 +description: Array.prototype.reduce - subclassed array of length 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = [1]; + function foo() {} + var f = new foo(); + + function cb(){} + if(f.reduce(cb) === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js index 957b7a60af..feefeb1858 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js - * @description Array.prototype.reduce - subclassed array with length more than 1 - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3, 4); - function foo() {} - var f = new foo(); - - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduce(cb) === 10) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-4 +description: Array.prototype.reduce - subclassed array with length more than 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3, 4); + function foo() {} + var f = new foo(); + + function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} + if(f.reduce(cb) === 10) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js index 42271ef9e3..a804a44d67 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js - * @description Array.prototype.reduce reduces the array in ascending order of indices(initialvalue present) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; - if(srcArr.reduce(callbackfn,'0') === '012345') - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-5 +description: > + Array.prototype.reduce reduces the array in ascending order of + indices(initialvalue present) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + return prevVal + curVal; + } + var srcArr = ['1','2','3','4','5']; + if(srcArr.reduce(callbackfn,'0') === '012345') + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js index 719a06609e..37b24b006d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js - * @description Array.prototype.reduce - subclassed array when initialvalue provided - */ - - -function testcase() { - foo.prototype = [1,2,3,4]; - function foo() {} - var f = new foo(); - - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduce(cb,-1) === 9) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-6 +description: > + Array.prototype.reduce - subclassed array when initialvalue + provided +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = [1,2,3,4]; + function foo() {} + var f = new foo(); + + function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} + if(f.reduce(cb,-1) === 9) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js index ae6ffd2eb8..cfe0892f15 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js - * @description Array.prototype.reduce - subclassed array with length 1 and initialvalue provided - */ - - -function testcase() { - foo.prototype = [1]; - function foo() {} - var f = new foo(); - - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduce(cb,-1) === 0) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-7 +description: > + Array.prototype.reduce - subclassed array with length 1 and + initialvalue provided +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = [1]; + function foo() {} + var f = new foo(); + + function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} + if(f.reduce(cb,-1) === 0) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js index edc04facf5..9690b18116 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js - * @description Array.prototype.reduce doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return curVal; - } - var srcArr = ['1','2','3','4','5']; - srcArr["i"] = 10; - srcArr[true] = 11; - srcArr.reduce(callbackfn); - - if(callCnt == 4) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-10-8 +description: Array.prototype.reduce doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(prevVal, curVal, idx, obj) + { + callCnt++; + return curVal; + } + var srcArr = ['1','2','3','4','5']; + srcArr["i"] = 10; + srcArr[true] = 11; + srcArr.reduce(callbackfn); + + if(callCnt == 4) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js index 6f41dda6be..086afed1ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js - * @description Array.prototype.reduce - 'length' is own data property on an Array-like object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-1 +description: > + Array.prototype.reduce - 'length' is own data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js index d9d9584160..6e64e4b7b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an inherited accessor property - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-10 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduce.call(child, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js index 9d91bf2e89..f616aa68f1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-11 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an own accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { + 0: 11, + 1: 12 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js index e513d33ffa..5308dce894 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js - * @description Array.prototype.reduce - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 12, 1: 11 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } finally { - delete Object.prototype.length; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-12 +description: > + Array.prototype.reduce - 'length' is own accessor property without + a get function that overrides an inherited accessor property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 12, 1: 11 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } finally { + delete Object.prototype.length; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js index f36617fcde..5f6a3ff460 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js - * @description Array.prototype.reduce applied to Array-like object that 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 11; - child[1] = 12; - - return Array.prototype.reduce.call(child, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-13 +description: > + Array.prototype.reduce applied to Array-like object that 'length' + is inherited accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 11; + child[1] = 12; + + return Array.prototype.reduce.call(child, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js index cdec1882fe..589b453846 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js - * @description Array.prototype.reduce applied to the Array-like object that 'length' property doesn't exist - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 11, 1: 12 }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-14 +description: > + Array.prototype.reduce applied to the Array-like object that + 'length' property doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 11, 1: 12 }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-15.js index ee69a7e2a5..514374125e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-15.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-15.js - * @description Array.prototype.reduce - 'length' is property of the global object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; - return Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1) === true; - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-15 +description: Array.prototype.reduce - 'length' is property of the global object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 12; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 9; + fnGlobalObject().length = 2; + return Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1) === true; + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js index ecbb39faa4..1de4b874bf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js - * @description Array.prototype.reduce applied to the Arguments object, which implements its own property get method - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var func = function (a, b) { - arguments[2] = 9; - return Array.prototype.reduce.call(arguments, callbackfn, 1); - }; - - return func(12, 11) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-17 +description: > + Array.prototype.reduce applied to the Arguments object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var func = function (a, b) { + arguments[2] = 9; + return Array.prototype.reduce.call(arguments, callbackfn, 1); + }; + + return func(12, 11) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js index fa6c849ccd..34ce26a456 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js - * @description Array.prototype.reduce applied to String object, which implements its own property get method - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 3); - } - - var str = new String("012"); - - return Array.prototype.reduce.call(str, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-18 +description: > + Array.prototype.reduce applied to String object, which implements + its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 3); + } + + var str = new String("012"); + + return Array.prototype.reduce.call(str, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js index 2c6a930ebb..07793dc651 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js - * @description Array.prototype.reduce applied to Function object, which implements its own property get method - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; - - return Array.prototype.reduce.call(fun, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-19 +description: > + Array.prototype.reduce applied to Function object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var fun = function (a, b) { + return a + b; + }; + fun[0] = 12; + fun[1] = 11; + fun[2] = 9; + + return Array.prototype.reduce.call(fun, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js index e93fdf37ff..5d6b92b64c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js - * @description Array.prototype.reduce - 'length' is own data property on an Array - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - return [12, 11].reduce(callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-2 +description: Array.prototype.reduce - 'length' is own data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + return [12, 11].reduce(callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js index 164ca827b6..17967c86a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js - * @description Array.prototype.reduce - 'length' is an own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-3 +description: > + Array.prototype.reduce - 'length' is an own data property that + overrides an inherited data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduce.call(child, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js index 514785827b..6c89e55827 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js - * @description Array.prototype.reduce - 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - var storeProtoLength; - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - try { - storeProtoLength = Array.prototype.length; - Array.prototype.length = 0; - - return [12, 11].reduce(callbackfn, 1) === true; - } finally { - Array.prototype.length = storeProtoLength; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-4 +description: > + Array.prototype.reduce - 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var storeProtoLength; + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + try { + storeProtoLength = Array.prototype.length; + Array.prototype.length = 0; + + return [12, 11].reduce(callbackfn, 1) === true; + } finally { + Array.prototype.length = storeProtoLength; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js index 798a4c1196..01ef03efa1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-5 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an own data property that overrides an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduce.call(child, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js index 10069f82e1..72241505af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an inherited data property - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var proto = { length: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-6 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = { length: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduce.call(child, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js index 956cc954bc..0691232711 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-7 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + obj[0] = 12; + obj[1] = 11; + obj[2] = 9; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js index 226bd641cb..2974a0c38d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-8 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an own accessor property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduce.call(child, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js index d35bca35d1..40b7354fdd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js - * @description Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-2-9 +description: > + Array.prototype.reduce applied to Array-like object, 'length' is + an own accessor property that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduce.call(child, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js index 1bb20958c1..f385a070af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js - * @description Array.prototype.reduce - value of 'length' is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 0, 1: 1, length: undefined }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-1 +description: Array.prototype.reduce - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 0, 1: 1, length: undefined }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js index 122722ceca..7d7219eb0c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js - * @description Array.prototype.reduce - value of 'length' is number primitive (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 9, length: NaN }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-10 +description: > + Array.prototype.reduce - value of 'length' is number primitive + (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 9, length: NaN }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js index 89297cf3ce..7f9bb9acee 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js - * @description Array.prototype.reduce - 'length' is a string containing a positive number - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: "2" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-11 +description: > + Array.prototype.reduce - 'length' is a string containing a + positive number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: "2" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js index 2a0b3e217e..8652b73232 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js - * @description Array.prototype.reduce - 'length' is a string containing a negative number - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: "-4294967294" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-12 +description: > + Array.prototype.reduce - 'length' is a string containing a + negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: "-4294967294" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js index 0a1741cfd1..2a13a277c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js - * @description Array.prototype.reduce - 'length' is a string containing a decimal number - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: "2.5" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-13 +description: > + Array.prototype.reduce - 'length' is a string containing a decimal + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: "2.5" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js index 01f086dfbe..518ad1ac62 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js - * @description Array.prototype.reduce - 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var accessed1 = false; - var accessed2 = false; - var accessed3 = false; - - function callbackfn1(prevVal, curVal, idx, obj) { - accessed1 = true; - return 2; - } - - function callbackfn2(prevVal, curVal, idx, obj) { - accessed2 = true; - return 2; - } - - function callbackfn3(prevVal, curVal, idx, obj) { - accessed3 = true; - return 2; - } - - var obj1 = { 0: 9, length: "Infinity" }; - var obj2 = { 0: 9, length: "-Infinity" }; - var obj3 = { 0: 9, length: "+Infinity" }; - - return Array.prototype.reduce.call(obj1, callbackfn1, 1) === 1 && - Array.prototype.reduce.call(obj2, callbackfn2, 1) === 1 && - Array.prototype.reduce.call(obj3, callbackfn3, 1) === 1 && - !accessed1 && !accessed2 && !accessed3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-14 +description: > + Array.prototype.reduce - 'length' is a string containing + +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed1 = false; + var accessed2 = false; + var accessed3 = false; + + function callbackfn1(prevVal, curVal, idx, obj) { + accessed1 = true; + return 2; + } + + function callbackfn2(prevVal, curVal, idx, obj) { + accessed2 = true; + return 2; + } + + function callbackfn3(prevVal, curVal, idx, obj) { + accessed3 = true; + return 2; + } + + var obj1 = { 0: 9, length: "Infinity" }; + var obj2 = { 0: 9, length: "-Infinity" }; + var obj3 = { 0: 9, length: "+Infinity" }; + + return Array.prototype.reduce.call(obj1, callbackfn1, 1) === 1 && + Array.prototype.reduce.call(obj2, callbackfn2, 1) === 1 && + Array.prototype.reduce.call(obj3, callbackfn3, 1) === 1 && + !accessed1 && !accessed2 && !accessed3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js index b2086ee214..9e6d244f20 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js - * @description Array.prototype.reduce - 'length' is a string containing an exponential number - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: "2E0" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-15 +description: > + Array.prototype.reduce - 'length' is a string containing an + exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: "2E0" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js index 187d7b635f..7a36fd6a53 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js - * @description Array.prototype.reduce - 'length' is a string containing a hex number - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: "0x0002" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-16 +description: > + Array.prototype.reduce - 'length' is a string containing a hex + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: "0x0002" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js index b2cd47586d..015d8ba504 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js - * @description Array.prototype.reduce - 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: "0002.00" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-17 +description: > + Array.prototype.reduce - 'length' is a string containing a number + with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: "0002.00" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js index 11d7827404..eda6cdde40 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js - * @description Array.prototype.reduce - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 9, length: "asdf!_" }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-18 +description: > + Array.prototype.reduce - value of 'length' is a string that can't + convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 9, length: "asdf!_" }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js index f086ec0e69..c990b38275 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js - * @description Array.prototype.reduce - value of 'length' is an Object which has an own toString method - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { - 1: 11, - 2: 9, - length: { - toString: function () { - return '2'; - } - } - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-19 +description: > + Array.prototype.reduce - value of 'length' is an Object which has + an own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { + 1: 11, + 2: 9, + length: { + toString: function () { + return '2'; + } + } + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js index 85b69685cf..d4af2b5e74 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js - * @description Array.prototype.reduce - value of 'length' is a boolean (value is true) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 0); - } - - var obj = { 0: 11, 1: 9, length: true }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-2 +description: > + Array.prototype.reduce - value of 'length' is a boolean (value is + true) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 0); + } + + var obj = { 0: 11, 1: 9, length: true }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js index 362d133f94..83be994a07 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js - * @description Array.prototype.reduce - value of 'length' is an object which has an own valueOf method - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - return 2; - } - } - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-20 +description: > + Array.prototype.reduce - value of 'length' is an object which has + an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function () { + return 2; + } + } + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js index 0f1fde7b7c..14d20df1a8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js @@ -1,38 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js - * @description Array.prototype.reduce - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var valueOfOccured = false; - var toStringOccured = false; - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfOccured = true; - return {}; - }, - toString: function () { - toStringOccured = true; - return '2'; - } - } - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfOccured && toStringOccured; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-21 +description: > + Array.prototype.reduce - 'length' is an object that has an own + valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var valueOfOccured = false; + var toStringOccured = false; + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { + 1: 11, + 2: 9, + length: { + valueOf: function () { + valueOfOccured = true; + return {}; + }, + toString: function () { + toStringOccured = true; + return '2'; + } + } + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfOccured && toStringOccured; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js index 8794e981a0..6194bc05f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js - * @description Array.prototype.reduce throws TypeError exception - 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var accessed = false; - var valueOfAccessed = false; - var toStringAccessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return true; - } - - var obj = { - 1: 11, - 2: 12, - - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; - - try { - Array.prototype.reduce.call(obj, callbackfn, 1); - return false; - } catch (ex) { - return (ex instanceof TypeError) && !accessed && toStringAccessed && valueOfAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-22 +description: > + Array.prototype.reduce throws TypeError exception - 'length' is an + object with toString and valueOf methods that don�t return + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var valueOfAccessed = false; + var toStringAccessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return true; + } + + var obj = { + 1: 11, + 2: 12, + + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return {}; + } + } + }; + + try { + Array.prototype.reduce.call(obj, callbackfn, 1); + return false; + } catch (ex) { + return (ex instanceof TypeError) && !accessed && toStringAccessed && valueOfAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js index 9e3e05d67b..3a98e15680 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js - * @description Array.prototype.reduce uses inherited valueOf method - 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var valueOfAccessed = false; - var toStringAccessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 1: 11, - 2: 9, - length: child - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-23 +description: > + Array.prototype.reduce uses inherited valueOf method - 'length' is + an object with an own toString and inherited valueOf methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var valueOfAccessed = false; + var toStringAccessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 1: 11, + 2: 9, + length: child + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js index 4756c93ba3..b1d8ce3c3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js - * @description Array.prototype.reduce - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { - 1: 11, - 2: 9, - length: 2.685 - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-24 +description: > + Array.prototype.reduce - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { + 1: 11, + 2: 9, + length: 2.685 + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js index 2a7cb1264a..3eccdc997f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js - * @description Array.prototype.reduce - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { - 1: 11, - 2: 9, - length: -4294967294.5 - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-25 +description: > + Array.prototype.reduce - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { + 1: 11, + 2: 9, + length: -4294967294.5 + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js index 97082927f9..e40a3e0d85 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js - * @description Array.prototype.reduce - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-28 +description: Array.prototype.reduce - value of 'length' is boundary value (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js index 774d29ae14..79c7554fd7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js - * @description Array.prototype.reduce - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 0); - } - - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; - - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-29 +description: > + Array.prototype.reduce - value of 'length' is boundary value (2^32 + + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 0); + } + + var obj = { + 0: 11, + 1: 9, + length: 4294967297 + }; + + return Array.prototype.reduce.call(obj, callbackfn, 1); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js index 785ad88c4e..7dbf375dda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js @@ -1,25 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js - * @description Array.prototype.reduce - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 1, 1: 1, length: 0 }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-3 +description: Array.prototype.reduce - value of 'length' is a number (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 1, 1: 1, length: 0 }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js index 6a58f9455e..d7e5d69334 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js - * @description Array.prototype.reduce - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 11, length: +0 }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-4 +description: > + Array.prototype.reduce - value of 'length' is a number (value is + +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 11, length: +0 }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js index 8bacc6257d..eb2c0d80dd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js - * @description Array.prototype.reduce - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 11, length: -0 }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-5 +description: > + Array.prototype.reduce - value of 'length' is a number (value is + -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 11, length: -0 }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js index 921c787b05..86032b629a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js - * @description Array.prototype.reduce - value of 'length' is a number (value is positive) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: 2 }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-6 +description: > + Array.prototype.reduce - value of 'length' is a number (value is + positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: 2 }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js index ac61e1b6d5..7e5a6db2dc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js - * @description Array.prototype.reduce - value of 'length' is a number (value is negative) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal === 11 && idx === 1); - } - - var obj = { 1: 11, 2: 9, length: -4294967294 }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-7 +description: > + Array.prototype.reduce - value of 'length' is a number (value is + negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal === 11 && idx === 1); + } + + var obj = { 1: 11, 2: 9, length: -4294967294 }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js index ea8dab5c23..f7f8d9085e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js - * @description Array.prototype.reduce - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return 2; - } - - var obj = { 0: 9, length: Infinity }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-8 +description: > + Array.prototype.reduce - value of 'length' is a number (value is + Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return 2; + } + + var obj = { 0: 9, length: Infinity }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js index 09419edffa..3445051998 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js - * @description Array.prototype.reduce - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: -Infinity }; - - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-3-9 +description: > + Array.prototype.reduce - value of 'length' is a number (value is + -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: -Infinity }; + + return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js index 203c5f4fb4..4abc07aa6e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js - * @description Array.prototype.reduce throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-1 +description: Array.prototype.reduce throws TypeError if callbackfn is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js index e87a5d2217..10cdaf4969 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js - * @description Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-10 +description: > + Array.prototype.reduce - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js index 7f7bb626c7..8e24074ce4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js - * @description Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-11 +description: > + Array.prototype.reduce - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js index cca11c199c..42dbe167fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js - * @description Array.prototype.reduce - 'callbackfn' is a function - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return curVal > 10; - } - - return [11, 9].reduce(callbackfn, 1) === false && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-12 +description: Array.prototype.reduce - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return curVal > 10; + } + + return [11, 9].reduce(callbackfn, 1) === false && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-15.js index fd2b443732..1201d648e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-15.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-15.js - * @description Array.prototype.reduce - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj); - return false; - } catch (ex) { - return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-15 +description: > + Array.prototype.reduce - calling with no callbackfn is the same as + passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 10: 10 }; + var lengthAccessed = false; + var loopAccessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj); + return false; + } catch (ex) { + return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js index d804f29b74..8fb5c5fe71 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js - * @description Array.prototype.reduce throws ReferenceError if callbackfn is unreferenced - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce(foo); - } - catch(e) { - if(e instanceof ReferenceError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-2 +description: > + Array.prototype.reduce throws ReferenceError if callbackfn is + unreferenced +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce(foo); + } + catch(e) { + if(e instanceof ReferenceError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js index 8e41ec67b1..044feb180e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js - * @description Array.prototype.reduce throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-3 +description: Array.prototype.reduce throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js index 4bdd999735..40b825e220 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js - * @description Array.prototype.reduce throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-4 +description: Array.prototype.reduce throws TypeError if callbackfn is boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js index 89232db4ff..7c2b4ee375 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js - * @description Array.prototype.reduce throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-5 +description: Array.prototype.reduce throws TypeError if callbackfn is number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js index 6f7a5fbb09..e941c9cdc2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js - * @description Array.prototype.reduce throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-6 +description: Array.prototype.reduce throws TypeError if callbackfn is string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js index 4925be7767..3c82b38b82 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js - * @description Array.prototype.reduce throws TypeError if callbackfn is Object without [[Call]] internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduce(new Object()); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-7 +description: > + Array.prototype.reduce throws TypeError if callbackfn is Object + without [[Call]] internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduce(new Object()); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js index a42eac725c..8a86e8dfdf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js - * @description Array.prototype.reduce - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-8 +description: > + Array.prototype.reduce - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js index c7dc059f0f..969539a8ec 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js - * @description Array.prototype.reduce - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-4-9 +description: > + Array.prototype.reduce - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js index cbc6d9894e..2ee443a342 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (empty array), no initVal - */ - - -function testcase() { - function cb(){} - - try { - [].reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-1 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 (empty + array), no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb(){} + + try { + [].reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js index 710006b98d..649bef5724 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js - * @description Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 2 - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 0; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-10 +description: > + Array.prototype.reduce - if exception occurs, it occurs after any + side-effects that might be produced by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); + } + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 0; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js index fbbd84d65d..0dffef8e7d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js - * @description Array.prototype.reduce - if the exception occurs, it occurs after any side-effects that might be produced by step 3 - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "0"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-11 +description: > + Array.prototype.reduce - if the exception occurs, it occurs after + any side-effects that might be produced by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); + } + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "0"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js index 7aafcd35d7..2f78513736 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js - * @description Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-12 +description: > + Array.prototype.reduce - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); + } + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js index fd2c462247..455a65755c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js - * @description Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return (curVal > 10); - } - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - - try { - Array.prototype.reduce.call(obj, callbackfn); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-13 +description: > + Array.prototype.reduce - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return (curVal > 10); + } + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + + try { + Array.prototype.reduce.call(obj, callbackfn); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js index ac8b265f6a..a72e62b82f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to null (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-2 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden to null (type conversion)), + no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js index e5f25b1039..c338294579 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to false (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-3 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden to false (type conversion)), + no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js index f0fe536c7f..65d30f2b04 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-4 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden to 0 (type conversion)), no + initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js index 8cdf1ddd4a..53ee5a25e6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-5 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden to '0' (type conversion)), no + initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js index dc9de22891..351d8bcbf8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj with valueOf), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-6 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden with obj with valueOf), no + initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js index c127bc38cd..979bb2ee5c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-7 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden with obj w/o valueOf + (toString)), no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js index 9f8f576838..c2f2cde688 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js - * @description Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with []), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - try { - f.reduce(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-8 +description: > + Array.prototype.reduce throws TypeError if 'length' is 0 + (subclassed Array, length overridden with []), no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + try { + f.reduce(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js index b6cbece423..8192387412 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js - * @description Array.prototype.reduce - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - return [].reduce(callbackfn, 3) === 3 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-5-9 +description: > + Array.prototype.reduce - 'initialValue' is returned if 'len' is 0 + and 'initialValue' is present +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + return [].reduce(callbackfn, 3) === 3 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js index 20b713137d..b5d4c47ad3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (empty array) - */ - - -function testcase() { - function cb(){} - - try { - if([].reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-1 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb(){} + + try { + if([].reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js index 5b26688ab5..b613abb295 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js - * @description Array.prototype.reduce - 'initialValue' is present - */ - - -function testcase() { - - var str = "initialValue is present"; - return str === [].reduce(function () { }, str); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-10 +description: Array.prototype.reduce - 'initialValue' is present +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = "initialValue is present"; + return str === [].reduce(function () { }, str); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js index 9546e7e26e..b58f4f71c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js - * @description Array.prototype.reduce - 'initialValue' is not present - */ - - -function testcase() { - - var str = "initialValue is not present"; - return str === [str].reduce(function () { }); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-11 +description: Array.prototype.reduce - 'initialValue' is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = "initialValue is not present"; + return str === [str].reduce(function () { }); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js index a60a31b3ee..d1737c87ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-2 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden to + null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js index 1e053ffddc..c12513b2c3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-3 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden to + false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js index 7faee731ed..e0cbaf6c4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-4 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden to 0 + (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js index 38b8244d23..4a13d99565 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-5 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden to + '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js index 752a82e118..7b4c2e48e1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-6 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden with + obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js index 1c04ec2166..321bdfd10a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-7 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden with + obj w/o valueOf (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js index 04af24be10..65d0434afe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with []) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-8 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden with + []) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js index 6b28dc31e4..95420f921b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js - * @description Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0]) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = [0]; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-7-9 +description: > + Array.prototype.reduce returns initialValue if 'length' is 0 and + initialValue is present (subclassed Array, length overridden with + [0]) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = [0]; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + try { + if(f.reduce(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-1.js index 877c622919..f9e4f88344 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-1.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-1.js - * @description Array.prototype.reduce - no observable effects occur if 'len' is 0 - */ - - -function testcase() { - - var accessed = false; - - var obj = { length: 0 }; - - Object.defineProperty(obj, "0", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, function () { }); - return false; - } catch (ex) { - return !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-1 +description: Array.prototype.reduce - no observable effects occur if 'len' is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var obj = { length: 0 }; + + Object.defineProperty(obj, "0", { + get: function () { + accessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, function () { }); + return false; + } catch (ex) { + return !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-2.js index 3c04d5281b..0a605430c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-2.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-2.js - * @description Array.prototype.reduce - modifications to length don't change number of iterations in step 9 - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - return idx; - } - - var obj = { 3: 12, 4: 9, length: 4 }; - - Object.defineProperty(obj, "2", { - get: function () { - obj.length = 10; - return 11; - }, - configurable: true - }); - - return Array.prototype.reduce.call(obj, callbackfn) === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-2 +description: > + Array.prototype.reduce - modifications to length don't change + number of iterations in step 9 +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + return idx; + } + + var obj = { 3: 12, 4: 9, length: 4 }; + + Object.defineProperty(obj, "2", { + get: function () { + obj.length = 10; + return 11; + }, + configurable: true + }); + + return Array.prototype.reduce.call(obj, callbackfn) === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-3.js index 95671a585c..e0e838a114 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-3.js @@ -1,47 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-3.js - * @description Array.prototype.reduce - loop is broken once 'kPresent' is true - */ - - -function testcase() { - - var called = 0; - var testResult = false; - var firstCalled = 0; - var secondCalled = 0; - - function callbackfn(prevVal, val, idx, obj) { - if (called === 0) { - testResult = (idx === 1); - } - called++; - } - - var arr = [, , ]; - - Object.defineProperty(arr, "0", { - get: function () { - firstCalled++; - return 11; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - secondCalled++; - return 9; - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult && firstCalled === 1 && secondCalled === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-3 +description: Array.prototype.reduce - loop is broken once 'kPresent' is true +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var testResult = false; + var firstCalled = 0; + var secondCalled = 0; + + function callbackfn(prevVal, val, idx, obj) { + if (called === 0) { + testResult = (idx === 1); + } + called++; + } + + var arr = [, , ]; + + Object.defineProperty(arr, "0", { + get: function () { + firstCalled++; + return 11; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + secondCalled++; + return 9; + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult && firstCalled === 1 && secondCalled === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js index a5890cbbfe..ea29cb96cc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js - * @description Array.prototype.reduce - added properties in step 2 are visible here - */ - - -function testcase() { - - var obj = { }; - - Object.defineProperty(obj, "length", { - get: function () { - obj[1] = "accumulator"; - return 3; - }, - configurable: true - }); - - return Array.prototype.reduce.call(obj, function () { }) === "accumulator"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-ii-1 +description: > + Array.prototype.reduce - added properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { }; + + Object.defineProperty(obj, "length", { + get: function () { + obj[1] = "accumulator"; + return 3; + }, + configurable: true + }); + + return Array.prototype.reduce.call(obj, function () { }) === "accumulator"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js index a65b9b40cd..591635d310 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js - * @description Array.prototype.reduce - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var obj = { 1: "accumulator", 2: "another" }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[1]; - return 3; - }, - configurable: true - }); - - return "accumulator" !== Array.prototype.reduce.call(obj, function () { }); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-ii-2 +description: > + Array.prototype.reduce - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 1: "accumulator", 2: "another" }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[1]; + return 3; + }, + configurable: true + }); + + return "accumulator" !== Array.prototype.reduce.call(obj, function () { }); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js index 9ec1ff66f4..aaa60b3467 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js - * @description Array.prototype.reduce - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-1 +description: > + Array.prototype.reduce - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-10.js index 416ece1639..4f50fe749b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-10.js - * @description Array.prototype.reduce - when element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var arr = [, 1, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-10 +description: > + Array.prototype.reduce - when element to be retrieved is own + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var arr = [, 1, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-11.js index 5df02d1d6a..9830c74b03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-11.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-11.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } - - var proto = { 0: 0, 1: 1, 2: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "0", { - get: function () { - return "9"; - }, - configurable: true - }); - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-11 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } + } + + var proto = { 0: 0, 1: 1, 2: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "0", { + get: function () { + return "9"; + }, + configurable: true + }); + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-12.js index 641dfbfba3..2c248c4f2a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-12.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-12.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } - - try { - Array.prototype[0] = 0; - var arr = [, 1, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - return "9"; - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-12 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } + } + + try { + Array.prototype[0] = 0; + var arr = [, 1, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + return "9"; + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-13.js index 8820818714..3fc8912311 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-13.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-13.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } - - var proto = { 1: 1, 2: 2}; - - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "0", { - get: function () { - return "9"; - }, - configurable: true - }); - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-13 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } + } + + var proto = { 1: 1, 2: 2}; + + Object.defineProperty(proto, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "0", { + get: function () { + return "9"; + }, + configurable: true + }); + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-14.js index 146ea6d158..a5938e0c03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-14.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-14.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - return "9"; - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-14 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + var arr = [, 1, 2]; + Object.defineProperty(arr, "0", { + get: function () { + return "9"; + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js index 50e203ee71..6c5db5642d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var proto = { 1: 1, 2: 2 }; - - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-15 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var proto = { 1: 1, 2: 2 }; + + Object.defineProperty(proto, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-16.js index 0364f42f8c..2183375629 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-16.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-16.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - var arr = [, 1, 2]; - - arr.reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-16 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + var arr = [, 1, 2]; + + arr.reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-17.js index f8e267513a..b6461985ff 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-17.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-17.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } - - var obj = { 1: 1, 2: 2, length: 3 }; - - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-17 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } + } + + var obj = { 1: 1, 2: 2, length: 3 }; + + Object.defineProperty(obj, "0", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-18.js index 1dea9e3e53..3adc6340e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-18.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-18.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } - - var arr = [, 1, 2]; - - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-18 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } + } + + var arr = [, 1, 2]; + + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-19.js index e14193e0b6..21d3c24762 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-19.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-19.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } - - try { - Object.prototype[0] = 0; - - var obj = { 1: 1, 2: 2, length: 3 }; - - Object.defineProperty(obj, "0", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-19 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } + } + + try { + Object.prototype[0] = 0; + + var obj = { 1: 1, 2: 2, length: 3 }; + + Object.defineProperty(obj, "0", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js index 6156849bce..fae7d128e1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js - * @description Array.prototype.reduce - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var arr = [0, 1, 2]; - arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-2 +description: > + Array.prototype.reduce - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var arr = [0, 1, 2]; + arr.reduce(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-20.js index fd0de8ec2d..f1ddbd255a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-20.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-20.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } - - try { - Array.prototype[0] = 0; - var arr = [, 1, 2]; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-20 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } + } + + try { + Array.prototype[0] = 0; + var arr = [, 1, 2]; + Object.defineProperty(arr, "0", { + set: function () { }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-21.js index 7f2b49976a..4e61cfd1c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-21.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-21.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } - - var proto = { 1: 1, 2: 2 }; - - Object.defineProperty(proto, "0", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-21 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } + } + + var proto = { 1: 1, 2: 2 }; + + Object.defineProperty(proto, "0", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-22.js index 1806ba920e..278a34f4cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-22.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-22.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === undefined); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); - - var arr = [, 1, 2]; - - arr.reduce(callbackfn); - return testResult; - - } finally { - delete Array.prototype[0]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-22 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === undefined); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + set: function () { }, + configurable: true + }); + + var arr = [, 1, 2]; + + arr.reduce(callbackfn); + return testResult; + + } finally { + delete Array.prototype[0]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-23.js index 514b123a17..e61a5c1ff6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-23.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-23.js - * @description Array.prototype.reduce - This object is the global object which contains index property - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 0; - fnGlobalObject()[1] = 1; - fnGlobalObject()[2] = 2; - fnGlobalObject().length = 3; - - Array.prototype.reduce.call(fnGlobalObject(), callbackfn); - return testResult; - - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-23 +description: > + Array.prototype.reduce - This object is the global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 0; + fnGlobalObject()[1] = 1; + fnGlobalObject()[2] = 2; + fnGlobalObject().length = 3; + + Array.prototype.reduce.call(fnGlobalObject(), callbackfn); + return testResult; + + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js index d9377dfdf1..1b92a8808b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js - * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn); - }; - - func(0, 1); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-25 +description: > + Array.prototype.reduce - This object is the Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var func = function (a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn); + }; + + func(0, 1); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js index 64b7a17fd0..37924bdda2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js - * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (prevVal === 1); - } - } - - var func = function (a, b, c) { - delete arguments[0]; - Array.prototype.reduce.call(arguments, callbackfn); - }; - - func(0, 1, 2); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-26 +description: > + Array.prototype.reduce - This object is the Arguments object which + implements its own property get method (number of arguments equals + number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (prevVal === 1); + } + } + + var func = function (a, b, c) { + delete arguments[0]; + Array.prototype.reduce.call(arguments, callbackfn); + }; + + func(0, 1, 2); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js index 66b52595db..a5f988d3e9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js - * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 3) { - testResult = (prevVal === 2); - } - } - - var func = function (a, b, c) { - delete arguments[0]; - delete arguments[1]; - Array.prototype.reduce.call(arguments, callbackfn); - }; - - func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-27 +description: > + Array.prototype.reduce - This object is the Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 3) { + testResult = (prevVal === 2); + } + } + + var func = function (a, b, c) { + delete arguments[0]; + delete arguments[1]; + Array.prototype.reduce.call(arguments, callbackfn); + }; + + func(0, 1, 2, 3); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js index 10fce9edda..2b55835eae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js - * @description Array.prototype.reduce - applied to String object, which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "0"); - } - } - - var str = new String("012"); - Array.prototype.reduce.call(str, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-28 +description: > + Array.prototype.reduce - applied to String object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "0"); + } + } + + var str = new String("012"); + Array.prototype.reduce.call(str, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js index cdf16a58ca..e0ece99de6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js - * @description Array.prototype.reduce - applied to Function object which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var obj = function (a, b, c) { - return a + b + c; - }; - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - obj[3] = 3; - - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-29 +description: > + Array.prototype.reduce - applied to Function object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var obj = function (a, b, c) { + return a + b + c; + }; + obj[0] = 0; + obj[1] = 1; + obj[2] = 2; + obj[3] = 3; + + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js index 6db69ae35b..203e3aecd3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } - - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = "9"; - child[1] = "1"; - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-3 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } + } + + var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = "9"; + child[1] = "1"; + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-30.js index f956ed449f..5c4c82084d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-30.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-30.js - * @description Array.prototype.reduce - element changed by getter on current iterations is observed in subsequent iterations on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [, , 2]; - var preIterVisible = false; - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return 100; - } - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-30 +description: > + Array.prototype.reduce - element changed by getter on current + iterations is observed in subsequent iterations on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [, , 2]; + var preIterVisible = false; + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return 0; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return 100; + } + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-31.js index 320be619a9..675920115a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-31.js @@ -1,47 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-31.js - * @description Array.prototype.reduce - element changed by getter on current iterations is observed in subsequent iterations on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = { length: 2 }; - var preIterVisible = false; - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return 100; - } - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-31 +description: > + Array.prototype.reduce - element changed by getter on current + iterations is observed in subsequent iterations on an Array-like + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = { length: 2 }; + var preIterVisible = false; + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return 0; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return 100; + } + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-32.js index 9e434570c9..80ef827b21 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-32.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-32.js - * @description Array.prototype.reduce - exception in getter terminates iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (prevVal === 0); - } - } - - var obj = { 2: 2, 1: 1, length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed && !testResult; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-32 +description: > + Array.prototype.reduce - exception in getter terminates iteration + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (prevVal === 0); + } + } + + var obj = { 2: 2, 1: 1, length: 3 }; + Object.defineProperty(obj, "0", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed && !testResult; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-33.js index aa942b2df4..da30e16991 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-33.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-33.js - * @description Array.prototype.reduce - exception in getter terminates iteration on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (prevVal === 0); - } - } - - var arr = [, 1, 2]; - - Object.defineProperty(arr, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.reduce(callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed && !testResult; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-33 +description: > + Array.prototype.reduce - exception in getter terminates iteration + on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (prevVal === 0); + } + } + + var arr = [, 1, 2]; + + Object.defineProperty(arr, "0", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.reduce(callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed && !testResult; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js index 3a948612aa..c8af6d5707 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - try { - Array.prototype[0] = "9"; - [0, 1, 2].reduce(callbackfn); - return testResult; - - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-4 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + try { + Array.prototype[0] = "9"; + [0, 1, 2].reduce(callbackfn); + return testResult; + + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-5.js index 9b718ecd02..14ca367e6e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-5.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-5.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "9"); - } - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: "9", - configurable: true - }); - child[1] = "1"; - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-5 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "9"); + } + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "0", { + value: "9", + configurable: true + }); + child[1] = "1"; + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-6.js index 0c9792fa89..89b82650c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-6.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-6.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - try { - Object.defineProperty(Array.prototype, "0", { - get: function () { - return "5"; - }, - configurable: true - }); - - [0, 1, 2].reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-6 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + try { + Object.defineProperty(Array.prototype, "0", { + get: function () { + return "5"; + }, + configurable: true + }); + + [0, 1, 2].reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js index 25d3cbabf1..3aea427474 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js - * @description Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-7 +description: > + Array.prototype.reduce - element to be retrieved is inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js index 3744c3ee18..278416ccda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js - * @description Array.prototype.reduce - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - try { - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , ,].reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-8 +description: > + Array.prototype.reduce - element to be retrieved is inherited data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + try { + Array.prototype[0] = 0; + Array.prototype[1] = 1; + Array.prototype[2] = 2; + [, , ,].reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-9.js index d6965b3de7..5bf5ea0b6e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-9.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-9.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - var obj = { 1: 1, 2: 2, length: 3 }; - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-b-iii-1-9 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 0); + } + } + + var obj = { 1: 1, 2: 2, length: 3 }; + Object.defineProperty(obj, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js index 16fb81fd87..450fa5629a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js - * @description Array.prototype.reduce throws TypeError when Array is empty and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = new Array(10); - try { - arr.reduce(callbackfn); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-1 +description: > + Array.prototype.reduce throws TypeError when Array is empty and + initialValue is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = new Array(10); + try { + arr.reduce(callbackfn); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js index eceae5f01b..1a5343790c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js - * @description Array.prototype.reduce throws TypeError when elements assigned values are deleted by reducing array length and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = new Array(10); - arr[9] = 1; - arr.length = 5; - try { - arr.reduce(callbackfn); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-2 +description: > + Array.prototype.reduce throws TypeError when elements assigned + values are deleted by reducing array length and initialValue is + not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = new Array(10); + arr[9] = 1; + arr.length = 5; + try { + arr.reduce(callbackfn); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js index a730386d2f..e4b4d5c79d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js - * @description Array.prototype.reduce throws TypeError when elements assigned values are deleted and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = [1,2,3,4,5]; - delete arr[0]; - delete arr[1]; - delete arr[2]; - delete arr[3]; - delete arr[4]; - try { - arr.reduce(callbackfn); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-3 +description: > + Array.prototype.reduce throws TypeError when elements assigned + values are deleted and initialValue is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = [1,2,3,4,5]; + delete arr[0]; + delete arr[1]; + delete arr[2]; + delete arr[3]; + delete arr[4]; + try { + arr.reduce(callbackfn); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js index d98d867be8..72bf8be432 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js - * @description Array.prototype.reduce doesn't throw error when array has no own properties but prototype contains a single property - */ - - -function testcase() { - - var arr = [, , , ]; - - try { - Array.prototype[1] = "prototype"; - arr.reduce(function () { }); - return true; - } catch (ex) { - return false; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-4 +description: > + Array.prototype.reduce doesn't throw error when array has no own + properties but prototype contains a single property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [, , , ]; + + try { + Array.prototype[1] = "prototype"; + arr.reduce(function () { }); + return true; + } catch (ex) { + return false; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js index e3076ccd0f..d8ca5653e4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js - * @description Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 2 - */ - - -function testcase() { - - var obj = { }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, function () { }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-5 +description: > + Array.prototype.reduce - if exception occurs, it occurs after any + side-effects that might be produced by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, function () { }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js index ff3767b3da..f2f70a008d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js - * @description Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 3 - */ - - -function testcase() { - - var obj = {}; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, function () { }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-6 +description: > + Array.prototype.reduce - if exception occurs, it occurs after any + side-effects that might be produced by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, function () { }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js index 466698eca3..e0e3a25f71 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js - * @description Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, function () { }); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-7 +description: > + Array.prototype.reduce - the exception is not thrown if exception + was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, function () { }); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js index 7e89c2883d..3db905c5b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js - * @description Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, function () { }); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-8-c-8 +description: > + Array.prototype.reduce - the exception is not thrown if exception + was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, function () { }); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js index 41c4b8c3fb..cc57b2072c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js - * @description Array.prototype.reduce doesn't consider new elements added to array after it is called - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - arr[5] = 6; - arr[2] = 3; - return prevVal + curVal; - } - - var arr = [1, 2, , 4, '5']; - return arr.reduce(callbackfn) === "105"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-1 +description: > + Array.prototype.reduce doesn't consider new elements added to + array after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + arr[5] = 6; + arr[2] = 3; + return prevVal + curVal; + } + + var arr = [1, 2, , 4, '5']; + return arr.reduce(callbackfn) === "105"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js index ecad8565de..5474b7b168 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js - * @description Array.prototype.reduce called with an initial value doesn't consider new elements added to array after it is called - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) { - arr[5] = 6; - arr[2] = 3; - return prevVal + curVal; - } - - var arr = [1,2,,4,'5']; - return arr.reduce(callbackfn, "") === "12345"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-10 +description: > + Array.prototype.reduce called with an initial value doesn't + consider new elements added to array after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) { + arr[5] = 6; + arr[2] = 3; + return prevVal + curVal; + } + + var arr = [1,2,,4,'5']; + return arr.reduce(callbackfn, "") === "12345"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js index 4050e57e12..f4654276fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js - * @description Array.prototype.reduce considers new value of elements in array after it is called - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - arr[3] = -2; - arr[4] = -1; - return prevVal + curVal; - } - - var arr = [1,2,3,4,5]; - if(arr.reduce(callbackfn) === 3) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-2 +description: > + Array.prototype.reduce considers new value of elements in array + after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + arr[3] = -2; + arr[4] = -1; + return prevVal + curVal; + } + + var arr = [1,2,3,4,5]; + if(arr.reduce(callbackfn) === 3) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js index 4994dd29e4..e7e682e19f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js - * @description Array.prototype.reduce doesn't visit deleted elements in array after the call - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[3]; - delete arr[4]; - return prevVal + curVal; - } - - var arr = ['1',2,3,4,5]; - if(arr.reduce(callbackfn) === "123" ) // two elements deleted - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-3 +description: > + Array.prototype.reduce doesn't visit deleted elements in array + after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + delete arr[3]; + delete arr[4]; + return prevVal + curVal; + } + + var arr = ['1',2,3,4,5]; + if(arr.reduce(callbackfn) === "123" ) // two elements deleted + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js index 8a7724edd9..9ae0c352da 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js - * @description Array.prototype.reduce doesn't visit deleted elements when Array.length is decreased - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - arr.length = 2; - return prevVal + curVal; - } - - var arr = [1,2,3,4,5]; - if(arr.reduce(callbackfn) === 3 ) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-4 +description: > + Array.prototype.reduce doesn't visit deleted elements when + Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + arr.length = 2; + return prevVal + curVal; + } + + var arr = [1,2,3,4,5]; + if(arr.reduce(callbackfn) === 3 ) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js index 2c65d1513d..ba4007efc0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js - * @description Array.prototype.reduce - callbackfn not called for array with one element - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return 2; - } - - var arr = [1]; - if(arr.reduce(callbackfn) === 1 && callCnt === 0 ) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-5 +description: > + Array.prototype.reduce - callbackfn not called for array with one + element +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(prevVal, curVal, idx, obj) + { + callCnt++; + return 2; + } + + var arr = [1]; + if(arr.reduce(callbackfn) === 1 && callCnt === 0 ) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js index 344e704a6f..10cbf6c535 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js - * @description Array.prototype.reduce visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[3]; - delete arr[4]; - return prevVal + curVal; - } - - Array.prototype[4] = 5; - var arr = ['1',2,3,4,5]; - var res = arr.reduce(callbackfn); - delete Array.prototype[4]; - - if(res === "1235" ) //one element acually deleted - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-6 +description: > + Array.prototype.reduce visits deleted element in array after the + call when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + delete arr[3]; + delete arr[4]; + return prevVal + curVal; + } + + Array.prototype[4] = 5; + var arr = ['1',2,3,4,5]; + var res = arr.reduce(callbackfn); + delete Array.prototype[4]; + + if(res === "1235" ) //one element acually deleted + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-7.js index 95b163da81..6a8617f62a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-7.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-7.js - * @description Array.prototype.reduce stops calling callbackfn once the array is deleted during the call - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - delete o.arr; - return prevVal + curVal; - } - - var o = new Object(); - o.arr = ['1', 2, 3, 4, 5]; - return o.arr.reduce(callbackfn) === "12345" && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-7 +description: > + Array.prototype.reduce stops calling callbackfn once the array is + deleted during the call +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + delete o.arr; + return prevVal + curVal; + } + + var o = new Object(); + o.arr = ['1', 2, 3, 4, 5]; + return o.arr.reduce(callbackfn) === "12345" && !o.hasOwnProperty("arr"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-8.js index 932bf009da..98d3132b41 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-8.js @@ -1,33 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-8.js - * @description Array.prototype.reduce - no observable effects occur if 'len' is 0 - */ - - -function testcase() { - - var accessed = false; - var callbackAccessed = false; - function callbackfn() { - callbackAccessed = true; - } - - var obj = { length: 0 }; - - Object.defineProperty(obj, "0", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, function () { }, "initialValue"); - return !accessed && !callbackAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-8 +description: Array.prototype.reduce - no observable effects occur if 'len' is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var callbackAccessed = false; + function callbackfn() { + callbackAccessed = true; + } + + var obj = { length: 0 }; + + Object.defineProperty(obj, "0", { + get: function () { + accessed = true; + return 10; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, function () { }, "initialValue"); + return !accessed && !callbackAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-9.js index 7e17803f7e..4ff8d799bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-9.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-9.js - * @description Array.prototype.reduce - modifications to length don't change number of iterations in step 9 - */ - - -function testcase() { - var called = 0; - function callbackfn(accum, val, idx, obj) { - called++; - return accum + val; - } - - var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); - - var newAccum = arr.reduce(callbackfn, "initialValue"); - - return newAccum === "initialValue01" && called === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-9 +description: > + Array.prototype.reduce - modifications to length don't change + number of iterations in step 9 +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = 0; + function callbackfn(accum, val, idx, obj) { + called++; + return accum + val; + } + + var arr = [0, 1, 2, 3]; + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 0; + }, + configurable: true + }); + + var newAccum = arr.reduce(callbackfn, "initialValue"); + + return newAccum === "initialValue01" && called === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js index 09cd941c3d..dd5be94324 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js - * @description Array.prototype.reduce returns initialvalue when Array is empty and initialValue is present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = new Array(10); - - if(arr.reduce(callbackfn,5) === 5) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-1 +description: > + Array.prototype.reduce returns initialvalue when Array is empty + and initialValue is present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = new Array(10); + + if(arr.reduce(callbackfn,5) === 5) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-10.js index c517da5a11..da87247bb3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-10.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-10.js - * @description Array.prototype.reduce - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } - - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[3] = 1; - Array.prototype.reduce.call(obj, callbackfn); - return testResult && accessed; - } finally { - delete Object.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-10 +description: > + Array.prototype.reduce - deleting property of prototype in step 8 + causes deleted index property not to be visited on an Array-like + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } + } + + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete Object.prototype[3]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[3] = 1; + Array.prototype.reduce.call(obj, callbackfn); + return testResult && accessed; + } finally { + delete Object.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-11.js index 2affed3826..2058a7ae14 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-11.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-11.js - * @description Array.prototype.reduce - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [, , , 3]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduce(callbackfn); - return testResult && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-11 +description: > + Array.prototype.reduce - deleting property of prototype in step 8 + causes deleted index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [, , , 3]; + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduce(callbackfn); + return testResult && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-12.js index 3c46e35e5b..5cc49937a9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-12.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-12.js - * @description Array.prototype.reduce - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-12 +description: > + Array.prototype.reduce - deleting own property with prototype + property in step 8 causes prototype index property to be visited + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-13.js index f407c947c8..29b5f2884d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-13.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-13.js - * @description Array.prototype.reduce - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - var arr = [0, 111]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-13 +description: > + Array.prototype.reduce - deleting own property with prototype + property in step 8 causes prototype index property to be visited + on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + var arr = [0, 111]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-14.js index 0060cb74ef..3cc0e06cfb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-14.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-14.js - * @description Array.prototype.reduce - decreasing length of array in step 8 causes deleted index property not to be visited - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn); - - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-14 +description: > + Array.prototype.reduce - decreasing length of array in step 8 + causes deleted index property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn); + + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-15.js index f7f93d93af..09f1b8aba1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-15.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-15.js - * @description Array.prototype.reduce - decreasing length of array with prototype property in step 8 causes prototype index property to be visited - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduce(callbackfn); - - return testResult; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-15 +description: > + Array.prototype.reduce - decreasing length of array with prototype + property in step 8 causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "prototype") { + testResult = true; + } + } + var arr = [0, 1, 2, 3]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduce(callbackfn); + + return testResult; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-16.js index 0a77671ba5..f00d535a67 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-16.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-16.js - * @description Array.prototype.reduce - decreasing length of array in step 8 does not delete non-configurable properties - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - testResult = true; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduce(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-16 +description: > + Array.prototype.reduce - decreasing length of array in step 8 does + not delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + testResult = true; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduce(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-17.js index 487d624308..697f31f4dc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-17.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-17.js - * @description Array.prototype.reduce - properties added into own object are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 3 && val === 3) { - testResult = true; - } - } - - var obj = { length: 5 }; - - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "3", { - get: function () { - return 3; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-17 +description: > + Array.prototype.reduce - properties added into own object are + visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 3 && val === 3) { + testResult = true; + } + } + + var obj = { length: 5 }; + + Object.defineProperty(obj, "1", { + get: function () { + Object.defineProperty(obj, "3", { + get: function () { + return 3; + }, + configurable: true + }); + return 1; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-18.js index 6e1728748e..c3455ca872 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-18.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-18.js - * @description Array.prototype.reduce - properties added into own object are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-18 +description: > + Array.prototype.reduce - properties added into own object are + visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-19.js index ad853f0ec9..048b8258d3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-19.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-19.js - * @description Array.prototype.reduce - properties added to prototype are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } - - var obj = { length: 6 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-19 +description: > + Array.prototype.reduce - properties added to prototype are visited + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } + } + + var obj = { length: 6 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js index 4349f523c4..c29c1edae4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js - * @description Array.prototype.reduce - added properties in step 2 are visible here - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "2") { - testResult = true; - } - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "2"; - return 3; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-2 +description: > + Array.prototype.reduce - added properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "2") { + testResult = true; + } + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + obj[2] = "2"; + return 3; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-20.js index 2484149060..0b8817f05a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-20.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-20.js - * @description Array.prototype.reduce - properties can be added to prototype are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - arr.reduce(callbackfn, "initialValue"); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-20 +description: > + Array.prototype.reduce - properties can be added to prototype are + visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + arr.reduce(callbackfn, "initialValue"); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-21.js index c67a8a2c2f..a0e848beba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-21.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-21.js - * @description Array.prototype.reduce - deleting own property causes deleted index property not to be visited on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var obj = { 5: 10, length: 10 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-21 +description: > + Array.prototype.reduce - deleting own property causes deleted + index property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var obj = { 5: 10, length: 10 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-22.js index 76e3ecea35..d60a1cbc5a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-22.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-22.js - * @description Array.prototype.reduce - deleting own property causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [1, 2, 4]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-22 +description: > + Array.prototype.reduce - deleting own property causes deleted + index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [1, 2, 4]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn, "initialValue"); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-23.js index e38cb27288..20fbdf0846 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-23.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-23.js - * @description Array.prototype.reduce - deleting property of prototype causes deleted index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } - - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[3] = 1; - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } finally { - delete Object.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-23 +description: > + Array.prototype.reduce - deleting property of prototype causes + deleted index property not to be visited on an Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } + } + + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete Object.prototype[3]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[3] = 1; + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + return testResult && accessed; + } finally { + delete Object.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-24.js index f875814206..61a45ff200 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-24.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-24.js - * @description Array.prototype.reduce - deleting property of prototype causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [0, , , 3]; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduce(callbackfn, "initialValue"); - return testResult && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-24 +description: > + Array.prototype.reduce - deleting property of prototype causes + deleted index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [0, , , 3]; + Object.defineProperty(arr, "0", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduce(callbackfn, "initialValue"); + return testResult && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-25.js index 5d7dcf8538..9e573f92d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-25.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-25.js - * @description Array.prototype.reduce - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-25 +description: > + Array.prototype.reduce - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-26.js index a0a3bbe790..cc1050ceeb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-26.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-26.js - * @description Array.prototype.reduce - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - var arr = [0, 111]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduce(callbackfn, "initialValue"); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-26 +description: > + Array.prototype.reduce - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + var arr = [0, 111]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduce(callbackfn, "initialValue"); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-27.js index e3d63daf99..71308a6aa3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-27.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-27.js - * @description Array.prototype.reduce - decreasing length of array causes deleted index property not to be visited - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn, "initialValue"); - - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-27 +description: > + Array.prototype.reduce - decreasing length of array causes deleted + index property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn, "initialValue"); + + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-28.js index e629bdd9e2..e8a1e80bc8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-28.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-28.js - * @description Array.prototype.reduce - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduce(callbackfn, "initialValue"); - - return testResult; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-28 +description: > + Array.prototype.reduce - decreasing length of array with prototype + property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "prototype") { + testResult = true; + } + } + var arr = [0, 1, 2, 3]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduce(callbackfn, "initialValue"); + + return testResult; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-29.js index 4d9e6d5b8f..dc99111c32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-29.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-29.js - * @description Array.prototype.reduce - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - testResult = true; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduce(callbackfn, "initialValue"); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-29 +description: > + Array.prototype.reduce - decreasing length of array does not + delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + testResult = true; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "0", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduce(callbackfn, "initialValue"); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js index 23650e76bb..ba1b468ead 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js - * @description Array.prototype.reduce - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } - - var obj = { 2: "2", 3: 10 }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - - return accessed && testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-3 +description: > + Array.prototype.reduce - deleted properties in step 2 are visible + here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } + } + + var obj = { 2: "2", 3: 10 }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[2]; + return 5; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, "initialValue"); + + return accessed && testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-4.js index fbc9313e5e..b8908c6cd3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-4.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-4.js - * @description Array.prototype.reduce - properties added into own object in step 8 are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 3 && val === 3) { - testResult = true; - } - } - - var obj = { length: 5 }; - - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "3", { - get: function () { - return 3; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-4 +description: > + Array.prototype.reduce - properties added into own object in step + 8 are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 3 && val === 3) { + testResult = true; + } + } + + var obj = { length: 5 }; + + Object.defineProperty(obj, "1", { + get: function () { + Object.defineProperty(obj, "3", { + get: function () { + return 3; + }, + configurable: true + }); + return 1; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-5.js index 5a62b994c4..46f0b845f5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-5.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-5.js - * @description Array.prototype.reduce - properties added into own object in step 8 are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 1) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-5 +description: > + Array.prototype.reduce - properties added into own object in step + 8 are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 1) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-6.js index 23d2399455..24f0011c0b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-6.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-6.js - * @description Array.prototype.reduce - properties added to prototype in step 8 are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } - - var obj = { length: 6 }; - - Object.defineProperty(obj, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-6 +description: > + Array.prototype.reduce - properties added to prototype in step 8 + are visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } + } + + var obj = { length: 6 }; + + Object.defineProperty(obj, "0", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-7.js index 160a1df456..d74cd51d1a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-7.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-7.js - * @description Array.prototype.reduce - properties added to prototype in step 8 are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(accum, val, idx, obj) { - if (idx === 1 && val === 6.99) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - arr.reduce(callbackfn); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-7 +description: > + Array.prototype.reduce - properties added to prototype in step 8 + are visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(accum, val, idx, obj) { + if (idx === 1 && val === 6.99) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "0", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + arr.reduce(callbackfn); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-8.js index 8dbe1476cf..3b1712f6ef 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-8.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-8.js - * @description Array.prototype.reduce - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var obj = { 5: 10, length: 10 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-8 +description: > + Array.prototype.reduce - deleting own property in step 8 causes + deleted index property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var obj = { 5: 10, length: 10 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "0", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-9.js index 0da6959f61..8614c1a76d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-9.js - * @description Array.prototype.reduce - deleting own property in step 8 causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(accum, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [1, 2, 4]; - - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - arr.reduce(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-b-9 +description: > + Array.prototype.reduce - deleting own property in step 8 causes + deleted index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(accum, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [1, 2, 4]; + + Object.defineProperty(arr, "0", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + arr.reduce(callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js index fa0505cc81..a7e3294d11 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js - * @description Array.prototype.reduce - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return curVal; - } - - var arr = new Array(10); - arr[0] = arr[1] = undefined; //explicitly assigning a value - if( arr.reduce(callbackfn) === undefined && callCnt === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-1 +description: > + Array.prototype.reduce - callbackfn not called for indexes never + been assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(prevVal, curVal, idx, obj) + { + callCnt++; + return curVal; + } + + var arr = new Array(10); + arr[0] = arr[1] = undefined; //explicitly assigning a value + if( arr.reduce(callbackfn) === undefined && callCnt === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js index 0b5eb7ebd8..6ed5da3512 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js - * @description Array.prototype.reduce - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-1 +description: > + Array.prototype.reduce - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-10.js index 0dc430757d..988921c172 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-10.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-10.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - arr.reduce(callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-10 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + arr.reduce(callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-11.js index fe889f0900..f9a7c0201a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-11.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-11.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } - - var proto = { 0: 0, 1: 1, 2: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-11 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } + } + + var proto = { 0: 0, 1: 1, 2: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "1", { + get: function () { + return "11"; + }, + configurable: true + }); + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-12.js index aabe9c8c51..5cd14aeb32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-12.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-12.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } - - try { - Array.prototype[1] = 1; - var arr = [0, ,2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - - arr.reduce(callbackfn, initialValue); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-12 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } + } + + try { + Array.prototype[1] = 1; + var arr = [0, ,2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "11"; + }, + configurable: true + }); + + arr.reduce(callbackfn, initialValue); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-13.js index 2dcf3c1ec3..1a4ec646b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-13.js @@ -1,47 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-13.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } - - var proto = { 0: 0, 2: 2}; - - Object.defineProperty(proto, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-13 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } + } + + var proto = { 0: 0, 2: 2}; + + Object.defineProperty(proto, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "1", { + get: function () { + return "11"; + }, + configurable: true + }); + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-14.js index e385d6b0a6..8ef0d06f93 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-14.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-14.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var arr = [0, ,2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - arr.reduce(callbackfn, initialValue); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-14 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var arr = [0, ,2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "11"; + }, + configurable: true + }); + arr.reduce(callbackfn, initialValue); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-15.js index c22190f9bc..10713ab9f7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-15.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-15.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var proto = { 0: 0, 2: 2 }; - - Object.defineProperty(proto, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-15 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var proto = { 0: 0, 2: 2 }; + + Object.defineProperty(proto, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-16.js index 493aef570b..d449c27008 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-16.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-16.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var arr = [0, , 2, ]; - - arr.reduce(callbackfn, initialValue); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-16 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var arr = [0, , 2, ]; + + arr.reduce(callbackfn, initialValue); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-17.js index b7915936c8..68c36e5e7c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-17.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-17.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } - - var obj = { 0: 0, 2: 2, length: 3 }; - - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-17 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } + } + + var obj = { 0: 0, 2: 2, length: 3 }; + + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-18.js index a70483e632..698e217611 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-18.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-18.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); - - arr.reduce(callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-18 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "1", { + set: function () { }, + configurable: true + }); + + arr.reduce(callbackfn, initialValue); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-19.js index 951e9e0d1d..42439083d4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-19.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-19.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } - - try { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var obj = { 0: 0, 2: 2, length: 3 }; - - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-19 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } + } + + try { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var obj = { 0: 0, 2: 2, length: 3 }; + + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js index 6b57c3837b..59bdc7cf78 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js - * @description Array.prototype.reduce - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [0, 1]; - arr.reduce(callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-2 +description: > + Array.prototype.reduce - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [0, 1]; + arr.reduce(callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-20.js index 7aacab5ebd..24efd65783 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-20.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-20.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - var arr = [0, , 2]; - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); - - arr.reduce(callbackfn, initialValue); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-20 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property without a get function that overrides an inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + var arr = [0, , 2]; + Object.defineProperty(arr, "1", { + set: function () { }, + configurable: true + }); + + arr.reduce(callbackfn, initialValue); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-21.js index a84eb07097..b57f78a7bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-21.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-21.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } - - var proto = { 0: 0, 2: 2 }; - - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-21 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } + } + + var proto = { 0: 0, 2: 2 }; + + Object.defineProperty(proto, "1", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-22.js index 64748a65b6..9ae42b562d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-22.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-22.js - * @description Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === undefined); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - set: function () { }, - configurable: true - }); - - var arr = [0, , 2]; - - arr.reduce(callbackfn, initialValue); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-22 +description: > + Array.prototype.reduce - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === undefined); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + set: function () { }, + configurable: true + }); + + var arr = [0, , 2]; + + arr.reduce(callbackfn, initialValue); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-23.js index bc8fec5e8e..8e09b48f3b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-23.js @@ -1,37 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-23.js - * @description Array.prototype.reduce - This object is the global object which contains index property - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 0; - fnGlobalObject()[1] = 1; - fnGlobalObject().length = 2; - - Array.prototype.reduce.call(fnGlobalObject(), callbackfn, initialValue); - return testResult; - - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-23 +description: > + Array.prototype.reduce - This object is the global object which + contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 0; + fnGlobalObject()[1] = 1; + fnGlobalObject().length = 2; + + Array.prototype.reduce.call(fnGlobalObject(), callbackfn, initialValue); + return testResult; + + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js index fd1fa64a2d..69fbf2ef01 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js - * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn, initialValue); - }; - - func(0, 1); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-25 +description: > + Array.prototype.reduce - This object is the Arguments object which + implements its own property get method (number of arguments is + less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var func = function (a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn, initialValue); + }; + + func(0, 1); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js index d59299e903..1b6a946f79 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js - * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (curVal === 2); - } - } - - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn, initialValue); - }; - - func(0, 1, 2); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-26 +description: > + Array.prototype.reduce - This object is the Arguments object which + implements its own property get method (number of arguments equals + number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (curVal === 2); + } + } + + var func = function (a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn, initialValue); + }; + + func(0, 1, 2); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js index 56a709e3c2..ef06a3ac22 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js - * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 3) { - testResult = (curVal === 3); - } - } - - var func = function (a, b, c) { - Array.prototype.reduce.call(arguments, callbackfn, initialValue); - }; - - func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-27 +description: > + Array.prototype.reduce - This object is the Arguments object which + implements its own property get method (number of arguments is + greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 3) { + testResult = (curVal === 3); + } + } + + var func = function (a, b, c) { + Array.prototype.reduce.call(arguments, callbackfn, initialValue); + }; + + func(0, 1, 2, 3); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js index 9aa33fd8bb..a1be714937 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js - * @description Array.prototype.reduce - applied to String object, which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - var str = new String("012"); - - Array.prototype.reduce.call(str, callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-28 +description: > + Array.prototype.reduce - applied to String object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + var str = new String("012"); + + Array.prototype.reduce.call(str, callbackfn, initialValue); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js index 04c54757c9..894fac5a7a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js - * @description Array.prototype.reduce - applied to Function object which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = function (a, b, c) { - return a + b + c; - }; - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - obj[3] = 3; - - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-29 +description: > + Array.prototype.reduce - applied to Function object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = function (a, b, c) { + return a + b + c; + }; + obj[0] = 0; + obj[1] = 1; + obj[2] = 2; + obj[3] = 3; + + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js index 9b5be0a292..f4e60752c6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js @@ -1,35 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "11"); - } - } - - var proto = { 0: 0, 1: 1, 2: 2, length: 2 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[1] = "11"; - child[2] = "22"; - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-3 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "11"); + } + } + + var proto = { 0: 0, 1: 1, 2: 2, length: 2 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[1] = "11"; + child[2] = "22"; + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-30.js index 14ad562239..b882658930 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-30.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-30.js - * @description Array.prototype.reduce - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [, , 2]; - var preIterVisible = false; - - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return 100; - } - }, - configurable: true - }); - - arr.reduce(callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-30 +description: > + Array.prototype.reduce - element changed by getter on previous + iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [, , 2]; + var preIterVisible = false; + + Object.defineProperty(arr, "0", { + get: function () { + preIterVisible = true; + return 0; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return 100; + } + }, + configurable: true + }); + + arr.reduce(callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-31.js index b0a3ec660e..eb42e52e2e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-31.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-31.js - * @description Array.prototype.reduce - element changed by getter on previous iterations is observed on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = { 2: 2, length: 3 }; - var preIterVisible = false; - - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "11"; - } - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-31 +description: > + Array.prototype.reduce - element changed by getter on previous + iterations is observed on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = { 2: 2, length: 3 }; + var preIterVisible = false; + + Object.defineProperty(obj, "0", { + get: function () { + preIterVisible = true; + return 0; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return "11"; + } + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-32.js index 92bd0c55bc..2f6701b62c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-32.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-32.js - * @description Array.prototype.reduce - unnhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (curVal >= 1); - } - } - - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed && !testResult; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-32 +description: > + Array.prototype.reduce - unnhandled exceptions happened in getter + terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (curVal >= 1); + } + } + + var obj = { 0: 0, 2: 2, length: 3 }; + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed && !testResult; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-33.js index 6d0479b4e2..9ae9627d42 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-33.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-33.js - * @description Array.prototype.reduce - unnhandled exceptions happened in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx >= 1) { - accessed = true; - testResult = (curVal >= 1); - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.reduce(callbackfn, initialValue); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed && !testResult; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-33 +description: > + Array.prototype.reduce - unnhandled exceptions happened in getter + terminate iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx >= 1) { + accessed = true; + testResult = (curVal >= 1); + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.reduce(callbackfn, initialValue); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed && !testResult; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js index 7d5b8e0c26..42250824ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Array.prototype[1] = "3"; - [0, 1, 2].reduce(callbackfn, initialValue); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-4 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Array.prototype[1] = "3"; + [0, 1, 2].reduce(callbackfn, initialValue); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-5.js index 4fd59cc262..bca119ebfd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-5.js @@ -1,47 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-5.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (curVal === "9"); - } - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 0; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - - Object.defineProperty(child, "0", { - value: "9", - configurable: true - }); - - child[1] = "1"; - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-5 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (curVal === "9"); + } + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 0; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + + Object.defineProperty(child, "0", { + value: "9", + configurable: true + }); + + child[1] = "1"; + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-6.js index c115ef7440..1be14cfbcc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-6.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-6.js - * @description Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return "9"; - }, - configurable: true - }); - [0, 1, 2].reduce(callbackfn, initialValue); - return testResult; - - } finally { - delete Array.prototype[1]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-6 +description: > + Array.prototype.reduce - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return "9"; + }, + configurable: true + }); + [0, 1, 2].reduce(callbackfn, initialValue); + return testResult; + + } finally { + delete Array.prototype[1]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js index f981408647..af96630203 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js - * @description Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-7 +description: > + Array.prototype.reduce - element to be retrieved is inherited data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduce.call(child, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js index dc90b79a94..e26fca1ec4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js @@ -1,35 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js - * @description Array.prototype.reduce - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , , ].reduce(callbackfn, initialValue); - - return testResult; - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-8 +description: > + Array.prototype.reduce - element to be retrieved is inherited data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Array.prototype[0] = 0; + Array.prototype[1] = 1; + Array.prototype[2] = 2; + [, , , ].reduce(callbackfn, initialValue); + + return testResult; + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-9.js index a51d66611f..cb4ec99c91 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-9.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-9.js - * @description Array.prototype.reduce - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-i-9 +description: > + Array.prototype.reduce - element to be retrieved is own accessor + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = { 0: 0, 2: 2, length: 3 }; + Object.defineProperty(obj, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + Array.prototype.reduce.call(obj, callbackfn, initialValue); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js index e6c2d29d15..f2f0a5755d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js - * @description Array.prototype.reduce - callbackfn called with correct parameters (initialvalue not passed) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) - return curVal; - else - return false; - } - - var arr = [0,1,true,null,new Object(),"five"]; - if( arr.reduce(callbackfn) === "five") - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-1 +description: > + Array.prototype.reduce - callbackfn called with correct parameters + (initialvalue not passed) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) + return curVal; + else + return false; + } + + var arr = [0,1,true,null,new Object(),"five"]; + if( arr.reduce(callbackfn) === "five") + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js index a8258c91ec..2088bb59b3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js - * @description Array.prototype.reduce - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(prevVal) { - result = (prevVal === 1); - } - - [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-10 +description: > + Array.prototype.reduce - callbackfn is called with 1 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(prevVal) { + result = (prevVal === 1); + } + + [11].reduce(callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js index 8990a0de48..cbadfd4d23 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js - * @description Array.prototype.reduce - callbackfn is called with 2 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(prevVal, curVal) { - result = (curVal > 10 && 1 === prevVal); - } - - [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-11 +description: > + Array.prototype.reduce - callbackfn is called with 2 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(prevVal, curVal) { + result = (curVal > 10 && 1 === prevVal); + } + + [11].reduce(callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js index 1f8cef862f..c899940c77 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js - * @description Array.prototype.reduce - callbackfn is called with 3 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(prevVal, curVal, idx) { - result = (prevVal === 1 && arguments[3][idx] === curVal); - } - - [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-12 +description: > + Array.prototype.reduce - callbackfn is called with 3 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(prevVal, curVal, idx) { + result = (prevVal === 1 && arguments[3][idx] === curVal); + } + + [11].reduce(callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js index b46437dd35..f378e74da7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js - * @description Array.prototype.reduce - callbackfn is called with 4 formal parameter - */ - - -function testcase() { - - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - result = (prevVal === 1 && obj[idx] === curVal); - } - - [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-13 +description: > + Array.prototype.reduce - callbackfn is called with 4 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(prevVal, curVal, idx, obj) { + result = (prevVal === 1 && obj[idx] === curVal); + } + + [11].reduce(callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js index 4bd73720ab..5a8a1765ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js - * @description Array.prototype.reduce - callbackfn that uses arguments - */ - - -function testcase() { - - var result = false; - function callbackfn() { - result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]); - } - - [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-14 +description: Array.prototype.reduce - callbackfn that uses arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn() { + result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]); + } + + [11].reduce(callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js index e6ab36d260..9f3951f25e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js @@ -1,34 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js - * @description Array.prototype.reduce - non-indexed properties are not called - */ - - -function testcase() { - - var accessed = false; - var result1 = true; - var result2 = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (curVal === 8) { - result1 = false; - } - - if (prevVal === 8) { - result2 = false; - } - } - - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; - - Array.prototype.reduce.call(obj, callbackfn, 1); - return result1 && result2 && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-16 +description: Array.prototype.reduce - non-indexed properties are not called +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var result1 = true; + var result2 = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (curVal === 8) { + result1 = false; + } + + if (prevVal === 8) { + result2 = false; + } + } + + var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; + + Array.prototype.reduce.call(obj, callbackfn, 1); + return result1 && result2 && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js index 4b0ecb7e21..0c3d492199 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js - * @description Array.prototype.reduce - 'accumulator' used for current iteration is the result of previous iteration on an Array - */ - - -function testcase() { - - var result = true; - var accessed = false; - var preIteration = 1; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (preIteration !== prevVal) { - result = false; - } - preIteration = curVal; - return curVal; - } - - [11, 12, 13].reduce(callbackfn, 1); - return result && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-17 +description: > + Array.prototype.reduce - 'accumulator' used for current iteration + is the result of previous iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + var accessed = false; + var preIteration = 1; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (preIteration !== prevVal) { + result = false; + } + preIteration = curVal; + return curVal; + } + + [11, 12, 13].reduce(callbackfn, 1); + return result && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js index e7515a77ce..5235b48fe3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js - * @description Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array-like object - */ - - -function testcase() { - - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - result = (arguments[0] === 1); - } - } - - var obj = { 0: 11, 1: 9, length: 2 }; - - Array.prototype.reduce.call(obj, callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-18 +description: > + Array.prototype.reduce - value of 'accumulator' used for first + iteration is the value of 'initialValue' when it is present on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + result = (arguments[0] === 1); + } + } + + var obj = { 0: 11, 1: 9, length: 2 }; + + Array.prototype.reduce.call(obj, callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js index 3c48398298..494452531d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js @@ -1,26 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js - * @description Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of least index property which is not undefined when 'initialValue' is not present on an Array - */ - - -function testcase() { - - var called = 0; - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - called++; - if (idx === 1) { - result = (prevVal === 11) && curVal === 9; - } - } - - [11, 9].reduce(callbackfn); - return result && called === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-19 +description: > + Array.prototype.reduce - value of 'accumulator' used for first + iteration is the value of least index property which is not + undefined when 'initialValue' is not present on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var result = false; + function callbackfn(prevVal, curVal, idx, obj) { + called++; + if (idx === 1) { + result = (prevVal === 11) && curVal === 9; + } + } + + [11, 9].reduce(callbackfn); + return result && called === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js index eac3d5109e..6722853128 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js - * @description Array.prototype.reduce - callbackfn called with correct parameters (initialvalue passed) - */ - - -function testcase() { - - var bParCorrect = false; - function callbackfn(prevVal, curVal, idx, obj) - { - if(idx === 0 && obj[idx] === curVal && prevVal === initialValue) - return curVal; - else if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) - return curVal; - else - return false; - } - - var arr = [0,1,true,null,new Object(),"five"]; - var initialValue = 5.5; - if( arr.reduce(callbackfn,initialValue) === "five") - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-2 +description: > + Array.prototype.reduce - callbackfn called with correct parameters + (initialvalue passed) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var bParCorrect = false; + function callbackfn(prevVal, curVal, idx, obj) + { + if(idx === 0 && obj[idx] === curVal && prevVal === initialValue) + return curVal; + else if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) + return curVal; + else + return false; + } + + var arr = [0,1,true,null,new Object(),"five"]; + var initialValue = 5.5; + if( arr.reduce(callbackfn,initialValue) === "five") + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js index d7ba7fe629..5d8ac28ff0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js - * @description Array.prototype.reduce - undefined can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof prevVal === "undefined"; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-20 +description: Array.prototype.reduce - undefined can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof prevVal === "undefined"; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js index 7201f71c30..5d4ad691ca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js - * @description Array.prototype.reduce - null can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === null; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, null) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-21 +description: Array.prototype.reduce - null can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === null; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, null) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js index ccd9acba91..e8225c9522 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js - * @description Array.prototype.reduce - boolean primitive can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === false; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, false) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-22 +description: > + Array.prototype.reduce - boolean primitive can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === false; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, false) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js index 3ac6f9d306..dde8f27574 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js - * @description Array.prototype.reduce - number primitive can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === 12; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-23 +description: > + Array.prototype.reduce - number primitive can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === 12; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js index 7deb554fe3..da5645f339 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js - * @description Array.prototype.reduce - string primitive can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === "hello_"; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, "hello_") === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-24 +description: > + Array.prototype.reduce - string primitive can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === "hello_"; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, "hello_") === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js index 12507db443..4065edef1a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js - * @description Array.prototype.reduce - Function object can be used as accumulator - */ - - -function testcase() { - - var objFunction = function () { }; - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objFunction; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objFunction) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-25 +description: Array.prototype.reduce - Function object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objFunction = function () { }; + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objFunction; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objFunction) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js index 0f0ffe5007..6358a7d0a3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js - * @description Array.prototype.reduce - Array object can be used as accumulator - */ - - -function testcase() { - - var objArray = new Array(10); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objArray; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objArray) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-26 +description: Array.prototype.reduce - Array object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objArray = new Array(10); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objArray; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objArray) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js index daaf155048..df37b68743 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js - * @description Array.prototype.reduce - String object can be used as accumulator - */ - - -function testcase() { - - var objString = new String(); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objString; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objString) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-27 +description: Array.prototype.reduce - String object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objString = new String(); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objString; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objString) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js index 2e1c8acb0f..169b37ddd7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js - * @description Array.prototype.reduce - Boolean object can be used as accumulator - */ - - -function testcase() { - - var objBoolean = new Boolean(); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objBoolean; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objBoolean) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-28 +description: Array.prototype.reduce - Boolean object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objBoolean = new Boolean(); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objBoolean; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objBoolean) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js index 58d739d0c4..d8c64102c2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js - * @description Array.prototype.reduce - Number object can be used as accumulator - */ - - -function testcase() { - - var objNumber = new Number(); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objNumber; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objNumber) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-29 +description: Array.prototype.reduce - Number object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objNumber = new Number(); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objNumber; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objNumber) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js index 4af1a3a649..fce852c19c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js - * @description Array.prototype.reduce - callbackfn takes 4 arguments - */ - - -function testcase() { - - var bCalled = false; - function callbackfn(prevVal, curVal, idx, obj) - { - bCalled = true; - if(prevVal === true && arguments.length === 4) - return true; - else - return false; - } - var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.reduce(callbackfn,true) === true && bCalled === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-3 +description: Array.prototype.reduce - callbackfn takes 4 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var bCalled = false; + function callbackfn(prevVal, curVal, idx, obj) + { + bCalled = true; + if(prevVal === true && arguments.length === 4) + return true; + else + return false; + } + var arr = [0,1,2,3,4,5,6,7,8,9]; + if(arr.reduce(callbackfn,true) === true && bCalled === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js index 1a264d477e..d04c73448f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js - * @description Array.prototype.reduce - the Math object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === Math; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, Math) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-30 +description: Array.prototype.reduce - the Math object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === Math; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, Math) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js index b174da5c35..921a137e86 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js - * @description Array.prototype.reduce - Date object can be used as accumulator - */ - - -function testcase() { - - var objDate = new Date(); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objDate; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objDate) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-31 +description: Array.prototype.reduce - Date object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objDate = new Date(); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objDate; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objDate) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js index 87c79c2a0b..ee102104ed 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js - * @description Array.prototype.reduce - RegExp object can be used as accumulator - */ - - -function testcase() { - - var objRegExp = new RegExp(); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objRegExp; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objRegExp) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-32 +description: Array.prototype.reduce - RegExp object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objRegExp = new RegExp(); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objRegExp; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objRegExp) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js index 3c3ae87a79..00945abefc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js - * @description Array.prototype.reduce - the JSON can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === JSON; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, JSON) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-33 +description: Array.prototype.reduce - the JSON can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === JSON; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, JSON) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js index ff40bd4a7a..feee4bb750 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js - * @description Array.prototype.reduce - Error object can be used as accumulator - */ - - -function testcase() { - - var objError = new RangeError(); - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objError; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, objError) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-34 +description: Array.prototype.reduce - Error object can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var objError = new RangeError(); + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objError; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, objError) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js index 6e89c68d3f..e824262411 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js - * @description Array.prototype.reduce - the Arguments object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var arg; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === arg; - } - - var obj = { 0: 11, length: 1 }; - - (function fun() { - arg = arguments; - }(10, 11, 12, 13)); - - return Array.prototype.reduce.call(obj, callbackfn, arg) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-35 +description: > + Array.prototype.reduce - the Arguments object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arg; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === arg; + } + + var obj = { 0: 11, length: 1 }; + + (function fun() { + arg = arguments; + }(10, 11, 12, 13)); + + return Array.prototype.reduce.call(obj, callbackfn, arg) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-37.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-37.js index 1cfe96ff7b..aac50b4a32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-37.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-37.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-37.js - * @description Array.prototype.reduce - the global object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === fnGlobalObject(); - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-37 +description: > + Array.prototype.reduce - the global object can be used as + accumulator +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === fnGlobalObject(); + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4-s.js index 692b849557..5c4341668d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4-s.js - * @description Array.prototype.reduce - undefined passed as thisValue to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - function callbackfn(prevVal, curVal, idx, obj) - { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - [0].reduce(callbackfn,true); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-4-s +description: > + Array.prototype.reduce - undefined passed as thisValue to strict + callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + function callbackfn(prevVal, curVal, idx, obj) + { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + [0].reduce(callbackfn,true); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js index a95871222d..0c5ded54e0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js - * @description Array.prototype.reduce - k values are passed in acending numeric order on an Array - */ - - -function testcase() { - - var arr = [0, 1, 2]; - var lastIdx = 0; - var result = true; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx++; - } - } - - arr.reduce(callbackfn, 11); - return result && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-4 +description: > + Array.prototype.reduce - k values are passed in acending numeric + order on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2]; + var lastIdx = 0; + var result = true; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx++; + } + } + + arr.reduce(callbackfn, 11); + return result && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js index 76a337fd9b..d1c778e0ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js - * @description Array.prototype.reduce - k values are accessed during each iteration and not prior to starting the loop on an Array - */ - - -function testcase() { - - var result = true; - var kIndex = []; - var called = 0; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(prevVal, curVal, idx, obj) { - //Each position should be visited one time, which means k is accessed one time during iterations. - called++; - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - result = false; - } - kIndex[idx] = 1; - } else { - result = false; - } - } - - [11, 12, 13, 14].reduce(callbackfn, 1); - - return result && called === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-5 +description: > + Array.prototype.reduce - k values are accessed during each + iteration and not prior to starting the loop on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = true; + var kIndex = []; + var called = 0; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(prevVal, curVal, idx, obj) { + //Each position should be visited one time, which means k is accessed one time during iterations. + called++; + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + result = false; + } + kIndex[idx] = 1; + } else { + result = false; + } + } + + [11, 12, 13, 14].reduce(callbackfn, 1); + + return result && called === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js index 1658f66fd4..618e260e2e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js - * @description Array.prototype.reduce - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 0) { - accessed = true; - } - if (idx === 0) { - throw new Error("Exception occurred in callbackfn"); - } - } - - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; - - try { - Array.prototype.reduce.call(obj, callbackfn, 1); - return false; - } catch (ex) { - return (ex instanceof Error) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-7 +description: > + Array.prototype.reduce - unhandled exceptions happened in + callbackfn terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 0) { + accessed = true; + } + if (idx === 0) { + throw new Error("Exception occurred in callbackfn"); + } + } + + var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; + + try { + Array.prototype.reduce.call(obj, callbackfn, 1); + return false; + } catch (ex) { + return (ex instanceof Error) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js index 61c13270c7..634e9c796d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js - * @description Array.prototype.reduce - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - var result = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - obj[idx + 1] = 8; - } - - if (idx === 1) { - result = (curVal === 8); - } - } - - var obj = { 0: 11, 1: 12, length: 2 }; - - Array.prototype.reduce.call(obj, callbackfn, 1); - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-8 +description: > + Array.prototype.reduce - element changed by callbackfn on previous + iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + var result = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + obj[idx + 1] = 8; + } + + if (idx === 1) { + result = (curVal === 8); + } + } + + var obj = { 0: 11, 1: 12, length: 2 }; + + Array.prototype.reduce.call(obj, callbackfn, 1); + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js index 20b8aed1c6..d1aef7e8c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js - * @description Array.prototype.reduce - callbackfn is called with 0 formal parameter - */ - - -function testcase() { - - var called = 0; - function callbackfn() { - called++; - } - - [11, 12].reduce(callbackfn, 1); - return 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.21-9-c-ii-9 +description: > + Array.prototype.reduce - callbackfn is called with 0 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + function callbackfn() { + called++; + } + + [11, 12].reduce(callbackfn, 1); + return 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js index 5796279d05..f8448f4748 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js - * @description Array.prototype.reduceRight must exist as a function - */ - - -function testcase() { - var f = Array.prototype.reduceRight; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-0-1 +description: Array.prototype.reduceRight must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Array.prototype.reduceRight; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js index 0fc9fb1b85..070f469303 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js - * @description Array.prototype.reduceRight.length must be 1 - */ - - -function testcase() { - if (Array.prototype.reduceRight.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-0-2 +description: Array.prototype.reduceRight.length must be 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Array.prototype.reduceRight.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js index 3d13569fd1..502a4f7ec2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js - * @description Array.prototype.reduceRight applied to undefined throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.reduceRight.call(undefined); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-1 +description: Array.prototype.reduceRight applied to undefined throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.reduceRight.call(undefined); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js index 4c04ab1b90..3f63f34f91 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js - * @description Array.prototype.reduceRight applied to the Math object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return '[object Math]' === Object.prototype.toString.call(obj); - } - - try { - Math.length = 1; - Math[0] = 1; - return Array.prototype.reduceRight.call(Math, callbackfn, 1) && accessed; - } finally { - delete Math[0]; - delete Math.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-10 +description: Array.prototype.reduceRight applied to the Math object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return '[object Math]' === Object.prototype.toString.call(obj); + } + + try { + Math.length = 1; + Math[0] = 1; + return Array.prototype.reduceRight.call(Math, callbackfn, 1) && accessed; + } finally { + delete Math[0]; + delete Math.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js index c9cb0bb768..5fd0ea0710 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js - * @description Array.prototype.reduceRight applied to Date object - */ - - -function testcase() { - - var obj = new Date(); - obj.length = 1; - obj[0] = 1; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Date; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-11 +description: Array.prototype.reduceRight applied to Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Date(); + obj.length = 1; + obj[0] = 1; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Date; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js index b22d82384a..24acc7973e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js - * @description Array.prototype.reduceRight applied to RegExp object - */ - - -function testcase() { - - var obj = new RegExp(); - obj.length = 1; - obj[0] = 1; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof RegExp; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-12 +description: Array.prototype.reduceRight applied to RegExp object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new RegExp(); + obj.length = 1; + obj[0] = 1; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof RegExp; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js index 399fd832b0..1071c4602e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js - * @description Array.prototype.reduceRight applied to the JSON object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return ('[object JSON]' === Object.prototype.toString.call(obj)); - } - - try { - JSON.length = 1; - JSON[0] = 1; - return Array.prototype.reduceRight.call(JSON, callbackfn, 1) && accessed; - } finally { - delete JSON.length; - delete JSON[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-13 +description: Array.prototype.reduceRight applied to the JSON object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return ('[object JSON]' === Object.prototype.toString.call(obj)); + } + + try { + JSON.length = 1; + JSON[0] = 1; + return Array.prototype.reduceRight.call(JSON, callbackfn, 1) && accessed; + } finally { + delete JSON.length; + delete JSON[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js index 1574867c49..33b3692009 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js @@ -1,26 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js - * @description Array.prototype.reduceRight applied to Error object - */ - - -function testcase() { - - var obj = new Error(); - obj.length = 1; - obj[0] = 1; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof Error; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-14 +description: Array.prototype.reduceRight applied to Error object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Error(); + obj.length = 1; + obj[0] = 1; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof Error; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js index b4fb8c62e1..c223671aa6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js - * @description Array.prototype.reduceRight applied to the Arguments object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return '[object Arguments]' === Object.prototype.toString.call(obj); - } - - var obj = (function () { - return arguments; - }("a", "b")); - - return Array.prototype.reduceRight.call(obj, callbackfn, "a") && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-15 +description: Array.prototype.reduceRight applied to the Arguments object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return '[object Arguments]' === Object.prototype.toString.call(obj); + } + + var obj = (function () { + return arguments; + }("a", "b")); + + return Array.prototype.reduceRight.call(obj, callbackfn, "a") && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js index 9e28609f69..1de1cc2498 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js - * @description Array.prototype.reduceRight applied to null throws a TypeError - */ - - -function testcase() { - try { - Array.prototype.reduceRight.call(null); - return false; - } catch (e) { - return (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-2 +description: Array.prototype.reduceRight applied to null throws a TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Array.prototype.reduceRight.call(null); + return false; + } catch (e) { + return (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js index b14059e3b6..a819dde39f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js - * @description Array.prototype.reduceRight applied to boolean primitive - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Boolean; - } - - try { - Boolean.prototype[0] = 1; - Boolean.prototype.length = 1; - return Array.prototype.reduceRight.call(false, callbackfn, 1) && accessed; - } finally { - delete Boolean.prototype[0]; - delete Boolean.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-3 +description: Array.prototype.reduceRight applied to boolean primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Boolean; + } + + try { + Boolean.prototype[0] = 1; + Boolean.prototype.length = 1; + return Array.prototype.reduceRight.call(false, callbackfn, 1) && accessed; + } finally { + delete Boolean.prototype[0]; + delete Boolean.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js index 555e3f740c..80dd1a98ce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js - * @description Array.prototype.reduceRight applied to Boolean object - */ - - -function testcase() { - - var obj = new Boolean(true); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Boolean; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-4 +description: Array.prototype.reduceRight applied to Boolean object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Boolean(true); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Boolean; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js index 3f8c6bf333..cdaf99c5e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js @@ -1,30 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js - * @description Array.prototype.reduceRight applied to number primitive - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof Number; - } - - try { - Number.prototype[0] = 1; - Number.prototype.length = 1; - return Array.prototype.reduceRight.call(2.5, callbackfn, 1) && accessed; - } finally { - delete Number.prototype[0]; - delete Number.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-5 +description: Array.prototype.reduceRight applied to number primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof Number; + } + + try { + Number.prototype[0] = 1; + Number.prototype.length = 1; + return Array.prototype.reduceRight.call(2.5, callbackfn, 1) && accessed; + } finally { + delete Number.prototype[0]; + delete Number.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js index db14da31f7..e30f3e755d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js - * @description Array.prototype.reduceRight applied to Number object - */ - - -function testcase() { - - var obj = new Number(-128); - obj.length = 2; - obj[0] = 11; - obj[1] = 12; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof Number; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-6 +description: Array.prototype.reduceRight applied to Number object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new Number(-128); + obj.length = 2; + obj[0] = 11; + obj[1] = 12; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof Number; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js index 11b46169cc..b3d5abb353 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js - * @description Array.prototype.reduceRight applied to string primitive - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj instanceof String; - } - - return Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-7 +description: Array.prototype.reduceRight applied to string primitive +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj instanceof String; + } + + return Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js index 4eadbd788f..6aaad3d938 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js - * @description Array.prototype.reduceRight applied to String object - */ - - -function testcase() { - - var obj = new String("hello\nworld\\!"); - var accessed = false; - - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof String; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, "h") && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-8 +description: Array.prototype.reduceRight applied to String object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = new String("hello\nworld\\!"); + var accessed = false; + + function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof String; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, "h") && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js index dfec5980d5..df13521f97 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js @@ -1,28 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js - * @description Array.prototype.reduceRight applied to Function object - */ - - -function testcase() { - - var obj = function (a, b) { - return a + b; - }; - obj[0] = 11; - obj[1] = 9; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, o) { - accessed = true; - return o instanceof Function; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-1-9 +description: Array.prototype.reduceRight applied to Function object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = function (a, b) { + return a + b; + }; + obj[0] = 11; + obj[1] = 9; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, o) { + accessed = true; + return o instanceof Function; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js index 01fb36a627..9d62061cbf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js - * @description Array.prototype.reduceRight doesn't mutate the Array on which it is called on - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - return 1; - } - var srcArr = [1,2,3,4,5]; - srcArr.reduceRight(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-1 +description: > + Array.prototype.reduceRight doesn't mutate the Array on which it + is called on +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + return 1; + } + var srcArr = [1,2,3,4,5]; + srcArr.reduceRight(callbackfn); + if(srcArr[0] === 1 && + srcArr[1] === 2 && + srcArr[2] === 3 && + srcArr[3] === 4 && + srcArr[4] === 5) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js index 949469703a..33de2f8f9d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js - * @description Array.prototype.reduceRight reduces array in descending order of indices - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; - if(srcArr.reduceRight(callbackfn) === '54321') - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-2 +description: > + Array.prototype.reduceRight reduces array in descending order of + indices +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + return prevVal + curVal; + } + var srcArr = ['1','2','3','4','5']; + if(srcArr.reduceRight(callbackfn) === '54321') + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js index 8194b76849..e27601afb1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js @@ -1,21 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js - * @description Array.prototype.reduceRight - subclassed array with length 1 - */ - - -function testcase() { - foo.prototype = [1]; - function foo() {} - var f = new foo(); - - function cb(){} - if(f.reduceRight(cb) === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-3 +description: Array.prototype.reduceRight - subclassed array with length 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = [1]; + function foo() {} + var f = new foo(); + + function cb(){} + if(f.reduceRight(cb) === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js index 953ac8be8a..ed1a2fdf70 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js - * @description Array.prototype.reduceRight - subclassed array with length more than 1 - */ - - -function testcase() { - foo.prototype = new Array(0, 1, 2, 3); - function foo() {} - var f = new foo(); - - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb) === 6) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-4 +description: > + Array.prototype.reduceRight - subclassed array with length more + than 1 +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(0, 1, 2, 3); + function foo() {} + var f = new foo(); + + function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} + if(f.reduceRight(cb) === 6) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js index af5b7901cb..67eabc0180 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js - * @description Array.prototype.reduceRight reduces array in descending order of indices(initialvalue present) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - return prevVal + curVal; - } - var srcArr = ['1','2','3','4','5']; - if(srcArr.reduceRight(callbackfn,'6') === '654321') - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-5 +description: > + Array.prototype.reduceRight reduces array in descending order of + indices(initialvalue present) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + return prevVal + curVal; + } + var srcArr = ['1','2','3','4','5']; + if(srcArr.reduceRight(callbackfn,'6') === '654321') + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js index 473b78fa94..0cef85334c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js - * @description Array.prototype.reduceRight - subclassed array when initialvalue provided - */ - - -function testcase() { - foo.prototype = new Array(0, 1, 2, 3); - function foo() {} - var f = new foo(); - - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb,"4") === "43210") - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-6 +description: > + Array.prototype.reduceRight - subclassed array when initialvalue + provided +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(0, 1, 2, 3); + function foo() {} + var f = new foo(); + + function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} + if(f.reduceRight(cb,"4") === "43210") + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js index 2cb0e2d9f4..e37d1de2af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js - * @description Array.prototype.reduceRight - subclassed array when length to 1 and initialvalue provided - */ - - -function testcase() { - foo.prototype = [1]; - function foo() {} - var f = new foo(); - - function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb,"4") === "41") - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-7 +description: > + Array.prototype.reduceRight - subclassed array when length to 1 + and initialvalue provided +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = [1]; + function foo() {} + var f = new foo(); + + function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} + if(f.reduceRight(cb,"4") === "41") + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js index bc3b418dd7..187f0e53f2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js @@ -1,31 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js - * @description Array.prototype.reduceRight doesn't visit expandos - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - } - var srcArr = ['1','2','3','4','5']; - srcArr["i"] = 10; - srcArr[true] = 11; - - srcArr.reduceRight(callbackfn); - - if(callCnt == 4) - { - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-10-8 +description: Array.prototype.reduceRight doesn't visit expandos +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(prevVal, curVal, idx, obj) + { + callCnt++; + } + var srcArr = ['1','2','3','4','5']; + srcArr["i"] = 10; + srcArr[true] = 11; + + srcArr.reduceRight(callbackfn); + + if(callCnt == 4) + { + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js index bf82f81a95..cf495d51fa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property - */ - - -function testcase() { - - var accessed = false; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: 2 - }; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-1 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 + }; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js index f02f9e54fc..b1489fb3cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js @@ -1,42 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited accessor property - */ - - -function testcase() { - - var accessed = false; - var Con = function () { }; - - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - var proto = {}; - - Object.defineProperty(proto, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - - return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-10 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an inherited accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var Con = function () { }; + + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + + return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js index ee947d84e0..8fe28e81ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof obj.length === "undefined"; - } - - var obj = { - 0: 11, - 1: 12 - }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-11 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof obj.length === "undefined"; + } + + var obj = { + 0: 11, + 1: 12 + }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js index 13e1f0628d..ff09369c7f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js - * @description Array.prototype.reduceRight - 'length' is own accessor property without a get function that overrides an inherited accessor property - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof obj.length === "undefined"; - } - - try { - Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - var obj = { 0: 12, 1: 13 }; - Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true - }); - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed; - } finally { - delete Object.prototype.length; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-12 +description: > + Array.prototype.reduceRight - 'length' is own accessor property + without a get function that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof obj.length === "undefined"; + } + + try { + Object.defineProperty(Object.prototype, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + var obj = { 0: 12, 1: 13 }; + Object.defineProperty(obj, "length", { + set: function () { }, + configurable: true + }); + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed; + } finally { + delete Object.prototype.length; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js index ffb214568f..21a54712a3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js - * @description Array.prototype.reduceRight applied to the Array-like object that 'length' is inherited accessor property without a get function - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return curVal > 10; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 11; - child[1] = 12; - - return Array.prototype.reduceRight.call(child, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-13 +description: > + Array.prototype.reduceRight applied to the Array-like object that + 'length' is inherited accessor property without a get function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return curVal > 10; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 11; + child[1] = 12; + + return Array.prototype.reduceRight.call(child, callbackfn, 111) === 111 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js index 5d85554336..d631087db3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js - * @description Array.prototype.reduceRight applied to the Array-like object that 'length' property doesn't exist - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return curVal > 10; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-14 +description: > + Array.prototype.reduceRight applied to the Array-like object that + 'length' property doesn't exist +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return curVal > 10; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-15.js index 2075dd2930..ed24b091f1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-15.js @@ -1,35 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-15.js - * @description Array.prototype.reduceRight - 'length' is property of the global object - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === fnGlobalObject().length; - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 12; - fnGlobalObject()[1] = 11; - fnGlobalObject()[2] = 9; - fnGlobalObject().length = 2; - return Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111) && accessed; - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-15 +description: > + Array.prototype.reduceRight - 'length' is property of the global + object +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === fnGlobalObject().length; + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 12; + fnGlobalObject()[1] = 11; + fnGlobalObject()[2] = 9; + fnGlobalObject().length = 2; + return Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111) && accessed; + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js index 7e96d260d3..b88cbdbf58 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js - * @description Array.prototype.reduceRight applied to the Arguments object, which implements its own property get method - */ - - -function testcase() { - - var arg; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - var func = function (a, b) { - arg = arguments; - return Array.prototype.reduceRight.call(arguments, callbackfn, 11); - }; - - return func(12, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-17 +description: > + Array.prototype.reduceRight applied to the Arguments object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arg; + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + var func = function (a, b) { + arg = arguments; + return Array.prototype.reduceRight.call(arguments, callbackfn, 11); + }; + + return func(12, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js index 793799a661..63c7de8480 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js - * @description Array.prototype.reduceRight applied to String object, which implements its own property get method - */ - - -function testcase() { - - var accessed = false; - var str = new String("432"); - - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - return obj.length === 3; - } - - try { - String.prototype[3] = "1"; - return Array.prototype.reduceRight.call(str, callbackfn, 111) && accessed; - } finally { - delete String.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-18 +description: > + Array.prototype.reduceRight applied to String object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var str = new String("432"); + + function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + return obj.length === 3; + } + + try { + String.prototype[3] = "1"; + return Array.prototype.reduceRight.call(str, callbackfn, 111) && accessed; + } finally { + delete String.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js index f46a4b6d7c..4978396f9e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js - * @description Array.prototype.reduceRight applied to Function object, which implements its own property get method - */ - - -function testcase() { - - var accessed = false; - var fun = function (a, b) { - return a + b; - }; - fun[0] = 12; - fun[1] = 11; - fun[2] = 9; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - return Array.prototype.reduceRight.call(fun, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-19 +description: > + Array.prototype.reduceRight applied to Function object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var fun = function (a, b) { + return a + b; + }; + fun[0] = 12; + fun[1] = 11; + fun[2] = 9; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + return Array.prototype.reduceRight.call(fun, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js index a2fef0ae86..175a0166b5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js - * @description Array.prototype.reduceRight - 'length' is own data property on an Array - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - return [12, 11].reduceRight(callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-2 +description: > + Array.prototype.reduceRight - 'length' is own data property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + return [12, 11].reduceRight(callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js index 16d3ed7b8d..ccc1817bfc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited data property - */ - - -function testcase() { - - var accessed = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduceRight.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-3 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own data property that overrides an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduceRight.call(child, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js index c6f2622e3c..fbef5cb91f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js - * @description Array.prototype.reduceRight - 'length' is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var accessed = false; - var arrProtoLen; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - try { - arrProtoLen = Array.prototype.length; - Array.prototype.length = 0; - - return [12, 11].reduceRight(callbackfn, 11) && accessed; - } finally { - Array.prototype.length = arrProtoLen; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-4 +description: > + Array.prototype.reduceRight - 'length' is own data property that + overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arrProtoLen; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + try { + arrProtoLen = Array.prototype.length; + Array.prototype.length = 0; + + return [12, 11].reduceRight(callbackfn, 11) && accessed; + } finally { + Array.prototype.length = arrProtoLen; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js index 794f70e25f..a4b9b67351 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js @@ -1,43 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "length", { - value: 2, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduceRight.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-5 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own data property that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "length", { + value: 2, + configurable: true + }); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduceRight.call(child, callbackfn) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js index c00248c63d..f004e20942 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited data property - */ - - -function testcase() { - - var accessed = false; - var proto = { length: 2 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - function callbackfn1(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - return Array.prototype.reduceRight.call(child, callbackfn1, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-6 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an inherited data property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var proto = { length: 2 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + function callbackfn1(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + return Array.prototype.reduceRight.call(child, callbackfn1, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js index 46b12008b5..a2766bb5ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property - */ - - -function testcase() { - - var accessed = true; - var obj = {}; - obj[0] = 12; - obj[1] = 11; - obj[2] = 9; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - Object.defineProperty(obj, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-7 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own accessor property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = true; + var obj = {}; + obj[0] = 12; + obj[1] = 11; + obj[2] = 9; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + Object.defineProperty(obj, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js index f955ad6d75..f83f7cd3bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js @@ -1,41 +1,45 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - var proto = { length: 3 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-8 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own accessor property that overrides an inherited data + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + var proto = { length: 3 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js index c5958db58c..0dd35fc288 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js - * @description Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property - */ - - -function testcase() { - - var accessed = false; - - function callbackfn1(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === 2; - } - - var proto = {}; - Object.defineProperty(proto, "length", { - get: function () { - return 3; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - Object.defineProperty(child, "length", { - get: function () { - return 2; - }, - configurable: true - }); - child[0] = 12; - child[1] = 11; - child[2] = 9; - - return Array.prototype.reduceRight.call(child, callbackfn1, 111) && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-2-9 +description: > + Array.prototype.reduceRight applied to Array-like object, 'length' + is an own accessor property that overrides an inherited accessor + property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn1(prevVal, curVal, idx, obj) { + accessed = true; + return obj.length === 2; + } + + var proto = {}; + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + child[0] = 12; + child[1] = 11; + child[2] = 9; + + return Array.prototype.reduceRight.call(child, callbackfn1, 111) && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js index 46c8c3276f..98d37a841d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js - * @description Array.prototype.reduceRight - value of 'length' is undefined - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: undefined }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-1 +description: Array.prototype.reduceRight - value of 'length' is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: undefined }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js index e0642b3189..183a24e9b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is NaN) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: NaN }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-10 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: NaN }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js index 0319ef7993..675e608dd0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing a positive number - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-11 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing a positive number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js index 411240b4a9..d088a4a1ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing a negative number - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-12 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing a negative number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js index 5b2f3a1aa1..2f6c816181 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing a decimal number - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-13 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing a decimal number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js index 1d95beeb36..4c4ac7796b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing +/-Infinity - */ - - -function testcase() { - - var accessed1 = false; - var accessed2 = false; - var accessed3 = false; - - function callbackfn1(prevVal, curVal, idx, obj) { - accessed1 = true; - } - - function callbackfn2(prevVal, curVal, idx, obj) { - accessed2 = true; - } - - function callbackfn3(prevVal, curVal, idx, obj) { - accessed3 = true; - } - - var obj1 = { 0: 9, length: "Infinity" }; - var obj2 = { 0: 9, length: "-Infinity" }; - var obj3 = { 0: 9, length: "+Infinity" }; - - return Array.prototype.reduceRight.call(obj1, callbackfn1, 1) === 1 && - Array.prototype.reduceRight.call(obj2, callbackfn2, 2) === 2 && - Array.prototype.reduceRight.call(obj3, callbackfn3, 3) === 3 && - !accessed1 && !accessed2 && !accessed3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-14 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing +/-Infinity +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed1 = false; + var accessed2 = false; + var accessed3 = false; + + function callbackfn1(prevVal, curVal, idx, obj) { + accessed1 = true; + } + + function callbackfn2(prevVal, curVal, idx, obj) { + accessed2 = true; + } + + function callbackfn3(prevVal, curVal, idx, obj) { + accessed3 = true; + } + + var obj1 = { 0: 9, length: "Infinity" }; + var obj2 = { 0: 9, length: "-Infinity" }; + var obj3 = { 0: 9, length: "+Infinity" }; + + return Array.prototype.reduceRight.call(obj1, callbackfn1, 1) === 1 && + Array.prototype.reduceRight.call(obj2, callbackfn2, 2) === 2 && + Array.prototype.reduceRight.call(obj3, callbackfn3, 3) === 3 && + !accessed1 && !accessed2 && !accessed3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js index ce93034aad..2266b2da40 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing an exponential number - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-15 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing an exponential number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js index 5dc1e8bbd2..097520b5b8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing a hex number - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-16 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing a hex number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js index 54d7eed7ec..089918e2bb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js - * @description Array.prototype.reduceRight - value of 'length' is a string containing a number with leading zeros - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-17 +description: > + Array.prototype.reduceRight - value of 'length' is a string + containing a number with leading zeros +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js index ef67c7465e..9992ccaace 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js - * @description Array.prototype.reduceRight - value of 'length' is a string that can't convert to a number - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, 1: 8, length: "two" }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-18 +description: > + Array.prototype.reduceRight - value of 'length' is a string that + can't convert to a number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, 1: 8, length: "two" }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js index f213210afa..9bef0c27ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js @@ -1,49 +1,52 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js - * @description Array.prototype.reduceRight - value of 'length' is an object which has an own toString method - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var toStringAccessed = false; - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; - - // objects inherit the default valueOf() method from Object - // that simply returns itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-19 +description: > + Array.prototype.reduceRight - value of 'length' is an object which + has an own toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var toStringAccessed = false; + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + toString: function () { + toStringAccessed = true; + return '2'; + } + } + }; + + // objects inherit the default valueOf() method from Object + // that simply returns itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2 && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js index 6eaa57e22f..cad8b01237 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js - * @description Array.prototype.reduceRight applied to an Array-like object, 'length' is 0 (length overridden to false(type conversion)) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: false }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-2 +description: > + Array.prototype.reduceRight applied to an Array-like object, + 'length' is 0 (length overridden to false(type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: false }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js index 8c024730ab..b0db2caef7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js - * @description Array.prototype.reduceRight - value of 'length' is an Object which has an own valueOf method - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var valueOfAccessed = false; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - } - }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-20 +description: > + Array.prototype.reduceRight - value of 'length' is an Object which + has an own valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var valueOfAccessed = false; + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + } + }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2 && valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js index b29fe62b43..97bfc1376a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js @@ -1,49 +1,53 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js - * @description Array.prototype.reduceRight - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var toStringAccessed = false; - var valueOfAccessed = false; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } - } - }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-21 +description: > + Array.prototype.reduceRight - 'length' is an object that has an + own valueOf method that returns an object and toString method that + returns a string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var toStringAccessed = false; + var valueOfAccessed = false; + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return '2'; + } + } + }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2 && valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js index 51351be4e9..fc25f2150b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js - * @description Array.prototype.reduceRight throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values - */ - - -function testcase() { - - var accessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { - 0: 11, - 1: 12, - - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; - - try { - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return false; - } catch (ex) { - return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-22 +description: > + Array.prototype.reduceRight throws TypeError exception when + 'length' is an object with toString and valueOf methods that don�t + return primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var toStringAccessed = false; + var valueOfAccessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { + 0: 11, + 1: 12, + + length: { + valueOf: function () { + valueOfAccessed = true; + return {}; + }, + toString: function () { + toStringAccessed = true; + return {}; + } + } + }; + + try { + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return false; + } catch (ex) { + return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js index a9be94a169..382c8a0ab3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js @@ -1,55 +1,59 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js - * @description Array.prototype.reduceRight uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - var valueOfAccessed = false; - var toStringAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - var Con = function () { }; - Con.prototype = proto; - var child = new Con(); - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: child - }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-23 +description: > + Array.prototype.reduceRight uses inherited valueOf method when + 'length' is an object with an own toString and inherited valueOf + methods +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + var valueOfAccessed = false; + var toStringAccessed = false; + + var proto = { + valueOf: function () { + valueOfAccessed = true; + return 2; + } + }; + var Con = function () { }; + Con.prototype = proto; + var child = new Con(); + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + child.toString = function () { + toStringAccessed = true; + return '1'; + }; + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: child + }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2 && valueOfAccessed && !toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js index 98f547082a..2c729af729 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js - * @description Array.prototype.reduceRight - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-24 +description: > + Array.prototype.reduceRight - value of 'length' is a positive + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js index 3970cdda62..b366c10922 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js - * @description Array.prototype.reduceRight - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: -4294967294.5 - }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-25 +description: > + Array.prototype.reduceRight - value of 'length' is a negative + non-integer, ensure truncation occurs in the proper direction +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294.5 + }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js index 6dbd9127f3..84095c94e8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js - * @description Array.prototype.reduceRight - value of 'length' is boundary value (2^32) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { - 0: 12, - length: 4294967296 - }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-28 +description: > + Array.prototype.reduceRight - value of 'length' is boundary value + (2^32) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { + 0: 12, + length: 4294967296 + }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js index 8f351eb68b..158d574fc0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js - * @description Array.prototype.reduceRight - value of 'length' is boundary value (2^32 + 1) - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 0) { - testResult1 = false; - } - - if (idx === 0) { - testResult2 = true; - } - return false; - } - - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-29 +description: > + Array.prototype.reduceRight - value of 'length' is boundary value + (2^32 + 1) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 0) { + testResult1 = false; + } + + if (idx === 0) { + testResult2 = true; + } + return false; + } + + var obj = { + 0: 11, + 1: 9, + length: 4294967297 + }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js index 4ca0d26f77..dcd5867679 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is 0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: 0 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-3 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: 0 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js index 6837948676..349a9389c8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is +0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: +0 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-4 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: +0 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js index aed29d3a0a..bd4ba6f209 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is -0) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: -0 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-5 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: -0 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js index ef1f4ddea4..a2786deb2e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is positive) - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 1: 11, 2: 9, length: 2 }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-6 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is positive) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 1: 11, 2: 9, length: 2 }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js index 82ee2aad77..8163f38974 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is negative) - */ - - -function testcase() { - - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } - - if (idx === 1) { - testResult2 = true; - } - return false; - } - - var obj = { 1: 11, 2: 9, length: -4294967294 }; - - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-7 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is negative) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult1 = true; + var testResult2 = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } + + if (idx === 1) { + testResult2 = true; + } + return false; + } + + var obj = { 1: 11, 2: 9, length: -4294967294 }; + + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return testResult1 && testResult2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js index 387c9ece77..30b7ff5e9c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: Infinity }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-8 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: Infinity }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js index 7d4e0e23ae..4884a7a3e6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js - * @description Array.prototype.reduceRight - value of 'length' is a number (value is -Infinity) - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - } - - var obj = { 0: 9, length: -Infinity }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-3-9 +description: > + Array.prototype.reduceRight - value of 'length' is a number (value + is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + } + + var obj = { 0: 9, length: -Infinity }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js index 409c912ee2..d8b9296e3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js - * @description Array.prototype.reduceRight throws TypeError if callbackfn is undefined - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight(); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-1 +description: > + Array.prototype.reduceRight throws TypeError if callbackfn is + undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight(); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js index 3bcf048b33..d7462f5d25 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js - * @description Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-10 +description: > + Array.prototype.reduceRight - the exception is not thrown if + exception was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js index cdaf9efb9d..e0077732d1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js - * @description Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, undefined); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-11 +description: > + Array.prototype.reduceRight - the exception is not thrown if + exception was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, undefined); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js index 1b2c744bbe..9c401a65bc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js - * @description Array.prototype.reduceRight - 'callbackfn' is a function - */ - - -function testcase() { - - var initialValue = 0; - function callbackfn(accum, val, idx, obj) { - accum += val; - return accum; - } - - return 20 === [11, 9].reduceRight(callbackfn, initialValue); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-12 +description: Array.prototype.reduceRight - 'callbackfn' is a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var initialValue = 0; + function callbackfn(accum, val, idx, obj) { + accum += val; + return accum; + } + + return 20 === [11, 9].reduceRight(callbackfn, initialValue); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-15.js index 52b2844f68..5bd2c2e0f4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-15.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-15.js - * @description Array.prototype.reduceRight - calling with no callbackfn is the same as passing undefined for callbackfn - */ - - -function testcase() { - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, undefined); - return false; - } catch (ex) { - return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-15 +description: > + Array.prototype.reduceRight - calling with no callbackfn is the + same as passing undefined for callbackfn +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { 10: 10 }; + var lengthAccessed = false; + var loopAccessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + lengthAccessed = true; + return 20; + }, + configurable: true + }); + Object.defineProperty(obj, "0", { + get: function () { + loopAccessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, undefined); + return false; + } catch (ex) { + return (ex instanceof TypeError) && lengthAccessed && !loopAccessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js index b911f2c94c..ef09774dba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js - * @description Array.prototype.reduceRight throws ReferenceError if callbackfn is unreferenced - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight(foo); - } - catch(e) { - if(e instanceof ReferenceError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-2 +description: > + Array.prototype.reduceRight throws ReferenceError if callbackfn is + unreferenced +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight(foo); + } + catch(e) { + if(e instanceof ReferenceError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js index 4f8a2f834f..1c77f68f12 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js - * @description Array.prototype.reduceRight throws TypeError if callbackfn is null - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight(null); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-3 +description: Array.prototype.reduceRight throws TypeError if callbackfn is null +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight(null); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js index 6df3bb6ce5..371289036d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js - * @description Array.prototype.reduceRight throws TypeError if callbackfn is boolean - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight(true); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-4 +description: > + Array.prototype.reduceRight throws TypeError if callbackfn is + boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight(true); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js index 6c16990a91..b4158d4010 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js - * @description Array.prototype.reduceRight throws TypeError if callbackfn is number - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight(5); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-5 +description: > + Array.prototype.reduceRight throws TypeError if callbackfn is + number +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight(5); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js index a80120bb51..d411b46ae4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js - * @description Array.prototype.reduceRight throws TypeError if callbackfn is string - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight("abc"); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-6 +description: > + Array.prototype.reduceRight throws TypeError if callbackfn is + string +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight("abc"); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js index 6baa0fab9f..f55095be41 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js - * @description Array.prototype.reduceRight throws TypeError if callbackfn is Object without [[Call]] internal method - */ - - -function testcase() { - - var arr = new Array(10); - try { - arr.reduceRight(new Object()); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-7 +description: > + Array.prototype.reduceRight throws TypeError if callbackfn is + Object without [[Call]] internal method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = new Array(10); + try { + arr.reduceRight(new Object()); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js index 05e7beef83..2f5b660503 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js - * @description Array.prototype.reduceRight - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-8 +description: > + Array.prototype.reduceRight - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js index 445f4c5148..d89fd60ff6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js - * @description Array.prototype.reduceRight - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, null); - return false; - } catch (ex) { - return ex instanceof TypeError && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-4-9 +description: > + Array.prototype.reduceRight - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, null); + return false; + } catch (ex) { + return ex instanceof TypeError && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js index c83cf38c35..b56b5235c3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (empty array), no initVal - */ - - -function testcase() { - function cb(){} - - try { - [].reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-1 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (empty array), no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb(){} + + try { + [].reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js index 78db4456b0..29ad9aac56 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js - * @description Array.prototype.reduceRight - side-effects produced by step 2 when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 0; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-10 +description: > + Array.prototype.reduceRight - side-effects produced by step 2 when + an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 0; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js index c063bad6ed..e6f24abba3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js - * @description Array.prototype.reduceRight - side-effects produced by step 3 when an exception occurs - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "0"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-11 +description: > + Array.prototype.reduceRight - side-effects produced by step 3 when + an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "0"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js index bd353e8bc5..0c44dd9e6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js - * @description Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-12 +description: > + Array.prototype.reduceRight - the exception is not thrown if + exception was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js index 722bc2b6ab..7b57361360 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js - * @description Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = { 0: 11, 1: 12 }; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-13 +description: > + Array.prototype.reduceRight - the exception is not thrown if + exception was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 0: 11, 1: 12 }; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js index bccba97fbe..babb452d49 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to null (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-2 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden to null (type conversion)), + no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js index d8ed96daf2..8c228bb0e5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to false (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-3 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden to false (type conversion)), + no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js index 3c069572c2..66dbf14c7d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-4 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden to 0 (type conversion)), no + initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js index 0e678206c5..f3cfef1423 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-5 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden to '0' (type conversion)), no + initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js index 56bc398afb..ec933d06cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js @@ -1,30 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj with valueOf), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-6 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden with obj with valueOf), no + initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js index 3bb6b2447a..b7b8119bc8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-7 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden with obj w/o valueOf + (toString)), no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js index b705b60736..17568fed9b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js - * @description Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with []), no initVal - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - try { - f.reduceRight(cb); - } - catch (e) { - if (e instanceof TypeError) { - return true; - } - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-8 +description: > + Array.prototype.reduceRight throws TypeError if 'length' is 0 + (subclassed Array, length overridden with []), no initVal +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + try { + f.reduceRight(cb); + } + catch (e) { + if (e instanceof TypeError) { + return true; + } + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js index 6207502d1e..23b2ff389a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js - * @description Array.prototype.reduceRight - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present - */ - - -function testcase() { - - var initialValue = 10; - return initialValue === [].reduceRight(function () { }, initialValue); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-5-9 +description: > + Array.prototype.reduceRight - 'initialValue' is returned if 'len' + is 0 and 'initialValue' is present +includes: [runTestCase.js] +---*/ + +function testcase() { + + var initialValue = 10; + return initialValue === [].reduceRight(function () { }, initialValue); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js index 7c222d5966..d62f381bf9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (empty array) - */ - - -function testcase() { - function cb(){} - - try { - if([].reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-1 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (empty array) +includes: [runTestCase.js] +---*/ + +function testcase() { + function cb(){} + + try { + if([].reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js index 794e03a2d2..1918f3faf0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js - * @description Array.prototype.reduceRight - 'initialValue' is present - */ - - -function testcase() { - - var str = "initialValue is present"; - return str === [].reduceRight(function () { }, str); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-10 +description: Array.prototype.reduceRight - 'initialValue' is present +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = "initialValue is present"; + return str === [].reduceRight(function () { }, str); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js index f3df3a4ecb..b5d79d2bdf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js - * @description Array.prototype.reduceRight - 'initialValue' is not present - */ - - -function testcase() { - - var str = "initialValue is not present"; - return str === [str].reduceRight(function () { }); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-11 +description: Array.prototype.reduceRight - 'initialValue' is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + var str = "initialValue is not present"; + return str === [str].reduceRight(function () { }); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js index 054a6e5f8e..87e2d6620a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to null (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-2 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + to null (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = null; + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js index 620f445fbc..cfbcdc35de 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to false (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-3 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + to false (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = false; + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js index e2d28acdf8..2159f59c36 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to 0 (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-4 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + to 0 (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = 0; + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js index 3632384547..16bcbb5eca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js @@ -1,25 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to '0' (type conversion)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-5 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + to '0' (type conversion)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + f.length = '0'; + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js index 4182e8ba78..a3a93336cb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj with valueOf) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { valueOf: function () { return 0;}}; - f.length = o; - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-6 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + with obj with valueOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { valueOf: function () { return 0;}}; + f.length = o; + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js index 697e6e2a7a..5d9c1d309d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString)) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - var o = { toString: function () { return '0';}}; - f.length = o; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-7 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + with obj w/o valueOf (toString)) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + var o = { toString: function () { return '0';}}; + f.length = o; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js index e0da31787d..965caad669 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with []) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-8 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + with []) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = []; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js index 311b7fec43..dff71ee6ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js - * @description Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0]) - */ - - -function testcase() { - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = [0]; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-7-9 +description: > + Array.prototype.reduceRight returns initialValue if 'length' is 0 + and initialValue is present (subclassed Array, length overridden + with [0]) +includes: [runTestCase.js] +---*/ + +function testcase() { + foo.prototype = new Array(1, 2, 3); + function foo() {} + var f = new foo(); + + f.length = [0]; + + // objects inherit the default valueOf method of the Object object; + // that simply returns the itself. Since the default valueOf() method + // does not return a primitive value, ES next tries to convert the object + // to a number by calling its toString() method and converting the + // resulting string to a number. + // + // The toString( ) method on Array converts the array elements to strings, + // then returns the result of concatenating these strings, with commas in + // between. An array with no elements converts to the empty string, which + // converts to the number 0. If an array has a single element that is a + // number n, the array converts to a string representation of n, which is + // then converted back to n itself. If an array contains more than one element, + // or if its one element is not a number, the array converts to NaN. + + function cb(){} + try { + if(f.reduceRight(cb,1) === 1) + return true; + } + catch (e) { } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-1.js index b8276e345f..380e4fd422 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-1.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-1.js - * @description Array.prototype.reduceRight - no observable effects occur if 'len' is 0 - */ - - -function testcase() { - - var accessed = false; - - var obj = { length: 0 }; - - Object.defineProperty(obj, "0", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-1 +description: > + Array.prototype.reduceRight - no observable effects occur if 'len' + is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + var obj = { length: 0 }; + + Object.defineProperty(obj, "0", { + get: function () { + accessed = true; + return 10; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-2.js index b5f3501686..5081632c79 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-2.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-2.js - * @description Array.prototype.reduceRight - modifications to length don't change number of iterations in step 9 - */ - - -function testcase() { - var called = 0; - function callbackfn(prevVal, curVal, idx, obj) { - called++; - return prevVal + curVal; - } - - var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "4", { - get: function () { - arr.length = 2; - return 10; - }, - configurable: true - }); - - var preVal = arr.reduceRight(callbackfn); - - return preVal === 11 && called === 2; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-2 +description: > + Array.prototype.reduceRight - modifications to length don't change + number of iterations in step 9 +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = 0; + function callbackfn(prevVal, curVal, idx, obj) { + called++; + return prevVal + curVal; + } + + var arr = [0, 1, 2, 3]; + Object.defineProperty(arr, "4", { + get: function () { + arr.length = 2; + return 10; + }, + configurable: true + }); + + var preVal = arr.reduceRight(callbackfn); + + return preVal === 11 && called === 2; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-3.js index be8f950776..7a621161f9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-3.js @@ -1,48 +1,51 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-3.js - * @description Array.prototype.reduceRight - while loop is breaken once 'kPresent' is true - */ - - -function testcase() { - - var called = 0; - var testResult = false; - var firstCalled = 0; - var secondCalled = 0; - - function callbackfn(prevVal, val, idx, obj) { - if (called === 0) { - testResult = (idx === 1); - } - called++; - } - - var arr = [, , , ]; - - Object.defineProperty(arr, "1", { - get: function () { - firstCalled++; - return 9; - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - secondCalled++; - return 11; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - - return testResult && firstCalled === 1 && secondCalled === 1; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-3 +description: > + Array.prototype.reduceRight - while loop is breaken once + 'kPresent' is true +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + var testResult = false; + var firstCalled = 0; + var secondCalled = 0; + + function callbackfn(prevVal, val, idx, obj) { + if (called === 0) { + testResult = (idx === 1); + } + called++; + } + + var arr = [, , , ]; + + Object.defineProperty(arr, "1", { + get: function () { + firstCalled++; + return 9; + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + secondCalled++; + return 11; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + + return testResult && firstCalled === 1 && secondCalled === 1; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js index c688a15491..b5bc982040 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js @@ -1,28 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js - * @description Array.prototype.reduceRight - added properties in step 2 are visible here - */ - - -function testcase() { - - var obj = {}; - - function callbackfn(prevVal, curVal, idx, obj) { } - - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "accumulator"; - return 3; - }, - configurable: true - }); - - return Array.prototype.reduceRight.call(obj, callbackfn) === "accumulator"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-ii-1 +description: > + Array.prototype.reduceRight - added properties in step 2 are + visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + function callbackfn(prevVal, curVal, idx, obj) { } + + Object.defineProperty(obj, "length", { + get: function () { + obj[2] = "accumulator"; + return 3; + }, + configurable: true + }); + + return Array.prototype.reduceRight.call(obj, callbackfn) === "accumulator"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js index 1d62a1491d..7b8446c2c7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js - * @description Array.prototype.reduceRight - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var obj = { 2: "accumulator", 3: "another" }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); - - return "accumulator" !== Array.prototype.reduceRight.call(obj, function () { }); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-ii-2 +description: > + Array.prototype.reduceRight - deleted properties in step 2 are + visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { 2: "accumulator", 3: "another" }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[2]; + return 5; + }, + configurable: true + }); + + return "accumulator" !== Array.prototype.reduceRight.call(obj, function () { }); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js index 9f091642e2..fbaf09b5e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (prevVal === 1); - } - } - - var obj = { 0: 0, 1: 1, length: 2 }; - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-1 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (prevVal === 1); + } + } + + var obj = { 0: 0, 1: 1, length: 2 }; + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-10.js index 69dce91a38..a70cf46fa1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-10.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-10.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (curVal === 2); - } - } - - var arr = [0, 1, , 3]; - - Object.defineProperty(arr, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-10 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (curVal === 2); + } + } + + var arr = [0, 1, , 3]; + + Object.defineProperty(arr, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-11.js index 296d86b578..eefa6b4e6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-11.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-11.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } - - var proto = { 0: 0, 1: 1, 2: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "2", { - get: function () { - return "20"; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-11 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } + } + + var proto = { 0: 0, 1: 1, 2: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "2", { + get: function () { + return "20"; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-12.js index e57aa01cb1..85d1c01216 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-12.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-12.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } - - try { - Array.prototype[2] = 2; - var arr = [0, 1]; - - Object.defineProperty(arr, "2", { - get: function () { - return "20"; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-12 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited data property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } + } + + try { + Array.prototype[2] = 2; + var arr = [0, 1]; + + Object.defineProperty(arr, "2", { + get: function () { + return "20"; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-13.js index 467e4824f2..f0a60ff826 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-13.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-13.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } - - var proto = { 0: 0, 1: 1 }; - - Object.defineProperty(proto, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "2", { - get: function () { - return "20"; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-13 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited accessor property on + an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } + } + + var proto = { 0: 0, 1: 1 }; + + Object.defineProperty(proto, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "2", { + get: function () { + return "20"; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-14.js index 2905e74f3a..7b77ac0110 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-14.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-14.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - var arr = [0, 1, , ]; - - Object.defineProperty(arr, "2", { - get: function () { - return "20"; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-14 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited accessor property on + an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } + } + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + var arr = [0, 1, , ]; + + Object.defineProperty(arr, "2", { + get: function () { + return "20"; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-15.js index 4bceb899e4..94a1f323ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-15.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-15.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - var proto = { 0: 0, 1: 1 }; - - Object.defineProperty(proto, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-15 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + var proto = { 0: 0, 1: 1 }; + + Object.defineProperty(proto, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-16.js index c549ec9fee..6f69e55048 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-16.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-16.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - var arr = [0, 1, , ]; - - arr.reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-16 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + var arr = [0, 1, , ]; + + arr.reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-17.js index cbe5e91c51..de1f993b70 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-17.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-17.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } - - var obj = { 0: 0, 1: 1, length: 3 }; - - Object.defineProperty(obj, "2", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-17 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } + } + + var obj = { 0: 0, 1: 1, length: 3 }; + + Object.defineProperty(obj, "2", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-18.js index d93f63e02c..368b98f0e0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-18.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-18.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } - - var arr = [0, 1]; - - Object.defineProperty(arr, "2", { - set: function () { }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-18 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } + } + + var arr = [0, 1]; + + Object.defineProperty(arr, "2", { + set: function () { }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-19.js index 08508f88ac..842d8ecb8a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-19.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-19.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } - - try { - Object.prototype[2] = 2; - - var obj = { 0: 0, 1: 1, length: 3 }; - Object.defineProperty(obj, "2", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[2]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-19 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function that overrides an + inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } + } + + try { + Object.prototype[2] = 2; + + var obj = { 0: 0, 1: 1, length: 3 }; + Object.defineProperty(obj, "2", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[2]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js index 364ec69a65..5dcd74bd56 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - var arr = [0, 1, 2]; - - arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-2 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + var arr = [0, 1, 2]; + + arr.reduceRight(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-20.js index 1b5eaf3eae..860c2dd17a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-20.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-20.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } - - try { - Array.prototype[2] = 2; - var arr = [0, 1]; - Object.defineProperty(arr, "2", { - set: function () { }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-20 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function that overrides an + inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } + } + + try { + Array.prototype[2] = 2; + var arr = [0, 1]; + Object.defineProperty(arr, "2", { + set: function () { }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-21.js index 7599574d4e..60f8e096df 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-21.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-21.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } - - var proto = { 0: 0, 1: 1 }; - - Object.defineProperty(proto, "2", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-21 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } + } + + var proto = { 0: 0, 1: 1 }; + + Object.defineProperty(proto, "2", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-22.js index 6df64d3c01..a4053b5f05 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-22.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-22.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof prevVal === "undefined"); - } - } - - try { - Object.defineProperty(Array.prototype, "2", { - set: function () { }, - configurable: true - }); - - var arr = [0, 1, , ]; - - arr.reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-22 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof prevVal === "undefined"); + } + } + + try { + Object.defineProperty(Array.prototype, "2", { + set: function () { }, + configurable: true + }); + + var arr = [0, 1, , ]; + + arr.reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-23.js index 0a2b0f0b85..07b886066a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-23.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-23.js - * @description Array.prototype.reduceRight - This object is the global object which contains index property - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 0; - fnGlobalObject()[1] = 1; - fnGlobalObject()[2] = 2; - fnGlobalObject().length = 3; - - Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn); - return testResult; - - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-23 +description: > + Array.prototype.reduceRight - This object is the global object + which contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 0; + fnGlobalObject()[1] = 1; + fnGlobalObject()[2] = 2; + fnGlobalObject().length = 3; + + Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn); + return testResult; + + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js index 48ce5f7e43..8f7dae75dc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js - * @description Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (prevVal === 1); - } - } - - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; - - func(0, 1); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-25 +description: > + Array.prototype.reduceRight - This object is the Arguments object + which implements its own property get method (number of arguments + is less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (prevVal === 1); + } + } + + var func = function (a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); + }; + + func(0, 1); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js index 7e1d2fc4a3..5677a6f74d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js - * @description Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; - - func(0, 1, 2); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-26 +description: > + Array.prototype.reduceRight - This object is the Arguments object + which implements its own property get method (number of arguments + equals number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + var func = function (a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); + }; + + func(0, 1, 2); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js index ff4a840884..6170b0cba8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js - * @description Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (prevVal === 3); - } - } - - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn); - }; - - func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-27 +description: > + Array.prototype.reduceRight - This object is the Arguments object + which implements its own property get method (number of arguments + is greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (prevVal === 3); + } + } + + var func = function (a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn); + }; + + func(0, 1, 2, 3); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js index a62248b017..6359a00c7b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js - * @description Array.prototype.reduceRight applied to String object, which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "2"); - } - } - - var str = new String("012"); - - Array.prototype.reduceRight.call(str, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-28 +description: > + Array.prototype.reduceRight applied to String object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "2"); + } + } + + var str = new String("012"); + + Array.prototype.reduceRight.call(str, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js index 129a46c916..2ed9b26456 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js - * @description Array.prototype.reduceRight applied to Function object which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - var obj = function (a, b, c) { - return a + b + c; - }; - - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-29 +description: > + Array.prototype.reduceRight applied to Function object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + var obj = function (a, b, c) { + return a + b + c; + }; + + obj[0] = 0; + obj[1] = 1; + obj[2] = 2; + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js index 1723e640ea..240c65ddfa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } - - var proto = { 0: 0, 1: 1, 2: 2, length: 2 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[1] = "10"; - child[2] = "20"; - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-3 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } + } + + var proto = { 0: 0, 1: 1, 2: 2, length: 2 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[1] = "10"; + child[2] = "20"; + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-30.js index 7cd992f912..419bf50b54 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-30.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-30.js - * @description Array.prototype.reduceRight - element changed by getter on current iteration is observed in subsequent iterations on an Array - */ - - -function testcase() { - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1 && prevVal === 2); - } - } - - var arr = [0]; - var preIterVisible = false; - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "20"; - } - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - preIterVisible = true; - return 2; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-30 +description: > + Array.prototype.reduceRight - element changed by getter on current + iteration is observed in subsequent iterations on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1 && prevVal === 2); + } + } + + var arr = [0]; + var preIterVisible = false; + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return "20"; + } + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + preIterVisible = true; + return 2; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-31.js index f339478691..7c5ea9b361 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-31.js @@ -1,45 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-31.js - * @description Array.prototype.reduceRight - element changed by getter on current iteration is observed subsequetly on an Array-like object - */ - - -function testcase() { - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2 && curVal === 1); - } - } - - var obj = { 0: 0, length: 3 }; - var preIterVisible = false; - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "20"; - } - }, - configurable: true - }); - - Object.defineProperty(obj, "2", { - get: function () { - preIterVisible = true; - return 2; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-31 +description: > + Array.prototype.reduceRight - element changed by getter on current + iteration is observed subsequetly on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2 && curVal === 1); + } + } + + var obj = { 0: 0, length: 3 }; + var preIterVisible = false; + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return "20"; + } + }, + configurable: true + }); + + Object.defineProperty(obj, "2", { + get: function () { + preIterVisible = true; + return 2; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-32.js index 5313fa04a2..7e26971ccf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-32.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-32.js - * @description Array.prototype.reduceRight - Exception in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } - - var obj = { 0: 0, 1: 1, length: 3 }; - Object.defineProperty(obj, "2", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-32 +description: > + Array.prototype.reduceRight - Exception in getter terminate + iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } + } + + var obj = { 0: 0, 1: 1, length: 3 }; + Object.defineProperty(obj, "2", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-33.js index 8ca3350adf..82de38fb79 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-33.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-33.js - * @description Array.prototype.reduceRight - Exception in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } - - var arr = [0, 1]; - - Object.defineProperty(arr, "2", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.reduceRight(callbackfn); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-33 +description: > + Array.prototype.reduceRight - Exception in getter terminate + iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } + } + + var arr = [0, 1]; + + Object.defineProperty(arr, "2", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.reduceRight(callbackfn); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js index 768008388e..01c7ab0eb3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - try { - Array.prototype[2] = "11"; - [0, 1, 2].reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-4 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + try { + Array.prototype[2] = "11"; + [0, 1, 2].reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-5.js index b3e6a1e5f5..779361cd7e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-5.js @@ -1,45 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-5.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === "20"); - } - } - - var proto = {}; - - Object.defineProperty(proto, "2", { - get: function () { - return 11; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - child[0] = "0"; - child[1] = "1"; - Object.defineProperty(proto, "2", { - value: "20", - configurable: true - }); - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-5 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === "20"); + } + } + + var proto = {}; + + Object.defineProperty(proto, "2", { + get: function () { + return 11; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + child[0] = "0"; + child[1] = "1"; + Object.defineProperty(proto, "2", { + value: "20", + configurable: true + }); + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-6.js index 9817a0dc4f..6f689ab46a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-6.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-6.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "2"; - }, - configurable: true - }); - [0, 1, 2].reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[2]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-6 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "2"; + }, + configurable: true + }); + [0, 1, 2].reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[2]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js index 6d3829f01e..6db27679b3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-7 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + var proto = { 0: 0, 1: 1, 2: 2, length: 3 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Array.prototype.reduceRight.call(child, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js index 60afbbb5ef..199b749443 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - try { - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , ,].reduceRight(callbackfn); - return testResult; - - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-8 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + try { + Array.prototype[0] = 0; + Array.prototype[1] = 1; + Array.prototype[2] = 2; + [, , ,].reduceRight(callbackfn); + return testResult; + + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-9.js index 266a41b0cc..033f16ca6b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-9.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - var obj = { 0: 0, 1: 1, length: 3 }; - Object.defineProperty(obj, "2", { - get: function () { - return 2; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-b-iii-1-9 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 2); + } + } + + var obj = { 0: 0, 1: 1, length: 3 }; + Object.defineProperty(obj, "2", { + get: function () { + return 2; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js index 487249257e..63ee6089e7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js - * @description Array.prototype.reduceRight throws TypeError when Array is empty and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = new Array(10); - try { - arr.reduceRight(callbackfn); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-1 +description: > + Array.prototype.reduceRight throws TypeError when Array is empty + and initialValue is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = new Array(10); + try { + arr.reduceRight(callbackfn); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js index 88ff3a2344..0b05dd578f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js - * @description Array.prototype.reduceRight throws TypeError when elements assigned values are deleted by reducign array length and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = new Array(10); - arr[9] = 1; - arr.length = 5; - try { - arr.reduceRight(callbackfn); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-2 +description: > + Array.prototype.reduceRight throws TypeError when elements + assigned values are deleted by reducign array length and + initialValue is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = new Array(10); + arr[9] = 1; + arr.length = 5; + try { + arr.reduceRight(callbackfn); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js index af2b44d7d2..8f146afe0d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js - * @description Array.prototype.reduceRight throws TypeError when elements assigned values are deleted and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = [1,2,3,4,5]; - delete arr[0]; - delete arr[1]; - delete arr[2]; - delete arr[3]; - delete arr[4]; - try { - arr.reduceRight(callbackfn); - } - catch(e) { - if(e instanceof TypeError) - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-3 +description: > + Array.prototype.reduceRight throws TypeError when elements + assigned values are deleted and initialValue is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = [1,2,3,4,5]; + delete arr[0]; + delete arr[1]; + delete arr[2]; + delete arr[3]; + delete arr[4]; + try { + arr.reduceRight(callbackfn); + } + catch(e) { + if(e instanceof TypeError) + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js index 8b6e2173b6..ed072cc6d7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js - * @description Array.prototype.reduceRight doesn't throw error when array has no own properties but prototype contains a single property - */ - - -function testcase() { - - var arr = [, , , ]; - - try { - Array.prototype[1] = "prototype"; - arr.reduceRight(function () { }); - return true; - } catch (ex) { - return false; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-4 +description: > + Array.prototype.reduceRight doesn't throw error when array has no + own properties but prototype contains a single property +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [, , , ]; + + try { + Array.prototype[1] = "prototype"; + arr.reduceRight(function () { }); + return true; + } catch (ex) { + return false; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js index 72e3b2ae0b..781585d649 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js - * @description Array.prototype.reduceRight - side effects produced by step 2 are visible when an exception occurs - */ - - -function testcase() { - - var obj = { }; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-5 +description: > + Array.prototype.reduceRight - side effects produced by step 2 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = { }; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + accessed = true; + return 2; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js index 7be447abfd..ea2f9889c1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js - * @description Array.prototype.reduceRight - side effects produced by step 3 are visible when an exception occurs - */ - - -function testcase() { - - var obj = {}; - - var accessed = false; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return (ex instanceof TypeError) && accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-6 +description: > + Array.prototype.reduceRight - side effects produced by step 3 are + visible when an exception occurs +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + var accessed = false; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + accessed = true; + return "2"; + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return (ex instanceof TypeError) && accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js index 16900c0b3a..af2220955a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js - * @description Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2 - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - throw new SyntaxError(); - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-7 +description: > + Array.prototype.reduceRight - the exception is not thrown if + exception was thrown by step 2 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + throw new SyntaxError(); + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js index 1e5c81167e..c54f578238 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js - * @description Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3 - */ - - -function testcase() { - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new SyntaxError(); - } - }; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, function () { }); - return false; - } catch (ex) { - return !(ex instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-8-c-8 +description: > + Array.prototype.reduceRight - the exception is not thrown if + exception was thrown by step 3 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + return { + toString: function () { + throw new SyntaxError(); + } + }; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, function () { }); + return false; + } catch (ex) { + return !(ex instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js index 91730cae54..f2c34d145e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js @@ -1,22 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js - * @description Array.prototype.reduceRight doesn't consider new elements which index is larger than array original length added to array after it is called, consider new elements which index is smaller than array length - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - arr[5] = 6; - arr[2] = 3; - return prevVal + curVal; - } - - var arr = ['1', 2, , 4, '5']; - return arr.reduceRight(callbackfn) === "54321"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-1 +description: > + Array.prototype.reduceRight doesn't consider new elements which + index is larger than array original length added to array after it + is called, consider new elements which index is smaller than array + length +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + arr[5] = 6; + arr[2] = 3; + return prevVal + curVal; + } + + var arr = ['1', 2, , 4, '5']; + return arr.reduceRight(callbackfn) === "54321"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js index d85e721e4f..90c7bf4a32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js - * @description Array.prototype.reduceRight considers new value of elements in array after it is called - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - arr[3] = -2; - arr[0] = -1; - return prevVal + curVal; - } - - var arr = [1,2,3,4,5]; - if(arr.reduceRight(callbackfn) === 13) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-2 +description: > + Array.prototype.reduceRight considers new value of elements in + array after it is called +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + arr[3] = -2; + arr[0] = -1; + return prevVal + curVal; + } + + var arr = [1,2,3,4,5]; + if(arr.reduceRight(callbackfn) === 13) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js index 6a07dc5859..cbb6e8a180 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js - * @description Array.prototype.reduceRight doesn't consider unvisited deleted elements in array after the call - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[1]; - delete arr[4]; - return prevVal + curVal; - } - - var arr = ['1',2,3,4,5]; - if(arr.reduceRight(callbackfn) === "121" ) // two elements deleted - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-3 +description: > + Array.prototype.reduceRight doesn't consider unvisited deleted + elements in array after the call +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + delete arr[1]; + delete arr[4]; + return prevVal + curVal; + } + + var arr = ['1',2,3,4,5]; + if(arr.reduceRight(callbackfn) === "121" ) // two elements deleted + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js index bbf7080ed9..d9b7b5c8d8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js - * @description Array.prototype.reduceRight doesn't consider unvisited deleted elements when Array.length is decreased - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - arr.length = 2; - return prevVal + curVal; - } - - var arr = [1,2,3,4,5]; - if(arr.reduceRight(callbackfn) === 12 ) - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-4 +description: > + Array.prototype.reduceRight doesn't consider unvisited deleted + elements when Array.length is decreased +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + arr.length = 2; + return prevVal + curVal; + } + + var arr = [1,2,3,4,5]; + if(arr.reduceRight(callbackfn) === 12 ) + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js index 733d80b593..5462e7803b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js - * @description Array.prototype.reduceRight - callbackfn not called for array with one element - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return 2; - } - - var arr = [1]; - if(arr.reduceRight(callbackfn) === 1 && callCnt === 0 ) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-5 +description: > + Array.prototype.reduceRight - callbackfn not called for array with + one element +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(prevVal, curVal, idx, obj) + { + callCnt++; + return 2; + } + + var arr = [1]; + if(arr.reduceRight(callbackfn) === 1 && callCnt === 0 ) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js index 15ced19ef5..8ae6407166 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js @@ -1,29 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js - * @description Array.prototype.reduceRight visits deleted element in array after the call when same index is also present in prototype - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - delete arr[1]; - delete arr[2]; - return prevVal + curVal; - } - Array.prototype[2] = 6; - var arr = ['1',2,3,4,5]; - var res = arr.reduceRight(callbackfn); - delete Array.prototype[2]; - - if(res === "151" ) //one element deleted - return true; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-6 +description: > + Array.prototype.reduceRight visits deleted element in array after + the call when same index is also present in prototype +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + delete arr[1]; + delete arr[2]; + return prevVal + curVal; + } + Array.prototype[2] = 6; + var arr = ['1',2,3,4,5]; + var res = arr.reduceRight(callbackfn); + delete Array.prototype[2]; + + if(res === "151" ) //one element deleted + return true; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7.js index 7115beca47..caf07b0ac0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7.js - * @description Array.prototype.reduceRight not affect call when the array is deleted during the call - */ - - -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { - delete o.arr; - return prevVal + curVal; - } - - var o = new Object(); - o.arr = ['1', 2, 3, 4, 5]; - return o.arr.reduceRight(callbackfn) === "141" && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-7 +description: > + Array.prototype.reduceRight not affect call when the array is + deleted during the call +includes: [runTestCase.js] +---*/ + +function testcase() { + function callbackfn(prevVal, curVal, idx, obj) { + delete o.arr; + return prevVal + curVal; + } + + var o = new Object(); + o.arr = ['1', 2, 3, 4, 5]; + return o.arr.reduceRight(callbackfn) === "141" && !o.hasOwnProperty("arr"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-8.js index adf2d7ee3c..26ed1c2f30 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-8.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-8.js - * @description Array.prototype.reduceRight - no observable effects occur if 'len' is 0 - */ - - -function testcase() { - - var accessed = false; - function callbackfn() { - accessed = true; - } - - var obj = { length: 0 }; - - Object.defineProperty(obj, "5", { - get: function () { - accessed = true; - return 10; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, function () { }, "initialValue"); - return !accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-8 +description: > + Array.prototype.reduceRight - no observable effects occur if 'len' + is 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn() { + accessed = true; + } + + var obj = { length: 0 }; + + Object.defineProperty(obj, "5", { + get: function () { + accessed = true; + return 10; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, function () { }, "initialValue"); + return !accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-9.js index f661c629fe..7fa5bd0f3f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-9.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-9.js - * @description Array.prototype.reduceRight - modifications to length will change number of iterations - */ - - -function testcase() { - var called = 0; - function callbackfn(preVal, val, idx, obj) { - called++; - } - - var arr = [0, 1, 2, 3]; - Object.defineProperty(arr, "4", { - get: function () { - arr.length = 2; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - - return called === 3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-9 +description: > + Array.prototype.reduceRight - modifications to length will change + number of iterations +includes: [runTestCase.js] +---*/ + +function testcase() { + var called = 0; + function callbackfn(preVal, val, idx, obj) { + called++; + } + + var arr = [0, 1, 2, 3]; + Object.defineProperty(arr, "4", { + get: function () { + arr.length = 2; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + + return called === 3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js index e2d928db01..fe6f3a1e57 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js - * @description Array.prototype.reduceRight returns initialvalue when Array is empty and initialValue is not present - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - } - - var arr = new Array(10); - - if(arr.reduceRight(callbackfn,5) === 5) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-1 +description: > + Array.prototype.reduceRight returns initialvalue when Array is + empty and initialValue is not present +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + } + + var arr = new Array(10); + + if(arr.reduceRight(callbackfn,5) === 5) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-10.js index 1d6005c61e..677c5354b4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-10.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-10.js - * @description Array.prototype.reduceRight - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(preVal, val, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } - - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "5", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[3] = 1; - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult && accessed; - } finally { - delete Object.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-10 +description: > + Array.prototype.reduceRight - deleting property of prototype in + step 8 causes deleted index property not to be visited on an + Array-like Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(preVal, val, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } + } + + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "5", { + get: function () { + delete Object.prototype[3]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[3] = 1; + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult && accessed; + } finally { + delete Object.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-11.js index ed5c4b32a2..b6c9e20a33 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-11.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-11.js - * @description Array.prototype.reduceRight - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [0, , , ]; - Object.defineProperty(arr, "3", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduceRight(callbackfn); - return testResult && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-11 +description: > + Array.prototype.reduceRight - deleting property of prototype in + step 8 causes deleted index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [0, , , ]; + Object.defineProperty(arr, "3", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduceRight(callbackfn); + return testResult && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-12.js index ef7371db6c..18c19c199a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-12.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-12.js - * @description Array.prototype.reduceRight - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - - var obj = { 0: 0, 1: 111, length: 10 }; - - Object.defineProperty(obj, "4", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-12 +description: > + Array.prototype.reduceRight - deleting own property with prototype + property in step 8 causes prototype index property to be visited + on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } + + var obj = { 0: 0, 1: 111, length: 10 }; + + Object.defineProperty(obj, "4", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-13.js index 98b5923455..579afff201 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-13.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-13.js - * @description Array.prototype.reduceRight - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - var arr = [0, 111]; - - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduceRight(callbackfn); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-13 +description: > + Array.prototype.reduceRight - deleting own property with prototype + property in step 8 causes prototype index property to be visited + on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } + var arr = [0, 111]; + + Object.defineProperty(arr, "2", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduceRight(callbackfn); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-14.js index 729158add9..1541fc6e3d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-14.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-14.js - * @description Array.prototype.reduceRight - decreasing length of array in step 8 causes deleted index property not to be visited - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-14 +description: > + Array.prototype.reduceRight - decreasing length of array in step 8 + causes deleted index property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 0; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-15.js index c6ff3dc478..fc0d217445 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-15.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-15.js - * @description Array.prototype.reduceRight - decreasing length of array with prototype property in step 8 causes prototype index property to be visited - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - - return testResult; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-15 +description: > + Array.prototype.reduceRight - decreasing length of array with + prototype property in step 8 causes prototype index property to be + visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "prototype") { + testResult = true; + } + } + var arr = [0, 1, 2, 3]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + + return testResult; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-16.js index 256884a7f2..01188a2153 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-16.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-16.js - * @description Array.prototype.reduceRight - decreasing length of array in step 8 does not delete non-configurable properties - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "unconfigurable") { - testResult = true; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-16 +description: > + Array.prototype.reduceRight - decreasing length of array in step 8 + does not delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "unconfigurable") { + testResult = true; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-17.js index 0dee9d966f..d8afdf55e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-17.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-17.js - * @description Array.prototype.reduceRight - properties added into own object are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0 && curVal === 0) { - testResult = true; - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-17 +description: > + Array.prototype.reduceRight - properties added into own object are + visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0 && curVal === 0) { + testResult = true; + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + get: function () { + Object.defineProperty(obj, "0", { + get: function () { + return 0; + }, + configurable: true + }); + return 1; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-18.js index 702a8590a6..6591bcd4cb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-18.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-18.js - * @description Array.prototype.reduceRight - properties added into own object are visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-18 +description: > + Array.prototype.reduceRight - properties added into own object are + visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "2", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js index 4ce0b025b1..b8c6c9b9a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js - * @description Array.prototype.reduceRight - properties added to prototype are visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } - - var obj = { length: 6 }; - - Object.defineProperty(obj, "2", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-19 +description: > + Array.prototype.reduceRight - properties added to prototype are + visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } + } + + var obj = { length: 6 }; + + Object.defineProperty(obj, "2", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js index 556d8d6406..a02eac25e2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js - * @description Array.prototype.reduceRight - added properties in step 2 are visible here - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "2") { - testResult = true; - } - } - - var obj = {}; - - Object.defineProperty(obj, "length", { - get: function () { - obj[2] = "2"; - return 3; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-2 +description: > + Array.prototype.reduceRight - added properties in step 2 are + visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "2") { + testResult = true; + } + } + + var obj = {}; + + Object.defineProperty(obj, "length", { + get: function () { + obj[2] = "2"; + return 3; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-20.js index 21b490e47a..8ba33f2f0f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-20.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-20.js - * @description Array.prototype.reduceRight - properties added to prototype can be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-20 +description: > + Array.prototype.reduceRight - properties added to prototype can be + visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "2", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-21.js index e0ea32986e..5ad8d82dae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-21.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-21.js - * @description Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var obj = { 0: 10, length: 10 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "5", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-21 +description: > + Array.prototype.reduceRight - deleting own property causes deleted + index property not to be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var obj = { 0: 10, length: 10 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "5", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-22.js index 13ebf8fc55..3a814cb72d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-22.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-22.js - * @description Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [1, 2, 4]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-22 +description: > + Array.prototype.reduceRight - deleting own property causes deleted + index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [1, 2, 4]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-23.js index aadccc3ad8..f093f715ea 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-23.js @@ -1,42 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-23.js - * @description Array.prototype.reduceRight - deleting property of prototype causes deleted index property not to be visited on an Array-like Object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 3) { - testResult = false; - } - } - - var obj = { 2: 2, length: 20 }; - - Object.defineProperty(obj, "5", { - get: function () { - delete Object.prototype[3]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[3] = 1; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } finally { - delete Object.prototype[3]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-23 +description: > + Array.prototype.reduceRight - deleting property of prototype + causes deleted index property not to be visited on an Array-like + Object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 3) { + testResult = false; + } + } + + var obj = { 2: 2, length: 20 }; + + Object.defineProperty(obj, "5", { + get: function () { + delete Object.prototype[3]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[3] = 1; + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult && accessed; + } finally { + delete Object.prototype[3]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-24.js index d1237462ea..217f464e99 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-24.js @@ -1,41 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-24.js - * @description Array.prototype.reduceRight - deleting property of prototype causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [0, , , ]; - Object.defineProperty(arr, "3", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduceRight(callbackfn, "initialValue"); - return testResult && accessed; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-24 +description: > + Array.prototype.reduceRight - deleting property of prototype + causes deleted index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [0, , , ]; + Object.defineProperty(arr, "3", { + get: function () { + delete Array.prototype[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduceRight(callbackfn, "initialValue"); + return testResult && accessed; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-25.js index 957a7f3b1a..29b6289013 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-25.js @@ -1,40 +1,44 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-25.js - * @description Array.prototype.reduceRight - deleting own property with prototype property causes prototype index property to be visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - - var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; - - Object.defineProperty(obj, "4", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - try { - Object.prototype[1] = 1; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-25 +description: > + Array.prototype.reduceRight - deleting own property with prototype + property causes prototype index property to be visited on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } + + var obj = { 0: 0, 1: 111, 4: 10, length: 10 }; + + Object.defineProperty(obj, "4", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + try { + Object.prototype[1] = 1; + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-26.js index 3e834301ba..66f3068e9c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-26.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-26.js - * @description Array.prototype.reduceRight - deleting own property with prototype property causes prototype index property to be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - var arr = [0, 111]; - - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - try { - Array.prototype[1] = 1; - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-26 +description: > + Array.prototype.reduceRight - deleting own property with prototype + property causes prototype index property to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } + var arr = [0, 111]; + + Object.defineProperty(arr, "2", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + try { + Array.prototype[1] = 1; + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-27.js index bc65007e41..0dbe6b271d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-27.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-27.js - * @description Array.prototype.reduceRight - decreasing length of array causes deleted index property not to be visited - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 0; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-27 +description: > + Array.prototype.reduceRight - decreasing length of array causes + deleted index property not to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 0; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-28.js index f4a598f36e..bbb3f75ee8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-28.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-28.js - * @description Array.prototype.reduceRight - decreasing length of array with prototype property causes prototype index property to be visited - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "prototype") { - testResult = true; - } - } - var arr = [0, 1, 2, 3]; - - try { - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - - return testResult; - } finally { - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-28 +description: > + Array.prototype.reduceRight - decreasing length of array with + prototype property causes prototype index property to be visited +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "prototype") { + testResult = true; + } + } + var arr = [0, 1, 2, 3]; + + try { + Object.defineProperty(Array.prototype, "2", { + get: function () { + return "prototype"; + }, + configurable: true + }); + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + + return testResult; + } finally { + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-29.js index 2866d075ba..ecfd07d649 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-29.js @@ -1,43 +1,46 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-29.js - * @description Array.prototype.reduceRight - decreasing length of array does not delete non-configurable properties - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2 && curVal === "unconfigurable") { - testResult = true; - } - } - - var arr = [0, 1, 2, 3]; - - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); - - Object.defineProperty(arr, "3", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-29 +description: > + Array.prototype.reduceRight - decreasing length of array does not + delete non-configurable properties +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2 && curVal === "unconfigurable") { + testResult = true; + } + } + + var arr = [0, 1, 2, 3]; + + Object.defineProperty(arr, "2", { + get: function () { + return "unconfigurable"; + }, + configurable: false + }); + + Object.defineProperty(arr, "3", { + get: function () { + arr.length = 2; + return 1; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js index 43e54d5efb..289ed44808 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js - * @description Array.prototype.reduceRight - deleted properties in step 2 are visible here - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - if (idx === 2) { - testResult = false; - } - } - - var obj = { 2: "2", 3: 10 }; - - Object.defineProperty(obj, "length", { - get: function () { - delete obj[2]; - return 5; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - - return accessed && testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-3 +description: > + Array.prototype.reduceRight - deleted properties in step 2 are + visible here +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + if (idx === 2) { + testResult = false; + } + } + + var obj = { 2: "2", 3: 10 }; + + Object.defineProperty(obj, "length", { + get: function () { + delete obj[2]; + return 5; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + + return accessed && testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-4.js index a01922b220..0ca862c8ab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-4.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-4.js - * @description Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 0 && curVal === 0) { - testResult = true; - } - } - - var obj = { length: 2 }; - - Object.defineProperty(obj, "1", { - get: function () { - Object.defineProperty(obj, "0", { - get: function () { - return 0; - }, - configurable: true - }); - return 1; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-4 +description: > + Array.prototype.reduceRight - properties added into own object in + step 8 can be visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(preVal, curVal, idx, obj) { + if (idx === 0 && curVal === 0) { + testResult = true; + } + } + + var obj = { length: 2 }; + + Object.defineProperty(obj, "1", { + get: function () { + Object.defineProperty(obj, "0", { + get: function () { + return 0; + }, + configurable: true + }); + return 1; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-5.js index 4d1556f4c3..bb0001b583 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-5.js @@ -1,40 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-5.js - * @description Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 1 && curVal === 1) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-5 +description: > + Array.prototype.reduceRight - properties added into own object in + step 8 can be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(preVal, curVal, idx, obj) { + if (idx === 1 && curVal === 1) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "2", { + get: function () { + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-6.js index 587acd4e81..26566e7423 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-6.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-6.js - * @description Array.prototype.reduceRight - properties added to prototype in step 8 visited on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } - - var obj = { length: 6 }; - - Object.defineProperty(obj, "2", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } finally { - delete Object.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-6 +description: > + Array.prototype.reduceRight - properties added to prototype in + step 8 visited on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(preVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } + } + + var obj = { length: 6 }; + + Object.defineProperty(obj, "2", { + get: function () { + Object.defineProperty(Object.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult; + } finally { + delete Object.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-7.js index ec2fc0c3c1..d5992e4e6c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-7.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-7.js - * @description Array.prototype.reduceRight - properties added to prototype in step 8 visited on an Array - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(preVal, curVal, idx, obj) { - if (idx === 1 && curVal === 6.99) { - testResult = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "2", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); - - try { - arr.reduceRight(callbackfn); - return testResult; - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-7 +description: > + Array.prototype.reduceRight - properties added to prototype in + step 8 visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(preVal, curVal, idx, obj) { + if (idx === 1 && curVal === 6.99) { + testResult = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "2", { + get: function () { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true + }); + + try { + arr.reduceRight(callbackfn); + return testResult; + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-8.js index d080f6386a..1ae386e672 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-8.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-8.js - * @description Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(preVal, val, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var obj = { 0: 10, length: 10 }; - - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - - Object.defineProperty(obj, "5", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-8 +description: > + Array.prototype.reduceRight - deleting own property in step 8 + causes deleted index property not to be visited on an Array-like + object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(preVal, val, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var obj = { 0: 10, length: 10 }; + + Object.defineProperty(obj, "1", { + get: function () { + return 6.99; + }, + configurable: true + }); + + Object.defineProperty(obj, "5", { + get: function () { + delete obj[1]; + return 0; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-9.js index 3b5262d0d4..ae65f17cb1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-9.js @@ -1,44 +1,47 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-9.js - * @description Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array - */ - - -function testcase() { - - var accessed = false; - var testResult = true; - - function callbackfn(preVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - testResult = false; - } - } - - var arr = [0]; - - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); - - Object.defineProperty(arr, "2", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); - - arr.reduceRight(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-b-9 +description: > + Array.prototype.reduceRight - deleting own property in step 8 + causes deleted index property not to be visited on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var testResult = true; + + function callbackfn(preVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + testResult = false; + } + } + + var arr = [0]; + + Object.defineProperty(arr, "1", { + get: function () { + return "6.99"; + }, + configurable: true + }); + + Object.defineProperty(arr, "2", { + get: function () { + delete arr[1]; + return 0; + }, + configurable: true + }); + + arr.reduceRight(callbackfn); + return testResult && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js index e9605005bb..44a6e0ba2c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js - * @description Array.prototype.reduceRight - callbackfn not called for indexes never been assigned values - */ - - -function testcase() { - - var callCnt = 0; - function callbackfn(prevVal, curVal, idx, obj) - { - callCnt++; - return curVal; - } - - var arr = new Array(10); - arr[0] = arr[1] = undefined; //explicitly assigning a value - if( arr.reduceRight(callbackfn) === undefined && callCnt === 1) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-1 +description: > + Array.prototype.reduceRight - callbackfn not called for indexes + never been assigned values +includes: [runTestCase.js] +---*/ + +function testcase() { + + var callCnt = 0; + function callbackfn(prevVal, curVal, idx, obj) + { + callCnt++; + return curVal; + } + + var arr = new Array(10); + arr[0] = arr[1] = undefined; //explicitly assigning a value + if( arr.reduceRight(callbackfn) === undefined && callCnt === 1) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js index 9f7d759f74..52f6a9c745 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (curVal === 0); - } - } - - var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-1 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (curVal === 0); + } + } + + var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-10.js index c38db49a80..cd7d728102 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-10.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-10.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-10 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-11.js index 23faac6e79..742837f409 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-11.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-11.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - var proto = { 0: 0, 1: 11, 2: 2 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "1", { - get: function () { - return "1"; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-11 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + var proto = { 0: 0, 1: 11, 2: 2 }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "1", { + get: function () { + return "1"; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-12.js index d90ff9b894..388e271890 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-12.js @@ -1,39 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-12.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - try { - Array.prototype[1] = 11; - var arr = [0, ,2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "1"; - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-12 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited data property on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + try { + Array.prototype[1] = 11; + var arr = [0, ,2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "1"; + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-13.js index 23e696b2c4..c13a873e8b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-13.js @@ -1,46 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-13.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - var proto = { 0: 0, 2: 2}; - - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Object.defineProperty(child, "1", { - get: function () { - return "1"; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-13 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited accessor property on + an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + var proto = { 0: 0, 2: 2}; + + Object.defineProperty(proto, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Object.defineProperty(child, "1", { + get: function () { + return "1"; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-14.js index af7095e0db..a8b46f7600 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-14.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-14.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 11; - }, - configurable: true - }); - - var arr = [0, ,2]; - - Object.defineProperty(arr, "1", { - get: function () { - return "1"; - }, - configurable: true - }); - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-14 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property that overrides an inherited accessor property on + an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 11; + }, + configurable: true + }); + + var arr = [0, ,2]; + + Object.defineProperty(arr, "1", { + get: function () { + return "1"; + }, + configurable: true + }); + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-15.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-15.js index b87645abd9..2df5864ea2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-15.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-15.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-15.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var proto = { 0: 0, 2: 2 }; - - Object.defineProperty(proto, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-15 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var proto = { 0: 0, 2: 2 }; + + Object.defineProperty(proto, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-16.js index ec6fa02a84..677ec061d4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-16.js @@ -1,38 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-16.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - var arr = [0, , 2]; - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-16 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + var arr = [0, , 2]; + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-17.js index 9c6d616d36..f8b6933995 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-17.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-17.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } - - var obj = { 0: 0, 2: 2, length: 3 }; - - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-17 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } + } + + var obj = { 0: 0, 2: 2, length: 3 }; + + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-18.js index c4d92754fb..11be803a74 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-18.js @@ -1,32 +1,35 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-18.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-18 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "1", { + set: function () { }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-19.js index 28b625dcb4..a6dc708bfd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-19.js @@ -1,37 +1,41 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-19.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } - - try { - Object.prototype[1] = 1; - - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } finally { - delete Object.prototype[1]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-19 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function that overrides an + inherited accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } + } + + try { + Object.prototype[1] = 1; + + var obj = { 0: 0, 2: 2, length: 3 }; + Object.defineProperty(obj, "1", { + set: function () { }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + } finally { + delete Object.prototype[1]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js index aac59de141..97dbf83c06 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [0, 1, 2]; - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-2 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [0, 1, 2]; + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-20.js index 5e5ba85f84..b5dbbf95e4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-20.js @@ -1,36 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-20.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } - - try { - Array.prototype[1] = 1; - var arr = [0, ,2]; - Object.defineProperty(arr, "1", { - set: function () { }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-20 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property without a get function that overrides an + inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } + } + + try { + Array.prototype[1] = 1; + var arr = [0, ,2]; + Object.defineProperty(arr, "1", { + set: function () { }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-21.js index d889aabda6..b077f9c7a6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-21.js @@ -1,39 +1,42 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-21.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } - - var proto = { 0: 0, 2: 2 }; - - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-21 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property without a get function on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } + } + + var proto = { 0: 0, 2: 2 }; + + Object.defineProperty(proto, "1", { + set: function () { }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-22.js index 92042cb658..d9126b8adb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-22.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-22.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (typeof curVal === "undefined"); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - set: function () { }, - configurable: true - }); - - var arr = [0, , 2]; - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-22 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + accessor property without a get function on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (typeof curVal === "undefined"); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + set: function () { }, + configurable: true + }); + + var arr = [0, , 2]; + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-23.js index 6d267608cc..a29e0b680e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-23.js @@ -1,38 +1,43 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-23.js - * @description Array.prototype.reduceRight - This object is an global object which contains index property - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - var oldLen = fnGlobalObject().length; - fnGlobalObject()[0] = 0; - fnGlobalObject()[1] = 1; - fnGlobalObject()[2] = 2; - fnGlobalObject().length = 3; - - Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, "initialValue"); - return testResult; - - } finally { - delete fnGlobalObject()[0]; - delete fnGlobalObject()[1]; - delete fnGlobalObject()[2]; - fnGlobalObject().length = oldLen; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-23 +description: > + Array.prototype.reduceRight - This object is an global object + which contains index property +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + var oldLen = fnGlobalObject().length; + fnGlobalObject()[0] = 0; + fnGlobalObject()[1] = 1; + fnGlobalObject()[2] = 2; + fnGlobalObject().length = 3; + + Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, "initialValue"); + return testResult; + + } finally { + delete fnGlobalObject()[0]; + delete fnGlobalObject()[1]; + delete fnGlobalObject()[2]; + fnGlobalObject().length = oldLen; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js index 97a8e54b42..297152643f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js - * @description Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); - }; - - func(0, 1); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-25 +description: > + Array.prototype.reduceRight - This object is the Arguments object + which implements its own property get method (number of arguments + is less than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var func = function (a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); + }; + + func(0, 1); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js index fad7e2f366..751d6086a2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js - * @description Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (curVal === 2); - } - } - - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); - }; - - func(0, 1, 2); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-26 +description: > + Array.prototype.reduceRight - This object is the Arguments object + which implements its own property get method (number of arguments + equals number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (curVal === 2); + } + } + + var func = function (a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); + }; + + func(0, 1, 2); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js index a7a51e52de..1fd16e36bd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js @@ -1,28 +1,32 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js - * @description Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 3) { - testResult = (curVal === 3); - } - } - - var func = function (a, b, c) { - Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); - }; - - func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-27 +description: > + Array.prototype.reduceRight - This object is the Arguments object + which implements its own property get method (number of arguments + is greater than number of parameters) +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 3) { + testResult = (curVal === 3); + } + } + + var func = function (a, b, c) { + Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue"); + }; + + func(0, 1, 2, 3); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js index 37788d32e0..f1af0d6b06 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js - * @description Array.prototype.reduceRight applied to String object, which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - var str = new String("012"); - Array.prototype.reduceRight.call(str, callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-28 +description: > + Array.prototype.reduceRight applied to String object, which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + var str = new String("012"); + Array.prototype.reduceRight.call(str, callbackfn, "initialValue"); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js index c9fea29d92..392badf95b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js - * @description Array.prototype.reduceRight applied to Function object which implements its own property get method - */ - - -function testcase() { - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = function (a, b, c) { - return a + b + c; - }; - obj[0] = 0; - obj[1] = 1; - obj[2] = 2; - obj[3] = 3; - - Array.prototype.reduceRight.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-29 +description: > + Array.prototype.reduceRight applied to Function object which + implements its own property get method +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var initialValue = 0; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = function (a, b, c) { + return a + b + c; + }; + obj[0] = 0; + obj[1] = 1; + obj[2] = 2; + obj[3] = 3; + + Array.prototype.reduceRight.call(obj, callbackfn, initialValue); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js index 924a7e6e4d..400ac15721 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === "1"); - } - } - - var proto = { 0: 10, 1: 11, 2: 12, length: 2 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child[1] = "1"; - child[2] = "2"; - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-3 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited data property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === "1"); + } + } + + var proto = { 0: 10, 1: 11, 2: 12, length: 2 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child[1] = "1"; + child[2] = "2"; + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-30.js index 06e454b174..d4c66909b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-30.js @@ -1,46 +1,49 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-30.js - * @description Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var arr = [, ,]; - var preIterVisible = false; - - Object.defineProperty(arr, "2", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); - - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "11"; - } - }, - configurable: true - }); - - arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-30 +description: > + Array.prototype.reduceRight - element changed by getter on + previous iterations is observed on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var arr = [, ,]; + var preIterVisible = false; + + Object.defineProperty(arr, "2", { + get: function () { + preIterVisible = true; + return 0; + }, + configurable: true + }); + + Object.defineProperty(arr, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return "11"; + } + }, + configurable: true + }); + + arr.reduceRight(callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-31.js index 0d558e0e4f..ce544f1b9a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-31.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-31.js - * @description Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = { length: 3 }; - var preIterVisible = false; - - Object.defineProperty(obj, "2", { - get: function () { - preIterVisible = true; - return 0; - }, - configurable: true - }); - - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 1; - } else { - return "11"; - } - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-31 +description: > + Array.prototype.reduceRight - element changed by getter on + previous iterations is observed on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = { length: 3 }; + var preIterVisible = false; + + Object.defineProperty(obj, "2", { + get: function () { + preIterVisible = true; + return 0; + }, + configurable: true + }); + + Object.defineProperty(obj, "1", { + get: function () { + if (preIterVisible) { + return 1; + } else { + return "11"; + } + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-32.js index 2f1423ad5a..2e4c8157ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-32.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-32.js - * @description Array.prototype.reduceRight - unnhandled exceptions happened in getter terminate iteration on an Array-like object - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } - - - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return false; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-32 +description: > + Array.prototype.reduceRight - unnhandled exceptions happened in + getter terminate iteration on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } + } + + + var obj = { 0: 0, 2: 2, length: 3 }; + Object.defineProperty(obj, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return false; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-33.js index a1e6a79885..c1f444cfec 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-33.js @@ -1,37 +1,40 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-33.js - * @description Array.prototype.reduceRight - unnhandled exceptions happened in getter terminate iteration on an Array - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } - } - - var arr = [0, , 2]; - - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); - - try { - arr.reduceRight(callbackfn, "initialValue"); - return true; - } catch (ex) { - return (ex instanceof RangeError) && !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-33 +description: > + Array.prototype.reduceRight - unnhandled exceptions happened in + getter terminate iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } + } + + var arr = [0, , 2]; + + Object.defineProperty(arr, "1", { + get: function () { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true + }); + + try { + arr.reduceRight(callbackfn, "initialValue"); + return true; + } catch (ex) { + return (ex instanceof RangeError) && !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js index 7621f8a375..7101d6f5af 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Array.prototype[1] = "11"; - [0, 1, 2].reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-4 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Array.prototype[1] = "11"; + [0, 1, 2].reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-5.js index e336657d5b..5180e5ba51 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-5.js @@ -1,44 +1,48 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-5.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 0) { - testResult = (curVal === "0"); - } - } - - var proto = {}; - - Object.defineProperty(proto, "0", { - get: function () { - return 10; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: "0", - configurable: true - }); - child[1] = "1"; - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-5 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited accessor property on an + Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 0) { + testResult = (curVal === "0"); + } + } + + var proto = {}; + + Object.defineProperty(proto, "0", { + get: function () { + return 10; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 2; + Object.defineProperty(child, "0", { + value: "0", + configurable: true + }); + child[1] = "1"; + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-6.js index 0e1fff8e43..39f36e57ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-6.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-6.js - * @description Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return "11"; - }, - configurable: true - }); - [0, 1, 2].reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[1]; - } - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-6 +description: > + Array.prototype.reduceRight - element to be retrieved is own data + property that overrides an inherited accessor property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Object.defineProperty(Array.prototype, "1", { + get: function () { + return "11"; + }, + configurable: true + }); + [0, 1, 2].reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[1]; + } + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js index 0fe74c6775..9190ce6be9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var proto = { 0: 0, 1: 1, 2: 2 }; - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 3; - - Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-7 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + data property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var proto = { 0: 0, 1: 1, 2: 2 }; + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.length = 3; + + Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js index f289ed0f50..c05cec37d4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js - * @description Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - try { - Array.prototype[0] = 0; - Array.prototype[1] = 1; - Array.prototype[2] = 2; - [, , , ].reduceRight(callbackfn, "initialValue"); - return testResult; - - } finally { - delete Array.prototype[0]; - delete Array.prototype[1]; - delete Array.prototype[2]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-8 +description: > + Array.prototype.reduceRight - element to be retrieved is inherited + data property on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + try { + Array.prototype[0] = 0; + Array.prototype[1] = 1; + Array.prototype[2] = 2; + [, , , ].reduceRight(callbackfn, "initialValue"); + return testResult; + + } finally { + delete Array.prototype[0]; + delete Array.prototype[1]; + delete Array.prototype[2]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-9.js index db7670447f..c3f6cdad38 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-9.js @@ -1,33 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-9.js - * @description Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object - */ - - -function testcase() { - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - var obj = { 0: 0, 2: 2, length: 3 }; - Object.defineProperty(obj, "1", { - get: function () { - return 1; - }, - configurable: true - }); - - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-i-9 +description: > + Array.prototype.reduceRight - element to be retrieved is own + accessor property on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (curVal === 1); + } + } + + var obj = { 0: 0, 2: 2, length: 3 }; + Object.defineProperty(obj, "1", { + get: function () { + return 1; + }, + configurable: true + }); + + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return testResult; + + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js index fe345d0520..aecf17be51 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js - * @description Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue not passed) - */ - - -function testcase() { - - function callbackfn(prevVal, curVal, idx, obj) - { - if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal) - return curVal; - else - return false; - } - - var arr = [0,1,true,null,new Object(),"five"]; - if( arr.reduceRight(callbackfn) === 0) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-1 +description: > + Array.prototype.reduceRight - callbackfn called with correct + parameters (initialvalue not passed) +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn(prevVal, curVal, idx, obj) + { + if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal) + return curVal; + else + return false; + } + + var arr = [0,1,true,null,new Object(),"five"]; + if( arr.reduceRight(callbackfn) === 0) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js index 5414316d6b..31a88cdf10 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js - * @description Array.prototype.reduceRight - callbackfn is called with 1 formal parameter - */ - - -function testcase() { - - var called = 0; - - function callbackfn(prevVal) { - called++; - return prevVal; - } - - return [11, 12].reduceRight(callbackfn, 100) === 100 && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-10 +description: > + Array.prototype.reduceRight - callbackfn is called with 1 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn(prevVal) { + called++; + return prevVal; + } + + return [11, 12].reduceRight(callbackfn, 100) === 100 && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js index ff012c0fbe..9ef33a7465 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js - * @description Array.prototype.reduceRight - callbackfn is called with 2 formal parameter - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal) { - if (prevVal === 100) { - testResult = true; - } - return curVal > 10; - } - - return [11].reduceRight(callbackfn, 100) === true && testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-11 +description: > + Array.prototype.reduceRight - callbackfn is called with 2 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal) { + if (prevVal === 100) { + testResult = true; + } + return curVal > 10; + } + + return [11].reduceRight(callbackfn, 100) === true && testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js index ca5c48839d..2d8da157d5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js - * @description Array.prototype.reduceRight - callbackfn is called with 3 formal parameter - */ - - -function testcase() { - - var testResult = false; - var arr = [11, 12, 13]; - var initVal = 6.99; - - function callbackfn(prevVal, curVal, idx) { - if (idx === 2) { - testResult = (prevVal === initVal); - } - return curVal > 10 && arguments[3][idx] === curVal; - } - - return arr.reduceRight(callbackfn, initVal) === true && testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-12 +description: > + Array.prototype.reduceRight - callbackfn is called with 3 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + var arr = [11, 12, 13]; + var initVal = 6.99; + + function callbackfn(prevVal, curVal, idx) { + if (idx === 2) { + testResult = (prevVal === initVal); + } + return curVal > 10 && arguments[3][idx] === curVal; + } + + return arr.reduceRight(callbackfn, initVal) === true && testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js index 6529c4e1b6..5a90460b5e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js - * @description Array.prototype.reduceRight - callbackfn is called with 4 formal parameter - */ - - -function testcase() { - - var arr = [11, 12, 13]; - var initVal = 6.99; - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 2) { - testResult = (prevVal === initVal); - } - return curVal > 10 && obj[idx] === curVal; - } - - return arr.reduceRight(callbackfn, initVal) === true && testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-13 +description: > + Array.prototype.reduceRight - callbackfn is called with 4 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [11, 12, 13]; + var initVal = 6.99; + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 2) { + testResult = (prevVal === initVal); + } + return curVal > 10 && obj[idx] === curVal; + } + + return arr.reduceRight(callbackfn, initVal) === true && testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js index cba99c8dfe..a848f60f97 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js @@ -1,20 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js - * @description Array.prototype.reduceRight - callbackfn uses arguments - */ - - -function testcase() { - - function callbackfn() { - return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1]; - } - - return [11].reduceRight(callbackfn, 100) === true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-14 +description: Array.prototype.reduceRight - callbackfn uses arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + function callbackfn() { + return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1]; + } + + return [11].reduceRight(callbackfn, 100) === true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js index 1cf5569439..26abe9ff22 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js - * @description Array.prototype.reduceRight - non-indexed properties are not called on an Array-like object - */ - - -function testcase() { - - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (prevVal === 8 || curVal === 8) { - testResult = true; - } - } - - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; - Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return !testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-16 +description: > + Array.prototype.reduceRight - non-indexed properties are not + called on an Array-like object +includes: [runTestCase.js] +---*/ + +function testcase() { + + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (prevVal === 8 || curVal === 8) { + testResult = true; + } + } + + var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; + Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); + return !testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js index fe3709fc85..91a06919a8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js @@ -1,31 +1,34 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js - * @description Array.prototype.reduceRight - 'accumulator' used for current iteration is the result of previous iteration on an Array - */ - - -function testcase() { - - var arr = [11, 12, 13]; - var testResult = true; - var initVal = 6.99; - var preResult = initVal; - - function callbackfn(prevVal, curVal, idx, obj) { - if (prevVal !== preResult) { - testResult = false; - } - preResult = curVal; - return curVal; - } - - arr.reduceRight(callbackfn, initVal); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-17 +description: > + Array.prototype.reduceRight - 'accumulator' used for current + iteration is the result of previous iteration on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [11, 12, 13]; + var testResult = true; + var initVal = 6.99; + var preResult = initVal; + + function callbackfn(prevVal, curVal, idx, obj) { + if (prevVal !== preResult) { + testResult = false; + } + preResult = curVal; + return curVal; + } + + arr.reduceRight(callbackfn, initVal); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js index 5acf1a37db..9105fc1630 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js - * @description Array.prototype.reduceRight - 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array - */ - - -function testcase() { - - var arr = [11, 12]; - var testResult = false; - var initVal = 6.99; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === initVal); - } - return curVal; - } - - arr.reduceRight(callbackfn, initVal); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-18 +description: > + Array.prototype.reduceRight - 'accumulator' used for first + iteration is the value of 'initialValue' when it is present on an + Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [11, 12]; + var testResult = false; + var initVal = 6.99; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === initVal); + } + return curVal; + } + + arr.reduceRight(callbackfn, initVal); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js index 1746fa2f3a..f0d5fc27c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js - * @description Array.prototype.reduceRight - value of 'accumulator' used for first iteration is the value of max index property which is not undefined when 'initialValue' is not present on an Array - */ - - -function testcase() { - - var arr = [11, 12, 13]; - var testResult = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 13); - } - return curVal; - } - arr.reduceRight(callbackfn); - - return testResult; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-19 +description: > + Array.prototype.reduceRight - value of 'accumulator' used for + first iteration is the value of max index property which is not + undefined when 'initialValue' is not present on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [11, 12, 13]; + var testResult = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === 1) { + testResult = (prevVal === 13); + } + return curVal; + } + arr.reduceRight(callbackfn); + + return testResult; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js index a2eb37659f..0a1ce7f24a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js - * @description Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue passed) - */ - - -function testcase() { - var bParCorrect = false; - var arr = [0, 1, true, null, new Object(), "five"]; - var initialValue = 5.5; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === obj.length - 1 && obj[idx] === curVal && prevVal === initialValue) - return curVal; - else if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal) - return curVal; - else - return false; - } - return arr.reduceRight(callbackfn, initialValue) === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-2 +description: > + Array.prototype.reduceRight - callbackfn called with correct + parameters (initialvalue passed) +includes: [runTestCase.js] +---*/ + +function testcase() { + var bParCorrect = false; + var arr = [0, 1, true, null, new Object(), "five"]; + var initialValue = 5.5; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx === obj.length - 1 && obj[idx] === curVal && prevVal === initialValue) + return curVal; + else if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal) + return curVal; + else + return false; + } + return arr.reduceRight(callbackfn, initialValue) === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js index b50af0424a..2cdbc50e4d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js - * @description Array.prototype.reduceRight - undefined can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return typeof prevVal === "undefined"; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-20 +description: Array.prototype.reduceRight - undefined can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return typeof prevVal === "undefined"; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js index 82c95dc33a..888bb96e54 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js - * @description Array.prototype.reduceRight - null can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === null; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, null) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-21 +description: Array.prototype.reduceRight - null can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === null; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, null) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js index a89d892e55..22f101a40f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js - * @description Array.prototype.reduceRight - boolean primitive can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === false; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, false) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-22 +description: > + Array.prototype.reduceRight - boolean primitive can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === false; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, false) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js index 2779e14707..b01b1866bf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js - * @description Array.prototype.reduceRight - number primitive can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === 12; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, 12) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-23 +description: > + Array.prototype.reduceRight - number primitive can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === 12; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, 12) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js index e1ec10615e..39e2298e5b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js - * @description Array.prototype.reduceRight - string primitive can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === "hello_"; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, "hello_") === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-24 +description: > + Array.prototype.reduceRight - string primitive can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === "hello_"; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, "hello_") === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js index d83d4d6ae8..ff49587e8a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js - * @description Array.prototype.reduceRight - Function Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objFunction = function () { }; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objFunction; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objFunction) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-25 +description: > + Array.prototype.reduceRight - Function Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objFunction = function () { }; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objFunction; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objFunction) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js index 8ff9b5b0ba..9f02c8d9e5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js - * @description Array.prototype.reduceRight - Array Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objArray = []; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objArray; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objArray) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-26 +description: > + Array.prototype.reduceRight - Array Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objArray = []; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objArray; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objArray) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js index 1327493470..0d60baeccc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js - * @description Array.prototype.reduceRight - String Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objString = new String(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objString; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objString) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-27 +description: > + Array.prototype.reduceRight - String Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objString = new String(); + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objString; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objString) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js index e74b6383a6..a85b55725f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js - * @description Array.prototype.reduceRight - Boolean Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objBoolean = new Boolean(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objBoolean; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objBoolean) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-28 +description: > + Array.prototype.reduceRight - Boolean Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objBoolean = new Boolean(); + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objBoolean; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objBoolean) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js index 0d411299c4..06e96d7579 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js - * @description Array.prototype.reduceRight - Number Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objNumber = new Number(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objNumber; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objNumber) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-29 +description: > + Array.prototype.reduceRight - Number Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objNumber = new Number(); + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objNumber; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objNumber) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js index c9ef375d7a..808d2f734a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js @@ -1,27 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js - * @description Array.prototype.reduceRight - callbackfn takes 4 arguments - */ - - -function testcase() { - - var bCalled = false; - function callbackfn(prevVal, curVal, idx, obj) - { - bCalled = true; - if(prevVal === true && arguments.length === 4) - return true; - else - return false; - } - var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.reduceRight(callbackfn,true) === true && bCalled === true) - return true; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-3 +description: Array.prototype.reduceRight - callbackfn takes 4 arguments +includes: [runTestCase.js] +---*/ + +function testcase() { + + var bCalled = false; + function callbackfn(prevVal, curVal, idx, obj) + { + bCalled = true; + if(prevVal === true && arguments.length === 4) + return true; + else + return false; + } + var arr = [0,1,2,3,4,5,6,7,8,9]; + if(arr.reduceRight(callbackfn,true) === true && bCalled === true) + return true; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js index dd579c6b8e..777241513f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js - * @description Array.prototype.reduceRight - the Math Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === Math; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, Math) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-30 +description: > + Array.prototype.reduceRight - the Math Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === Math; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, Math) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js index 54a3ec51ad..91d5046e72 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js - * @description Array.prototype.reduceRight - Date Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objDate = new Date(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objDate; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objDate) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-31 +description: > + Array.prototype.reduceRight - Date Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objDate = new Date(); + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objDate; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objDate) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js index efd8016ac5..2f4c0b07c1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js - * @description Array.prototype.reduceRight - RegExp Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objRegExp = new RegExp(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objRegExp; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, objRegExp) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-32 +description: > + Array.prototype.reduceRight - RegExp Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objRegExp = new RegExp(); + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objRegExp; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, objRegExp) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js index c7b7067325..057369d159 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js @@ -1,24 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js - * @description Array.prototype.reduceRight - the JSON can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === JSON; - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, JSON) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-33 +description: Array.prototype.reduceRight - the JSON can be used as accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === JSON; + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, JSON) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js index 426106ff1d..9a24ced929 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js - * @description Array.prototype.reduceRight - Error Object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var objError = new RangeError(); - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === objError; - } - - var obj = { 0: 11, length: 1 }; - - - return Array.prototype.reduceRight.call(obj, callbackfn, objError) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-34 +description: > + Array.prototype.reduceRight - Error Object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var objError = new RangeError(); + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === objError; + } + + var obj = { 0: 11, length: 1 }; + + + return Array.prototype.reduceRight.call(obj, callbackfn, objError) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js index 479de4a15d..8b54c3e521 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js - * @description Array.prototype.reduceRight - the Arguments object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - var arg; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === arg; - } - - var obj = { 0: 11, length: 1 }; - - (function fun() { - arg = arguments; - }(10, 11, 12, 13)); - - return Array.prototype.reduceRight.call(obj, callbackfn, arg) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-35 +description: > + Array.prototype.reduceRight - the Arguments object can be used as + accumulator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var arg; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === arg; + } + + var obj = { 0: 11, length: 1 }; + + (function fun() { + arg = arguments; + }(10, 11, 12, 13)); + + return Array.prototype.reduceRight.call(obj, callbackfn, arg) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-37.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-37.js index ccdf48c966..f8eb7aac6f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-37.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-37.js @@ -1,24 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-37.js - * @description Array.prototype.reduceRight - the global object can be used as accumulator - */ - - -function testcase() { - - var accessed = false; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return prevVal === fnGlobalObject(); - } - - var obj = { 0: 11, length: 1 }; - - return Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()) === true && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-37 +description: > + Array.prototype.reduceRight - the global object can be used as + accumulator +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + return prevVal === fnGlobalObject(); + } + + var obj = { 0: 11, length: 1 }; + + return Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()) === true && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4-s.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4-s.js index 85b067a323..63896752cb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4-s.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4-s.js @@ -1,24 +1,27 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4-s.js - * @description Array.prototype.reduceRight - undefined passed as thisValue to strict callbackfn - * @onlyStrict - */ - - -function testcase() { - var innerThisCorrect = false; - function callbackfn(prevVal, curVal, idx, obj) - { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } - [0].reduceRight(callbackfn,true); - return innerThisCorrect; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-4-s +description: > + Array.prototype.reduceRight - undefined passed as thisValue to + strict callbackfn +flags: [onlyStrict] +includes: [runTestCase.js] +---*/ + +function testcase() { + var innerThisCorrect = false; + function callbackfn(prevVal, curVal, idx, obj) + { + "use strict"; + innerThisCorrect = this===undefined; + return true; + } + [0].reduceRight(callbackfn,true); + return innerThisCorrect; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js index 3d8ab24a39..86d33446a4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js @@ -1,30 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js - * @description Array.prototype.reduceRight - k values are passed in acending numeric order - */ - - -function testcase() { - - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = arr.length - 1; - var accessed = false; - var result = true; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (lastIdx !== idx) { - result = false; - } else { - lastIdx--; - } - } - arr.reduceRight(callbackfn, 1); - return result && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-4 +description: > + Array.prototype.reduceRight - k values are passed in acending + numeric order +includes: [runTestCase.js] +---*/ + +function testcase() { + + var arr = [0, 1, 2, 3, 4, 5]; + var lastIdx = arr.length - 1; + var accessed = false; + var result = true; + + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (lastIdx !== idx) { + result = false; + } else { + lastIdx--; + } + } + arr.reduceRight(callbackfn, 1); + return result && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js index 013672cc3b..543baff2a5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js @@ -1,36 +1,39 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js - * @description Array.prototype.reduceRight - k values are accessed during each iteration and not prior to starting the loop on an Array - */ - - -function testcase() { - var arr = [11, 12, 13, 14]; - var kIndex = []; - var result = true; - var called = 0; - - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(preVal, curVal, idx, o) { - //Each position should be visited one time, which means k is accessed one time during iterations. - called++; - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its next index should has been visited. - if (idx !== arr.length - 1 && typeof kIndex[idx + 1] === "undefined") { - result = false; - } - kIndex[idx] = 1; - } else { - result = false; - } - } - - arr.reduceRight(callbackfn, 1); - return result && called === 4; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-5 +description: > + Array.prototype.reduceRight - k values are accessed during each + iteration and not prior to starting the loop on an Array +includes: [runTestCase.js] +---*/ + +function testcase() { + var arr = [11, 12, 13, 14]; + var kIndex = []; + var result = true; + var called = 0; + + //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. + function callbackfn(preVal, curVal, idx, o) { + //Each position should be visited one time, which means k is accessed one time during iterations. + called++; + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its next index should has been visited. + if (idx !== arr.length - 1 && typeof kIndex[idx + 1] === "undefined") { + result = false; + } + kIndex[idx] = 1; + } else { + result = false; + } + } + + arr.reduceRight(callbackfn, 1); + return result && called === 4; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js index b38af7d9da..c1bb76a28f 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js @@ -1,34 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js - * @description Array.prototype.reduceRight - unhandled exceptions happened in callbackfn terminate iteration - */ - - -function testcase() { - - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - if (idx < 10) { - accessed = true; - } - if (idx === 10) { - throw new Error("Exception occurred in callbackfn"); - } - } - - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; - - try { - Array.prototype.reduceRight.call(obj, callbackfn, 1); - return false; - } catch (ex) { - return !accessed; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-7 +description: > + Array.prototype.reduceRight - unhandled exceptions happened in + callbackfn terminate iteration +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + + function callbackfn(prevVal, curVal, idx, obj) { + if (idx < 10) { + accessed = true; + } + if (idx === 10) { + throw new Error("Exception occurred in callbackfn"); + } + } + + var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; + + try { + Array.prototype.reduceRight.call(obj, callbackfn, 1); + return false; + } catch (ex) { + return !accessed; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js index 2e6b0c1f76..29eefa44ad 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js @@ -1,26 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js - * @description Array.prototype.reduceRight - element changed by callbackfn on previous iterations is observed - */ - - -function testcase() { - - var accessed = false; - var obj = { 0: 11, 1: 12, length: 2 }; - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - if (idx === 1) { - obj[idx - 1] = 8; - } - return curVal > 10; - } - - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === false && accessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-8 +description: > + Array.prototype.reduceRight - element changed by callbackfn on + previous iterations is observed +includes: [runTestCase.js] +---*/ + +function testcase() { + + var accessed = false; + var obj = { 0: 11, 1: 12, length: 2 }; + function callbackfn(prevVal, curVal, idx, obj) { + accessed = true; + if (idx === 1) { + obj[idx - 1] = 8; + } + return curVal > 10; + } + + return Array.prototype.reduceRight.call(obj, callbackfn, 1) === false && accessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js index bac8e4e6ca..667b20c742 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js - * @description Array.prototype.reduceRight - callbackfn is called with 0 formal parameter - */ - - -function testcase() { - - var called = 0; - - function callbackfn() { - called++; - return true; - } - - return [11, 12].reduceRight(callbackfn, 11) === true && 2 === called; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.22-9-c-ii-9 +description: > + Array.prototype.reduceRight - callbackfn is called with 0 formal + parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + + var called = 0; + + function callbackfn() { + called++; + return true; + } + + return [11, 12].reduceRight(callbackfn, 11) === true && 2 === called; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A1_T1.js index 5b3383478f..78a9f7fc65 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A1_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The elements of the array are converted to strings using their - * toLocaleString methods, and these strings are then concatenated, separated - * by occurrences of a separator string that has been derived in an - * implementation-defined locale-specific way - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A1_T1.js - * @description it is the function that should be invoked - */ +/*--- +info: > + The elements of the array are converted to strings using their + toLocaleString methods, and these strings are then concatenated, separated + by occurrences of a separator string that has been derived in an + implementation-defined locale-specific way +es5id: 15.4.4.3_A1_T1 +description: it is the function that should be invoked +---*/ var n = 0; var obj = {toLocaleString: function() {n++}}; @@ -19,5 +19,4 @@ arr.toLocaleString(); //CHECK#1 if (n !== 3) { $ERROR('#1: var n = 0; var obj = {toLocaleString: function() {n++}}; var arr = [undefined, obj, null, obj, obj]; arr.toLocaleString(); n === 3. Actual: ' + (n)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A3_T1.js index d0e88177a1..ecfdabcdda 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A3_T1.js - * @description [[Prototype]] of Array instance is Array.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.3_A3_T1 +description: "[[Prototype]] of Array instance is Array.prototype" +---*/ //CHECK#1 var n = 0; @@ -18,4 +17,3 @@ x.toLocaleString(); if (n !== 2) { $ERROR('#1: var n = 0; var obj = {toLocaleString: function() {n++}}; Array.prototype[1] = obj; x = [obj]; x.length = 2; x.toLocaleString(); n === 2. Actual: ' + (n)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.1.js index c14d7c5c47..eb2b1da183 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toLocaleString has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of toLocaleString has the attribute DontEnum +es5id: 15.4.4.3_A4.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.toLocaleString.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.toLocaleString){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.toLocaleString) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.2.js index 138fa94dff..a19e4b57b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toLocaleString has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of toLocaleString has the attribute DontDelete +es5id: 15.4.4.3_A4.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.toLocaleString.hasOwnProperty('length') !== true) { @@ -24,6 +24,3 @@ if (Array.prototype.toLocaleString.hasOwnProperty('length') !== true) { if (Array.prototype.toLocaleString.length === undefined) { $ERROR('#3: delete Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.3.js index f3f058468a..b860c9bba3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toLocaleString has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of toLocaleString has the attribute ReadOnly +es5id: 15.4.4.3_A4.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.toLocaleString.length; @@ -15,5 +14,3 @@ Array.prototype.toLocaleString.length = Infinity; if (Array.prototype.toLocaleString.length !== x) { $ERROR('#1: x = Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length = Infinity; Array.prototype.toLocaleString.length === x. Actual: ' + (Array.prototype.toLocaleString.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.4.js index ca21a5c594..18d41ff8fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of toLocaleString is 0 - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.4.js - * @description toLocaleString.length === 1 - */ +/*--- +info: The length property of toLocaleString is 0 +es5id: 15.4.4.3_A4.4 +description: toLocaleString.length === 1 +---*/ //CHECK#1 if (Array.prototype.toLocaleString.length !== 0) { $ERROR('#1: Array.prototype.toLocaleString.length === 0. Actual: ' + (Array.prototype.toLocaleString.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.5.js index d4873dcb60..83a66f8d32 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toLocaleString property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The toLocaleString property of Array has the attribute DontEnum +es5id: 15.4.4.3_A4.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('toLocaleString') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "toLocaleString") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.6.js index 5d67830515..7e53a3bee6 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toLocaleString property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.6.js - * @description Checking Array.prototype.toLocaleString.prototype - */ +/*--- +info: The toLocaleString property of Array has not prototype property +es5id: 15.4.4.3_A4.6 +description: Checking Array.prototype.toLocaleString.prototype +---*/ //CHECK#1 if (Array.prototype.toLocaleString.prototype !== undefined) { $ERROR('#1: Array.prototype.toLocaleString.prototype === undefined. Actual: ' + (Array.prototype.toLocaleString.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.7.js index 52a8f32ca8..2c445cdbcb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toLocaleString property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The toLocaleString property of Array can't be used as constructor +es5id: 15.4.4.3_A4.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.toLocaleString() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-b-iii-3-b-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-b-iii-3-b-1.js index 88be1b8c2c..5f6f3b9be0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-b-iii-3-b-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-b-iii-3-b-1.js @@ -1,47 +1,50 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-b-iii-3-b-1.js - * @description Array.prototype.concat will concat an Array when index property (read-only) exists in Array.prototype (Step 5.b.iii.3.b) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 100, - writable: false, - configurable: true - }); - - var oldArr = [101]; - - var newArr = Array.prototype.concat.call(oldArr); - - var verifyValue = false; - verifyValue = newArr[0] === 101; - - var verifyEnumerable = false; - for (var p in newArr) { - if (p === "0" && newArr.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } - - var verifyWritable = false; - newArr[0] = 12; - verifyWritable = newArr[0] === 12; - - var verifyConfigurable = false; - delete newArr[0]; - verifyConfigurable = newArr.hasOwnProperty("0"); - - return verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable; - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.4-5-b-iii-3-b-1 +description: > + Array.prototype.concat will concat an Array when index property + (read-only) exists in Array.prototype (Step 5.b.iii.3.b) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 100, + writable: false, + configurable: true + }); + + var oldArr = [101]; + + var newArr = Array.prototype.concat.call(oldArr); + + var verifyValue = false; + verifyValue = newArr[0] === 101; + + var verifyEnumerable = false; + for (var p in newArr) { + if (p === "0" && newArr.hasOwnProperty("0")) { + verifyEnumerable = true; + } + } + + var verifyWritable = false; + newArr[0] = 12; + verifyWritable = newArr[0] === 12; + + var verifyConfigurable = false; + delete newArr[0]; + verifyConfigurable = newArr.hasOwnProperty("0"); + + return verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1.js index 67bac366c4..c9e261329c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1.js @@ -1,51 +1,54 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1.js - * @description Array.prototype.concat will concat an Array when index property (read-only) exists in Array.prototype (Step 5.c.i) - */ - - -function testcase() { - try { - Object.defineProperty(Array.prototype, "0", { - value: 100, - writable: false, - configurable: true - }); - - var newArr = Array.prototype.concat.call(101); - - var hasProperty = newArr.hasOwnProperty("0"); - - var instanceOfVerify = typeof newArr[0]==="object"; - - var verifyValue = false; - verifyValue = newArr[0] == 101; - - var verifyEnumerable = false; - for (var p in newArr) { - if (p === "0" && newArr.hasOwnProperty("0")) { - verifyEnumerable = true; - } - } - - var verifyWritable = false; - newArr[0] = 12; - verifyWritable = newArr[0] === 12; - - var verifyConfigurable = false; - delete newArr[0]; - verifyConfigurable = newArr.hasOwnProperty("0"); - - return hasProperty && instanceOfVerify && verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable; - - - } finally { - delete Array.prototype[0]; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.4.4-5-c-i-1 +description: > + Array.prototype.concat will concat an Array when index property + (read-only) exists in Array.prototype (Step 5.c.i) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + Object.defineProperty(Array.prototype, "0", { + value: 100, + writable: false, + configurable: true + }); + + var newArr = Array.prototype.concat.call(101); + + var hasProperty = newArr.hasOwnProperty("0"); + + var instanceOfVerify = typeof newArr[0]==="object"; + + var verifyValue = false; + verifyValue = newArr[0] == 101; + + var verifyEnumerable = false; + for (var p in newArr) { + if (p === "0" && newArr.hasOwnProperty("0")) { + verifyEnumerable = true; + } + } + + var verifyWritable = false; + newArr[0] = 12; + verifyWritable = newArr[0] === 12; + + var verifyConfigurable = false; + delete newArr[0]; + verifyConfigurable = newArr.hasOwnProperty("0"); + + return hasProperty && instanceOfVerify && verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable; + + + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T1.js index f5eb4eeabd..36d3ff5034 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the concat method is called with zero or more arguments item1, item2, - * etc., it returns an array containing the array elements of the object followed by - * the array elements of each argument in order - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T1.js - * @description Checking this algorithm, items are Array object - */ +/*--- +info: > + When the concat method is called with zero or more arguments item1, item2, + etc., it returns an array containing the array elements of the object followed by + the array elements of each argument in order +es5id: 15.4.4.4_A1_T1 +description: Checking this algorithm, items are Array object +---*/ var x = new Array(); var y = new Array(0,1); @@ -49,5 +49,4 @@ if (arr[4] !== 4) { //CHECK#6 if (arr.length !== 5) { $ERROR('#6: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr.length === 5. Actual: ' + (arr.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T2.js index 35c104f7d2..7d1da5e998 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the concat method is called with zero or more arguments item1, item2, - * etc., it returns an array containing the array elements of the object followed by - * the array elements of each argument in order - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T2.js - * @description Checking this algorithm, items are objects and primitives - */ +/*--- +info: > + When the concat method is called with zero or more arguments item1, item2, + etc., it returns an array containing the array elements of the object followed by + the array elements of each argument in order +es5id: 15.4.4.4_A1_T2 +description: Checking this algorithm, items are objects and primitives +---*/ var x = [0]; var y = new Object(); @@ -59,5 +59,4 @@ if (arr[6] !== "NaN") { //CHECK#8 if (arr.length !== 7) { $ERROR('#8: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, "NaN"); arr.length === 7. Actual: ' + (arr.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T3.js index 13549592cc..e203f6bb12 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the concat method is called with zero or more arguments item1, item2, - * etc., it returns an array containing the array elements of the object followed by - * the array elements of each argument in order - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T3.js - * @description Checking this algorithm with no items - */ +/*--- +info: > + When the concat method is called with zero or more arguments item1, item2, + etc., it returns an array containing the array elements of the object followed by + the array elements of each argument in order +es5id: 15.4.4.4_A1_T3 +description: Checking this algorithm with no items +---*/ var x = [0,1]; var arr = x.concat(); @@ -37,5 +37,4 @@ if (arr.length !== 2) { //CHECK#4 if (arr === x) { $ERROR('#4: var x = [0,1]; var arr = x.concat(); arr !== x'); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T4.js index 3cf64d942b..6afd036400 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When the concat method is called with zero or more arguments item1, item2, - * etc., it returns an array containing the array elements of the object followed by - * the array elements of each argument in order - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A1_T4.js - * @description Checking this algorithm, items are [], [,] - */ +/*--- +info: > + When the concat method is called with zero or more arguments item1, item2, + etc., it returns an array containing the array elements of the object followed by + the array elements of each argument in order +es5id: 15.4.4.4_A1_T4 +description: Checking this algorithm, items are [], [,] +---*/ var x = [,1]; var arr = x.concat([], [,]); @@ -37,5 +37,4 @@ if (arr[2] !== undefined) { //CHECK#4 if (arr.length !== 3) { $ERROR('#4: var x = [,1]; var arr = x.concat([], [,]); arr.length === 3. Actual: ' + (arr.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1.js index 3d4bc3a7d6..d43343453a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The concat function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1.js - * @description Checking this for Object object, items are objects and primitives - */ +/*--- +info: > + The concat function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.4_A2_T1 +description: Checking this for Object object, items are objects and primitives +---*/ var x = {}; x.concat = Array.prototype.concat; @@ -59,5 +59,4 @@ if (arr[6] !== "NaN") { //CHECK#8 if (arr.length !== 7) { $ERROR('#8: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, "NaN"); arr.length === 7. Actual: ' + (arr.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2.js index 3677816a54..a1e2986daf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The concat function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2.js - * @description Checking this for Object object with no items - */ +/*--- +info: > + The concat function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.4_A2_T2 +description: Checking this for Object object with no items +---*/ var x = {}; x.concat = Array.prototype.concat; @@ -27,5 +27,4 @@ if (arr[0] !== x) { //CHECK#2 if (arr.length !== 1) { $ERROR('#2: var x = {}; x.concat = Array.prototype.concat; var arr = x.concat(); arr.length === 1. Actual: ' + (arr.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1.js index 761793dcf7..d7047cf7b9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.4_A3_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = 1; var x = [0]; @@ -48,4 +49,3 @@ if (arr[1] !== 1) { if (arr.hasOwnProperty('1') !== false) { $ERROR('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.concat = Array.prototype.concat; x = {0:0}; var arr = x.concat(); arr.hasOwnProperty(\'1\') === false. Actual: ' + (arr.hasOwnProperty('1'))); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.1.js index 8f44f11ea5..67a5370df9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of concat has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of concat has the attribute DontEnum +es5id: 15.4.4.4_A4.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.concat.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.concat){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.concat) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.2.js index 383a57a337..58d7bc4829 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of concat has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of concat has the attribute DontDelete +es5id: 15.4.4.4_A4.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.concat.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.concat.hasOwnProperty('length') !== true) { if (Array.prototype.concat.length === undefined) { $ERROR('#3: delete Array.prototype.concat.length; Array.prototype.concat.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.3.js index e9006f4c7b..cdf728da1c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of concat has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of concat has the attribute ReadOnly +es5id: 15.4.4.4_A4.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.concat.length; @@ -15,5 +14,3 @@ Array.prototype.concat.length = Infinity; if (Array.prototype.concat.length !== x) { $ERROR('#1: x = Array.prototype.concat.length; Array.prototype.concat.length = Infinity; Array.prototype.concat.length === x. Actual: ' + (Array.prototype.concat.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.4.js index 7f2b329171..ccdfadf2bf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of concat is 1 - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.4.js - * @description concat.length === 1 - */ +/*--- +info: The length property of concat is 1 +es5id: 15.4.4.4_A4.4 +description: concat.length === 1 +---*/ //CHECK#1 if (Array.prototype.concat.length !== 1) { $ERROR('#1: Array.prototype.concat.length === 1. Actual: ' + (Array.prototype.concat.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.5.js index 236be1f96e..b7aeed7022 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The concat property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The concat property of Array has the attribute DontEnum +es5id: 15.4.4.4_A4.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('concat') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "concat") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.6.js index bbd5df9e48..195a49a9d1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The concat property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.6.js - * @description Checking Array.prototype.concat.prototype - */ +/*--- +info: The concat property of Array has not prototype property +es5id: 15.4.4.4_A4.6 +description: Checking Array.prototype.concat.prototype +---*/ //CHECK#1 if (Array.prototype.concat.prototype !== undefined) { $ERROR('#1: Array.prototype.concat.prototype === undefined. Actual: ' + (Array.prototype.concat.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.7.js index d17536462d..5a7e92dfce 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The concat property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The concat property of Array can't be used as constructor +es5id: 15.4.4.4_A4.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.concat() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.1_T1.js index bba921ab17..8c7d7ffa2e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If length is zero, return the empty string - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.1_T1.js - * @description Checking this use new Array() and [] - */ +/*--- +info: If length is zero, return the empty string +es5id: 15.4.4.5_A1.1_T1 +description: Checking this use new Array() and [] +---*/ //CHECK#1 var x = new Array(); @@ -20,5 +19,4 @@ x[0] = 1; x.length = 0; if (x.join() !== "") { $ERROR('#2: x = []; x[0] = 1; x.length = 0; x.join() === "". Actual: ' + (x.join())); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T1.js index 568468d1ea..9916542efd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If separator is undefined, a single comma is used as the separator - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T1.js - * @description Checking this use new Array() and [] - */ +/*--- +info: If separator is undefined, a single comma is used as the separator +es5id: 15.4.4.5_A1.2_T1 +description: Checking this use new Array() and [] +---*/ //CHECK#1 var x = new Array(0,1,2,3); @@ -28,4 +27,3 @@ x[0] = 0; if (x.join() !== "0") { $ERROR('#3: x = []; x[0] = 0; x.join() === "0". Actual: ' + (x.join())); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T2.js index e09c2a115c..3fefa7f8ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If separator is undefined, a single comma is used as the separator - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.2_T2.js - * @description Checking this use new Array() and [] - */ +/*--- +info: If separator is undefined, a single comma is used as the separator +es5id: 15.4.4.5_A1.2_T2 +description: Checking this use new Array() and [] +---*/ //CHECK#1 var x = new Array(0,1,2,3); @@ -28,4 +27,3 @@ x[0] = 0; if (x.join(undefined) !== "0") { $ERROR('#3: x = []; x[0] = 0; x.join(undefined) === "0". Actual: ' + (x.join(undefined))); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.3_T1.js index 4a95e6550f..f83025040d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If array element is undefined or null, use the empty string - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A1.3_T1.js - * @description Checking this use new Array() and [] - */ +/*--- +info: If array element is undefined or null, use the empty string +es5id: 15.4.4.5_A1.3_T1 +description: Checking this use new Array() and [] +---*/ //CHECK#1 var x = []; @@ -27,4 +26,3 @@ x = Array(undefined,1,null,3); if (x.join() !== ",1,,3") { $ERROR('#3: x = Array(undefined,1,null,3); x.join() === ",1,,3". Actual: ' + (x.join())); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T1.js index 6895b5a247..a89628a9a4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T1.js - * @description If ToUint32(length) is zero, return the empty string - */ +/*--- +info: > + The join function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.5_A2_T1 +description: If ToUint32(length) is zero, return the empty string +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -46,4 +46,3 @@ if (obj.join() !== "") { if (obj.length !== null) { $ERROR('#6: var obj = {}; obj.length = null; obj.join = Array.prototype.join; obj.join(); obj.length === null. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T2.js index 5b0b7d75d2..c6800a2e6d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T2.js - * @description If ToUint32(length) is zero, return the empty string - */ +/*--- +info: > + The join function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.5_A2_T2 +description: If ToUint32(length) is zero, return the empty string +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -82,4 +82,3 @@ if (obj.join() !== "") { if (obj.length !== x) { $ERROR('#12: var x = new Number(0); var obj = {}; obj.length = x; obj.join = Array.prototype.join; obj.join(); obj.length === x. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T3.js index e9ef09ede4..d1464b9732 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T3.js - * @description If ToUint32(length) is zero, return the empty string - */ +/*--- +info: > + The join function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.5_A2_T3 +description: If ToUint32(length) is zero, return the empty string +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -52,5 +52,4 @@ if (obj.join() !== ",1,,") { //CHECK#6 if (obj.length !== x) { $ERROR('#6: var obj = {}; var x = new Number(4.5); obj.length = x; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join(); obj.length === x. Actual: ' + (obj.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T4.js index d4072b7821..4ec93e0236 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A2_T4.js - * @description Operator use ToNumber from length. - * If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: > + The join function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.5_A2_T4 +description: > + Operator use ToNumber from length. If Type(value) is Object, + evaluate ToPrimitive(value, Number) +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -81,4 +82,3 @@ catch (e) { $ERROR('#8,2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.join() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T1.js index ee35630823..dfe0ef195a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString from separator - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T1.js - * @description Checking separator in ["", "\\", "&", true, Infinity, null, undefind, NaN] - */ +/*--- +info: Operator use ToString from separator +es5id: 15.4.4.5_A3.1_T1 +description: > + Checking separator in ["", "\\", "&", true, Infinity, null, + undefind, NaN] +---*/ //CHECK#0 var x = new Array(0,1,2,3); @@ -49,4 +50,3 @@ if (x.join(undefined) !== "0,1,2,3") { if (x.join(NaN) !== "0NaN1NaN2NaN3") { $ERROR('#7: x = new Array(0,1,2,3); x.join("NaN") === "0NaN1NaN2NaN3". Actual: ' + (x.join("NaN"))); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T2.js index a425c5c5e0..87268a3e55 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString from separator - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.1_T2.js - * @description If Type(separator) is Object, evaluate ToPrimitive(separator, String) - */ +/*--- +info: Operator use ToString from separator +es5id: 15.4.4.5_A3.1_T2 +description: > + If Type(separator) is Object, evaluate ToPrimitive(separator, + String) +---*/ var x = new Array(0,1,2,3); //CHECK#1 @@ -88,4 +89,4 @@ catch (e) { if (e !== "error") { $ERROR('#9.2: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + (e)); } -} \ No newline at end of file +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T1.js index b0bd016901..17c2346996 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString from array arguments - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T1.js - * @description Checking arguments and separator in ["", "\\", "&", true, Infinity, null, undefind, NaN] - */ +/*--- +info: Operator use ToString from array arguments +es5id: 15.4.4.5_A3.2_T1 +description: > + Checking arguments and separator in ["", "\\", "&", true, + Infinity, null, undefind, NaN] +---*/ //CHECK#0 var x = new Array("","",""); @@ -55,4 +56,3 @@ var x = new Array(NaN,NaN,NaN); if (x.join() !== "NaN,NaN,NaN") { $ERROR('#7: var x = new Array(NaN,NaN,NaN); x.join(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.join(NaN,NaN,NaN))); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T2.js index e56188cd7d..8c1ee9e324 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToString from array arguments - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A3.2_T2.js - * @description If Type(argument) is Object, evaluate ToPrimitive(argument, String) - */ +/*--- +info: Operator use ToString from array arguments +es5id: 15.4.4.5_A3.2_T2 +description: If Type(argument) is Object, evaluate ToPrimitive(argument, String) +---*/ //CHECK#1 var object = {valueOf: function() {return "+"}}; @@ -84,4 +83,3 @@ catch (e) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.join() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T1.js index 40e1bc6654..ebecfbd05b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.5_A4_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -23,4 +22,3 @@ if (obj.join("") !== "") { if (obj.length !== 4294967296) { $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.join(""); obj.length === 4294967296. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T2.js index 23c4efff19..ac72d73545 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T2.js - * @description length = 4294967297 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.5_A4_T2 +description: length = 4294967297 +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -24,4 +23,3 @@ if (obj.join("") !== "x") { if (obj.length !== 4294967297) { $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = "x"; obj[1] = "y"; obj[4294967296] = "z"; obj.length = 4294967297; obj.join(""); obj.length === 4294967297. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T3.js index df9eba2939..c13a68b757 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T3.js - * @description length = -4294967294 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.5_A4_T3 +description: length = -4294967294 +---*/ var obj = {}; obj.join = Array.prototype.join; @@ -24,4 +23,3 @@ if (obj.join("") !== "xy") { if (obj.length !== -4294967294) { $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.join(""); obj.length === -4294967294. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A5_T1.js index a0ee319f95..e0626c8250 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A5_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.5_A5_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ //CHECK#1 Array.prototype[1] = 1; @@ -24,4 +25,3 @@ x = {0:0}; if (x.join() !== "0,1") { $ERROR('#2: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.join = Array.prototype.join; x = {0:0}; x.join() === "0,1". Actual: ' + (x.join())); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.1.js index 3066f805e9..c573db571e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of join has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of join has the attribute DontEnum +es5id: 15.4.4.5_A6.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.join.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.join){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.join) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.2.js index d415d2c6b8..e1fc43c9d9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of join has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of join has the attribute DontDelete +es5id: 15.4.4.5_A6.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.join.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.join.hasOwnProperty('length') !== true) { if (Array.prototype.join.length === undefined) { $ERROR('#3: delete Array.prototype.join.length; Array.prototype.join.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.3.js index e56213508d..5f520eddab 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of join has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of join has the attribute ReadOnly +es5id: 15.4.4.5_A6.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.join.length; @@ -15,5 +14,3 @@ Array.prototype.join.length = Infinity; if (Array.prototype.join.length !== x) { $ERROR('#1: x = Array.prototype.join.length; Array.prototype.join.length = Infinity; Array.prototype.join.length === x. Actual: ' + (Array.prototype.join.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.4.js index 24514ff578..272672ecbe 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of join is 1 - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.4.js - * @description join.length === 1 - */ +/*--- +info: The length property of join is 1 +es5id: 15.4.4.5_A6.4 +description: join.length === 1 +---*/ //CHECK#1 if (Array.prototype.join.length !== 1) { $ERROR('#1: Array.prototype.join.length === 1. Actual: ' + (Array.prototype.join.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.5.js index a6e48f0dd6..dd5dd6b9cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The join property of Array has the attribute DontEnum +es5id: 15.4.4.5_A6.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('join') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "join") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.6.js index 22378de7a4..b8a4a8307a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.6.js - * @description Checking Array.prototype.join.prototype - */ +/*--- +info: The join property of Array has not prototype property +es5id: 15.4.4.5_A6.6 +description: Checking Array.prototype.join.prototype +---*/ //CHECK#1 if (Array.prototype.join.prototype !== undefined) { $ERROR('#1: Array.prototype.join.prototype === undefined. Actual: ' + (Array.prototype.join.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.7.js index db85fdbee1..2acb5dbc4a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The join property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The join property of Array can't be used as constructor +es5id: 15.4.4.5_A6.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.join() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.1_T1.js index 2aaf5e3849..4557990c26 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If length equal zero, call the [[Put]] method of this object - * with arguments "length" and 0 and return undefined - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.1_T1.js - * @description Checking this algorithm - */ +/*--- +info: > + If length equal zero, call the [[Put]] method of this object + with arguments "length" and 0 and return undefined +es5id: 15.4.4.6_A1.1_T1 +description: Checking this algorithm +---*/ //CHECK#1 var x = new Array(); @@ -32,5 +32,4 @@ if (pop !== undefined) { //CHECK#4 if (x.length !== 0) { $ERROR('#4: var x = new Array(1,2,3); x.length = 0; x.pop(); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.2_T1.js index e28151d3f1..389bbffbae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The last element of the array is removed from the array - * and returned - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A1.2_T1.js - * @description Checking this use new Array() and [] - */ +/*--- +info: > + The last element of the array is removed from the array + and returned +es5id: 15.4.4.6_A1.2_T1 +description: Checking this use new Array() and [] +---*/ //CHECK#1 var x = new Array(0,1,2,3); @@ -66,4 +66,3 @@ if (pop !== 0) { if (x.length !== 0) { $ERROR('#10: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length = 1; x.pop(); x.length === 0. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T1.js index 4f31517356..a3b472b184 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T1.js - * @description If ToUint32(length) equal zero, call the [[Put]] method - * of this object with arguments "length" and 0 and return undefined - */ +/*--- +info: > + The pop function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.6_A2_T1 +description: > + If ToUint32(length) equal zero, call the [[Put]] method of this + object with arguments "length" and 0 and return undefined +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -50,4 +51,3 @@ if (pop !== undefined) { if (obj.length !== 0) { $ERROR('#6: var obj = {}; obj.length = null; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T2.js index 452ceb072f..211dd12927 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T2.js - * @description If ToUint32(length) equal zero, call the [[Put]] method - * of this object with arguments "length" and 0 and return undefined - */ +/*--- +info: > + The pop function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.6_A2_T2 +description: > + If ToUint32(length) equal zero, call the [[Put]] method of this + object with arguments "length" and 0 and return undefined +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -88,4 +89,3 @@ if (pop !== undefined) { if (obj.length !== 0) { $ERROR('#12: var obj = {}; obj.length = new Number(0); obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T3.js index 4bb20b9833..79b790f460 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T3.js - * @description The last element ToUint32(length) - 1 of the array is removed from the array - * and returned - */ +/*--- +info: > + The pop function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.6_A2_T3 +description: > + The last element ToUint32(length) - 1 of the array is removed from + the array and returned +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -35,5 +36,4 @@ if (pop !== undefined) { //CHECK#3 if (obj.length !== 1) { $ERROR('#12: var obj = {}; obj.length = new Number(2); obj.pop = Array.prototype.pop; obj.pop(); obj.length === 1. Actual: ' + (obj.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T4.js index 88faf99a77..76320e7216 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T4.js - * @description Operator use ToNumber from length. - * If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: > + The pop function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.6_A2_T4 +description: > + Operator use ToNumber from length. If Type(value) is Object, + evaluate ToPrimitive(value, Number) +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -95,4 +96,3 @@ catch (e) { $ERROR('#8.2: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.pop() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T1.js index 666f2c37e5..f7657f024b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.6_A3_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -33,5 +32,4 @@ if (obj[0] !== "x") { //CHECK#4 if (obj[4294967295] !== "y") { $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[4294967295] === "y". Actual: ' + (obj[4294967295])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T2.js index 910e5d94d0..46ccd95d26 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T2.js - * @description length = 4294967297 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.6_A3_T2 +description: length = 4294967297 +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -33,5 +32,4 @@ if (obj[0] !== undefined) { //CHECK#4 if (obj[4294967296] !== "y") { $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[4294967296] === "y". Actual: ' + (obj[4294967296])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T3.js index 9eee4cee8f..97a96425d2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T3.js - * @description length = -1 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.6_A3_T3 +description: length = -1 +---*/ var obj = {}; obj.pop = Array.prototype.pop; @@ -27,5 +26,4 @@ if (obj.length !== 4294967294) { //CHECK#3 if (obj[4294967294] !== undefined) { $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; obj.pop(); obj[4294967294] === undefined. Actual: ' + (obj[4294967294])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T1.js index 16ed2eff26..b32fc08052 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.6_A4_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = 1; var x = [0]; @@ -49,4 +50,3 @@ delete x.length; if (x.length !== 2) { $ERROR('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); delete x; x.length === 2. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T2.js index cb3498573d..d865943338 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A4_T2.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.6_A4_T2 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = -1; var x = [0,1]; @@ -49,4 +50,3 @@ delete x.length; if (x.length !== 2) { $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); delete x; x.length === 2. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.1.js index 601fc2156e..4fe253907c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of pop has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of pop has the attribute DontEnum +es5id: 15.4.4.6_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.pop.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.pop){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.pop) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.2.js index 1e7e6e3793..99e3f32782 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of pop has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of pop has the attribute DontDelete +es5id: 15.4.4.6_A5.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.pop.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.pop.hasOwnProperty('length') !== true) { if (Array.prototype.pop.length === undefined) { $ERROR('#3: delete Array.prototype.pop.length; Array.prototype.pop.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.3.js index fa88989562..19bce0d7ac 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of pop has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of pop has the attribute ReadOnly +es5id: 15.4.4.6_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.pop.length; @@ -15,5 +14,3 @@ Array.prototype.pop.length = Infinity; if (Array.prototype.pop.length !== x) { $ERROR('#1: x = Array.prototype.pop.length; Array.prototype.pop.length = Infinity; Array.prototype.pop.length === x. Actual: ' + (Array.prototype.pop.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.4.js index 27d696e243..41e2bc9fd9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of pop is 0 - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.4.js - * @description pop.length === 1 - */ +/*--- +info: The length property of pop is 0 +es5id: 15.4.4.6_A5.4 +description: pop.length === 1 +---*/ //CHECK#1 if (Array.prototype.pop.length !== 0) { $ERROR('#1: Array.prototype.pop.length === 0. Actual: ' + (Array.prototype.pop.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.5.js index 337db2071b..2546e4f964 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The pop property of Array has the attribute DontEnum +es5id: 15.4.4.6_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('pop') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "pop") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.6.js index b159eac001..7e6b9090e3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.6.js - * @description Checking Array.prototype.pop.prototype - */ +/*--- +info: The pop property of Array has not prototype property +es5id: 15.4.4.6_A5.6 +description: Checking Array.prototype.pop.prototype +---*/ //CHECK#1 if (Array.prototype.pop.prototype !== undefined) { $ERROR('#1: Array.prototype.pop.prototype === undefined. Actual: ' + (Array.prototype.pop.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.7.js index 7c1924c7a9..47b1809db9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The pop property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The pop property of Array can't be used as constructor +es5id: 15.4.4.6_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.pop() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T1.js index 283c8edced..8646a84044 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The arguments are appended to the end of the array, in - * the order in which they appear. The new length of the array is returned - * as the result of the call - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T1.js - * @description Checking case when push is given no arguments or one argument - */ +/*--- +info: > + The arguments are appended to the end of the array, in + the order in which they appear. The new length of the array is returned + as the result of the call +es5id: 15.4.4.7_A1_T1 +description: Checking case when push is given no arguments or one argument +---*/ //CHECK#1 var x = new Array(); @@ -47,5 +47,4 @@ if (x[1] !== -1) { //CHECK#7 if (x.length !== 2) { $ERROR('#7: x = new Array(); x.push(1); x.push(); x.push(-1); x.length === 2. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T2.js index e9a39ab725..2310249841 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The arguments are appended to the end of the array, in - * the order in which they appear. The new length of the array is returned - * as the result of the call - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A1_T2.js - * @description Checking case when push is given many arguments - */ +/*--- +info: > + The arguments are appended to the end of the array, in + the order in which they appear. The new length of the array is returned + as the result of the call +es5id: 15.4.4.7_A1_T2 +description: Checking case when push is given many arguments +---*/ //CHECK#1 var x = []; @@ -57,4 +57,3 @@ if (x[5] !== -1) { if (x.length !== 6) { $ERROR('#9: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x.length === 6. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T1.js index 4adea71b6f..cbc6c261c4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T1.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The push function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T1.js - * @description The arguments are appended to the end of the array, in - * the order in which they appear. The new length of the array is returned - * as the result of the call - */ +/*--- +info: > + The push function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.7_A2_T1 +description: > + The arguments are appended to the end of the array, in the order + in which they appear. The new length of the array is returned as + the result of the call +---*/ var obj = {}; obj.push = Array.prototype.push; @@ -65,4 +66,3 @@ if (obj.length !== 1) { if (obj["0"] !== -7) { $ERROR('#9: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7); obj["0"] === -7. Actual: ' + (obj["0"])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T2.js index b294fae5b9..565aa3c6b7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The push function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T2.js - * @description The arguments are appended to the end of the array, in - * the order in which they appear. The new length of the array is returned - * as the result of the call - */ +/*--- +info: > + The push function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.7_A2_T2 +description: > + The arguments are appended to the end of the array, in the order + in which they appear. The new length of the array is returned as + the result of the call +---*/ var obj = {}; obj.push = Array.prototype.push; @@ -114,5 +115,4 @@ if (obj.length !== 1) { //CHECK#18 if (obj["0"] !== -16) { $ERROR('#18: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16); obj["0"] === -16. Actual: ' + (obj["0"])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T3.js index be3839d4d5..d9156f316a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The push function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T3.js - * @description Operator use ToNumber from length. - * If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: > + The push function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.7_A2_T3 +description: > + Operator use ToNumber from length. If Type(value) is Object, + evaluate ToPrimitive(value, Number) +---*/ var obj = {}; obj.push = Array.prototype.push; @@ -90,4 +91,3 @@ catch (e) { $ERROR('#8.2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.push() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A3.js index 910fe9f3cb..ea9118947b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for Array object - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A3.js - * @description If ToUint32(length) !== length, throw RangeError - */ +/*--- +info: Check ToUint32(length) for Array object +es5id: 15.4.4.7_A3 +description: If ToUint32(length) !== length, throw RangeError +---*/ var x = []; x.length = 4294967295; @@ -36,4 +35,3 @@ if (x[4294967295] !== "x") { if (x.length !== 4294967295) { $ERROR('#4: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x.length === 4294967295. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T1.js index 73e59476f1..ab47ba918b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.7_A4_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.push = Array.prototype.push; @@ -51,5 +50,4 @@ if (push !== 0) { //CHECK#7 if (obj.length !== 0) { $ERROR('#7: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(); obj.length === 0. Actual: ' + (obj.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T2.js index 02e18ab0ab..5a9d23619c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T2.js - * @description length = 4294967295 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.7_A4_T2 +description: length = 4294967295 +---*/ var obj = {}; obj.push = Array.prototype.push; @@ -36,5 +35,4 @@ if (obj[4294967296] !== "y") { //CHECK#5 if (obj[4294967297] !== "z") { $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967297] === "z". Actual: ' + (obj[4294967297])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T3.js index fdd6279da6..045f4d1bcd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T3.js - * @description length = -1 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.7_A4_T3 +description: length = -1 +---*/ var obj = {}; obj.push = Array.prototype.push; @@ -36,5 +35,4 @@ if (obj[4294967296] !== "y") { //CHECK#5 if (obj[4294967297] !== "z") { $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967297] === "z". Actual: ' + (obj[4294967297])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A5_T1.js index 925dfae4d4..8ab0e44ac2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A5_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A5_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +es5id: 15.4.4.7_A5_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Object.prototype[1] = -1; Object.prototype.length = 1; @@ -40,5 +41,3 @@ delete x.length; if (x.length !== 1) { $ERROR('#5: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; delete x; x.push(1); x.length === 1. Actual: ' + (x.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.1.js index 5cc5136648..d85a1c787a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of push has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of push has the attribute DontEnum +es5id: 15.4.4.7_A6.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.push.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.push){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.push) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.2.js index 08da5d3d47..8131b033dd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of push has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of push has the attribute DontDelete +es5id: 15.4.4.7_A6.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.push.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.push.hasOwnProperty('length') !== true) { if (Array.prototype.push.length === undefined) { $ERROR('#3: delete Array.prototype.push.length; Array.prototype.push.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.3.js index db6af4403e..ca2f603978 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of push has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of push has the attribute ReadOnly +es5id: 15.4.4.7_A6.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.push.length; @@ -15,5 +14,3 @@ Array.prototype.push.length = Infinity; if (Array.prototype.push.length !== x) { $ERROR('#1: x = Array.prototype.push.length; Array.prototype.push.length = Infinity; Array.prototype.push.length === x. Actual: ' + (Array.prototype.push.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.4.js index 0218d4d997..67b319181d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of push is 1 - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.4.js - * @description push.length === 1 - */ +/*--- +info: The length property of push is 1 +es5id: 15.4.4.7_A6.4 +description: push.length === 1 +---*/ //CHECK#1 if (Array.prototype.push.length !== 1) { $ERROR('#1: Array.prototype.push.length === 1. Actual: ' + (Array.prototype.push.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.5.js index 3125dea3a2..60b48d5cf2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The push property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The push property of Array has the attribute DontEnum +es5id: 15.4.4.7_A6.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('push') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "push") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.6.js index b700eaaeb7..cb8ec123c3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The push property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.6.js - * @description Checking Array.prototype.push.prototype - */ +/*--- +info: The push property of Array has not prototype property +es5id: 15.4.4.7_A6.6 +description: Checking Array.prototype.push.prototype +---*/ //CHECK#1 if (Array.prototype.push.prototype !== undefined) { $ERROR('#1: Array.prototype.push.prototype === undefined. Actual: ' + (Array.prototype.push.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.7.js index 7f5ebac8f3..a36fba3ae0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The push property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The push property of Array can't be used as constructor +es5id: 15.4.4.7_A6.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.push() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T1.js index 25c897dca2..2edfc19bc0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The elements of the array are rearranged so as to reverse their order. - * The object is returned as the result of the call - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T1.js - * @description Checking case when reverse is given no arguments or one argument - */ +/*--- +info: > + The elements of the array are rearranged so as to reverse their order. + The object is returned as the result of the call +es5id: 15.4.4.8_A1_T1 +description: Checking case when reverse is given no arguments or one argument +---*/ //CHECK#1 var x = []; @@ -44,5 +44,4 @@ if (x[1] !== 1) { //CHECK#6 if (x.length !== 2) { $ERROR('#6: x = new Array(1,2); x.reverse(); x.length === 2. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T2.js index 94bcac9250..177e3510d2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The elements of the array are rearranged so as to reverse their order. - * The object is returned as the result of the call - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A1_T2.js - * @description Checking this algorithm, elements are objects and primitives - */ +/*--- +info: > + The elements of the array are rearranged so as to reverse their order. + The object is returned as the result of the call +es5id: 15.4.4.8_A1_T2 +description: Checking this algorithm, elements are objects and primitives +---*/ //CHECK#1 var x = []; @@ -124,5 +124,3 @@ if (x[7] !== "NaN") { if (x[8] !== "-1") { $ERROR('#20: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[8] === "-1". Actual: ' + (x[8])); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T1.js index eb98397d81..3911857772 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The reverse function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T1.js - * @description Checking this for Object object, elements are objects and primitives, length is integer - */ +/*--- +info: > + The reverse function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.8_A2_T1 +description: > + Checking this for Object object, elements are objects and + primitives, length is integer +---*/ //CHECK#1 var obj = {}; @@ -127,4 +129,3 @@ if (obj[7] !== "NaN") { if (obj[8] !== "-1") { $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T2.js index fa42f9c540..d6933cd1de 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The reverse function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T2.js - * @description Checking this for Object object, elements are objects and primitives, length is not integer - */ +/*--- +info: > + The reverse function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.8_A2_T2 +description: > + Checking this for Object object, elements are objects and + primitives, length is not integer +---*/ //CHECK#1 var obj = {}; @@ -127,4 +129,3 @@ if (obj[7] !== "NaN") { if (obj[8] !== "-1") { $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T3.js index 76e457d81e..3281dc82f8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The reverse function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A2_T3.js - * @description Checking this for Object object, elements are objects and primitives, length is string - */ +/*--- +info: > + The reverse function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.8_A2_T3 +description: > + Checking this for Object object, elements are objects and + primitives, length is string +---*/ //CHECK#1 var obj = {}; @@ -127,4 +129,3 @@ if (obj[7] !== "NaN") { if (obj[8] !== "-1") { $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T1.js index cd3e5e86b6..197736e5ca 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.8_A3_T1 +description: length = 4294967296 +---*/ var obj = {}; obj.reverse = Array.prototype.reverse; @@ -34,4 +33,3 @@ if (obj[0] !== "x") { if (obj[4294967295] !== "y") { $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj[] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.reverse(); obj[4294967295] == "y"'); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T2.js index 46f2e7afec..308b292f08 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T2.js - * @description length = 4294967298 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.8_A3_T2 +description: length = 4294967298 +---*/ var obj = {}; obj.reverse = Array.prototype.reverse; @@ -39,5 +38,4 @@ if (obj[1] !== "x") { //CHECK#5 if (obj[4294967297] !== "z") { $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[4294967297] = "z"; obj.length = 4294967298; obj.reverse(); obj[4294967297] === "z". Actual: ' + (obj[4294967297])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T3.js index ab9eeaef2c..9851e09b1a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T3.js - * @description length = -4294967294 - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.8_A3_T3 +description: length = -4294967294 +---*/ var obj = {}; obj.reverse = Array.prototype.reverse; @@ -39,5 +38,4 @@ if (obj[1] !== "x") { //CHECK#5 if (obj[2] !== "z") { $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.reverse(); obj[2] === "z". Actual: ' + (obj[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T1.js index e352960e85..9914a29647 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.8_A4_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = 1; var x = [0]; @@ -63,4 +64,3 @@ if (x[0] !== undefined) { if (x[1] !== 1) { $ERROR('#8: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); delete x[0]; delete x[1]; x[1] === 1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T2.js index 38c1dd8196..ae1263bfbc 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A4_T2.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.8_A4_T2 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = -1; var x = [0,1]; @@ -63,4 +64,3 @@ if (x[0] !== undefined) { if (x[1] !== -1) { $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); delete x[0]; delete x[1]; x[1] === -1. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.1.js index 4842b008b5..e4dc84f32b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of reverse has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of reverse has the attribute DontEnum +es5id: 15.4.4.8_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.reverse.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (p in Array.reverse){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.reverse) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js index c50b4df467..fce5b261c9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of reverse has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js - * @description Checking use hasOwnProperty, delete - * @noStrict - */ +/*--- +info: The length property of reverse has the attribute DontDelete +es5id: 15.4.4.8_A5.2 +description: Checking use hasOwnProperty, delete +flags: [noStrict] +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.reverse.hasOwnProperty('length') !== true) { @@ -25,6 +25,3 @@ if (Array.prototype.reverse.hasOwnProperty('length') !== true) { if (Array.prototype.reverse.length === undefined) { $ERROR('#3: delete Array.prototype.reverse.length; Array.prototype.reverse.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.3.js index 697cd8efeb..65b5bf2fe7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of reverse has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of reverse has the attribute ReadOnly +es5id: 15.4.4.8_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.reverse.length; @@ -15,5 +14,3 @@ Array.prototype.reverse.length = Infinity; if (Array.prototype.reverse.length !== x) { $ERROR('#1: x = Array.prototype.reverse.length; Array.prototype.reverse.length = Infinity; Array.prototype.reverse.length === x. Actual: ' + (Array.prototype.reverse.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.4.js index 0a90c188c5..231f9045ee 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of reverse is 0 - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.4.js - * @description reverse.length === 1 - */ +/*--- +info: The length property of reverse is 0 +es5id: 15.4.4.8_A5.4 +description: reverse.length === 1 +---*/ //CHECK#1 if (Array.prototype.reverse.length !== 0) { $ERROR('#1: Array.prototype.reverse.length === 0. Actual: ' + (Array.prototype.reverse.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.5.js index cb1ddf4dcf..9dd52c52fb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The reverse property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The reverse property of Array has the attribute DontEnum +es5id: 15.4.4.8_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('reverse') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "reverse") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.6.js index af214f93a0..288babcf01 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The reverse property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.6.js - * @description Checking Array.prototype.reverse.prototype - */ +/*--- +info: The reverse property of Array has not prototype property +es5id: 15.4.4.8_A5.6 +description: Checking Array.prototype.reverse.prototype +---*/ //CHECK#1 if (Array.prototype.reverse.prototype !== undefined) { $ERROR('#1: Array.prototype.reverse.prototype === undefined. Actual: ' + (Array.prototype.reverse.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.7.js index 0fd08fc56b..00d3652ae1 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The reverse property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The reverse property of Array can't be used as constructor +es5id: 15.4.4.8_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.reverse() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.1_T1.js index b44ab8451f..566e3c0855 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If length equal zero, call the [[Put]] method of this object - * with arguments "length" and 0 and return undefined - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.1_T1.js - * @description Checking this algorithm - */ +/*--- +info: > + If length equal zero, call the [[Put]] method of this object + with arguments "length" and 0 and return undefined +es5id: 15.4.4.9_A1.1_T1 +description: Checking this algorithm +---*/ //CHECK#1 var x = new Array(); @@ -32,5 +32,4 @@ if (shift !== undefined) { //CHECK#4 if (x.length !== 0) { $ERROR('#4: var x = new Array(1,2,3); x.length = 0; x.shift(); x.length === 0. Actual: ' + (x.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.2_T1.js index 387255e371..cf42e2db10 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The first element of the array is removed from the array and - * returned - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A1.2_T1.js - * @description Checking this use new Array() and [] - */ +/*--- +info: > + The first element of the array is removed from the array and + returned +es5id: 15.4.4.9_A1.2_T1 +description: Checking this use new Array() and [] +---*/ //CHECK#1 var x = new Array(0,1,2,3); @@ -66,4 +66,3 @@ if (shift !== undefined) { if (x.length !== 0) { $ERROR('#10: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length = 1; x.shift(); x.length === 0. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T1.js index f5ee769f3f..df93db1589 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T1.js - * @description If ToUint32(length) equal zero, call the [[Put]] method - * of this object with arguments "length" and 0 and return undefined - */ +/*--- +info: > + The shift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.9_A2_T1 +description: > + If ToUint32(length) equal zero, call the [[Put]] method of this + object with arguments "length" and 0 and return undefined +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -50,4 +51,3 @@ if (shift !== undefined) { if (obj.length !== 0) { $ERROR('#6: var obj = {}; obj.length = null; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T2.js index 98dd6323c1..5bf7090b6a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T2.js - * @description If ToUint32(length) equal zero, call the [[Put]] method - * of this object with arguments "length" and 0 and return undefined - */ +/*--- +info: > + The shift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.9_A2_T2 +description: > + If ToUint32(length) equal zero, call the [[Put]] method of this + object with arguments "length" and 0 and return undefined +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -88,4 +89,3 @@ if (shift !== undefined) { if (obj.length !== 0) { $ERROR('#12: var obj = {}; obj.length = new Number(0); obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T3.js index a2f6381e79..7f0c004f85 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T3.js - * @description The first element of the array is removed from the array and - * returned - */ +/*--- +info: > + The shift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.9_A2_T3 +description: > + The first element of the array is removed from the array and + returned +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -35,5 +36,4 @@ if (shift !== undefined) { //CHECK#3 if (obj.length !== 1) { $ERROR('#12: var obj = {}; obj.length = new Number(2); obj.shift = Array.prototype.shift; obj.shift(); obj.length === 1. Actual: ' + (obj.length)); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T4.js index 3fa3d40a81..fec01cc494 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T4.js - * @description The first element of the array is removed from the array and - * returned - */ +/*--- +info: > + The shift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.9_A2_T4 +description: > + The first element of the array is removed from the array and + returned +---*/ var obj = {}; obj["0"] = 0; @@ -49,4 +50,3 @@ if (shift !== undefined) { if (obj.length !== 0) { $ERROR('#6: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length = 1; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T5.js index 51bff21c0f..93643b9707 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T5.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A2_T5.js - * @description Operator use ToNumber from length. - * If Type(value) is Object, evaluate ToPrimitive(value, Number) - */ +/*--- +info: > + The shift function is intentionally generic. + It does not require that its this value be an Array object +es5id: 15.4.4.9_A2_T5 +description: > + Operator use ToNumber from length. If Type(value) is Object, + evaluate ToPrimitive(value, Number) +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -95,4 +96,3 @@ catch (e) { $ERROR('#8.2: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.shift() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T1.js index 030873f536..0d0ad97da3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T1.js - * @description length is arbitrarily - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.9_A3_T1 +description: length is arbitrarily +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -33,5 +32,4 @@ if (obj[0] !== "x") { //CHECK#4 if (obj[4294967295] !== "y") { $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.shift(); obj[4294967295] === "y". Actual: ' + (obj[4294967295])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T2.js index c3b37cd62a..d504fe515b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T2.js - * @description length is arbitrarily - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.9_A3_T2 +description: length is arbitrarily +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -39,5 +38,4 @@ if (obj[1] !== "y") { //CHECK#4 if (obj[4294967296] !== "z") { $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[1] = "y"; obj[4294967296] = "z"; obj.length = 4294967297; obj.shift(); obj[4294967296] === "z". Actual: ' + (obj[4294967296])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T3.js index 23243d7be4..92bd9acf94 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T3.js - * @description length is arbitrarily - */ +/*--- +info: Check ToUint32(length) for non Array objects +es5id: 15.4.4.9_A3_T3 +description: length is arbitrarily +---*/ var obj = {}; obj.shift = Array.prototype.shift; @@ -33,5 +32,4 @@ if (obj[0] !== "y") { //CHECK#4 if (obj[1] !== undefined) { $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x" obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[1] === undefined. Actual: ' + (obj[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T1.js index 7a3fed69e0..fc90c0e721 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.9_A4_T1 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = 1; var x = [0]; @@ -59,4 +60,3 @@ delete x.length; if (x.length !== 2) { $ERROR('#8: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); delete x; x.length === 2. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T2.js index e10ee72ec8..774f26febb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]], [[Delete]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A4_T2.js - * @description [[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype - */ +/*--- +info: "[[Get]], [[Delete]] from not an inherited property" +es5id: 15.4.4.9_A4_T2 +description: > + [[Prototype]] of Array instance is Array.prototype, [[Prototype] + of Array.prototype is Object.prototype +---*/ Array.prototype[1] = -1; var x = [0,1]; @@ -59,4 +60,3 @@ delete x.length; if (x.length !== 2) { $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); delete x; x.length === 2. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.1.js index d498bc5b14..3a6b4e08bb 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of shift has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of shift has the attribute DontEnum +es5id: 15.4.4.9_A5.1 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.shift.propertyIsEnumerable('length') !== false) { @@ -24,5 +23,3 @@ for (var p in Array.shift){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.shift) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.2.js index 8a8530b9ca..c6dcd5e48c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of shift has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of shift has the attribute DontDelete +es5id: 15.4.4.9_A5.2 +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.shift.hasOwnProperty('length') !== true) { @@ -24,6 +24,3 @@ if (Array.prototype.shift.hasOwnProperty('length') !== true) { if (Array.prototype.shift.length === undefined) { $ERROR('#3: delete Array.prototype.shift.length; Array.prototype.shift.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.3.js index 43c5409928..a126e00969 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of shift has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of shift has the attribute ReadOnly +es5id: 15.4.4.9_A5.3 +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.shift.length; @@ -15,5 +14,3 @@ Array.prototype.shift.length = Infinity; if (Array.prototype.shift.length !== x) { $ERROR('#1: x = Array.prototype.shift.length; Array.prototype.shift.length = Infinity; Array.prototype.shift.length === x. Actual: ' + (Array.prototype.shift.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.4.js index 6e7f519729..fcc6ab4ef3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of shift is 0 - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.4.js - * @description shift.length === 1 - */ +/*--- +info: The length property of shift is 0 +es5id: 15.4.4.9_A5.4 +description: shift.length === 1 +---*/ //CHECK#1 if (Array.prototype.shift.length !== 0) { $ERROR('#1: Array.prototype.shift.length === 0. Actual: ' + (Array.prototype.shift.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.5.js index b52477433d..b78bd52baa 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The shift property of Array has the attribute DontEnum +es5id: 15.4.4.9_A5.5 +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('shift') !== false) { @@ -24,5 +23,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "shift") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.6.js index c1e4ce641a..4c4043f92c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.6.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.6.js - * @description Checking Array.prototype.shift.prototype - */ +/*--- +info: The shift property of Array has not prototype property +es5id: 15.4.4.9_A5.6 +description: Checking Array.prototype.shift.prototype +---*/ //CHECK#1 if (Array.prototype.shift.prototype !== undefined) { $ERROR('#1: Array.prototype.shift.prototype === undefined. Actual: ' + (Array.prototype.shift.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.7.js index 24b8122a1a..47c6fc72fd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The shift property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The shift property of Array can't be used as constructor +es5id: 15.4.4.9_A5.7 +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +19,3 @@ try { $ERROR('#1.2: new Array.prototype.shift() throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T1.js index 1ccbc5151b..aeff0988d0 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of - * the Array prototype object is the Object prototype object - * - * @path ch15/15.4/15.4.4/S15.4.4_A1.1_T1.js - * @description Create new property of Function.prototype. When Array.prototype object has this property - */ +/*--- +info: > + The value of the internal [[Prototype]] property of + the Array prototype object is the Object prototype object +es5id: 15.4.4_A1.1_T1 +description: > + Create new property of Function.prototype. When Array.prototype + object has this property +---*/ Object.prototype.myproperty = 1; @@ -20,4 +22,3 @@ if (Array.prototype.myproperty !== 1) { if (Array.prototype.hasOwnProperty('myproperty') !== false) { $ERROR('#2: Object.prototype.myproperty = 1; Array.prototype.hasOwnProperty(\'myproperty\') === false. Actual: ' + (Array.prototype.hasOwnProperty('myproperty'))); } - diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T2.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T2.js index c24c92cfc3..e726ff8e12 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path ch15/15.4/15.4.4/S15.4.4_A1.1_T2.js - * @description The Array prototype object is itself an array; its [[Class]] is "Array", - */ +/*--- +es5id: 15.4.4_A1.1_T2 +description: > + The Array prototype object is itself an array; its [[Class]] is + "Array", +---*/ //CHECK#1 if (Object.prototype.toString.call(Array.prototype) !== "[object Array]") { $ERROR('The Array prototype object is itself an array; its' + '[[Class]] is "Array".'); } - diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T3.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T3.js index fe640adf17..86f9edf07e 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.1_T3.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of - * the Array prototype object is the Object prototype object - * - * @path ch15/15.4/15.4.4/S15.4.4_A1.1_T3.js - * @description Checking use isPrototypeOf - */ +/*--- +info: > + The value of the internal [[Prototype]] property of + the Array prototype object is the Object prototype object +es5id: 15.4.4_A1.1_T3 +description: Checking use isPrototypeOf +---*/ //CHECK#1 if (Object.prototype.isPrototypeOf(Array.prototype) !== true) { $ERROR('#1: Object.prototype.isPrototypeOf(Array.prototype) === true. Actual: ' + (Object.prototype.isPrototypeOf(Array.prototype))); } - diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.2_T1.js index 164069326c..0c9cccb559 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.2_T1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the Array prototype object is set to "Array" - * - * @path ch15/15.4/15.4.4/S15.4.4_A1.2_T1.js - * @description Checking use Object.prototype.toString - */ +/*--- +info: The [[Class]] property of the Array prototype object is set to "Array" +es5id: 15.4.4_A1.2_T1 +description: Checking use Object.prototype.toString +---*/ //CHECK#1 Array.prototype.getClass = Object.prototype.toString; if (Array.prototype.getClass() !== "[object " + "Array" + "]") { $ERROR('#1: Array.prototype.getClass = Object.prototype.toString; Array.prototype is Array object. Actual: ' + (Array.prototype.getClass())); } - diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.3_T1.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.3_T1.js index 41d9961faa..d8b242c816 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A1.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Array prototype object has length property whose value is +0 - * - * @path ch15/15.4/15.4.4/S15.4.4_A1.3_T1.js - * @description Array.prototype.length === 0 - */ +/*--- +info: Array prototype object has length property whose value is +0 +es5id: 15.4.4_A1.3_T1 +description: Array.prototype.length === 0 +---*/ //CHECK#1 if (Array.prototype.length !== 0) { @@ -15,6 +14,4 @@ if (Array.prototype.length !== 0) { if (1 / Array.prototype.length !== Number.POSITIVE_INFINITY) { $ERROR('#1.2: Array.prototype.length === +0. Actual: ' + (Array.prototype.length)); } -} - - +} diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T1.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T1.js index d8e5c49a6b..424ed2b6d6 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Array prototype object does not have a valueOf property of - * its own; however, it inherits the valueOf property from the valueOf - * property from the Object prototype Object - * - * @path ch15/15.4/15.4.4/S15.4.4_A2.1_T1.js - * @description Checking use hasOwnProperty - */ +/*--- +info: > + The Array prototype object does not have a valueOf property of + its own; however, it inherits the valueOf property from the valueOf + property from the Object prototype Object +es5id: 15.4.4_A2.1_T1 +description: Checking use hasOwnProperty +---*/ //CHECK#1 if (Array.prototype.hasOwnProperty('valueOf') !== false) { $ERROR('#1: Array.prototype.hasOwnProperty(\'valueOf\') === false. Actual: ' + (Array.prototype.hasOwnProperty('valueOf'))); } - diff --git a/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T2.js b/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T2.js index 0fb1ba003a..54d9e48474 100644 --- a/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/S15.4.4_A2.1_T2.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Array prototype object does not have a valueOf property of - * its own; however, it inherits the valueOf property from the valueOf - * property from the Object prototype Object - * - * @path ch15/15.4/15.4.4/S15.4.4_A2.1_T2.js - * @description Change valueOf property of Object.prototype. When Array.prototype.valueOf also change - */ +/*--- +info: > + The Array prototype object does not have a valueOf property of + its own; however, it inherits the valueOf property from the valueOf + property from the Object prototype Object +es5id: 15.4.4_A2.1_T2 +description: > + Change valueOf property of Object.prototype. When + Array.prototype.valueOf also change +---*/ Object.prototype.valueOf = 1; @@ -22,4 +24,3 @@ var x = new Array(); if (x.valueOf !== 1) { $ERROR('#1: Object.prototype.valueOf = 1; x = new Array(); x.valueOf === 1. Actual: ' + (x.valueOf)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5-1.js b/test/suite/ch15/15.4/15.4.5/15.4.5-1.js index 1b0620d580..1a19ecc22a 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5-1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5-1.js @@ -1,19 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.5/15.4.5-1.js - * @description Array instances have [[Class]] set to 'Array' - */ - - -function testcase() { - var a = []; - var s = Object.prototype.toString.call(a); - if (s === '[object Array]') { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.5-1 +description: Array instances have [[Class]] set to 'Array' +includes: [runTestCase.js] +---*/ + +function testcase() { + var a = []; + var s = Object.prototype.toString.call(a); + if (s === '[object Array]') { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js index dca90cd265..7b3578bb76 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js - * @description Throw RangeError if attempt to set array length property to 4294967296 (2**32) - */ - - -function testcase() { - try { - [].length = 4294967296 ; - } catch (e) { - if (e instanceof RangeError) return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.5.1-3.d-1 +description: > + Throw RangeError if attempt to set array length property to + 4294967296 (2**32) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + [].length = 4294967296 ; + } catch (e) { + if (e instanceof RangeError) return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js index e6806076a3..363ca00611 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js - * @description Throw RangeError if attempt to set array length property to 4294967297 (1+2**32) - */ - - -function testcase() { - try { - [].length = 4294967297 ; - } catch (e) { - if (e instanceof RangeError) return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.5.1-3.d-2 +description: > + Throw RangeError if attempt to set array length property to + 4294967297 (1+2**32) +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + [].length = 4294967297 ; + } catch (e) { + if (e instanceof RangeError) return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js index 73bbed31ec..cde765a317 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js - * @description Set array length property to max value 4294967295 (2**32-1,) - */ - - -function testcase() { - var a =[]; - a.length = 4294967295 ; - return a.length===4294967295 ; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.5.1-3.d-3 +description: Set array length property to max value 4294967295 (2**32-1,) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a =[]; + a.length = 4294967295 ; + return a.length===4294967295 ; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js index b4be081e52..1843c930e0 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js - * @description Defining a property named 4294967295 (2**32-1)(not an array element) - */ - - -function testcase() { - var a =[]; - a[4294967295] = "not an array element" ; - return a[4294967295] === "not an array element"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.5.1-5-1 +description: > + Defining a property named 4294967295 (2**32-1)(not an array + element) +includes: [runTestCase.js] +---*/ + +function testcase() { + var a =[]; + a[4294967295] = "not an array element" ; + return a[4294967295] === "not an array element"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js index 5100aa8adc..39bf7be2cf 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js - * @description Defining a property named 4294967295 (2**32-1) doesn't change length of the array - */ - - -function testcase() { - var a =[0,1,2]; - a[4294967295] = "not an array element" ; - return a.length===3; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.4.5.1-5-2 +description: > + Defining a property named 4294967295 (2**32-1) doesn't change + length of the array +includes: [runTestCase.js] +---*/ + +function testcase() { + var a =[0,1,2]; + a[4294967295] = "not an array element" ; + return a.length===3; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T1.js index 109ffa0e02..e9954989e6 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToUint32(length) !== ToNumber(length), throw RangeError - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T1.js - * @description length in [4294967296, -1, 1.5] - */ +/*--- +info: If ToUint32(length) !== ToNumber(length), throw RangeError +es5id: 15.4.5.1_A1.1_T1 +description: length in [4294967296, -1, 1.5] +---*/ //CHECK#1 try { @@ -40,4 +39,3 @@ try { $ERROR('#3.2: x = []; x.length = 1.5 throw RangeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T2.js index 1e88397491..182ded007d 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToUint32(length) !== ToNumber(length), throw RangeError - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.1_T2.js - * @description length in [NaN, Infinity, -Infinity, undefined] - */ +/*--- +info: If ToUint32(length) !== ToNumber(length), throw RangeError +es5id: 15.4.5.1_A1.1_T2 +description: length in [NaN, Infinity, -Infinity, undefined] +---*/ //CHECK#1 try { @@ -51,4 +50,3 @@ try { $ERROR('#4.2: x = []; x.length = undefined throw RangeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T1.js index c85204eef9..bb4f28a10f 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * For every integer k that is less than the value of - * the length property of A but not less than ToUint32(length), - * if A itself has a property (not an inherited property) named ToString(k), - * then delete that property - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T1.js - * @description Change length of array - */ +/*--- +info: > + For every integer k that is less than the value of + the length property of A but not less than ToUint32(length), + if A itself has a property (not an inherited property) named ToString(k), + then delete that property +es5id: 15.4.5.1_A1.2_T1 +description: Change length of array +---*/ //CHECK#1 var x = [0,,2,,4]; @@ -28,4 +28,3 @@ if (x[3] !== undefined) { if (x[2] !== 2) { $ERROR('#3: x = [0,,2,,4]; x.length = 4; x.length = 3; x[2] === 2. Actual: ' + (x[2])); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T2.js index 7051e96f09..f0dda30d62 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * For every integer k that is less than the value of - * the length property of A but not less than ToUint32(length), - * if A itself has a property (not an inherited property) named ToString(k), - * then delete that property - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T2.js - * @description Checking an inherited property - */ +/*--- +info: > + For every integer k that is less than the value of + the length property of A but not less than ToUint32(length), + if A itself has a property (not an inherited property) named ToString(k), + then delete that property +es5id: 15.4.5.1_A1.2_T2 +description: Checking an inherited property +---*/ //CHECK#1 Array.prototype[2] = -1; @@ -23,4 +23,3 @@ x.length = 2; if (x[2] !== -1) { $ERROR('#2: Array.prototype[2] = -1; x = [0,1,3]; x.length = 2; x[2] === -1. Actual: ' + (x[2])); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T3.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T3.js index 85dd3cc1be..aeecd05cd8 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T3.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T3.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * For every integer k that is less than the value of - * the length property of A but not less than ToUint32(length), - * if A itself has a property (not an inherited property) named ToString(k), - * then delete that property - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.2_T3.js - * @description Checking an inherited property - */ +/*--- +info: > + For every integer k that is less than the value of + the length property of A but not less than ToUint32(length), + if A itself has a property (not an inherited property) named ToString(k), + then delete that property +es5id: 15.4.5.1_A1.2_T3 +description: Checking an inherited property +---*/ //CHECK#1 Array.prototype[2] = 2; @@ -24,4 +24,3 @@ x.length = 2; if (x[2] !== 2) { $ERROR('#2: Array.prototype[2] = 2; x = [0,1]; x.length = 3; x.length = 2; x[2] === 2. Actual: ' + (x[2])); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T1.js index c771b97424..d83856949c 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Set the value of property length of A to Uint32(length) - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T1.js - * @description length is object or primitve - */ +/*--- +info: Set the value of property length of A to Uint32(length) +es5id: 15.4.5.1_A1.3_T1 +description: length is object or primitve +---*/ //CHECK#1 var x = []; @@ -49,4 +48,3 @@ x.length = new String("1"); if (x.length !== 1) { $ERROR('#6: x = []; x.length = new String("1"); x.length === 1. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T2.js index ad9b748452..e859e7e811 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Set the value of property length of A to Uint32(length) - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A1.3_T2.js - * @description Uint32 use ToNumber and ToPrimitve - */ +/*--- +info: Set the value of property length of A to Uint32(length) +es5id: 15.4.5.1_A1.3_T2 +description: Uint32 use ToNumber and ToPrimitve +---*/ //CHECK#1 var x = []; @@ -84,4 +83,3 @@ catch (e) { $ERROR('#8.2: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return {}}} x.length throw TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.1_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.1_T1.js index a1d805c34d..859c2f2322 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If P is not an array index, return - * (Create a property with name P, set its value to V and give it empty attributes) - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.1_T1.js - * @description P in [4294967295, -1, true] - */ +/*--- +info: > + If P is not an array index, return + (Create a property with name P, set its value to V and give it empty attributes) +es5id: 15.4.5.1_A2.1_T1 +description: P in [4294967295, -1, true] +---*/ //CHECK#1 var x = []; @@ -41,4 +41,3 @@ if (x.length !== 0) { if (x[true] !== 1) { $ERROR('#3.2: x = []; x[true] = 1; x[true] === 1. Actual: ' + (x[true])); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.2_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.2_T1.js index cbb9dbe61c..555423f8b7 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToUint32(P) is less than the value of - * the length property of A, then return - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.2_T1.js - * @description length === 100, P in [0, 98, 99] - */ +/*--- +info: > + If ToUint32(P) is less than the value of + the length property of A, then return +es5id: 15.4.5.1_A2.2_T1 +description: length === 100, P in [0, 98, 99] +---*/ //CHECK#1 var x = Array(100); @@ -27,4 +27,3 @@ x[99] = 1; if (x.length !== 100) { $ERROR('#3: x = Array(100); x[0] = 1; x[98] = 1; x[99] = 1; x.length === 100. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.3_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.3_T1.js index 42e13f3924..b4763a38d6 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.3_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.3_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If ToUint32(P) is less than the value of - * the length property of A, change (or set) length to ToUint32(P)+1 - * - * @path ch15/15.4/15.4.5/15.4.5.1/S15.4.5.1_A2.3_T1.js - * @description length = 100, P in [100, 199] - */ +/*--- +info: > + If ToUint32(P) is less than the value of + the length property of A, change (or set) length to ToUint32(P)+1 +es5id: 15.4.5.1_A2.3_T1 +description: length = 100, P in [100, 199] +---*/ //CHECK#1 var x = Array(100); @@ -21,4 +21,3 @@ x[199] = 1; if (x.length !== 200) { $ERROR('#2: x = Array(100); x[100] = 1; x[199] = 1; x.length === 100. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T1.js index b34c630f18..2e8a50e5d7 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every Array object has a length property whose value is - * always a nonnegative integer less than 2^32. The value of the length property is - * numerically greater than the name of every property whose name is an array index - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T1.js - * @description Checking boundary points - */ +/*--- +info: > + Every Array object has a length property whose value is + always a nonnegative integer less than 2^32. The value of the length property is + numerically greater than the name of every property whose name is an array index +es5id: 15.4.5.2_A1_T1 +description: Checking boundary points +---*/ //CHECK#1 var x = []; @@ -39,4 +39,3 @@ x[4294967294] = 1; if (x.length !== 4294967295) { $ERROR('#5: x = []; x[0] = 1; x[1] = 1; x[2147483648] = 1; x[42949672954] = 1; x.length === 4294967295. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T2.js index d6ecd91c53..6b745d6e03 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Every Array object has a length property whose value is - * always a nonnegative integer less than 2^32. The value of the length property is - * numerically greater than the name of every property whose name is an array index - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A1_T2.js - * @description P = "2^32 - 1" is not index array - */ +/*--- +info: > + Every Array object has a length property whose value is + always a nonnegative integer less than 2^32. The value of the length property is + numerically greater than the name of every property whose name is an array index +es5id: 15.4.5.2_A1_T2 +description: P = "2^32 - 1" is not index array +---*/ //CHECK#1 var x = []; @@ -24,4 +24,3 @@ y[4294967295] = 1; if (y.length !== 2) { $ERROR('#2: y = []; y[1] = 1; y[4294967295] = 1; y.length === 2. Actual: ' + (y.length)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A2_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A2_T1.js index 5a892bfadc..ecaa8d30d0 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If a property is added whose name is an array index, - * the length property is changed - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A2_T1.js - * @description Checking length property - */ +/*--- +info: > + If a property is added whose name is an array index, + the length property is changed +es5id: 15.4.5.2_A2_T1 +description: Checking length property +---*/ //CHECK#1 var x = []; @@ -32,4 +32,3 @@ x[9] = 1; if (x.length !== 10) { $ERROR('#4: x = []; x[0] = 1; x[1] = 1; x[9] = 1; x.length === 10. Actual: ' + (x.length)); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T1.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T1.js index acffcd289f..3f6544d0bc 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the length property is changed, every property whose name - * is an array index whose value is not smaller than the new length is automatically deleted - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T1.js - * @description If new length greater than the name of every property whose name - * is an array index - */ +/*--- +info: > + If the length property is changed, every property whose name + is an array index whose value is not smaller than the new length is automatically deleted +es5id: 15.4.5.2_A3_T1 +description: > + If new length greater than the name of every property whose name + is an array index +---*/ //CHECK#1 var x = []; @@ -28,4 +29,3 @@ if (x.length !== 10) { if (x[5] !== 1) { $ERROR('#3: x = []; x.length = 1; x[5] = 1; x.length = 10; x[5] = 1'); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T2.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T2.js index 27b66f2dfb..c9896b15da 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the length property is changed, every property whose name - * is an array index whose value is not smaller than the new length is automatically deleted - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T2.js - * @description If new length greater than the name of every property whose name - * is an array index - */ +/*--- +info: > + If the length property is changed, every property whose name + is an array index whose value is not smaller than the new length is automatically deleted +es5id: 15.4.5.2_A3_T2 +description: > + If new length greater than the name of every property whose name + is an array index +---*/ //CHECK#1 var x = []; @@ -47,4 +48,3 @@ x.length = 1; if (x[1] !== undefined) { $ERROR('#6: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x.length = 0; x.length = 1; x[1] === undefined. Actual: ' + (x[1])); } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T3.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T3.js index fc1c479b2d..74c844aedd 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the length property is changed, every property whose name - * is an array index whose value is not smaller than the new length is automatically deleted - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T3.js - * @description [[Put]] (length, 4294967296) - */ +/*--- +info: > + If the length property is changed, every property whose name + is an array index whose value is not smaller than the new length is automatically deleted +es5id: 15.4.5.2_A3_T3 +description: "[[Put]] (length, 4294967296)" +---*/ //CHECK#1 var x = []; @@ -26,4 +26,3 @@ try { $ERROR('#2.2: x = []; x.length = 4294967296 throw RangeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T4.js b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T4.js index 124de64dce..247e388dc5 100644 --- a/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T4.js +++ b/test/suite/ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If the length property is changed, every property whose name - * is an array index whose value is not smaller than the new length is automatically deleted - * - * @path ch15/15.4/15.4.5/15.4.5.2/S15.4.5.2_A3_T4.js - * @description If new length greater than the name of every property whose name - * is an array index - */ +/*--- +info: > + If the length property is changed, every property whose name + is an array index whose value is not smaller than the new length is automatically deleted +es5id: 15.4.5.2_A3_T4 +description: > + If new length greater than the name of every property whose name + is an array index +---*/ //CHECK#1 var x = [0,1,2]; @@ -34,5 +35,3 @@ if (x[2] !== undefined) { if (x[4294967294] !== undefined) { $ERROR('#4: x = [0,1,2]; x[4294967294] = 4294967294; x.length = 2; x[4294967294] === undefined. Actual: ' + (x[4294967294])); } - - diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T1.js b/test/suite/ch15/15.4/S15.4_A1.1_T1.js index d6873033b4..3fd7c9779e 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T1.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T1.js - * @description Checking for boolean primitive - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T1 +description: Checking for boolean primitive +---*/ //CHECK#1 x = []; @@ -31,4 +31,3 @@ if (x[0] !== undefined) { if (x["false"] !== 0) { $ERROR('#4: x = []; x[false] = 1; x["false"] === 0. Actual: ' + (x["false"])); } - diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T10.js b/test/suite/ch15/15.4/S15.4_A1.1_T10.js index 079051c04c..91a5103074 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T10.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T10.js - * @description Array index is power of two - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T10 +description: Array index is power of two +---*/ //CHECK# x = []; @@ -24,4 +24,3 @@ for (i = 0; i < 32; i++) { $ERROR('#' + (k - 2) + ': '); } } - diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T2.js b/test/suite/ch15/15.4/S15.4_A1.1_T2.js index d3392a9212..a6e2459626 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T2.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T2.js - * @description Checking for number primitive - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T2 +description: Checking for number primitive +---*/ //CHECK#1 x = []; @@ -43,6 +43,4 @@ if (z[0] !== undefined) { //CHECK#6 if (z["-Infinity"] !== 1) { $ERROR('#6: z = []; z[Number.NEGATIVE_INFINITY] = 1; z["-Infinity"] === 1. Actual: ' + (z["-Infinity"])); -} - - +} diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T3.js b/test/suite/ch15/15.4/S15.4_A1.1_T3.js index e9b576d837..382ab241ba 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T3.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T3.js - * @description Checking for number primitive - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T3 +description: Checking for number primitive +---*/ //CHECK#1 x = []; @@ -43,5 +43,4 @@ if (z[1] !== undefined) { //CHECK#6 if (z["1.1"] !== 1) { $ERROR('#6: z = []; z[1.1] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); -} - +} diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T4.js b/test/suite/ch15/15.4/S15.4_A1.1_T4.js index c0e937c226..6a68ca903a 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T4.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T4.js - * @description Checking for string primitive - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T4 +description: Checking for string primitive +---*/ //CHECK#1 x = []; @@ -22,5 +22,3 @@ y["1"] = 1; if (y[1] !== 1) { $ERROR('#2: y = []; y["1"] = 1; y[1] === 1. Actual: ' + (y[1])); } - - diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T5.js b/test/suite/ch15/15.4/S15.4_A1.1_T5.js index e188d2235c..e7a26ac316 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T5.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T5.js - * @description Checking for null and undefined - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T5 +description: Checking for null and undefined +---*/ //CHECK#1 x = []; @@ -32,4 +32,3 @@ if (y[0] !== undefined) { if (y["undefined"] !== 0) { $ERROR('#4: y = []; y[undefined] = 1; y["undefined"] === 0. Actual: ' + (y["undefined"])); } - diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T6.js b/test/suite/ch15/15.4/S15.4_A1.1_T6.js index 058a059a3b..350a227898 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T6.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T6.js - * @description Checking for Boolean object - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T6 +description: Checking for Boolean object +---*/ //CHECK#1 x = []; @@ -31,5 +31,3 @@ if (x[0] !== undefined) { if (x["false"] !== 0) { $ERROR('#4: x = []; x[false] = 1; x["false"] === 0. Actual: ' + (x["false"])); } - - diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T7.js b/test/suite/ch15/15.4/S15.4_A1.1_T7.js index 36582886d4..cbd0d09b0b 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T7.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T7.js - * @description Checking for Number object - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T7 +description: Checking for Number object +---*/ //CHECK#1 x = []; @@ -28,5 +28,4 @@ z = []; z[new Number(1.1)] = 1; if (z["1.1"] !== 1) { $ERROR('#3: z = []; z[new Number(1.1)] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); -} - +} diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T8.js b/test/suite/ch15/15.4/S15.4_A1.1_T8.js index 6777730d1b..1bb197a7ba 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T8.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T8.js - * @description Checking for Number object - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T8 +description: Checking for Number object +---*/ //CHECK#1 x = []; @@ -28,5 +28,4 @@ z = []; z[new String("1.1")] = 1; if (z["1.1"] !== 1) { $ERROR('#3: z = []; z[new String("1.1")] = 1; z["1.1"] === 1. Actual: ' + (z["1.1"])); -} - +} diff --git a/test/suite/ch15/15.4/S15.4_A1.1_T9.js b/test/suite/ch15/15.4/S15.4_A1.1_T9.js index 61e1b8eed5..1a609745d4 100644 --- a/test/suite/ch15/15.4/S15.4_A1.1_T9.js +++ b/test/suite/ch15/15.4/S15.4_A1.1_T9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * A property name P (in the form of a string value) is an array index - * if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 - * - * @path ch15/15.4/S15.4_A1.1_T9.js - * @description If Type(value) is Object, evaluate ToPrimitive(value, String) - */ +/*--- +info: > + A property name P (in the form of a string value) is an array index + if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32 - 1 +es5id: 15.4_A1.1_T9 +description: If Type(value) is Object, evaluate ToPrimitive(value, String) +---*/ //CHECK#1 x = []; @@ -90,5 +90,4 @@ catch (e) { if ((e instanceof TypeError) !== true) { $ERROR('#8.2: x = []; var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x[object] throw TypeError. Actual: ' + (e)); } -} - +} diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T1.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T1.js index d9f82eac17..76cef1148b 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T1.js - * @description Call String(function(){}()) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T1 +description: Call String(function(){}()) +---*/ var __str = String(function(){}()); @@ -25,4 +26,3 @@ if (__str !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T10.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T10.js index a093b43265..136e97a8ef 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T10.js - * @description Call String(1) and String(-1) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T10 +description: Call String(1) and String(-1) +---*/ var __str = String(1); @@ -43,4 +44,3 @@ if (__str !== "-1") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T11.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T11.js index 5f3e116b7f..c6d12cf842 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T11.js - * @description Call String(1/0) and String(-1/0), and call with +/-Infinity - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T11 +description: Call String(1/0) and String(-1/0), and call with +/-Infinity +---*/ var __str = String(1/0); @@ -115,4 +116,3 @@ if (__str !== "-Infinity") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T12.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T12.js index 8e47c235f3..4fd1402f3b 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T12.js - * @description Call String(1/"a"), String("b"* null) and String(Number.NaN) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T12 +description: Call String(1/"a"), String("b"* null) and String(Number.NaN) +---*/ var __str = String(1/"a"); @@ -61,4 +62,3 @@ if (__str !== "NaN") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T13.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T13.js index 32557ea226..006ad7bdb3 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T13.js - * @description Call String(true) and String(false) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T13 +description: Call String(true) and String(false) +---*/ var __str = String(true); @@ -79,4 +80,3 @@ if (__str !== "false") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T14.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T14.js index f361a09269..02bc775394 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T14.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T14.js - * @description Call String(0) and String(-0) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T14 +description: Call String(0) and String(-0) +---*/ var __str = String(0); @@ -43,4 +44,3 @@ if (__str !== "0") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T15.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T15.js index 0dd28d7431..03c0885015 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T15.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T15.js - * @description Call String(string_object) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T15 +description: Call String(string_object) +---*/ var __obj__str = "caps"; @@ -21,4 +22,3 @@ if (__str !== __obj__str) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T16.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T16.js index dff10bbf5c..f98bfb5ab1 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T16.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T16.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T16.js - * @description Call String() with .12345 and analogous numbers - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T16 +description: Call String() with .12345 and analogous numbers +---*/ var __str = String(.12345); @@ -79,4 +80,3 @@ if (__str !== "1.2345e-7") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T17.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T17.js index 7767f2b0b9..4cd2d5981f 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T17.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T17.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T17.js - * @description Call String() with numbers that have more than 1 significant digit after point - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T17 +description: > + Call String() with numbers that have more than 1 significant digit + after point +---*/ var __str = String(1.2345); @@ -61,4 +64,3 @@ if (__str !== "1.2345") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T18.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T18.js index 7305b692e1..e67ff4e04d 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T18.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T18.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T18.js - * @description Call String() with numbers that have more than 1 significant digit - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T18 +description: Call String() with numbers that have more than 1 significant digit +---*/ __str = String(1000000000000000000000); @@ -43,4 +44,3 @@ if (__str !== "1e+22") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T19.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T19.js index fff76aea8c..6bd802b4a1 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T19.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T19.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T19.js - * @description Call String() with Array of numbers - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T19 +description: Call String() with Array of numbers +---*/ var __str = String(new Array(1,2,3)); @@ -25,4 +26,3 @@ if (__str !== "1,2,3") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T2.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T2.js index e8b294dedd..08bdbaae50 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T2.js - * @description Call String(null) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T2 +description: Call String(null) +---*/ var __str = String(null); @@ -25,4 +26,3 @@ if (__str !== "null") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T3.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T3.js index 72db1f7797..ad4bdaa94d 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T3.js - * @description Call String(void 0) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T3 +description: Call String(void 0) +---*/ var __str = String(void 0); @@ -25,4 +26,3 @@ if (__str !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T4.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T4.js index b72214eaf8..e1291f394d 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T4.js - * @description Call String(undefined) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T4 +description: Call String(undefined) +---*/ var __str = String(undefined); @@ -25,4 +26,3 @@ if (__str !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T5.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T5.js index f801ea03a6..317d6e8ead 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T5.js - * @description Call String(x), where x is undefined variable - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T5 +description: Call String(x), where x is undefined variable +---*/ var __str = String(x); @@ -27,4 +28,3 @@ if (__str !== "undefined") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T6.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T6.js index f753c374eb..8876750782 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T6.js - * @description Checking by using eval, Call String(eval()); - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T6 +description: Checking by using eval, Call String(eval()); +---*/ var __str = String(eval()); @@ -25,4 +26,3 @@ if (__str !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T7.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T7.js index 2c1d0b526d..5859831d65 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T7.js - * @description Call String({}) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T7 +description: Call String({}) +---*/ var __str = String({}); @@ -25,4 +26,3 @@ if (__str !== "[object "+"Object"+"]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T8.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T8.js index 333d6d971e..7baaf9e496 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T8.js - * @description Call String(new Array) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T8 +description: Call String(new Array) +---*/ var __old__Array__prototype__toString = Array.prototype.toString; @@ -32,4 +33,3 @@ if (__str !== "__ARRAY__") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T9.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T9.js index c1bebf7692..9c76f9998d 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String is called as a function rather than as a constructor, it performs a type conversion - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A1_T9.js - * @description Call String(this) - */ +/*--- +info: > + When String is called as a function rather than as a constructor, it + performs a type conversion +es5id: 15.5.1.1_A1_T9 +description: Call String(this) +---*/ var toString=function(){return "__THIS__";}; @@ -27,4 +28,3 @@ if (__str !== "__THIS__") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A2_T1.js b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A2_T1.js index 6e866d4107..2c395acf32 100644 --- a/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.1/S15.5.1.1_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If value is not supplied, the empty string "" is returned - * - * @path ch15/15.5/15.5.1/S15.5.1.1_A2_T1.js - * @description Call String() - */ +/*--- +info: If value is not supplied, the empty string "" is returned +es5id: 15.5.1.1_A2_T1 +description: Call String() +---*/ var __str = String(); @@ -25,4 +24,3 @@ if (__str !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T1.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T1.js index ffb6f0899b..425a6ddb28 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T1.js - * @description Creating string object with expression "new String" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T1 +description: Creating string object with expression "new String" +---*/ var __str = new String; @@ -42,4 +42,3 @@ if ( __str === "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T10.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T10.js index 39144a8637..5917c788d9 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T10.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T10.js - * @description Creating string object with "new String(function object)" as the function object's prototype.toString property was changed - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T10 +description: > + Creating string object with "new String(function object)" as the + function object's prototype.toString property was changed +---*/ function __FACTORY(){}; @@ -40,4 +42,3 @@ if (__str != "tostr") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T11.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T11.js index 2e8dc240f9..d4b18339fc 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T11.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T11.js - * @description Creating string object with "new String(function object)" after changing function object's valueOf and toString properties - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T11 +description: > + Creating string object with "new String(function object)" after + changing function object's valueOf and toString properties +---*/ function __obj(){}; @@ -42,4 +44,3 @@ if (__str !="true") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T12.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T12.js index 24a5e9ee27..d72a2baee1 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T12.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T12.js - * @description Creating string object with "new String(function object)", after changing the function object toString property, which causes exception throw - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T12 +description: > + Creating string object with "new String(function object)", after + changing the function object toString property, which causes + exception throw +---*/ var __obj = {toString:function(){throw "intostr"}}; @@ -25,6 +28,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T13.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T13.js index 12297a0f9e..0de8fa57bc 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T13.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T13.js - * @description Creating string object with "new String(function object)" after changing function object's valueOf property, which causes exception throw - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T13 +description: > + Creating string object with "new String(function object)" after + changing function object's valueOf property, which causes + exception throw +---*/ var __obj = {toString:function(){return f; function f(){}}}; @@ -25,6 +28,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T16.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T16.js index 57e39eaa3e..8f424357c2 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T16.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T16.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T16.js - * @description Creating string object with "new String()" initialized with .12345 and other numbers - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T16 +description: > + Creating string object with "new String()" initialized with .12345 + and other numbers +---*/ __str =new String(.12345); ////////////////////////////////////////////////////////////////////////////// @@ -108,4 +110,3 @@ if (__str !="1.2345e-7") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T17.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T17.js index d6a1fd2aa7..3e732e7499 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T17.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T17.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T17.js - * @description Creating string object with "new String()" initialized with numbers that have more than 1 significant digit following the point - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T17 +description: > + Creating string object with "new String()" initialized with + numbers that have more than 1 significant digit following the point +---*/ var __str = new String(1.2345); ////////////////////////////////////////////////////////////////////////////// @@ -83,4 +85,3 @@ if (__str !="1.2345") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T18.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T18.js index dbb1f445ba..e38de19e68 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T18.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T18.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T18.js - * @description Create string object with "new String()" initialized with numbers that have more than 1 significant digit - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T18 +description: > + Create string object with "new String()" initialized with numbers + that have more than 1 significant digit +---*/ var __str = new String(1000000000000000000000); ////////////////////////////////////////////////////////////////////////////// @@ -58,4 +60,3 @@ if (__str !="1e+22") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T19.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T19.js index 8a6a2a8af5..8fb24c209f 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T19.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T19.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T19.js - * @description Creating string object with "new String()" initialized with Array of numbers - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T19 +description: > + Creating string object with "new String()" initialized with Array + of numbers +---*/ var __str = new String(new Array(1,2,3)); ////////////////////////////////////////////////////////////////////////////// @@ -33,4 +35,3 @@ if (__str !="1,2,3") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T2.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T2.js index e1f42859ee..94cb58841b 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T2.js - * @description Creating string object with "new String()" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T2 +description: Creating string object with "new String()" +---*/ var __str = new String(); @@ -42,4 +42,3 @@ if ( __str === "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T3.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T3.js index 0479539af3..5d574748ff 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T3.js - * @description Creating string object with "new String("")" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T3 +description: Creating string object with "new String("")" +---*/ var __str = new String(""); @@ -42,4 +42,3 @@ if ( __str === "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T4.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T4.js index 776c4ecac4..41afd7d0a7 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T4.js - * @description Create string object with "new String(1.0)" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T4 +description: Create string object with "new String(1.0)" +---*/ var __str = new String(1.0); @@ -34,4 +34,3 @@ if (__str !=1.0+"") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T5.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T5.js index 08cebc9c0c..55b9007bae 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T5.js - * @description Creating string object with "new String(NaN)" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T5 +description: Creating string object with "new String(NaN)" +---*/ var __str = new String(NaN); @@ -34,4 +34,3 @@ if (__str !=(1/"s")+"") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T6.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T6.js index f185552b24..e475aec1dc 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T6.js - * @description Creating string object with "new String(false)" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T6 +description: Creating string object with "new String(false)" +---*/ var __str = new String(false); @@ -34,4 +34,3 @@ if (__str !=false+"") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T7.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T7.js index 6393b30cb5..fb4500086d 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T7.js - * @description Creating string object with "new String({})" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T7 +description: Creating string object with "new String({})" +---*/ var __stored__Object__prototype__toString = Object.prototype.toString; @@ -40,4 +40,3 @@ if (__str !="SHIFTED") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T8.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T8.js index c5876c7d66..f1915aba12 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T8.js - * @description Creating string object with "new String(function(){})" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T8 +description: Creating string object with "new String(function(){})" +---*/ var __stored__Function__prototype__toString = Function.prototype.toString; @@ -40,4 +40,3 @@ if (__str !="SHIFTED") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T9.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T9.js index f3139e45f0..2408124cdd 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A1_T9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and - * The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A1_T9.js - * @description Creating string object with "new String(function(){return [1,2,3]}())" - */ +/*--- +info: > + When "String" is called as part of a new expression, it is a constructor: it initialises the newly created object and + The [[Value]] property of the newly constructed object is set to ToString(value), or to the empty string if value is not supplied +es5id: 15.5.2.1_A1_T9 +description: > + Creating string object with "new String(function(){return + [1,2,3]}())" +---*/ var __str = new String(function(){return [1,2,3]}()); @@ -34,4 +36,3 @@ if (__str !="1,2,3") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T1.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T1.js index 2a6e024fbb..bdfdc767c3 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object is set to the original String prototype object - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A2_T1.js - * @description Creating string object with "new String(string)" to check prototype - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object is set to the + original String prototype object +es5id: 15.5.2.1_A2_T1 +description: Creating string object with "new String(string)" to check prototype +---*/ var __str__obj = new String("abba"); @@ -17,6 +18,3 @@ if (!(String.prototype.isPrototypeOf(__str__obj))) { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T2.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T2.js index 0387967231..510b87d797 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A2_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object is set to the original String prototype object - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A2_T2.js - * @description Creating string object with "new String(string)" adding custom property - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object is set to the + original String prototype object +es5id: 15.5.2.1_A2_T2 +description: > + Creating string object with "new String(string)" adding custom + property +---*/ var __str__obj = new String("shocking blue"); @@ -27,6 +30,3 @@ if (__str__obj["__custom__prop"]!=="bor") { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A3.js b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A3.js index 189d30a647..fa3bdafb87 100644 --- a/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A3.js +++ b/test/suite/ch15/15.5/15.5.2/S15.5.2.1_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object is set to "String" - * - * @path ch15/15.5/15.5.2/S15.5.2.1_A3.js - * @description Creating string object with "new String(string)" and changing toString property to Object.prototype.toString - */ +/*--- +info: The [[Class]] property of the newly constructed object is set to "String" +es5id: 15.5.2.1_A3 +description: > + Creating string object with "new String(string)" and changing + toString property to Object.prototype.toString +---*/ var __str__obj = new String("seamaid"); @@ -19,5 +20,3 @@ if (__str__obj.toString() !== "[object "+"String"+"]") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A1.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A1.js index 4540111570..0c621f1e37 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A1.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String has property prototype - * - * @path ch15/15.5/15.5.3/S15.5.3.1_A1.js - * @description Checking String.hasOwnProperty('prototype') - */ +/*--- +info: The String has property prototype +es5id: 15.5.3.1_A1 +description: Checking String.hasOwnProperty('prototype') +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,5 +14,3 @@ if (!(String.hasOwnProperty('prototype'))) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A2.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A2.js index 792603838c..acb282a998 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A2.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype property has the attribute DontEnum - * - * @path ch15/15.5/15.5.3/S15.5.3.1_A2.js - * @description Checking if enumerating the String.prototype property fails - */ +/*--- +info: The String.prototype property has the attribute DontEnum +es5id: 15.5.3.1_A2 +description: Checking if enumerating the String.prototype property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -39,4 +39,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A3.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A3.js index 8f30173b93..df2cfcffad 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A3.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A3.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype property has the attribute DontDelete - * - * @path ch15/15.5/15.5.3/S15.5.3.1_A3.js - * @description Checking if deleting the String.prototype property fails - */ +/*--- +info: The String.prototype property has the attribute DontDelete +es5id: 15.5.3.1_A3 +description: Checking if deleting the String.prototype property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -25,4 +25,3 @@ if (!(String.hasOwnProperty('prototype'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A4.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A4.js index 165005d98d..0b7b94f267 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A4.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.1_A4.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.3/S15.5.3.1_A4.js - * @description Checking if varying the String.prototype property fails - */ +/*--- +info: The String.prototype property has the attribute ReadOnly +es5id: 15.5.3.1_A4 +description: Checking if varying the String.prototype property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +27,3 @@ if (String.prototype !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A1.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A1.js index 20346f4a93..0b9edd0cc7 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A1.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the fromCharCode function is 1 - * - * @path ch15/15.5/15.5.3/S15.5.3.2_A1.js - * @description Checking String.fromCharCode.length - */ +/*--- +info: The length property of the fromCharCode function is 1 +es5id: 15.5.3.2_A1 +description: Checking String.fromCharCode.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -31,5 +30,3 @@ if (String.fromCharCode.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A2.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A2.js index 889136d04e..9fbae6ddcf 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A2.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.fromCharCode () returns empty string - * - * @path ch15/15.5/15.5.3/S15.5.3.2_A2.js - * @description Call String.fromCharCode() - */ +/*--- +info: String.fromCharCode () returns empty string +es5id: 15.5.3.2_A2 +description: Call String.fromCharCode() +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,5 +14,3 @@ if (String.fromCharCode() !== "") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T1.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T1.js index 4afacb8a9a..8c394c8515 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.fromCharCode ( [ char0 [ , char1 [ , ... ] ] ] ) - * - * @path ch15/15.5/15.5.3/S15.5.3.2_A3_T1.js - * @description Call String.fromCharCode(65,66,66,65) - */ +/*--- +info: String.fromCharCode ( [ char0 [ , char1 [ , ... ] ] ] ) +es5id: 15.5.3.2_A3_T1 +description: Call String.fromCharCode(65,66,66,65) +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,5 +14,3 @@ if (String.fromCharCode(65,66,66,65) !== "ABBA") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T2.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T2.js index 4018dabae0..f13e04fe7f 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.fromCharCode ( [ char0 [ , char1 [ , ... ] ] ] ) - * - * @path ch15/15.5/15.5.3/S15.5.3.2_A3_T2.js - * @description Create function variable, that equal String.fromCharCode, delete original String.fromCharCode and use created variable - */ +/*--- +info: String.fromCharCode ( [ char0 [ , char1 [ , ... ] ] ] ) +es5id: 15.5.3.2_A3_T2 +description: > + Create function variable, that equal String.fromCharCode, delete + original String.fromCharCode and use created variable +---*/ var __fcc__func = String.fromCharCode; @@ -19,5 +20,3 @@ if (__fcc__func(65,66,66,65) !== "ABBA") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A4.js b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A4.js index fd9b0038e1..432329e2cc 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A4.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3.2_A4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.fromCharCode has not [[construct]] method - * - * @path ch15/15.5/15.5.3/S15.5.3.2_A4.js - * @description Checking if creating "new String.fromCharCode" fails - */ +/*--- +info: String.fromCharCode has not [[construct]] method +es5id: 15.5.3.2_A4 +description: Checking if creating "new String.fromCharCode" fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __fcc__func = String.fromCharCode; @@ -16,10 +18,9 @@ delete String.fromCharCode; //CHECK#1 try { var __obj = new __fcc__func(65,66,66,65); - $FAIL('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception'); -} catch (e) { + $FAIL('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3_A1.js b/test/suite/ch15/15.5/15.5.3/S15.5.3_A1.js index 5eaf364aff..7360cf3f18 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3_A1.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String has length property whose value is 1 - * - * @path ch15/15.5/15.5.3/S15.5.3_A1.js - * @description Checking String.length - */ +/*--- +info: String has length property whose value is 1 +es5id: 15.5.3_A1 +description: Checking String.length +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK# @@ -15,4 +14,3 @@ if (String.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T1.js b/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T1.js index 12a237ae72..c0a51b6255 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the String constructor is the Function prototype object - * - * @path ch15/15.5/15.5.3/S15.5.3_A2_T1.js - * @description Checking Function.prototype.isPrototypeOf(String) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the String + constructor is the Function prototype object +es5id: 15.5.3_A2_T1 +description: Checking Function.prototype.isPrototypeOf(String) +---*/ ////////////////////////////////////////////////////////////////////////////// // CHECK# @@ -15,4 +16,3 @@ if (!(Function.prototype.isPrototypeOf(String))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T2.js b/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T2.js index 04f5d10bb5..55abaca78c 100644 --- a/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.3/S15.5.3_A2_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the String constructor is the Function prototype object - * - * @path ch15/15.5/15.5.3/S15.5.3_A2_T2.js - * @description Add custom property to Function.prototype and check it at String - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the String + constructor is the Function prototype object +es5id: 15.5.3_A2_T2 +description: Add custom property to Function.prototype and check it at String +---*/ Function.prototype.indicator = 1; @@ -17,4 +18,3 @@ if (String.indicator !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A10.js index 12ed351f1d..c15db2daef 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.match.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A10.js - * @description Checking if varying the String.prototype.match.length property fails - */ +/*--- +info: The String.prototype.match.length property has the attribute ReadOnly +es5id: 15.5.4.10_A10 +description: > + Checking if varying the String.prototype.match.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.match.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A11.js index 00a77b4545..a03266abf7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the match method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A11.js - * @description Checking String.prototype.match.length - */ +/*--- +info: The length property of the match method is 1 +es5id: 15.5.4.10_A11 +description: Checking String.prototype.match.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.match.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T1.js index 03ce88418f..62c1781866 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T1.js - * @description Arguments is true, and instance is object - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T1 +description: Arguments is true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.match(true)[0] !== "true") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T10.js index 652eac85b4..06c8d910b0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T10.js - * @description Call match (regexp) function with object argument - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T10 +description: Call match (regexp) function with object argument +---*/ var __obj = {toString:function(){return "\u0041B";}} var __str = "ABB\u0041BABAB"; @@ -22,4 +21,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T11.js index 6da4ccc6d6..bcf3d44d3c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T11.js - * @description Override toString function, toString throw exception, then call match (regexp) function with this object as argument - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T11 +description: > + Override toString function, toString throw exception, then call + match (regexp) function with this object as argument +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}} var __str = {str__:"ABB\u0041BABAB"}; @@ -27,4 +29,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T12.js index dd30ec677f..3a9a6bf4f2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T12.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T12.js - * @description Override toString and valueOf functions, valueOf throw exception, then call match (regexp) function with this object as argument - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T12 +description: > + Override toString and valueOf functions, valueOf throw exception, + then call match (regexp) function with this object as argument +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}} var __str = new String("ABB\u0041BABAB"); @@ -25,4 +27,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T13.js index dd5c41bde6..64e9be70b9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T13.js - * @description Override toString and valueOf functions, then call match (regexp) function with this object as argument - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T13 +description: > + Override toString and valueOf functions, then call match (regexp) + function with this object as argument +---*/ var __obj = {toString:function(){return {};},valueOf:function(){return 1;}} @@ -25,4 +26,3 @@ if ("ABB\u0041B\u0031ABAB\u0031BBAA".match(__obj).length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T14.js index 71dc0ec397..fb112c3fa6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T14.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T14.js - * @description Call match (regexp) function with RegExp object as argument from string - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T14 +description: > + Call match (regexp) function with RegExp object as argument from + string +---*/ var __reg = new RegExp("77"); @@ -17,4 +18,3 @@ if ("ABB\u0041BABAB\u0037\u0037BBAA".match(__reg)[0] !== "77") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T2.js index c586d46ca8..65488e5266 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T2.js - * @description Argument is function that return boolean, and instance is Boolean object - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T2 +description: > + Argument is function that return boolean, and instance is Boolean + object +---*/ var __instance = new Boolean; @@ -19,4 +20,3 @@ if (__instance.match(function(){return false;}())[0] !== "false") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T3.js index 6eb2ff4b95..32bf295395 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T3.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T3.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T3 +description: Checking by using eval +includes: [fnGlobalObject.js] +---*/ var match = String.prototype.match.bind(fnGlobalObject()); @@ -22,4 +22,3 @@ if ((fnGlobalObject().toString === Object.prototype.toString) && //Ensure we co } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T4.js index 9d0dc15cbe..d81fcf57f7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T4.js - * @description Call match (regexp) function without arguments of string - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T4 +description: Call match (regexp) function without arguments of string +---*/ var __matched = "".match(); @@ -45,4 +44,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T5.js index 335857cde1..f0a41f16fa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T5.js - * @description Call match (regexp) function with null argument of function object - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T5 +description: Call match (regexp) function with null argument of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "gnulluna"}().match(null)[0] !== "null") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T6.js index d7d1f45cdc..9fd224f52b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T6.js - * @description Call match (regexp) function with x argument of new String object, where x is undefined variable - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T6 +description: > + Call match (regexp) function with x argument of new String object, + where x is undefined variable +---*/ var __matched = new String("undefined").match(x); @@ -47,5 +48,3 @@ for(var index=0; index<__expected.length; index++) { ////////////////////////////////////////////////////////////////////////////// var x; - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T7.js index 399a988c36..b59c691739 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T7.js - * @description Call match (regexp) function with undefined argument of string object - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T7 +description: > + Call match (regexp) function with undefined argument of string + object +---*/ var __matched = String("undefined").match(undefined); @@ -45,4 +46,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T8.js index 5876065c47..13aa23e557 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T8.js - * @description Call match (regexp) function with void 0 argument of string object; - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T8 +description: Call match (regexp) function with void 0 argument of string object; +---*/ var __obj = {toString:function(){}}; @@ -47,4 +46,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T9.js index 11e81534ed..a9ce29da4a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A1_T9.js - * @description Call match (regexp) function with function(){}() argument of string object - */ +/*--- +info: String.prototype.match (regexp) +es5id: 15.5.4.10_A1_T9 +description: > + Call match (regexp) function with function(){}() argument of + string object +---*/ var __obj = { valueOf:function(){}, @@ -50,4 +51,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T1.js index cad2cf0571..4f74b06895 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T1.js - * @description Regular expression is 3 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T1 +description: Regular expression is 3 +---*/ var __string = "1234567890"; @@ -41,4 +40,3 @@ if (__string.match(3).input !==__string) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T10.js index 20657116de..5a5c5f3825 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T10.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T10.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is undefined. - * And regular expression object have property lastIndex = tested_string.lastIndexOf("0") - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T10 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is + undefined. And regular expression object have property lastIndex + = tested_string.lastIndexOf("0") +---*/ var __string = "Boston, MA 02134"; @@ -42,4 +43,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T11.js index 4ac24f9d54..8bf987ea9c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T11.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T11.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is undefined. - * And regular expression object have property lastIndex = tested_string.lastIndexOf("0")+1 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T11 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is + undefined. And regular expression object have property lastIndex + = tested_string.lastIndexOf("0")+1 +---*/ var __string = "Boston, MA 02134"; @@ -42,4 +43,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T12.js index c87fc900bc..c89079514e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T12.js - * @description Regular expression is variable that have value /([\d]{5})([-\ ]?[\d]{4})?$/g - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T12 +description: > + Regular expression is variable that have value /([\d]{5})([-\ + ]?[\d]{4})?$/g +---*/ var __matches=["02134"]; @@ -29,4 +30,3 @@ if (__string.match(__re)[0]!==__matches[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T13.js index 6c081dc4a8..4a61755998 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T13.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T13.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g. - * And regular expression object have property lastIndex = 0 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T13 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g. And regular + expression object have property lastIndex = 0 +---*/ var __matches=["02134"]; @@ -31,4 +31,3 @@ if (__string.match(__re)[0]!==__matches[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T14.js index b3a64230de..92b5593881 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T14.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T14.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g. - * And regular expression object have property lastIndex = tested_string.length - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T14 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g. And regular + expression object have property lastIndex = tested_string.length +---*/ var __string = "Boston, MA 02134"; @@ -32,4 +32,3 @@ if (__string.match(__re)[0]!==__matches[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T15.js index 1de89816fa..b2101492cd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T15.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T15.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. - * And regular expression object have property lastIndex = tested_string.lastIndexOf("0") - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T15 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. And regular + expression object have property lastIndex = + tested_string.lastIndexOf("0") +---*/ var __string = "Boston, MA 02134"; @@ -32,4 +33,3 @@ if (__string.match(__re)[0]!==__matches[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T16.js index b0288c8438..ac72b075f7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T16.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T16.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. - * And regular expression object have property lastIndex = tested_string.lastIndexOf("0")+1 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T16 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. And regular + expression object have property lastIndex = + tested_string.lastIndexOf("0")+1 +---*/ var __string = "Boston, MA 02134"; @@ -32,4 +33,3 @@ if (__string.match(__re)[0]!==__matches[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T17.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T17.js index fcc582867f..9cd4f78486 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T17.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T17.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T17.js - * @description Regular expression is /0./ - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T17 +description: Regular expression is /0./ +---*/ var __re = /0./; @@ -47,4 +46,3 @@ if (__num.match(__re).input !==String(__num)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T18.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T18.js index 56b4b77e83..9f8c8b30e1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T18.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T18.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T18.js - * @description Regular expression is /0./. - * And regular expression object have property lastIndex = 0 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T18 +description: > + Regular expression is /0./. And regular expression object have + property lastIndex = 0 +---*/ var __re = /0./; @@ -48,4 +48,3 @@ if (__num.match(__re).input !==String(__num)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T2.js index 079ef838c6..27e46bbb2b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T2.js - * @description Regular expression is /34/g - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T2 +description: Regular expression is /34/g +---*/ var __matches=["34","34","34"]; @@ -29,4 +28,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T3.js index 8c0860ec8a..26e6dd68eb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T3.js - * @description Regular expression is /\d{1}/g - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T3 +description: Regular expression is /\d{1}/g +---*/ var __matches=["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]; @@ -29,4 +28,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T4.js index bb3d613f15..37c6ec04e5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T4.js - * @description Regular expression is /\d{2}/g - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T4 +description: Regular expression is /\d{2}/g +---*/ var __matches=["12", "34", "56", "78", "90"]; @@ -29,4 +28,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T5.js index a454c79175..22044d86b5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T5.js - * @description Regular expression is /\D{2}/g - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T5 +description: Regular expression is /\D{2}/g +---*/ var __matches=["ab", "cd"]; @@ -29,4 +28,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T6.js index c6fb397c32..1be783adf1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T6.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is void 0 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T6 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is + void 0 +---*/ var __string = "Boston, Mass. 02134"; @@ -57,4 +58,3 @@ if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).input !==__string) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T7.js index 9dbf84f109..48a7ba461c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T7.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T7 +description: Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/g +---*/ var __matches=["02134"]; @@ -27,4 +26,3 @@ if (__string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g)[0]!==__matches[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T8.js index 310063426d..27cf7c4070 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T8.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T8.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is undefined. - * And regular expression object have property lastIndex = 0 - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T8 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is + undefined. And regular expression object have property lastIndex + = 0 +---*/ var __matches=["02134", "02134", undefined]; @@ -41,4 +42,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T9.js index 17dd188a70..b37f8ec737 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T9.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * match returns array as specified in 15.10.6.2 - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A2_T9.js - * @description Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is undefined. - * And regular expression object have property lastIndex = tested_string.length - */ +/*--- +info: match returns array as specified in 15.10.6.2 +es5id: 15.5.4.10_A2_T9 +description: > + Regular expression is /([\d]{5})([-\ ]?[\d]{4})?$/. Last match is + undefined. And regular expression object have property lastIndex + = tested_string.length +---*/ var __string = "Boston, MA 02134"; @@ -42,4 +43,3 @@ for(var mi=0; mi<__matches.length; mi++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A6.js index bfcb23d207..e7b44f13fc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A6.js - * @description Checking String.prototype.match.prototype - */ +/*--- +info: String.prototype.match has not prototype property +es5id: 15.5.4.10_A6 +description: Checking String.prototype.match.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.match.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A7.js index 11b66aabbd..fa36f4a596 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A7.js @@ -1,19 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.match can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A7.js - * @description Checking if creating "String.prototype.match object" fails - */ +/*--- +info: String.prototype.match can't be used as constructor +es5id: 15.5.4.10_A7 +description: Checking if creating "String.prototype.match object" fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __FACTORY = String.prototype.match; try { var __instance = new __FACTORY; - $FAIL('#1: __FACTORY = String.prototype.match; __FACTORY = String.prototype.match; __instance = new __FACTORY lead to throwing exception'); -} catch (e) { + $FAIL('#1: __FACTORY = String.prototype.match; __FACTORY = String.prototype.match; __instance = new __FACTORY lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A8.js index 733112233c..9f38ffa795 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.match.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A8.js - * @description Checking if enumerating the String.prototype.match.length property fails - */ +/*--- +info: The String.prototype.match.length property has the attribute DontEnum +es5id: 15.5.4.10_A8 +description: > + Checking if enumerating the String.prototype.match.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A9.js index 2f057d4b01..9cfee781d7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.match.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A9.js - * @description Checking if deleting the String.prototype.match.length property fails - */ +/*--- +info: The String.prototype.match.length property has the attribute DontDelete +es5id: 15.5.4.10_A9 +description: > + Checking if deleting the String.prototype.match.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.match.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/15.5.4.11-1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/15.5.4.11-1.js index 861815b1d9..f6d06993a4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/15.5.4.11-1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/15.5.4.11-1.js @@ -1,25 +1,28 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.11/15.5.4.11-1.js - * @description 'this' object used by the replaceValue function of a String.prototype.replace invocation - */ - - - - -function testcase() { - var retVal = 'x'.replace(/x/, - function() { - if (this===fnGlobalObject()) { - return 'y'; - } else { - return 'z'; - } - }); - return retVal==='y'; -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.11-1 +description: > + 'this' object used by the replaceValue function of a + String.prototype.replace invocation +includes: + - runTestCase.js + - fnGlobalObject.js +---*/ + +function testcase() { + var retVal = 'x'.replace(/x/, + function() { + if (this===fnGlobalObject()) { + return 'y'; + } else { + return 'z'; + } + }); + return retVal==='y'; +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A10.js index fd690fde5d..b599c2f3d5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.replace.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A10.js - * @description Checking if varying the String.prototype.replace.length property fails - */ +/*--- +info: The String.prototype.replace.length property has the attribute ReadOnly +es5id: 15.5.4.11_A10 +description: > + Checking if varying the String.prototype.replace.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.replace.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A11.js index 9dfc6b0ab5..5b9af5f11d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the replace method is 2 - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A11.js - * @description Checking String.prototype.replace.length - */ +/*--- +info: The length property of the replace method is 2 +es5id: 15.5.4.11_A11 +description: Checking String.prototype.replace.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.replace.length !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A12.js index bc49e9f72b..9200fe9907 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A12.js @@ -1,13 +1,13 @@ // Copyright 2011 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Call replaceValue passing undefined as the this value - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A12.js - * @description replaceValue tests that its this value is undefined - * @onlyStrict - */ +/*--- +info: Call replaceValue passing undefined as the this value +es5id: 15.5.4.11_A12 +description: replaceValue tests that its this value is undefined +flags: [onlyStrict] +includes: [$FAIL.js] +---*/ var global = this; 'x'.replace(/x/, function() { @@ -22,4 +22,3 @@ var global = this; } return 'y'; }); - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T1.js index 3d6dc48d8f..0ccd9a7817 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T1.js - * @description Arguments are true and 1, and instance is object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T1 +description: Arguments are true and 1, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.replace(true, 1) !== "1") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T10.js index 883af31052..fb4de5518e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T10.js - * @description Call replace (searchValue, replaceValue) function with object and function arguments of string. Object have overrided toString function - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T10 +description: > + Call replace (searchValue, replaceValue) function with object and + function arguments of string. Object have overrided toString + function +---*/ var __obj = {toString:function(){return "\u0041B";}}; @@ -23,4 +25,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T11.js index 0916d41df0..5f1994c4af 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T11.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T11.js - * @description Call replace (searchValue, replaceValue) function with objects arguments of string object. Objects have overrided toString function, that throw exception - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T11 +description: > + Call replace (searchValue, replaceValue) function with objects + arguments of string object. Objects have overrided toString + function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "insearchValue";}}; var __obj2 = {toString:function(){throw "inreplaceValue";}}; @@ -28,4 +31,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T12.js index f4f109baff..a655b1db8b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T12.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T12.js - * @description Call replace (searchValue, replaceValue) function with objects arguments of String object. - * First objects have overrided toString and valueOf functions, valueOf throw exception. - * Second objects have overrided toString function, that throw exception - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T12 +description: > + Call replace (searchValue, replaceValue) function with objects + arguments of String object. First objects have overrided toString + and valueOf functions, valueOf throw exception. Second objects + have overrided toString function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};}, valueOf:function(){throw "insearchValue";}}; var __obj2 = {toString:function(){throw "inreplaceValue";}}; @@ -28,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T13.js index d42fcd52c6..352b1e6f4d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T13.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T13.js - * @description Call replace (searchValue, replaceValue) function with objects arguments of string. - * First objects have overrided toString and valueOf functions. - * Second objects have overrided toString function, that throw exception - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T13 +description: > + Call replace (searchValue, replaceValue) function with objects + arguments of string. First objects have overrided toString and + valueOf functions. Second objects have overrided toString + function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};}, valueOf:function(){return 1;}}; var __obj2 = {toString:function(){throw "inreplaceValue";}}; @@ -25,5 +27,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T14.js index f715c3a8c5..e37a5abec3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T14.js - * @description Instance is string, searchValue is regular expression - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T14 +description: Instance is string, searchValue is regular expression +---*/ var __reg = new RegExp("77"); @@ -17,4 +16,3 @@ if ("ABB\u0041BABAB\u0037\u0037BBAA".replace(__reg, 1) !== "ABBABABAB\u0031BBAA" } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T15.js index 36dc58c8ef..a34b7f188d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T15.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T15.js - * @description Instance is Object, searchValue is regular expression - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T15 +description: Instance is Object, searchValue is regular expression +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return /77/}}; @@ -26,4 +26,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T16.js index b1b818f10f..c62bdb5097 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T16.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T16.js - * @description Instance is Number, searchValue is regular expression - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T16 +description: Instance is Number, searchValue is regular expression +includes: [$FAIL.js] +---*/ var __re = /77/; @@ -30,4 +30,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T17.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T17.js index 954030870c..979101a3a9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T17.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T17.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T17.js - * @description Instance is String object, searchValue is regular expression - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T17 +description: Instance is String object, searchValue is regular expression +---*/ var __re = new RegExp(x,"g"); @@ -22,4 +21,3 @@ if (__instance.replace(__re, __str) !== "1a1s1d1f1") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T2.js index 05106a5e31..b8c56f3158 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T2.js - * @description Argument is function that return boolean, and instance is Boolean object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T2 +description: > + Argument is function that return boolean, and instance is Boolean + object +---*/ var __instance = new Boolean; @@ -21,4 +22,3 @@ if (__instance.replace(function(){return false;}(),x) !== "undefined") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T4.js index db27d626ca..e38a394441 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T4.js - * @description Call replace (searchValue, replaceValue) function with null and function(a1,a2,a3){return a2+"";} arguments of function object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T4 +description: > + Call replace (searchValue, replaceValue) function with null and + function(a1,a2,a3){return a2+"";} arguments of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (function(){return "gnulluna"}().replace(null,function(a1,a2,a3){return a2+"" } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T5.js index 4529aca013..cbd9c74fe6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T5.js - * @description Call replace (searchValue, replaceValue) function with null and Function() arguments of function object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T5 +description: > + Call replace (searchValue, replaceValue) function with null and + Function() arguments of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (function(){return "gnulluna"}().replace(null, Function()) !== "gundefineduna } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T6.js index 53e1035edd..b593f4f938 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T6.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T6.js - * @description Call replace (searchValue, replaceValue) function with x and Function("return arguments[1]+42;") arguments of new String object. x is undefined variable - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T6 +description: > + Call replace (searchValue, replaceValue) function with x and + Function("return arguments[1]+42;") arguments of new String + object. x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -17,4 +19,3 @@ if (new String("undefined").replace(x,Function("return arguments[1]+42;")) !== " ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T7.js index 523fe251d1..8c2ec13113 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T7.js - * @description Call replace (searchValue, replaceValue) function with string and undefined arguments of String object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T7 +description: > + Call replace (searchValue, replaceValue) function with string and + undefined arguments of String object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (String(void 0).replace("e",undefined) !== "undundefinedfined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T8.js index 0ec4f5112f..81c9a9c4ad 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T8.js - * @description Call replace (searchValue, replaceValue) function with regular expression and void 0 arguments of String object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T8 +description: > + Call replace (searchValue, replaceValue) function with regular + expression and void 0 arguments of String object +---*/ var __obj = {toString:function(){}}; @@ -17,4 +18,3 @@ if (String(__obj).replace(/e/g,void 0) !== "undundefinedfinundefinedd") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T9.js index 04c32b5170..9c4ebe9e26 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace (searchValue, replaceValue) - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A1_T9.js - * @description Call replace (searchValue, replaceValue) function with functions arguments of new String object - */ +/*--- +info: String.prototype.replace (searchValue, replaceValue) +es5id: 15.5.4.11_A1_T9 +description: > + Call replace (searchValue, replaceValue) function with functions + arguments of new String object +---*/ var __obj = { valueOf:function(){}, @@ -22,4 +23,3 @@ if (new String(__obj).replace(function(){}(),__func) !== "undefined0undefined") ////////////////////////////////////////////////////////////////////////////// function __func(a1,a2,a3){return a1+a2+a3;}; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T1.js index b6d706ce4b..aa67fbe2fc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T1.js - * @description Don`t use $ in replaceValue, searchValue is regular expression /sh/g - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T1 +description: > + Don`t use $ in replaceValue, searchValue is regular expression + /sh/g +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/g; @@ -19,4 +21,3 @@ if (__str.replace(__re,'sch')!=='She sells seaschells by the seaschore.') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T10.js index 975150196b..90c68fab79 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T10.js - * @description Use $' in replaceValue, searchValue is regular expression /sh/ - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T10 +description: Use $' in replaceValue, searchValue is regular expression /sh/ +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/; @@ -19,4 +19,3 @@ if (__str.replace(__re, "$'" + 'sch')!=='She sells seaells by the seashore.schel } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T2.js index e55216da05..cfac34c7bf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T2.js - * @description Use $$ in replaceValue, searchValue is regular expression /sh/g - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T2 +description: Use $$ in replaceValue, searchValue is regular expression /sh/g +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/g; @@ -19,4 +19,3 @@ if (__str.replace(__re,"$$" + 'sch')!=='She sells sea$schells by the sea$schore. } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T3.js index 7570c6a2cf..4e92e78b42 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T3.js - * @description Use $& in replaceValue, searchValue is regular expression /sh/g - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T3 +description: Use $& in replaceValue, searchValue is regular expression /sh/g +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/g; @@ -19,4 +19,3 @@ if (__str.replace(__re,"$&" + 'sch')!=='She sells seashschells by the seashschor } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T4.js index eb1a58ac8f..97c024ec32 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T4.js - * @description Use $` in replaceValue, searchValue is regular expression /sh/g - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T4 +description: Use $` in replaceValue, searchValue is regular expression /sh/g +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/g; @@ -19,4 +19,3 @@ if (__str.replace(__re, "$`" + 'sch')!=='She sells seaShe sells seaschells by th } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T5.js index eb283fe7f9..db6a2a7ed2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T5.js - * @description Use $' in replaceValue, searchValue is regular expression /sh/g - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T5 +description: Use $' in replaceValue, searchValue is regular expression /sh/g +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/g; @@ -19,4 +19,3 @@ if (__str.replace(__re, "$'" + 'sch')!=='She sells seaells by the seashore.schel } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T6.js index 483eb10ee9..0a771031fc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T6.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T6.js - * @description Don`t use $ in replaceValue, searchValue is regular expression /sh/ - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T6 +description: Don`t use $ in replaceValue, searchValue is regular expression /sh/ +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/; @@ -19,4 +19,3 @@ if (__str.replace(__re, 'sch')!=='She sells seaschells by the seashore.') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T7.js index 2dadba861c..d0a5bad3f0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T7.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T7.js - * @description Use $$ in replaceValue, searchValue is regular expression /sh/ - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T7 +description: Use $$ in replaceValue, searchValue is regular expression /sh/ +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/; @@ -19,4 +19,3 @@ if (__str.replace(__re, "$$" + 'sch')!=='She sells sea$schells by the seashore.' } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T8.js index 0ba635ec32..8be93a91d0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T8.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T8.js - * @description Use $& in replaceValue, searchValue is regular expression /sh/ - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T8 +description: Use $& in replaceValue, searchValue is regular expression /sh/ +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/; @@ -19,4 +19,3 @@ if (__str.replace(__re, "$&" + 'sch')!=='She sells seashschells by the seashore. } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T9.js index 271ceb4915..72d7bba73f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T9.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The $ replacements are done left-to-right, and, once such are placement is performed, the new - * replacement text is not subject to further replacements - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A2_T9.js - * @description Use $` in replaceValue, searchValue is regular expression /sh/ - */ +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T9 +description: Use $` in replaceValue, searchValue is regular expression /sh/ +---*/ var __str = 'She sells seashells by the seashore.'; var __re = /sh/; @@ -19,4 +19,3 @@ if (__str.replace(__re, "$`" + 'sch')!=='She sells seaShe sells seaschells by th } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T1.js index 355a962b8f..07cc9cc722 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /(uid=)(\d+)/ returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T1.js - * @description replaceValue is "$11" + 15 - */ +/*--- +info: replace with regexp /(uid=)(\d+)/ returns +es5id: 15.5.4.11_A3_T1 +description: replaceValue is "$11" + 15 +---*/ var __str = 'uid=31'; var __re = /(uid=)(\d+)/; @@ -18,4 +17,3 @@ if (__str.replace(__re, "$11" + 15)!=='uid=115') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T2.js index f03d3cccf6..103dc9ec37 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /(uid=)(\d+)/ returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T2.js - * @description replaceValue is "$11" + '15' - */ +/*--- +info: replace with regexp /(uid=)(\d+)/ returns +es5id: 15.5.4.11_A3_T2 +description: replaceValue is "$11" + '15' +---*/ var __str = 'uid=31'; var __re = /(uid=)(\d+)/; @@ -18,4 +17,3 @@ if (__str.replace(__re, "$11" + '15')!=='uid=115') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T3.js index e5da61e48c..3b1a30458b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /(uid=)(\d+)/ returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A3_T3.js - * @description replaceValue is "$11" + 'A15' - */ +/*--- +info: replace with regexp /(uid=)(\d+)/ returns +es5id: 15.5.4.11_A3_T3 +description: replaceValue is "$11" + 'A15' +---*/ var __str = 'uid=31'; var __re = /(uid=)(\d+)/; @@ -18,4 +17,3 @@ if (__str.replace(__re, "$11" + 'A15')!=='uid=1A15' ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T1.js index 989bb7f565..e695fe5722 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /([a-z]+)([0-9]+)/ and replace function returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T1.js - * @description searchValue is /([a-z]+)([0-9]+)/ - */ +/*--- +info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns +es5id: 15.5.4.11_A4_T1 +description: searchValue is /([a-z]+)([0-9]+)/ +---*/ var __str = "abc12 def34"; var __pattern = /([a-z]+)([0-9]+)/; @@ -22,4 +21,3 @@ if (__str.replace(__pattern, __replFN)!=='12abc def34') { function __replFN() { return arguments[2] + arguments[1]; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T2.js index 956a7c0e16..141966c06b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /([a-z]+)([0-9]+)/ and replace function returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T2.js - * @description searchValue is /([a-z]+)([0-9]+)/g - */ +/*--- +info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns +es5id: 15.5.4.11_A4_T2 +description: searchValue is /([a-z]+)([0-9]+)/g +---*/ var __str = "abc12 def34"; var __pattern = /([a-z]+)([0-9]+)/g; @@ -22,4 +21,3 @@ if (__str.replace(__pattern, __replFN)!=='12abc 34def') { function __replFN() { return arguments[2] + arguments[1]; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T3.js index 8eea7fe4be..fcd736f859 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /([a-z]+)([0-9]+)/ and replace function returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T3.js - * @description searchValue is /([a-z]+)([0-9]+)/i - */ +/*--- +info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns +es5id: 15.5.4.11_A4_T3 +description: searchValue is /([a-z]+)([0-9]+)/i +---*/ var __str = "aBc12 def34"; var __pattern = /([a-z]+)([0-9]+)/i; @@ -22,4 +21,3 @@ if (__str.replace(__pattern, __replFN)!=='12aBc def34') { function __replFN() { return arguments[2] + arguments[1]; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T4.js index 70b421037d..b272fa8d7f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * replace with regexp /([a-z]+)([0-9]+)/ and replace function returns - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A4_T4.js - * @description searchValue is /([a-z]+)([0-9]+)/ig - */ +/*--- +info: replace with regexp /([a-z]+)([0-9]+)/ and replace function returns +es5id: 15.5.4.11_A4_T4 +description: searchValue is /([a-z]+)([0-9]+)/ig +---*/ var __str = "aBc12 dEf34"; var __pattern = /([a-z]+)([0-9]+)/ig; @@ -22,4 +21,3 @@ if (__str.replace(__pattern, __replFN)!=='12aBc 34dEf') { function __replFN() { return arguments[2] + arguments[1]; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A5_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A5_T1.js index 917b9a68fe..92d05069e1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A5_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Use replace with regexp as searchValue and use $ in replaceValue - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A5_T1.js - * @description searchValue is regexp /^(a+)\1*,\1+$/ and replaceValue is "$1" - */ +/*--- +info: Use replace with regexp as searchValue and use $ in replaceValue +es5id: 15.5.4.11_A5_T1 +description: searchValue is regexp /^(a+)\1*,\1+$/ and replaceValue is "$1" +---*/ var __str = "aaaaaaaaaa,aaaaaaaaaaaaaaa"; var __pattern = /^(a+)\1*,\1+$/; @@ -19,4 +18,3 @@ if (__str.replace(__pattern, __repl)!=='aaaaa') { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A6.js index dc1d5acd16..5ba2416aba 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A6.js - * @description Checking String.prototype.replace.prototype; - */ +/*--- +info: String.prototype.replace has not prototype property +es5id: 15.5.4.11_A6 +description: Checking String.prototype.replace.prototype; +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.replace.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A7.js index 987862d139..db7214356b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A7.js @@ -1,19 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.replace can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A7.js - * @description Checking if creating the String.prototype.replace object fails - */ +/*--- +info: String.prototype.replace can't be used as constructor +es5id: 15.5.4.11_A7 +description: Checking if creating the String.prototype.replace object fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __FACTORY = String.prototype.replace; try { var __instance = new __FACTORY; - $FAIL('#1: __FACTORY = String.prototype.replace; "__instance = new __FACTORY" lead to throwing exception'); -} catch (e) { + $FAIL('#1: __FACTORY = String.prototype.replace; "__instance = new __FACTORY" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A8.js index 692e4b0a22..af441ca3ca 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.replace.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A8.js - * @description Checking if enumerating the String.prototype.replace.length property fails - */ +/*--- +info: The String.prototype.replace.length property has the attribute DontEnum +es5id: 15.5.4.11_A8 +description: > + Checking if enumerating the String.prototype.replace.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A9.js index d594e357da..e9bfdd91f1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.replace.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A9.js - * @description Checking if deleting the String.prototype.replace.length property fails - */ +/*--- +info: The String.prototype.replace.length property has the attribute DontDelete +es5id: 15.5.4.11_A9 +description: > + Checking if deleting the String.prototype.replace.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.replace.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1.1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1.1_T1.js index cdfb5e6aed..84f5ca9d18 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1.1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1.1_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) without arguments behaves like with argument "undefined" - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1.1_T1.js - * @description Call search() is the same search(undefined) - */ +/*--- +info: > + String.prototype.search (regexp) without arguments behaves like with + argument "undefined" +es5id: 15.5.4.12_A1.1_T1 +description: Call search() is the same search(undefined) +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 var x = "".search(); // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A10.js index f7a5c751a1..b2dd99202f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.search.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A10.js - * @description Checking if varying the String.prototype.search.length property fails - */ +/*--- +info: The String.prototype.search.length property has the attribute ReadOnly +es5id: 15.5.4.12_A10 +description: > + Checking if varying the String.prototype.search.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.search.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A11.js index ea0000ae23..3e71c196d9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the search method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A11.js - * @description Checking String.prototype.search.length - */ +/*--- +info: The length property of the search method is 1 +es5id: 15.5.4.12_A11 +description: Checking String.prototype.search.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.search.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T1.js index 20b98c292a..1813eaac26 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T1.js - * @description Argument is true, and instance is object - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T1 +description: Argument is true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.search(true) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T10.js index f4ebbb3e9a..8aa9c6038f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T10.js - * @description Argument is object, and instance is string. - * Object with overrided toString function - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T10 +description: > + Argument is object, and instance is string. Object with overrided + toString function +---*/ var __obj = {toString:function(){return "\u0041B";}}; var __str = "ssABB\u0041BABAB"; @@ -23,4 +23,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T11.js index 73d9777e41..186e382159 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T11.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T11.js - * @description Argument is object, and instance is string. - * Object with overrided toString function, that throw exception - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T11 +description: > + Argument is object, and instance is string. Object with overrided + toString function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}} var __str = {str__:"ABB\u0041BABAB"}; @@ -28,4 +29,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T12.js index 29f288aa88..6ea6becf77 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T12.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T12.js - * @description Argument is object, and instance is string. - * Object with overrided toString and valueOf functions, valueOf throw exception - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T12 +description: > + Argument is object, and instance is string. Object with overrided + toString and valueOf functions, valueOf throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}} var __str = new String("ABB\u0041BABAB"); @@ -26,4 +27,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T13.js index 0eec2d1c25..edec536de1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T13.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T13.js - * @description Argument is object, and instance is string. - * Object with overrided toString and valueOf functions - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T13 +description: > + Argument is object, and instance is string. Object with overrided + toString and valueOf functions +---*/ var __obj = {toString:function(){return {};},valueOf:function(){return 1;}} @@ -18,4 +18,3 @@ if ("ABB\u0041B\u0031ABAB\u0031BBAA".search(__obj) !==5) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T14.js index 64168457ba..a8245be476 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T14.js - * @description Instance is string, argument is regular expression - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T14 +description: Instance is string, argument is regular expression +---*/ var __reg = new RegExp("77"); @@ -17,4 +16,3 @@ if ("ABB\u0041BABAB\u0037\u0037BBAA".search(__reg) !== 9) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T2.js index 8653f5a942..61d0ec886a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T2.js - * @description Argument is function call, and instance is Boolean - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T2 +description: Argument is function call, and instance is Boolean +---*/ var __instance = new Boolean; @@ -19,4 +18,3 @@ if (__instance.search(function(){return false;}()) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T4.js index e2ef99bb59..c3e0aa6696 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T4.js - * @description Call search (regexp) without arguments - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T4 +description: Call search (regexp) without arguments +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -20,4 +19,3 @@ if ("--undefined--".search() != 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T5.js index bde78afc7b..a1407792fa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T5.js - * @description Argument is null, and instance is function call, that return string - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T5 +description: Argument is null, and instance is function call, that return string +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "gnulluna"}().search(null) !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T6.js index 6a2c5c8d60..074d2d68fc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T6.js - * @description Argument is x, and instance is new String, x is undefined variable - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T6 +description: Argument is x, and instance is new String, x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +17,3 @@ if (new String("undefined").search(x) !== 0) { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T7.js index adcd598866..dc79e77e24 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T7.js - * @description Argument is undefined, and instance is new String - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T7 +description: Argument is undefined, and instance is new String +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (String("undefined").search(undefined) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T8.js index da29abd7bf..9686f918f5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T8.js - * @description Argument is void 0, and instance is String object with overrided toString function - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T8 +description: > + Argument is void 0, and instance is String object with overrided + toString function +---*/ var __obj = {toString:function(){}}; @@ -18,4 +19,3 @@ if (String(__obj).search(void 0) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T9.js index 2148c921a0..d94e1307fa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A1_T9.js - * @description Argument is function call, and instance is String object with overrided toString and valueOf functions - */ +/*--- +info: String.prototype.search (regexp) +es5id: 15.5.4.12_A1_T9 +description: > + Argument is function call, and instance is String object with + overrided toString and valueOf functions +---*/ var __obj = { valueOf:function(){}, @@ -21,4 +22,3 @@ if (new String(__obj).search(function(){}()) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T1.js index 5c8b295554..67cd389fcf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T1.js - * @description Simple search substring inside string - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T1 +description: Simple search substring inside string +---*/ var aString = new String("test string"); @@ -17,4 +16,3 @@ if (aString.search("string")!== 5) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T2.js index 0e6bea24e8..31a6f4123e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T2.js - * @description Checking case sensitive of search, argument is string - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T2 +description: Checking case sensitive of search, argument is string +---*/ var aString = new String("test string"); @@ -17,4 +16,3 @@ if (aString.search("String")!== -1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T3.js index c60edaa47d..221a602490 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T3.js - * @description Checking disabling of case sensitive of search, argument is RegExp - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T3 +description: Checking disabling of case sensitive of search, argument is RegExp +---*/ var aString = new String("test string"); @@ -17,4 +16,3 @@ if (aString.search(/String/i)!== 5) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T4.js index 5d441d68ef..2edc13e4aa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T4.js - * @description Checking case sensitive of search, argument is RegExp with uppercase symbols - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T4 +description: > + Checking case sensitive of search, argument is RegExp with + uppercase symbols +---*/ var bString = new String("one two three four five"); var regExp = /Four/; @@ -18,4 +19,3 @@ if (bString.search(regExp)!== -1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T5.js index 7592416f55..40b750cc8b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T5.js - * @description Checking case sensitive of search, argument is RegExp without uppercase symbols - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T5 +description: > + Checking case sensitive of search, argument is RegExp without + uppercase symbols +---*/ var bString = new String("one two three four five"); var regExp = /four/; @@ -18,4 +19,3 @@ if (bString.search(regExp)!== 14) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T6.js index 340a555d28..b6787c22c1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T6.js - * @description Searching the non-existent "notexist" substring - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T6 +description: Searching the non-existent "notexist" substring +---*/ var aString = new String("test string"); @@ -17,4 +16,3 @@ if (aString.search("notexist")!== -1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T7.js index 505ef416dd..4dad5ae95b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) returns ... - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A2_T7.js - * @description Simple search sentence inside string - */ +/*--- +info: String.prototype.search (regexp) returns ... +es5id: 15.5.4.12_A2_T7 +description: Simple search sentence inside string +---*/ var aString = new String("test string probe"); @@ -17,4 +16,3 @@ if (aString.search("string pro")!== 5) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T1.js index 8ee2ccba9d..1481639f7c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) ignores global properties of regexp - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T1.js - * @description Checking results of search regexp with and without global properties - */ +/*--- +info: String.prototype.search (regexp) ignores global properties of regexp +es5id: 15.5.4.12_A3_T1 +description: > + Checking results of search regexp with and without global + properties +---*/ var aString = new String("power of the power of the power of the power of the power of the power of the great sword"); @@ -17,4 +18,3 @@ if (aString.search(/the/)!== aString.search(/the/g)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T2.js index 8b43a2afe4..099e69e6fb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search (regexp) ignores global properties of regexp - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A3_T2.js - * @description Checking results of search regexp with and without global properties. Unicode symbols used - */ +/*--- +info: String.prototype.search (regexp) ignores global properties of regexp +es5id: 15.5.4.12_A3_T2 +description: > + Checking results of search regexp with and without global + properties. Unicode symbols used +---*/ var aString = new String("power \u006F\u0066 the power of the power \u006F\u0066 the power of the power \u006F\u0066 the power of the great sword"); @@ -17,4 +18,3 @@ if (aString.search(/of/)!== aString.search(/of/g)) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A6.js index 908cabbca7..7b56f3270b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A6.js - * @description Checking String.prototype.search.prototype - */ +/*--- +info: String.prototype.search has not prototype property +es5id: 15.5.4.12_A6 +description: Checking String.prototype.search.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.search.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A7.js index 0e8f90cf9a..9a7faef376 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.search can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A7.js - * @description Checking if creating the String.prototype.search object fails - */ +/*--- +info: String.prototype.search can't be used as constructor +es5id: 15.5.4.12_A7 +description: Checking if creating the String.prototype.search object fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var __FACTORY = String.prototype.search; @@ -19,4 +21,3 @@ try { } $PRINT(e); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A8.js index a24219f083..bcaeddbc7e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.search.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A8.js - * @description Checking if enumerating the String.prototype.search.length property fails - */ +/*--- +info: The String.prototype.search.length property has the attribute DontEnum +es5id: 15.5.4.12_A8 +description: > + Checking if enumerating the String.prototype.search.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A9.js index 832b3670f0..688c7e94cb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.search.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A9.js - * @description Checking if deleting the String.prototype.search.length property fails - */ +/*--- +info: The String.prototype.search.length property has the attribute DontDelete +es5id: 15.5.4.12_A9 +description: > + Checking if deleting the String.prototype.search.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.search.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A10.js index f42a3428ec..39e1be96ff 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.slice.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A10.js - * @description Checking if varying the String.prototype.slice.length property fails - */ +/*--- +info: The String.prototype.slice.length property has the attribute ReadOnly +es5id: 15.5.4.13_A10 +description: > + Checking if varying the String.prototype.slice.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.slice.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A11.js index 681f228c88..df758f408d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the slice method is 2 - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A11.js - * @description Checking String.prototype.slice.length - */ +/*--- +info: The length property of the slice method is 2 +es5id: 15.5.4.13_A11 +description: Checking String.prototype.slice.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.slice.length !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T1.js index e3a528aea0..5158fdf5b9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T1.js - * @description Arguments are false and true, and instance is object - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T1 +description: Arguments are false and true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.slice(false, true) !== "t") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T10.js index de499f4cab..3697d188db 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T10.js - * @description Arguments are object and function call, and instance is String, object have overrided valueOf function - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T10 +description: > + Arguments are object and function call, and instance is String, + object have overrided valueOf function +---*/ var __obj = {valueOf:function(){return 2;}}; @@ -23,4 +24,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T11.js index aed12d5c74..b63f85f0a6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T11.js - * @description Arguments are objects, and instance is string, objects have overrided valueOf function, that return exception - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T11 +description: > + Arguments are objects, and instance is string, objects have + overrided valueOf function, that return exception +includes: [$FAIL.js] +---*/ var __obj = {valueOf:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; @@ -28,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T12.js index 3060c5336c..00339123af 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T12.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T12.js - * @description Arguments are objects, and instance is string. - * First object have overrided valueOf function and toString function, that return exception. - * Second object have overrided valueOf function, that return exception - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T12 +description: > + Arguments are objects, and instance is string. First object have + overrided valueOf function and toString function, that return + exception. Second object have overrided valueOf function, that + return exception +includes: [$FAIL.js] +---*/ var __obj = {valueOf:function(){return {};}, toString:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; @@ -28,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T13.js index 6a89560d76..1a53b741c9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T13.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T13.js - * @description Arguments are objects, and instance is string. - * First object have overrided valueOf and toString functions. - * Second object have overrided toString function, that return exception - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T13 +description: > + Arguments are objects, and instance is string. First object have + overrided valueOf and toString functions. Second object have + overrided toString function, that return exception +includes: [$FAIL.js] +---*/ var __obj = {valueOf:function(){return {};}, toString:function(){return 1;}}; var __obj2 = {toString:function(){throw "inend";}}; @@ -25,5 +26,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T14.js index b48a364441..d7b718ac8a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T14.js - * @description Used one argument, that is function(){}(). Instance is string - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T14 +description: Used one argument, that is function(){}(). Instance is string +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if ("report".slice(function(){}()) !== "report") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T15.js index d27cbb021d..b7017e4db4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T15.js - * @description Call slice without arguments. Instance is Number with prototype.slice = String.prototype.slice - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T15 +description: > + Call slice without arguments. Instance is Number with + prototype.slice = String.prototype.slice +---*/ var __num = 11.001002; @@ -20,4 +21,3 @@ if (__num.slice()!=="11.001002") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T2.js index e312f36495..dd945f5812 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T2.js - * @description Arguments are function call and x, and instance is Boolean. x is undefined variable - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T2 +description: > + Arguments are function call and x, and instance is Boolean. x is + undefined variable +---*/ var __instance = new Boolean; @@ -21,4 +22,3 @@ if (__instance.slice(function(){return true;}(),x) !== "alse") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T4.js index 8b147e97a5..1fda0a1141 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T4.js - * @description Arguments are null and number, and instance is function call, that returned string - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T4 +description: > + Arguments are null and number, and instance is function call, that + returned string +---*/ //since ToInteger(null) yelds 0 ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +17,3 @@ if (function(){return "gnulluna"}().slice(null, -3) !== "gnull") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T5.js index ddc8dce242..d75481ec23 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T5.js - * @description Arguments are null and call other slice(start, end), and instance is function object, that have overrided valueOf and toString functions - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T5 +description: > + Arguments are null and call other slice(start, end), and instance + is function object, that have overrided valueOf and toString + functions +---*/ __func.valueOf=function(){return "gnulluna"}; __func.toString=function(){return __func;}; @@ -23,4 +25,3 @@ if (__func.slice(null, Function().slice(__func,5).length) !== "gnull") { ////////////////////////////////////////////////////////////////////////////// function __func(){}; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T6.js index 98f708f30d..38aa85042d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T6.js - * @description Arguments are x and number, and instance is new String, x is undefined variable - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T6 +description: > + Arguments are x and number, and instance is new String, x is + undefined variable +---*/ //since ToInteger(undefined yelds 0) ////////////////////////////////////////////////////////////////////////////// @@ -18,4 +19,3 @@ if (new String("undefined").slice(x,3) !== "und") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T7.js index 567fe09549..3926ea9df3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T7.js - * @description Arguments are symbol and undefined, and instance is String - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T7 +description: Arguments are symbol and undefined, and instance is String +---*/ //since ToInteger("e") yelds 0 ////////////////////////////////////////////////////////////////////////////// @@ -16,4 +15,3 @@ if (String(void 0).slice("e",undefined) !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T8.js index 25572c8df9..89a92a2201 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T8.js - * @description Arguments are negative number and void 0, and instance is String(object), object have overrided toString function - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T8 +description: > + Arguments are negative number and void 0, and instance is + String(object), object have overrided toString function +---*/ __obj = {toString:function(){}}; @@ -18,4 +19,3 @@ if (String(__obj).slice(-4,void 0) !== "ined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T9.js index 3202857b66..9c927f1f24 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A1_T9.js - * @description Arguments are undefined and object, and instance is String(object), object have overrided valueOf and toString functions - */ +/*--- +info: String.prototype.slice (start, end) +es5id: 15.5.4.13_A1_T9 +description: > + Arguments are undefined and object, and instance is + String(object), object have overrided valueOf and toString + functions +---*/ var __obj = { valueOf:function(){}, @@ -21,4 +23,3 @@ if (new String(__obj).slice(/*(function(){})()*/undefined,__obj) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T1.js index 07a5f0a303..88790f7e72 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T1.js - * @description Checking type of slice() - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T1 +description: Checking type of slice() +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (typeof __string.slice() !== "string") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T2.js index b8b657d698..cadc985329 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T2.js - * @description start is NaN, end is Infinity - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T2 +description: start is NaN, end is Infinity +---*/ var __string = new String('this is a string object'); @@ -17,4 +16,3 @@ if (__string.slice(NaN, Infinity) !== "this is a string object") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T3.js index 37bc9b6c8c..2cd542d173 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T3.js - * @description Call slice from empty String object - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T3 +description: Call slice from empty String object +---*/ var __string = new String(""); @@ -17,4 +16,3 @@ if (__string.slice(1,0) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T4.js index a6749e9fc0..db80ad757e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T4.js - * @description start is Infinity, end is NaN - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T4 +description: start is Infinity, end is NaN +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.slice(Infinity, NaN) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T5.js index 46bf31607b..e889dedce4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T5.js - * @description start is Infinity, end is Infinity - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T5 +description: start is Infinity, end is Infinity +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.slice(Infinity, Infinity) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T6.js index 78aae2436f..73383aaeb7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T6.js - * @description start is negative float number, end is 0 - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T6 +description: start is negative float number, end is 0 +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.slice(-0.01,0) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T7.js index fef18302c0..5a6e272b37 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T7.js - * @description start is tested_string.length, end is tested_string.length - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T7 +description: start is tested_string.length, end is tested_string.length +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.slice(__string.length, __string.length) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T8.js index 22406a791d..9559e7b75d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T8.js - * @description start is tested_string.length+1, end is 0 - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T8 +description: start is tested_string.length+1, end is 0 +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.slice(__string.length+1, 0) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T9.js index 96a95b82e1..9b13cb8dfd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A2_T9.js - * @description start is -Infinity, end is -Infinity - */ +/*--- +info: String.prototype.slice (start, end) returns a string value(not object) +es5id: 15.5.4.13_A2_T9 +description: start is -Infinity, end is -Infinity +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.slice(-Infinity, -Infinity) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T1.js index 0615be24db..b60a25f061 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) can be applied to object instances - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T1.js - * @description Apply String.prototype.slice to Object instance - */ +/*--- +info: String.prototype.slice (start, end) can be applied to object instances +es5id: 15.5.4.13_A3_T1 +description: Apply String.prototype.slice to Object instance +---*/ var __instance = new Object(); @@ -19,4 +18,3 @@ if (__instance.slice(0,8) !== "[object ") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T2.js index 0248989554..4335b1e822 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) can be applied to object instances - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T2.js - * @description Apply String.prototype.slice to Object instance, use other value for start and end values - */ +/*--- +info: String.prototype.slice (start, end) can be applied to object instances +es5id: 15.5.4.13_A3_T2 +description: > + Apply String.prototype.slice to Object instance, use other value + for start and end values +---*/ var __instance = new Object(); @@ -19,4 +20,3 @@ if (__instance.slice(8,__instance.toString().length) !== "Object]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T3.js index 27003ec743..2ed9d7ff06 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) can be applied to object instances - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T3.js - * @description Apply String.prototype.slice to Object instance, and call instance.slice(...).slice(...) - */ +/*--- +info: String.prototype.slice (start, end) can be applied to object instances +es5id: 15.5.4.13_A3_T3 +description: > + Apply String.prototype.slice to Object instance, and call + instance.slice(...).slice(...) +---*/ var __instance = { toString: function() { return "function(){}";} }; @@ -19,4 +20,3 @@ if (__instance.slice(-Infinity,8).slice(1,Infinity) !== "unction") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T4.js index e5588d6805..e07c09aae4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice (start, end) can be applied to object instances - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A3_T4.js - * @description Checknig if applying String.prototype.slice to Function object instance passes - */ +/*--- +info: String.prototype.slice (start, end) can be applied to object instances +es5id: 15.5.4.13_A3_T4 +description: > + Checknig if applying String.prototype.slice to Function object + instance passes +---*/ __FACTORY.prototype.toString = function() { return this.value+''; }; @@ -25,4 +26,3 @@ function __FACTORY( value ) { this.slice= String.prototype.slice; //this.substring = String.prototype.substring; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A6.js index 136a65c52e..0e9643aa62 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A6.js - * @description Checking String.prototype.slice.prototype - */ +/*--- +info: String.prototype.slice has not prototype property +es5id: 15.5.4.13_A6 +description: Checking String.prototype.slice.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.slice.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A7.js index 51ffe1e209..4f9c59679b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.slice can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A7.js - * @description Checking if creating the String.prototype.slice object fails - */ +/*--- +info: String.prototype.slice can't be used as constructor +es5id: 15.5.4.13_A7 +description: Checking if creating the String.prototype.slice object fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var __FACTORY = String.prototype.slice; @@ -16,4 +18,3 @@ try { } catch (e) { $PRINT(e); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A8.js index 9407571730..4b644092c5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.slice.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A8.js - * @description Checking if enumerating the String.prototype.slice.length property fails - */ +/*--- +info: The String.prototype.slice.length property has the attribute DontEnum +es5id: 15.5.4.13_A8 +description: > + Checking if enumerating the String.prototype.slice.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A9.js index c815772b22..437249f7fc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.slice.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A9.js - * @description Checking if deleting the String.prototype.slice.length property fails - */ +/*--- +info: The String.prototype.slice.length property has the attribute DontDelete +es5id: 15.5.4.13_A9 +description: > + Checking if deleting the String.prototype.slice.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.slice.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A10.js index e3edc7ff6a..aa108fb5a3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.split.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A10.js - * @description Checking if varying the String.prototype.split.length property fails - */ +/*--- +info: The String.prototype.split.length property has the attribute ReadOnly +es5id: 15.5.4.14_A10 +description: > + Checking if varying the String.prototype.split.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.split.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A11.js index 3a4762985c..b3a94684f8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the split method is 2 - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A11.js - * @description Checking String.prototype.split.length - */ +/*--- +info: The length property of the split method is 2 +es5id: 15.5.4.14_A11 +description: Checking String.prototype.split.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.split.length !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T1.js index e43860ce66..fc45e8c127 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T1.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T1.js - * @description Arguments are false and true, and instance is object - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T1 +description: Arguments are false and true, and instance is object +---*/ var __instance = new Object(true); @@ -41,4 +41,3 @@ if (__split.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T10.js index fbb18f0d97..63bfb01301 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T10.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T10.js - * @description Arguments are objects, and instance is string. - * First object have overrided toString function. - * Second object have overrided valueOf function - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T10 +description: > + Arguments are objects, and instance is string. First object have + overrided toString function. Second object have overrided valueOf + function +---*/ var __obj = {toString:function(){return "\u0042B";}} var __obj2 = {valueOf:function(){return true;}} @@ -53,4 +54,3 @@ if (__split[0] !== "A") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T11.js index cbe7816ddc..c1d8648e0c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T11.js @@ -1,18 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T11.js - * @description Arguments are objects, and instance is string. - * First object have overrided toString function. - * Second object have overrided valueOf function, that throw exception - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T11 +description: > + Arguments are objects, and instance is string. First object have + overrided toString function. Second object have overrided valueOf + function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){throw "intointeger";}} @@ -34,4 +36,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T12.js index d5dc7fbbaf..925be56d66 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T12.js @@ -1,18 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T12.js - * @description Arguments are objects, and instance is string. - * First object have overrided toString function. - * Second object have overrided valueOf function and toString function, that throw exception - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T12 +description: > + Arguments are objects, and instance is string. First object have + overrided toString function. Second object have overrided valueOf + function and toString function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}} @@ -32,4 +34,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T13.js index f9ef575f06..9ca4ef3577 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T13.js @@ -1,18 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T13.js - * @description Arguments are objects, and instance is string. - * First object have overrided toString function. - * Second object have overrided valueOf and toString functions - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T13 +description: > + Arguments are objects, and instance is string. First object have + overrided toString function. Second object have overrided valueOf + and toString functions +---*/ var __obj = {toString:function(){return "\u0042\u0042";}} var __obj2 = {valueOf:function(){return {};},toString:function(){return "2";}} @@ -58,4 +59,3 @@ if (__split[1] !== "ABABA") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T14.js index cc6593660c..d09c6ecdd4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T14.js @@ -1,18 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T14.js - * @description Arguments are objects, and instance is string. - * First object have overrided toString function, that throw exception. - * Second object have overrided valueOf function, that throw exception - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T14 +description: > + Arguments are objects, and instance is string. First object have + overrided toString function, that throw exception. Second object + have overrided valueOf function, that throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}}; var __obj2 = {valueOf:function(){throw "intoint";}}; @@ -33,4 +35,3 @@ with(__instance){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T15.js index 7e2e74c4f8..3ea3ae8dfc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T15.js @@ -1,18 +1,21 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T15.js - * @description Arguments are objects, and instance is string. - * First object have overrided toString function and valueOf function, that throw exception. - * Second object have overrided valueOf function, that throw exception - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T15 +description: > + Arguments are objects, and instance is string. First object have + overrided toString function and valueOf function, that throw + exception. Second object have overrided valueOf function, that + throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}; @@ -40,4 +43,3 @@ function __FACTORY( value ) { this.toString = function() { return new Number; }; this.valueOf=function(){return this.value+""}; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T16.js index 9c58e0230e..db5328008e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T16.js @@ -1,17 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T16.js - * @description Argument is object, and instance is Number. - * Object have overrided toString function, that return regexp - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T16 +description: > + Argument is object, and instance is Number. Object have overrided + toString function, that return regexp +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return /\u0037\u0037/g;}}; @@ -25,4 +27,3 @@ try { $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e); } } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T17.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T17.js index f8a406dc16..080f5d2746 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T17.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T17.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T17.js - * @description Argument is regexp, and instance is Number - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T17 +description: Argument is regexp, and instance is Number +---*/ var __re = /\u0037\u0037/g; @@ -73,4 +73,3 @@ if (__split[3] !== "1") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T18.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T18.js index 3063102dcb..b6b30b8236 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T18.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T18.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T18.js - * @description Checking by using eval - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T18 +description: Checking by using eval +---*/ var __re = new RegExp("00"); @@ -49,4 +49,3 @@ if (__split[0] !== "6776767677.") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T2.js index 2a236cc00a..33818a6843 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T2.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T2.js - * @description Arguments are boolean expression, function call and null, and instance is Boolean - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T2 +description: > + Arguments are boolean expression, function call and null, and + instance is Boolean +---*/ var __instance = new Boolean; @@ -41,4 +43,3 @@ if (__split.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T3.js index 715a562cd2..620719a49d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T3.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T3.js - * @description Checking by using eval - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T3 +description: Checking by using eval +---*/ var split = String.prototype.split.bind(this); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T4.js index 0c5205cc51..01863b0ea0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T4.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T4.js - * @description Call split without arguments, and instance is empty string - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T4 +description: Call split without arguments, and instance is empty string +---*/ //since ToString() evaluates to "" split() evaluates to split("",0) var __split = "".split(); @@ -46,4 +46,3 @@ if (__split[0] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T5.js index d5a72fbaa3..6d8b15f3eb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T5.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T5.js - * @description Argument is null, and instance is function call that returned string - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T5 +description: > + Argument is null, and instance is function call that returned + string +---*/ //since ToString(null) evaluates to "null" split(null) evaluates to split("null",0) var __split = function(){return "gnulluna"}().split(null); @@ -54,4 +56,3 @@ if (__split[1] !== "una") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T6.js index 7d3fcceb01..101234fddc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T6.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T6.js - * @description Argument is x, and instance is new String. x is undefined variable - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T6 +description: Argument is x, and instance is new String. x is undefined variable +---*/ //since ToString(undefined) evaluates to "" split(undefined) evaluates to split("",0) var __split = new String("1undefined").split(x); @@ -48,4 +48,3 @@ if (__split[0] !== "1undefined") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T7.js index bf48c76568..8ce777f684 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T7.js @@ -1,16 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T7.js - * @description Argument is undefined, and instance is String - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T7 +description: Argument is undefined, and instance is String +---*/ var __split = String("undefinedd").split(undefined); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T8.js index 2feaba65bb..79f9ad96a3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T8.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T8.js - * @description Argument is void 0, and instance is String(object), object have overrided toString function - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T8 +description: > + Argument is void 0, and instance is String(object), object have + overrided toString function +---*/ var __obj = {toString:function(){}}; diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T9.js index b50272419a..108a15f471 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T9.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split(separator, limit): - * i) can be transferred to other kinds of objects for use as a method. - * separator and limit can be any kinds of object since: - * ii) if separator is not RegExp ToString(separator) performs and - * iii) ToInteger(limit) performs - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A1_T9.js - * @description Argument is function(){}(), and instance is String(object), object have overrided toString and valueOf functions - */ +/*--- +info: > + String.prototype.split(separator, limit): + i) can be transferred to other kinds of objects for use as a method. + separator and limit can be any kinds of object since: + ii) if separator is not RegExp ToString(separator) performs and + iii) ToInteger(limit) performs +es5id: 15.5.4.14_A1_T9 +description: > + Argument is function(){}(), and instance is String(object), object + have overrided toString and valueOf functions +---*/ var __obj = { valueOf:function(){}, @@ -51,4 +53,3 @@ if (__split[0] !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T1.js index 3f2bfe61bf..32f1cae9df 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T1.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T1.js - * @description Call split(","), instance is String("one,two,three,four,five") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T1 +description: Call split(","), instance is String("one,two,three,four,five") +---*/ var __string = new String("one,two,three,four,five"); @@ -70,4 +70,3 @@ if (__split[4] !== "five") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T10.js index 54ab24f278..2db97ad790 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T10.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T10.js - * @description Call split(123), instance is "this123is123a123string123object" - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T10 +description: Call split(123), instance is "this123is123a123string123object" +---*/ var __string = "this123is123a123string123object"; var __expected = ["this", "is", "a", "string", "object"]; @@ -41,5 +41,3 @@ for ( var i = 0; i < __expected.length; i++ ) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T11.js index 5dbe9631ce..ec3f6b377c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T11.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T11.js - * @description Call split(":"), instance is String("one-1,two-2,four-4") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T11 +description: "Call split(\":\"), instance is String(\"one-1,two-2,four-4\")" +---*/ var __string = new String("one-1,two-2,four-4"); @@ -38,4 +38,3 @@ if (__split[0] !== "one-1,two-2,four-4") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T12.js index 0cfa3c726a..e2b288425e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T12.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T12.js - * @description Call split("r-42"), instance is String("one-1 two-2 four-4") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T12 +description: Call split("r-42"), instance is String("one-1 two-2 four-4") +---*/ var __string = new String("one-1 two-2 four-4"); @@ -38,4 +38,3 @@ if (__split[0] !== "one-1 two-2 four-4") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T13.js index 773dfa402f..cb171542f9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T13.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T13.js - * @description Call split("-4"), instance is String("one-1 two-2 four-4") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T13 +description: Call split("-4"), instance is String("one-1 two-2 four-4") +---*/ var __string = new String("one-1 two-2 four-4"); @@ -46,4 +46,3 @@ if (__split[1] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T14.js index bab266a41b..7f4e2befe5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T14.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T14.js - * @description Call split("on"), instance is String("one-1 two-2 four-4") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T14 +description: Call split("on"), instance is String("one-1 two-2 four-4") +---*/ var __string = new String("one-1 two-2 four-4"); @@ -46,4 +46,3 @@ if (__split[1] !== "e-1 two-2 four-4") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T15.js index 78186df29f..9c458b7634 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T15.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T15.js - * @description Call split(""), instance is empty String object - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T15 +description: Call split(""), instance is empty String object +---*/ var __string = new String(); @@ -38,4 +38,3 @@ if (__split[0] !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T16.js index 7f038bb5dc..60ed945b35 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T16.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T16.js - * @description Call split(" "), instance is empty String object - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T16 +description: Call split(" "), instance is empty String object +---*/ var __string = new String(); @@ -38,4 +38,3 @@ if (__split[0] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T17.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T17.js index 12356022de..ba54594a2b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T17.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T17.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T17.js - * @description Call split(""), instance is String(" ") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T17 +description: Call split(""), instance is String(" ") +---*/ var __string = new String(" "); @@ -38,4 +38,3 @@ if (__split[0] !== " ") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T18.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T18.js index eb6e4c3188..b693276eaf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T18.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T18.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T18.js - * @description Call split(" "), instance is String(" ") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T18 +description: Call split(" "), instance is String(" ") +---*/ var __string = new String(" "); @@ -46,4 +46,3 @@ if (__split[1] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T19.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T19.js index f1e2c7a38f..a97ba4e18a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T19.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T19.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T19.js - * @description Call split("x"), instance is empty string - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T19 +description: Call split("x"), instance is empty string +---*/ var __string = ""; @@ -38,4 +38,3 @@ if (__split[0] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T2.js index 5492712813..2b3b4e4d47 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T2.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T2.js - * @description Call split(" "), instance is String("one two three four five") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T2 +description: Call split(" "), instance is String("one two three four five") +---*/ var __string = new String("one two three four five"); @@ -70,4 +70,3 @@ if (__split[4] !== "five") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T20.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T20.js index 8bd69c4555..682f749fb3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T20.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T20.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T20.js - * @description Call split(new RegExp) - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T20 +description: Call split(new RegExp) +---*/ var __string = new String("one-1 two-2 three-3"); @@ -40,5 +40,3 @@ for ( var i = 0; i < __string.length; i++ ) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T21.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T21.js index b2011308da..5833f1342e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T21.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T21.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T21.js - * @description Call split("ll"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T21 +description: Call split("ll"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -46,5 +46,3 @@ if (__split[1] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T22.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T22.js index e6eca65fb5..b13374a1d8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T22.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T22.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T22.js - * @description Call split("l"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T22 +description: Call split("l"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -54,5 +54,3 @@ if (__split[2] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T23.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T23.js index 152c353e00..1fcb90faab 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T23.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T23.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T23.js - * @description Call split("x"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T23 +description: Call split("x"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -38,5 +38,3 @@ if (__split[0] !== "hello") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T24.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T24.js index a7043bbd93..6fb5265f05 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T24.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T24.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T24.js - * @description Call split("h"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T24 +description: Call split("h"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -46,5 +46,3 @@ if (__split[1] !== "ello") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T25.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T25.js index 65ee313aad..59de55125a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T25.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T25.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T25.js - * @description Call split("o"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T25 +description: Call split("o"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -46,4 +46,3 @@ if (__split[1] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T26.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T26.js index 760f7ff060..fe042de4c8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T26.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T26.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T26.js - * @description Call split("hello"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T26 +description: Call split("hello"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -46,4 +46,3 @@ if (__split[1] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T27.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T27.js index 515d9fbc5f..651ac887ce 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T27.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T27.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T27.js - * @description Call split(undefined), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T27 +description: Call split(undefined), instance is String("hello") +---*/ var __string = new String("hello"); @@ -38,5 +38,3 @@ if (__split[0] !== "hello") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T28.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T28.js index 84510d84c5..7e1da1bd55 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T28.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T28.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T28.js - * @description Call split("hellothere"), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T28 +description: Call split("hellothere"), instance is String("hello") +---*/ var __string = new String("hello"); @@ -38,5 +38,3 @@ if (__split[0] !== "hello") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T29.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T29.js index 1577a73cf9..53c7407cfb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T29.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T29.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T29.js - * @description Call split(1), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T29 +description: Call split(1), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -44,5 +44,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T3.js index 0dd458c65a..3acafb4594 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T3.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T3.js - * @description Call split(/ /,2), instance is String("one two three four five") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T3 +description: Call split(/ /,2), instance is String("one two three four five") +---*/ var __string = new String("one two three four five"); @@ -46,4 +46,3 @@ if (__split[1] !== "two") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T30.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T30.js index 056648273a..4bfb080389 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T30.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T30.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T30.js - * @description Call split(1,1), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T30 +description: Call split(1,1), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -42,5 +42,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T31.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T31.js index 973791e583..8ea984bd97 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T31.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T31.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T31.js - * @description Call split(1,2), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T31 +description: Call split(1,2), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -44,5 +44,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T32.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T32.js index 878668c95c..9de50ac62f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T32.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T32.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T32.js - * @description Call split(1,0), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T32 +description: Call split(1,0), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -42,5 +42,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T33.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T33.js index 66f3040ad6..26dfb97561 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T33.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T33.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T33.js - * @description Call split(1,100), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T33 +description: Call split(1,100), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -44,5 +44,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T34.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T34.js index bde2c8a9ab..b3595e6545 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T34.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T34.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T34.js - * @description Call split(1,void 0), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T34 +description: Call split(1,void 0), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -44,5 +44,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T35.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T35.js index c6288390c7..c34c1b11e4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T35.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T35.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T35.js - * @description Call split(1, Math.pow(2,32)-1), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T35 +description: Call split(1, Math.pow(2,32)-1), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -44,5 +44,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T36.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T36.js index 66aa503384..425e96f2bb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T36.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T36.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T36.js - * @description Call split(1,"boo"), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T36 +description: Call split(1,"boo"), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -42,5 +42,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T37.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T37.js index f4d27e16c1..8983b061a5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T37.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T37.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T37.js - * @description Call split(1,-Math.pow(2,32)+1), instance is Number - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T37 +description: Call split(1,-Math.pow(2,32)+1), instance is Number +---*/ var __instance = new Number(100111122133144155); @@ -42,5 +42,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T38.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T38.js index e072227a3b..036a8e6ca1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T38.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T38.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T38.js - * @description Call split("l",NaN), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T38 +description: Call split("l",NaN), instance is String("hello") +---*/ var __instance = new String("hello"); @@ -39,4 +39,3 @@ if (__split[0] !== __expected[0]) { $ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", NaN); __expected = []; __split[0] === '+__expected[0]+'. Actual: '+__split[index] ); } // - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T39.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T39.js index 86bd0b649e..5dd312f55e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T39.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T39.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T39.js - * @description Call split("l",0), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T39 +description: Call split("l",0), instance is String("hello") +---*/ var __instance = new String("hello"); @@ -39,4 +39,3 @@ if (__split[0] !== __expected[0]) { $ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", 0); __expected = []; __split[0] === '+__expected[0]+'. Actual: '+__split[index] ); } // - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T4.js index 7647c52392..aa3e7788ed 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T4.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T4.js - * @description Call split(""), instance is String("one two three") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T4 +description: Call split(""), instance is String("one two three") +---*/ var __string = new String("one two three"); @@ -62,4 +62,3 @@ if (__split[12] !== "e") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T40.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T40.js index cb70140ae8..d3467c98e6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T40.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T40.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T40.js - * @description Call split("l",1), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T40 +description: Call split("l",1), instance is String("hello") +---*/ var __instance = new String("hello"); @@ -39,4 +39,3 @@ if (__split[0] !== __expected[0]) { $ERROR('#3: var __instance = new String("hello"); __split = __instance.split("l", 1); __expected = ["he"]; __split[0] === '+__expected[0]+'. Actual: '+__split[index] ); } // - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T41.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T41.js index db8302f67d..fd5cda505a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T41.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T41.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T41.js - * @description Call split("l",2), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T41 +description: Call split("l",2), instance is String("hello") +---*/ var __instance = new String("hello"); @@ -42,5 +42,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T42.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T42.js index 5f54840987..30c6dab5b5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T42.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T42.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T42.js - * @description Call split("l",3), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T42 +description: Call split("l",3), instance is String("hello") +---*/ var __instance = new String("hello"); @@ -42,5 +42,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T43.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T43.js index 2f541ed5ef..bb40b0e84f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T43.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T43.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T43.js - * @description Call split("l",4), instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T43 +description: Call split("l",4), instance is String("hello") +---*/ var __instance = new String("hello"); @@ -42,5 +42,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T5.js index 1662c3b80f..86eef9fd9f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T5.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T5.js - * @description Call split(/,/), instance is String("one-1,two-2,four-4") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T5 +description: Call split(/,/), instance is String("one-1,two-2,four-4") +---*/ var __string = new String("one-1,two-2,four-4"); @@ -54,4 +54,3 @@ if (__split[2] !== "four-4") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T6.js index 308586fb1b..1e92814fa6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T6.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T6.js - * @description Call split(''), instance is String("one-1 two-2 four-4") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T6 +description: Call split(''), instance is String("one-1 two-2 four-4") +---*/ var __string = new String("one-1 two-2 three-3"); @@ -40,5 +40,3 @@ for ( var i = 0; i < __string.length; i++ ) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T7.js index 45b645767e..13b8d494b6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T7.js @@ -1,15 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T7.js - * @description Call split(void 0), instance is "thisundefinedisundefinedaundefinedstringundefinedobject" - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T7 +description: > + Call split(void 0), instance is + "thisundefinedisundefinedaundefinedstringundefinedobject" +---*/ var __string = "thisundefinedisundefinedaundefinedstringundefinedobject"; var __expected = [__string]; @@ -41,5 +43,3 @@ for ( var i = 0; i < __expected.length; i++ ) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T8.js index 33c8d46732..695e3f10b5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T8.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T8.js - * @description Call split(null), instance is "thisnullisnullanullstringnullobject" - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T8 +description: Call split(null), instance is "thisnullisnullanullstringnullobject" +---*/ var __string = "thisnullisnullanullstringnullobject"; var __expected = ["this", "is", "a", "string", "object"]; @@ -41,5 +41,3 @@ for ( var i = 0; i < __expected.length; i++ ) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T9.js index 8f41d42929..cef8fa0ecb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T9.js @@ -1,15 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. The substrings are determined by searching from left to right for occurrences of - * separator; these occurrences are not part of any substring in the returned array, but serve to divide up - * the string value. The value of separator may be a string of any length or it may be a RegExp object - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A2_T9.js - * @description Call split(true), instance is "thistrueistrueatruestringtrueobject" - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. The substrings are determined by searching from left to right for occurrences of + separator; these occurrences are not part of any substring in the returned array, but serve to divide up + the string value. The value of separator may be a string of any length or it may be a RegExp object +es5id: 15.5.4.14_A2_T9 +description: Call split(true), instance is "thistrueistrueatruestringtrueobject" +---*/ var __string = "thistrueistrueatruestringtrueobject"; var __expected = ["this", "is", "a", "string", "object"]; @@ -41,5 +41,3 @@ for ( var i = 0; i < __expected.length; i++ ) { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T1.js index 86a3c2fb69..5033c11d38 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T1.js - * @description Instance is String("one,two,three,four,five") - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T1 +description: Instance is String("one,two,three,four,five") +---*/ var __string = new String("one,two,three,four,five"); @@ -37,4 +37,3 @@ if (__split[0] !== "one,two,three,four,five") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T10.js index 7425bdee2a..9135aad09c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T10.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T10.js - * @description Instance is new String - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T10 +description: Instance is new String +---*/ var __string = new String; @@ -37,4 +37,3 @@ if (__split[0] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T11.js index 7de1ea5838..1fd9711983 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T11.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T11.js - * @description Instance is String(" ") - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T11 +description: Instance is String(" ") +---*/ var __string = new String(" "); @@ -37,4 +37,3 @@ if (__split[0] !== " ") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T2.js index fb00633fe0..696ee18219 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T2.js - * @description Instance is Object() - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T2 +description: Instance is Object() +---*/ var __instance = new Object(); @@ -39,4 +39,3 @@ if (__split[0] !== "[object Object]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T3.js index 51bcf15758..7d053882b2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T3.js - * @description Instance is function(){} - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T3 +description: Instance is function(){} +---*/ var __instance = { toString: function() { return "function(){}";} }; @@ -39,4 +39,3 @@ if (__split[0].substring(0,8) !== "function") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T4.js index d91cb47c95..0399840303 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T4.js - * @description Instance is Number(NaN) - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T4 +description: Instance is Number(NaN) +---*/ var __instance = new Number(NaN); @@ -39,4 +39,3 @@ if (__split[0] !== "NaN") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T5.js index caa50b3d9a..5bec6163b8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T5.js - * @description Instance is Number(-1234567890) - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T5 +description: Instance is Number(-1234567890) +---*/ var __instance = new Number(-1234567890); @@ -39,4 +39,3 @@ if (__split[0] !== "-1234567890") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T6.js index e4421f66eb..9efaed9956 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T6.js - * @description Instance is Number(-1e21) - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T6 +description: Instance is Number(-1e21) +---*/ var __instance = new Number(-1e21); @@ -39,4 +39,3 @@ if (__split[0] !== __instance.toString()) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T7.js index bc09dd5000..68f52970b8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T7.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T7.js - * @description Instance is Math - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T7 +description: Instance is Math +---*/ var __instance = Math; @@ -39,4 +39,3 @@ if (__split[0] !== "[object Math]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T8.js index 94ba1f1e91..83f86cd7cc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T8.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T8.js - * @description Instance is Array(1,2,3,4,5) - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T8 +description: Instance is Array(1,2,3,4,5) +---*/ var __instance = new Array(1,2,3,4,5); @@ -39,4 +39,3 @@ if (__split[0] !== "1,2,3,4,5") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T9.js index a22f24ff9d..53c8ac47b1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T9.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split() returns an Array object with: - * i) length equaled to 1, - * ii) [[Get]](0) equaled to the result of converting this object to a string - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A3_T9.js - * @description Instance is Boolean - */ +/*--- +info: > + String.prototype.split() returns an Array object with: + i) length equaled to 1, + ii) [[Get]](0) equaled to the result of converting this object to a string +es5id: 15.5.4.14_A3_T9 +description: Instance is Boolean +---*/ var __instance = new Boolean; @@ -39,4 +39,3 @@ if (__split[0] !== "false") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T1.js index af74915a55..56b959b2fc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T1.js - * @description Argument is regexp /l/, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T1 +description: Argument is regexp /l/, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -55,4 +55,3 @@ if (__split[2] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T10.js index 4419ea3fed..efe5548137 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T10.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T10.js - * @description Argument is new RegExp, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T10 +description: Argument is new RegExp, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T11.js index e4d7f88f49..2417ac9b00 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T11.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T11.js - * @description Arguments are new RegExp and 0, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T11 +description: Arguments are new RegExp and 0, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -41,4 +41,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T12.js index 68c519cfe5..99d0618249 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T12.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T12.js - * @description Arguments are new RegExp and 1, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T12 +description: Arguments are new RegExp and 1, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -41,4 +41,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T13.js index 887b4b420c..91e02c2946 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T13.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T13.js - * @description Arguments are new RegExp and 2, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T13 +description: Arguments are new RegExp and 2, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T14.js index 513db31ffb..c4bf9f96b4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T14.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T14.js - * @description Arguments are new RegExp and 3, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T14 +description: Arguments are new RegExp and 3, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T15.js index 9811573ad5..257934f9fa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T15.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T15.js - * @description Arguments are new RegExp and 4, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T15 +description: Arguments are new RegExp and 4, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T16.js index e3d3b94810..d8fbe52cfe 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T16.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T16.js - * @description Arguments are new RegExp and void 0, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T16 +description: > + Arguments are new RegExp and void 0, and instance is + String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +45,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T17.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T17.js index a6ec2a0cf5..5451e6ab7f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T17.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T17.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T17.js - * @description Arguments are new RegExp and undefined, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T17 +description: > + Arguments are new RegExp and undefined, and instance is + String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +45,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T18.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T18.js index d8e75a23aa..9e5db9b5f2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T18.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T18.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T18.js - * @description Arguments are new RegExp and "hi", and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T18 +description: Arguments are new RegExp and "hi", and instance is String("hello") +---*/ var __string = new String("hello"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T19.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T19.js index ac88886155..2373af0a61 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T19.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T19.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T19.js - * @description Argument is regexp /\s/, and instance is String("a b c de f") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T19 +description: Argument is regexp /\s/, and instance is String("a b c de f") +---*/ var __string = new String("a b c de f"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T2.js index b628639e79..2531820ec0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T2.js - * @description Arguments are regexp /l/ and 0, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T2 +description: Arguments are regexp /l/ and 0, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -31,4 +31,3 @@ if (__split.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T20.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T20.js index 4a6a08fc16..c3587acce6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T20.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T20.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T20.js - * @description Arguments are regexp /\s/ and 3, and instance is String("a b c de f") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T20 +description: > + Arguments are regexp /\s/ and 3, and instance is String("a b c de + f") +---*/ var __string = new String("a b c de f"); @@ -43,4 +45,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T21.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T21.js index 9a433a3238..607bca7844 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T21.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T21.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T21.js - * @description Argument is regexp /\X/, and instance is String("a b c de f") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T21 +description: Argument is regexp /\X/, and instance is String("a b c de f") +---*/ var __string = new String("a b c de f"); @@ -41,4 +41,3 @@ if (__split[0] !== __expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T22.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T22.js index 23d71dce4c..e22f1c4c75 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T22.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T22.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T22.js - * @description Argument is regexp /\d+/, and instance is String("dfe23iu 34 =+65--") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T22 +description: > + Argument is regexp /\d+/, and instance is String("dfe23iu 34 + =+65--") +---*/ var __string = new String("dfe23iu 34 =+65--"); @@ -43,4 +45,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T23.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T23.js index d68d6c2c93..300aa44190 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T23.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T23.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T23.js - * @description Argument is regexp RegExp('\\d+'), and instance is String("dfe23iu 34 =+65--") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T23 +description: > + Argument is regexp RegExp('\\d+'), and instance is String("dfe23iu + 34 =+65--") +---*/ var __string = new String("dfe23iu 34 =+65--"); @@ -43,4 +45,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T24.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T24.js index 1447f21b94..72dd623398 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T24.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T24.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T24.js - * @description Argument is regexp /[a-z]/, and instance is String("abc") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T24 +description: Argument is regexp /[a-z]/, and instance is String("abc") +---*/ var __string = new String("abc"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T25.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T25.js index 6ece183ab0..4b47166893 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T25.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T25.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T25.js - * @description Argument is RegExp('[a-z]'), and instance is String("abc") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T25 +description: Argument is RegExp('[a-z]'), and instance is String("abc") +---*/ var __string = new String("abc"); @@ -43,4 +43,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T3.js index 5485bca24a..13304d038f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T3.js - * @description Arguments are regexp /l/ and 1, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T3 +description: Arguments are regexp /l/ and 1, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -39,4 +39,3 @@ if (__split[0] !== "he") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T4.js index 0a3e288037..f3858c465d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T4.js - * @description Arguments are regexp /l/ and 2, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T4 +description: Arguments are regexp /l/ and 2, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -47,4 +47,3 @@ if (__split[1] !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T5.js index 42e9c4bc3c..5fa0eaea7f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T5.js - * @description Arguments are regexp /l/ and 3, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T5 +description: Arguments are regexp /l/ and 3, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -55,4 +55,3 @@ if (__split[2] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T6.js index e476ccf7aa..2e05816dd3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T6.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T6.js - * @description Arguments are regexp /l/ and 4, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T6 +description: Arguments are regexp /l/ and 4, and instance is String("hello") +---*/ var __string = new String("hello"); @@ -55,4 +55,3 @@ if (__split[2] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T7.js index f3b86a40d4..a050094311 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T7.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T7.js - * @description Arguments are regexp /l/ and void 0, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T7 +description: > + Arguments are regexp /l/ and void 0, and instance is + String("hello") +---*/ var __string = new String("hello"); @@ -55,4 +57,3 @@ if (__split[2] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T8.js index 5eaa9100eb..d1caabfb07 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T8.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T8.js - * @description Arguments are regexp /l/ and "hi", and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T8 +description: Arguments are regexp /l/ and "hi", and instance is String("hello") +---*/ var __string = new String("hello"); @@ -31,4 +31,3 @@ if (__split.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T9.js index ce010aef3a..78b82ff82b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T9.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have - * been stored. If separator is a regular expression then - * inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A4_T9.js - * @description Arguments are regexp /l/ and undefined, and instance is String("hello") - */ +/*--- +info: > + String.prototype.split (separator, limit) returns an Array object into which substrings of the result of converting this object to a string have + been stored. If separator is a regular expression then + inside of SplitMatch helper the [[Match]] method of R is called giving it the arguments corresponding +es5id: 15.5.4.14_A4_T9 +description: > + Arguments are regexp /l/ and undefined, and instance is + String("hello") +---*/ var __string = new String("hello"); @@ -55,4 +57,3 @@ if (__split[2] !== "o") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A6.js index ee3c4ff3a2..8d714bf6dd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A6.js - * @description Checking String.prototype.split.prototype - */ +/*--- +info: String.prototype.split has not prototype property +es5id: 15.5.4.14_A6 +description: Checking String.prototype.split.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.split.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A7.js index 10c5424aaa..791a2c0967 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A7.js @@ -1,19 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.split can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A7.js - * @description Checking if creating the String.prototype.split object fails - */ +/*--- +info: String.prototype.split can't be used as constructor +es5id: 15.5.4.14_A7 +description: Checking if creating the String.prototype.split object fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __FACTORY = String.prototype.split; try { var __instance = new __FACTORY; - $FAIL('#1: __FACTORY = String.prototype.split; "__instance = new __FACTORY" lead to throwing exception'); -} catch (e) { + $FAIL('#1: __FACTORY = String.prototype.split; "__instance = new __FACTORY" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A8.js index 3cd8da66ab..153a0ad552 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.split.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A8.js - * @description Checking if enumerating the String.prototype.split.length property fails - */ +/*--- +info: The String.prototype.split.length property has the attribute DontEnum +es5id: 15.5.4.14_A8 +description: > + Checking if enumerating the String.prototype.split.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A9.js index 6bd7ffb213..645e77d1f8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.split.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A9.js - * @description Checking if deleting the String.prototype.split.length property fails - */ +/*--- +info: The String.prototype.split.length property has the attribute DontDelete +es5id: 15.5.4.14_A9 +description: > + Checking if deleting the String.prototype.split.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.split.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A10.js index 91c17b1ac6..0a181faa2d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.substring.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A10.js - * @description Checking if varying the String.prototype.substring.length property fails - */ +/*--- +info: The String.prototype.substring.length property has the attribute ReadOnly +es5id: 15.5.4.15_A10 +description: > + Checking if varying the String.prototype.substring.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.substring.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A11.js index b7a8a57b13..020b8a0c50 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the substring method is 2 - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A11.js - * @description Checking String.prototype.substring.length - */ +/*--- +info: The length property of the substring method is 2 +es5id: 15.5.4.15_A11 +description: Checking String.prototype.substring.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.substring.length !== 2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T1.js index 8fb7701e77..c737a2f301 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T1.js - * @description Arguments are false and true, and instance is object - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T1 +description: Arguments are false and true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.substring(false, true) !== "t") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T10.js index 63fe45ac0d..dcebf1082b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T10.js - * @description Arguments are object and function call, and instance is String, object have overrided valueOf function - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T10 +description: > + Arguments are object and function call, and instance is String, + object have overrided valueOf function +---*/ var __obj = {valueOf:function(){return 2;}}; @@ -23,4 +24,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T11.js index dc2aebb6ba..1eb918c75b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T11.js - * @description Arguments are objects, and instance is string, objects have overrided valueOf function, that return exception - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T11 +description: > + Arguments are objects, and instance is string, objects have + overrided valueOf function, that return exception +includes: [$FAIL.js] +---*/ var __obj = {valueOf:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; @@ -28,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T12.js index c45c3968a2..4590ef9e34 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T12.js @@ -1,14 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T12.js - * @description Arguments are objects, and instance is string. - * First object have overrided valueOf function and toString function, that return exception. - * Second object have overrided valueOf function, that return exception - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T12 +description: > + Arguments are objects, and instance is string. First object have + overrided valueOf function and toString function, that return + exception. Second object have overrided valueOf function, that + return exception +includes: [$FAIL.js] +---*/ var __obj = {valueOf:function(){return {};}, toString:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; @@ -28,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T13.js index 62fd05eda3..656b85f5e1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T13.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T13.js - * @description Arguments are objects, and instance is string. - * First object have overrided valueOf and toString functions. - * Second object have overrided toString function, that return exception - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T13 +description: > + Arguments are objects, and instance is string. First object have + overrided valueOf and toString functions. Second object have + overrided toString function, that return exception +includes: [$FAIL.js] +---*/ var __obj = {valueOf:function(){return {};}, toString:function(){return 1;}}; var __obj2 = {toString:function(){throw "inend";}}; @@ -25,5 +26,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T14.js index 54e7e0495f..e9e4d07505 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T14.js - * @description Used one argument, that is function(){}(). Instance is string - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T14 +description: Used one argument, that is function(){}(). Instance is string +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if ("report".substring(function(){}()) !== "report") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T15.js index 22f9cf75a7..50af2e9d82 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T15.js - * @description Call substring without arguments. Instance is Number with prototype.substring = String.prototype.substring - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T15 +description: > + Call substring without arguments. Instance is Number with + prototype.substring = String.prototype.substring +---*/ var __num = 11.001002; @@ -20,4 +21,3 @@ if (__num.substring()!=="11.001002") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T2.js index a46d973a4e..21abf6d49f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T2.js - * @description Arguments are function call and x, and instance is Boolean. x is undefined variable - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T2 +description: > + Arguments are function call and x, and instance is Boolean. x is + undefined variable +---*/ var __instance = new Boolean; @@ -21,4 +22,3 @@ if (__instance.substring(function(){return true;}(),x) !== "alse") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T4.js index 31205feb9a..8e5be04b60 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T4.js - * @description Arguments are null and number, and instance is function call, that returned string - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T4 +description: > + Arguments are null and number, and instance is function call, that + returned string +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (function(){return "gnulluna"}().substring(null, -3) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T5.js index 097154be2a..2f716f58aa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T5.js - * @description Arguments are null and Function(), and instance is function object, that have overrided valueOf function - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T5 +description: > + Arguments are null and Function(), and instance is function + object, that have overrided valueOf function +---*/ __func.valueOf=function(){return "gnulluna"}; @@ -22,4 +23,3 @@ if (__func.substring(null, Function()) !== "") { ////////////////////////////////////////////////////////////////////////////// function __func(){}; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T6.js index 81a2c9593f..d41f4b1c2c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T6.js - * @description Arguments are x and number, and instance is new String, x is undefined variable - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T6 +description: > + Arguments are x and number, and instance is new String, x is + undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -17,4 +18,3 @@ if (new String("undefined").substring(x,3) !== "und") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T7.js index 252e704023..eecbb5da73 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T7.js - * @description Arguments are symbol and undefined, and instance is String - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T7 +description: Arguments are symbol and undefined, and instance is String +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String(void 0).substring("e",undefined) !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T8.js index 700202785c..c7e0a5953e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T8.js - * @description Arguments are negative number and void 0, and instance is String(object), object have overrided toString function - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T8 +description: > + Arguments are negative number and void 0, and instance is + String(object), object have overrided toString function +---*/ var __obj = {toString:function(){}}; @@ -17,4 +18,3 @@ if (String(__obj).substring(-4,void 0) !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T9.js index a9aafd294a..b4b0053b93 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A1_T9.js - * @description Arguments are undefined and object, and instance is new String(object), object have overrided valueOf and toString functions - */ +/*--- +info: String.prototype.substring (start, end) +es5id: 15.5.4.15_A1_T9 +description: > + Arguments are undefined and object, and instance is new + String(object), object have overrided valueOf and toString + functions +---*/ var __obj = { valueOf:function(){}, @@ -20,4 +22,3 @@ if (new String(__obj).substring(/*(function(){})()*/undefined,undefined) !== "un } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T1.js index 919639a8b9..a87e1b4e57 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T1.js - * @description Checking type of substring() - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T1 +description: Checking type of substring() +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (typeof __string.substring() !== "string") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T10.js index 7467a3a74c..44c719d2ec 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T10.js - * @description start is 0, end is 8 - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T10 +description: start is 0, end is 8 +---*/ var __string = new String("this_is_a_string object"); @@ -17,4 +16,3 @@ if (__string.substring(0,8) !== "this_is_") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T2.js index a639bf7b19..179af831ea 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T2.js - * @description start is NaN, end is Infinity - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T2 +description: start is NaN, end is Infinity +---*/ var __string = new String('this is a string object'); @@ -17,4 +16,3 @@ if (__string.substring(NaN, Infinity) !== "this is a string object") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T3.js index e6a911dfd8..18201d0709 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T3.js - * @description Call substring from empty String object - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T3 +description: Call substring from empty String object +---*/ var __string = new String(""); @@ -17,4 +16,3 @@ if (__string.substring(1,0) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T4.js index d79141d8ea..d10dc05a3b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T4.js - * @description start is Infinity, end is NaN - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T4 +description: start is Infinity, end is NaN +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.substring(Infinity, NaN) !== "this is a string object") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T5.js index cef78c101b..6d5d0a8491 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T5.js - * @description start is Infinity, end is Infinity - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T5 +description: start is Infinity, end is Infinity +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.substring(Infinity, Infinity) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T6.js index 1437c87ce4..aec40ce401 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T6.js - * @description start is negative float number, end is 0 - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T6 +description: start is negative float number, end is 0 +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.substring(-0.01,0) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T7.js index 140b4cc2a7..4ce872828f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T7.js - * @description start is tested_string.length, end is tested_string.length - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T7 +description: start is tested_string.length, end is tested_string.length +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.substring(__string.length, __string.length) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T8.js index 9775b8fb2d..e73ef3e647 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T8.js - * @description start is tested_string.length+1, end is 0 - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T8 +description: start is tested_string.length+1, end is 0 +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.substring(__string.length+1, 0) !== "this is a string object") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T9.js index b64f86b806..4ba78e6d75 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A2_T9.js - * @description start is -Infinity, end is -Infinity - */ +/*--- +info: String.prototype.substring (start, end) returns a string value(not object) +es5id: 15.5.4.15_A2_T9 +description: start is -Infinity, end is -Infinity +---*/ var __string = new String("this is a string object"); @@ -17,4 +16,3 @@ if (__string.substring(-Infinity, -Infinity) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T1.js index ee504ea678..cc2726e2c3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T1.js - * @description Apply String.prototype.substring to Array instance. Start is Infinity, end is -Infinity - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T1 +description: > + Apply String.prototype.substring to Array instance. Start is + Infinity, end is -Infinity +---*/ var __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; @@ -19,4 +21,3 @@ if (__instance.substring(Infinity,-Infinity) !== "1,2,3,4,5") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T10.js index 01935b3f8e..10f25f2374 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T10.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T10.js - * @description Checknig if applying String.prototype.substring to Function object instance passes - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T10 +description: > + Checknig if applying String.prototype.substring to Function object + instance passes +---*/ __FACTORY.prototype.substring = String.prototype.substring; @@ -25,4 +27,3 @@ function __FACTORY( value ) { this.value = value; this.toString = function() { return this.value+''; } } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T11.js index 92615a2511..bdb1754954 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T11.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T11.js - * @description Apply String.prototype.substring to Boolean instance. Start is new Array(), end is new Boolean(1) - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T11 +description: > + Apply String.prototype.substring to Boolean instance. Start is new + Array(), end is new Boolean(1) +---*/ var __instance = new Boolean(); @@ -20,4 +22,3 @@ if (__instance.substring(new Array(), new Boolean(1)) !== "f") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T2.js index 728eea9587..5e3bff5181 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T2.js - * @description Apply String.prototype.substring to Array instance. Start is 9, end is -Infinity - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T2 +description: > + Apply String.prototype.substring to Array instance. Start is 9, + end is -Infinity +---*/ var __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; @@ -19,4 +21,3 @@ if (__instance.substring(9,-Infinity) !== "1,2,3,4,5") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T3.js index 814c1ad508..fce5c61e28 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T3.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T3.js - * @description Apply String.prototype.substring to Array instance. Start is true, end is false - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T3 +description: > + Apply String.prototype.substring to Array instance. Start is true, + end is false +---*/ var __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; @@ -19,4 +21,3 @@ if (__instance.substring(true, false) !== "1") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T4.js index eb91e284f2..51cddf00e6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T4.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T4.js - * @description Apply String.prototype.substring to Array instance. Start is '4', end is '5' - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T4 +description: > + Apply String.prototype.substring to Array instance. Start is '4', + end is '5' +---*/ var __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; @@ -19,4 +21,3 @@ if (__instance.substring('4', '5') !== "3") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T5.js index 088bd137f9..12ab7ac30f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T5.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T5.js - * @description Apply String.prototype.substring to Object instance. Start is 8, end is 0 - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T5 +description: > + Apply String.prototype.substring to Object instance. Start is 8, + end is 0 +---*/ var __instance = new Object(); __instance.substring = String.prototype.substring; @@ -19,4 +21,3 @@ if (__instance.substring(8,0) !== "[object ") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T6.js index ac3d0d150e..6be8e2206c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T6.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T6.js - * @description Apply String.prototype.substring to Object instance. Start is 8, end is length of object.toString - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T6 +description: > + Apply String.prototype.substring to Object instance. Start is 8, + end is length of object.toString +---*/ var __instance = new Object(); __instance.substring = String.prototype.substring; @@ -19,4 +21,3 @@ if (__instance.substring(8, __instance.toString().length) !== "Object]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T7.js index 2c91e0230a..0294a60cc7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T7.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T7.js - * @description Apply String.prototype.substring to Object instance. Call instance.substring(...).substring(...) - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T7 +description: > + Apply String.prototype.substring to Object instance. Call + instance.substring(...).substring(...) +---*/ var __instance = { toString: function() { return "function(){}";} }; @@ -20,4 +22,3 @@ if (__instance.substring(-Infinity,8) !== "function") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T8.js index a20213314d..d36140f05b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T8.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T8.js - * @description Apply String.prototype.substring to Number instance. Start is Infinity, end is NaN - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T8 +description: > + Apply String.prototype.substring to Number instance. Start is + Infinity, end is NaN +---*/ var __instance = new Number(NaN); @@ -20,4 +22,3 @@ if (__instance.substring(Infinity, NaN) !== "NaN") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T9.js index 1d7aff7f17..64ab3bd9b3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T9.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring (start, end) can be applied to non String object instance and - * returns a string value(not object) - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A3_T9.js - * @description Apply String.prototype.substring to Math instance. Start is Math.PI, end is -10 - */ +/*--- +info: > + String.prototype.substring (start, end) can be applied to non String object instance and + returns a string value(not object) +es5id: 15.5.4.15_A3_T9 +description: > + Apply String.prototype.substring to Math instance. Start is + Math.PI, end is -10 +---*/ var __instance = Math; @@ -20,4 +22,3 @@ if (__instance.substring(Math.PI, -10) !== "[ob") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A6.js index fd74266282..bc4cccb709 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A6.js - * @description Checking String.prototype.substring.prototype - */ +/*--- +info: String.prototype.substring has not prototype property +es5id: 15.5.4.15_A6 +description: Checking String.prototype.substring.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.substring.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A7.js index fc7c4c502c..725f5fe458 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.substring can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A7.js - * @description Checking if creating the String.prototype.substring object fails - */ +/*--- +info: String.prototype.substring can't be used as constructor +es5id: 15.5.4.15_A7 +description: Checking if creating the String.prototype.substring object fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var __FACTORY = String.prototype.substring; @@ -19,4 +21,3 @@ try { } $PRINT(e); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A8.js index 985519c119..9409caef42 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.substring.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A8.js - * @description Checking if enumerating the String.prototype.substring.length property fails - */ +/*--- +info: The String.prototype.substring.length property has the attribute DontEnum +es5id: 15.5.4.15_A8 +description: > + Checking if enumerating the String.prototype.substring.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A9.js index 3c16906948..cb9bd3a3b2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.substring.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A9.js - * @description Checking if deleting the String.prototype.substring.length property fails - */ +/*--- +info: > + The String.prototype.substring.length property has the attribute + DontDelete +es5id: 15.5.4.15_A9 +description: > + Checking if deleting the String.prototype.substring.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.substring.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A10.js index 1f44aace0e..c502bbd510 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLowerCase.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A10.js - * @description Checking if varying the String.prototype.toLowerCase.length property fails - */ +/*--- +info: > + The String.prototype.toLowerCase.length property has the attribute + ReadOnly +es5id: 15.5.4.16_A10 +description: > + Checking if varying the String.prototype.toLowerCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +31,3 @@ if (String.prototype.toLowerCase.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A11.js index dfb8858996..f05e554ca4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toLowerCase method is 0 - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A11.js - * @description Checking String.prototype.toLowerCase.length - */ +/*--- +info: The length property of the toLowerCase method is 0 +es5id: 15.5.4.16_A11 +description: Checking String.prototype.toLowerCase.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.toLowerCase.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T1.js index 203f7abedf..62a744bc9c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T1.js - * @description Arguments is true, and instance is object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T1 +description: Arguments is true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.toLowerCase() !== "true") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T10.js index 26b9fb973b..8e5b25c867 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T10.js - * @description Call toLowerCase() function of object with overrode toString function - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T10 +description: > + Call toLowerCase() function of object with overrode toString + function +---*/ var __obj = {toString:function(){return "\u0041B";}} __obj.toLowerCase = String.prototype.toLowerCase; @@ -19,4 +20,3 @@ if (__obj.toLowerCase() !=="ab") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T11.js index ec622d8140..d167a5be40 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T11.js - * @description Override toString function, toString throw exception, then call toLowerCase() function for this object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T11 +description: > + Override toString function, toString throw exception, then call + toLowerCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}} __obj.toLowerCase = String.prototype.toLowerCase; @@ -23,4 +25,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T12.js index 4653f73fd5..d38a9a0bba 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T12.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T12.js - * @description Override toString and valueOf functions, valueOf throw exception, then call toLowerCase() function for this object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T12 +description: > + Override toString and valueOf functions, valueOf throw exception, + then call toLowerCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}} __obj.toLowerCase = String.prototype.toLowerCase; @@ -23,4 +25,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T13.js index 2343921488..2b3e12789d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T13.js - * @description Override toString and valueOf functions, then call toLowerCase() function for this object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T13 +description: > + Override toString and valueOf functions, then call toLowerCase() + function for this object +---*/ var __obj = {toString:function(){return {};},valueOf:function(){return 1;}} __obj.toLowerCase = String.prototype.toLowerCase; @@ -26,4 +27,3 @@ if (__obj.toLowerCase().length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T14.js index 9ac4399d3f..5693649fa7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T14.js - * @description Call toLowerCase() function for RegExp object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T14 +description: Call toLowerCase() function for RegExp object +---*/ var __reg = new RegExp("ABC"); __reg.toLowerCase = String.prototype.toLowerCase; @@ -18,4 +17,3 @@ if (__reg.toLowerCase() !== "/abc/") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T2.js index 47f82dac3b..f9619c8a8b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T2.js - * @description Instance is Boolean object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T2 +description: Instance is Boolean object +---*/ __instance = new Boolean; @@ -19,4 +18,3 @@ if (__instance.toLowerCase() !== "false") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T3.js index 54139f5ddb..35a215e6f3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T3.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T3 +description: Checking by using eval +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (eval("\"BJ\"").toLowerCase() !== "bj") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T4.js index 90bfba9842..145ad95bdb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T4.js - * @description Call toLowerCase() function without arguments of string and from empty string - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T4 +description: > + Call toLowerCase() function without arguments of string and from + empty string +---*/ var __lowerCase = "".toLowerCase(); @@ -43,4 +44,3 @@ if (__lowerCase[0]!==__expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T5.js index 5ce9cf4865..0082c8caf4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T5.js - * @description Call toLowerCase() function for function call - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T5 +description: Call toLowerCase() function for function call +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "GnulLuNa"}().toLowerCase() !== "gnulluna") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T6.js index 74c3849c31..915b9bc6a2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T6.js - * @description Call toLowerCase() function of Number.NEGATIVE_INFINITY - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T6 +description: Call toLowerCase() function of Number.NEGATIVE_INFINITY +---*/ Number.prototype.toLowerCase = String.prototype.toLowerCase; @@ -17,6 +16,3 @@ if ((Number.NEGATIVE_INFINITY).toLowerCase() !== "-infinity") { } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T7.js index e348fe4bf1..efb0be3d41 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T7.js - * @description Call toLowerCase() function of NaN - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T7 +description: Call toLowerCase() function of NaN +---*/ Number.prototype.toLowerCase = String.prototype.toLowerCase; @@ -17,4 +16,3 @@ if (NaN.toLowerCase()!== "nan") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T8.js index 304e769471..12d8e4982d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T8.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T8.js - * @description Call toLowerCase() function of Infinity - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T8 +description: Call toLowerCase() function of Infinity +---*/ Number.prototype.toLowerCase = String.prototype.toLowerCase; if (Infinity.toLowerCase()!== "infinity") { $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; Infinity.toLowerCase()=== "infinity". Actual: '+Infinity.toLowerCase()); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T9.js index 491617d2af..713b5ced90 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A1_T9.js - * @description Call toLowerCase() function of string object - */ +/*--- +info: String.prototype.toLowerCase() +es5id: 15.5.4.16_A1_T9 +description: Call toLowerCase() function of string object +---*/ var __obj = { valueOf:function(){}, @@ -50,4 +49,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A2_T1.js index 1c9eb51025..23824d463e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase() return a string, but not a String object - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A2_T1.js - * @description Checking returned result - */ +/*--- +info: String.prototype.toLowerCase() return a string, but not a String object +es5id: 15.5.4.16_A2_T1 +description: Checking returned result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -31,4 +30,3 @@ if ("Hello, WoRlD!".toLowerCase() ===new String("hello, world!")) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A6.js index c041b10fd6..4504be730f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A6.js - * @description Checking String.prototype.toLowerCase.prototype - */ +/*--- +info: String.prototype.toLowerCase has not prototype property +es5id: 15.5.4.16_A6 +description: Checking String.prototype.toLowerCase.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.toLowerCase.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A7.js index 263b4bc380..87deaeff8f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A7.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLowerCase can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A7.js - * @description Checking if creating the String.prototype.toLowerCase object fails - */ +/*--- +info: String.prototype.toLowerCase can't be used as constructor +es5id: 15.5.4.16_A7 +description: Checking if creating the String.prototype.toLowerCase object fails +includes: [$FAIL.js] +---*/ var __FACTORY = String.prototype.toLowerCase; @@ -18,5 +18,3 @@ try { $ERROR('#1.1: var __FACTORY = String.prototype.toLowerCase; "__instance = new __FACTORY" throws a TypeError. Actual: ' + (e)); } }; - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A8.js index 3c155cce3a..a8439e5527 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLowerCase.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A8.js - * @description Checking if enumerating the String.prototype.toLowerCase.length property fails - */ +/*--- +info: > + The String.prototype.toLowerCase.length property has the attribute + DontEnum +es5id: 15.5.4.16_A8 +description: > + Checking if enumerating the String.prototype.toLowerCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +42,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A9.js index f559e4c29c..bac6729b6a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLowerCase.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A9.js - * @description Checking if deleting the String.prototype.toLowerCase.length property fails - */ +/*--- +info: > + The String.prototype.toLowerCase.length property has the attribute + DontDelete +es5id: 15.5.4.16_A9 +description: > + Checking if deleting the String.prototype.toLowerCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.toLowerCase.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A10.js index a702ec2cec..c9af9c15c0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLocaleLowerCase.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A10.js - * @description Checking if varying the String.prototype.toLocaleLowerCase.length property fails - */ +/*--- +info: > + The String.prototype.toLocaleLowerCase.length property has the attribute + ReadOnly +es5id: 15.5.4.17_A10 +description: > + Checking if varying the String.prototype.toLocaleLowerCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +31,3 @@ if (String.prototype.toLocaleLowerCase.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A11.js index 3fd223e903..c6ca64f03c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toLocaleLowerCase method is 0 - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A11.js - * @description Checking String.prototype.toLocaleLowerCase.length - */ +/*--- +info: The length property of the toLocaleLowerCase method is 0 +es5id: 15.5.4.17_A11 +description: Checking String.prototype.toLocaleLowerCase.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.toLocaleLowerCase.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T1.js index 84029609f2..b929ade1d6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T1.js - * @description Arguments is true, and instance is object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T1 +description: Arguments is true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.toLocaleLowerCase() !== "true") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T10.js index 73445f1a15..cfdc535d82 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T10.js - * @description Call toLocaleLowerCase() function of object with overrode toString function - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T10 +description: > + Call toLocaleLowerCase() function of object with overrode toString + function +---*/ var __obj = {toString:function(){return "\u0041B";}} __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -18,4 +19,3 @@ if (__obj.toLocaleLowerCase() !=="ab") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T11.js index 6b99d97758..5512af2587 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T11.js - * @description Override toString function, toString throw exception, then call toLocaleLowerCase() function for this object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T11 +description: > + Override toString function, toString throw exception, then call + toLocaleLowerCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}} __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -23,4 +25,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T12.js index 20cfc2a604..6e1693a919 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T12.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T12.js - * @description Override toString and valueOf functions, valueOf throw exception, then call toLocaleLowerCase() function for this object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T12 +description: > + Override toString and valueOf functions, valueOf throw exception, + then call toLocaleLowerCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}} __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -23,4 +25,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T13.js index 3a229454e8..eb19ac07cf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T13.js - * @description Override toString and valueOf functions, then call toLocaleLowerCase() function for this object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T13 +description: > + Override toString and valueOf functions, then call + toLocaleLowerCase() function for this object +---*/ var __obj = {toString:function(){return {};},valueOf:function(){return 1;}} __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -26,4 +27,3 @@ if (__obj.toLocaleLowerCase().length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T14.js index 8e474fbb2e..95da90ec3b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T14.js - * @description Call toLocaleLowerCase() function for RegExp object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T14 +description: Call toLocaleLowerCase() function for RegExp object +---*/ var __reg = new RegExp("ABC"); __reg.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -18,4 +17,3 @@ if (__reg.toLocaleLowerCase() !== "/abc/") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T2.js index 125a18a77d..d20cef4b27 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T2.js - * @description Instance is Boolean object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T2 +description: Instance is Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +18,3 @@ if (__instance.toLocaleLowerCase() !== "false") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T3.js index e74aa0758c..00eca997aa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T3.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T3 +description: Checking by using eval +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (eval("\"BJ\"").toLocaleLowerCase() !== "bj") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T4.js index b229a10eeb..04b36119a0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T4.js - * @description Call toLocaleLowerCase() function without arguments of string and from empty string - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T4 +description: > + Call toLocaleLowerCase() function without arguments of string and + from empty string +---*/ var __lowerCase = "".toLocaleLowerCase(); @@ -43,4 +44,3 @@ if (__lowerCase[0]!==__expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T5.js index ebf6c4f414..fb3d251430 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T5.js - * @description Call toLocaleLowerCase() function for function call - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T5 +description: Call toLocaleLowerCase() function for function call +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "GnulLuNa"}().toLocaleLowerCase() !== "gnulluna") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T6.js index 0f3a4999ed..6339d00116 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T6.js - * @description Call toLocaleLowerCase() function of Number.NEGATIVE_INFINITY - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T6 +description: Call toLocaleLowerCase() function of Number.NEGATIVE_INFINITY +---*/ Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -17,4 +16,3 @@ if ((Number.NEGATIVE_INFINITY).toLocaleLowerCase() !== "-infinity") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T7.js index c85cbc2975..fcd3a61e20 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T7.js - * @description Call toLocaleLowerCase() function of NaN - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T7 +description: Call toLocaleLowerCase() function of NaN +---*/ Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; @@ -17,4 +16,3 @@ if (NaN.toLocaleLowerCase()!== "nan") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T8.js index 767b6f4af9..17ccebbee1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T8.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T8.js - * @description Call toLocaleLowerCase() function of Infinity - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T8 +description: Call toLocaleLowerCase() function of Infinity +---*/ Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; if (Infinity.toLocaleLowerCase()!== "infinity") { $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; Infinity.toLocaleLowerCase()=== "infinity". Actual: '+Infinity.toLocaleLowerCase()); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T9.js index c73249b6c9..94129acfc1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A1_T9.js - * @description Call toLocaleLowerCase() function of string object - */ +/*--- +info: String.prototype.toLocaleLowerCase() +es5id: 15.5.4.17_A1_T9 +description: Call toLocaleLowerCase() function of string object +---*/ var __obj = { valueOf:function(){}, @@ -51,4 +50,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A2_T1.js index 012b0af9ff..c5992faf9d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase() return a string, but not a String object - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A2_T1.js - * @description Checking returned result - */ +/*--- +info: > + String.prototype.toLocaleLowerCase() return a string, but not a String + object +es5id: 15.5.4.17_A2_T1 +description: Checking returned result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -31,4 +32,3 @@ if ("Hello, WoRlD!".toLocaleLowerCase() === new String("hello, world!")) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A6.js index 588d8b5cf4..de23fd2e54 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A6.js - * @description Checking String.prototype.toLocaleLowerCase.prototype - */ +/*--- +info: String.prototype.toLocaleLowerCase has not prototype property +es5id: 15.5.4.17_A6 +description: Checking String.prototype.toLocaleLowerCase.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.toLocaleLowerCase.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A7.js index 7e7ad4d470..1092cb0b43 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A7.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleLowerCase can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A7.js - * @description Checking if creating the String.prototype.toLocaleLowerCase object fails - */ +/*--- +info: String.prototype.toLocaleLowerCase can't be used as constructor +es5id: 15.5.4.17_A7 +description: > + Checking if creating the String.prototype.toLocaleLowerCase object + fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var __FACTORY = String.prototype.toLocaleLowerCase; @@ -19,4 +23,3 @@ try { } $PRINT(e); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A8.js index f60e7d9e81..2db5d4b022 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLocaleLowerCase.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A8.js - * @description Checking if enumerating the String.prototype.toLocaleLowerCase.length property fails - */ +/*--- +info: > + The String.prototype.toLocaleLowerCase.length property has the attribute + DontEnum +es5id: 15.5.4.17_A8 +description: > + Checking if enumerating the + String.prototype.toLocaleLowerCase.length property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +42,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A9.js index 9033c64c5c..6fe0ae45c8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLocaleLowerCase.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A9.js - * @description Checking if deleting the String.prototype.toLocaleLowerCase.length property fails - */ +/*--- +info: > + The String.prototype.toLocaleLowerCase.length property has the attribute + DontDelete +es5id: 15.5.4.17_A9 +description: > + Checking if deleting the String.prototype.toLocaleLowerCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A10.js index 98f3bdd847..af453646f7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toUpperCase.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A10.js - * @description Checking if varying the String.prototype.toUpperCase.length property fails - */ +/*--- +info: > + The String.prototype.toUpperCase.length property has the attribute + ReadOnly +es5id: 15.5.4.18_A10 +description: > + Checking if varying the String.prototype.toUpperCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +31,3 @@ if (String.prototype.toUpperCase.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A11.js index b6a2b2bf4a..3747a63f45 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toUpperCase method is 0 - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A11.js - * @description Checking String.prototype.toUpperCase.length - */ +/*--- +info: The length property of the toUpperCase method is 0 +es5id: 15.5.4.18_A11 +description: Checking String.prototype.toUpperCase.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.toUpperCase.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T1.js index c67e6f9cdf..951eafd2c5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T1.js - * @description Arguments is true, and instance is object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T1 +description: Arguments is true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.toUpperCase() !== "TRUE") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T10.js index 95eadfd0ab..0da16d8962 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T10.js - * @description Call toUpperCase() function of object with overrode toString function - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T10 +description: > + Call toUpperCase() function of object with overrode toString + function +---*/ var __obj = {toString:function(){return "\u0041b";}} __obj.toUpperCase = String.prototype.toUpperCase; @@ -18,4 +19,3 @@ if (__obj.toUpperCase() !=="AB") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T11.js index ebc278f9b0..5a8a2dd022 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T11.js - * @description Override toString function, toString throw exception, then call toUpperCase() function for this object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T11 +description: > + Override toString function, toString throw exception, then call + toUpperCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}} __obj.toUpperCase = String.prototype.toUpperCase; @@ -22,4 +24,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T12.js index 2ffd076dfc..d67c6adafb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T12.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T12.js - * @description Override toString and valueOf functions, valueOf throw exception, then call toUpperCase() function for this object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T12 +description: > + Override toString and valueOf functions, valueOf throw exception, + then call toUpperCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}} __obj.toUpperCase = String.prototype.toUpperCase; @@ -22,4 +24,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T13.js index 943aaf196b..f3c9080f89 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T13.js - * @description Override toString and valueOf functions, then call toUpperCase() function for this object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T13 +description: > + Override toString and valueOf functions, then call toUpperCase() + function for this object +---*/ var __obj = {toString:function(){return {};},valueOf:function(){return 1;}} __obj.toUpperCase = String.prototype.toUpperCase; @@ -26,4 +27,3 @@ if (__obj.toUpperCase().length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T14.js index b292c07e48..38d64db468 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T14.js - * @description Call toUpperCase() function of RegExp object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T14 +description: Call toUpperCase() function of RegExp object +---*/ var __reg = new RegExp("abc"); __reg.toUpperCase = String.prototype.toUpperCase; @@ -17,4 +16,3 @@ if (__reg.toUpperCase() !== "/ABC/") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T2.js index ab7f4a9371..e07861a9e8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T2.js - * @description Instance is Boolean object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T2 +description: Instance is Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +18,3 @@ if (__instance.toUpperCase() !== "FALSE") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T3.js index 9718313aea..127023d0d5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T3.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T3 +description: Checking by using eval +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (eval("\"bj\"").toUpperCase() !== "BJ") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T4.js index 431961181e..a0f71334a6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T4.js - * @description Call toUpperCase() function without arguments of string and from empty string - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T4 +description: > + Call toUpperCase() function without arguments of string and from + empty string +---*/ var __lowerCase = "".toUpperCase(); @@ -43,4 +44,3 @@ if (__lowerCase[0]!==__expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T5.js index 00befc9749..1e179135b3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T5.js - * @description Call toUpperCase() function of function call - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T5 +description: Call toUpperCase() function of function call +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "GnulLuNa"}().toUpperCase() !== "GNULLUNA") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T6.js index 5c48ce7956..85fc4f0e3f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T6.js - * @description Call toUpperCase() function of Number.NEGATIVE_INFINITY - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T6 +description: Call toUpperCase() function of Number.NEGATIVE_INFINITY +---*/ Number.prototype.toUpperCase = String.prototype.toUpperCase; @@ -17,4 +16,3 @@ if ((Number.NEGATIVE_INFINITY).toUpperCase() !== "-INFINITY") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T7.js index 045d733713..d5ea871405 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T7.js - * @description Call toUpperCase() function of NaN - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T7 +description: Call toUpperCase() function of NaN +---*/ Number.prototype.toUpperCase = String.prototype.toUpperCase; @@ -17,4 +16,3 @@ if (NaN.toUpperCase()!== "NAN") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T8.js index 41f695e987..289d7d1d71 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T8.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T8.js - * @description Call toUpperCase() function of Infinity; - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T8 +description: Call toUpperCase() function of Infinity; +---*/ Number.prototype.toUpperCase = String.prototype.toUpperCase; if (Infinity.toUpperCase()!== "INFINITY") { $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; Infinity.toUpperCase()=== "INFINITY". Actual: '+Infinity.toUpperCase()); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T9.js index bdf3e1f0d0..10a3f1b23b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A1_T9.js - * @description Call toUpperCase() function of string object - */ +/*--- +info: String.prototype.toUpperCase() +es5id: 15.5.4.18_A1_T9 +description: Call toUpperCase() function of string object +---*/ var __obj = { valueOf:function(){}, @@ -50,4 +49,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A2_T1.js index 2a3aee0e7d..b6b76ea34d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase() return a string, but not a String object - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A2_T1.js - * @description Checking returned result - */ +/*--- +info: String.prototype.toUpperCase() return a string, but not a String object +es5id: 15.5.4.18_A2_T1 +description: Checking returned result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -31,4 +30,3 @@ if ("Hello, WoRlD!".toUpperCase() ===new String("HELLO, WORLD!")) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A6.js index 2361543915..e870a1a9be 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A6.js - * @description Checking String.prototype.toUpperCase.prototype - */ +/*--- +info: String.prototype.toUpperCase has not prototype property +es5id: 15.5.4.18_A6 +description: Checking String.prototype.toUpperCase.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.toUpperCase.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A7.js index 1f443008ad..fc9aae0818 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A7.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toUpperCase can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A7.js - * @description Checking if creating the String.prototype.toUpperCase object fails - */ +/*--- +info: String.prototype.toUpperCase can't be used as constructor +es5id: 15.5.4.18_A7 +description: Checking if creating the String.prototype.toUpperCase object fails +includes: [$FAIL.js] +---*/ var __FACTORY = String.prototype.toUpperCase; @@ -18,4 +18,3 @@ try { $ERROR('#1.1: var __FACTORY = String.prototype.toUpperCase; "__instance = new __FACTORY" throw a TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A8.js index ffd0737e9e..15e5053796 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toUpperCase.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A8.js - * @description Checking if enumerating the String.prototype.toUpperCase.length property fails - */ +/*--- +info: > + The String.prototype.toUpperCase.length property has the attribute + DontEnum +es5id: 15.5.4.18_A8 +description: > + Checking if enumerating the String.prototype.toUpperCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +42,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A9.js index 575fddb02b..372c062626 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toUpperCase.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A9.js - * @description Checking if deleting the String.prototype.toUpperCase.length property fails - */ +/*--- +info: > + The String.prototype.toUpperCase.length property has the attribute + DontDelete +es5id: 15.5.4.18_A9 +description: > + Checking if deleting the String.prototype.toUpperCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.toUpperCase.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A10.js index 8be67c2ccf..a1f314bd6a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLocaleUpperCase.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A10.js - * @description Checking if varying the String.prototype.toLocaleUpperCase.length property fails - */ +/*--- +info: > + The String.prototype.toLocaleUpperCase.length property has the attribute + ReadOnly +es5id: 15.5.4.19_A10 +description: > + Checking if varying the String.prototype.toLocaleUpperCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +31,3 @@ if (String.prototype.toLocaleUpperCase.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A11.js index 5d00ec411f..da53d2892c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toLocaleUpperCase method is 0 - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A11.js - * @description Checking String.prototype.toLocaleUpperCase.length - */ +/*--- +info: The length property of the toLocaleUpperCase method is 0 +es5id: 15.5.4.19_A11 +description: Checking String.prototype.toLocaleUpperCase.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.toLocaleUpperCase.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T1.js index 1a5c847eda..e58f9b38a0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T1.js - * @description Arguments is true, and instance is object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T1 +description: Arguments is true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.toLocaleUpperCase() !== "TRUE") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T10.js index 20d2f9ec11..6bcc86f589 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T10.js - * @description Call toLocaleUpperCase() function of object with overrode toString function - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T10 +description: > + Call toLocaleUpperCase() function of object with overrode toString + function +---*/ var __obj = {toString:function(){return "\u0041b";}} __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -18,4 +19,3 @@ if (__obj.toLocaleUpperCase() !=="AB") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T11.js index 2cb6d82e2e..86266e92d9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T11.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T11.js - * @description Override toString function, toString throw exception, then call toLocaleUpperCase() function for this object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T11 +description: > + Override toString function, toString throw exception, then call + toLocaleUpperCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}} __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -22,4 +24,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T12.js index 8f50b6ff7f..7936b15296 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T12.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T12.js - * @description Override toString and valueOf functions, valueOf throw exception, then call toLocaleUpperCase() function for this object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T12 +description: > + Override toString and valueOf functions, valueOf throw exception, + then call toLocaleUpperCase() function for this object +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}} __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -22,4 +24,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T13.js index ee407e2d59..3b1b61817a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T13.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T13.js - * @description Override toString and valueOf functions, then call toLocaleUpperCase() function for this object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T13 +description: > + Override toString and valueOf functions, then call + toLocaleUpperCase() function for this object +---*/ var __obj = {toString:function(){return {};},valueOf:function(){return 1;}} __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -25,4 +26,3 @@ if (__obj.toLocaleUpperCase().length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T14.js index 62a343b5c5..8c2104cc7f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T14.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T14.js - * @description Call toLocaleUpperCase() function for RegExp object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T14 +description: Call toLocaleUpperCase() function for RegExp object +---*/ var __reg = new RegExp("abc"); __reg.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -17,4 +16,3 @@ if (__reg.toLocaleUpperCase() !== "/ABC/") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T2.js index 72acb65e31..425c58fc1d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T2.js - * @description Instance is Boolean object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T2 +description: Instance is Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +18,3 @@ if (__instance.toLocaleUpperCase() !== "FALSE") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T3.js index 021fe7abda..1de801a89d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T3.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T3 +description: Checking by using eval +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (eval("\"bj\"").toLocaleUpperCase() !== "BJ") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T4.js index 3f4280378d..3cea1ebf09 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T4.js - * @description Call toLocaleUpperCase() function without arguments of string and from empty string - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T4 +description: > + Call toLocaleUpperCase() function without arguments of string and + from empty string +---*/ var __lowerCase = "".toLocaleUpperCase(); var __expected = ""; @@ -42,4 +43,3 @@ if (__lowerCase[0]!==__expected[0]) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T5.js index 1a341f4f08..f1da201203 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T5.js - * @description Call toLocaleUpperCase() function of function call - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T5 +description: Call toLocaleUpperCase() function of function call +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "GnulLuNa"}().toLocaleUpperCase() !== "GNULLUNA") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T6.js index a365a6305e..5088fcb8d9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T6.js - * @description Call toLocaleUpperCase() function of Number.NEGATIVE_INFINITY - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T6 +description: Call toLocaleUpperCase() function of Number.NEGATIVE_INFINITY +---*/ Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -17,5 +16,3 @@ if ((Number.NEGATIVE_INFINITY).toLocaleUpperCase() !== "-INFINITY") { } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T7.js index 24789c2fda..0c710d629e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T7.js - * @description Call toLocaleUpperCase() function of NaN - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T7 +description: Call toLocaleUpperCase() function of NaN +---*/ Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; @@ -17,4 +16,3 @@ if (NaN.toLocaleUpperCase()!== "NAN") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T8.js index a1ab41573a..968e66738f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T8.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T8.js - * @description Call toLocaleUpperCase() function of Infinity - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T8 +description: Call toLocaleUpperCase() function of Infinity +---*/ Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; if (Infinity.toLocaleUpperCase()!== "INFINITY") { $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; Infinity.toLocaleUpperCase()=== "INFINITY". Actual: '+Infinity.toLocaleUpperCase()); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T9.js index 39e3aef5a4..debdee1ddc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T9.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A1_T9.js - * @description Call toLocaleUpperCase() function of string object - */ +/*--- +info: String.prototype.toLocaleUpperCase() +es5id: 15.5.4.19_A1_T9 +description: Call toLocaleUpperCase() function of string object +---*/ var __obj = { valueOf:function(){}, @@ -50,4 +49,3 @@ for(var index=0; index<__expected.length; index++) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A2_T1.js index 210ec9b82e..0782ca8baa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A2_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase() return a string, but not a String object - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A2_T1.js - * @description Checking returned result - */ +/*--- +info: > + String.prototype.toLocaleUpperCase() return a string, but not a String + object +es5id: 15.5.4.19_A2_T1 +description: Checking returned result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -31,4 +32,3 @@ if ("Hello, WoRlD!".toLocaleUpperCase() ===new String("HELLO, WORLD!")) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A6.js index 59a8fb70a6..498dbfaa59 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A6.js - * @description Checking String.prototype.toLocaleUpperCase.prototype - */ +/*--- +info: String.prototype.toLocaleUpperCase has not prototype property +es5id: 15.5.4.19_A6 +description: Checking String.prototype.toLocaleUpperCase.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.toLocaleUpperCase.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A7.js index d5ac01624f..609cc09ea8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toLocaleUpperCase can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A7.js - * @description Checking if creating the String.prototype.toLocaleUpperCase object fails - */ +/*--- +info: String.prototype.toLocaleUpperCase can't be used as constructor +es5id: 15.5.4.19_A7 +description: > + Checking if creating the String.prototype.toLocaleUpperCase object + fails +includes: [$FAIL.js] +---*/ var __FACTORY = String.prototype.toLocaleUpperCase; @@ -18,4 +20,3 @@ try { $ERROR('#1.1: var __instance = new __FACTORY; Object has no construct lead a TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A8.js index a2bea7095f..0791e334cd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLocaleUpperCase.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A8.js - * @description Checking if enumerating the String.prototype.toLocaleUpperCase.length property fails - */ +/*--- +info: > + The String.prototype.toLocaleUpperCase.length property has the attribute + DontEnum +es5id: 15.5.4.19_A8 +description: > + Checking if enumerating the + String.prototype.toLocaleUpperCase.length property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +42,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A9.js index 05c09831e7..87b467287d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.toLocaleUpperCase.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A9.js - * @description Checking if deleting the String.prototype.toLocaleUpperCase.length property fails - */ +/*--- +info: > + The String.prototype.toLocaleUpperCase.length property has the attribute + DontDelete +es5id: 15.5.4.19_A9 +description: > + Checking if deleting the String.prototype.toLocaleUpperCase.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js index 79169e5ea1..2a069ab1ad 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js - * @description String.prototype.trim must exist as a function - */ - - -function testcase() { - var f = String.prototype.trim; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-0-1 +description: String.prototype.trim must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = String.prototype.trim; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js index b398bbbfd2..c1d7da170f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js - * @description String.prototype.trim must exist as a function taking 0 parameters - */ - - -function testcase() { - if (String.prototype.trim.length === 0) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-0-2 +description: String.prototype.trim must exist as a function taking 0 parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + if (String.prototype.trim.length === 0) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js index 25ed95e5e7..99f3500c9c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js - * @description String.prototype.trim throws TypeError when string is undefined - */ - - -function testcase() { - try - { - String.prototype.trim.call(undefined); - return false; - } - catch(e) - { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-1 +description: String.prototype.trim throws TypeError when string is undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + String.prototype.trim.call(undefined); + return false; + } + catch(e) + { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js index 59fbdf1c00..a4d4a28b9f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js @@ -1,23 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js - * @description String.prototype.trim throws TypeError when string is null - */ - - -function testcase() { - try - { - String.prototype.trim.call(null); - return false; - } - catch(e) - { - return e instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-2 +description: String.prototype.trim throws TypeError when string is null +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + String.prototype.trim.call(null); + return false; + } + catch(e) + { + return e instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js index 44d698147b..766d9a37c1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js - * @description String.prototype.trim works for primitive type boolean - */ - - -function testcase() { - try - { - if(String.prototype.trim.call(true) == "true") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-3 +description: String.prototype.trim works for primitive type boolean +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + if(String.prototype.trim.call(true) == "true") + return true; + } + catch(e) + { + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js index 45427be32c..93f472457d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js - * @description String.prototype.trim works for primitive type number - */ - - -function testcase() { - try - { - if(String.prototype.trim.call(0) == "0") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-4 +description: String.prototype.trim works for primitive type number +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + if(String.prototype.trim.call(0) == "0") + return true; + } + catch(e) + { + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js index 5a52aefb4b..459bbbebad 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js - * @description String.prototype.trim works for an Object - */ - - -function testcase() { - try - { - if(String.prototype.trim.call({})=="[object Object]") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-5 +description: String.prototype.trim works for an Object +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + if(String.prototype.trim.call({})=="[object Object]") + return true; + } + catch(e) + { + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js index 58cc06917a..4b3cb22500 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js - * @description String.prototype.trim works for an String - */ - - -function testcase() { - try - { - if(String.prototype.trim.call(new String()) == "") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-6 +description: String.prototype.trim works for an String +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + if(String.prototype.trim.call(new String()) == "") + return true; + } + catch(e) + { + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js index eeba20fd9a..33e35d11de 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js - * @description String.prototype.trim works for a primitive string - */ - - -function testcase() { - try - { - if(String.prototype.trim.call("abc") === "abc") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-7 +description: String.prototype.trim works for a primitive string +includes: [runTestCase.js] +---*/ + +function testcase() { + try + { + if(String.prototype.trim.call("abc") === "abc") + return true; + } + catch(e) + { + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-8.js index 834bcd3c83..dcbd5c74ff 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-8.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-8.js - * @description String.prototype.trim works for a primitive string (value is ' abc') - */ - - -function testcase() { - var strObj = String(" abc"); - return "abc" === strObj.trim() && strObj.toString() === " abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-8 +description: > + String.prototype.trim works for a primitive string (value is ' + abc') +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = String(" abc"); + return "abc" === strObj.trim() && strObj.toString() === " abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-9.js index d7e1e12756..ee04f756fb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-9.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-9.js - * @description String.prototype.trim works for a String object which value is undefined - */ - - -function testcase() { - var strObj = new String(undefined); - return strObj.trim() === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-1-9 +description: > + String.prototype.trim works for a String object which value is + undefined +includes: [runTestCase.js] +---*/ + +function testcase() { + var strObj = new String(undefined); + return strObj.trim() === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-1.js index 9c9163894e..eae2b148ba 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-1.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-1.js - * @description String.prototype.trim - argument 'this' is a boolean whose value is false - */ - - -function testcase() { - return String.prototype.trim.call(false) === "false"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-1 +description: > + String.prototype.trim - argument 'this' is a boolean whose value + is false +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(false) === "false"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-10.js index 799243a292..3c1bd5d739 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-10.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-10.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is +Infinity) - */ - - -function testcase() { - return String.prototype.trim.call(+Infinity) === "Infinity"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-10 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is +Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(+Infinity) === "Infinity"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-11.js index 0308442553..cbdef3ecde 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-11.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-11.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is -Infinity) - */ - - -function testcase() { - return String.prototype.trim.call(-Infinity) === "-Infinity"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-11 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is -Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(-Infinity) === "-Infinity"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12.js index ee786b0bc0..dbe90c8d48 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 20 zeros)) - */ - - -function testcase() { - return String.prototype.trim.call(100000000000000000000) === "100000000000000000000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-12 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1(following 20 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(100000000000000000000) === "100000000000000000000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-13.js index 3018d93bf1..a711a4904b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-13.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-13.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 21 zeros)) - */ - - -function testcase() { - return String.prototype.trim.call(1000000000000000000000) === "1e+21"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-13 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1(following 21 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1000000000000000000000) === "1e+21"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-14.js index 9e7d0863f4..ed0281f08b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-14.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-14.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 22 zeros)) - */ - - -function testcase() { - return String.prototype.trim.call(10000000000000000000000) === "1e+22"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-14 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1(following 22 zeros)) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(10000000000000000000000) === "1e+22"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js index 01f322384b..7687068138 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e+20) - */ - - -function testcase() { - return String.prototype.trim.call(1e+20) === "100000000000000000000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-15 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1e+20) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1e+20) === "100000000000000000000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-16.js index 49bbcae8d3..16150f83ef 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-16.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-16.js - * @description String.prototype.trim - argument 'this' is a number that converts to string (value is 1e+21) - */ - - -function testcase() { - return String.prototype.trim.call(1e+21) === "1e+21"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-16 +description: > + String.prototype.trim - argument 'this' is a number that converts + to string (value is 1e+21) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1e+21) === "1e+21"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-17.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-17.js index 311f850300..dc77bfb1c9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-17.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-17.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-17.js - * @description String.prototype.trim - argument 'this' is a number that converts to string (value is 1e+22) - */ - - -function testcase() { - return String.prototype.trim.call(1e+22) === "1e+22"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-17 +description: > + String.prototype.trim - argument 'this' is a number that converts + to string (value is 1e+22) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1e+22) === "1e+22"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18.js index a8338d4f3d..4d18fb6401 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 0.000001) - */ - - -function testcase() { - return String.prototype.trim.call(0.000001) === "0.000001"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-18 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 0.000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(0.000001) === "0.000001"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-19.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-19.js index 1697f61ad6..ff84b698a8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-19.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-19.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-19.js - * @description String.prototype.trim - argument argument 'this' is a number that converts to a string (value is 0.0000001) - */ - - -function testcase() { - return String.prototype.trim.call(0.0000001) === "1e-7"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-19 +description: > + String.prototype.trim - argument argument 'this' is a number that + converts to a string (value is 0.0000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(0.0000001) === "1e-7"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-2.js index f92684bde2..0714f532ea 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-2.js - * @description String.prototype.trim - argument 'this' is a boolean whose value is true - */ - - -function testcase() { - return String.prototype.trim.call(true) === "true"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-2 +description: > + String.prototype.trim - argument 'this' is a boolean whose value + is true +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(true) === "true"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-20.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-20.js index 80684263dc..4160752cbf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-20.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-20.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-20.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 0.00000001) - */ - - -function testcase() { - return String.prototype.trim.call(0.00000001) === "1e-8"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-20 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 0.00000001) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(0.00000001) === "1e-8"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-21.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-21.js index 2810c3826a..add279a618 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-21.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-21.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-21.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-7) - */ - - -function testcase() { - return String.prototype.trim.call(1e-7) === "1e-7"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-21 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1e-7) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1e-7) === "1e-7"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22.js index e6f2f06b91..2a539a2ae0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-6) - */ - - -function testcase() { - return String.prototype.trim.call(1e-6) === "0.000001"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-22 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1e-6) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1e-6) === "0.000001"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23.js index 7bbbc38c95..0ecdbd5f3a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-5) - */ - - -function testcase() { - return String.prototype.trim.call(1e-5) === "0.00001"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-23 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1e-5) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(1e-5) === "0.00001"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-24.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-24.js index 4fa0a95695..1cbb24d379 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-24.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-24.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-24.js - * @description String.prototype.trim - argument 'this' is an integer that converts to a string (value is 123) - */ - - -function testcase() { - return String.prototype.trim.call(123) === "123"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-24 +description: > + String.prototype.trim - argument 'this' is an integer that + converts to a string (value is 123) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(123) === "123"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-25.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-25.js index 6da83849f0..8f28a40e20 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-25.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-25.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-25.js - * @description String.prototype.trim - argument 'this' is a decimal that converts to a string (value is 123.456) - */ - - -function testcase() { - return String.prototype.trim.call(123.456) === "123.456"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-25 +description: > + String.prototype.trim - argument 'this' is a decimal that converts + to a string (value is 123.456) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(123.456) === "123.456"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26.js index 1897b31df8..bea1f77ea6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 20 zeros).123) - */ - - -function testcase() { - return String.prototype.trim.call(100000000000000000000.123) === "100000000000000000000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-26 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 1(following 20 zeros).123) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(100000000000000000000.123) === "100000000000000000000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-27.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-27.js index 5016000aac..da3aabeadb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-27.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-27.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-27.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 123.1234567) - */ - - -function testcase() { - return String.prototype.trim.call(123.1234567) === "123.1234567"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-27 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 123.1234567) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(123.1234567) === "123.1234567"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-28.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-28.js index 46d87e7b65..21cce1ccb2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-28.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-28.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-28.js - * @description String.prototype.trim - argument 'this' is an empty string - */ - - -function testcase() { - return String.prototype.trim.call("") === ""; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-28 +description: String.prototype.trim - argument 'this' is an empty string +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call("") === ""; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-29.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-29.js index 9dcbb5eda3..eef87a9049 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-29.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-29.js @@ -1,16 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-29.js - * @description String.prototype.trim - argument 'this' is a string(value is 'AB - * \cd') - */ - - -function testcase() { - return String.prototype.trim.call("AB\n\\cd") === "AB\n\\cd"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-29 +description: > + String.prototype.trim - argument 'this' is a string(value is 'AB + \cd') +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call("AB\n\\cd") === "AB\n\\cd"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-3.js index 2430fdb003..36899a2b00 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-3.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. - -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-3.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is NaN) - */ - -function testcase() { - return String.prototype.trim.call(NaN) === "NaN"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-3 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is NaN) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(NaN) === "NaN"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-30.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-30.js index 9008c60c48..fba75e5958 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-30.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-30.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-30.js - * @description String.prototype.trim - argument 'this' is a string(value is 'undefined') - */ - - -function testcase() { - return String.prototype.trim.call("undefined") === "undefined"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-30 +description: > + String.prototype.trim - argument 'this' is a string(value is + 'undefined') +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call("undefined") === "undefined"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-31.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-31.js index 6b4dc4baf0..81d5f3490e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-31.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-31.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-31.js - * @description String.prototype.trim - argument 'this' is a string(value is 'null') - */ - - -function testcase() { - return String.prototype.trim.call("null") === "null"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-31 +description: > + String.prototype.trim - argument 'this' is a string(value is + 'null') +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call("null") === "null"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-32.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-32.js index c1cf69927c..73e242f737 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-32.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-32.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-32.js - * @description String.prototype.trim - argument 'this' is a string(value is '123#$%abc') - */ - - -function testcase() { - return String.prototype.trim.call("123#$%abc") === "123#$%abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-32 +description: > + String.prototype.trim - argument 'this' is a string(value is + '123#$%abc') +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call("123#$%abc") === "123#$%abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-33.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-33.js index fc849ec9d7..1a34338a59 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-33.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-33.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-33.js - * @description String.prototype.trim - argument 'this' is a string(value is '1') - */ - - -function testcase() { - return String.prototype.trim.call("1") === "1"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-33 +description: String.prototype.trim - argument 'this' is a string(value is '1') +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call("1") === "1"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-34.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-34.js index 31cf3dfe74..a6f3ba4e08 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-34.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-34.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-34.js - * @description String.prototype.trim - 'this' is an array that converts to a string - */ - - -function testcase() { - return (String.prototype.trim.call([1]) === '1'); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-34 +description: > + String.prototype.trim - 'this' is an array that converts to a + string +includes: [runTestCase.js] +---*/ + +function testcase() { + return (String.prototype.trim.call([1]) === '1'); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-35.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-35.js index 5dd2f142aa..df4aa2ad4b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-35.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-35.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-35.js - * @description String.prototype.trim - 'this' is a String Object that converts to a string - */ - - -function testcase() { - return (String.prototype.trim.call(new String("abc")) === "abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-35 +description: > + String.prototype.trim - 'this' is a String Object that converts to + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + return (String.prototype.trim.call(new String("abc")) === "abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-36.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-36.js index 7ef134087d..46a5721d9d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-36.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-36.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-36.js - * @description String.prototype.trim - 'this' is a Boolean Object that converts to a string - */ - - -function testcase() { - return (String.prototype.trim.call(new Boolean(false)) === "false"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-36 +description: > + String.prototype.trim - 'this' is a Boolean Object that converts + to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + return (String.prototype.trim.call(new Boolean(false)) === "false"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-37.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-37.js index a10bfd477f..6e21892474 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-37.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-37.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-37.js - * @description String.prototype.trim - 'this' is a Number Object that converts to a string - */ - - -function testcase() { - return (String.prototype.trim.call(new Number(123)) === "123"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-37 +description: > + String.prototype.trim - 'this' is a Number Object that converts to + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + return (String.prototype.trim.call(new Number(123)) === "123"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-38.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-38.js index dcdb7ec195..4ee9b274f8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-38.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-38.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-38.js - * @description String.prototype.trim - 'this' is an object which has an own toString method - */ - - -function testcase() { - var obj = { - toString: function () { - return "abc"; - } - }; - - return (String.prototype.trim.call(obj) === "abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-38 +description: > + String.prototype.trim - 'this' is an object which has an own + toString method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + toString: function () { + return "abc"; + } + }; + + return (String.prototype.trim.call(obj) === "abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-39.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-39.js index 5cc60088fd..2ec9f3fa23 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-39.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-39.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-39.js - * @description String.prototype.trim - 'this' is an object which has an own valueOf method - */ - - -function testcase() { - var obj = { - valueOf: function () { - return "abc"; - } - }; - - return (String.prototype.trim.call(obj) === "[object Object]"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-39 +description: > + String.prototype.trim - 'this' is an object which has an own + valueOf method +includes: [runTestCase.js] +---*/ + +function testcase() { + var obj = { + valueOf: function () { + return "abc"; + } + }; + + return (String.prototype.trim.call(obj) === "[object Object]"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-4.js index f8cf35917d..ab9c506686 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-4.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-4.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is 0) - */ - - -function testcase() { - return String.prototype.trim.call(0) === "0"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-4 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is 0) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(0) === "0"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-40.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-40.js index b2b0146411..19c2d61383 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-40.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-40.js @@ -1,27 +1,31 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-40.js - * @description String.prototype.trim - 'this' is an object that has an own toString method that returns an object and valueOf method that returns a primitive value - */ - - -function testcase() { - var toStringAccessed = false; - var valueOfAccessed = false; - var obj = { - toString: function () { - toStringAccessed = true; - return {}; - }, - valueOf: function () { - valueOfAccessed = true; - return "abc"; - } - }; - return (String.prototype.trim.call(obj) === "abc") && valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-40 +description: > + String.prototype.trim - 'this' is an object that has an own + toString method that returns an object and valueOf method that + returns a primitive value +includes: [runTestCase.js] +---*/ + +function testcase() { + var toStringAccessed = false; + var valueOfAccessed = false; + var obj = { + toString: function () { + toStringAccessed = true; + return {}; + }, + valueOf: function () { + valueOfAccessed = true; + return "abc"; + } + }; + return (String.prototype.trim.call(obj) === "abc") && valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-41.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-41.js index 16010f3105..0c932a71ca 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-41.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-41.js @@ -1,27 +1,30 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-41.js - * @description String.prototype.trim - 'this' is an object which has an own toString and valueOf method. - */ - - -function testcase() { - var toStringAccessed = false; - var valueOfAccessed = false; - var obj = { - toString: function () { - toStringAccessed = true; - return "abc"; - }, - valueOf: function () { - valueOfAccessed = true; - return "cef"; - } - }; - return (String.prototype.trim.call(obj) === "abc") && !valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-41 +description: > + String.prototype.trim - 'this' is an object which has an own + toString and valueOf method. +includes: [runTestCase.js] +---*/ + +function testcase() { + var toStringAccessed = false; + var valueOfAccessed = false; + var obj = { + toString: function () { + toStringAccessed = true; + return "abc"; + }, + valueOf: function () { + valueOfAccessed = true; + return "cef"; + } + }; + return (String.prototype.trim.call(obj) === "abc") && !valueOfAccessed && toStringAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-42.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-42.js index 79276eb305..bc4c3f2367 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-42.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-42.js @@ -1,32 +1,36 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-42.js - * @description String.prototype.trim - TypeError exception was thrown when 'this' is an object that both toString and valueOf wouldn't return primitive value. - */ - - -function testcase() { - var toStringAccessed = false; - var valueOfAccessed = false; - var obj = { - toString: function () { - toStringAccessed = true; - return {}; - }, - valueOf: function () { - valueOfAccessed = true; - return {}; - } - }; - try { - String.prototype.trim.call(obj); - return false; - } catch (e) { - return valueOfAccessed && toStringAccessed && (e instanceof TypeError); - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-42 +description: > + String.prototype.trim - TypeError exception was thrown when + 'this' is an object that both toString and valueOf wouldn't return + primitive value. +includes: [runTestCase.js] +---*/ + +function testcase() { + var toStringAccessed = false; + var valueOfAccessed = false; + var obj = { + toString: function () { + toStringAccessed = true; + return {}; + }, + valueOf: function () { + valueOfAccessed = true; + return {}; + } + }; + try { + String.prototype.trim.call(obj); + return false; + } catch (e) { + return valueOfAccessed && toStringAccessed && (e instanceof TypeError); + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-43.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-43.js index a100e3dfa9..97521b6dd3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-43.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-43.js @@ -1,34 +1,38 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-43.js - * @description String.prototype.trim - 'this' is an object with an own valueOf and inherited toString methods with hint string, verify inherited toString method will be called first - */ - - -function testcase() { - - var toStringAccessed = false; - var valueOfAccessed = false; - - var proto = { - toString: function () { - toStringAccessed = true; - return "abc"; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.valueOf = function () { - valueOfAccessed = true; - return "efg"; - }; - return (String.prototype.trim.call(child) === "abc") && toStringAccessed && !valueOfAccessed; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-43 +description: > + String.prototype.trim - 'this' is an object with an own valueOf + and inherited toString methods with hint string, verify inherited + toString method will be called first +includes: [runTestCase.js] +---*/ + +function testcase() { + + var toStringAccessed = false; + var valueOfAccessed = false; + + var proto = { + toString: function () { + toStringAccessed = true; + return "abc"; + } + }; + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + child.valueOf = function () { + valueOfAccessed = true; + return "efg"; + }; + return (String.prototype.trim.call(child) === "abc") && toStringAccessed && !valueOfAccessed; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-44.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-44.js index b92ed088ac..526552d2bf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-44.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-44.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-44.js - * @description String.prototype.trim - 'this' is a string that contains east Asian characters (value is 'SD咕噜') - */ - - -function testcase() { - var str = "SD咕噜"; - return str.trim() === str; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-44 +description: > + String.prototype.trim - 'this' is a string that contains east + Asian characters (value is 'SD咕噜') +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = "SD咕噜"; + return str.trim() === str; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-45.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-45.js index 7d58bc7c90..693b48ea12 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-45.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-45.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-45.js - * @description String.prototype.trim - 'this' is a string that contains white space, character, number, object and null characters - */ - - -function testcase() { - var str = "abc" + " " + 123 + " " + {} + " " + "\u0000"; - var str1 = " " + str + " "; - return str1.trim() === str; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-45 +description: > + String.prototype.trim - 'this' is a string that contains white + space, character, number, object and null characters +includes: [runTestCase.js] +---*/ + +function testcase() { + var str = "abc" + " " + 123 + " " + {} + " " + "\u0000"; + var str1 = " " + str + " "; + return str1.trim() === str; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-46.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-46.js index fec8f9e582..ba67173cd4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-46.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-46.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-46.js - * @description String.prototype.trim - 'this' is a Function Object that converts to a string - */ - - -function testcase() { - var funObj = function () { return arguments; }; - return typeof(String.prototype.trim.call(funObj)) === "string"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-46 +description: > + String.prototype.trim - 'this' is a Function Object that converts + to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var funObj = function () { return arguments; }; + return typeof(String.prototype.trim.call(funObj)) === "string"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-47.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-47.js index 6a27f832ed..5d3afed26f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-47.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-47.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-47.js - * @description String.prototype.trim - 'this' is a object Object that converts to a string - */ - - -function testcase() { - return String.prototype.trim.call({}) === "[object Object]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-47 +description: > + String.prototype.trim - 'this' is a object Object that converts to + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call({}) === "[object Object]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-49.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-49.js index bce2031eee..7db62114d3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-49.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-49.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-49.js - * @description String.prototype.trim - 'this' is a RegExp Object that converts to a string - */ - - -function testcase() { - var regObj = new RegExp(/test/); - return String.prototype.trim.call(regObj) === "/test/"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-49 +description: > + String.prototype.trim - 'this' is a RegExp Object that converts to + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var regObj = new RegExp(/test/); + return String.prototype.trim.call(regObj) === "/test/"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-5.js index d1c2a20b21..75c4e6c760 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-5.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-5.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is +0) - */ - - -function testcase() { - return String.prototype.trim.call(+0) === "0"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-5 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is +0) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(+0) === "0"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-50.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-50.js index 23f4a60b18..f34a263dc3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-50.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-50.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-50.js - * @description String.prototype.trim - 'this' is a Error Object that converts to a string - */ - - -function testcase() { - var errObj = new Error("test"); - return String.prototype.trim.call(errObj) === "Error: test"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-50 +description: > + String.prototype.trim - 'this' is a Error Object that converts to + a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var errObj = new Error("test"); + return String.prototype.trim.call(errObj) === "Error: test"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-51.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-51.js index d83df0ce99..bf53e07e32 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-51.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-51.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-51.js - * @description String.prototype.trim - 'this' is a Arguments Object that converts to a string - */ - - -function testcase() { - var argObj = function () { return arguments; } (1, 2, true); - return String.prototype.trim.call(argObj) === "[object Arguments]"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-51 +description: > + String.prototype.trim - 'this' is a Arguments Object that converts + to a string +includes: [runTestCase.js] +---*/ + +function testcase() { + var argObj = function () { return arguments; } (1, 2, true); + return String.prototype.trim.call(argObj) === "[object Arguments]"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-6.js index 1db5fa422d..7dfbacdde9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-6.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-6.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is -0) - */ - - -function testcase() { - return String.prototype.trim.call(-0) === "0"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-6 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is -0) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(-0) === "0"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-7.js index b57f0d9bd2..fdb6c73a31 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-7.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-7.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is positive number) - */ - - -function testcase() { - return String.prototype.trim.call(30) === "30"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-7 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is positive number) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(30) === "30"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-8.js index 3fc21f36a4..56d1dab28a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-8.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-8.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is negative number) - */ - - -function testcase() { - return String.prototype.trim.call(-20) === "-20"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-8 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is negative number) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(-20) === "-20"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-9.js index 9d6336f3e4..7206517beb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-9.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-9.js - * @description String.prototype.trim - argument 'this' is a number that converts to a string (value is Infinity) - */ - - -function testcase() { - return String.prototype.trim.call(Infinity) === "Infinity"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-2-9 +description: > + String.prototype.trim - argument 'this' is a number that converts + to a string (value is Infinity) +includes: [runTestCase.js] +---*/ + +function testcase() { + return String.prototype.trim.call(Infinity) === "Infinity"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-1.js index 9967f0ea9b..1c10da3573 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-1.js - * @description String.prototype.trim - 'S' is a string with all LineTerminator - */ - - -function testcase() { - - var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; - return (lineTerminatorsStr.trim() === ""); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-1 +description: String.prototype.trim - 'S' is a string with all LineTerminator +includes: [runTestCase.js] +---*/ + +function testcase() { + + var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; + return (lineTerminatorsStr.trim() === ""); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-10.js index b580cc0346..b04ee7664d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-10.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-10.js - * @description String.prototype.trim - 'S' is a string with null character ('\u0000') - */ - - -function testcase() { - return "\u0000".trim() === "\u0000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-10 +description: > + String.prototype.trim - 'S' is a string with null character + ('\u0000') +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\u0000".trim() === "\u0000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-11.js index 95de0a5b09..8ee5e72cdd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-11.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-11.js - * @description String.prototype.trim - 'S' is a string that starts with null character - */ - - -function testcase() { - return "\0\u0000abc".trim() === "\0\u0000abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-11 +description: > + String.prototype.trim - 'S' is a string that starts with null + character +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\0\u0000abc".trim() === "\0\u0000abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-12.js index 6b139a5ffe..91ca8a575a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-12.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-12.js - * @description String.prototype.trim - 'S' is a string that ends with null character - */ - - -function testcase() { - return "abc\0\u0000".trim() === "abc\0\u0000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-12 +description: > + String.prototype.trim - 'S' is a string that ends with null + character +includes: [runTestCase.js] +---*/ + +function testcase() { + return "abc\0\u0000".trim() === "abc\0\u0000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-13.js index d71d3c9be2..88cdd75fdb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-13.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-13.js - * @description String.prototype.trim - 'S' is a string that starts with null character and ends with null character - */ - - -function testcase() { - return "\0\u0000abc\0\u0000".trim() === "\0\u0000abc\0\u0000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-13 +description: > + String.prototype.trim - 'S' is a string that starts with null + character and ends with null character +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\0\u0000abc\0\u0000".trim() === "\0\u0000abc\0\u0000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-14.js index 4736785498..5a61ad267d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-14.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-14.js - * @description String.prototype.trim - 'S' is a string that has null character in the middle - */ - - -function testcase() { - return "a\0\u0000bc".trim() === "a\0\u0000bc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-14 +description: > + String.prototype.trim - 'S' is a string that has null character in + the middle +includes: [runTestCase.js] +---*/ + +function testcase() { + return "a\0\u0000bc".trim() === "a\0\u0000bc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js index b749a07f65..cc30397dbd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js - * @description String.prototype.trim - 'S' is a string with all WhiteSpace - */ - - -function testcase() { - - var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; - return (whiteSpacesStr.trim() === ""); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-2 +description: String.prototype.trim - 'S' is a string with all WhiteSpace +includes: [runTestCase.js] +---*/ + +function testcase() { + + var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; + return (whiteSpacesStr.trim() === ""); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js index 38cadc9af9..874f19d4d8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js - * @description String.prototype.trim - 'S' is a string with all union of WhiteSpace and LineTerminator - */ - - -function testcase() { - var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; - var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; - var str = whiteSpacesStr + lineTerminatorsStr; - - return (str.trim() === ""); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-3 +description: > + String.prototype.trim - 'S' is a string with all union of + WhiteSpace and LineTerminator +includes: [runTestCase.js] +---*/ + +function testcase() { + var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; + var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; + var str = whiteSpacesStr + lineTerminatorsStr; + + return (str.trim() === ""); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js index 16388a3829..eb6d0c7adf 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js - * @description String.prototype.trim - 'S' is a string start with union of all LineTerminator and all WhiteSpace - */ - - -function testcase() { - var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; - var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; - var str = whiteSpacesStr + lineTerminatorsStr + "abc"; - - return (str.trim() === "abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-4 +description: > + String.prototype.trim - 'S' is a string start with union of all + LineTerminator and all WhiteSpace +includes: [runTestCase.js] +---*/ + +function testcase() { + var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; + var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; + var str = whiteSpacesStr + lineTerminatorsStr + "abc"; + + return (str.trim() === "abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js index c9311b9cc1..2864885c4d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js - * @description String.prototype.trim - 'S' is a string end with union of all LineTerminator and all WhiteSpace - */ - - -function testcase() { - var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; - var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; - var str = "abc" + whiteSpacesStr + lineTerminatorsStr ; - - return (str.trim() === "abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-5 +description: > + String.prototype.trim - 'S' is a string end with union of all + LineTerminator and all WhiteSpace +includes: [runTestCase.js] +---*/ + +function testcase() { + var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; + var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; + var str = "abc" + whiteSpacesStr + lineTerminatorsStr ; + + return (str.trim() === "abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js index 76ce302b98..dc2107a596 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js @@ -1,19 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js - * @description String.prototype.trim - 'S' is a string start with union of all LineTerminator and all WhiteSpace and end with union of all LineTerminator and all WhiteSpace - */ - - -function testcase() { - var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; - var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; - var str = whiteSpacesStr + lineTerminatorsStr + "abc" + whiteSpacesStr + lineTerminatorsStr; - - return (str.trim() === "abc"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-6 +description: > + String.prototype.trim - 'S' is a string start with union of all + LineTerminator and all WhiteSpace and end with union of all + LineTerminator and all WhiteSpace +includes: [runTestCase.js] +---*/ + +function testcase() { + var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; + var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; + var str = whiteSpacesStr + lineTerminatorsStr + "abc" + whiteSpacesStr + lineTerminatorsStr; + + return (str.trim() === "abc"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-7.js index c2d4c891f5..1e2c8b7485 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-7.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-7.js - * @description String.prototype.trim - 'S' is a string that union of LineTerminator and WhiteSpace in the middle - */ - - -function testcase() { - var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; - var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; - var str = "ab" + whiteSpacesStr + lineTerminatorsStr + "cd"; - - return (str.trim() === str); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-7 +description: > + String.prototype.trim - 'S' is a string that union of + LineTerminator and WhiteSpace in the middle +includes: [runTestCase.js] +---*/ + +function testcase() { + var lineTerminatorsStr = "\u000A\u000D\u2028\u2029"; + var whiteSpacesStr = "\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"; + var str = "ab" + whiteSpacesStr + lineTerminatorsStr + "cd"; + + return (str.trim() === str); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-8.js index bf32bbf76c..ad9e8e016e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-8.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-8.js - * @description String.prototype.trim - 'S' is a string with all null character - */ - - -function testcase() { - return "\0\u0000".trim() === "\0\u0000"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-8 +description: String.prototype.trim - 'S' is a string with all null character +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\0\u0000".trim() === "\0\u0000"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-9.js index f7ee64861b..7715a48819 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-9.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-9.js - * @description String.prototype.trim - 'S' is a string with null character ('\0') - */ - - -function testcase() { - return "\0".trim() === "\0"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-3-9 +description: String.prototype.trim - 'S' is a string with null character ('\0') +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\0".trim() === "\0"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js index f565f96ad9..25c06ce0cd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js - * @description String.prototype.trim handles multiline string with whitepace and lineterminators - */ - - -function testcase() { -var s = "\u0009a b\ -c \u0009" - - - if (s.trim() === "a bc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-1 +description: > + String.prototype.trim handles multiline string with whitepace and + lineterminators +includes: [runTestCase.js] +---*/ + +function testcase() { +var s = "\u0009a b\ +c \u0009" + + + if (s.trim() === "a bc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js index 5b17c75364..0f2e25e539 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js - * @description String.prototype.trim handles whitepace and lineterminators (\uFEFFabc) - */ - - -function testcase() { - return "\uFEFFabc".trim() === "abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-10 +description: > + String.prototype.trim handles whitepace and lineterminators + (\uFEFFabc) +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\uFEFFabc".trim() === "abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js index 254e14ad4a..d34d3de1e8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u0009) - */ - - -function testcase() { - if ("abc\u0009".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-11 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u0009) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u0009".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js index 0b948a0d78..e81b60a0f9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u000B) - */ - - -function testcase() { - if ("abc\u000B".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-12 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u000B) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u000B".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js index ee06d025b6..1cdf771760 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u000C) - */ - - -function testcase() { - if ("abc\u000C".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-13 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u000C) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u000C".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js index 99038992c9..63acdd96ad 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u0020) - */ - - -function testcase() { - if ("abc\u0020".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-14 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u0020) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u0020".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js index 600ba4766b..abd6e04aeb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u00A0) - */ - - -function testcase() { - if ("abc\u00A0".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-16 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u00A0) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u00A0".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js index 287fbd585c..e4e7c635ba 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\uFEFF) - */ - - -function testcase() { - return "abc\uFEFF".trim() === "abc"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-18 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\uFEFF) +includes: [runTestCase.js] +---*/ + +function testcase() { + return "abc\uFEFF".trim() === "abc"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js index a172918c12..1e5151ff4e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js - * @description String.prototype.trim handles whitepace and lineterminators (\u0009abc\u0009) - */ - - -function testcase() { - if ("\u0009abc\u0009".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-19 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u0009abc\u0009) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u0009abc\u0009".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js index 9cfea3598f..bf2776d5ef 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js - * @description String.prototype.trim handles whitepace and lineterminators ( \u0009abc \u0009) - */ - - -function testcase() { - if (" \u0009abc \u0009".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-2 +description: > + String.prototype.trim handles whitepace and lineterminators ( + \u0009abc \u0009) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (" \u0009abc \u0009".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js index 4a30711de6..7a5dd477fa 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Babc\u000B) - */ - - -function testcase() { - if ("\u000Babc\u000B".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-20 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Babc\u000B) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Babc\u000B".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js index 814a0a52df..095bf1553c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Cabc\u000C) - */ - - -function testcase() { - if ("\u000Cabc\u000C".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-21 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Cabc\u000C) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Cabc\u000C".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js index 112d1c1855..74fdf7ecf1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js - * @description String.prototype.trim handles whitepace and lineterminators (\u0020abc\u0020) - */ - - -function testcase() { - if ("\u0020abc\u0020".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-22 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u0020abc\u0020) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u0020abc\u0020".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js index 8fa1f4afad..70c652aa30 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js - * @description String.prototype.trim handles whitepace and lineterminators (\u00A0abc\u00A0) - */ - - -function testcase() { - if ("\u00A0abc\u00A0".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-24 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u00A0abc\u00A0) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u00A0abc\u00A0".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js index a344dcfb23..87874fd656 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js - * @description String.prototype.trim handles whitepace and lineterminators (\u0009\u0009) - */ - - -function testcase() { - if ("\u0009\u0009".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-27 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u0009\u0009) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u0009\u0009".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js index 9db3f868c8..b3249fc0e0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000B\u000B) - */ - - -function testcase() { - if ("\u000B\u000B".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-28 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000B\u000B) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000B\u000B".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js index cfcfd42a93..27acf41c95 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000C\u000C) - */ - - -function testcase() { - if ("\u000C\u000C".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-29 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000C\u000C) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000C\u000C".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js index b13ffbe4ba..d17f874524 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js - * @description String.prototype.trim handles whitepace and lineterminators (\u0009abc) - */ - - -function testcase() { - if ("\u0009abc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-3 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u0009abc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u0009abc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js index 08393f0e2e..584ec5cdc4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js - * @description String.prototype.trim handles whitepace and lineterminators (\u0020\u0020) - */ - - -function testcase() { - if ("\u0020\u0020".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-30 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u0020\u0020) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u0020\u0020".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js index 3f77e5071d..65c3d39679 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js - * @description String.prototype.trim handles whitepace and lineterminators (\u00A0\u00A0) - */ - - -function testcase() { - if ("\u00A0\u00A0".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-32 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u00A0\u00A0) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u00A0\u00A0".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js index 79325a4c1e..690ed21150 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js - * @description String.prototype.trim handles whitepace and lineterminators (\uFEFF\uFEFF) - */ - - -function testcase() { - return "\uFEFF\uFEFF".trim() === ""; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-34 +description: > + String.prototype.trim handles whitepace and lineterminators + (\uFEFF\uFEFF) +includes: [runTestCase.js] +---*/ + +function testcase() { + return "\uFEFF\uFEFF".trim() === ""; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js index 454f94bdae..76c52964dd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u0009c) - */ - - -function testcase() { - if ("ab\u0009c".trim() === "ab\u0009c") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-35 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u0009c) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\u0009c".trim() === "ab\u0009c") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js index 58cd7d1def..880847c515 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u000Bc) - */ - - -function testcase() { - if ("ab\u000Bc".trim() === "ab\u000Bc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-36 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u000Bc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\u000Bc".trim() === "ab\u000Bc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js index 9ab8331335..657f0fa208 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u000Cc) - */ - - -function testcase() { - if ("ab\u000Cc".trim() === "ab\u000Cc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-37 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u000Cc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\u000Cc".trim() === "ab\u000Cc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js index 4807a06cc1..d9e3ea83eb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u0020c) - */ - - -function testcase() { - if ("ab\u0020c".trim() === "ab\u0020c") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-38 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u0020c) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\u0020c".trim() === "ab\u0020c") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js index 00cf510e91..48244bb96b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u0085c) - */ - - -function testcase() { - return "ab\u0085c".trim() === "ab\u0085c"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-39 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u0085c) +includes: [runTestCase.js] +---*/ + +function testcase() { + return "ab\u0085c".trim() === "ab\u0085c"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js index 1b45f4214f..706a667b7f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Babc) - */ - - -function testcase() { - if ("\u000Babc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-4 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Babc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Babc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js index 45c1241ac4..ce25d3de8b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u00A0c) - */ - - -function testcase() { - if ("ab\u00A0c".trim() === "ab\u00A0c") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-40 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u00A0c) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\u00A0c".trim() === "ab\u00A0c") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js index 2b2ec8ca7e..c40bb7045b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\u200Bc) - */ - - -function testcase() { - if ("ab\u200Bc".trim() === "ab\u200Bc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-41 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\u200Bc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\u200Bc".trim() === "ab\u200Bc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js index 7e3ba26f12..7e93ea0709 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js - * @description String.prototype.trim handles whitepace and lineterminators (ab\uFEFFc) - */ - - -function testcase() { - if ("ab\uFEFFc".trim() === "ab\uFEFFc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-42 +description: > + String.prototype.trim handles whitepace and lineterminators + (ab\uFEFFc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("ab\uFEFFc".trim() === "ab\uFEFFc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js index 01e2850959..78fc758c00 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Aabc) - */ - - -function testcase() { - if ("\u000Aabc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-43 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Aabc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Aabc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js index 7b114197ae..959efdd39f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Dabc) - */ - - -function testcase() { - if ("\u000Dabc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-44 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Dabc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Dabc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js index 2d8d044c6c..b3fdbd1729 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2028abc) - */ - - -function testcase() { - if ("\u2028abc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-45 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2028abc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u2028abc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js index 133954a7bd..2491c35483 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2029abc) - */ - - -function testcase() { - if ("\u2029abc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-46 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2029abc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u2029abc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js index 27b3735374..14c9f21821 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u000A) - */ - - -function testcase() { - if ("abc\u000A".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-47 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u000A) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u000A".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js index 9d1ead565b..c393317e81 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u000D) - */ - - -function testcase() { - if ("abc\u000D".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-48 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u000D) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u000D".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js index 306f013a32..2d7a205e69 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u2028) - */ - - -function testcase() { - if ("abc\u2028".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-49 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u2028) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u2028".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js index ccd87bc8cf..8e79500c3d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Cabc) - */ - - -function testcase() { - if ("\u000Cabc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-5 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Cabc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Cabc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js index 88a63f0e88..ebda6031b3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js - * @description String.prototype.trim handles whitepace and lineterminators (abc\u2029) - */ - - -function testcase() { - if ("abc\u2029".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-50 +description: > + String.prototype.trim handles whitepace and lineterminators + (abc\u2029) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("abc\u2029".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js index a379792695..ac73f5d6fb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Aabc\u000A) - */ - - -function testcase() { - if ("\u000Aabc\u000A".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-51 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Aabc\u000A) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Aabc\u000A".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js index 0fec37e4d9..70739d4b86 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000Dabc\u000D) - */ - - -function testcase() { - if ("\u000Dabc\u000D".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-52 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000Dabc\u000D) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000Dabc\u000D".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js index 24e4398302..409821967e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2028abc\u2028) - */ - - -function testcase() { - if ("\u2028abc\u2028".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-53 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2028abc\u2028) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u2028abc\u2028".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js index 930df36783..c75a6574bb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2029abc\u2029) - */ - - -function testcase() { - if ("\u2029abc\u2029".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-54 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2029abc\u2029) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u2029abc\u2029".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js index e1d75f23f0..637945b0e4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000A\u000A) - */ - - -function testcase() { - if ("\u000A\u000A".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-55 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000A\u000A) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000A\u000A".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js index 5b85915332..0bde15c076 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js - * @description String.prototype.trim handles whitepace and lineterminators (\u000D\u000D) - */ - - -function testcase() { - if ("\u000D\u000D".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-56 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u000D\u000D) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u000D\u000D".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js index fc88fbfa5a..1b4a9739ac 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2028\u2028) - */ - - -function testcase() { - if ("\u2028\u2028".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-57 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2028\u2028) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u2028\u2028".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js index 8effdb4d72..3f849ca85e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2029\u2029) - */ - - -function testcase() { - if ("\u2029\u2029".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-58 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2029\u2029) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u2029\u2029".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js index ce66909c93..28eee466ad 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js @@ -1,19 +1,22 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js - * @description String.prototype.trim handles whitepace and lineterminators (\u2029abc as a multiline string) - */ - - -function testcase() { - var s = "\u2029\ - abc"; - if (s.trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-59 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u2029abc as a multiline string) +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = "\u2029\ + abc"; + if (s.trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js index d7481bad3b..23b7de0178 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js - * @description String.prototype.trim handles whitepace and lineterminators (\u0020abc) - */ - - -function testcase() { - if ("\u0020abc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-6 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u0020abc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u0020abc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js index 496f6bc9fd..bfafdbe71f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js - * @description String.prototype.trim handles whitepace and lineterminators (string with just blanks) - */ - - -function testcase() { - if (" ".trim() === "") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-60 +description: > + String.prototype.trim handles whitepace and lineterminators + (string with just blanks) +includes: [runTestCase.js] +---*/ + +function testcase() { + if (" ".trim() === "") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js index 3bbfd0638e..a1173730ee 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js @@ -1,17 +1,20 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js - * @description String.prototype.trim handles whitepace and lineterminators (\u00A0abc) - */ - - -function testcase() { - if ("\u00A0abc".trim() === "abc") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.5.4.20-4-8 +description: > + String.prototype.trim handles whitepace and lineterminators + (\u00A0abc) +includes: [runTestCase.js] +---*/ + +function testcase() { + if ("\u00A0abc".trim() === "abc") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1.1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1.1.js index d0dce498d1..09a054f675 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1.1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt() can accept many arguments - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1.1.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.charAt() can accept many arguments +es5id: 15.5.4.4_A1.1 +description: Checking by using eval +---*/ function __FACTORY(){this.toString = function(){ return "wizard";};}; @@ -23,5 +22,3 @@ with(__instance){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A10.js index f8295541b7..07076ac751 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.charAt.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A10.js - * @description Checking if varying the String.prototype.charAt.length property fails - */ +/*--- +info: The String.prototype.charAt.length property has the attribute ReadOnly +es5id: 15.5.4.4_A10 +description: > + Checking if varying the String.prototype.charAt.length property + fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +28,3 @@ if (String.prototype.charAt.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A11.js index 2dc2f275e3..bb5b5cb344 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the charAt method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A11.js - * @description Checking String.prototype.charAt.length - */ +/*--- +info: The length property of the charAt method is 1 +es5id: 15.5.4.4_A11 +description: Checking String.prototype.charAt.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.charAt.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T1.js index 0d6472672e..d88cec69ac 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T1.js - * @description pos is false and true, and instance is object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T1 +description: pos is false and true, and instance is object +---*/ var __instance = new Object(42); @@ -19,4 +18,3 @@ if (__instance.charAt(false)+__instance.charAt(true) !== "42") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T10.js index 5f81135952..271c22c069 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T10.js - * @description Call charAt() function with object argument - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T10 +description: Call charAt() function with object argument +---*/ var __obj = {toString:function(){return 1;}} var __str = "lego"; @@ -20,4 +19,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T2.js index d162e3961e..42ad5f81b0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T2.js - * @description pos is equation with false and true, and instance is Boolean object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T2 +description: pos is equation with false and true, and instance is Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +18,3 @@ if (__instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) ! } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T4.js index e20809a4d6..6296bb1639 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T4.js - * @description Call charAt() function without argument of string object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T4 +description: Call charAt() function without argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if ("lego".charAt() !== "l") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T5.js index 4ec3eb8e2f..f3d40ae7a0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T5.js - * @description Call charAt() function with null argument of function object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T5 +description: Call charAt() function with null argument of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "lego"}().charAt(null) !== "l") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T6.js index 02d4ffec4e..73d3ab3907 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T6.js - * @description Call charAt() function with x argument of new String object, where x is undefined variable - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T6 +description: > + Call charAt() function with x argument of new String object, where + x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ if (new String("lego").charAt(x) !== "l") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T7.js index 978a9d750f..0674182368 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T7.js - * @description Call charAt() function with undefined argument of string object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T7 +description: Call charAt() function with undefined argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (String("lego").charAt(undefined) !== "l") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T8.js index e70523eb4d..ef0d838828 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T8.js - * @description Call charAt() function with void 0 argument of string object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T8 +description: Call charAt() function with void 0 argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (String(42).charAt(void 0) !== "4") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T9.js index 8ad6dd3149..6137d3e04b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A1_T9.js - * @description Call charAt() function with function(){}() argument of string object - */ +/*--- +info: String.prototype.charAt(pos) +es5id: 15.5.4.4_A1_T9 +description: > + Call charAt() function with function(){}() argument of string + object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (new String(42).charAt(function(){}()) !== "4") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A2.js index 1752c563b6..f296af88b5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String.prototype.charAt(pos) calls if ToInteger(pos) less than 0 the empty string returns - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A2.js - * @description Call charAt(pos) with negative pos - */ +/*--- +info: > + When String.prototype.charAt(pos) calls if ToInteger(pos) less than 0 the + empty string returns +es5id: 15.5.4.4_A2 +description: Call charAt(pos) with negative pos +---*/ function __FACTORY(){}; @@ -21,4 +22,3 @@ if (__instance.charAt(-1) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A3.js index c41c5e1f4e..82327ca30c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String.prototype.charAt(pos) calls if ToInteger(pos) not less than ToString(this value) the empty string returns - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A3.js - * @description pos is bigger of string length - */ +/*--- +info: > + When String.prototype.charAt(pos) calls if ToInteger(pos) not less than + ToString(this value) the empty string returns +es5id: 15.5.4.4_A3 +description: pos is bigger of string length +---*/ var __instance = new String("ABC"); @@ -17,4 +18,3 @@ if (__instance.charAt(3) !== "") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T1.js index c361749ace..0a1a61a43d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pos is a value of Number type that is an integer, then the result of x.charAt(pos) is equal to the result of x.substring(pos, pos+1) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T1.js - * @description Compare results of x.charAt(pos) and x.substring(pos, pos+1) - */ +/*--- +info: > + If pos is a value of Number type that is an integer, then the result of + x.charAt(pos) is equal to the result of x.substring(pos, pos+1) +es5id: 15.5.4.4_A4_T1 +description: Compare results of x.charAt(pos) and x.substring(pos, pos+1) +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ for(var i=0; i<6; i++) { // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T2.js index 8b4b7441c3..acbff03b21 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pos is a value of Number type that is an integer, then the result of x.charAt(pos) is equal to the result of x.substring(pos, pos+1) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T2.js - * @description Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb pos is smaller of zero - */ +/*--- +info: > + If pos is a value of Number type that is an integer, then the result of + x.charAt(pos) is equal to the result of x.substring(pos, pos+1) +es5id: 15.5.4.4_A4_T2 +description: > + Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb + pos is smaller of zero +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +21,3 @@ for(var i=-2; i<0; i++) { // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T3.js index ca9a1369d2..fab5319f98 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If pos is a value of Number type that is an integer, then the result of x.charAt(pos) is equal to the result of x.substring(pos, pos+1) - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A4_T3.js - * @description Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb pos is bigger string length - */ +/*--- +info: > + If pos is a value of Number type that is an integer, then the result of + x.charAt(pos) is equal to the result of x.substring(pos, pos+1) +es5id: 15.5.4.4_A4_T3 +description: > + Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb + pos is bigger string length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +21,3 @@ for(var i=6; i<8; i++) { // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A5.js index 778e5ea218..aa1e114b8c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A5.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String.prototype.charAt(pos) calls first calls ToString, giving it the this value as its argument - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A5.js - * @description Change toString function, it trow exception, and call charAt() - */ +/*--- +info: > + When String.prototype.charAt(pos) calls first calls ToString, giving it + the this value as its argument +es5id: 15.5.4.4_A5 +description: Change toString function, it trow exception, and call charAt() +includes: [$FAIL.js] +---*/ var __obj={ valueOf:1, @@ -26,4 +28,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A6.js index 570f90a127..1e3114e6a7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A6.js - * @description Checking String.prototype.charAt.prototype - */ +/*--- +info: String.prototype.charAt has not prototype property +es5id: 15.5.4.4_A6 +description: Checking String.prototype.charAt.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.charAt.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A7.js index 94494102aa..f7d4f52afb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A7.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charAt can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A7.js - * @description Checking if creating the String.prototype.charAt object fails - */ +/*--- +info: String.prototype.charAt can't be used as constructor +es5id: 15.5.4.4_A7 +description: Checking if creating the String.prototype.charAt object fails +includes: [$FAIL.js] +---*/ var __FACTORY = String.prototype.charAt; @@ -18,4 +18,3 @@ try { $ERROR('#1.2: undefined = 1 throw a TypeError. Actual: ' + (e)); } } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A8.js index 00a6176316..1b2b5e72b9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.charAt.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A8.js - * @description Checking if enumerating the String.prototype.charAt.length property fails - */ +/*--- +info: The String.prototype.charAt.length property has the attribute DontEnum +es5id: 15.5.4.4_A8 +description: > + Checking if enumerating the String.prototype.charAt.length + property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +39,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A9.js index d810d56e0c..df532070d8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.charAt.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A9.js - * @description Checking if deleting the String.prototype.charAt.length property fails - */ +/*--- +info: The String.prototype.charAt.length property has the attribute DontDelete +es5id: 15.5.4.4_A9 +description: > + Checking if deleting the String.prototype.charAt.length property + fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +32,3 @@ if (!(String.prototype.charAt.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1.1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1.1.js index d296397c91..df073dc699 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1.1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1.1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt() can accept many arguments - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1.1.js - * @description Checking by using eval - */ +/*--- +info: String.prototype.charCodeAt() can accept many arguments +es5id: 15.5.4.5_A1.1 +description: Checking by using eval +---*/ function __FACTORY(){this.toString = function(){ return "wizard";};}; @@ -24,5 +23,3 @@ with(__instance){ } // ////////////////////////////////////////////////////////////////////////////// - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A10.js index c6d1a559fe..81dbbc563c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.charCodeAt.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A10.js - * @description Checking if varying the String.prototype.charCodeAt.length property fails - */ +/*--- +info: The String.prototype.charCodeAt.length property has the attribute ReadOnly +es5id: 15.5.4.5_A10 +description: > + Checking if varying the String.prototype.charCodeAt.length + property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +28,3 @@ if (String.prototype.charCodeAt.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A11.js index 2a39c6bee3..1137dff675 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the charCodeAt method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A11.js - * @description Checking String.prototype.charCodeAt.length - */ +/*--- +info: The length property of the charCodeAt method is 1 +es5id: 15.5.4.5_A11 +description: Checking String.prototype.charCodeAt.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.charCodeAt.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T1.js index 3a639267a8..5cd5570ea0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T1.js - * @description pos is false and true, and instance is object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T1 +description: pos is false and true, and instance is object +---*/ var __instance = new Object(42); @@ -19,4 +18,3 @@ if ((__instance.charCodeAt(false) !== 52)||(__instance.charCodeAt(true) !== 50)) } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T10.js index 048869d360..9c2164628e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T10.js - * @description Call charCodeAt() function with object argument - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T10 +description: Call charCodeAt() function with object argument +---*/ var __obj = {toString:function(){return 1;}} var __str = "lego"; @@ -20,4 +19,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T2.js index c4e3f2ad44..5473040298 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T2.js - * @description pos is equation with false and true, and instance is Boolean object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T2 +description: pos is equation with false and true, and instance is Boolean object +---*/ var __instance = new Boolean; @@ -35,4 +34,3 @@ if (__instance.charCodeAt(true+1) !== 0x6C) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T4.js index 04aed9862d..8b0b253dc7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T4.js - * @description Call charCodeAt() function without argument of string object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T4 +description: Call charCodeAt() function without argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if ("smart".charCodeAt() !== 0x73) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T5.js index 6f0c0aaa43..a80b2b0ca2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T5.js - * @description Call charCodeAt() function with null argument of function object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T5 +description: Call charCodeAt() function with null argument of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (function(){return "lego"}().charCodeAt(null) !== 0x6C) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T6.js index 8f54a0d008..3ddf8b0e76 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T6.js - * @description Call charCodeAt() function with x argument of new String object, where x is undefined variable - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T6 +description: > + Call charCodeAt() function with x argument of new String object, + where x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ if (new String("lego").charCodeAt(x) !== 0x6C) { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T7.js index c3c521cdb6..a59910356f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T7.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T7.js - * @description Call charCodeAt() function with undefined argument of string object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T7 +description: Call charCodeAt() function with undefined argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (String("lego").charCodeAt(undefined) !== 0x6C) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T8.js index 9e3d739885..8a6b06344d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T8.js - * @description Call charCodeAt() function with void 0 argument of string object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T8 +description: Call charCodeAt() function with void 0 argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if (String(42).charCodeAt(void 0) !== 0x34) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T9.js index 4c9b24fafa..9a336549c2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt(pos) - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A1_T9.js - * @description Call charCodeAt() function with function(){}() argument of string object - */ +/*--- +info: String.prototype.charCodeAt(pos) +es5id: 15.5.4.5_A1_T9 +description: > + Call charCodeAt() function with function(){}() argument of string + object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (new String(42).charCodeAt(function(){}()) !== 0x34) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A2.js index 39e833fd7d..d34f9c58fd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String.prototype.charCodeAt(pos) calls if ToInteger(pos) less than 0 the NaN returns - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A2.js - * @description Call charCodeAt(pos) with negative pos - */ +/*--- +info: > + When String.prototype.charCodeAt(pos) calls if ToInteger(pos) less than 0 + the NaN returns +es5id: 15.5.4.5_A2 +description: Call charCodeAt(pos) with negative pos +---*/ function __FACTORY(){}; @@ -21,4 +22,3 @@ if (!isNaN(__instance.charCodeAt(-1))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A3.js index a5d6a8fe40..911fffa116 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String.prototype.charCodeAt(pos) calls if ToInteger(pos) not less than ToString(this value) the NaN returns - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A3.js - * @description pos is bigger of string length - */ +/*--- +info: > + When String.prototype.charCodeAt(pos) calls if ToInteger(pos) not less + than ToString(this value) the NaN returns +es5id: 15.5.4.5_A3 +description: pos is bigger of string length +---*/ var __instance = new String("ABC"); @@ -17,4 +18,3 @@ if (!isNaN(__instance.charCodeAt(3))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A4.js index 884d6322df..33a2360a19 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A4.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When String.prototype.charCodeAt(pos) calls first calls ToString, giving it the this value as its argument - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A4.js - * @description Change toString function, it trow exception, and call charCodeAt() - */ +/*--- +info: > + When String.prototype.charCodeAt(pos) calls first calls ToString, giving + it the this value as its argument +es5id: 15.5.4.5_A4 +description: Change toString function, it trow exception, and call charCodeAt() +includes: [$FAIL.js] +---*/ var __obj={ valueOf:1, @@ -26,4 +28,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A6.js index dc78648b2f..4098f04d2d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A6.js - * @description Checking String.prototype.charCodeAt.prototype - */ +/*--- +info: String.prototype.charCodeAt has not prototype property +es5id: 15.5.4.5_A6 +description: Checking String.prototype.charCodeAt.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.charCodeAt.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A7.js index 5a97c5746a..c93d26f947 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A7.js @@ -1,19 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.charCodeAt can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A7.js - * @description Checking if creating the String.prototype.charCodeAt object fails - */ +/*--- +info: String.prototype.charCodeAt can't be used as constructor +es5id: 15.5.4.5_A7 +description: Checking if creating the String.prototype.charCodeAt object fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __FACTORY = String.prototype.charCodeAt; try { var __instance = new __FACTORY; - $FAIL('#1: __FACTORY = String.prototype.charCodeAt; "__instance = new __FACTORY" lead to throwing exception'); -} catch (e) { + $FAIL('#1: __FACTORY = String.prototype.charCodeAt; "__instance = new __FACTORY" lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A8.js index ed4c5bd03e..bfc9dcf4d0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.charCodeAt.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A8.js - * @description Checking if enumerating the String.prototype.charCodeAt.length property fails - */ +/*--- +info: The String.prototype.charCodeAt.length property has the attribute DontEnum +es5id: 15.5.4.5_A8 +description: > + Checking if enumerating the String.prototype.charCodeAt.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A9.js index f561d17951..19dedc3fb4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.charCodeAt.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A9.js - * @description Checking if deleting the String.prototype.charCodeAt.length property fails - */ +/*--- +info: > + The String.prototype.charCodeAt.length property has the attribute + DontDelete +es5id: 15.5.4.5_A9 +description: > + Checking if deleting the String.prototype.charCodeAt.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.charCodeAt.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A10.js index aa6112d32f..7aac0eb1c0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.concat.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A10.js - * @description Checking if varying the String.prototype.concat.length property fails - */ +/*--- +info: The String.prototype.concat.length property has the attribute ReadOnly +es5id: 15.5.4.6_A10 +description: > + Checking if varying the String.prototype.concat.length property + fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +28,3 @@ if (String.prototype.concat.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A11.js index d0a4b44012..69016d99ae 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the concat method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A11.js - * @description Checking String.prototype.concat.length - */ +/*--- +info: The length property of the concat method is 1 +es5id: 15.5.4.6_A11 +description: Checking String.prototype.concat.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.concat.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T1.js index bb6d8f7858..647cb30b53 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T1.js - * @description Arguments are false and true, and instance is object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T1 +description: Arguments are false and true, and instance is object +---*/ var __instance = new Object(42); @@ -19,4 +18,3 @@ if (__instance.concat(false,true) !== "42falsetrue") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T10.js index e0c7a56edd..5f212d16db 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T10.js - * @description Call concat([,[...]]) function with object arguments - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T10 +description: Call concat([,[...]]) function with object arguments +---*/ var __obj = {toString:function(){return "\u0041";}} var __obj2 = {toString:function(){return true;}} @@ -24,4 +23,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T2.js index bc5b6f9659..974b29823e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T2.js - * @description Arguments are equation with false and true, and instance is Boolean object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T2 +description: > + Arguments are equation with false and true, and instance is + Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +20,3 @@ if (__instance.concat("\u0041",true,true+1) !== "falseAtrue2") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T4.js index 6f2d37b1b7..f243a077dc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T4.js - * @description Call concat([,[...]]) function without argument of string object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T4 +description: Call concat([,[...]]) function without argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +15,3 @@ if ("lego".concat() !== "lego") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T5.js index 31fa8ba2ba..7bad9d2e0d 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T5.js - * @description Call concat([,[...]]) function with null argument of function object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T5 +description: > + Call concat([,[...]]) function with null argument of function + object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (function(){return "lego"}().concat(null) !== "legonull") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T6.js index fbe70c6ab5..e633a6afa2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T6.js - * @description Call concat([,[...]]) function with x argument of new String object, where x is undefined variable - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T6 +description: > + Call concat([,[...]]) function with x argument of new String + object, where x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ if (new String("lego").concat(x) !== "legoundefined") { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T7.js index 9d6f30e014..10e915663f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T7.js - * @description Call concat([,[...]]) function with undefined argument of string object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T7 +description: > + Call concat([,[...]]) function with undefined argument of string + object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (String("lego").concat(undefined) !== "legoundefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T8.js index 96b7034054..4ededc0538 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T8.js - * @description Call concat([,[...]]) function with void 0 argument of string object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T8 +description: > + Call concat([,[...]]) function with void 0 argument of string + object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (String(42).concat(void 0) !== "42undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T9.js index ecde3e026c..08d70fd86b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A1_T9.js - * @description Call concat([,[...]]) function with function(){}() argument of string object - */ +/*--- +info: String.prototype.concat([,[...]]) +es5id: 15.5.4.6_A1_T9 +description: > + Call concat([,[...]]) function with function(){}() argument of + string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (new String(42).concat(function(){}()) !== "42undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A2.js index da3c062416..b16030c88b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) can accept at least 128 - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A2.js - * @description Call concat([,[...]]) function with 128 arguments - */ +/*--- +info: String.prototype.concat([,[...]]) can accept at least 128 +es5id: 15.5.4.6_A2 +description: Call concat([,[...]]) function with 128 arguments +---*/ var __instance = new Number(); @@ -28,6 +27,3 @@ if (__instance.concat( } // ////////////////////////////////////////////////////////////////////////////// - - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A3.js index 7f61e7520f..3b2301578e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat([,[...]]) can't change the instance to be applied - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A3.js - * @description Checking if varying the instance that is applied fails - */ +/*--- +info: String.prototype.concat([,[...]]) can't change the instance to be applied +es5id: 15.5.4.6_A3 +description: Checking if varying the instance that is applied fails +---*/ var __instance = new String("one"); @@ -19,4 +18,3 @@ if (__instance != "one") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T1.js index d1d2034522..7ee2e303f2 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.concat([,[...]]) is called first Call ToString, giving it the this value as its argument - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T1.js - * @description Override toString function - */ +/*--- +info: > + when String.prototype.concat([,[...]]) is called first Call ToString, + giving it the this value as its argument +es5id: 15.5.4.6_A4_T1 +description: Override toString function +---*/ var __instance = {toString:function(){return "one"}}; @@ -21,6 +22,3 @@ if (__instance.concat("two",x) !== "onetwoundefined") { ////////////////////////////////////////////////////////////////////////////// var x; - - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T2.js index db3dc169c1..0b6a1fde7e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.concat([,[...]]) is called first Call ToString, giving it the this value as its argument - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A4_T2.js - * @description Override toString function onto function, that throw exception - */ +/*--- +info: > + when String.prototype.concat([,[...]]) is called first Call ToString, + giving it the this value as its argument +es5id: 15.5.4.6_A4_T2 +description: Override toString function onto function, that throw exception +includes: [$FAIL.js] +---*/ var __instance = {toString:function(){throw "intostring";}}; var __obj = {toString:function(){throw "infirstarg";}}; @@ -27,7 +29,3 @@ try { ////////////////////////////////////////////////////////////////////////////// var notexist; - - - - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A6.js index 23a4bcdb9f..4da0d14549 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A6.js - * @description Checking String.prototype.concat.prototype - */ +/*--- +info: String.prototype.concat has not prototype property +es5id: 15.5.4.6_A6 +description: Checking String.prototype.concat.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.concat.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A7.js index 62267a2307..c90bf5b822 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A7.js @@ -1,19 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.concat can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A7.js - * @description Checking if creating the String.prototype.concat object fails - */ +/*--- +info: String.prototype.concat can't be used as constructor +es5id: 15.5.4.6_A7 +description: Checking if creating the String.prototype.concat object fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __FACTORY = String.prototype.concat; try { var __instance = new __FACTORY; - $FAIL('#1: __FACTORY = String.prototype.concat; "__instance = new __FACTORY" lead throwing exception'); -} catch (e) { + $FAIL('#1: __FACTORY = String.prototype.concat; "__instance = new __FACTORY" lead throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A8.js index 48db4fe12c..045567dc57 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.concat.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A8.js - * @description Checking if enumerating the String.prototype.concat.length property fails - */ +/*--- +info: The String.prototype.concat.length property has the attribute DontEnum +es5id: 15.5.4.6_A8 +description: > + Checking if enumerating the String.prototype.concat.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +40,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A9.js index 38b4415206..bb17f12c06 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.concat.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A9.js - * @description Checking if deleting the String.prototype.concat.length property fails - */ +/*--- +info: The String.prototype.concat.length property has the attribute DontDelete +es5id: 15.5.4.6_A9 +description: > + Checking if deleting the String.prototype.concat.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.concat.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A10.js index 97fa3828d5..8a61137175 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A10.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.indexOf.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A10.js - * @description Checking if varying the String.prototype.indexOf.length property fails - */ +/*--- +info: The String.prototype.indexOf.length property has the attribute ReadOnly +es5id: 15.5.4.7_A10 +description: > + Checking if varying the String.prototype.indexOf.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +29,3 @@ if (String.prototype.indexOf.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A11.js index 7531afe144..db610fbe19 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the indexOf method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A11.js - * @description Checking String.prototype.indexOf.length - */ +/*--- +info: The length property of the indexOf method is 1 +es5id: 15.5.4.7_A11 +description: Checking String.prototype.indexOf.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.indexOf.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T1.js index fdfd829ac5..f3bc0fb9b1 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T1.js - * @description Arguments are false and true, and instance is object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T1 +description: Arguments are false and true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.indexOf(true, false) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T10.js index d43e2b48c3..1b102a0293 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T10.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T10.js - * @description Call indexOf(searchString, position) function with object arguments - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T10 +description: Call indexOf(searchString, position) function with object arguments +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return true;}} @@ -23,4 +22,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T11.js index f952ceb232..017e5b240e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T11.js - * @description Instance is Date(0) object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T11 +description: Instance is Date(0) object +---*/ var __instance = new Date(0); @@ -19,4 +18,3 @@ if ((__instance.getTimezoneOffset()>0 ? __instance.indexOf('31') : __instance.in } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T12.js index f6bbcde909..b641ced381 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T12.js - * @description Argument is string, and instance is array of strings - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T12 +description: Argument is string, and instance is array of strings +---*/ var __instance = new Array('new','zoo','revue'); @@ -25,4 +24,3 @@ if (__instance.indexOf('zoo') !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T2.js index 0e4fc8da51..c20692bb27 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T2.js - * @description Arguments are boolean equation, function and null, and instance is Boolean object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T2 +description: > + Arguments are boolean equation, function and null, and instance is + Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +20,3 @@ if (__instance.indexOf("A"!=="\u0041", function(){return 0;}(),null) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T4.js index 1339dda270..d9f26b932a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T4.js - * @description Call indexOf(searchString, position) function without arguments of string - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T4 +description: > + Call indexOf(searchString, position) function without arguments of + string +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if ("".indexOf() !== -1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T5.js index b397ff3858..61d8e70371 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T5.js - * @description Call indexOf(searchString, position) function with null argument of function object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T5 +description: > + Call indexOf(searchString, position) function with null argument + of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (function(){return "gnulluna"}().indexOf(null) !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T6.js index 97c926bba6..4279d8f7e9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T6.js - * @description Call indexOf(searchString, position) function with x argument of new String object, where x is undefined variable - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T6 +description: > + Call indexOf(searchString, position) function with x argument of + new String object, where x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ if (new String("undefined").indexOf(x) !== 0) { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T7.js index 4b18ea23f1..4852398960 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T7.js - * @description Call indexOf(searchString, position) function with undefined argument of string object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T7 +description: > + Call indexOf(searchString, position) function with undefined + argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (String("undefined").indexOf(undefined) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T8.js index 14219aa0d6..1232528e7f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T8.js - * @description Call indexOf(searchString, position) function with void 0 argument of string object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T8 +description: > + Call indexOf(searchString, position) function with void 0 argument + of string object +---*/ var __obj = {toString:function(){}}; @@ -18,4 +19,3 @@ if (String(__obj).indexOf(void 0) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T9.js index c13d6c4dee..69dd4c0392 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T9.js - * @description Call indexOf(searchString, position) function with function(){}() argument of string object - */ +/*--- +info: String.prototype.indexOf(searchString, position) +es5id: 15.5.4.7_A1_T9 +description: > + Call indexOf(searchString, position) function with function(){}() + argument of string object +---*/ var __obj = { valueOf:function(){}, @@ -21,4 +22,3 @@ if (new String(__obj).indexOf(function(){}()) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T1.js index e7f880dd75..a2e046ce24 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When length of searchString less than length of ToString(this) -1 returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T1.js - * @description Call "abcd".indexOf("abcdab") and check result - */ +/*--- +info: When length of searchString less than length of ToString(this) -1 returns +es5id: 15.5.4.7_A2_T1 +description: Call "abcd".indexOf("abcdab") and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if ("abcd".indexOf("abcdab")!==-1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T2.js index 65087c437a..f342413d75 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When length of searchString less than length of ToString(this) -1 returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T2.js - * @description Call "abcd".indexOf("abcdab",0) and check result - */ +/*--- +info: When length of searchString less than length of ToString(this) -1 returns +es5id: 15.5.4.7_A2_T2 +description: Call "abcd".indexOf("abcdab",0) and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if ("abcd".indexOf("abcdab",0)!==-1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T3.js index 8420f3402c..f7e1100b8c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When length of searchString less than length of ToString(this) -1 returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T3.js - * @description Call "abcd".indexOf("abcdab",99) and check result - */ +/*--- +info: When length of searchString less than length of ToString(this) -1 returns +es5id: 15.5.4.7_A2_T3 +description: Call "abcd".indexOf("abcdab",99) and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if ("abcd".indexOf("abcdab",99)!==-1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T4.js index 28c766db79..bf82c55e64 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When length of searchString less than length of ToString(this) -1 returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A2_T4.js - * @description Call "abcd".indexOf("abcdab",NaN) and check result - */ +/*--- +info: When length of searchString less than length of ToString(this) -1 returns +es5id: 15.5.4.7_A2_T4 +description: Call "abcd".indexOf("abcdab",NaN) and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if ("abcd".indexOf("abcdab",NaN)!==-1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T1.js index 5264ebdc01..559ab3234e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0 indexOf(searchString,0) returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T1.js - * @description Call "$$abcdabcd".indexOf("ab",NaN) and check result - */ +/*--- +info: > + Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0 + indexOf(searchString,0) returns +es5id: 15.5.4.7_A3_T1 +description: Call "$$abcdabcd".indexOf("ab",NaN) and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if ("$$abcdabcd".indexOf("ab",NaN)!==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T2.js index 4820875d3d..88d3ac1a8a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0 indexOf(searchString,0) returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T2.js - * @description Call "$$abcdabcd".indexOf("ab",eval("\"-99\"")) and check result - */ +/*--- +info: > + Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0 + indexOf(searchString,0) returns +es5id: 15.5.4.7_A3_T2 +description: Call "$$abcdabcd".indexOf("ab",eval("\"-99\"")) and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if ("$$abcdabcd".indexOf("ab",eval("\"-99\""))!==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T3.js index bccc2e6b30..de1f322196 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T3.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0 indexOf(searchString,0) returns - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A3_T3.js - * @description Call "$$abcdabcd".indexOf("ab",function(){return -Infinity;}()) and check result - */ +/*--- +info: > + Since we deal with max(ToInteger(pos), 0) if ToInteger(pos) less than 0 + indexOf(searchString,0) returns +es5id: 15.5.4.7_A3_T3 +description: > + Call "$$abcdabcd".indexOf("ab",function(){return -Infinity;}()) + and check result +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +18,3 @@ if ("$$abcdabcd".indexOf("ab", function(){return -Infinity;}())!==2) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T1.js index d47dfdf7da..8fba0cfc2f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T1.js - * @description Override toString and valueOf functions, valueOf throw exception - */ +/*--- +info: > + when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.7_A4_T1 +description: Override toString and valueOf functions, valueOf throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){throw "intointeger";}} @@ -29,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T2.js index 0960e05f38..da8975af20 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T2.js - * @description Override toString and valueOf functions, second toString throw exception - */ +/*--- +info: > + when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.7_A4_T2 +description: > + Override toString and valueOf functions, second toString throw + exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}} @@ -27,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T3.js index 978293a6f2..448667473e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T3.js - * @description Override toString and valueOf functions - */ +/*--- +info: > + when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.7_A4_T3 +description: Override toString and valueOf functions +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return {};},toString:function(){return "1";}} @@ -19,4 +19,3 @@ if ("ABB\u0041BABAB".indexOf(__obj, __obj2)!==3) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T4.js index 3783f73c6b..d6815ff164 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T4.js - * @description Override toString and valueOf functions, and they throw exceptions - */ +/*--- +info: > + when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.7_A4_T4 +description: Override toString and valueOf functions, and they throw exceptions +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}}; var __obj2 = {valueOf:function(){throw "intoint";}}; @@ -28,4 +29,3 @@ with(__instance){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T5.js index 1bd6fcb86c..edaac9b581 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T5.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A4_T5.js - * @description Override toString and valueOf functions, first and second valueOf throw exception - */ +/*--- +info: > + when String.prototype.indexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.7_A4_T5 +description: > + Override toString and valueOf functions, first and second valueOf + throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}; @@ -35,4 +38,3 @@ function __FACTORY( value ) { this.toString = function() { return new Number; }; this.valueOf=function(){return this.value+""}; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T1.js index a71670742b..eef162fed4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf works properly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T1.js - * @description Search one symbol from begin of string - */ +/*--- +info: String.prototype.indexOf works properly +es5id: 15.5.4.7_A5_T1 +description: Search one symbol from begin of string +---*/ var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ); @@ -19,4 +18,3 @@ for (var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T2.js index bb51702152..b6f09b64c6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf works properly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T2.js - * @description Search one symbol from it`s position in the string - */ +/*--- +info: String.prototype.indexOf works properly +es5id: 15.5.4.7_A5_T2 +description: Search one symbol from it`s position in the string +---*/ var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ); @@ -19,4 +18,3 @@ for (var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T3.js index 63ac593043..f13ef48475 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf works properly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T3.js - * @description Search one symbol from it`s position+1 in the string - */ +/*--- +info: String.prototype.indexOf works properly +es5id: 15.5.4.7_A5_T3 +description: Search one symbol from it`s position+1 in the string +---*/ var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ); @@ -19,4 +18,3 @@ for ( var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T4.js index acb405bd56..1d89cb311e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf works properly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T4.js - * @description Search substring from begin of string - */ +/*--- +info: String.prototype.indexOf works properly +es5id: 15.5.4.7_A5_T4 +description: Search substring from begin of string +---*/ var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ); @@ -19,4 +18,3 @@ for (var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T5.js index 4882bd16c9..95262eb4e4 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf works properly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T5.js - * @description Search substring from it`s position in the string - */ +/*--- +info: String.prototype.indexOf works properly +es5id: 15.5.4.7_A5_T5 +description: Search substring from it`s position in the string +---*/ var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ); @@ -19,4 +18,3 @@ for ( var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T6.js index 46ee650e83..c8456ed37b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf works properly - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A5_T6.js - * @description Search substring from it`s position+1 in the string - */ +/*--- +info: String.prototype.indexOf works properly +es5id: 15.5.4.7_A5_T6 +description: Search substring from it`s position+1 in the string +---*/ var TEST_STRING = new String( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ); @@ -19,4 +18,3 @@ for (var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A6.js index b7b2773fee..406153de78 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A6.js - * @description Checking String.prototype.indexOf.prototype - */ +/*--- +info: String.prototype.indexOf has not prototype property +es5id: 15.5.4.7_A6 +description: Checking String.prototype.indexOf.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.indexOf.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A7.js index e9fda93c99..c7f8866c52 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.indexOf can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A7.js - * @description Checking if creating the String.prototype.indexOf object fails - */ +/*--- +info: String.prototype.indexOf can't be used as constructor +es5id: 15.5.4.7_A7 +description: Checking if creating the String.prototype.indexOf object fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var __FACTORY = String.prototype.indexOf; @@ -19,4 +21,3 @@ try { } $PRINT(e); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A8.js index 99a509ed3b..22e3a52c8a 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.indexOf.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A8.js - * @description Checking if enumerating the String.prototype.indexOf.length property fails - */ +/*--- +info: The String.prototype.indexOf.length property has the attribute DontEnum +es5id: 15.5.4.7_A8 +description: > + Checking if enumerating the String.prototype.indexOf.length + property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +39,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A9.js index 61f6913449..f7ae5eb7dd 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A9.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.indexOf.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A9.js - * @description Checking if deleting the String.prototype.indexOf.length property fails - */ +/*--- +info: The String.prototype.indexOf.length property has the attribute DontDelete +es5id: 15.5.4.7_A9 +description: > + Checking if deleting the String.prototype.indexOf.length property + fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +33,3 @@ if (!(String.prototype.indexOf.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A10.js index 8d512c175b..a51d889b5b 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A10.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.lastIndexOf.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A10.js - * @description Checking if varying the String.prototype.lastIndexOf.length property fails - */ +/*--- +info: > + The String.prototype.lastIndexOf.length property has the attribute + ReadOnly +es5id: 15.5.4.8_A10 +description: > + Checking if varying the String.prototype.lastIndexOf.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +31,3 @@ if (String.prototype.lastIndexOf.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A11.js index 63bbf17287..4ffaeb11f9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the lastIndexOf method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A11.js - * @description Checking String.prototype.lastIndexOf.length - */ +/*--- +info: The length property of the lastIndexOf method is 1 +es5id: 15.5.4.8_A11 +description: Checking String.prototype.lastIndexOf.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.lastIndexOf.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T1.js index 490bbeedbd..9c97a086eb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T1.js - * @description Arguments are false and true, and instance is object - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T1 +description: Arguments are false and true, and instance is object +---*/ var __instance = new Object(true); @@ -19,4 +18,3 @@ if (__instance.lastIndexOf(true, false) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T10.js index 54ce2d778c..4bfefb8de6 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T10.js - * @description Call lastIndexOf(searchString, position) function with object arguments - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T10 +description: > + Call lastIndexOf(searchString, position) function with object + arguments +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return NaN;}} @@ -23,4 +24,3 @@ with(__str){ ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T12.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T12.js index 5b7750d712..293237feb9 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T12.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T12.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T12.js - * @description Argument is string, and instance is array of strings - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T12 +description: Argument is string, and instance is array of strings +---*/ var __instance = new Array('new','zoo','revue'); @@ -25,4 +24,3 @@ if (__instance.lastIndexOf('zoo') !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T2.js index bda402f77d..27072b7b73 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T2.js - * @description Arguments are boolean equation, function and null, and instance is Boolean object - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T2 +description: > + Arguments are boolean equation, function and null, and instance is + Boolean object +---*/ var __instance = new Boolean; @@ -19,4 +20,3 @@ if (__instance.lastIndexOf("A"!=="\u0041", function(){return 0;}(),null) !== 0) } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T4.js index 954db0d241..ebed93a094 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T4.js - * @description Call lastIndexOf(searchString, position) function without arguments of string - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T4 +description: > + Call lastIndexOf(searchString, position) function without + arguments of string +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if ("".lastIndexOf() !== -1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T5.js index 5cfab859ca..69ab010612 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T5.js - * @description Call lastIndexOf(searchString, position) function with null argument of function object - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T5 +description: > + Call lastIndexOf(searchString, position) function with null + argument of function object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (function(){return "gnullunazzgnull"}().lastIndexOf(null) !== 11) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T6.js index 43b0243f49..9517f5e65c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T6.js - * @description Call lastIndexOf(searchString, position) function with x argument of new String object, where x is undefined variable - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T6 +description: > + Call lastIndexOf(searchString, position) function with x argument + of new String object, where x is undefined variable +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -18,4 +19,3 @@ if (new String("undefined").lastIndexOf(x) !== 0) { ////////////////////////////////////////////////////////////////////////////// var x; - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T7.js index 5699bdfdbb..a68a8d5abc 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T7.js - * @description Call lastIndexOf(searchString, position) function with undefined argument of string object - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T7 +description: > + Call lastIndexOf(searchString, position) function with undefined + argument of string object +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -16,4 +17,3 @@ if (String("undefined").lastIndexOf(undefined) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T8.js index a13e7c4616..29068e54e8 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T8.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T8.js - * @description Call lastIndexOf(searchString, position) function with void 0 argument of string object - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T8 +description: > + Call lastIndexOf(searchString, position) function with void 0 + argument of string object +---*/ var __obj = {toString:function(){}}; @@ -18,4 +19,3 @@ if (String(__obj).lastIndexOf(void 0) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T9.js index 2d971ac682..ff3b8527c7 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf(searchString, position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A1_T9.js - * @description Call lastIndexOf(searchString, position) function with function(){}() argument of string object - */ +/*--- +info: String.prototype.lastIndexOf(searchString, position) +es5id: 15.5.4.8_A1_T9 +description: > + Call lastIndexOf(searchString, position) function with + function(){}() argument of string object +---*/ var __obj = { valueOf:function(){}, @@ -21,4 +22,3 @@ if (new String(__obj).lastIndexOf(function(){}()) !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T1.js index 54a783ac0a..2e74ff267f 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T1.js - * @description Override toString and valueOf functions, valueOf throw exception - */ +/*--- +info: > + when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.8_A4_T1 +description: Override toString and valueOf functions, valueOf throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){throw "intointeger";}} @@ -29,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T2.js index 6c50f3b739..1666c8d4ea 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T2.js - * @description Override toString and valueOf functions, second toString throw exception - */ +/*--- +info: > + when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.8_A4_T2 +description: > + Override toString and valueOf functions, second toString throw + exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return {};},toString:function(){throw "intointeger";}} @@ -27,4 +30,3 @@ with(__str){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T3.js index 59d0efe87a..d654ae2239 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T3.js - * @description Override toString and valueOf functions - */ +/*--- +info: > + when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.8_A4_T3 +description: Override toString and valueOf functions +---*/ var __obj = {toString:function(){return "\u0041B";}} var __obj2 = {valueOf:function(){return {};},toString:function(){}} @@ -19,4 +19,3 @@ if ("ABB\u0041BABAB".lastIndexOf(__obj, __obj2)!==7) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T4.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T4.js index 83d2414b0c..732a46ec5c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T4.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T4.js - * @description Override toString and valueOf functions, and they throw exceptions - */ +/*--- +info: > + when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.8_A4_T4 +description: Override toString and valueOf functions, and they throw exceptions +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){throw "intostr";}}; var __obj2 = {valueOf:function(){throw "intoint";}}; @@ -28,4 +29,3 @@ with(__instance){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T5.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T5.js index cf34fa1dc2..58ab508d70 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T5.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T5.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. - * Then Call ToString(searchString) and Call ToNumber(position) - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A4_T5.js - * @description Override toString and valueOf functions, first and second valueOf throw exception - */ +/*--- +info: > + when String.prototype.lastIndexOf(searchString, position) is called first Call ToString, giving it the this value as its argument. + Then Call ToString(searchString) and Call ToNumber(position) +es5id: 15.5.4.8_A4_T5 +description: > + Override toString and valueOf functions, first and second valueOf + throw exception +includes: [$FAIL.js] +---*/ var __obj = {toString:function(){return {};},valueOf:function(){throw "intostr";}}; @@ -35,4 +38,3 @@ function __FACTORY( value ) { this.toString = function() { return new Number; }; this.valueOf=function(){return this.value+""}; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A6.js index ce738c7254..96170a0ca0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A6.js - * @description Checking String.prototype.lastIndexOf.prototype - */ +/*--- +info: String.prototype.lastIndexOf has not prototype property +es5id: 15.5.4.8_A6 +description: Checking String.prototype.lastIndexOf.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.lastIndexOf.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A7.js index 3f83ddd9a5..e813df59bb 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.lastIndexOf can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A7.js - * @description Checking if creating the String.prototype.lastIndexOf object fails - */ +/*--- +info: String.prototype.lastIndexOf can't be used as constructor +es5id: 15.5.4.8_A7 +description: Checking if creating the String.prototype.lastIndexOf object fails +includes: + - $PRINT.js + - $FAIL.js +---*/ var __FACTORY = String.prototype.lastIndexOf; @@ -16,4 +18,3 @@ try { } catch (e) { $PRINT(e); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A8.js index 1302065203..5aadb31e56 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A8.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.lastIndexOf.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A8.js - * @description Checking if enumerating the String.prototype.lastIndexOf.length property fails - */ +/*--- +info: > + The String.prototype.lastIndexOf.length property has the attribute + DontEnum +es5id: 15.5.4.8_A8 +description: > + Checking if enumerating the String.prototype.lastIndexOf.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +42,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A9.js index de01ba9f72..0eba9ee622 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A9.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.lastIndexOf.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A9.js - * @description Checking if deleting the String.prototype.lastIndexOf.length property fails - */ +/*--- +info: > + The String.prototype.lastIndexOf.length property has the attribute + DontDelete +es5id: 15.5.4.8_A9 +description: > + Checking if deleting the String.prototype.lastIndexOf.length + property fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +35,3 @@ if (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_3.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_3.js index 441166c9fb..06517ec3a5 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_3.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_3.js @@ -1,11 +1,13 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that String.prototype.localeCompare treats a missing - * "that" argument, undefined, and "undefined" as equivalent. - * @author Norbert Lindenberg - */ +/*--- +es5id: 15.5.4.9_3 +description: > + Tests that String.prototype.localeCompare treats a missing "that" + argument, undefined, and "undefined" as equivalent. +author: Norbert Lindenberg +---*/ var thisValues = ["a", "t", "u", "undefined", "UNDEFINED", "nicht definiert", "xyz", "未定义"]; @@ -19,4 +21,3 @@ for (i = 0; i < thisValues.length; i++) { $ERROR("String.prototype.localeCompare does not treat undefined 'that' argument as \"undefined\"."); } } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_CE.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_CE.js index 4eda191bca..365a805954 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_CE.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/15.5.4.9_CE.js @@ -3,12 +3,14 @@ // Copyright 2013 Microsoft Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that String.prototype.localeCompare - * returns 0 when comparing Strings that are considered canonically equivalent - * by the Unicode standard. - * @author Norbert Lindenberg - */ +/*--- +es5id: 15.5.4.9_CE +description: > + Tests that String.prototype.localeCompare returns 0 when + comparing Strings that are considered canonically equivalent by + the Unicode standard. +author: Norbert Lindenberg +---*/ // pairs with characters not in Unicode 3.0 are commented out var pairs = [ diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A10.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A10.js index e2ced33f66..d6f4dbd2e0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A10.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A10.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.localeCompare.length property has the attribute ReadOnly - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A10.js - * @description Checking if varying the String.prototype.localeCompare.length property fails - */ +/*--- +info: > + The String.prototype.localeCompare.length property has the attribute + ReadOnly +es5id: 15.5.4.9_A10 +description: > + Checking if varying the String.prototype.localeCompare.length + property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -27,4 +30,3 @@ if (String.prototype.localeCompare.length !== __obj) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A11.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A11.js index 7af91d484f..4cd0b2bce3 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A11.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A11.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the localeCompare method is 1 - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A11.js - * @description Checking String.prototype.localeCompare.length - */ +/*--- +info: The length property of the localeCompare method is 1 +es5id: 15.5.4.9_A11 +description: Checking String.prototype.localeCompare.length +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -23,4 +22,3 @@ if (String.prototype.localeCompare.length !== 1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T1.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T1.js index 5bab3d3183..36c1e70197 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.localeCompare(that) - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T1.js - * @description This string is symbol and arguments are symbols - */ +/*--- +info: String.prototype.localeCompare(that) +es5id: 15.5.4.9_A1_T1 +description: This string is symbol and arguments are symbols +---*/ var str1 = new String("h"); //CHECK#1 @@ -26,4 +25,3 @@ var str2 = new String ("h"); if (str1.localeCompare(str2)!==0){ $ERROR('#3: var str1 = new String("h"); var str2 = new String ("h"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2)); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T2.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T2.js index 1b4c561b19..be41eeb44c 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.localeCompare(that) - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A1_T2.js - * @description Call string_1.localeCompare(string_2) is equal -string_2.localeCompare(string_1) - */ +/*--- +info: String.prototype.localeCompare(that) +es5id: 15.5.4.9_A1_T2 +description: > + Call string_1.localeCompare(string_2) is equal + -string_2.localeCompare(string_1) +---*/ //CHECK#1 var str1 = "h"; @@ -14,4 +15,3 @@ var str2 = "H"; if (str1.localeCompare(str2)!==-str2.localeCompare(str1)){ $ERROR('#1.1: var str1 = "h"; var str2 = "H"; str1.localeCompare(str2)===-str2.localeCompare(str1). Actual: '+str1.localeCompare(str2)); } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A6.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A6.js index fb01cb1218..19001efc7e 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A6.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A6.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.localeCompare has not prototype property - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A6.js - * @description Checking String.prototype.localeCompare.prototype - */ +/*--- +info: String.prototype.localeCompare has not prototype property +es5id: 15.5.4.9_A6 +description: Checking String.prototype.localeCompare.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +14,3 @@ if (String.prototype.localeCompare.prototype !== undefined) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A7.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A7.js index 42ef959479..6b86b46c32 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A7.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A7.js @@ -1,19 +1,22 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.localeCompare can't be used as constructor - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A7.js - * @description Checking if creating the String.prototype.localeCompare object fails - */ +/*--- +info: String.prototype.localeCompare can't be used as constructor +es5id: 15.5.4.9_A7 +description: > + Checking if creating the String.prototype.localeCompare object + fails +includes: + - $FAIL.js + - Test262Error.js +---*/ var __FACTORY = String.prototype.localeCompare; try { var __instance = new __FACTORY; - $FAIL('#1: __FACTORY = String.prototype.localeCompare; __instance = new __FACTORY lead to throwing exception'); -} catch (e) { + $FAIL('#1: __FACTORY = String.prototype.localeCompare; __instance = new __FACTORY lead to throwing exception'); +} catch (e) { if (e instanceof Test262Error) throw e; } - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A8.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A8.js index 4d25c0a1c0..c09dc943d0 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A8.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A8.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.localeCompare.length property has the attribute DontEnum - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A8.js - * @description Checking if enumerating the String.prototype.localeCompare.length property fails - */ +/*--- +info: > + The String.prototype.localeCompare.length property has the attribute + DontEnum +es5id: 15.5.4.9_A8 +description: > + Checking if enumerating the String.prototype.localeCompare.length + property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -38,4 +41,3 @@ if (count !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A9.js b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A9.js index 41f76f7ab0..6898301060 100644 --- a/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A9.js +++ b/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A9.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String.prototype.localeCompare.length property has the attribute DontDelete - * - * @path ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A9.js - * @description Checking if deleting the String.prototype.localeCompare.length property fails - */ +/*--- +info: > + The String.prototype.localeCompare.length property has the attribute + DontDelete +es5id: 15.5.4.9_A9 +description: > + Checking if deleting the String.prototype.localeCompare.length + property fails +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#0 @@ -31,4 +34,3 @@ if (!(String.prototype.localeCompare.hasOwnProperty('length'))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T1.js index 5a7b583ab3..811d05a420 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of String.prototype.constructor is the built-in String constructor - * - * @path ch15/15.5/15.5.4/S15.5.4.1_A1_T1.js - * @description Checking String.prototype.constructor - */ +/*--- +info: > + The initial value of String.prototype.constructor is the built-in String + constructor +es5id: 15.5.4.1_A1_T1 +description: Checking String.prototype.constructor +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (String.prototype.constructor !== String) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T2.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T2.js index c4e2b175cf..62709d5374 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.1_A1_T2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of String.prototype.constructor is the built-in String constructor - * - * @path ch15/15.5/15.5.4/S15.5.4.1_A1_T2.js - * @description Create new String.prototype.constructor object and check it - */ +/*--- +info: > + The initial value of String.prototype.constructor is the built-in String + constructor +es5id: 15.5.4.1_A1_T2 +description: Create new String.prototype.constructor object and check it +---*/ var __constr = String.prototype.constructor; @@ -47,4 +48,3 @@ if (__instance.toString() !== __to_string_result) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T1.js index 66934a4acd..b83c5b1832 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toString() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A1_T1.js - * @description Create new String(number) and check it`s method toString() - */ +/*--- +info: String.prototype.toString() returns this string value +es5id: 15.5.4.2_A1_T1 +description: Create new String(number) and check it`s method toString() +---*/ var __string__obj = new String(1); @@ -17,4 +16,3 @@ if (__string__obj.toString() !== ""+1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T2.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T2.js index b8c88ac62b..568f1a93fc 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toString() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A1_T2.js - * @description Create new String(boolean) and check it`s method toString() - */ +/*--- +info: String.prototype.toString() returns this string value +es5id: 15.5.4.2_A1_T2 +description: Create new String(boolean) and check it`s method toString() +---*/ var __string__obj = new String(true); @@ -17,4 +16,3 @@ if (__string__obj.toString() !== ""+true) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T3.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T3.js index 0099e68c74..2720ba435f 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toString() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A1_T3.js - * @description Create new String(string) and check it`s method toString() - */ +/*--- +info: String.prototype.toString() returns this string value +es5id: 15.5.4.2_A1_T3 +description: Create new String(string) and check it`s method toString() +---*/ var __string__obj = new String("metal"); @@ -17,4 +16,3 @@ if (__string__obj.toString() !== "metal") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T4.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T4.js index ce76b13ece..933030ef57 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A1_T4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toString() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A1_T4.js - * @description Create new String(function(){}()) and check it`s method toString() - */ +/*--- +info: String.prototype.toString() returns this string value +es5id: 15.5.4.2_A1_T4 +description: Create new String(function(){}()) and check it`s method toString() +---*/ var __string__obj = new String(function(){}()); @@ -17,4 +16,3 @@ if (__string__obj.toString() !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T1.js index 07385a3ec7..018af174bd 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic; it throws a TypeError exception if its this value is not a String object. Therefore, it cannot be transferred to other kinds of objects for use as a method - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A2_T1.js - * @description Checking if creating variable String.prototype.toString fails - */ +/*--- +info: > + The toString function is not generic; it throws a TypeError exception if + its this value is not a String object. Therefore, it cannot be + transferred to other kinds of objects for use as a method +es5id: 15.5.4.2_A2_T1 +description: Checking if creating variable String.prototype.toString fails +includes: [$FAIL.js] +---*/ var __toString = String.prototype.toString; @@ -31,4 +34,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T2.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T2.js index fee77c5f2c..3f71cc5dcd 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A2_T2.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic; it throws a TypeError exception if its this value is not a String object. Therefore, it cannot be transferred to other kinds of objects for use as a method - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A2_T2.js - * @description Checking if creating the object String.prototype.toString fails - */ +/*--- +info: > + The toString function is not generic; it throws a TypeError exception if + its this value is not a String object. Therefore, it cannot be + transferred to other kinds of objects for use as a method +es5id: 15.5.4.2_A2_T2 +description: Checking if creating the object String.prototype.toString fails +includes: [$FAIL.js] +---*/ var __obj={toString : String.prototype.toString}; @@ -31,4 +34,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A3_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A3_T1.js index 5d95ca6cba..51b235fe11 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A3_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A3_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toString() is equal String.prototype.valueOf() - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A3_T1.js - * @description Create new String() with various arguments and compare returned results of toString() and valueOf() - */ +/*--- +info: String.prototype.toString() is equal String.prototype.valueOf() +es5id: 15.5.4.2_A3_T1 +description: > + Create new String() with various arguments and compare returned + results of toString() and valueOf() +---*/ //CHECK#1 var str = new String(); @@ -27,4 +28,3 @@ if(!(str.valueOf() == str.toString())) str = new String(Math.PI); if(!(str.valueOf() == str.toString())) $ERROR('#4: str = new String(Math.PI),str.valueOf() == str.toString()'); - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A4_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A4_T1.js index 6a0ca09ad8..f4b51a90af 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A4_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.2_A4_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.toString have length property and it is equal 0 - * - * @path ch15/15.5/15.5.4/S15.5.4.2_A4_T1.js - * @description Checking String.prototype.toString.length property - */ +/*--- +info: String.prototype.toString have length property and it is equal 0 +es5id: 15.5.4.2_A4_T1 +description: Checking String.prototype.toString.length property +---*/ //CHECK#1 if (String.prototype.toString.hasOwnProperty('length')!==true){ @@ -17,4 +16,3 @@ else{ if (String.prototype.toString.length!==0) $ERROR('#2: String.prototype.toString.length===0. Actual: String.prototype.toString.length==='+String.prototype.toString.length); } - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T1.js index 94c2e9738a..a3080da71b 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.valueOf() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.3_A1_T1.js - * @description Create String object as new String(1) and check it`s valueOf() - */ +/*--- +info: String.prototype.valueOf() returns this string value +es5id: 15.5.4.3_A1_T1 +description: Create String object as new String(1) and check it`s valueOf() +---*/ var __string__obj = new String(1); @@ -17,4 +16,3 @@ if (__string__obj.valueOf() !== ""+1) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T2.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T2.js index 8ce7a26ce9..553ccf768a 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.valueOf() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.3_A1_T2.js - * @description Create String object as new String(true) and check it`s valueOf() - */ +/*--- +info: String.prototype.valueOf() returns this string value +es5id: 15.5.4.3_A1_T2 +description: Create String object as new String(true) and check it`s valueOf() +---*/ var __string__obj = new String(true); @@ -17,4 +16,3 @@ if (__string__obj.valueOf() !== ""+true) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T3.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T3.js index 974ee43472..cbeb4dd017 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T3.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.valueOf() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.3_A1_T3.js - * @description Create String object as new String(string) and check it`s valueOf() - */ +/*--- +info: String.prototype.valueOf() returns this string value +es5id: 15.5.4.3_A1_T3 +description: Create String object as new String(string) and check it`s valueOf() +---*/ var __string__obj = new String("metal"); @@ -17,4 +16,3 @@ if (__string__obj.valueOf() !== "metal") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T4.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T4.js index ec4b401033..e7beb039a5 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T4.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A1_T4.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String.prototype.valueOf() returns this string value - * - * @path ch15/15.5/15.5.4/S15.5.4.3_A1_T4.js - * @description Create String object as new String(function(){}()) and check it`s valueOf() - */ +/*--- +info: String.prototype.valueOf() returns this string value +es5id: 15.5.4.3_A1_T4 +description: > + Create String object as new String(function(){}()) and check it`s + valueOf() +---*/ var __string__obj = new String(function(){}()); @@ -17,4 +18,3 @@ if (__string__obj.valueOf() !== "undefined") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T1.js index daefea4847..1b13ea6040 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic; it throws a TypeError exception if its this value is not a String object. - * Therefore, it cannot be transferred to other kinds of objects for use as a method - * - * @path ch15/15.5/15.5.4/S15.5.4.3_A2_T1.js - * @description Checking if creating variable String.prototype.valueOf fails - */ +/*--- +info: > + The valueOf function is not generic; it throws a TypeError exception if its this value is not a String object. + Therefore, it cannot be transferred to other kinds of objects for use as a method +es5id: 15.5.4.3_A2_T1 +description: Checking if creating variable String.prototype.valueOf fails +includes: [$FAIL.js] +---*/ var __valueOf = String.prototype.valueOf; @@ -32,4 +33,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T2.js b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T2.js index e411d04a78..24f3e47db0 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4.3_A2_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic; it throws a TypeError exception if its this value is not a String object. - * Therefore, it cannot be transferred to other kinds of objects for use as a method - * - * @path ch15/15.5/15.5.4/S15.5.4.3_A2_T2.js - * @description Checking if creating the object String.prototype.valueOf fails - */ +/*--- +info: > + The valueOf function is not generic; it throws a TypeError exception if its this value is not a String object. + Therefore, it cannot be transferred to other kinds of objects for use as a method +es5id: 15.5.4.3_A2_T2 +description: Checking if creating the object String.prototype.valueOf fails +includes: [$FAIL.js] +---*/ var __obj={valueOf : String.prototype.valueOf}; @@ -32,4 +33,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4_A1.js b/test/suite/ch15/15.5/15.5.4/S15.5.4_A1.js index a7a22899e5..2f202199dd 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4_A1.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4_A1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String prototype object is itself a String object (its [[Class]] is "String") - * - * @path ch15/15.5/15.5.4/S15.5.4_A1.js - * @description first we delete String.prototype.toString cause it overrides Object prototype toString. - * Object.prototype.toString returns [object+[[class]]+] - */ +/*--- +info: > + The String prototype object is itself a String object (its [[Class]] is + "String") +es5id: 15.5.4_A1 +description: > + first we delete String.prototype.toString cause it overrides + Object prototype toString. Object.prototype.toString returns + [object+[[class]]+] +---*/ delete String.prototype.toString; @@ -18,4 +21,3 @@ if (String.prototype.toString() !== "[object "+"String"+"]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4_A2.js b/test/suite/ch15/15.5/15.5.4/S15.5.4_A2.js index 06ec514599..8d28ad383f 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4_A2.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The String prototype object is itself a String object whose value is an empty string - * - * @path ch15/15.5/15.5.4/S15.5.4_A2.js - * @description Checking String.prototype - */ +/*--- +info: > + The String prototype object is itself a String object whose value is an + empty string +es5id: 15.5.4_A2 +description: Checking String.prototype +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -15,4 +16,3 @@ if (String.prototype !="") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.4/S15.5.4_A3.js b/test/suite/ch15/15.5/15.5.4/S15.5.4_A3.js index 1f8df3820f..6633499f45 100644 --- a/test/suite/ch15/15.5/15.5.4/S15.5.4_A3.js +++ b/test/suite/ch15/15.5/15.5.4/S15.5.4_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the String prototype object is the Object prototype object (15.2.3.1) - * - * @path ch15/15.5/15.5.4/S15.5.4_A3.js - * @description Checking Object.prototype.isPrototypeOf(String.prototype) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the String prototype + object is the Object prototype object (15.2.3.1) +es5id: 15.5.4_A3 +description: Checking Object.prototype.isPrototypeOf(String.prototype) +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -25,4 +26,3 @@ if (String.prototype.toString() != "[object "+"String"+"]") { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js index 054db6236e..d370fc7585 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js @@ -1,23 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js - * @description String object supports bracket notation to lookup of data properties - */ - - -function testcase() { - var s = new String("hello world"); - s.foo = 1; - - if (s["foo"] === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-1-1 +description: > + String object supports bracket notation to lookup of data + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + s.foo = 1; + + if (s["foo"] === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js index 29cd56e9f9..2c540676f8 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js - * @description String value supports bracket notation to lookup data properties - */ - - -function testcase() { - var s = String("hello world"); - - if (s["foo"] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-1-2 +description: String value supports bracket notation to lookup data properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s["foo"] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js index 676b19df44..3baf63fc7b 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js - * @description String object indexing returns undefined for missing data properties - */ - - -function testcase() { - var s = new String("hello world"); - - if (s["foo"] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-1 +description: > + String object indexing returns undefined for missing data + properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + + if (s["foo"] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js index d21cd552ec..415e11db70 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js @@ -1,22 +1,23 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js - * @description String value indexing returns undefined for missing data properties - */ - - -function testcase() { - var s = String("hello world"); - - if (s["foo"] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-2 +description: String value indexing returns undefined for missing data properties +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s["foo"] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js index 2f4e0fc802..b95d61d14d 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js - * @description String object indexing returns undefined if the numeric index (NaN) is not an array index - */ - - -function testcase() { - var s = new String("hello world"); - - if (s[NaN] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-3 +description: > + String object indexing returns undefined if the numeric index + (NaN) is not an array index +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + + if (s[NaN] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js index 3e014dccc5..40f77122cd 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js - * @description String object indexing returns undefined if the numeric index (Infinity) is not an array index - */ - - -function testcase() { - var s = new String("hello world"); - - if (s[Infinity] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-4 +description: > + String object indexing returns undefined if the numeric index + (Infinity) is not an array index +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + + if (s[Infinity] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js index df7af1bab3..96022b416f 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js - * @description String object indexing returns undefined if the numeric index ( 2^32-1) is not an array index - */ - - -function testcase() { - var s = new String("hello world"); - - if (s[Math.pow(2, 32)-1]===undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-5 +description: > + String object indexing returns undefined if the numeric index ( + 2^32-1) is not an array index +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + + if (s[Math.pow(2, 32)-1]===undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js index 0ff361ca6b..30310d8099 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js - * @description String value indexing returns undefined if the numeric index (NaN) is not an array index - */ - - -function testcase() { - var s = String("hello world"); - - if (s[NaN] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-6 +description: > + String value indexing returns undefined if the numeric index (NaN) + is not an array index +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s[NaN] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js index 1d30edcf4d..4cfdbc8eb9 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js - * @description String value indexing returns undefined if the numeric index (Infinity) is not an array index - */ - - -function testcase() { - var s = String("hello world"); - - if (s[Infinity] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-7 +description: > + String value indexing returns undefined if the numeric index + (Infinity) is not an array index +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s[Infinity] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js index d2363cd130..4897223008 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js - * @description String value indexing returns undefined if the numeric index ( >= 2^32-1) is not an array index - */ - - -function testcase() { - var s = String("hello world"); - - if (s[Math.pow(2, 32)-1]===undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-3-8 +description: > + String value indexing returns undefined if the numeric index ( >= + 2^32-1) is not an array index +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s[Math.pow(2, 32)-1]===undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js index fbc563c11f..16b2e01803 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js - * @description String object indexing returns undefined if the numeric index is less than 0 - */ - - -function testcase() { - var s = new String("hello world"); - - if (s[-1] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-7-1 +description: > + String object indexing returns undefined if the numeric index is + less than 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + + if (s[-1] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js index 3d0a472889..60e5e63d12 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js - * @description String value indexing returns undefined if the numeric index is less than 0 - */ - - -function testcase() { - var s = String("hello world"); - - if (s[-1] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-7-2 +description: > + String value indexing returns undefined if the numeric index is + less than 0 +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s[-1] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js index 07bb26557e..e136b8000e 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js - * @description String object indexing returns undefined if the numeric index is greater than the string length - */ - - -function testcase() { - var s = new String("hello world"); - - if (s[11] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-7-3 +description: > + String object indexing returns undefined if the numeric index is + greater than the string length +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = new String("hello world"); + + if (s[11] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js index 712f387371..0b84381569 100644 --- a/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js +++ b/test/suite/ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js @@ -1,22 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing - * notation to look up non numeric property names. - * - * @path ch15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js - * @description String value indexing returns undefined if the numeric index is greater than the string length - */ - - -function testcase() { - var s = String("hello world"); - - if (s[11] === undefined) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +info: > + 15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing + notation to look up non numeric property names. +es5id: 15.5.5.5.2-7-4 +description: > + String value indexing returns undefined if the numeric index is + greater than the string length +includes: [runTestCase.js] +---*/ + +function testcase() { + var s = String("hello world"); + + if (s[11] === undefined) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A1.js b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A1.js index 90cf55b6f3..2d87af6a9f 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A1.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * length property contains the number of characters in the String value represented by this String object - * - * @path ch15/15.5/15.5.5/S15.5.5.1_A1.js - * @description Create strings and check its length - */ +/*--- +info: > + length property contains the number of characters in the String value + represented by this String object +es5id: 15.5.5.1_A1 +description: Create strings and check its length +---*/ var __str__instance = new String("ABC\u0041\u0042\u0043"); @@ -27,4 +28,3 @@ if (__str__instance.length !== 0) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A2.js b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A2.js index 3de19c4753..72dc86539c 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A2.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * length property has the attributes {DontEnum} - * - * @path ch15/15.5/15.5.5/S15.5.5.1_A2.js - * @description Checking if enumerating the length property of String fails - */ +/*--- +info: length property has the attributes {DontEnum} +es5id: 15.5.5.1_A2 +description: Checking if enumerating the length property of String fails +---*/ var __str__instance = new String("globglob"); @@ -27,4 +26,3 @@ for(prop in __str__instance){ } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A3.js b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A3.js index 79daa3c66e..afea026525 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A3.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * length property has the attributes {DontDelete} - * - * @path ch15/15.5/15.5.5/S15.5.5.1_A3.js - * @description Checking if deleting the length property of String fails - */ +/*--- +info: length property has the attributes {DontDelete} +es5id: 15.5.5.1_A3 +description: Checking if deleting the length property of String fails +---*/ var __str__instance = new String("globglob"); @@ -33,4 +32,3 @@ if (!(__str__instance.hasOwnProperty("length"))) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A4.js b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A4.js index ccc5253ad7..38ef7ad607 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A4.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * length property has the attributes {ReadOnly} - * - * @path ch15/15.5/15.5.5/S15.5.5.1_A4.js - * @description Checking if varying the length property of String fails - */ +/*--- +info: length property has the attributes {ReadOnly} +es5id: 15.5.5.1_A4 +description: Checking if varying the length property of String fails +---*/ var __str__instance = new String("globglob"); @@ -56,4 +55,3 @@ if (__str__instance.length !== 8) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A5.js b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A5.js index d5cc38bd9c..e169e11706 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A5.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5.1_A5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Once a String object is created, the length property is unchanging - * - * @path ch15/15.5/15.5.5/S15.5.5.1_A5.js - * @description Change valueOf and toString of String object and check length property - */ +/*--- +info: Once a String object is created, the length property is unchanging +es5id: 15.5.5.1_A5 +description: > + Change valueOf and toString of String object and check length + property +---*/ var __str__instance = new String("ABC\u0041\u0042\u0043"); @@ -36,4 +37,3 @@ if (__str__instance.length !== 6) { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T1.js b/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T1.js index 33aaacb49f..c4341ab34d 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T1.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T1.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String instance has not [[call]] property - * - * @path ch15/15.5/15.5.5/S15.5.5_A1_T1.js - * @description Create new String and try call it - */ +/*--- +info: String instance has not [[call]] property +es5id: 15.5.5_A1_T1 +description: Create new String and try call it +includes: [$FAIL.js] +---*/ var __str = new String; @@ -22,4 +22,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T2.js b/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T2.js index 6396fadb8e..eb24a1912b 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T2.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String instance has not [[call]] property - * - * @path ch15/15.5/15.5.5/S15.5.5_A1_T2.js - * @description Checking if creating new "String("a|b")()" fails - */ +/*--- +info: String instance has not [[call]] property +es5id: 15.5.5_A1_T2 +description: Checking if creating new "String("a|b")()" fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -20,4 +20,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T1.js b/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T1.js index dea7b8d37f..47121d5122 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T1.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T1.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String instance has not [[construct]] property - * - * @path ch15/15.5/15.5.5/S15.5.5_A2_T1.js - * @description Create new string object and try new created_string - */ +/*--- +info: String instance has not [[construct]] property +es5id: 15.5.5_A2_T1 +description: Create new string object and try new created_string +includes: [$FAIL.js] +---*/ var __str = new Object(""); @@ -22,4 +22,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T2.js b/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T2.js index fb2595662c..3cf9079f08 100644 --- a/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T2.js +++ b/test/suite/ch15/15.5/15.5.5/S15.5.5_A2_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * String instance has not [[construct]] property - * - * @path ch15/15.5/15.5.5/S15.5.5_A2_T2.js - * @description Checking if creating "new String" fails - */ +/*--- +info: String instance has not [[construct]] property +es5id: 15.5.5_A2_T2 +description: Checking if creating "new String" fails +includes: [$FAIL.js] +---*/ ////////////////////////////////////////////////////////////////////////////// //CHECK#1 @@ -20,4 +20,3 @@ try { } // ////////////////////////////////////////////////////////////////////////////// - diff --git a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T1.js b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T1.js index 6dae5ce9dd..b0776de1d5 100644 --- a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T1.js +++ b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T1.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Returns a boolean value (not a Boolean object) computed by - * ToBoolean(value) - * - * @path ch15/15.6/15.6.1/S15.6.1.1_A1_T1.js - * @description Used values 1, new String("1"), new Object(1) and called without argument - */ +/*--- +info: > + Returns a boolean value (not a Boolean object) computed by + ToBoolean(value) +es5id: 15.6.1.1_A1_T1 +description: > + Used values 1, new String("1"), new Object(1) and called without + argument +---*/ //CHECK#1 if( typeof Boolean() !== "boolean" ) { @@ -28,5 +30,3 @@ if( typeof Boolean(new String("1")) !== "boolean" ) { if( typeof Boolean(new Object(1)) !== "boolean" ) { $ERROR('#4: typeof Boolean(new Object(1)) should be "boolean", actual is "'+typeof Boolean(new Object(1))+'"'); } - - diff --git a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T2.js b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T2.js index 21593718cc..653eab894c 100644 --- a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T2.js +++ b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Returns a boolean value (not a Boolean object) computed by - * ToBoolean(value) - * - * @path ch15/15.6/15.6.1/S15.6.1.1_A1_T2.js - * @description Used various number values as argument - */ +/*--- +info: > + Returns a boolean value (not a Boolean object) computed by + ToBoolean(value) +es5id: 15.6.1.1_A1_T2 +description: Used various number values as argument +---*/ //CHECK#1 if( typeof Boolean(0) !== "boolean" ) { @@ -40,4 +40,3 @@ if( typeof Boolean(NaN) !== "boolean" ) { if( Boolean(NaN) !== false ) { $ERROR('#4.2: Boolean(NaN) should be false, actual is '+Boolean(NaN)); } - diff --git a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T3.js b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T3.js index 2e943849ef..3abba02ad6 100644 --- a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T3.js +++ b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Returns a boolean value (not a Boolean object) computed by - * ToBoolean(value) - * - * @path ch15/15.6/15.6.1/S15.6.1.1_A1_T3.js - * @description Used various string values as argument - */ +/*--- +info: > + Returns a boolean value (not a Boolean object) computed by + ToBoolean(value) +es5id: 15.6.1.1_A1_T3 +description: Used various string values as argument +---*/ //CHECK#1 if( typeof Boolean("0") !== "boolean" ) { @@ -48,4 +48,3 @@ if( typeof Boolean("true") !== "boolean" ) { if( Boolean("true") !== true ) { $ERROR('#5.2: Boolean("true") should be true'); } - diff --git a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T4.js b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T4.js index bef38a5cb5..644b62ee50 100644 --- a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T4.js +++ b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Returns a boolean value (not a Boolean object) computed by - * ToBoolean(value) - * - * @path ch15/15.6/15.6.1/S15.6.1.1_A1_T4.js - * @description Used various undefined values and null as argument - */ +/*--- +info: > + Returns a boolean value (not a Boolean object) computed by + ToBoolean(value) +es5id: 15.6.1.1_A1_T4 +description: Used various undefined values and null as argument +---*/ //CHECK#1 if( typeof Boolean(undefined) !== "boolean" ) { @@ -49,4 +49,3 @@ if( Boolean(x) !== false ) { $ERROR('#5.2: var x; Boolean(x) should be false'); } var x; - diff --git a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T5.js b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T5.js index 015ef1f72a..2114e19958 100644 --- a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T5.js +++ b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A1_T5.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Returns a boolean value (not a Boolean object) computed by - * ToBoolean(value) - * - * @path ch15/15.6/15.6.1/S15.6.1.1_A1_T5.js - * @description Used various assigning values to any variable as argument - */ +/*--- +info: > + Returns a boolean value (not a Boolean object) computed by + ToBoolean(value) +es5id: 15.6.1.1_A1_T5 +description: Used various assigning values to any variable as argument +---*/ //CHECK#1 if( typeof Boolean(x=0) !== "boolean" ) { @@ -48,4 +48,3 @@ if( typeof Boolean(x=null) !== "boolean" ) { if( Boolean(x=null) !== false ) { $ERROR('#5.2: Boolean(x=null) should be false'); } - diff --git a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A2.js b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A2.js index b27d14f4b7..d613054d6e 100644 --- a/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A2.js +++ b/test/suite/ch15/15.6/15.6.1/S15.6.1.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean() returns false - * - * @path ch15/15.6/15.6.1/S15.6.1.1_A2.js - * @description Call Boolean() and check result - */ +/*--- +info: Boolean() returns false +es5id: 15.6.1.1_A2 +description: Call Boolean() and check result +---*/ //CHECK#1 if( typeof Boolean() !== "boolean" ) { @@ -17,4 +16,3 @@ if( typeof Boolean() !== "boolean" ) { if( Boolean() !== false ) { $ERROR('#2: Boolean() should be false'); } - diff --git a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A1.js b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A1.js index e7dc655bf1..f150c4863f 100644 --- a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A1.js +++ b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Boolean is called as part of a new expression it is - * a constructor: it initialises the newly created object - * - * @path ch15/15.6/15.6.2/S15.6.2.1_A1.js - * @description Checking type of the newly created object and it value - */ +/*--- +info: > + When Boolean is called as part of a new expression it is + a constructor: it initialises the newly created object +es5id: 15.6.2.1_A1 +description: Checking type of the newly created object and it value +---*/ //CHECK#1 if (typeof new Boolean() !== "object") { @@ -52,4 +52,3 @@ var x8 = new Boolean(1); if(x8 === undefined){ $ERROR("#8: new Boolean(1) should not be undefined"); } - diff --git a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A2.js b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A2.js index 1d5c38097c..31fae5296c 100644 --- a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A2.js +++ b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Boolean prototype object, the one that is the - * initial value of Boolean.prototype - * - * @path ch15/15.6/15.6.2/S15.6.2.1_A2.js - * @description Checking prototype property of the newly created object - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Boolean prototype object, the one that is the + initial value of Boolean.prototype +es5id: 15.6.2.1_A2 +description: Checking prototype property of the newly created object +---*/ // CHECK#1 var x1 = new Boolean(1); @@ -27,4 +27,3 @@ var x3 = new Boolean(3); if (Boolean.prototype !== x3.constructor.prototype) { $ERROR('#3: Boolean.prototype === x3.constructor.prototype'); } - diff --git a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A3.js b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A3.js index 0f34d486d3..fb1d497bcd 100644 --- a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A3.js +++ b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set to ToBoolean(value) - * - * @path ch15/15.6/15.6.2/S15.6.2.1_A3.js - * @description Checking value of the newly created object - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set to ToBoolean(value) +es5id: 15.6.2.1_A3 +description: Checking value of the newly created object +---*/ // CHECK#1 var x1 = new Boolean(1); @@ -32,4 +32,3 @@ var x2 = new Boolean(new Object()); if (x2.valueOf() !== true) { $ERROR('#4: var x2 = new Boolean(new Object()); x2.valueOf() === true'); } - diff --git a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A4.js b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A4.js index 34f32b9eba..5a0e8a2668 100644 --- a/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A4.js +++ b/test/suite/ch15/15.6/15.6.2/S15.6.2.1_A4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Boolean" - * - * @path ch15/15.6/15.6.2/S15.6.2.1_A4.js - * @description For testing toString function is used - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Boolean" +es5id: 15.6.2.1_A4 +description: For testing toString function is used +---*/ delete Boolean.prototype.toString; @@ -17,4 +17,3 @@ var obj = new Boolean(); if (obj.toString() !== "[object Boolean]") { $ERROR('#1: The [[Class]] property of the newly constructed object is set to "Boolean"'); } - diff --git a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A1.js b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A1.js index dc02388d8b..abdd3fb88a 100644 --- a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A1.js +++ b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Boolean.prototype is the Boolean - * prototype object - * - * @path ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A1.js - * @description Checking Boolean.prototype property - */ +/*--- +info: > + The initial value of Boolean.prototype is the Boolean + prototype object +es5id: 15.6.3.1_A1 +description: Checking Boolean.prototype property +---*/ //CHECK#1 if (typeof Boolean.prototype !== "object") { @@ -24,4 +24,3 @@ delete Boolean.prototype.toString; if (Boolean.prototype.toString() !== "[object Boolean]") { $ERROR('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"'); } - diff --git a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A2.js b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A2.js index 5a18d22acc..f276ec5ccc 100644 --- a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A2.js +++ b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean.prototype has the attribute ReadOnly - * - * @path ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A2.js - * @description Checking if varying the Boolean.prototype property fails - */ +/*--- +info: Boolean.prototype has the attribute ReadOnly +es5id: 15.6.3.1_A2 +description: Checking if varying the Boolean.prototype property fails +---*/ // CHECK#1 x = Boolean.prototype; @@ -14,4 +13,3 @@ Boolean.prototype = 1; if (Boolean.prototype !== x) { $ERROR('#1: Boolean.prototype has the attribute ReadOnly'); } - diff --git a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A3.js b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A3.js index 7b9c126697..6163f75ec0 100644 --- a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A3.js +++ b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A3.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean.prototype has the attribute DontDelete - * - * @path ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A3.js - * @description Checking if deleting the Boolean.prototype property fails - */ +/*--- +info: Boolean.prototype has the attribute DontDelete +es5id: 15.6.3.1_A3 +description: Checking if deleting the Boolean.prototype property fails +---*/ // CHECK#1 if (delete Boolean.prototype !== false) { $ERROR('#1: Boolean.prototype has the attribute DontDelete'); } - diff --git a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A4.js b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A4.js index e4d13be3db..533ce65696 100644 --- a/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A4.js +++ b/test/suite/ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean.prototype has the attribute DontEnum - * - * @path ch15/15.6/15.6.3/15.6.3.1/S15.6.3.1_A4.js - * @description Checking if enumerating the Boolean.prototype property fails - */ +/*--- +info: Boolean.prototype has the attribute DontEnum +es5id: 15.6.3.1_A4 +description: Checking if enumerating the Boolean.prototype property fails +---*/ //CHECK#1 for(x in Boolean) { @@ -18,4 +17,3 @@ for(x in Boolean) { if (Boolean.propertyIsEnumerable('prototype')) { $ERROR('#2: Boolean.prototype has the attribute DontEnum'); } - diff --git a/test/suite/ch15/15.6/15.6.3/S15.6.3_A1.js b/test/suite/ch15/15.6/15.6.3/S15.6.3_A1.js index 9ec6428d8d..d0d5637615 100644 --- a/test/suite/ch15/15.6/15.6.3/S15.6.3_A1.js +++ b/test/suite/ch15/15.6/15.6.3/S15.6.3_A1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Boolean constructor has the property "prototype" - * - * @path ch15/15.6/15.6.3/S15.6.3_A1.js - * @description Checking existence of the property "prototype" - */ +/*--- +info: The Boolean constructor has the property "prototype" +es5id: 15.6.3_A1 +description: Checking existence of the property "prototype" +---*/ if(!Boolean.hasOwnProperty("prototype")){ $ERROR('#1: The Boolean constructor has the property "prototype"'); } - - diff --git a/test/suite/ch15/15.6/15.6.3/S15.6.3_A2.js b/test/suite/ch15/15.6/15.6.3/S15.6.3_A2.js index edf988cd86..484d506eb6 100644 --- a/test/suite/ch15/15.6/15.6.3/S15.6.3_A2.js +++ b/test/suite/ch15/15.6/15.6.3/S15.6.3_A2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Boolean - * constructor is the Function prototype object - * - * @path ch15/15.6/15.6.3/S15.6.3_A2.js - * @description Checking prototype of the Boolean constructor - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Boolean + constructor is the Function prototype object +es5id: 15.6.3_A2 +description: Checking prototype of the Boolean constructor +---*/ //CHECK#1 if (!(Function.prototype.isPrototypeOf(Boolean))) { $ERROR('#1: the value of the internal [[Prototype]] property of the Boolean constructor is the Function prototype object.'); } - diff --git a/test/suite/ch15/15.6/15.6.3/S15.6.3_A3.js b/test/suite/ch15/15.6/15.6.3/S15.6.3_A3.js index 7f926f384b..bdbc7077b8 100644 --- a/test/suite/ch15/15.6/15.6.3/S15.6.3_A3.js +++ b/test/suite/ch15/15.6/15.6.3/S15.6.3_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean constructor has length property whose value is 1 - * - * @path ch15/15.6/15.6.3/S15.6.3_A3.js - * @description Checking Boolean.length property - */ +/*--- +info: Boolean constructor has length property whose value is 1 +es5id: 15.6.3_A3 +description: Checking Boolean.length property +---*/ //CHECK#1 if (!Boolean.hasOwnProperty("length")){ @@ -17,4 +16,3 @@ if (!Boolean.hasOwnProperty("length")){ if (Boolean.length !== 1) { $ERROR('#2: Boolean constructor length property value is 1'); } - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.1_A1.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.1_A1.js index 8b86159208..ef9b07f3cd 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.1_A1.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.1_A1.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Boolean.prototype.constructor is the - * built-in Boolean constructor - * - * @path ch15/15.6/15.6.4/S15.6.4.1_A1.js - * @description Compare Boolean.prototype.constructor with Boolean - */ +/*--- +info: > + The initial value of Boolean.prototype.constructor is the + built-in Boolean constructor +es5id: 15.6.4.1_A1 +description: Compare Boolean.prototype.constructor with Boolean +---*/ //CHECK#1 if(Boolean.prototype.constructor !== Boolean){ $ERROR('#1: Boolean.prototype.constructor === Boolean'); } - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T1.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T1.js index f21a1c484a..e81cacc799 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T1.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If this boolean value is true, then the string "true" - * is returned, otherwise, this boolean value must be false, and the string - * "false" is returned - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A1_T1.js - * @description no arguments - */ +/*--- +info: > + toString: If this boolean value is true, then the string "true" + is returned, otherwise, this boolean value must be false, and the string + "false" is returned +es5id: 15.6.4.2_A1_T1 +description: no arguments +---*/ //CHECK#1 if(Boolean.prototype.toString() !== "false"){ @@ -44,4 +44,3 @@ if((new Boolean(0)).toString() !== "false"){ if((new Boolean(new Object())).toString() !== "true"){ $ERROR('#7: (new Boolean(new Object())).toString() === "true"'); } - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T2.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T2.js index 8f172dfc55..310256bf6f 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T2.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A1_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If this boolean value is true, then the string "true" - * is returned, otherwise, this boolean value must be false, and the string - * "false" is returned - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A1_T2.js - * @description with some argument - */ +/*--- +info: > + toString: If this boolean value is true, then the string "true" + is returned, otherwise, this boolean value must be false, and the string + "false" is returned +es5id: 15.6.4.2_A1_T2 +description: with some argument +---*/ //CHECK#1 if(Boolean.prototype.toString(true) !== "false"){ @@ -44,4 +44,3 @@ if((new Boolean(0)).toString(true) !== "false"){ if((new Boolean(new Object())).toString(false) !== "true"){ $ERROR('#7: (new Boolean(new Object())).toString(false) === "true"'); } - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T1.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T1.js index 120544dac9..5339f1e23c 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T1.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A2_T1.js - * @description transferring to the String objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.2_A2_T1 +description: transferring to the String objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T2.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T2.js index c19ed8b054..3360519634 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T2.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A2_T2.js - * @description transferring to the Number objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.2_A2_T2 +description: transferring to the Number objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T3.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T3.js index ea99aa276a..467b424540 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T3.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A2_T3.js - * @description transferring to the Date objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.2_A2_T3 +description: transferring to the Date objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T4.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T4.js index f79b981eaf..d14d8cb970 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T4.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A2_T4.js - * @description transferring to the Object objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.2_A2_T4 +description: transferring to the Object objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T5.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T5.js index 877b5847b0..fbbe1c5c81 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T5.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.2_A2_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.2_A2_T5.js - * @description transferring to the other objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.2_A2_T5 +description: transferring to the other objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T1.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T1.js index 64d80c1692..27e0a89360 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T1.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean.prototype.valueOf() returns this boolean value - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A1_T1.js - * @description no arguments - */ +/*--- +info: Boolean.prototype.valueOf() returns this boolean value +es5id: 15.6.4.3_A1_T1 +description: no arguments +---*/ //CHECK#1 if(Boolean.prototype.valueOf() !== false){ @@ -37,5 +36,3 @@ if((new Boolean(1)).valueOf() !== true){ if((new Boolean(new Object())).valueOf() !== true){ $ERROR('#6: (new Boolean(new Object())).valueOf() === true'); } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T2.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T2.js index 1277467b8e..9300d4e856 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T2.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A1_T2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Boolean.prototype.valueOf() returns this boolean value - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A1_T2.js - * @description calling with argument - */ +/*--- +info: Boolean.prototype.valueOf() returns this boolean value +es5id: 15.6.4.3_A1_T2 +description: calling with argument +---*/ //CHECK#1 if(Boolean.prototype.valueOf(true) !== false){ @@ -37,5 +36,3 @@ if((new Boolean(1)).valueOf(false) !== true){ if((new Boolean(new Object())).valueOf(false) !== true){ $ERROR('#6: (new Boolean(new Object())).valueOf(false) === true'); } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T1.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T1.js index 962b420bb6..268cea7bd4 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T1.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A2_T1.js - * @description transferring to the String objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.3_A2_T1 +description: transferring to the String objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T2.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T2.js index 34b1025994..82be6690c4 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T2.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A2_T2.js - * @description transferring to the Number objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.3_A2_T2 +description: transferring to the Number objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T3.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T3.js index 44579bdcc4..35f3114416 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T3.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A2_T3.js - * @description transferring to the Date objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.3_A2_T3 +description: transferring to the Date objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T4.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T4.js index 535287f93c..56747d254e 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T4.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A2_T4.js - * @description transferring to the Object objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.3_A2_T4 +description: transferring to the Object objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T5.js b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T5.js index ef3c07c39d..ae06941ed4 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T5.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4.3_A2_T5.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Boolean object - * - * @path ch15/15.6/15.6.4/S15.6.4.3_A2_T5.js - * @description transferring to the other objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Boolean object +es5id: 15.6.4.3_A2_T5 +description: transferring to the other objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4_A1.js b/test/suite/ch15/15.6/15.6.4/S15.6.4_A1.js index eb030d8769..dcec08f4e0 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4_A1.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Boolean prototype object is itself a Boolean object - * (its [[Class]] is "Boolean") whose value is false - * - * @path ch15/15.6/15.6.4/S15.6.4_A1.js - * @description Checking type and value of Boolean.prototype - */ +/*--- +info: > + The Boolean prototype object is itself a Boolean object + (its [[Class]] is "Boolean") whose value is false +es5id: 15.6.4_A1 +description: Checking type and value of Boolean.prototype +---*/ //CHECK#1 if (typeof Boolean.prototype !== "object") { @@ -24,4 +24,3 @@ delete Boolean.prototype.toString; if (Boolean.prototype.toString() !== "[object Boolean]") { $ERROR('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"'); } - diff --git a/test/suite/ch15/15.6/15.6.4/S15.6.4_A2.js b/test/suite/ch15/15.6/15.6.4/S15.6.4_A2.js index d7c8c429f3..a23169297c 100644 --- a/test/suite/ch15/15.6/15.6.4/S15.6.4_A2.js +++ b/test/suite/ch15/15.6/15.6.4/S15.6.4_A2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Boolean - * prototype object is the Object prototype object - * - * @path ch15/15.6/15.6.4/S15.6.4_A2.js - * @description Checking Object.prototype.isPrototypeOf(Boolean.prototype) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Boolean + prototype object is the Object prototype object +es5id: 15.6.4_A2 +description: Checking Object.prototype.isPrototypeOf(Boolean.prototype) +---*/ //CHECK#1 if (!Object.prototype.isPrototypeOf(Boolean.prototype)) { $ERROR('#1: Object prototype object is the prototype of Boolean prototype object'); } - diff --git a/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A1.js b/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A1.js index 01658e53f2..8942fb3fb2 100644 --- a/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A1.js +++ b/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number([value]) returns a number value (not a Number object) computed by ToNumber(value) if value was supplied - * - * @path ch15/15.7/15.7.1/S15.7.1.1_A1.js - * @description Used values "10", 10, new String("10"), new Object(10) and "abc" - */ +/*--- +info: > + Number([value]) returns a number value (not a Number object) computed by + ToNumber(value) if value was supplied +es5id: 15.7.1.1_A1 +description: Used values "10", 10, new String("10"), new Object(10) and "abc" +---*/ //CHECK#1 if( typeof Number("10") !== "number" ) { @@ -37,4 +38,3 @@ if( typeof Number("abc") !== "number" ) { if( !isNaN(Number("abc"))) { $ERROR('#6: Number("abc")) should be NaN'); } - diff --git a/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A2.js b/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A2.js index 2c0f3e05ed..f38fa26dd1 100644 --- a/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A2.js +++ b/test/suite/ch15/15.7/15.7.1/S15.7.1.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number() returns +0 - * - * @path ch15/15.7/15.7.1/S15.7.1.1_A2.js - * @description Call Number() and check result - */ +/*--- +info: Number() returns +0 +es5id: 15.7.1.1_A2 +description: Call Number() and check result +---*/ //CHECK#1 if( typeof Number() !== "number" ) { @@ -19,5 +18,3 @@ if( Number() !== 0 ) { } else if( 1/Number() !== Number.POSITIVE_INFINITY ) { $ERROR('#2: Number() === +0, actual is '+Number()); } - - diff --git a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A1.js b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A1.js index fef5538a31..14c5095b92 100644 --- a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A1.js +++ b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Number is called as part of a new expression it is - * a constructor: it initialises the newly created object - * - * @path ch15/15.7/15.7.2/S15.7.2.1_A1.js - * @description Checking type of the newly created object and it value - */ +/*--- +info: > + When Number is called as part of a new expression it is + a constructor: it initialises the newly created object +es5id: 15.7.2.1_A1 +description: Checking type of the newly created object and it value +---*/ //CHECK#1 if (typeof new Number() !== "object") { @@ -52,4 +52,3 @@ var x8 = new Number(10); if(x8 === undefined){ $ERROR("#8: new Number(10) should not be undefined"); } - diff --git a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A2.js b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A2.js index e5c73a3b84..c65758fc3d 100644 --- a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A2.js +++ b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Number prototype object, the one that is the - * initial value of Number.prototype - * - * @path ch15/15.7/15.7.2/S15.7.2.1_A2.js - * @description Checking prototype property of the newly created objects - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Number prototype object, the one that is the + initial value of Number.prototype +es5id: 15.7.2.1_A2 +description: Checking prototype property of the newly created objects +---*/ // CHECK#1 var x1 = new Number(1); @@ -27,4 +27,3 @@ var x3 = new Number(3); if (Number.prototype !== x3.constructor.prototype) { $ERROR('#3: Number.prototype === x3.constructor.prototype'); } - diff --git a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A3.js b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A3.js index 685e88cb54..a274e97c49 100644 --- a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A3.js +++ b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A3.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set to ToNumber(value) if value was supplied, else to +0 - * - * @path ch15/15.7/15.7.2/S15.7.2.1_A3.js - * @description Checking value of the newly created object - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set to ToNumber(value) if value was supplied, else to +0 +es5id: 15.7.2.1_A3 +description: Checking value of the newly created object +---*/ //CHECK#1 var x1 = new Number(1); @@ -22,4 +22,3 @@ if (x2.valueOf() !== 0) { } else if( 1/x2.valueOf() !== Number.POSITIVE_INFINITY ) { $ERROR('#2.2: var x2 = new Number(); x2.valueOf() === +0'); } - diff --git a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A4.js b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A4.js index f060047b1c..e9823e0bc0 100644 --- a/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A4.js +++ b/test/suite/ch15/15.7/15.7.2/S15.7.2.1_A4.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Number" - * - * @path ch15/15.7/15.7.2/S15.7.2.1_A4.js - * @description For testing toString function is used - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Number" +es5id: 15.7.2.1_A4 +description: For testing toString function is used +---*/ delete Number.prototype.toString; @@ -17,4 +17,3 @@ var obj = new Number(); if (obj.toString() !== "[object Number]") { $ERROR('#1: The [[Class]] property of the newly constructed object is set to "Number"'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3-1.js b/test/suite/ch15/15.7/15.7.3/15.7.3-1.js index 0b53c4524d..f6b499d3f3 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3-1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.7/15.7.3/15.7.3-1.js - * @description Number constructor - [[Prototype]] is the Function prototype object - */ - - -function testcase() { - if (Function.prototype.isPrototypeOf(Number) === true) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.7.3-1 +description: Number constructor - [[Prototype]] is the Function prototype object +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Function.prototype.isPrototypeOf(Number) === true) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3-2.js b/test/suite/ch15/15.7/15.7.3/15.7.3-2.js index e1e158975d..a4347d415f 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3-2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3-2.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.7/15.7.3/15.7.3-2.js - * @description Number constructor - [[Prototype]] is the Function prototype object (using getPrototypeOf) - */ - - -function testcase() { - var p = Object.getPrototypeOf(Number); - if (p === Function.prototype) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.7.3-2 +description: > + Number constructor - [[Prototype]] is the Function prototype + object (using getPrototypeOf) +includes: [runTestCase.js] +---*/ + +function testcase() { + var p = Object.getPrototypeOf(Number); + if (p === Function.prototype) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js index b0d8d89342..4ab7bf7d7a 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js - * @description Number.prototype is a data property with default attribute values (false) - */ - - -function testcase() { - var d = Object.getOwnPropertyDescriptor(Number, 'prototype'); - - if (d.writable === false && - d.enumerable === false && - d.configurable === false) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.7.3.1-1 +description: > + Number.prototype is a data property with default attribute values + (false) +includes: [runTestCase.js] +---*/ + +function testcase() { + var d = Object.getOwnPropertyDescriptor(Number, 'prototype'); + + if (d.writable === false && + d.enumerable === false && + d.configurable === false) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js index 16a01753ac..e05e75a1d8 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js @@ -1,16 +1,17 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js - * @description Number.prototype, initial value is the Number prototype object - */ - - -function testcase() { - // assume that Number.prototype has not been modified. - return Object.getPrototypeOf(new Number(42))===Number.prototype; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.7.3.1-2 +description: Number.prototype, initial value is the Number prototype object +includes: [runTestCase.js] +---*/ + +function testcase() { + // assume that Number.prototype has not been modified. + return Object.getPrototypeOf(new Number(42))===Number.prototype; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T1.js index a33041998f..c540802e11 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes - * - * @path ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T1.js - * @description Checking if varying the Number.prototype property fails - */ +/*--- +info: > + The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } + attributes +es5id: 15.7.3.1_A1_T1 +description: Checking if varying the Number.prototype property fails +---*/ //CHECK#1 var x = Number.prototype; @@ -14,4 +15,3 @@ Number.prototype = 1; if (Number.prototype !== x) { $ERROR('#1: The Number.prototype property has the attributes ReadOnly'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T2.js index 2916cbe49d..973cc0046d 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T2.js @@ -1,13 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes - * - * @path ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T2.js - * @description Checking if deleting the Number.prototype property fails - * @noStrict - */ +/*--- +info: > + The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } + attributes +es5id: 15.7.3.1_A1_T2 +description: Checking if deleting the Number.prototype property fails +flags: [noStrict] +includes: [$FAIL.js] +---*/ // CHECK#1 if (delete Number.prototype !== false) { @@ -17,4 +19,3 @@ if (delete Number.prototype !== false) { if (!Number.hasOwnProperty('prototype')) { $FAIL('#2: The Number.prototype property has the attributes DontDelete'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T3.js index 3246804d7f..26659bf4fa 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes - * - * @path ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A1_T3.js - * @description Checking if enumerating the Number.prototype property fails - */ +/*--- +info: > + The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } + attributes +es5id: 15.7.3.1_A1_T3 +description: Checking if enumerating the Number.prototype property fails +---*/ if (Number.propertyIsEnumerable('prototype')) { $ERROR('#1: The Number.prototype property has the attribute DontEnum'); @@ -17,4 +18,3 @@ for(x in Number) { $ERROR('#2: The Number.prototype has the attribute DontEnum'); } } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T1.js index a2acd10760..a953798339 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.prototype is itself Number object - * - * @path ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T1.js - * @description Checking type of Number.prototype property - test based on - * deleting Number.prototype.toString - */ +/*--- +info: Number.prototype is itself Number object +es5id: 15.7.3.1_A2_T1 +description: > + Checking type of Number.prototype property - test based on + deleting Number.prototype.toString +---*/ //CHECK#1 if (typeof Number.prototype !== "object") { @@ -19,4 +19,3 @@ delete Number.prototype.toString; if (Number.prototype.toString() !== "[object Number]") { $ERROR('#3: The [[Class]] property of the Number prototype object is set to "Number"'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T2.js index 89477243f2..c69df9a8b2 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T2.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.prototype is itself Number object - * - * @path ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A2_T2.js - * @description Checking type of Number.prototype property - test based on - * overwriting of Number.prototype.toString - */ +/*--- +info: Number.prototype is itself Number object +es5id: 15.7.3.1_A2_T2 +description: > + Checking type of Number.prototype property - test based on + overwriting of Number.prototype.toString +---*/ //CHECK#1 if (typeof Number.prototype !== "object") { @@ -19,4 +19,3 @@ Number.prototype.toString = Object.prototype.toString; if (Number.prototype.toString() !== "[object Number]") { $ERROR('#3: The [[Class]] property of the Number prototype object is set to "Number"'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A3.js index 8e9d040663..5f86ce5fa5 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.prototype value is +0 - * - * @path ch15/15.7/15.7.3/15.7.3.1/S15.7.3.1_A3.js - * @description Checking value of Number.prototype property - */ +/*--- +info: Number.prototype value is +0 +es5id: 15.7.3.1_A3 +description: Checking value of Number.prototype property +---*/ //CHECK#1 if (Number.prototype != 0) { @@ -14,4 +13,3 @@ if (Number.prototype != 0) { } else if( 1/Number.prototype != Number.POSITIVE_INFINITY){ $ERROR('#2: Number.prototype == +0'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A1.js index fe2dbedda1..41437b85fb 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MAX_VALUE is approximately 1.7976931348623157e308 - * - * @path ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A1.js - * @description Checking Number.MAX_VALUE value - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Number.MAX_VALUE is approximately 1.7976931348623157e308 +es5id: 15.7.3.2_A1 +description: Checking Number.MAX_VALUE value +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Number.MAX_VALUE, 1.7976931348623157e308)) { $ERROR('#1: Number.MAX_VALUE approximately equal to 1.7976931348623157e308'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A2.js index fff38d959e..a611eeee78 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MAX_VALUE is ReadOnly - * - * @path ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A2.js - * @description Checking if varying Number.MAX_VALUE fails - */ +/*--- +info: Number.MAX_VALUE is ReadOnly +es5id: 15.7.3.2_A2 +description: Checking if varying Number.MAX_VALUE fails +---*/ // CHECK#1 var x = Number.MAX_VALUE; @@ -14,4 +13,3 @@ Number.MAX_VALUE = 1; if (Number.MAX_VALUE !== x) { $ERROR('#1: x = Number.MAX_VALUE; Number.MAX_VALUE = 1; Number.MAX_VALUE === x'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A3.js index 8e67d80726..60e661fc2c 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MAX_VALUE is DontDelete - * - * @path ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A3.js - * @description Checking if deleting Number.MAX_VALUE fails - * @noStrict - */ +/*--- +info: Number.MAX_VALUE is DontDelete +es5id: 15.7.3.2_A3 +description: Checking if deleting Number.MAX_VALUE fails +flags: [noStrict] +---*/ // CHECK#1 if (delete Number.MAX_VALUE !== false) { $ERROR('#1: delete Number.MAX_VALUE === false'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A4.js b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A4.js index e821e473b6..8378470ec7 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A4.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MAX_VALUE has the attribute DontEnum - * - * @path ch15/15.7/15.7.3/15.7.3.2/S15.7.3.2_A4.js - * @description Checking if enumerating Number.MAX_VALUE fails - */ +/*--- +info: Number.MAX_VALUE has the attribute DontEnum +es5id: 15.7.3.2_A4 +description: Checking if enumerating Number.MAX_VALUE fails +---*/ //CHECK#1 for(var x in Number) { @@ -18,4 +17,3 @@ for(var x in Number) { if (Number.propertyIsEnumerable('MAX_VALUE')) { $ERROR('#2: Number.MAX_VALUE has the attribute DontEnum'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A1.js index 055986060a..d70230fa3e 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MIN_VALUE is approximately 5e-324 - * - * @path ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A1.js - * @description Checking Number.MIN_VALUE value - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Number.MIN_VALUE is approximately 5e-324 +es5id: 15.7.3.3_A1 +description: Checking Number.MIN_VALUE value +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Number.MIN_VALUE, 5e-324)) { $ERROR('#1: Number.MIN_VALUE approximately equal to 5e-324'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A2.js index 52bb7abf5e..e1decce574 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MIN_VALUE is ReadOnly - * - * @path ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A2.js - * @description Checking if varying Number.MIN_VALUE fails - */ +/*--- +info: Number.MIN_VALUE is ReadOnly +es5id: 15.7.3.3_A2 +description: Checking if varying Number.MIN_VALUE fails +---*/ // CHECK#1 var x = Number.MIN_VALUE; @@ -14,4 +13,3 @@ Number.MIN_VALUE = 1; if (Number.MIN_VALUE !== x) { $ERROR('#1: x = Number.MIN_VALUE; Number.MIN_VALUE = 1; Number.MIN_VALUE === x'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A3.js index 71ab7260f8..9faa7b0267 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MIN_VALUE is DontDelete - * - * @path ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A3.js - * @description Checking if deleting Number.MIN_VALUE fails - * @noStrict - */ +/*--- +info: Number.MIN_VALUE is DontDelete +es5id: 15.7.3.3_A3 +description: Checking if deleting Number.MIN_VALUE fails +flags: [noStrict] +---*/ //CHECK#1 if (delete Number.MIN_VALUE !== false) { $ERROR('#1: delete Number.MIN_VALUE === false'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A4.js b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A4.js index 9efd91a3a7..0435aa0df8 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A4.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.MIN_VALUE has the attribute DontEnum - * - * @path ch15/15.7/15.7.3/15.7.3.3/S15.7.3.3_A4.js - * @description Checking if enumerating Number.MIN_VALUE fails - */ +/*--- +info: Number.MIN_VALUE has the attribute DontEnum +es5id: 15.7.3.3_A4 +description: Checking if enumerating Number.MIN_VALUE fails +---*/ //CHECK#1 for(var x in Number) { @@ -18,4 +17,3 @@ for(var x in Number) { if (Number.propertyIsEnumerable('MIN_VALUE')) { $ERROR('#2: Number.MIN_VALUE has the attribute DontEnum'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A1.js index 57e011335f..b717a8d1b8 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A1.js @@ -1,15 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NaN is Not-a-Number - * - * @path ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A1.js - * @description Checking isNaN(Number.NaN) - */ +/*--- +info: Number.NaN is Not-a-Number +es5id: 15.7.3.4_A1 +description: Checking isNaN(Number.NaN) +---*/ // CHECK#1 if (isNaN(Number.NaN) !== true) { $ERROR('#1: Number.NaN === Not-a-Number'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A2.js index f682f4822d..b6ff1ca7aa 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A2.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NaN is ReadOnly - * - * @path ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A2.js - * @description Checking if varying Number.NaN fails - */ +/*--- +info: Number.NaN is ReadOnly +es5id: 15.7.3.4_A2 +description: Checking if varying Number.NaN fails +---*/ // CHECK#1 Number.NaN = 1; if (isNaN(Number.NaN) !== true) { $ERROR('#1: Number.NaN = 1; Number.NaN === Not-a-Number'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A3.js index 4a6e03dcf8..cfa2233237 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NaN is DontDelete - * - * @path ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A3.js - * @description Checking if deleting Number.NaN fails - * @noStrict - */ +/*--- +info: Number.NaN is DontDelete +es5id: 15.7.3.4_A3 +description: Checking if deleting Number.NaN fails +flags: [noStrict] +---*/ // CHECK#1 if (delete Number.NaN !== false) { $ERROR('#1: delete Number.NaN === false'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A4.js b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A4.js index 06af8d28a5..198b638796 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A4.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NaN has the attribute DontEnum - * - * @path ch15/15.7/15.7.3/15.7.3.4/S15.7.3.4_A4.js - * @description Checking if enumerating Number.NaN fails - */ +/*--- +info: Number.NaN has the attribute DontEnum +es5id: 15.7.3.4_A4 +description: Checking if enumerating Number.NaN fails +---*/ //CHECK#1 for(var x in Number) { @@ -18,4 +17,3 @@ for(var x in Number) { if (Number.propertyIsEnumerable('NaN')) { $ERROR('#2: Number.NaN has the attribute DontEnum'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A1.js index 145e447b97..5045fde659 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NEGATIVE_INFINITY is -Infinity - * - * @path ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A1.js - * @description Checking sign and finiteness of Number.NEGATIVE_INFINITY - */ +/*--- +info: Number.NEGATIVE_INFINITY is -Infinity +es5id: 15.7.3.5_A1 +description: Checking sign and finiteness of Number.NEGATIVE_INFINITY +---*/ // CHECK#1 if (isFinite(Number.NEGATIVE_INFINITY) !== false) { @@ -16,4 +15,3 @@ if (isFinite(Number.NEGATIVE_INFINITY) !== false) { $ERROR('#1: Number.NEGATIVE_INFINITY === -Infinity'); } } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A2.js index 78a8102e2b..45af62e0c3 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NEGATIVE_INFINITY is ReadOnly - * - * @path ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A2.js - * @description Checking if varying Number.NEGATIVE_INFINITY fails - */ +/*--- +info: Number.NEGATIVE_INFINITY is ReadOnly +es5id: 15.7.3.5_A2 +description: Checking if varying Number.NEGATIVE_INFINITY fails +---*/ // CHECK#1 Number.NEGATIVE_INFINITY = 1; @@ -17,4 +16,3 @@ if (isFinite(Number.NEGATIVE_INFINITY)) { $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity'); } } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A3.js index 7b1c693531..2b19951747 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NEGATIVE_INFINITY is DontDelete - * - * @path ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A3.js - * @description Checking if deleting Number.NEGATIVE_INFINITY fails - * @noStrict - */ +/*--- +info: Number.NEGATIVE_INFINITY is DontDelete +es5id: 15.7.3.5_A3 +description: Checking if deleting Number.NEGATIVE_INFINITY fails +flags: [noStrict] +---*/ // CHECK#1 if (delete Number.NEGATIVE_INFINITY !== false) { $ERROR('#1: delete Number.NEGATIVE_INFINITY === false'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A4.js b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A4.js index f2620409b1..af3f480e8f 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A4.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.NEGATIVE_INFINITY has the attribute DontEnum - * - * @path ch15/15.7/15.7.3/15.7.3.5/S15.7.3.5_A4.js - * @description Checking if enumerating Number.NEGATIVE_INFINITY fails - */ +/*--- +info: Number.NEGATIVE_INFINITY has the attribute DontEnum +es5id: 15.7.3.5_A4 +description: Checking if enumerating Number.NEGATIVE_INFINITY fails +---*/ //CHECK#1 for(var x in Number) { @@ -18,4 +17,3 @@ for(var x in Number) { if (Number.propertyIsEnumerable('NEGATIVE_INFINITY')) { $ERROR('#2: Number.NEGATIVE_INFINITY has the attribute DontEnum'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A1.js b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A1.js index 2e925aba2c..de2e0b40c5 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A1.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.POSITIVE_INFINITY is +Infinity - * - * @path ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A1.js - * @description Checking sign and finiteness of Number.POSITIVE_INFINITY - */ +/*--- +info: Number.POSITIVE_INFINITY is +Infinity +es5id: 15.7.3.6_A1 +description: Checking sign and finiteness of Number.POSITIVE_INFINITY +---*/ // CHECK#1 if (isFinite(Number.POSITIVE_INFINITY) !== false) { @@ -16,4 +15,3 @@ if (isFinite(Number.POSITIVE_INFINITY) !== false) { $ERROR('#1: Number.POSITIVE_INFINITY === +Infinity'); } } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A2.js b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A2.js index e027149787..067274c478 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A2.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.POSITIVE_INFINITY is ReadOnly - * - * @path ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A2.js - * @description Checking if varying Number.POSITIVE_INFINITY fails - */ +/*--- +info: Number.POSITIVE_INFINITY is ReadOnly +es5id: 15.7.3.6_A2 +description: Checking if varying Number.POSITIVE_INFINITY fails +---*/ // CHECK#1 Number.POSITIVE_INFINITY = 1; @@ -17,4 +16,3 @@ if (isFinite(Number.POSITIVE_INFINITY)) { $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity'); } } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A3.js b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A3.js index c2ac39b6de..ddebfce0a5 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A3.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A3.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.POSITIVE_INFINITY is DontDelete - * - * @path ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A3.js - * @description Checking if deleting Number.POSITIVE_INFINITY fails - * @noStrict - */ +/*--- +info: Number.POSITIVE_INFINITY is DontDelete +es5id: 15.7.3.6_A3 +description: Checking if deleting Number.POSITIVE_INFINITY fails +flags: [noStrict] +---*/ // CHECK#1 if (delete Number.POSITIVE_INFINITY !== false) { $ERROR('#1: delete Number.POSITIVE_INFINITY === false'); } - diff --git a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A4.js b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A4.js index 9698a86eaa..13ae94171c 100644 --- a/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A4.js +++ b/test/suite/ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.POSITIVE_INFINITY has the attribute DontEnum - * - * @path ch15/15.7/15.7.3/15.7.3.6/S15.7.3.6_A4.js - * @description Checking if enumerating Number.POSITIVE_INFINITY fails - */ +/*--- +info: Number.POSITIVE_INFINITY has the attribute DontEnum +es5id: 15.7.3.6_A4 +description: Checking if enumerating Number.POSITIVE_INFINITY fails +---*/ //CHECK#1 for(var x in Number) { @@ -18,4 +17,3 @@ for(var x in Number) { if (Number.propertyIsEnumerable('POSITIVE_INFINITY')) { $ERROR('#2: Number.POSITIVE_INFINITY has the attribute DontEnum'); } - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A1.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A1.js index cb7687c492..9f7f11f08b 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A1.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number constructor has the property "prototype" - * - * @path ch15/15.7/15.7.3/S15.7.3_A1.js - * @description Checking existence of the property "prototype" - */ +/*--- +info: The Number constructor has the property "prototype" +es5id: 15.7.3_A1 +description: Checking existence of the property "prototype" +---*/ if(!Number.hasOwnProperty("prototype")){ $ERROR('#1: The Number constructor has the property "prototype"'); } - - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A2.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A2.js index 74e50c6e51..d01bc84191 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A2.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A2.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number constructor has the property "MAX_VALUE" - * - * @path ch15/15.7/15.7.3/S15.7.3_A2.js - * @description Checking existence of the property "MAX_VALUE" - */ +/*--- +info: The Number constructor has the property "MAX_VALUE" +es5id: 15.7.3_A2 +description: Checking existence of the property "MAX_VALUE" +---*/ if(!Number.hasOwnProperty("MAX_VALUE")){ $ERROR('#1: The Number constructor has the property "MAX_VALUE"'); } - - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A3.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A3.js index 70c456a3b5..dfe4f3e3f9 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A3.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A3.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number constructor has the property "MIN_VALUE" - * - * @path ch15/15.7/15.7.3/S15.7.3_A3.js - * @description Checking existence of the property "MIN_VALUE" - */ +/*--- +info: The Number constructor has the property "MIN_VALUE" +es5id: 15.7.3_A3 +description: Checking existence of the property "MIN_VALUE" +---*/ if(!Number.hasOwnProperty("MIN_VALUE")){ $ERROR('#1: The Number constructor has the property "MIN_VALUE"'); } - - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A4.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A4.js index ff12e13bf8..7c9dadce0c 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A4.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A4.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number constructor has the property "NaN" - * - * @path ch15/15.7/15.7.3/S15.7.3_A4.js - * @description Checking existence of the property "NaN" - */ +/*--- +info: The Number constructor has the property "NaN" +es5id: 15.7.3_A4 +description: Checking existence of the property "NaN" +---*/ if(!Number.hasOwnProperty("NaN")){ $ERROR('#1: The Number constructor has the property "NaN"'); } - - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A5.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A5.js index b5ed3997ae..c6b3261598 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A5.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A5.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number constructor has the property "NEGATIVE_INFINITY" - * - * @path ch15/15.7/15.7.3/S15.7.3_A5.js - * @description Checking existence of the property "NEGATIVE_INFINITY" - */ +/*--- +info: The Number constructor has the property "NEGATIVE_INFINITY" +es5id: 15.7.3_A5 +description: Checking existence of the property "NEGATIVE_INFINITY" +---*/ if(!Number.hasOwnProperty("NEGATIVE_INFINITY")){ $ERROR('#1: The Number constructor has the property "NEGATIVE_INFINITY"'); } - - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A6.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A6.js index fc9a3a7a6d..7afcbf2bb9 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A6.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A6.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number constructor has the property "POSITIVE_INFINITY" - * - * @path ch15/15.7/15.7.3/S15.7.3_A6.js - * @description Checking existence of the property "POSITIVE_INFINITY" - */ +/*--- +info: The Number constructor has the property "POSITIVE_INFINITY" +es5id: 15.7.3_A6 +description: Checking existence of the property "POSITIVE_INFINITY" +---*/ if(!Number.hasOwnProperty("POSITIVE_INFINITY")){ $ERROR('#1: The Number constructor has the property "POSITIVE_INFINITY"'); } - - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A7.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A7.js index c8573fecaf..fe499a8745 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A7.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A7.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Number - * constructor is the Function prototype object - * - * @path ch15/15.7/15.7.3/S15.7.3_A7.js - * @description Checking Function.prototype.isPrototypeOf(Number) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Number + constructor is the Function prototype object +es5id: 15.7.3_A7 +description: Checking Function.prototype.isPrototypeOf(Number) +---*/ //CHECK#1 if (!(Function.prototype.isPrototypeOf(Number))) { $ERROR('#1: the value of the internal [[Prototype]] property of the Number constructor is the Function prototype object.'); } - diff --git a/test/suite/ch15/15.7/15.7.3/S15.7.3_A8.js b/test/suite/ch15/15.7/15.7.3/S15.7.3_A8.js index 45f79ab618..7b79c2a4fa 100644 --- a/test/suite/ch15/15.7/15.7.3/S15.7.3_A8.js +++ b/test/suite/ch15/15.7/15.7.3/S15.7.3_A8.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number constructor has length property whose value is 1 - * - * @path ch15/15.7/15.7.3/S15.7.3_A8.js - * @description Checking Number.length property - */ +/*--- +info: Number constructor has length property whose value is 1 +es5id: 15.7.3_A8 +description: Checking Number.length property +---*/ //CHECK#1 if (!Number.hasOwnProperty("length")){ @@ -17,4 +16,3 @@ if (!Number.hasOwnProperty("length")){ if (Number.length !== 1) { $ERROR('#2: Number constructor length property value is 1'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4-1.js b/test/suite/ch15/15.7/15.7.4/15.7.4-1.js index ee47bc3c82..6adee31338 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4-1.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4-1.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.7/15.7.4/15.7.4-1.js - * @description Number prototype object: its [[Class]] must be 'Number' - */ - - -function testcase() { - var numProto = Object.getPrototypeOf(new Number(42)); - var s = Object.prototype.toString.call(numProto ); - return (s === '[object Number]') ; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.7.4-1 +description: "Number prototype object: its [[Class]] must be 'Number'" +includes: [runTestCase.js] +---*/ + +function testcase() { + var numProto = Object.getPrototypeOf(new Number(42)); + var s = Object.prototype.toString.call(numProto ); + return (s === '[object Number]') ; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.1/S15.7.4.1_A1.js b/test/suite/ch15/15.7/15.7.4/15.7.4.1/S15.7.4.1_A1.js index d93a6f25e4..f25fe4fcd2 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.1/S15.7.4.1_A1.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.1/S15.7.4.1_A1.js @@ -1,17 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The initial value of Number.prototype.constructor is the - * built-in Number constructor - * - * @path ch15/15.7/15.7.4/15.7.4.1/S15.7.4.1_A1.js - * @description Compare Number.prototype.constructor with Number - */ +/*--- +info: > + The initial value of Number.prototype.constructor is the + built-in Number constructor +es5id: 15.7.4.1_A1 +description: Compare Number.prototype.constructor with Number +---*/ //CHECK#1 if(Number.prototype.constructor !== Number){ $ERROR('#1: Number.prototype.constructor === Number'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T01.js index 9b7d35ba0b..7fcef1cb9d 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T01.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is the number 10 or undefined, then this - * number value is given as an argument to the ToString operator. - * the resulting string value is returned - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T01.js - * @description undefined radix - */ +/*--- +info: > + toString: If radix is the number 10 or undefined, then this + number value is given as an argument to the ToString operator. + the resulting string value is returned +es5id: 15.7.4.2_A1_T01 +description: undefined radix +---*/ //CHECK#1 if(Number.prototype.toString() !== "0"){ @@ -49,4 +49,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString() !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString() !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString() === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T02.js index f066634108..03aacb9a7b 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T02.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is the number 10 or undefined, then this - * number value is given as an argument to the ToString operator. - * the resulting string value is returned - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T02.js - * @description radix is 10 - */ +/*--- +info: > + toString: If radix is the number 10 or undefined, then this + number value is given as an argument to the ToString operator. + the resulting string value is returned +es5id: 15.7.4.2_A1_T02 +description: radix is 10 +---*/ //CHECK#1 if(Number.prototype.toString(10) !== "0"){ @@ -49,4 +49,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(10) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(10) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(10) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T03.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T03.js index 53a05b8f74..2b701765e4 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T03.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T03.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is the number 10 or undefined, then this - * number value is given as an argument to the ToString operator. - * the resulting string value is returned - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A1_T03.js - * @description radix is undefined value - */ +/*--- +info: > + toString: If radix is the number 10 or undefined, then this + number value is given as an argument to the ToString operator. + the resulting string value is returned +es5id: 15.7.4.2_A1_T03 +description: radix is undefined value +---*/ //CHECK#1 if(Number.prototype.toString(undefined) !== "0"){ @@ -49,4 +49,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(undefined) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(undefined) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(undefined) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T01.js index d4529f5ab2..bf2534bb61 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T01.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T01.js - * @description radix is 2 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T01 +description: radix is 2 +---*/ //CHECK#1 if(Number.prototype.toString(2) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(2) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(2) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(2) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T02.js index d2f762c939..a9b2ef733f 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T02.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T02.js - * @description radix is 3 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T02 +description: radix is 3 +---*/ //CHECK#1 if(Number.prototype.toString(3) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(3) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(3) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(3) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T03.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T03.js index d922d5155f..00761b262c 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T03.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T03.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T03.js - * @description radix is 4 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T03 +description: radix is 4 +---*/ //CHECK#1 if(Number.prototype.toString(4) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(4) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(4) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(4) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T04.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T04.js index 61bd6f4633..27f30f4eae 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T04.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T04.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T04.js - * @description radix is 5 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T04 +description: radix is 5 +---*/ //CHECK#1 if(Number.prototype.toString(5) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(5) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(5) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(5) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T05.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T05.js index 4155f4b91c..fd022b515b 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T05.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T05.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T05.js - * @description radix is 6 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T05 +description: radix is 6 +---*/ //CHECK#1 if(Number.prototype.toString(6) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(6) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(6) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(6) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T06.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T06.js index fcb3273d8c..4ddf517df3 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T06.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T06.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T06.js - * @description radix is 7 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T06 +description: radix is 7 +---*/ //CHECK#1 if(Number.prototype.toString(7) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(7) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(7) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(7) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T07.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T07.js index 6e518975c2..ff85a71490 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T07.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T07.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T07.js - * @description radix is 8 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T07 +description: radix is 8 +---*/ //CHECK#1 if(Number.prototype.toString(8) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(8) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(8) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(8) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T08.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T08.js index 6298075114..6f673ab013 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T08.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T08.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T08.js - * @description radix is 9 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T08 +description: radix is 9 +---*/ //CHECK#1 if(Number.prototype.toString(9) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(9) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(9) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(9) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T09.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T09.js index 50c465bc66..f9e5852baa 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T09.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T09.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T09.js - * @description radix is 11 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T09 +description: radix is 11 +---*/ //CHECK#1 if(Number.prototype.toString(11) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(11) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(11) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(11) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T10.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T10.js index 7369f25df9..5d53c2bef2 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T10.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T10.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T10.js - * @description radix is 12 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T10 +description: radix is 12 +---*/ //CHECK#1 if(Number.prototype.toString(12) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(12) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(12) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(12) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T11.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T11.js index c1b8e8efe8..abd79ee344 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T11.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T11.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T11.js - * @description radix is 13 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T11 +description: radix is 13 +---*/ //CHECK#1 if(Number.prototype.toString(13) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(13) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(13) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(13) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T12.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T12.js index eca23c38e6..4b9dcd6301 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T12.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T12.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T12.js - * @description radix is 14 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T12 +description: radix is 14 +---*/ //CHECK#1 if(Number.prototype.toString(14) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(14) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(14) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(14) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T13.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T13.js index 0ab87ca81a..f134115029 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T13.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T13.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T13.js - * @description radix is 15 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T13 +description: radix is 15 +---*/ //CHECK#1 if(Number.prototype.toString(15) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(15) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(15) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(15) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T14.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T14.js index 77b074644e..f78fe04dd5 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T14.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T14.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T14.js - * @description radix is 16 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T14 +description: radix is 16 +---*/ //CHECK#1 if(Number.prototype.toString(16) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(16) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(16) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(16) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T15.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T15.js index a08d488ba4..bf5cfe27f3 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T15.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T15.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T15.js - * @description radix is 17 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T15 +description: radix is 17 +---*/ //CHECK#1 if(Number.prototype.toString(17) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(17) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(17) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(17) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T16.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T16.js index 5dc5069498..002e0cfeb4 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T16.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T16.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T16.js - * @description radix is 18 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T16 +description: radix is 18 +---*/ //CHECK#1 if(Number.prototype.toString(18) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(18) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(18) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(18) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T17.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T17.js index 526b0f6e38..90773b31e5 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T17.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T17.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T17.js - * @description radix is 19 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T17 +description: radix is 19 +---*/ //CHECK#1 if(Number.prototype.toString(19) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(19) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(19) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(19) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T18.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T18.js index 7a021ec386..e521f4e04e 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T18.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T18.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T18.js - * @description radix is 20 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T18 +description: radix is 20 +---*/ //CHECK#1 if(Number.prototype.toString(20) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(20) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(20) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(20) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T19.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T19.js index 7e28d6e303..85265d53b0 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T19.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T19.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T19.js - * @description radix is 21 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T19 +description: radix is 21 +---*/ //CHECK#1 if(Number.prototype.toString(21) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(21) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(21) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(21) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T20.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T20.js index 04585ea88b..038e832ce0 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T20.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T20.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T20.js - * @description radix is 22 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T20 +description: radix is 22 +---*/ //CHECK#1 if(Number.prototype.toString(22) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(22) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(22) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(22) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T21.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T21.js index 9dfe4528cf..e82878b19c 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T21.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T21.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T21.js - * @description radix is 23 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T21 +description: radix is 23 +---*/ //CHECK#1 if(Number.prototype.toString(23) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(23) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(23) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(23) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T22.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T22.js index a417593828..ead76b2fe2 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T22.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T22.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T22.js - * @description radix is 24 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T22 +description: radix is 24 +---*/ //CHECK#1 if(Number.prototype.toString(24) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(24) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(24) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(24) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T23.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T23.js index 456dbc1942..d8f277e50c 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T23.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T23.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T23.js - * @description radix is 25 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T23 +description: radix is 25 +---*/ //CHECK#1 if(Number.prototype.toString(25) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(25) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(25) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(25) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T24.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T24.js index 85605a1085..8bac6eff94 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T24.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T24.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T24.js - * @description radix is 26 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T24 +description: radix is 26 +---*/ //CHECK#1 if(Number.prototype.toString(26) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(26) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(26) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(26) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T25.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T25.js index 35c9f31ed7..3bdff1ea9c 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T25.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T25.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T25.js - * @description radix is 27 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T25 +description: radix is 27 +---*/ //CHECK#1 if(Number.prototype.toString(27) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(27) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(27) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(27) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T26.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T26.js index 819bbacd51..3f918a3460 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T26.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T26.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T26.js - * @description radix is 28 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T26 +description: radix is 28 +---*/ //CHECK#1 if(Number.prototype.toString(28) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(28) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(28) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(28) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T27.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T27.js index 3e1b1105eb..46181050a3 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T27.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T27.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T27.js - * @description radix is 29 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T27 +description: radix is 29 +---*/ //CHECK#1 if(Number.prototype.toString(29) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(29) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(29) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(29) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T28.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T28.js index 99e7d5d880..20cbfbf0a7 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T28.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T28.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T28.js - * @description radix is 30 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T28 +description: radix is 30 +---*/ //CHECK#1 if(Number.prototype.toString(30) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(30) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(30) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(30) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T29.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T29.js index 7b96fcb626..27ba3de869 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T29.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T29.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T29.js - * @description radix is 31 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T29 +description: radix is 31 +---*/ //CHECK#1 if(Number.prototype.toString(31) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(31) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(31) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(31) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T30.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T30.js index b6f8ea59fd..1cf762a35c 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T30.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T30.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T30.js - * @description radix is 32 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T30 +description: radix is 32 +---*/ //CHECK#1 if(Number.prototype.toString(32) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(32) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(32) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(32) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T31.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T31.js index f8bff8418a..d3b4a0f291 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T31.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T31.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T31.js - * @description radix is 33 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T31 +description: radix is 33 +---*/ //CHECK#1 if(Number.prototype.toString(33) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(33) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(33) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(33) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T32.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T32.js index ac8063e546..bab5115d3a 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T32.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T32.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T32.js - * @description radix is 34 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T32 +description: radix is 34 +---*/ //CHECK#1 if(Number.prototype.toString(34) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(34) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(34) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(34) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T33.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T33.js index 031b298608..7433850375 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T33.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T33.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T33.js - * @description radix is 35 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T33 +description: radix is 35 +---*/ //CHECK#1 if(Number.prototype.toString(35) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(35) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(35) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(35) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T34.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T34.js index 64e646432c..aa1cdebbe7 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T34.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T34.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: If radix is an integer from 2 to 36, but not 10, - * the result is a string, the choice of which is implementation-dependent - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A2_T34.js - * @description radix is 36 - */ +/*--- +info: > + toString: If radix is an integer from 2 to 36, but not 10, + the result is a string, the choice of which is implementation-dependent +es5id: 15.7.4.2_A2_T34 +description: radix is 36 +---*/ //CHECK#1 if(Number.prototype.toString(36) !== "0"){ @@ -48,4 +48,3 @@ if((new Number(Number.POSITIVE_INFINITY)).toString(36) !== "Infinity"){ if((new Number(Number.NEGATIVE_INFINITY)).toString(36) !== "-Infinity"){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(36) === "-Infinity"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T01.js index 80c38b0d58..bc2190c3e0 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T01.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: radix should be an integer between 2 and 36 - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T01.js - * @description radix is 1 - */ +/*--- +info: "toString: radix should be an integer between 2 and 36" +es5id: 15.7.4.2_A3_T01 +description: radix is 1 +---*/ //CHECK#1 try{ @@ -71,4 +70,3 @@ try{ } catch(e){ } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T02.js index 6063aa8d7c..e26c3aa290 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T02.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: radix should be an integer between 2 and 36 - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T02.js - * @description radix is 37 - */ +/*--- +info: "toString: radix should be an integer between 2 and 36" +es5id: 15.7.4.2_A3_T02 +description: radix is 37 +---*/ //CHECK#1 try{ @@ -71,4 +70,3 @@ try{ } catch(e){ } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T03.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T03.js index 176b5614a0..a612293269 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T03.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T03.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: radix should be an integer between 2 and 36 - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T03.js - * @description radix is null value - */ +/*--- +info: "toString: radix should be an integer between 2 and 36" +es5id: 15.7.4.2_A3_T03 +description: radix is null value +---*/ //CHECK#1 try{ @@ -71,4 +70,3 @@ try{ } catch(e){ } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T04.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T04.js index 2d3c4450bc..9437e809cd 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T04.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T04.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * toString: radix should be an integer between 2 and 36 - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A3_T04.js - * @description radix is 0 - */ +/*--- +info: "toString: radix should be an integer between 2 and 36" +es5id: 15.7.4.2_A3_T04 +description: radix is 0 +---*/ //CHECK#1 try{ @@ -71,4 +70,3 @@ try{ } catch(e){ } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T01.js index 6ec64e5df2..c8e66aaf42 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T01.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T01.js - * @description transferring to the String objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.2_A4_T01 +description: transferring to the String objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T02.js index 37e66f09d1..acc5076890 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T02.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T02.js - * @description transferring to the Boolean objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.2_A4_T02 +description: transferring to the Boolean objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T03.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T03.js index 078161d1c0..f9c56b00d7 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T03.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T03.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T03.js - * @description transferring to the Date objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.2_A4_T03 +description: transferring to the Date objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T04.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T04.js index 516bf803d8..a31f2cbb60 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T04.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T04.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T04.js - * @description transferring to the Object objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.2_A4_T04 +description: transferring to the Object objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T05.js b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T05.js index d6e5a5e9c3..38de6025ae 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T05.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T05.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The toString function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.2/S15.7.4.2_A4_T05.js - * @description transferring to the other objects - */ +/*--- +info: > + The toString function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.2_A4_T05 +description: transferring to the other objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T01.js index 70ff9881af..e6fc4d41de 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T01.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.prototype.valueOf() returns this number value - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T01.js - * @description Call without argument - */ +/*--- +info: Number.prototype.valueOf() returns this number value +es5id: 15.7.4.4_A1_T01 +description: Call without argument +---*/ //CHECK#1 if(Number.prototype.valueOf() !== 0){ @@ -47,4 +46,3 @@ if((new Number(Number.POSITIVE_INFINITY)).valueOf() !== Number.POSITIVE_INFINITY if((new Number(Number.NEGATIVE_INFINITY)).valueOf() !== Number.NEGATIVE_INFINITY){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).valueOf() === -Infinity'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T02.js index 65be18bbe6..ce82e1f0c9 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T02.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number.prototype.valueOf() returns this number value - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A1_T02.js - * @description calling with argument - */ +/*--- +info: Number.prototype.valueOf() returns this number value +es5id: 15.7.4.4_A1_T02 +description: calling with argument +---*/ //CHECK#1 if(Number.prototype.valueOf("argument") !== 0){ @@ -47,4 +46,3 @@ if((new Number(Number.POSITIVE_INFINITY)).valueOf("argument") !== Number.POSITIV if((new Number(Number.NEGATIVE_INFINITY)).valueOf("argument") !== Number.NEGATIVE_INFINITY){ $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).valueOf("argument") === -Infinity'); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T01.js index 1b3ab07f8e..d7aca6f507 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T01.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T01.js - * @description transferring to the String objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.4_A2_T01 +description: transferring to the String objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T02.js index e5e6e812dc..267e463187 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T02.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T02.js - * @description transferring to the Boolean objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.4_A2_T02 +description: transferring to the Boolean objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T03.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T03.js index 33647a1300..9cc2e0b4ef 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T03.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T03.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T03.js - * @description transferring to the Date objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.4_A2_T03 +description: transferring to the Date objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T04.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T04.js index ba2692b261..bf995e6a1b 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T04.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T04.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T04.js - * @description transferring to the Object objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.4_A2_T04 +description: transferring to the Object objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T05.js b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T05.js index aafc4e9dca..454816c671 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T05.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T05.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The valueOf function is not generic, it cannot be transferred - * to other kinds of objects for use as a method and there is should be - * a TypeError exception if its this value is not a Number object - * - * @path ch15/15.7/15.7.4/15.7.4.4/S15.7.4.4_A2_T05.js - * @description transferring to the other objects - */ +/*--- +info: > + The valueOf function is not generic, it cannot be transferred + to other kinds of objects for use as a method and there is should be + a TypeError exception if its this value is not a Number object +es5id: 15.7.4.4_A2_T05 +description: transferring to the other objects +---*/ //CHECK#1 try{ @@ -35,5 +35,3 @@ catch(e){ $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); } } - - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T01.js index 8459ab708b..628a88eaea 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T01.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Step 1: Let f be ToInteger(fractionDigits). (If fractionDigits - * is undefined, this step produces the value 0) - * - * @path ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T01.js - * @description calling on Number prototype object - */ +/*--- +info: > + Step 1: Let f be ToInteger(fractionDigits). (If fractionDigits + is undefined, this step produces the value 0) +es5id: 15.7.4.5_A1.1_T01 +description: calling on Number prototype object +---*/ //CHECK#1 if(Number.prototype.toFixed() !== "0"){ @@ -68,4 +68,3 @@ try{ catch(e){ $ERROR('#10: Number.prototype.toFixed(-0.1) should not throw '+e); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T02.js index 163f32746e..d28ae60246 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T02.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Step 1: Let f be ToInteger(fractionDigits). (If fractionDigits - * is undefined, this step produces the value 0) - * - * @path ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.1_T02.js - * @description calling on Number object - */ +/*--- +info: > + Step 1: Let f be ToInteger(fractionDigits). (If fractionDigits + is undefined, this step produces the value 0) +es5id: 15.7.4.5_A1.1_T02 +description: calling on Number object +---*/ //CHECK#1 if((new Number(1)).toFixed() !== "1"){ @@ -68,4 +68,3 @@ try{ catch(e){ $ERROR('#10: (new Number(1)).toFixed(-0.1) should not throw '+e); } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T01.js index 595e213af9..ab98bf30c9 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T01.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Step 4: If this number value is NaN, return the string "NaN" - * - * @path ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T01.js - * @description NaN is computed by new Number("string") - */ +/*--- +info: "Step 4: If this number value is NaN, return the string \"NaN\"" +es5id: 15.7.4.5_A1.3_T01 +description: NaN is computed by new Number("string") +---*/ //CHECK#1 if((new Number("a")).toFixed() !== "NaN"){ @@ -68,4 +67,3 @@ catch(e){ $ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e); } } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T02.js b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T02.js index 48a44dd49c..459fcd998d 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T02.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T02.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Step 4: If this number value is NaN, return the string "NaN" - * - * @path ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.3_T02.js - * @description direct usage of NaN - */ +/*--- +info: "Step 4: If this number value is NaN, return the string \"NaN\"" +es5id: 15.7.4.5_A1.3_T02 +description: direct usage of NaN +---*/ //CHECK#1 if(Number.NaN.toFixed() !== "NaN"){ @@ -68,4 +67,3 @@ catch(e){ $ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e); } } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.4_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.4_T01.js index b949ba46b7..e2318bff2a 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.4_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.4_T01.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Step 9: If x >= 10^21, let m = ToString(x) - * - * @path ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A1.4_T01.js - * @description x is 10^21 - */ +/*--- +info: "Step 9: If x >= 10^21, let m = ToString(x)" +es5id: 15.7.4.5_A1.4_T01 +description: x is 10^21 +---*/ //CHECK#1 if((new Number(1e21)).toFixed() !== String(1e21)){ @@ -68,4 +67,3 @@ catch(e){ $ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e); } } - diff --git a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A2_T01.js b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A2_T01.js index 5b42eddc70..280def3767 100644 --- a/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A2_T01.js +++ b/test/suite/ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A2_T01.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the toFixed method is 1 - * - * @path ch15/15.7/15.7.4/15.7.4.5/S15.7.4.5_A2_T01.js - * @description Checking Number prototype itself - */ +/*--- +info: The length property of the toFixed method is 1 +es5id: 15.7.4.5_A2_T01 +description: Checking Number prototype itself +---*/ //CHECK#1 if(Number.prototype.toFixed.hasOwnProperty("length") !== true){ @@ -17,4 +16,3 @@ if(Number.prototype.toFixed.hasOwnProperty("length") !== true){ if(Number.prototype.toFixed.length !== 1){ $ERROR('#2: The length property of the toFixed method is 1'); } - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A1.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A1.js index 0944bde056..6b69865b7a 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A1.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object is itself a Number object - * (its [[Class]] is "Number") whose value is +0 - * - * @path ch15/15.7/15.7.4/S15.7.4_A1.js - * @description Checking type and value of Number.prototype property - */ +/*--- +info: > + The Number prototype object is itself a Number object + (its [[Class]] is "Number") whose value is +0 +es5id: 15.7.4_A1 +description: Checking type and value of Number.prototype property +---*/ //CHECK#1 if (typeof Number.prototype !== "object") { @@ -26,4 +26,3 @@ delete Number.prototype.toString; if (Number.prototype.toString() !== "[object Number]") { $ERROR('#3: The [[Class]] property of the Number prototype object is set to "Number"'); } - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A2.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A2.js index 522f79aa12..f6259319cd 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A2.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A2.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Number - * prototype object is the Object prototype object - * - * @path ch15/15.7/15.7.4/S15.7.4_A2.js - * @description Checking Object.prototype.isPrototypeOf(Number.prototype) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Number + prototype object is the Object prototype object +es5id: 15.7.4_A2 +description: Checking Object.prototype.isPrototypeOf(Number.prototype) +---*/ //CHECK#1 if (!Object.prototype.isPrototypeOf(Number.prototype)) { $ERROR('#1: Object prototype object is the prototype of Number prototype object'); } - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.1.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.1.js index 67d9ba10df..102060a357 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.1.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.1.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property constructor - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.1.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property constructor +es5id: 15.7.4_A3.1 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("constructor") !== true){ $ERROR('#1: The Number prototype object has the property constructor'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.2.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.2.js index 9f4b3856ba..d233dc7e16 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.2.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.2.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property toString - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.2.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property toString +es5id: 15.7.4_A3.2 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("toString") !== true){ $ERROR('#1: The Number prototype object has the property toString'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.3.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.3.js index f34849d56f..ad9b3ec4f2 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.3.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.3.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property toLocaleString - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.3.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property toLocaleString +es5id: 15.7.4_A3.3 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("toLocaleString") !== true){ $ERROR('#1: The Number prototype object has the property toLocaleString'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.4.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.4.js index 7dcd08cb08..76bb43fca8 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.4.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.4.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property valueOf - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.4.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property valueOf +es5id: 15.7.4_A3.4 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("valueOf") !== true){ $ERROR('#1: The Number prototype object has the property valueOf'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.5.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.5.js index 0a889e11c5..7ff9bccfdd 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.5.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.5.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property toFixed - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.5.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property toFixed +es5id: 15.7.4_A3.5 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("toFixed") !== true){ $ERROR('#1: The Number prototype object has the property toFixed'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.6.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.6.js index 06e87826f0..71efe0c735 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.6.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.6.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property toExponential - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.6.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property toExponential +es5id: 15.7.4_A3.6 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("toExponential") !== true){ $ERROR('#1: The Number prototype object has the property toExponential'); } - - diff --git a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.7.js b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.7.js index 8bd611dbc0..fcd674d13a 100644 --- a/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.7.js +++ b/test/suite/ch15/15.7/15.7.4/S15.7.4_A3.7.js @@ -1,16 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Number prototype object has the property toPrecision - * - * @path ch15/15.7/15.7.4/S15.7.4_A3.7.js - * @description The test uses hasOwnProperty() method - */ +/*--- +info: The Number prototype object has the property toPrecision +es5id: 15.7.4_A3.7 +description: The test uses hasOwnProperty() method +---*/ //CHECK#1 if(Number.prototype.hasOwnProperty("toPrecision") !== true){ $ERROR('#1: The Number prototype object has the property toPrecision'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T01.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T01.js index 924bae0a16..e071014dbc 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T01.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T01.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T01.js - * @description Checking property constructor - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T01 +description: Checking property constructor +---*/ //CHECK#1 if((new Number()).hasOwnProperty("constructor") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("constructor") !== false){ if((new Number()).constructor !== Number.prototype.constructor){ $ERROR('#2: Number instance property "constructor" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T02.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T02.js index e024a18017..c8373e6f03 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T02.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T02.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T02.js - * @description Checking property toString - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T02 +description: Checking property toString +---*/ //CHECK#1 if((new Number()).hasOwnProperty("toString") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("toString") !== false){ if((new Number()).toString !== Number.prototype.toString){ $ERROR('#2: Number instance property "toString" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T03.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T03.js index ccf17d8837..8a6af7a251 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T03.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T03.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T03.js - * @description Checking property toLocaleString - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T03 +description: Checking property toLocaleString +---*/ //CHECK#1 if((new Number()).hasOwnProperty("toLocaleString") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("toLocaleString") !== false){ if((new Number()).toLocaleString !== Number.prototype.toLocaleString){ $ERROR('#2: Number instance property "toLocaleString" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T04.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T04.js index 88967d9925..cf28259259 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T04.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T04.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T04.js - * @description Checking property valueOf - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T04 +description: Checking property valueOf +---*/ //CHECK#1 if((new Number()).hasOwnProperty("valueOf") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("valueOf") !== false){ if((new Number()).valueOf !== Number.prototype.valueOf){ $ERROR('#2: Number instance property "valueOf" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T05.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T05.js index 7a32219d08..6a37ab3f7c 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T05.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T05.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T05.js - * @description Checking property toFixed - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T05 +description: Checking property toFixed +---*/ //CHECK#1 if((new Number()).hasOwnProperty("toFixed") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("toFixed") !== false){ if((new Number()).toFixed !== Number.prototype.toFixed){ $ERROR('#2: Number instance property "toFixed" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T06.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T06.js index 41bfbff61d..3a25fd54e5 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T06.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T06.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T06.js - * @description Checking property toExponential - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T06 +description: Checking property toExponential +---*/ //CHECK#1 if((new Number()).hasOwnProperty("toExponential") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("toExponential") !== false){ if((new Number()).toExponential !== Number.prototype.toExponential){ $ERROR('#2: Number instance property "toExponential" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T07.js b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T07.js index 22700c5c05..6c7d36d365 100644 --- a/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T07.js +++ b/test/suite/ch15/15.7/15.7.5/S15.7.5_A1_T07.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Number instances have no special properties beyond those - * inherited from the Number prototype object - * - * @path ch15/15.7/15.7.5/S15.7.5_A1_T07.js - * @description Checking property toPrecision - */ +/*--- +info: > + Number instances have no special properties beyond those + inherited from the Number prototype object +es5id: 15.7.5_A1_T07 +description: Checking property toPrecision +---*/ //CHECK#1 if((new Number()).hasOwnProperty("toPrecision") !== false){ @@ -18,5 +18,3 @@ if((new Number()).hasOwnProperty("toPrecision") !== false){ if((new Number()).toPrecision !== Number.prototype.toPrecision){ $ERROR('#2: Number instance property "toPrecision" must be inherited from Number prototype object'); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A1.js index a117d9f59b..319e78a130 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.E is approximately 2.7182818284590452354 - * - * @path ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A1.js - * @description Comparing Math.E with 2.7182818284590452354 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.E is approximately 2.7182818284590452354 +es5id: 15.8.1.1_A1 +description: Comparing Math.E with 2.7182818284590452354 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.E, 2.7182818284590452354)) { $ERROR('#1: \'Math.E is not approximately equal to 2.7182818284590452354\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A2.js index 3a2364793c..51f2010d9a 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property E of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A2.js - * @description Checking if Math.E property has the attribute DontEnum - */ +/*--- +info: Value Property E of the Math Object has the attribute DontEnum +es5id: 15.8.1.1_A2 +description: Checking if Math.E property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="E"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A3.js index e83fd28090..1c588bee4e 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property E of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A3.js - * @description Checking if Math.E property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property E of the Math Object has the attribute DontDelete +es5id: 15.8.1.1_A3 +description: Checking if Math.E property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.E === true) { $ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontDelete: \'Math.E === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A4.js index 0db827bd1b..aa6c97a337 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property E of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.1/S15.8.1.1_A4.js - * @description Checking if Math.E property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property E of the Math Object has the attribute ReadOnly +es5id: 15.8.1.1_A4 +description: Checking if Math.E property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.E; @@ -15,4 +14,3 @@ Math.E = 1; if (Math.E !== x) { $ERROR('#1: Math.E hasn\'t ReadOnly: \'x = Math.E;Math.E = 1;Math.E === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A1.js index 95dd0039f8..a9cafbb304 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.LN10 is approximately 2.302585092994046 - * - * @path ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A1.js - * @description Comparing Math.LN10 with 2.302585092994046 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.LN10 is approximately 2.302585092994046 +es5id: 15.8.1.2_A1 +description: Comparing Math.LN10 with 2.302585092994046 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.LN10, 2.302585092994046)) { $ERROR('#1: \'Math.LN10 is not approximately equal to 2.302585092994046\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A2.js index 78a5571f99..e422fde7b9 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LN10 of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A2.js - * @description Checking if Math.LN10 property has the attribute DontEnum - */ +/*--- +info: Value Property LN10 of the Math Object has the attribute DontEnum +es5id: 15.8.1.2_A2 +description: Checking if Math.LN10 property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN10"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A3.js index 72b2af50a3..1d39f32052 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LN10 of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A3.js - * @description Checking if Math.LN10 property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property LN10 of the Math Object has the attribute DontDelete +es5id: 15.8.1.2_A3 +description: Checking if Math.LN10 property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.LN10 === true) { $ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontDelete: \'Math.LN10 === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A4.js index c3b35c1e9a..1c5c360335 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LN10 of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.2/S15.8.1.2_A4.js - * @description Checking if Math.LN10 property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property LN10 of the Math Object has the attribute ReadOnly +es5id: 15.8.1.2_A4 +description: Checking if Math.LN10 property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.LN10; @@ -15,4 +14,3 @@ Math.LN10 = 1; if (Math.LN10 !== x) { $ERROR('#1: Math.LN10 hasn\'t ReadOnly: \'x = Math.LN10;Math.LN10 = 1;Math.LN10 === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A1.js index abbe41435f..2f491085ef 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.LN2 is approximately 0.6931471805599453 - * - * @path ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A1.js - * @description Comparing Math.LN2 with 0.6931471805599453 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.LN2 is approximately 0.6931471805599453 +es5id: 15.8.1.3_A1 +description: Comparing Math.LN2 with 0.6931471805599453 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.LN2, 0.6931471805599453)) { $ERROR('#1: \'Math.LN2 is not approximately equal to 0.6931471805599453\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A2.js index 79fd3aa3ab..87e45260fa 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LN2 of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A2.js - * @description Checking if Math.LN2 property has the attribute DontEnum - */ +/*--- +info: Value Property LN2 of the Math Object has the attribute DontEnum +es5id: 15.8.1.3_A2 +description: Checking if Math.LN2 property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LN2"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A3.js index 8f603a38aa..aafb1cb482 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LN2 of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A3.js - * @description Checking if Math.LN2 property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property LN2 of the Math Object has the attribute DontDelete +es5id: 15.8.1.3_A3 +description: Checking if Math.LN2 property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.LN2 === true) { $ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontDelete: \'Math.LN2 === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A4.js index 04fd6e2ae7..26509885d0 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LN2 of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.3/S15.8.1.3_A4.js - * @description Checking if Math.LN2 property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property LN2 of the Math Object has the attribute ReadOnly +es5id: 15.8.1.3_A4 +description: Checking if Math.LN2 property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 var x = Math.LN2; @@ -15,4 +14,3 @@ Math.LN2 = 1; if (Math.LN2 !== x) { $ERROR('#1: Math.LN2 hasn\'t ReadOnly: \'x = Math.LN2;Math.LN2 = 1;Math.LN2 === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A1.js index 46f1c564f7..0e2998bdec 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.LOG2E is approximately 1.4426950408889634 - * - * @path ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A1.js - * @description Comparing Math.LOG2E with 1.4426950408889634 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.LOG2E is approximately 1.4426950408889634 +es5id: 15.8.1.4_A1 +description: Comparing Math.LOG2E with 1.4426950408889634 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.LOG2E, 1.4426950408889634)) { $ERROR('#1: \'Math.LOG2E is not approximatley equal to 1.4426950408889634\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A2.js index d6f5850e4f..0339228e2b 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LOG2E of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A2.js - * @description Checking if Math.LOG2E property has the attribute DontEnum - */ +/*--- +info: Value Property LOG2E of the Math Object has the attribute DontEnum +es5id: 15.8.1.4_A2 +description: Checking if Math.LOG2E property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG2E"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A3.js index 5a591c0bf9..e041cb3332 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LOG2E of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A3.js - * @description Checking if Math.LOG2E property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property LOG2E of the Math Object has the attribute DontDelete +es5id: 15.8.1.4_A3 +description: Checking if Math.LOG2E property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.LOG2E === true) { $ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG2E === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A4.js index b709f1476a..5398e4c907 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LOG2E of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.4/S15.8.1.4_A4.js - * @description Checking if Math.LOG2E property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property LOG2E of the Math Object has the attribute ReadOnly +es5id: 15.8.1.4_A4 +description: Checking if Math.LOG2E property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.LOG2E; @@ -15,4 +14,3 @@ Math.LOG2E = 1; if (Math.LOG2E !== x) { $ERROR('#1: Math.LOG2E hasn\'t ReadOnly: \'x = Math.LOG2E;Math.LOG2E = 1;Math.LOG2E === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A1.js index 44d3d1deb4..81b4d6aea8 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A1.js @@ -1,18 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.LOG10E is approximately 0.4342944819032518 - * - * @path ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A1.js - * @description Comparing Math.LOG10E with 0.4342944819032518 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.LOG10E is approximately 0.4342944819032518 +es5id: 15.8.1.5_A1 +description: Comparing Math.LOG10E with 0.4342944819032518 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.LOG10E, 0.4342944819032518)) { $ERROR('#1: \'Math.LOG10E is not approximatley equal to 0.4342944819032518\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A2.js index 6b9ea3fbc7..c73a5636fd 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LOG10E of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A2.js - * @description Checking if Math.LOG10E property has the attribute DontEnum - */ +/*--- +info: Value Property LOG10E of the Math Object has the attribute DontEnum +es5id: 15.8.1.5_A2 +description: Checking if Math.LOG10E property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="LOG10E"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A3.js index 02c6230a19..2903f6d32e 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LOG10E of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A3.js - * @description Checking if Math.LOG10E property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property LOG10E of the Math Object has the attribute DontDelete +es5id: 15.8.1.5_A3 +description: Checking if Math.LOG10E property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.LOG10E === true) { $ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG10E === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A4.js index 5eedffafe1..6fc967cd02 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property LOG10E of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.5/S15.8.1.5_A4.js - * @description Checking if Math.LOG10E property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property LOG10E of the Math Object has the attribute ReadOnly +es5id: 15.8.1.5_A4 +description: Checking if Math.LOG10E property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.LOG10E; @@ -15,4 +14,3 @@ Math.LOG10E = 1; if (Math.LOG10E !== x) { $ERROR('#1: Math.LOG10E hasn\'t ReadOnly: \'x = Math.LOG10E;Math.LOG10E = 1;Math.LOG10E === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A1.js index 50acce0f03..6ded61a2ae 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A1.js @@ -1,19 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.PI is approximately 3.1415926535897932 - * - * @path ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A1.js - * @description Comparing Math.PI with 3.1415926535897932 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.PI is approximately 3.1415926535897932 +es5id: 15.8.1.6_A1 +description: Comparing Math.PI with 3.1415926535897932 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.PI, 3.1415926535897932)) { $ERROR('#1: \'Math.PI is not approximatley equal to 3.1415926535897932\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A2.js index b6a2666462..4c5c68a777 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property PI of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A2.js - * @description Checking if Math.PI property has the attribute DontEnum - */ +/*--- +info: Value Property PI of the Math Object has the attribute DontEnum +es5id: 15.8.1.6_A2 +description: Checking if Math.PI property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property PI of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="PI"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A3.js index cded51a38f..da27bb16d6 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property PI of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A3.js - * @description Checking if Math.PI property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property PI of the Math Object has the attribute DontDelete +es5id: 15.8.1.6_A3 +description: Checking if Math.PI property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.PI === true) { $ERROR('#1: Value Property PI of the Math Object hasn\'t attribute DontDelete: \'Math.PI === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A4.js index 96fc4fd812..b4479726bd 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property PI of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.6/S15.8.1.6_A4.js - * @description Checking if Math.PI property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property PI of the Math Object has the attribute ReadOnly +es5id: 15.8.1.6_A4 +description: Checking if Math.PI property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.PI; @@ -15,4 +14,3 @@ Math.PI = 1; if (Math.PI !== x) { $ERROR('#1: Math.PI hasn\'t ReadOnly: \'x = Math.PI;Math.PI = 1;Math.PI === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A1.js index 23c8e37a8f..b6879572dd 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A1.js @@ -1,19 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.SQRT1_2 is approximately 0.7071067811865476 - * - * @path ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A1.js - * @description Comparing Math.SQRT1_2 with 0.7071067811865476 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.SQRT1_2 is approximately 0.7071067811865476 +es5id: 15.8.1.7_A1 +description: Comparing Math.SQRT1_2 with 0.7071067811865476 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.SQRT1_2, 0.7071067811865476)) { $ERROR('#1: \'Math.SQRT1_2 is not approximatley equal to 0.7071067811865476\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A2.js index 6d619d021c..fc34917327 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property SQRT1_2 of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A2.js - * @description Checking if Math.SQRT1_2 property has the attribute DontEnum - */ +/*--- +info: Value Property SQRT1_2 of the Math Object has the attribute DontEnum +es5id: 15.8.1.7_A2 +description: Checking if Math.SQRT1_2 property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property SQRT1_2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT1_2"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A3.js index 3042c87b4f..e3613f5897 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property SQRT1_2 of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A3.js - * @description Checking if Math.SQRT1_2 property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property SQRT1_2 of the Math Object has the attribute DontDelete +es5id: 15.8.1.7_A3 +description: Checking if Math.SQRT1_2 property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.SQRT1_2 === true) { $ERROR("#1: Value Property SQRT1_2 of the Math Object hasn't attribute DontDelete: 'Math.SQRT1_2 === true'"); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A4.js index ec4a44bbe0..99c3f2f522 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property SQRT1_2 of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.7/S15.8.1.7_A4.js - * @description Checking if Math.SQRT1_2 property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property SQRT1_2 of the Math Object has the attribute ReadOnly +es5id: 15.8.1.7_A4 +description: Checking if Math.SQRT1_2 property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.SQRT1_2; @@ -15,4 +14,3 @@ Math.SQRT1_2 = 1; if (Math.SQRT1_2 !== x) { $ERROR('#1: Math.SQRT1_2 hasn\'t ReadOnly: \'x = Math.SQRT1_2;Math.SQRT1_2 = 1;Math.SQRT1_2 === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A1.js b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A1.js index 72a47f5d96..171b676586 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A1.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A1.js @@ -1,19 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.SQRT2 is approximately 1.4142135623730951 - * - * @path ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A1.js - * @description Comparing Math.SQRT2 with 1.4142135623730951 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: Math.SQRT2 is approximately 1.4142135623730951 +es5id: 15.8.1.8_A1 +description: Comparing Math.SQRT2 with 1.4142135623730951 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 if (!isEqual(Math.SQRT2, 1.4142135623730951)) { $ERROR('#1: \'Math.SQRT2 is not approximatley equal to 1.4142135623730951\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A2.js b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A2.js index 0671860284..3fc48de595 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A2.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property SQRT2 of the Math Object has the attribute DontEnum - * - * @path ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A2.js - * @description Checking if Math.SQRT2 property has the attribute DontEnum - */ +/*--- +info: Value Property SQRT2 of the Math Object has the attribute DontEnum +es5id: 15.8.1.8_A2 +description: Checking if Math.SQRT2 property has the attribute DontEnum +---*/ // CHECK#1 for(x in Math) { @@ -14,5 +13,3 @@ for(x in Math) { $ERROR('#1: Value Property SQRT2 of the Math Object hasn\'t attribute DontEnum: \'for(x in Math) {x==="SQRT2"}\''); } } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A3.js b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A3.js index baa8a03755..3ae63684e4 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A3.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A3.js @@ -1,17 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property SQRT2 of the Math Object has the attribute DontDelete - * - * @path ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A3.js - * @description Checking if Math.SQRT2 property has the attribute DontDelete - * @noStrict - */ +/*--- +info: Value Property SQRT2 of the Math Object has the attribute DontDelete +es5id: 15.8.1.8_A3 +description: Checking if Math.SQRT2 property has the attribute DontDelete +flags: [noStrict] +---*/ // CHECK#1 if (delete Math.SQRT2 === true) { $ERROR('#1: Value Property SQRT2 of the Math Object hasn\'t attribute DontDelete: \'Math.SQRT2 === true\''); } - - diff --git a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A4.js b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A4.js index 4a7aec5796..f96050f0b2 100644 --- a/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A4.js +++ b/test/suite/ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Value Property SQRT2 of the Math Object has the attribute ReadOnly - * - * @path ch15/15.8/15.8.1/15.8.1.8/S15.8.1.8_A4.js - * @description Checking if Math.SQRT2 property has the attribute ReadOnly - * @noStrict - */ +/*--- +info: Value Property SQRT2 of the Math Object has the attribute ReadOnly +es5id: 15.8.1.8_A4 +description: Checking if Math.SQRT2 property has the attribute ReadOnly +flags: [noStrict] +---*/ // CHECK#1 var x = Math.SQRT2; @@ -15,4 +14,3 @@ Math.SQRT2 = 1; if (Math.SQRT2 !== x) { $ERROR('#1: Math.SQRT2 hasn\'t ReadOnly: \'x = Math.SQRT2;Math.SQRT2 = 1;Math.SQRT2 === x\''); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A1.js index d828fae96e..f902de3ea9 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.abs(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A1.js - * @description Checking if Math.abs(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.abs(x) is NaN +es5id: 15.8.2.1_A1 +description: Checking if Math.abs(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.abs(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.abs(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A2.js index a343007709..1f1eaa7e95 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.abs(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A2.js - * @description Checking if Math.abs(-0) equals to +0 - */ +/*--- +info: If x is -0, Math.abs(x) is +0 +es5id: 15.8.2.1_A2 +description: Checking if Math.abs(-0) equals to +0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.abs(x) !== +0) { $ERROR("#1: 'var x=-0; Math.abs(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A3.js index b30afca1bf..4584dc9c9a 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.abs(x) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.1/S15.8.2.1_A3.js - * @description Checking if Math.abs(-Infinity) equals to +Infinity - */ +/*--- +info: If x is -Infinity, Math.abs(x) is +Infinity +es5id: 15.8.2.1_A3 +description: Checking if Math.abs(-Infinity) equals to +Infinity +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (Math.abs(x) !== +Infinity) { $ERROR("#1: 'var x=-Infinity; Math.abs(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A1.js index 46143c2a05..3e1f9e0f7a 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.log(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A1.js - * @description Checking if Math.log(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.log(x) is NaN +es5id: 15.8.2.10_A1 +description: Checking if Math.log(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.log(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.log(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A2.js index 494a73b669..94ef744447 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less than 0, Math.log(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A2.js - * @description Checking if Math.log(x) is NaN, where x is less than 0 - */ +/*--- +info: If x is less than 0, Math.log(x) is NaN +es5id: 15.8.2.10_A2 +description: Checking if Math.log(x) is NaN, where x is less than 0 +---*/ // CHECK#1 var x = -0.000000000000001; @@ -28,4 +27,3 @@ if (!isNaN(Math.log(x))) { $ERROR("#1: 'var x=-Infinity; isNaN(Math.log(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A3.js index 426090c8fa..93854fdfce 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0 or -0, Math.log(x) is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A3.js - * @description Checking if Math.log(+0) and Math.log(-0) equals to -Infinity - */ +/*--- +info: If x is +0 or -0, Math.log(x) is -Infinity +es5id: 15.8.2.10_A3 +description: Checking if Math.log(+0) and Math.log(-0) equals to -Infinity +---*/ // CHECK#1 var x = +0; @@ -21,4 +20,3 @@ if (Math.log(x) !== -Infinity) { $ERROR("#1: 'var x=-0; Math.log(x) !== -Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A4.js index af4e9c311e..cd0ff197ca 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is 1, Math.log(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A4.js - * @description Checking if Math.log(1) equals to +0 - */ +/*--- +info: If x is 1, Math.log(x) is +0 +es5id: 15.8.2.10_A4 +description: Checking if Math.log(1) equals to +0 +---*/ // CHECK#1 var x = 1; @@ -14,4 +13,3 @@ if (Math.log(x) !== +0) { $ERROR("#1: 'var x=1; Math.log(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A5.js index 05cd7db47d..1cf45192ef 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.log(x) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A5.js - * @description Checking if Math.log(+Infinity) equals to +Infinity - */ +/*--- +info: If x is +Infinity, Math.log(x) is +Infinity +es5id: 15.8.2.10_A5 +description: Checking if Math.log(+Infinity) equals to +Infinity +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (Math.log(x) !== +Infinity) { $ERROR("#1: 'var x=+Infinity; Math.log(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A6.js index 15f7abd7d1..0e4e7098bd 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A6.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.log, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.10/S15.8.2.10_A6.js - * @description Checking if Math.log is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.log, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.10_A6 +description: > + Checking if Math.log is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -157,4 +161,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.log(x) = " + y[i] + "\nMath.log(x) = " + Math.log(x[i]) + "\nMath.abs(libc.log(x) - Math.log(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.11/15.8.2.11-1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.11/15.8.2.11-1.js index b6ce999359..d3777a1d5c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.11/15.8.2.11-1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.11/15.8.2.11-1.js @@ -1,18 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.8/15.8.2/15.8.2.11/15.8.2.11-1.js - * @description Math.max({}) is NaN - */ - - - - - -function testcase() { - return isNaN(Math.max({})); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.8.2.11-1 +description: Math.max({}) is NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + return isNaN(Math.max({})); +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A1.js index 741d35728b..a305b5b256 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If no arguments are given, Math.max() is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A1.js - * @description Checking if Math.max() equals to -Infinity - */ +/*--- +info: If no arguments are given, Math.max() is -Infinity +es5id: 15.8.2.11_A1 +description: Checking if Math.max() equals to -Infinity +---*/ // CHECK#1 if (Math.max() != -Infinity) { $ERROR("#1: 'Math.max() != -Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A2.js index 512e605445..f8dca607a5 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If any value is NaN, the result of Math.max is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A2.js - * @description The script tests Math.max giving 1, 2 and 3 arguments to the function where at least one of the arguments is NaN - */ +/*--- +info: If any value is NaN, the result of Math.max is NaN +es5id: 15.8.2.11_A2 +description: > + The script tests Math.max giving 1, 2 and 3 arguments to the + function where at least one of the arguments is NaN +---*/ // CHECK#1 if (!isNaN(Math.max(NaN))) @@ -65,4 +66,3 @@ for (i = 0; i <= 2; i++) } } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A3.js index 906d9bf57f..ea35d1fcf5 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * +0 is considered to be larger than -0 - * - * @path ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A3.js - * @description Checking if Math.max(-0,+0) and Math.max(+0,-0) equals to +0 - */ +/*--- +info: +0 is considered to be larger than -0 +es5id: 15.8.2.11_A3 +description: Checking if Math.max(-0,+0) and Math.max(+0,-0) equals to +0 +---*/ // CHECK#1 if (Math.max(-0, +0) !== +0) @@ -19,4 +18,3 @@ if (Math.max(+0, -0) !== +0) { $ERROR("#2: 'Math.max(+0, -0) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A4.js index f6729a2ff5..fab69fcf30 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the Math.max method is 2 - * - * @path ch15/15.8/15.8.2/15.8.2.11/S15.8.2.11_A4.js - * @description Checking if Math.max.length property is defined and equals to 2 - */ +/*--- +info: The length property of the Math.max method is 2 +es5id: 15.8.2.11_A4 +description: Checking if Math.max.length property is defined and equals to 2 +---*/ // CHECK#1 if (typeof Math.max !== "function") { @@ -22,4 +21,3 @@ if (typeof Math.max.length === "undefined") { if (Math.max.length !== 2) { $ERROR('#3: The length property of the Math.max method is not 2'); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.12/15.8.2.12-1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.12/15.8.2.12-1.js index 4a612a65bb..7eb5d02b60 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.12/15.8.2.12-1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.12/15.8.2.12-1.js @@ -1,18 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.8/15.8.2/15.8.2.12/15.8.2.12-1.js - * @description Math.min({}) is NaN - */ - - - - - -function testcase() { - return isNaN(Math.min({})); -} -runTestCase(testcase); \ No newline at end of file +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.8.2.12-1 +description: Math.min({}) is NaN +includes: [runTestCase.js] +---*/ + +function testcase() { + return isNaN(Math.min({})); +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A1.js index 94f87343b4..ef52ac7855 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A1.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If no arguments are given, Math.min() is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A1.js - * @description Checking if Math.min() equals to +Infinity - */ +/*--- +info: If no arguments are given, Math.min() is +Infinity +es5id: 15.8.2.12_A1 +description: Checking if Math.min() equals to +Infinity +---*/ // CHECK#1 if (Math.min() != +Infinity) { $ERROR("#1: 'Math.min() != +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A2.js index 362958bd39..1676fe48ce 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If any value is NaN, the result of Math.min is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A2.js - * @description The script tests Math.min giving 1, 2 and 3 arguments to the function where at least one of the arguments is NaN - */ +/*--- +info: If any value is NaN, the result of Math.min is NaN +es5id: 15.8.2.12_A2 +description: > + The script tests Math.min giving 1, 2 and 3 arguments to the + function where at least one of the arguments is NaN +---*/ // CHECK#1 if (!isNaN(Math.min(NaN))) @@ -65,4 +66,3 @@ for (i = 0; i <= 2; i++) } } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A3.js index 01150d8c2f..7b6049fb14 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * +0 is considered to be larger than -0 - * - * @path ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A3.js - * @description Checking if Math.max(-0,+0) and Math.max(+0,-0) equals to -0 - */ +/*--- +info: +0 is considered to be larger than -0 +es5id: 15.8.2.12_A3 +description: Checking if Math.max(-0,+0) and Math.max(+0,-0) equals to -0 +---*/ // CHECK#1 if (Math.max(-0, +0) !== -0) @@ -19,4 +18,3 @@ if (Math.max(+0, -0) !== -0) { $ERROR("#2: 'Math.max(+0, -0) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A4.js index d563445b5a..d2555044cf 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of the Math.min method is 2 - * - * @path ch15/15.8/15.8.2/15.8.2.12/S15.8.2.12_A4.js - * @description Checking if Math.min.length property is defined and equals to 2 - */ +/*--- +info: The length property of the Math.min method is 2 +es5id: 15.8.2.12_A4 +description: Checking if Math.min.length property is defined and equals to 2 +---*/ // CHECK#1 if (typeof Math.min !== "function") { @@ -22,4 +21,3 @@ if (typeof Math.min.length === "undefined") { if (Math.min.length !== 2) { $ERROR('#3: The length property of the Math.min method is not 2'); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A1.js index 3e60d5bd74..d487c3f826 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is NaN, Math.pow(x,y) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A1.js - * @description Checking if Math.pow(x,y) is NaN, where y is NaN - */ +/*--- +info: If y is NaN, Math.pow(x,y) is NaN +es5id: 15.8.2.13_A1 +description: Checking if Math.pow(x,y) is NaN, where y is NaN +---*/ // CHECK#1 @@ -30,4 +29,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: isNaN(Math.pow(" + x[i] + ", " + y + ")) === false"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A10.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A10.js index 4276690564..22e9e7b22c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A10.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A10.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If abs(x)<1 and y is -Infinity, Math.pow(x,y) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A10.js - * @description Checking if Math.pow(x,y) equals to +Infinity, where abs(x)<1 and y is -Infinity - */ +/*--- +info: If abs(x)<1 and y is -Infinity, Math.pow(x,y) is +Infinity +es5id: 15.8.2.13_A10 +description: > + Checking if Math.pow(x,y) equals to +Infinity, where abs(x)<1 and + y is -Infinity +---*/ // CHECK#1 @@ -27,4 +28,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: Math.pow(" + x[i] + ", " + y + ") !== +Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A11.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A11.js index 0b2b93b32d..999db5a7de 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A11.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A11.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity and y>0, Math.pow(x,y) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A11.js - * @description Checking if Math.pow(x,y) equals to +Infinity, where x is +Infinity and y>0 - */ +/*--- +info: If x is +Infinity and y>0, Math.pow(x,y) is +Infinity +es5id: 15.8.2.13_A11 +description: > + Checking if Math.pow(x,y) equals to +Infinity, where x is + +Infinity and y>0 +---*/ // CHECK#1 @@ -25,4 +26,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A12.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A12.js index 8fa5c81dfb..ccd7ae53c9 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A12.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A12.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity and y<0, Math.pow(x,y) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A12.js - * @description Checking if Math.pow(x,y) equals to +0, where x is +Infinity and y<0 - */ +/*--- +info: If x is +Infinity and y<0, Math.pow(x,y) is +0 +es5id: 15.8.2.13_A12 +description: > + Checking if Math.pow(x,y) equals to +0, where x is +Infinity and + y<0 +---*/ // CHECK#1 @@ -25,4 +26,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A13.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A13.js index 03813cf514..37e6c824b0 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A13.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A13.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity and y>0 and y is an odd integer, Math.pow(x,y) is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A13.js - * @description Checking if Math.pow(x,y) equals to -Infinity, where x is -Infinity and y>0 - */ +/*--- +info: > + If x is -Infinity and y>0 and y is an odd integer, Math.pow(x,y) is + -Infinity +es5id: 15.8.2.13_A13 +description: > + Checking if Math.pow(x,y) equals to -Infinity, where x is + -Infinity and y>0 +---*/ // CHECK#1 @@ -24,4 +27,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== -Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A14.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A14.js index 705a519a11..7b9eac3979 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A14.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A14.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity and y>0 and y is NOT an odd integer, Math.pow(x,y) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A14.js - * @description Checking if Math.pow(x,y) equals to +Infinity, where x is -Infinity and y>0 - */ +/*--- +info: > + If x is -Infinity and y>0 and y is NOT an odd integer, Math.pow(x,y) is + +Infinity +es5id: 15.8.2.13_A14 +description: > + Checking if Math.pow(x,y) equals to +Infinity, where x is + -Infinity and y>0 +---*/ // CHECK#1 @@ -26,4 +29,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A15.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A15.js index 5611285c85..ddf382d77b 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A15.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A15.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity and y<0 and y is an odd integer, Math.pow(x,y) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A15.js - * @description Checking if Math.pow(x,y) equals to -0, where x is -Infinity and y<0 - */ +/*--- +info: If x is -Infinity and y<0 and y is an odd integer, Math.pow(x,y) is -0 +es5id: 15.8.2.13_A15 +description: > + Checking if Math.pow(x,y) equals to -0, where x is -Infinity and + y<0 +---*/ // CHECK#1 @@ -24,4 +25,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== -0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A16.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A16.js index 48d92a9179..291c032e1d 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A16.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A16.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity and y<0 and y is NOT an odd integer, Math.pow(x,y) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A16.js - * @description Checking if Math.pow(x,y) equals to +0, where x is -Infinity and y<0 - */ +/*--- +info: If x is -Infinity and y<0 and y is NOT an odd integer, Math.pow(x,y) is +0 +es5id: 15.8.2.13_A16 +description: > + Checking if Math.pow(x,y) equals to +0, where x is -Infinity and + y<0 +---*/ // CHECK#1 @@ -26,4 +27,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A17.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A17.js index 4826b3fb91..596ab33eec 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A17.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A17.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0 and y>0, Math.pow(x,y) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A17.js - * @description Checking if Math.pow(x,y) equals to +0, where x is +0 and y>0 - */ +/*--- +info: If x is +0 and y>0, Math.pow(x,y) is +0 +es5id: 15.8.2.13_A17 +description: Checking if Math.pow(x,y) equals to +0, where x is +0 and y>0 +---*/ // CHECK#1 @@ -25,4 +24,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A18.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A18.js index 186ef2be79..c8bf9d88cb 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A18.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A18.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0 and y<0, Math.pow(x,y) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A18.js - * @description Checking if Math.pow(x,y) equals to +Infinity, where x is +0 and y<0 - */ +/*--- +info: If x is +0 and y<0, Math.pow(x,y) is +Infinity +es5id: 15.8.2.13_A18 +description: > + Checking if Math.pow(x,y) equals to +Infinity, where x is +0 and + y<0 +---*/ // CHECK#1 @@ -25,4 +26,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A19.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A19.js index 793223661f..dda7f4dba4 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A19.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A19.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0 and y>0 and y is an odd integer, Math.pow(x,y) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A19.js - * @description Checking if Math.pow(x,y) equals to -0, where x is -0 and y>0 - */ +/*--- +info: If x is -0 and y>0 and y is an odd integer, Math.pow(x,y) is -0 +es5id: 15.8.2.13_A19 +description: Checking if Math.pow(x,y) equals to -0, where x is -0 and y>0 +---*/ // CHECK#1 @@ -24,4 +23,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== -0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A2.js index 653651a24c..d4df771b4e 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A2.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +0, Math.pow(x,y) is 1, even if x is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A2.js - * @description Checking if Math.pow(x,y) equals to 1, where y is +0 and x is number or NaN - */ +/*--- +info: If y is +0, Math.pow(x,y) is 1, even if x is NaN +es5id: 15.8.2.13_A2 +description: > + Checking if Math.pow(x,y) equals to 1, where y is +0 and x is + number or NaN +---*/ // CHECK#1 @@ -30,4 +31,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: Math.pow(" + x[i] + ", " + y + ") !== 1"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A20.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A20.js index 730d1dec3c..a4c214b137 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A20.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A20.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0 and y>0 and y is NOT an odd integer, Math.pow(x,y) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A20.js - * @description Checking if Math.pow(x,y) equals to +0, where x is -0 and y>0 and y is NOT an odd integer - */ +/*--- +info: If x is -0 and y>0 and y is NOT an odd integer, Math.pow(x,y) is +0 +es5id: 15.8.2.13_A20 +description: > + Checking if Math.pow(x,y) equals to +0, where x is -0 and y>0 and + y is NOT an odd integer +---*/ // CHECK#1 @@ -26,4 +27,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A21.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A21.js index 556c46dd65..7ee7d0d451 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A21.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A21.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0 and y<0 and y is an odd integer, Math.pow(x,y) is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A21.js - * @description Checking if Math.pow(x,y) equals to -Infinity, where x is -0 and y is an odd integer - */ +/*--- +info: If x is -0 and y<0 and y is an odd integer, Math.pow(x,y) is -Infinity +es5id: 15.8.2.13_A21 +description: > + Checking if Math.pow(x,y) equals to -Infinity, where x is -0 and y + is an odd integer +---*/ // CHECK#1 @@ -24,4 +25,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== -Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A22.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A22.js index fb1eb0771e..eff92db334 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A22.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A22.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0 and y<0 and y is NOT an odd integer, Math.pow(x,y) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A22.js - * @description Checking if Math.pow(x,y) equals to +Infinity, where x is -0 and y<0 and y is NOT an odd integer - */ +/*--- +info: If x is -0 and y<0 and y is NOT an odd integer, Math.pow(x,y) is +Infinity +es5id: 15.8.2.13_A22 +description: > + Checking if Math.pow(x,y) equals to +Infinity, where x is -0 and + y<0 and y is NOT an odd integer +---*/ // CHECK#1 @@ -26,4 +27,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: Math.pow(" + x + ", " + y[i] + ") !== +Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A23.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A23.js index 3ff4ef3a9b..4ed6f3ca1a 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A23.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A23.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x<0 and x is finite and y is finite and y is not an integer, Math.pow(x,y) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A23.js - * @description Checking if Math.pow(x,y) is NaN, where x<0 and x is finite and y is finite and y is not an integer - */ +/*--- +info: > + If x<0 and x is finite and y is finite and y is not an integer, + Math.pow(x,y) is NaN +es5id: 15.8.2.13_A23 +description: > + Checking if Math.pow(x,y) is NaN, where x<0 and x is finite and y + is finite and y is not an integer +---*/ // CHECK#1 @@ -32,4 +35,3 @@ for (i = 0; i < xnum; i++) for (j = 0; j < ynum; j++) if (!isNaN(Math.pow(x[i],y[j]))) $ERROR("#1: isNaN(Math.pow(" + x[i] + ", " + y[j] + ")) === false"); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A24.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A24.js index 4ffd6b4e66..74977c1364 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A24.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A24.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.pow, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A24.js - * @description Checking if Math.pow(argument1, argument2) is approximately equals to its mathematical value on the set of 64 argument1 values and 64 argument2 values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.pow, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.13_A24 +description: > + Checking if Math.pow(argument1, argument2) is approximately equals + to its mathematical value on the set of 64 argument1 values and 64 + argument2 values; all the sample values is calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -225,4 +229,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx1 = " + x1[i] + "\nx2 = " + x2[i] + "\nlibc.pow(x1,x2) = " + y[i] + "\nMath.pow(x1,x2) = " + Math.pow(x1[i], x2[i]) + "\nMath.abs(libc.pow(x1,x2) - Math.pow(x1,x2)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A3.js index 5929d427c8..61749737fd 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -0, Math.pow(x,y) is 1, even if x is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A3.js - * @description Checking if Math.pow(x,y) equals to 1, where x is number or NaN and y is -0 - */ +/*--- +info: If y is -0, Math.pow(x,y) is 1, even if x is NaN +es5id: 15.8.2.13_A3 +description: > + Checking if Math.pow(x,y) equals to 1, where x is number or NaN + and y is -0 +---*/ // CHECK#1 @@ -30,4 +31,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: Math.pow(" + x[i] + ", -0) !== 1"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A4.js index f8a0c51bbf..05606f11f8 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN and y is nonzero, Math.pow(x,y) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A4.js - * @description Checking if Math.pow(x,y) is NaN, where x is NaN and y is nonzero - */ +/*--- +info: If x is NaN and y is nonzero, Math.pow(x,y) is NaN +es5id: 15.8.2.13_A4 +description: Checking if Math.pow(x,y) is NaN, where x is NaN and y is nonzero +---*/ // CHECK#1 @@ -28,4 +27,3 @@ for (i = 0; i < ynum; i++) $ERROR("#1: isNaN(Math.pow(" + x + ", " + y[i] + ")) === false"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A5.js index d11b6178b4..f9f61ea1a1 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A5.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If abs(x)>1 and y is +Infinity, Math.pow(x,y) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A5.js - * @description Checking if Math.pow(x,y) equals to +Infinity, where abs(x)>1 and y is +Infinity - */ +/*--- +info: If abs(x)>1 and y is +Infinity, Math.pow(x,y) is +Infinity +es5id: 15.8.2.13_A5 +description: > + Checking if Math.pow(x,y) equals to +Infinity, where abs(x)>1 and + y is +Infinity +---*/ // CHECK#1 @@ -27,4 +28,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: Math.pow(" + x[i] + ", " + y + ") !== +Infinity"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A6.js index a5b816dc63..282501be62 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If abs(x)>1 and y is -Infinity, Math.pow(x,y) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A6.js - * @description Checking if Math.pow(x,y) equals to +0, where abs(x)>1 and y is -Infinity - */ +/*--- +info: If abs(x)>1 and y is -Infinity, Math.pow(x,y) is +0 +es5id: 15.8.2.13_A6 +description: > + Checking if Math.pow(x,y) equals to +0, where abs(x)>1 and y is + -Infinity +---*/ // CHECK#1 @@ -27,4 +28,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: Math.pow(" + x[i] + ", " + y + ") !== +0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A7.js index 7ab8b55996..2e1afea174 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A7.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If abs(x)==1 and y is +Infinity, Math.pow(x,y) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A7.js - * @description Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is +Infinity - */ +/*--- +info: If abs(x)==1 and y is +Infinity, Math.pow(x,y) is NaN +es5id: 15.8.2.13_A7 +description: > + Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is + +Infinity +includes: [$FAIL.js] +---*/ // CHECK#1 @@ -23,4 +25,3 @@ for (i = 0; i < xnum; i++) $FAIL("#1: isNaN(Math.pow(" + x[i] + ", " + y + ")) === false"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A8.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A8.js index 976fed4afa..81ef9cf54e 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A8.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A8.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If abs(x)==1 and y is -Infinity, Math.pow(x,y) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A8.js - * @description Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is -Infinity - */ +/*--- +info: If abs(x)==1 and y is -Infinity, Math.pow(x,y) is NaN +es5id: 15.8.2.13_A8 +description: > + Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is + -Infinity +includes: [$FAIL.js] +---*/ // CHECK#1 @@ -23,4 +25,3 @@ for (i = 0; i < xnum; i++) $FAIL("#1: isNaN(Math.pow(" + x[i] + ", " + y + ")) === false"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A9.js b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A9.js index 01acce3020..881e65d2ad 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A9.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A9.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If abs(x)<1 and y is +Infinity, Math.pow(x,y) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.13/S15.8.2.13_A9.js - * @description Checking if Math.pow(x,y) equals to +0, where abs(x)<1 and y is +Infinity - */ +/*--- +info: If abs(x)<1 and y is +Infinity, Math.pow(x,y) is +0 +es5id: 15.8.2.13_A9 +description: > + Checking if Math.pow(x,y) equals to +0, where abs(x)<1 and y is + +Infinity +---*/ // CHECK#1 @@ -27,4 +28,3 @@ for (i = 0; i < xnum; i++) $ERROR("#1: Math.pow(" + x[i] + ", " + y + ") !== +0"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.14/S15.8.2.14_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.14/S15.8.2.14_A1.js index c3679abcbb..d0542909de 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.14/S15.8.2.14_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.14/S15.8.2.14_A1.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.random() returns a number value with positive sign, greater than or equal to 0 but less than 1 - * - * @path ch15/15.8/15.8.2/15.8.2.14/S15.8.2.14_A1.js - * @description Checking if Math.random() is a number between 0 and 1, calling Math.random() 100 times - */ +/*--- +info: > + Math.random() returns a number value with positive sign, greater than or + equal to 0 but less than 1 +es5id: 15.8.2.14_A1 +description: > + Checking if Math.random() is a number between 0 and 1, calling + Math.random() 100 times +---*/ // CHECK#1 for (i = 0; i < 100; i++) @@ -17,4 +20,3 @@ for (i = 0; i < 100; i++) $ERROR("#1: Math.random() = " + val); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A1.js index bdb449fce3..3246ec446c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.round(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A1.js - * @description Checking if Math.round(x) is NaN, where x is NaN - */ +/*--- +info: If x is NaN, Math.round(x) is NaN +es5id: 15.8.2.15_A1 +description: Checking if Math.round(x) is NaN, where x is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.round(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.round(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A2.js index 9b6db17784..6c9bbfdf17 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.round(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A2.js - * @description Checking if Math.round(x) equals to +0, where x is +0 - */ +/*--- +info: If x is +0, Math.round(x) is +0 +es5id: 15.8.2.15_A2 +description: Checking if Math.round(x) equals to +0, where x is +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.round(x) !== +0) { $ERROR("#1: 'var x=+0; Math.round(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A3.js index 7c32e99db1..1c67d522c3 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.round(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A3.js - * @description Checking if Math.round(x) equals to -0, where x is -0 - */ +/*--- +info: If x is -0, Math.round(x) is -0 +es5id: 15.8.2.15_A3 +description: Checking if Math.round(x) equals to -0, where x is -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.round(x) !== -0) { $ERROR("#1: 'var x=-0; Math.round(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A4.js index 5b9fe86a8e..cfc81a02a1 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.round(x) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A4.js - * @description Checking if Math.round(x) is +Infinity, where x is +Infinity - */ +/*--- +info: If x is +Infinity, Math.round(x) is +Infinity +es5id: 15.8.2.15_A4 +description: Checking if Math.round(x) is +Infinity, where x is +Infinity +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (Math.round(x) !== +Infinity) { $ERROR("#1: 'var x=+Infinity; Math.round(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A5.js index abf47375d9..8c0fff3b70 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.round(x) is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A5.js - * @description Checking if Math.round(x) is -Infinity, where x is -Infinity - */ +/*--- +info: If x is -Infinity, Math.round(x) is -Infinity +es5id: 15.8.2.15_A5 +description: Checking if Math.round(x) is -Infinity, where x is -Infinity +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (Math.round(x) !== -Infinity) { $ERROR("#1: 'var x=-Infinity; Math.round(x) !== -Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A6.js index 3b54f7c947..0664d596c4 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A6.js @@ -1,12 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is equal to 0 or greater than 0, or if x is less than -0.5, Math.round(x) is equal to Math.floor(x+0.5) - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A6.js - * @description Checking if Math.round(x) is equal to Math.floor(x+0.5), where x equals to 0, greater than 0, or is less than -0.5; this check is performed on 2000 argument x values - */ +/*--- +info: > + If x is equal to 0 or greater than 0, or if x is less than -0.5, + Math.round(x) is equal to Math.floor(x+0.5) +es5id: 15.8.2.15_A6 +description: > + Checking if Math.round(x) is equal to Math.floor(x+0.5), where x + equals to 0, greater than 0, or is less than -0.5; this check is + performed on 2000 argument x values +---*/ // CHECK#1 for (i = 0; i <= 1000; i++) @@ -33,4 +37,3 @@ for (i = -5; i >= -1000; i--) $ERROR("#2: 'x = " + x + "; Math.round(x) !== Math.floor(x + 0.5)'") } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A7.js index ffa7ba6daa..6c2fd38628 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A7.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less than or equal to -0 and x is greater than or equal to -0.5, Math.round(x) is equal to -0 - * - * @path ch15/15.8/15.8.2/15.8.2.15/S15.8.2.15_A7.js - * @description Checking if Math.round(x) is equal -0, where x is equal to 0, equal to -0.5, or less than -0 while greater than -0.5 - */ +/*--- +info: > + If x is less than or equal to -0 and x is greater than or equal to -0.5, + Math.round(x) is equal to -0 +es5id: 15.8.2.15_A7 +description: > + Checking if Math.round(x) is equal -0, where x is equal to 0, + equal to -0.5, or less than -0 while greater than -0.5 +---*/ // CHECK#1 if (Math.round(-0) !== -0) @@ -25,4 +28,3 @@ if (Math.round(-0.25) !== -0) { $ERROR("#3: 'Math.round(-0.25) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A1.js index e8596f18f8..a64ed50fc3 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.sin(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A1.js - * @description Checking if Math.sin(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.sin(x) is NaN +es5id: 15.8.2.16_A1 +description: Checking if Math.sin(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.sin(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.sin(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A3.js index d2687c704c..aaaba2ce0c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.sin(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A3.js - * @description Checking if Math.sin(-0) equals to -0 - */ +/*--- +info: If x is -0, Math.sin(x) is -0 +es5id: 15.8.2.16_A3 +description: Checking if Math.sin(-0) equals to -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.sin(x) !== -0) { $ERROR("#1: 'var x = -0; Math.sin(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A4.js index f76c2b33f8..0f0cbdbb9f 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.sin(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A4.js - * @description Checking if Math.sin(+Infinity) is NaN - */ +/*--- +info: If x is +Infinity, Math.sin(x) is NaN +es5id: 15.8.2.16_A4 +description: Checking if Math.sin(+Infinity) is NaN +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (!isNaN(Math.sin(x))) { $ERROR("#1: 'var x = +Infinity; isNaN(Math.sin(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A5.js index 8115e744f3..1a94d8650f 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.sin(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A5.js - * @description Checking if Math.sin(-Infinity) is NaN - */ +/*--- +info: If x is -Infinity, Math.sin(x) is NaN +es5id: 15.8.2.16_A5 +description: Checking if Math.sin(-Infinity) is NaN +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (!isNaN(Math.sin(x))) { $ERROR("#1: 'var x = -Infinity; isNaN(Math.sin(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A6.js index 544e317601..fc9748616f 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Sine is a periodic function with period 2*PI - * - * @path ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A6.js - * @description Checking if Math.sin(x) equals to Math.sin(x+n*2*Math.PI) with precision 0.000000000003, where n is an integer from 1 to 100 and x is one of 10 float point values from 0 to 2*Math.PI - */ +/*--- +info: Sine is a periodic function with period 2*PI +es5id: 15.8.2.16_A6 +description: > + Checking if Math.sin(x) equals to Math.sin(x+n*2*Math.PI) with + precision 0.000000000003, where n is an integer from 1 to 100 and + x is one of 10 float point values from 0 to 2*Math.PI +includes: [$FAIL.js] +---*/ // CHECK#1 prec = 0.000000000003; @@ -43,4 +46,3 @@ for (i = 0; i < snum; i++) } } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A7.js index 8ec58a8524..aebb4073e5 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A7.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.sin it is recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A7.js - * @description Checking if Math.sin is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.sin it is recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.16_A7 +description: > + Checking if Math.sin is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -159,4 +163,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.sin(x) = " + y[i] + "\nMath.sin(x) = " + Math.sin(x[i]) + "\nMath.abs(libc.sin(x) - Math.sin(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A1.js index f726cede58..937b23b397 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.sqrt(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A1.js - * @description Checking if Math.sqrt(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.sqrt(x) is NaN +es5id: 15.8.2.17_A1 +description: Checking if Math.sqrt(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.sqrt(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.sqrt(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A2.js index fbc4bebacf..9f40206d30 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x less than 0, Math.sqrt(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A2.js - * @description Checking if Math.sqrt(x) is NaN, where x is less than 0 - */ +/*--- +info: If x less than 0, Math.sqrt(x) is NaN +es5id: 15.8.2.17_A2 +description: Checking if Math.sqrt(x) is NaN, where x is less than 0 +---*/ // CHECK#1 var x = -0.000000000000001; @@ -28,4 +27,3 @@ if (!isNaN(Math.sqrt(x))) { $ERROR("#3: 'var x=-Infinity; isNaN(Math.sqrt(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A3.js index 7fa820d9d7..a4c739c728 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is equal to +0, Math.sqrt(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A3.js - * @description Checking if Math.sqrt(+0) equals to +0 - */ +/*--- +info: If x is equal to +0, Math.sqrt(x) is +0 +es5id: 15.8.2.17_A3 +description: Checking if Math.sqrt(+0) equals to +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.sqrt(x) !== +0) { $ERROR("#1: 'var x=+0; Math.sqrt(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A4.js index 1caf03dcda..63802eceea 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is equal to -0, Math.sqrt(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A4.js - * @description Checking if Math.sqrt(-0) equals to -0 - */ +/*--- +info: If x is equal to -0, Math.sqrt(x) is -0 +es5id: 15.8.2.17_A4 +description: Checking if Math.sqrt(-0) equals to -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.sqrt(x) !== -0) { $ERROR("#1: 'var x=-0; Math.sqrt(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A5.js index 3bff31a19c..45bf9cba50 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is equal to +Infinity, Math.sqrt(x) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A5.js - * @description Checking if Math.sqrt(+Infinity) is +Infinity - */ +/*--- +info: If x is equal to +Infinity, Math.sqrt(x) is +Infinity +es5id: 15.8.2.17_A5 +description: Checking if Math.sqrt(+Infinity) is +Infinity +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (Math.sqrt(x) !== +Infinity) { $ERROR("#1: 'var x=+Infinity; Math.sqrt(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A6.js index f668a15192..bc4d354df4 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A6.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.sqrt, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.17/S15.8.2.17_A6.js - * @description Checking if Math.sqrt is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.sqrt, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.17_A6 +description: > + Checking if Math.sqrt is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -157,4 +161,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.sqrt(x) = " + y[i] + "\nMath.sqrt(x) = " + Math.sqrt(x[i]) + "\nMath.abs(libc.sqrt(x) - Math.sqrt(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A1.js index f8a7e24b35..bb105205bd 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.tan(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A1.js - * @description Checking if Math.tan(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.tan(x) is NaN +es5id: 15.8.2.18_A1 +description: Checking if Math.tan(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.tan(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.tan(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A2.js index d8c4ffc39a..a4c1ca8a01 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.tan(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A2.js - * @description Checking if Math.tan(+0) equals to +0 - */ +/*--- +info: If x is +0, Math.tan(x) is +0 +es5id: 15.8.2.18_A2 +description: Checking if Math.tan(+0) equals to +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.tan(x) !== +0) { $ERROR("#1: 'var x=+0; Math.tan(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A3.js index 4c75e6e702..0a858ed528 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.tan(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A3.js - * @description Checking if Math.tan(-0) equals to -0 - */ +/*--- +info: If x is -0, Math.tan(x) is -0 +es5id: 15.8.2.18_A3 +description: Checking if Math.tan(-0) equals to -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.tan(x) !== -0) { $ERROR("#1: 'var x=-0; Math.tan(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A4.js index 2b249a595e..c729280aa6 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.tan(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A4.js - * @description Checking if Math.tan(+Infinity) is NaN - */ +/*--- +info: If x is +Infinity, Math.tan(x) is NaN +es5id: 15.8.2.18_A4 +description: Checking if Math.tan(+Infinity) is NaN +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (!isNaN(Math.tan(x))) { $ERROR("#1: 'var x=+Infinity; isNaN(Math.tan(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A5.js index 97add1b8c9..8bd6f21c3b 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.tan(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A5.js - * @description Checking if Math.tan(-Infinity) is NaN - */ +/*--- +info: If x is -Infinity, Math.tan(x) is NaN +es5id: 15.8.2.18_A5 +description: Checking if Math.tan(-Infinity) is NaN +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (!isNaN(Math.tan(x))) { $ERROR("#1: 'var x=-Infinity; isNaN(Math.tan(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A6.js index db326caa26..c3302c19b7 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Tangent is a periodic function with period PI - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A6.js - * @description Checking if Math.tan(x) equals to Math.tan(x+n*Math.PI) with precision 0.000000000003, where n is an integer from 1 to 100 and x is one of 10 float point values from 0 to Math.PI - */ +/*--- +info: Tangent is a periodic function with period PI +es5id: 15.8.2.18_A6 +description: > + Checking if Math.tan(x) equals to Math.tan(x+n*Math.PI) with + precision 0.000000000003, where n is an integer from 1 to 100 and + x is one of 10 float point values from 0 to Math.PI +includes: [$FAIL.js] +---*/ // CHECK#1 prec = 0.00000000003; @@ -43,4 +46,3 @@ for (i = 0; i < snum; i++) } } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A7.js index 8f1c0a647f..de65fcb339 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A7.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.tan, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.18/S15.8.2.18_A7.js - * @description Checking if Math.tan is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.tan, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.18_A7 +description: > + Checking if Math.tan is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -161,4 +165,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.tan(x) = " + y[i] + "\nMath.tan(x) = " + Math.tan(x[i]) + "\nMath.abs(libc.tan(x) - Math.tan(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A1.js index e3433a7dbc..9322e15a13 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.acos(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A1.js - * @description Checking if Math.acos(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.acos(x) is NaN +es5id: 15.8.2.2_A1 +description: Checking if Math.acos(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.acos(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.acos(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A2.js index 61c575734f..ad756bfb5d 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is greater than 1, Math.acos(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A2.js - * @description Checking if Math.acos(x) is NaN, where x is greater than 1 - */ +/*--- +info: If x is greater than 1, Math.acos(x) is NaN +es5id: 15.8.2.2_A2 +description: Checking if Math.acos(x) is NaN, where x is greater than 1 +---*/ // CHECK#1 var x = 1.000000000000001; @@ -28,4 +27,3 @@ if (!isNaN(Math.acos(x))) { $ERROR("#3: 'x = +Infinity; isNaN(Math.acos(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A3.js index 8bc72db912..658e8b9a81 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less than -1, Math.acos(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A3.js - * @description Checking if Math.acos(x) is NaN, where x is less than -1 - */ +/*--- +info: If x is less than -1, Math.acos(x) is NaN +es5id: 15.8.2.2_A3 +description: Checking if Math.acos(x) is NaN, where x is less than -1 +---*/ // CHECK#1 var x = -1.000000000000001; @@ -28,4 +27,3 @@ if (!isNaN(Math.acos(x))) { $ERROR("#3: 'x = -Infinity; isNaN(Math.acos(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A4.js index 74130ce0eb..87e3ff1f2e 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is exactly 1, Math.acos(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A4.js - * @description Checking if Math.acos(1) equals to +0 - */ +/*--- +info: If x is exactly 1, Math.acos(x) is +0 +es5id: 15.8.2.2_A4 +description: Checking if Math.acos(1) equals to +0 +---*/ // CHECK#1 var x = 1; @@ -14,4 +13,3 @@ if (Math.acos(x) !== +0) { $ERROR("#1: 'var x = 1; Math.acos(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A5.js index 10c664f139..971b333537 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A5.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.acos, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.2/S15.8.2.2_A5.js - * @description Checking if Math.acos is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.acos, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.2_A5 +description: > + Checking if Math.acos is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -160,4 +164,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.acos(x) = " + y[i] + "\nMath.acos(x) = " + Math.acos(x[i]) + "\nMath.abs(libc.acos(x) - Math.acos(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A1.js index a58beb8f7e..633e232069 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.asin(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A1.js - * @description Checking if Math.asin(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.asin(x) is NaN +es5id: 15.8.2.3_A1 +description: Checking if Math.asin(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.asin(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.asin(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A2.js index 3d30373b63..573376f6ae 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is greater than 1, Math.asin(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A2.js - * @description Checking if Math.asin(x) is NaN, where x is greater than 1 - */ +/*--- +info: If x is greater than 1, Math.asin(x) is NaN +es5id: 15.8.2.3_A2 +description: Checking if Math.asin(x) is NaN, where x is greater than 1 +---*/ // CHECK#1 var x = 1.000000000000001; @@ -28,4 +27,3 @@ if (!isNaN(Math.asin(x))) { $ERROR("#3: 'x = +Infinity; isNaN(Math.asin(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A3.js index 3e75371103..ba0afc56a4 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less than -1, Math.asin(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A3.js - * @description Checking if Math.asin(x) is NaN, where x is less than -1 - */ +/*--- +info: If x is less than -1, Math.asin(x) is NaN +es5id: 15.8.2.3_A3 +description: Checking if Math.asin(x) is NaN, where x is less than -1 +---*/ // CHECK#1 var x = -1.000000000000001; @@ -28,4 +27,3 @@ if (!isNaN(Math.asin(x))) { $ERROR("#3: 'x = -Infinity; isNaN(Math.asin(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A4.js index ccef8681fe..8b21a28378 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.asin(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A4.js - * @description Checking if Math.asin(+0) equals +0 - */ +/*--- +info: If x is +0, Math.asin(x) is +0 +es5id: 15.8.2.3_A4 +description: Checking if Math.asin(+0) equals +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.asin(x) !== +0) { $ERROR("#1: 'var x = +0; Math.asin(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A5.js index afb2455ea4..3c21880758 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.asin(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A5.js - * @description Checking if Math.asin(-0) equals to -0 - */ +/*--- +info: If x is -0, Math.asin(x) is -0 +es5id: 15.8.2.3_A5 +description: Checking if Math.asin(-0) equals to -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.asin(x) !== -0) { $ERROR("#1: 'var x = -0; Math.asin(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A6.js index 1cd817dfa9..b6a5a1d626 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A6.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.asin, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.3/S15.8.2.3_A6.js - * @description Checking if Math.asin is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.asin, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.3_A6 +description: > + Checking if Math.asin is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -159,4 +163,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.asin(x) = " + y[i] + "\nMath.asin(x) = " + Math.asin(x[i]) + "\nMath.abs(libc.asin(x) - Math.asin(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A1.js index bffcb6f6da..caa6de3ccd 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.atan(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A1.js - * @description Checking if Math.atan(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.atan(x) is NaN +es5id: 15.8.2.4_A1 +description: Checking if Math.atan(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.atan(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.atan(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A2.js index 7e5112d1ee..cc04a648b0 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.atan(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A2.js - * @description Checking if Math.atan(+0) equals to +0 - */ +/*--- +info: If x is +0, Math.atan(x) is +0 +es5id: 15.8.2.4_A2 +description: Checking if Math.atan(+0) equals to +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.atan(x) !== +0) { $ERROR("#1: 'var x = +0; Math.atan(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A3.js index 586ab1ea1d..069ea8a8d2 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.atan(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A3.js - * @description Checking if Math.atan(-0) equals to -0 - */ +/*--- +info: If x is -0, Math.atan(x) is -0 +es5id: 15.8.2.4_A3 +description: Checking if Math.atan(-0) equals to -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.atan(x) !== -0) { $ERROR("#1: 'var x = -0; Math.atan(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A4.js index 3a755aa91a..43eb7869bf 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A4.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.atan(x) is an implementation-dependent approximation to +PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A4.js - * @description Checking if Math.atan(+Infinity) is an approximation to +PI/2 - */ +/*--- +info: > + If x is +Infinity, Math.atan(x) is an implementation-dependent + approximation to +PI/2 +es5id: 15.8.2.4_A4 +description: Checking if Math.atan(+Infinity) is an approximation to +PI/2 +includes: + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 var x = +Infinity; @@ -18,4 +19,3 @@ if (!isEqual(Math.atan(x),Math.PI/2)) { $ERROR("#1: '!isEqual(Math.atan(+Infinity), Math.PI/2)'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A5.js index ff1794311e..1544c2ed56 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A5.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.atan(x) is an implementation-dependent approximation to -PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A5.js - * @description Checking if Math.atan(-Infinity) is an approximation to -PI/2 - */ +/*--- +info: > + If x is -Infinity, Math.atan(x) is an implementation-dependent + approximation to -PI/2 +es5id: 15.8.2.4_A5 +description: Checking if Math.atan(-Infinity) is an approximation to -PI/2 +includes: + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 var x = -Infinity; @@ -18,4 +19,3 @@ if (!isEqual(Math.atan(x), -Math.PI/2)) { $ERROR("#1: '!isEqual(Math.atan(-Infinity), -Math.PI/2)'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A6.js index d710a244e8..0c501acf25 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A6.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.atan, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.4/S15.8.2.4_A6.js - * @description Checking if Math.atan is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.atan, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.4_A6 +description: > + Checking if Math.atan is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -159,4 +163,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.atan(x) = " + y[i] + "\nMath.atan(x) = " + Math.atan(x[i]) + "\nMath.abs(libc.atan(x) - Math.atan(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A1.js index 084f53c7e7..9715865f8c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If either x or y is NaN, Math(x,y) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A1.js - * @description Checking if Math.atan2(NaN,y) and Math.atan2(x,NaN) is NaN for different x and y values - */ +/*--- +info: If either x or y is NaN, Math(x,y) is NaN +es5id: 15.8.2.5_A1 +description: > + Checking if Math.atan2(NaN,y) and Math.atan2(x,NaN) is NaN for + different x and y values +---*/ // CHECK#1 @@ -33,4 +34,3 @@ for (i = 0; i < 2; i++) } } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A10.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A10.js index 5f88e1eea8..c35e910989 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A10.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A10.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -0 and x is -0, Math.atan2(y,x) is an implementation-dependent approximation to -PI - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A10.js - * @description Checking if Math.atan2(-0,-0) is an approximation to -PI - */ +/*--- +info: > + If y is -0 and x is -0, Math.atan2(y,x) is an implementation-dependent + approximation to -PI +es5id: 15.8.2.5_A10 +description: Checking if Math.atan2(-0,-0) is an approximation to -PI +includes: + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 //prec = 0.00000000000001; y = -0; x = -0; if (!isEqual(Math.atan2(y,x), -Math.PI)) $ERROR("#1: !isEqual(Math.atan2(-0,-0), -Math.PI)"); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A11.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A11.js index 5053538213..06226f4362 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A11.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A11.js @@ -1,16 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to -0 and x<0, Math.atan2(y,x) is an implementation-dependent approximation to -PI - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A11.js - * @description Checking if Math.atan2(-0,x) is an approximation to -PI, where x<0 - */ +/*--- +info: > + If y is equal to -0 and x<0, Math.atan2(y,x) is an + implementation-dependent approximation to -PI +es5id: 15.8.2.5_A11 +description: Checking if Math.atan2(-0,x) is an approximation to -PI, where x<0 +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 y = -0; //prec = 0.00000000000001; @@ -25,4 +27,3 @@ for (i = 0; i < xnum; i++) if (!isEqual(Math.atan2(y,x[i]), - Math.PI)) $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + Math.PI) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A12.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A12.js index 6796e7dcfb..fbf5b5a2b3 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A12.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A12.js @@ -1,16 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y<0 and x is +0, Math.atan2(y,x) is an implementation-dependent approximation to -PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A12.js - * @description Checking if Math.atan2(y,+0) is an approximation to -PI/2, where y<0 - */ +/*--- +info: > + If y<0 and x is +0, Math.atan2(y,x) is an implementation-dependent + approximation to -PI/2 +es5id: 15.8.2.5_A12 +description: > + Checking if Math.atan2(y,+0) is an approximation to -PI/2, where + y<0 +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 x = +0; //prec = 0.00000000000001; @@ -25,4 +29,3 @@ for (i = 0; i < ynum; i++) if (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2)) $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + ((Math.PI)/2)) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A13.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A13.js index 76510d1a2e..a41b7eea4d 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A13.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A13.js @@ -1,16 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y<0 and x is -0, Math.atan2(y,x) is an implementation-dependent approximation to -PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A13.js - * @description Checking if Math.atan2(y,-0) is an approximation to -PI/2, where y<0 - */ +/*--- +info: > + If y<0 and x is -0, Math.atan2(y,x) is an implementation-dependent + approximation to -PI/2 +es5id: 15.8.2.5_A13 +description: > + Checking if Math.atan2(y,-0) is an approximation to -PI/2, where + y<0 +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 x = -0; //prec = 0.00000000000001; @@ -25,4 +29,3 @@ for (i = 0; i < ynum; i++) if (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2)) $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", -0) + ((Math.PI)/2)) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A14.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A14.js index 51490acf80..13616ff194 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A14.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A14.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y>0 and y is finite and x is equal to +Infinity, Math.atan2(y,x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A14.js - * @description Checking if Math.atan2(y,x) equals to +0, where y>0 and y is finite and x is equal to +Infinity - */ +/*--- +info: If y>0 and y is finite and x is equal to +Infinity, Math.atan2(y,x) is +0 +es5id: 15.8.2.5_A14 +description: > + Checking if Math.atan2(y,x) equals to +0, where y>0 and y is + finite and x is equal to +Infinity +includes: [$FAIL.js] +---*/ // CHECK#1 x = +Infinity; @@ -21,4 +23,3 @@ for (i = 0; i < ynum; i++) if (Math.atan2(y[i],x) !== +0) $FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== +0"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A15.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A15.js index d6dc4d2035..c98fa99e19 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A15.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A15.js @@ -1,16 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y>0 and y is finite and x is equal to -Infinity, Math.atan2(y,x) is an implementation-dependent approximation to +PI - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A15.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI, where y>0 and y is finite and x is equal to -Infinity - */ +/*--- +info: > + If y>0 and y is finite and x is equal to -Infinity, Math.atan2(y,x) is an + implementation-dependent approximation to +PI +es5id: 15.8.2.5_A15 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI, where y>0 + and y is finite and x is equal to -Infinity +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 x = -Infinity; y = new Array(); @@ -24,4 +28,3 @@ for (i = 0; i < ynum; i++) if (!isEqual(Math.atan2(y[i],x),Math.PI)) $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - Math.PI) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A16.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A16.js index 9421fdb004..ffce14bd1f 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A16.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A16.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y<0 and y is finite and x is equal to +Infinity, Math.atan2(y,x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A16.js - * @description Checking if Math.atan2(y,x) is -0, where y<0 and y is finite and x is equal to +Infinity - */ +/*--- +info: If y<0 and y is finite and x is equal to +Infinity, Math.atan2(y,x) is -0 +es5id: 15.8.2.5_A16 +description: > + Checking if Math.atan2(y,x) is -0, where y<0 and y is finite and x + is equal to +Infinity +includes: [$FAIL.js] +---*/ // CHECK#1 x = +Infinity; @@ -21,4 +23,3 @@ for (i = 0; i < ynum; i++) if (Math.atan2(y[i],x) !== -0) $FAIL("#1: Math.atan2(" + y[i] + ", " + x + ") !== -0"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A17.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A17.js index 233cbb4184..d6e2a4d200 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A17.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A17.js @@ -1,16 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y<0 and y is finite and x is equal to -Infinity, Math.atan2(y,x) is an implementation-dependent approximation to -PI - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A17.js - * @description Checking if Math.atan2(y,x) is an approximation to -PI, where y<0 and y is finite and x is equal to -Infinity - */ +/*--- +info: > + If y<0 and y is finite and x is equal to -Infinity, Math.atan2(y,x) is an + implementation-dependent approximation to -PI +es5id: 15.8.2.5_A17 +description: > + Checking if Math.atan2(y,x) is an approximation to -PI, where y<0 + and y is finite and x is equal to -Infinity +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 x = -Infinity; y = new Array(); @@ -24,4 +28,3 @@ for (i = 0; i < ynum; i++) if (!isEqual(Math.atan2(y[i],x), -Math.PI)) $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") + Math.PI) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A18.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A18.js index e20cffff78..d101ff8641 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A18.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A18.js @@ -1,16 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +Infinity and x is finite, Math.atan2(y,x) is an implementation-dependent approximation to +PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A18.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI/2, where y is +Infinity and x is finite - */ +/*--- +info: > + If y is +Infinity and x is finite, Math.atan2(y,x) is an + implementation-dependent approximation to +PI/2 +es5id: 15.8.2.5_A18 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI/2, where y + is +Infinity and x is finite +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); - // CHECK#1 y = +Infinity; x = new Array(); @@ -28,4 +32,3 @@ for (i = 0; i < xnum; i++) if (!isEqual(Math.atan2(y,x[i]), (Math.PI)/2)) $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - (Math.PI/2)) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A19.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A19.js index 96973b30c2..6a3a37e851 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A19.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A19.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -Infinity and x is finite, Math.atan2(y,x) is an implementation-dependent approximation to -PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A19.js - * @description Checking if Math.atan2(y,x) is an approximation to -PI/2, where y is -Infinity and x is finite - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is -Infinity and x is finite, Math.atan2(y,x) is an + implementation-dependent approximation to -PI/2 +es5id: 15.8.2.5_A19 +description: > + Checking if Math.atan2(y,x) is an approximation to -PI/2, where y + is -Infinity and x is finite +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 //prec = 0.00000000000001; @@ -29,4 +33,3 @@ for (i = 0; i < xnum; i++) if (!isEqual(Math.atan2(y,x[i]), -(Math.PI)/2)) $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") + (Math.PI/2)) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A2.js index 96f3852425..6d22512e7f 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A2.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y>0 and x is +0, Math.atan2(y,x) is an implementation-dependent approximation to +PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A2.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI/2, where y>0 and x is +0 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y>0 and x is +0, Math.atan2(y,x) is an implementation-dependent + approximation to +PI/2 +es5id: 15.8.2.5_A2 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI/2, where + y>0 and x is +0 +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 x = +0; @@ -25,4 +29,3 @@ for (i = 0; i < ynum; i++) if (!isEqual(Math.atan2(y[i],x),(Math.PI)/2)) $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A20.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A20.js index 5bedc82c71..b64b5dd5b1 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A20.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A20.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to +Infinity and x is equal to +Infinity, Math.atan2(y,x) is an implementation-dependent approximation to +PI/4 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A20.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI/4, where y is equal to +Infinity and x is equal to +Infinity - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is equal to +Infinity and x is equal to +Infinity, Math.atan2(y,x) + is an implementation-dependent approximation to +PI/4 +es5id: 15.8.2.5_A20 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI/4, where y + is equal to +Infinity and x is equal to +Infinity +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 //prec = 0.00000000000001; @@ -18,4 +21,3 @@ x = +Infinity; if (!isEqual(Math.atan2(y,x),(Math.PI)/4)) $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (Math.PI/4)) >= " + prec); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A21.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A21.js index 058b5109f7..ab435f9550 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A21.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A21.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to +Infinity and x is equal to -Infinity, Math.atan2(y,x) is an implementation-dependent approximation to +3*PI/4 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A21.js - * @description Checking if Math.atan2(y,x) is an approximation to +3*PI/4, where y is equal to +Infinity and x is equal to -Infinity - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is equal to +Infinity and x is equal to -Infinity, Math.atan2(y,x) + is an implementation-dependent approximation to +3*PI/4 +es5id: 15.8.2.5_A21 +description: > + Checking if Math.atan2(y,x) is an approximation to +3*PI/4, where + y is equal to +Infinity and x is equal to -Infinity +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 //prec = 0.00000000000001; @@ -18,4 +21,3 @@ x = -Infinity; if (!isEqual(Math.atan2(y,x), (3*Math.PI)/4)) $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") - (3*Math.PI/4)) >= " + prec); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A22.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A22.js index ddf8dc3fec..096f3fef8e 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A22.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A22.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to -Infinity and x is equal to +Infinity, Math.atan2(y,x) is an implementation-dependent approximation to -PI/4 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A22.js - * @description Checking if Math.atan2(y,x) is an approximation to -PI/4, where y is equal to -Infinity and x is equal to +Infinity - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is equal to -Infinity and x is equal to +Infinity, Math.atan2(y,x) + is an implementation-dependent approximation to -PI/4 +es5id: 15.8.2.5_A22 +description: > + Checking if Math.atan2(y,x) is an approximation to -PI/4, where y + is equal to -Infinity and x is equal to +Infinity +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 //prec = 0.00000000000001; @@ -18,4 +21,3 @@ x = +Infinity; if (!isEqual(Math.atan2(y,x),- (Math.PI)/4)) $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (Math.PI/4)) >= " + prec); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A23.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A23.js index 29bf2e98ab..57b4d5b90c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A23.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A23.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to -Infinity and x is equal to -Infinity, Math.atan2(y,x) is an implementation-dependent approximation to -3*PI/4 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A23.js - * @description Checking if Math.atan2(y,x) is an approximation to -3*PI/4, where y is equal to -Infinity and x is equal to -Infinity - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is equal to -Infinity and x is equal to -Infinity, Math.atan2(y,x) + is an implementation-dependent approximation to -3*PI/4 +es5id: 15.8.2.5_A23 +description: > + Checking if Math.atan2(y,x) is an approximation to -3*PI/4, where + y is equal to -Infinity and x is equal to -Infinity +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 //prec = 0.00000000000001; @@ -18,4 +21,3 @@ x = -Infinity; if (!isEqual(Math.atan2(y,x), -(3*Math.PI)/4)) $ERROR("#1: Math.abs(Math.atan2(" + y + ", " + x + ") + (3*Math.PI/4)) >= " + prec); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A24.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A24.js index c966766dde..181602c5a9 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A24.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A24.js @@ -1,15 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.atan2, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A24.js - * @description Checking if Math.atan2(argument1, argument2) is approximately equals to its mathematical values on the set of 64 argument1 values and 64 argument2 values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.atan2, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.5_A24 +description: > + Checking if Math.atan2(argument1, argument2) is approximately + equals to its mathematical values on the set of 64 argument1 + values and 64 argument2 values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -224,4 +229,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx1 = " + x1[i] + "\nx2 = " + x2[i] + "\nlibc.atan2(x1,x2) = " + y[i] + "\nMath.atan2(x1,x2) = " + Math.atan2(x1[i],x2[i]) + "\nMath.abs(libc.atan2(x1,x2) - Math.atan2(x1,x2)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A3.js index 925ae06a79..e4bce7045c 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A3.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y>0 and x is -0, Math.atan2(y,x) is an implementation-dependent approximation to +PI/2 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A3.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI/2, where y>0 and x is -0 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y>0 and x is -0, Math.atan2(y,x) is an implementation-dependent + approximation to +PI/2 +es5id: 15.8.2.5_A3 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI/2, where + y>0 and x is -0 +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 x = -0; @@ -25,4 +29,3 @@ for (i = 0; i < ynum; i++) if (!isEqual(Math.atan2(y[i],x), (Math.PI)/2)) $FAIL("#1: Math.abs(Math.atan2(" + y[i] + ", " + x + ") - ((Math.PI)/2)) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A4.js index 33697a84af..6f2c172549 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A4.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +0 and x>0, Math.atan2(y,x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A4.js - * @description Checking if Math.atan2(y,x) equals to +0, where y is +0 and x>0 - */ +/*--- +info: If y is +0 and x>0, Math.atan2(y,x) is +0 +es5id: 15.8.2.5_A4 +description: Checking if Math.atan2(y,x) equals to +0, where y is +0 and x>0 +includes: [$FAIL.js] +---*/ // CHECK#1 y = +0; @@ -21,4 +21,3 @@ for (i = 0; i < xnum; i++) if (Math.atan2(y,x[i]) !== +0) $FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== +0"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A5.js index 1fceab1085..e92d287178 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A5.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +0 and x is +0, Math.atan2(y,x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A5.js - * @description Checking if Math.atan2(y,x) is +0, where y is +0 and x is +0 - */ +/*--- +info: If y is +0 and x is +0, Math.atan2(y,x) is +0 +es5id: 15.8.2.5_A5 +description: Checking if Math.atan2(y,x) is +0, where y is +0 and x is +0 +---*/ // CHECK#1 y = +0; x = +0; if (Math.atan2(y,x) !== +0) $ERROR("#1: Math.atan2(" + y + ", " + x + ") !== +0"); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A6.js index e75cad001c..37b8d5cfa9 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A6.js @@ -1,15 +1,18 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is +0 and x is -0, Math.atan2(y,x) is an implementation-dependent approximation to +PI - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A6.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI, where y is +0 and x is -0 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is +0 and x is -0, Math.atan2(y,x) is an implementation-dependent + approximation to +PI +es5id: 15.8.2.5_A6 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI, where y is + +0 and x is -0 +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 //prec = 0.00000000000001; @@ -17,4 +20,3 @@ y = +0; x = -0; if (!isEqual(Math.atan2(y,x), Math.PI)) $ERROR("#1: Math.abs(Math.atan2(" + y + ", -0) - Math.PI) >= " + prec); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A7.js index 972befbd64..cc304c9c4e 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A7.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to +0 and x<0, Math.atan2(y,x) is an implementation-dependent approximation to +PI - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A7.js - * @description Checking if Math.atan2(y,x) is an approximation to +PI, where y is equal to +0 and x<0 - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + If y is equal to +0 and x<0, Math.atan2(y,x) is an + implementation-dependent approximation to +PI +es5id: 15.8.2.5_A7 +description: > + Checking if Math.atan2(y,x) is an approximation to +PI, where y is + equal to +0 and x<0 +includes: + - $FAIL.js + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 y = +0; @@ -25,4 +29,3 @@ for (i = 0; i < xnum; i++) if (!isEqual(Math.atan2(y,x[i]), Math.PI)) $FAIL("#1: Math.abs(Math.atan2(" + y + ", " + x[i] + ") - Math.PI) >= " + prec); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A8.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A8.js index 51673b4c31..135c7b10ee 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A8.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A8.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is equal to -0 and x>0, Math.atan2(y,x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A8.js - * @description Checking if Math.atan2(y,x) is -0, where y is equal to -0 and x>0 - */ +/*--- +info: If y is equal to -0 and x>0, Math.atan2(y,x) is -0 +es5id: 15.8.2.5_A8 +description: Checking if Math.atan2(y,x) is -0, where y is equal to -0 and x>0 +includes: [$FAIL.js] +---*/ // CHECK#1 y = -0; @@ -21,4 +21,3 @@ for (i = 0; i < xnum; i++) if (Math.atan2(y,x[i]) !== -0) $FAIL("#1: Math.atan2(" + y + ", " + x[i] + ") !== -0"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A9.js b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A9.js index 56db227ac4..5b4b0f60d5 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A9.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A9.js @@ -1,16 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If y is -0 and x is +0, Math.atan2(y,x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.5/S15.8.2.5_A9.js - * @description Checking if Math.atan2(y,x) is -0, where y is -0 and x is +0 - */ +/*--- +info: If y is -0 and x is +0, Math.atan2(y,x) is -0 +es5id: 15.8.2.5_A9 +description: Checking if Math.atan2(y,x) is -0, where y is -0 and x is +0 +---*/ // CHECK#1 y = -0; x = +0; if (Math.atan2(y,x) !== -0) $ERROR("#1: Math.atan2(" + y + ", " + x + ") !== -0"); - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A1.js index cf8b205cb5..8a33246aed 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.ceil(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A1.js - * @description Checking if Math.ceil(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.ceil(x) is NaN +es5id: 15.8.2.6_A1 +description: Checking if Math.ceil(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.ceil(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.ceil(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A2.js index cda2b1f77f..f4c6542011 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.ceil(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A2.js - * @description Checking if Math.ceil(x) is +0, where x is +0 - */ +/*--- +info: If x is +0, Math.ceil(x) is +0 +es5id: 15.8.2.6_A2 +description: Checking if Math.ceil(x) is +0, where x is +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.ceil(x) !== +0) { $ERROR("#1: 'var x = +0; Math.ceil(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A3.js index cc0e0dd354..80c10cfc80 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.ceil(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A3.js - * @description Checking if Math.ceil(x) is -0, where x is -0 - */ +/*--- +info: If x is -0, Math.ceil(x) is -0 +es5id: 15.8.2.6_A3 +description: Checking if Math.ceil(x) is -0, where x is -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.ceil(x) !== -0) { $ERROR("#1: 'var x = -0; Math.ceil(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A4.js index 08151bc08f..e600908cbf 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.ceil(x) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A4.js - * @description Checking if Math.ceil(x) is +Infinity, where x is +Infinity - */ +/*--- +info: If x is +Infinity, Math.ceil(x) is +Infinity +es5id: 15.8.2.6_A4 +description: Checking if Math.ceil(x) is +Infinity, where x is +Infinity +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (Math.ceil(x) !== +Infinity) { $ERROR("#1: 'var x = +Infinity; Math.ceil(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A5.js index ac16f0644f..74e605aab0 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.ceil(x) is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A5.js - * @description Checking if Math.ceil(x) is -Infinity, where x is -Infinity - */ +/*--- +info: If x is -Infinity, Math.ceil(x) is -Infinity +es5id: 15.8.2.6_A5 +description: Checking if Math.ceil(x) is -Infinity, where x is -Infinity +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (Math.ceil(x) !== -Infinity) { $ERROR("#1: 'var x = -Infinity; Math.ceil(x) !== -Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A6.js index 3f3768fea8..5665ab1056 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is less than 0 but greater than -1, Math.ceil(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A6.js - * @description Checking if Math.ceil(x) is -0, where x is less than 0 but greater than -1 - */ +/*--- +info: If x is less than 0 but greater than -1, Math.ceil(x) is -0 +es5id: 15.8.2.6_A6 +description: > + Checking if Math.ceil(x) is -0, where x is less than 0 but greater + than -1 +---*/ // CHECK#1 var x = -0.000000000000001; @@ -28,4 +29,3 @@ if (Math.ceil(x) !== -0) { $ERROR("#3: 'var x = -0.5; Math.ceil(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A7.js index 4f038783e1..6b7a710ade 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of Math.ceil(x) is the same as the value of -Math.floor(-x) - * - * @path ch15/15.8/15.8.2/15.8.2.6/S15.8.2.6_A7.js - * @description Checking if Math.ceil(x) equals to -Math.floor(-x) on 2000 floating point argument values - */ +/*--- +info: The value of Math.ceil(x) is the same as the value of -Math.floor(-x) +es5id: 15.8.2.6_A7 +description: > + Checking if Math.ceil(x) equals to -Math.floor(-x) on 2000 + floating point argument values +---*/ // CHECK#1 for (i=-1000; i<1000; i++) @@ -17,4 +18,3 @@ for (i=-1000; i<1000; i++) $ERROR("#1: 'x = " + x + "; Math.ceil(x) !== -Math.floor(-x)'"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A1.js index 53a7380cb4..7782278667 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.cos(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A1.js - * @description Checking if Math.cos(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.cos(x) is NaN +es5id: 15.8.2.7_A1 +description: Checking if Math.cos(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.cos(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.cos(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A2.js index 2faeeba39a..a22ee05a71 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.cos(x) is 1 - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A2.js - * @description Checking if Math.cos(+0) is 1 - */ +/*--- +info: If x is +0, Math.cos(x) is 1 +es5id: 15.8.2.7_A2 +description: Checking if Math.cos(+0) is 1 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.cos(x) !== 1) { $ERROR("#1: 'var x = +0; Math.cos(x) !== 1'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A3.js index 274c291628..b567b4406a 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.cos(x) is 1 - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A3.js - * @description Checking if Math.cos(-0) is 1 - */ +/*--- +info: If x is -0, Math.cos(x) is 1 +es5id: 15.8.2.7_A3 +description: Checking if Math.cos(-0) is 1 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.cos(x) !== 1) { $ERROR("#1: 'var x = -0; Math.cos(x) !== 1'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A4.js index 4722df2584..cdec985312 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.cos(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A4.js - * @description Checking if Math.cos(+Infinity) is NaN - */ +/*--- +info: If x is +Infinity, Math.cos(x) is NaN +es5id: 15.8.2.7_A4 +description: Checking if Math.cos(+Infinity) is NaN +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (!isNaN(Math.cos(x))) { $ERROR("#1: 'var x = +Infinity; isNaN(Math.cos(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A5.js index 9623fd4fe9..7c34d8ec61 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.cos(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A5.js - * @description Checking if Math.cos(-Infinity) is NaN - */ +/*--- +info: If x is -Infinity, Math.cos(x) is NaN +es5id: 15.8.2.7_A5 +description: Checking if Math.cos(-Infinity) is NaN +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (!isNaN(Math.cos(x))) { $ERROR("#1: 'var x = -Infinity; isNaN(Math.cos(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A6.js index f9099ce893..9ec5004401 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A6.js @@ -1,12 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Cosine is a periodic function with period 2*PI - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A6.js - * @description Checking if Math.cos(x) equals to Math.cos(x+n*2*Math.PI) with precision 0.000000000003, where n is an integer from 1 to 100 and x is one of 10 float point values from -Math.PI to +Math.PI - */ +/*--- +info: Cosine is a periodic function with period 2*PI +es5id: 15.8.2.7_A6 +description: > + Checking if Math.cos(x) equals to Math.cos(x+n*2*Math.PI) with + precision 0.000000000003, where n is an integer from 1 to 100 and + x is one of 10 float point values from -Math.PI to +Math.PI +includes: [$FAIL.js] +---*/ // CHECK#1 prec = 0.000000000003; @@ -43,4 +46,3 @@ for (i = 0; i < snum; i++) } } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A7.js index 3465dff944..a09aed5fb4 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A7.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.cos it is recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.7/S15.8.2.7_A7.js - * @description Checking if Math.cos is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.cos it is recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.7_A7 +description: > + Checking if Math.cos is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -156,4 +160,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.cos(x) = " + y[i] + "\nMath.cos(x) = " + Math.cos(x[i]) + "\nMath.abs(libc.cos(x) - Math.cos(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A1.js index 2b79549a71..f04343598d 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.exp(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A1.js - * @description Checking if Math.exp(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.exp(x) is NaN +es5id: 15.8.2.8_A1 +description: Checking if Math.exp(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.exp(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.exp(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A2.js index b216ee261d..db4ba2d12a 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.exp(x) is 1 - * - * @path ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A2.js - * @description Checking if Math.exp(+0) is 1 - */ +/*--- +info: If x is +0, Math.exp(x) is 1 +es5id: 15.8.2.8_A2 +description: Checking if Math.exp(+0) is 1 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.exp(x) !== 1) { $ERROR("#1: 'var x = +0; Math.exp(x) !== 1'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A3.js index a5dc78a91c..32054e3e62 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.exp(x) is 1 - * - * @path ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A3.js - * @description Checking if Math.exp(-0) is 1 - */ +/*--- +info: If x is -0, Math.exp(x) is 1 +es5id: 15.8.2.8_A3 +description: Checking if Math.exp(-0) is 1 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.exp(x) !== 1) { $ERROR("#1: 'var x = -0; Math.exp(x) !== 1'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A4.js index 110af2bc90..94d37dc2f7 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.exp(x) is +Ifinity - * - * @path ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A4.js - * @description Checking if Math.exp(+Infinity) is +Ifinity - */ +/*--- +info: If x is +Infinity, Math.exp(x) is +Ifinity +es5id: 15.8.2.8_A4 +description: Checking if Math.exp(+Infinity) is +Ifinity +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (Math.exp(x) !== +Infinity) { $ERROR("#1: 'var x = +Infinity; Math.exp(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A5.js index 479b20a06b..4a26d60851 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.exp(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A5.js - * @description Checking if Math.exp(-Infinity) is +0 - */ +/*--- +info: If x is -Infinity, Math.exp(x) is +0 +es5id: 15.8.2.8_A5 +description: Checking if Math.exp(-Infinity) is +0 +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (Math.exp(x) !== +0) { $ERROR("#1: 'var x = -Infinity; Math.exp(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A6.js index 15bd288a73..19e4c47dab 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A6.js @@ -1,15 +1,19 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Math.exp, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm - * - * @path ch15/15.8/15.8.2/15.8.2.8/S15.8.2.8_A6.js - * @description Checking if Math.exp is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC - */ - -$INCLUDE("math_precision.js"); -$INCLUDE("math_isequal.js"); +/*--- +info: > + Math.exp, recommended that implementations use the approximation + algorithms for IEEE 754 arithmetic contained in fdlibm +es5id: 15.8.2.8_A6 +description: > + Checking if Math.exp is approximately equals to its mathematical + values on the set of 64 argument values; all the sample values is + calculated with LibC +includes: + - math_precision.js + - math_isequal.js +---*/ // CHECK#1 vnum = 64; @@ -158,4 +162,3 @@ for (i = 0; i < vnum; i++) $ERROR("\nx = " + x[i] + "\nlibc.exp(x) = " + y[i] + "\nMath.exp(x) = " + Math.exp(x[i]) + "\nMath.abs(libc.exp(x) - Math.exp(x)) > " + prec + "\n\n"); } } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A1.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A1.js index b7a457c712..43ede91801 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A1.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is NaN, Math.floor(x) is NaN - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A1.js - * @description Checking if Math.floor(NaN) is NaN - */ +/*--- +info: If x is NaN, Math.floor(x) is NaN +es5id: 15.8.2.9_A1 +description: Checking if Math.floor(NaN) is NaN +---*/ // CHECK#1 var x = NaN; @@ -14,4 +13,3 @@ if (!isNaN(Math.floor(x))) { $ERROR("#1: 'var x=NaN; isNaN(Math.floor(x)) === false'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A2.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A2.js index e512ef1871..68eca4808e 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A2.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +0, Math.floor(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A2.js - * @description Checking if Math.floor(x) is +0, where x is +0 - */ +/*--- +info: If x is +0, Math.floor(x) is +0 +es5id: 15.8.2.9_A2 +description: Checking if Math.floor(x) is +0, where x is +0 +---*/ // CHECK#1 var x = +0; @@ -14,4 +13,3 @@ if (Math.floor(x) !== +0) { $ERROR("#1: 'var x = +0; Math.floor(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A3.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A3.js index 61e385e777..af028bdb98 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A3.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -0, Math.floor(x) is -0 - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A3.js - * @description Checking if Math.floor(x) is -0, where x is -0 - */ +/*--- +info: If x is -0, Math.floor(x) is -0 +es5id: 15.8.2.9_A3 +description: Checking if Math.floor(x) is -0, where x is -0 +---*/ // CHECK#1 var x = -0; @@ -14,4 +13,3 @@ if (Math.floor(x) !== -0) { $ERROR("#1: 'var x = -0; Math.floor(x) !== -0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A4.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A4.js index 4f85a55f16..2cdb904864 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A4.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A4.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is +Infinity, Math.floor(x) is +Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A4.js - * @description Checking if Math.floor(x) is +Infinity, where x is +Infinity - */ +/*--- +info: If x is +Infinity, Math.floor(x) is +Infinity +es5id: 15.8.2.9_A4 +description: Checking if Math.floor(x) is +Infinity, where x is +Infinity +---*/ // CHECK#1 var x = +Infinity; @@ -14,4 +13,3 @@ if (Math.floor(x) !== +Infinity) { $ERROR("#1: 'var x = +Infinity; Math.floor(x) !== +Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A5.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A5.js index 9c2fcba25a..0d35398cab 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A5.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is -Infinity, Math.floor(x) is -Infinity - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A5.js - * @description Checking if Math.floor(x) is -Infinity, where x is -Infinity - */ +/*--- +info: If x is -Infinity, Math.floor(x) is -Infinity +es5id: 15.8.2.9_A5 +description: Checking if Math.floor(x) is -Infinity, where x is -Infinity +---*/ // CHECK#1 var x = -Infinity; @@ -14,4 +13,3 @@ if (Math.floor(x) !== -Infinity) { $ERROR("#1: 'var x = -Infinity; Math.floor(x) !== -Infinity'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A6.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A6.js index ae9305f078..52909cb035 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A6.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A6.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If x is greater than 0 but less than 1, Math.floor(x) is +0 - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A6.js - * @description Checking if Math.floor(x) is +0, where x is greater than 0 but less than 1 - */ +/*--- +info: If x is greater than 0 but less than 1, Math.floor(x) is +0 +es5id: 15.8.2.9_A6 +description: > + Checking if Math.floor(x) is +0, where x is greater than 0 but + less than 1 +---*/ // CHECK#1 var x = 0.000000000000001; @@ -28,4 +29,3 @@ if (Math.floor(x) !== +0) { $ERROR("#3: 'var x = 0.5; Math.ceil(x) !== +0'"); } - diff --git a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A7.js b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A7.js index 7cd585b77d..ceb2f353ac 100644 --- a/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A7.js +++ b/test/suite/ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A7.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of Math.floor(x) is the same as the value of -Math.ceil(-x) - * - * @path ch15/15.8/15.8.2/15.8.2.9/S15.8.2.9_A7.js - * @description Checking if Math.floor(x) is equal to -Math.ceil(-x) on 2000 floating-point argument values - */ +/*--- +info: The value of Math.floor(x) is the same as the value of -Math.ceil(-x) +es5id: 15.8.2.9_A7 +description: > + Checking if Math.floor(x) is equal to -Math.ceil(-x) on 2000 + floating-point argument values +---*/ // CHECK#1 for (i=-1000; i<1000; i++) @@ -17,4 +18,3 @@ for (i=-1000; i<1000; i++) $ERROR("#1: 'x = " + x + "; Math.floor(x) !== -Math.ceil(-x)'"); } } - diff --git a/test/suite/ch15/15.9/15.9.1/15.9.1.15/15.9.1.15-1.js b/test/suite/ch15/15.9/15.9.1/15.9.1.15/15.9.1.15-1.js index b31302315c..2153f8e817 100644 --- a/test/suite/ch15/15.9/15.9.1/15.9.1.15/15.9.1.15-1.js +++ b/test/suite/ch15/15.9/15.9.1/15.9.1.15/15.9.1.15-1.js @@ -1,20 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.1/15.9.1.15/15.9.1.15-1.js - * @description Date Time String Format - specified default values will be set for all optional fields(MM, DD, mm, ss and time zone) when they are absent - */ - - -function testcase() { - var result = false; - var expectedDateTimeStr = "1970-01-01T00:00:00.000Z"; - var dateObj = new Date("1970"); - var dateStr = dateObj.toISOString(); - result = dateStr === expectedDateTimeStr; - return result; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.1.15-1 +description: > + Date Time String Format - specified default values will be set for + all optional fields(MM, DD, mm, ss and time zone) when they are + absent +includes: [runTestCase.js] +---*/ + +function testcase() { + var result = false; + var expectedDateTimeStr = "1970-01-01T00:00:00.000Z"; + var dateObj = new Date("1970"); + var dateStr = dateObj.toISOString(); + result = dateStr === expectedDateTimeStr; + return result; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A1.js b/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A1.js index d7d5643d24..ef43e71ab9 100644 --- a/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A1.js +++ b/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A1.js @@ -1,13 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as a function rather than as a constructor, - * it should be "string" representing the current time (UTC) - * - * @path ch15/15.9/15.9.2/S15.9.2.1_A1.js - * @description Checking type of returned value - */ +/*--- +info: > + When Date is called as a function rather than as a constructor, + it should be "string" representing the current time (UTC) +es5id: 15.9.2.1_A1 +description: Checking type of returned value +---*/ //CHECK#1 if( typeof Date() !== "string" ) { @@ -78,4 +78,3 @@ if( typeof Date(undefined) !== "string" ) { if( typeof Date(null) !== "string" ) { $ERROR('#15: typeof Date(null) should be "string", actual is '+(typeof Date(null))); } - diff --git a/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A2.js b/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A2.js index 8f87742dea..6ef3bd9594 100644 --- a/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A2.js +++ b/test/suite/ch15/15.9/15.9.2/S15.9.2.1_A2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * All of the arguments are optional, any arguments supplied are - * accepted but are completely ignored. A string is created and returned as - * if by the expression (new Date()).toString() - * - * @path ch15/15.9/15.9.2/S15.9.2.1_A2.js - * @description Use various number arguments and various types of ones - */ +/*--- +info: > + All of the arguments are optional, any arguments supplied are + accepted but are completely ignored. A string is created and returned as + if by the expression (new Date()).toString() +es5id: 15.9.2.1_A2 +description: Use various number arguments and various types of ones +---*/ function isEqual(d1, d2) { if (d1 === d2) { @@ -89,4 +89,3 @@ if( !isEqual(Date(undefined), (new Date()).toString()) ) { if( !isEqual(Date(null), (new Date()).toString()) ) { $ERROR('#15: Date(null) is equal to (new Date()).toString()'); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T1.js index 629d087129..fff070d5c9 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initializes the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A1_T1.js - * @description 2 arguments, (year, month) - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initializes the newly created object +es5id: 15.9.3.1_A1_T1 +description: 2 arguments, (year, month) +includes: [$FAIL.js] +---*/ if (typeof new Date(1899, 11) !== "object") { $FAIL("#1.1: typeof new Date(1899, 11) should be 'object'"); @@ -224,4 +225,3 @@ var x124 = new Date(2100, 0); if(x124 === undefined){ $FAIL("#12.4: new Date(2100, 0) should not be undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T2.js index 36199a6ce9..e9d485444b 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initializes the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A1_T2.js - * @description 3 arguments, (year, month, date) - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initializes the newly created object +es5id: 15.9.3.1_A1_T2 +description: 3 arguments, (year, month, date) +includes: [$FAIL.js] +---*/ if (typeof new Date(1899, 11, 31) !== "object") { $FAIL("#1.1: typeof new Date(1899, 11, 31) should be 'object'"); @@ -224,4 +225,3 @@ var x124 = new Date(2100, 0, 1); if(x124 === undefined){ $FAIL("#12.4: new Date(2100, 0, 1) should not be undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T3.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T3.js index da20c7b941..79c9945f04 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initializes the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A1_T3.js - * @description 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initializes the newly created object +es5id: 15.9.3.1_A1_T3 +description: 4 arguments, (year, month, date, hours) +includes: [$FAIL.js] +---*/ if (typeof new Date(1899, 11, 31, 23) !== "object") { $FAIL("#1.1: typeof new Date(1899, 11, 31, 23) should be 'object'"); @@ -224,4 +225,3 @@ var x124 = new Date(2100, 0, 1, 0); if(x124 === undefined){ $FAIL("#12.4: new Date(2100, 0, 1, 0) should not be undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T4.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T4.js index 85c2753bb9..5bf11ca227 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T4.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initializes the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A1_T4.js - * @description 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initializes the newly created object +es5id: 15.9.3.1_A1_T4 +description: 5 arguments, (year, month, date, hours, minutes) +includes: [$FAIL.js] +---*/ if (typeof new Date(1899, 11, 31, 23, 59) !== "object") { $FAIL("#1.1: typeof new Date(1899, 11, 31, 23, 59) should be 'object'"); @@ -224,4 +225,3 @@ var x124 = new Date(2100, 0, 1, 0, 0); if(x124 === undefined){ $FAIL("#12.4: new Date(2100, 0, 1, 0, 0) should not be undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T5.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T5.js index b3bc532421..477276b05b 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T5.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T5.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initializes the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A1_T5.js - * @description 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initializes the newly created object +es5id: 15.9.3.1_A1_T5 +description: 6 arguments, (year, month, date, hours, minutes, seconds) +includes: [$FAIL.js] +---*/ if (typeof new Date(1899, 11, 31, 23, 59, 59) !== "object") { $FAIL("#1.1: typeof new Date(1899, 11, 31, 23, 59, 59) should be 'object'"); @@ -224,4 +225,3 @@ var x124 = new Date(2100, 0, 1, 0, 0, 0); if(x124 === undefined){ $FAIL("#12.4: new Date(2100, 0, 1, 0, 0, 0) should not be undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T6.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T6.js index a33cd72388..bb9762ef98 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T6.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A1_T6.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initializes the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A1_T6.js - * @description 7 arguments, (year, month, date, hours, minutes, seconds, ms) - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initializes the newly created object +es5id: 15.9.3.1_A1_T6 +description: 7 arguments, (year, month, date, hours, minutes, seconds, ms) +includes: [$FAIL.js] +---*/ if (typeof new Date(1899, 11, 31, 23, 59, 59, 999) !== "object") { $FAIL("#1.1: typeof new Date(1899, 11, 31, 23, 59, 59, 999) should be 'object'"); @@ -224,4 +225,3 @@ var x124 = new Date(2100, 0, 1, 0, 0, 0, 0); if(x124 === undefined){ $FAIL("#12.4: new Date(2100, 0, 1, 0, 0, 0, 0) should not be undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T1.js index e9a37e7dc8..cff4224567 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T1.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A2_T1.js - * @description 2 arguments, (year, month) - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.1_A2_T1 +description: 2 arguments, (year, month) +includes: [$FAIL.js] +---*/ var x11 = new Date(1899, 11); if (typeof x11.constructor.prototype !== "object") { @@ -189,4 +190,3 @@ var x123 = new Date(2100, 0); if(Date.prototype !== x123.constructor.prototype){ $FAIL("#12.3: Date.prototype === x123.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T2.js index c9482d234e..e7788d52c2 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T2.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A2_T2.js - * @description 3 arguments, (year, month, date) - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.1_A2_T2 +description: 3 arguments, (year, month, date) +includes: [$FAIL.js] +---*/ var x11 = new Date(1899, 11, 31); if (typeof x11.constructor.prototype !== "object") { @@ -189,4 +190,3 @@ var x123 = new Date(2100, 0, 1); if(Date.prototype !== x123.constructor.prototype){ $FAIL("#12.3: Date.prototype === x123.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T3.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T3.js index 42dd6b78ca..b713d8327c 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T3.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T3.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A2_T3.js - * @description 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.1_A2_T3 +description: 4 arguments, (year, month, date, hours) +includes: [$FAIL.js] +---*/ var x11 = new Date(1899, 11, 31, 23); if (typeof x11.constructor.prototype !== "object") { @@ -189,4 +190,3 @@ var x123 = new Date(2100, 0, 1, 0); if(Date.prototype !== x123.constructor.prototype){ $FAIL("#12.3: Date.prototype === x123.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T4.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T4.js index 371830aa5c..391537938e 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T4.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T4.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A2_T4.js - * @description 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.1_A2_T4 +description: 5 arguments, (year, month, date, hours, minutes) +includes: [$FAIL.js] +---*/ var x11 = new Date(1899, 11, 31, 23, 59); if (typeof x11.constructor.prototype !== "object") { @@ -189,4 +190,3 @@ var x123 = new Date(2100, 0, 1, 0, 0); if(Date.prototype !== x123.constructor.prototype){ $FAIL("#12.3: Date.prototype === x123.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T5.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T5.js index ca8352d2a5..c938351a67 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T5.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T5.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A2_T5.js - * @description 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.1_A2_T5 +description: 6 arguments, (year, month, date, hours, minutes, seconds) +includes: [$FAIL.js] +---*/ var x11 = new Date(1899, 11, 31, 23, 59, 59); if (typeof x11.constructor.prototype !== "object") { @@ -189,4 +190,3 @@ var x123 = new Date(2100, 0, 1, 0, 0, 0); if(Date.prototype !== x123.constructor.prototype){ $FAIL("#12.3: Date.prototype === x123.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T6.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T6.js index 42cc29817c..5f1bf6d4e0 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T6.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A2_T6.js @@ -1,14 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A2_T6.js - * @description 7 arguments, (year, month, date, hours, minutes, seconds, ms) - */ +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.1_A2_T6 +description: 7 arguments, (year, month, date, hours, minutes, seconds, ms) +includes: [$FAIL.js] +---*/ var x11 = new Date(1899, 11, 31, 23, 59, 59, 999); if (typeof x11.constructor.prototype !== "object") { @@ -189,4 +190,3 @@ var x123 = new Date(2100, 0, 1, 0, 0, 0, 0); if(Date.prototype !== x123.constructor.prototype){ $FAIL("#12.3: Date.prototype === x123.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.1.js index 3b7c9cf85e..38afe9c9df 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T1.1.js - * @description Test based on delete prototype.toString - 2 arguments, (year, month) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T1.1 +description: > + Test based on delete prototype.toString - 2 arguments, (year, + month) +includes: [$FAIL.js] +---*/ var x1 = new Date(1899, 11); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -68,4 +71,3 @@ var x12 = new Date(2100, 0); if (Object.prototype.toString.call(x12) !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.2.js index 16b9f14921..4bab7cb478 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T1.2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T1.2.js - * @description Test based on overwriting prototype.toString - 2 arguments, (year, month) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T1.2 +description: > + Test based on overwriting prototype.toString - 2 arguments, (year, + month) +includes: [$FAIL.js] +---*/ Date.prototype.toString = Object.prototype.toString; @@ -70,5 +73,3 @@ var x12 = new Date(2100, 0); if (x12.toString() !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.1.js index 00e3030c71..f35c0f5af4 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T2.1.js - * @description Test based on delete prototype.toString - 3 arguments, (year, month, date) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T2.1 +description: > + Test based on delete prototype.toString - 3 arguments, (year, + month, date) +includes: [$FAIL.js] +---*/ var x1 = new Date(1899, 11, 31); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -68,4 +71,3 @@ var x12 = new Date(2100, 0, 1); if (Object.prototype.toString.call(x12) !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.2.js index d9b53f87de..525bda9a2f 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T2.2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T2.2.js - * @description Test based on overwriting prototype.toString - 3 arguments, (year, month, date) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T2.2 +description: > + Test based on overwriting prototype.toString - 3 arguments, (year, + month, date) +includes: [$FAIL.js] +---*/ Date.prototype.toString = Object.prototype.toString; @@ -70,5 +73,3 @@ var x12 = new Date(2100, 0, 1); if (x12.toString() !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.1.js index 8fa20093ab..8c8f4399ba 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T3.1.js - * @description Test based on delete prototype.toString - 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T3.1 +description: > + Test based on delete prototype.toString - 4 arguments, (year, + month, date, hours) +includes: [$FAIL.js] +---*/ var x1 = new Date(1899, 11, 31, 23); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -68,4 +71,3 @@ var x12 = new Date(2100, 0, 1, 0); if (Object.prototype.toString.call(x12) !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.2.js index 1a11ac25a4..7333eb1370 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T3.2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T3.2.js - * @description Test based on overwriting prototype.toString - 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T3.2 +description: > + Test based on overwriting prototype.toString - 4 arguments, (year, + month, date, hours) +includes: [$FAIL.js] +---*/ Date.prototype.toString = Object.prototype.toString; @@ -70,4 +73,3 @@ var x12 = new Date(2100, 0, 1, 0); if (x12.toString() !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.1.js index 42ab3dfda5..c5ba02751e 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.1.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T4.1.js - * @description Test based on delete prototype.toString - 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T4.1 +description: > + Test based on delete prototype.toString - 5 arguments, (year, + month, date, hours, minutes) +includes: [$FAIL.js] +---*/ var x1 = new Date(1899, 11, 31, 23, 59); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -68,4 +71,3 @@ var x12 = new Date(2100, 0, 1, 0, 0); if (Object.prototype.toString.call(x12) !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.2.js index b7e2710e9d..c9f3ffb77f 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T4.2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T4.2.js - * @description Test based on overwriting prototype.toString - 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T4.2 +description: > + Test based on overwriting prototype.toString - 5 arguments, (year, + month, date, hours, minutes) +includes: [$FAIL.js] +---*/ Date.prototype.toString = Object.prototype.toString; @@ -70,4 +73,3 @@ var x12 = new Date(2100, 0, 1, 0, 0); if (x12.toString() !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.1.js index 7372fc8ee2..d9939d3af3 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T5.1.js - * @description 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T5.1 +description: 6 arguments, (year, month, date, hours, minutes, seconds) +includes: [$FAIL.js] +---*/ var x1 = new Date(1899, 11, 31, 23, 59, 59); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -68,4 +69,3 @@ var x12 = new Date(2100, 0, 1, 0, 0, 0); if (Object.prototype.toString.call(x12) !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.2.js index d5d0d16f4f..49bf00daa8 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T5.2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T5.2.js - * @description Test based on overwriting prototype.toString - 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T5.2 +description: > + Test based on overwriting prototype.toString - 6 arguments, (year, + month, date, hours, minutes, seconds) +includes: [$FAIL.js] +---*/ Date.prototype.toString = Object.prototype.toString; @@ -70,4 +73,3 @@ var x12 = new Date(2100, 0, 1, 0, 0, 0); if (x12.toString() !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.1.js index 16cf594796..f30517bf17 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T6.1.js - * @description 7 arguments, (year, month, date, hours, minutes, seconds, ms) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T6.1 +description: 7 arguments, (year, month, date, hours, minutes, seconds, ms) +includes: [$FAIL.js] +---*/ var x1 = new Date(1899, 11, 31, 23, 59, 59, 999); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -68,4 +69,3 @@ var x12 = new Date(2100, 0, 1, 0, 0, 0, 0); if (Object.prototype.toString.call(x12) !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.2.js index 40b9dd5b7f..47587a917a 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A3_T6.2.js @@ -1,13 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A3_T6.2.js - * @description Test based on overwriting prototype.toString - 7 arguments, (year, month, date, hours, minutes, seconds, ms) - */ +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.1_A3_T6.2 +description: > + Test based on overwriting prototype.toString - 7 arguments, (year, + month, date, hours, minutes, seconds, ms) +includes: [$FAIL.js] +---*/ Date.prototype.toString = Object.prototype.toString; @@ -70,4 +73,3 @@ var x12 = new Date(2100, 0, 1, 0, 0, 0, 0); if (x12.toString() !== "[object Date]") { $FAIL("#12: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T1.js index b99a996693..3beda94ff5 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T1.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date) - * 4. If hours is supplied use ToNumber(hours) - * 5. If minutes is supplied use ToNumber(minutes) - * 6. If seconds is supplied use ToNumber(seconds) - * 7. If ms is supplied use ToNumber(ms) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A4_T1.js - * @description 2 arguments, (year, month) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 1. Call ToNumber(year) + 2. Call ToNumber(month) + 3. If date is supplied use ToNumber(date) + 4. If hours is supplied use ToNumber(hours) + 5. If minutes is supplied use ToNumber(minutes) + 6. If seconds is supplied use ToNumber(seconds) + 7. If ms is supplied use ToNumber(ms) +es5id: 15.9.3.1_A4_T1 +description: 2 arguments, (year, month) +---*/ var myObj = function(val){ this.value = val; @@ -43,4 +43,3 @@ catch(e){ $ERROR("#2: The 2nd step is calling ToNumber(month)"); } } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T2.js index c711b38f4c..18fdb60a00 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T2.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date) - * 4. If hours is supplied use ToNumber(hours) - * 5. If minutes is supplied use ToNumber(minutes) - * 6. If seconds is supplied use ToNumber(seconds) - * 7. If ms is supplied use ToNumber(ms) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A4_T2.js - * @description 3 arguments, (year, month, date) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 1. Call ToNumber(year) + 2. Call ToNumber(month) + 3. If date is supplied use ToNumber(date) + 4. If hours is supplied use ToNumber(hours) + 5. If minutes is supplied use ToNumber(minutes) + 6. If seconds is supplied use ToNumber(seconds) + 7. If ms is supplied use ToNumber(ms) +es5id: 15.9.3.1_A4_T2 +description: 3 arguments, (year, month, date) +---*/ var myObj = function(val){ this.value = val; @@ -54,4 +54,3 @@ catch(e){ $ERROR("#3: The 3rd step is calling ToNumber(date)"); } } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T3.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T3.js index 4665dd2a40..e79920e667 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T3.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T3.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date) - * 4. If hours is supplied use ToNumber(hours) - * 5. If minutes is supplied use ToNumber(minutes) - * 6. If seconds is supplied use ToNumber(seconds) - * 7. If ms is supplied use ToNumber(ms) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A4_T3.js - * @description 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 1. Call ToNumber(year) + 2. Call ToNumber(month) + 3. If date is supplied use ToNumber(date) + 4. If hours is supplied use ToNumber(hours) + 5. If minutes is supplied use ToNumber(minutes) + 6. If seconds is supplied use ToNumber(seconds) + 7. If ms is supplied use ToNumber(ms) +es5id: 15.9.3.1_A4_T3 +description: 4 arguments, (year, month, date, hours) +---*/ var myObj = function(val){ this.value = val; @@ -65,4 +65,3 @@ catch(e){ $ERROR("#4: The 4th step is calling ToNumber(hours)"); } } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T4.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T4.js index f27c87a71b..7c2932568b 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T4.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T4.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date) - * 4. If hours is supplied use ToNumber(hours) - * 5. If minutes is supplied use ToNumber(minutes) - * 6. If seconds is supplied use ToNumber(seconds) - * 7. If ms is supplied use ToNumber(ms) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A4_T4.js - * @description 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 1. Call ToNumber(year) + 2. Call ToNumber(month) + 3. If date is supplied use ToNumber(date) + 4. If hours is supplied use ToNumber(hours) + 5. If minutes is supplied use ToNumber(minutes) + 6. If seconds is supplied use ToNumber(seconds) + 7. If ms is supplied use ToNumber(ms) +es5id: 15.9.3.1_A4_T4 +description: 5 arguments, (year, month, date, hours, minutes) +---*/ var myObj = function(val){ this.value = val; @@ -76,4 +76,3 @@ catch(e){ $ERROR("#5: The 5th step is calling ToNumber(minutes)"); } } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T5.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T5.js index fb538ce526..07b2c2b091 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T5.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T5.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date) - * 4. If hours is supplied use ToNumber(hours) - * 5. If minutes is supplied use ToNumber(minutes) - * 6. If seconds is supplied use ToNumber(seconds) - * 7. If ms is supplied use ToNumber(ms) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A4_T5.js - * @description 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 1. Call ToNumber(year) + 2. Call ToNumber(month) + 3. If date is supplied use ToNumber(date) + 4. If hours is supplied use ToNumber(hours) + 5. If minutes is supplied use ToNumber(minutes) + 6. If seconds is supplied use ToNumber(seconds) + 7. If ms is supplied use ToNumber(ms) +es5id: 15.9.3.1_A4_T5 +description: 6 arguments, (year, month, date, hours, minutes, seconds) +---*/ var myObj = function(val){ this.value = val; @@ -87,4 +87,3 @@ catch(e){ $ERROR("#6: The 6th step is calling ToNumber(seconds)"); } } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T6.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T6.js index 84586a1d15..81fc0f2118 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T6.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A4_T6.js @@ -1,20 +1,20 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 1. Call ToNumber(year) - * 2. Call ToNumber(month) - * 3. If date is supplied use ToNumber(date) - * 4. If hours is supplied use ToNumber(hours) - * 5. If minutes is supplied use ToNumber(minutes) - * 6. If seconds is supplied use ToNumber(seconds) - * 7. If ms is supplied use ToNumber(ms) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A4_T6.js - * @description 7 arguments, (year, month, date, hours, minutes, seconds, ms) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 1. Call ToNumber(year) + 2. Call ToNumber(month) + 3. If date is supplied use ToNumber(date) + 4. If hours is supplied use ToNumber(hours) + 5. If minutes is supplied use ToNumber(minutes) + 6. If seconds is supplied use ToNumber(seconds) + 7. If ms is supplied use ToNumber(ms) +es5id: 15.9.3.1_A4_T6 +description: 7 arguments, (year, month, date, hours, minutes, seconds, ms) +---*/ var myObj = function(val){ this.value = val; @@ -98,4 +98,3 @@ catch(e){ $ERROR("#7: The 7th step is calling ToNumber(ms)"); } } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T1.js index 6aafec22cc..8dc438f3a2 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T1.js @@ -1,71 +1,71 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to - * TimeClip(UTC(Result(11))) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A5_T1.js - * @description 2 arguments, (year, month) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + 9. Compute MakeDay(Result(8), Result(2), Result(3)) + 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + 11. Compute MakeDate(Result(9), Result(10)) + 12. Set the [[Value]] property of the newly constructed object to + TimeClip(UTC(Result(11))) +es5id: 15.9.3.1_A5_T1 +description: 2 arguments, (year, month) +includes: + - $FAIL.js + - environment.js + - numeric_conversion.js + - Date_constants.js + - Date_library.js +---*/ -$INCLUDE("environment.js"); -$INCLUDE("numeric_conversion.js"); -$INCLUDE("Date_constants.js"); -$INCLUDE("Date_library.js"); - if (-2211638400000 !== new Date(1899, 11).valueOf()) { $FAIL("#1: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1899, 12).valueOf()) { $FAIL("#2: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1900, 0).valueOf()) { $FAIL("#3: Incorrect value of Date"); -} - +} + if (-2649600000 !== new Date(1969, 11).valueOf()) { $FAIL("#4: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1969, 12).valueOf()) { $FAIL("#5: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1970, 0).valueOf()) { $FAIL("#6: Incorrect value of Date"); -} - +} + if (944035200000 !== new Date(1999, 11).valueOf()) { $FAIL("#7: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(1999, 12).valueOf()) { $FAIL("#8: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(2000, 0).valueOf()) { $FAIL("#9: Incorrect value of Date"); -} - +} + if (4099795200000 !== new Date(2099, 11).valueOf()) { $FAIL("#10: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2099, 12).valueOf()) { $FAIL("#11: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2100, 0).valueOf()) { $FAIL("#12: Incorrect value of Date"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T2.js index 34cf98bba2..81a1f8cd9b 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T2.js @@ -1,71 +1,71 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to - * TimeClip(UTC(Result(11))) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A5_T2.js - * @description 3 arguments, (year, month, date) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + 9. Compute MakeDay(Result(8), Result(2), Result(3)) + 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + 11. Compute MakeDate(Result(9), Result(10)) + 12. Set the [[Value]] property of the newly constructed object to + TimeClip(UTC(Result(11))) +es5id: 15.9.3.1_A5_T2 +description: 3 arguments, (year, month, date) +includes: + - $FAIL.js + - environment.js + - numeric_conversion.js + - Date_constants.js + - Date_library.js +---*/ -$INCLUDE("environment.js"); -$INCLUDE("numeric_conversion.js"); -$INCLUDE("Date_constants.js"); -$INCLUDE("Date_library.js"); - if (-2209046400000 !== new Date(1899, 11, 31).valueOf()) { $FAIL("#1: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1899, 12, 1).valueOf()) { $FAIL("#2: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1900, 0, 1).valueOf()) { $FAIL("#3: Incorrect value of Date"); -} - +} + if (-57600000 !== new Date(1969, 11, 31).valueOf()) { $FAIL("#4: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1969, 12, 1).valueOf()) { $FAIL("#5: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1970, 0, 1).valueOf()) { $FAIL("#6: Incorrect value of Date"); -} - +} + if (946627200000 !== new Date(1999, 11, 31).valueOf()) { $FAIL("#7: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(1999, 12, 1).valueOf()) { $FAIL("#8: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(2000, 0, 1).valueOf()) { $FAIL("#9: Incorrect value of Date"); -} - +} + if (4102387200000 !== new Date(2099, 11, 31).valueOf()) { $FAIL("#10: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2099, 12, 1).valueOf()) { $FAIL("#11: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2100, 0, 1).valueOf()) { $FAIL("#12: Incorrect value of Date"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T3.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T3.js index fdb6387b40..70bad4bd82 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T3.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T3.js @@ -1,71 +1,71 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to - * TimeClip(UTC(Result(11))) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A5_T3.js - * @description 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + 9. Compute MakeDay(Result(8), Result(2), Result(3)) + 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + 11. Compute MakeDate(Result(9), Result(10)) + 12. Set the [[Value]] property of the newly constructed object to + TimeClip(UTC(Result(11))) +es5id: 15.9.3.1_A5_T3 +description: 4 arguments, (year, month, date, hours) +includes: + - $FAIL.js + - environment.js + - numeric_conversion.js + - Date_constants.js + - Date_library.js +---*/ -$INCLUDE("environment.js"); -$INCLUDE("numeric_conversion.js"); -$INCLUDE("Date_constants.js"); -$INCLUDE("Date_library.js"); - if (-2208963600000 !== new Date(1899, 11, 31, 23).valueOf()) { $FAIL("#1: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1899, 12, 1, 0).valueOf()) { $FAIL("#2: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1900, 0, 1, 0).valueOf()) { $FAIL("#3: Incorrect value of Date"); -} - +} + if (25200000 !== new Date(1969, 11, 31, 23).valueOf()) { $FAIL("#4: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1969, 12, 1, 0).valueOf()) { $FAIL("#5: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1970, 0, 1, 0).valueOf()) { $FAIL("#6: Incorrect value of Date"); -} - +} + if (946710000000 !== new Date(1999, 11, 31, 23).valueOf()) { $FAIL("#7: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(1999, 12, 1, 0).valueOf()) { $FAIL("#8: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(2000, 0, 1, 0).valueOf()) { $FAIL("#9: Incorrect value of Date"); -} - +} + if (4102470000000 !== new Date(2099, 11, 31, 23).valueOf()) { $FAIL("#10: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2099, 12, 1, 0).valueOf()) { $FAIL("#11: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2100, 0, 1, 0).valueOf()) { $FAIL("#12: Incorrect value of Date"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T4.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T4.js index 296ec5d8a0..542d9cdba0 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T4.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T4.js @@ -1,71 +1,71 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to - * TimeClip(UTC(Result(11))) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A5_T4.js - * @description 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + 9. Compute MakeDay(Result(8), Result(2), Result(3)) + 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + 11. Compute MakeDate(Result(9), Result(10)) + 12. Set the [[Value]] property of the newly constructed object to + TimeClip(UTC(Result(11))) +es5id: 15.9.3.1_A5_T4 +description: 5 arguments, (year, month, date, hours, minutes) +includes: + - $FAIL.js + - environment.js + - numeric_conversion.js + - Date_constants.js + - Date_library.js +---*/ -$INCLUDE("environment.js"); -$INCLUDE("numeric_conversion.js"); -$INCLUDE("Date_constants.js"); -$INCLUDE("Date_library.js"); - if (-2208960060000 !== new Date(1899, 11, 31, 23, 59).valueOf()) { $FAIL("#1: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1899, 12, 1, 0, 0).valueOf()) { $FAIL("#2: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1900, 0, 1, 0, 0).valueOf()) { $FAIL("#3: Incorrect value of Date"); -} - +} + if (28740000 !== new Date(1969, 11, 31, 23, 59).valueOf()) { $FAIL("#4: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1969, 12, 1, 0, 0).valueOf()) { $FAIL("#5: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1970, 0, 1, 0, 0).valueOf()) { $FAIL("#6: Incorrect value of Date"); -} - +} + if (946713540000 !== new Date(1999, 11, 31, 23, 59).valueOf()) { $FAIL("#7: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(1999, 12, 1, 0, 0).valueOf()) { $FAIL("#8: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(2000, 0, 1, 0, 0).valueOf()) { $FAIL("#9: Incorrect value of Date"); -} - +} + if (4102473540000 !== new Date(2099, 11, 31, 23, 59).valueOf()) { $FAIL("#10: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2099, 12, 1, 0, 0).valueOf()) { $FAIL("#11: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2100, 0, 1, 0, 0).valueOf()) { $FAIL("#12: Incorrect value of Date"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T5.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T5.js index b6f5794592..49afa28eb6 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T5.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T5.js @@ -1,71 +1,71 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to - * TimeClip(UTC(Result(11))) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A5_T5.js - * @description 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + 9. Compute MakeDay(Result(8), Result(2), Result(3)) + 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + 11. Compute MakeDate(Result(9), Result(10)) + 12. Set the [[Value]] property of the newly constructed object to + TimeClip(UTC(Result(11))) +es5id: 15.9.3.1_A5_T5 +description: 6 arguments, (year, month, date, hours, minutes, seconds) +includes: + - $FAIL.js + - environment.js + - numeric_conversion.js + - Date_constants.js + - Date_library.js +---*/ -$INCLUDE("environment.js"); -$INCLUDE("numeric_conversion.js"); -$INCLUDE("Date_constants.js"); -$INCLUDE("Date_library.js"); - if (-2208960001000 !== new Date(1899, 11, 31, 23, 59, 59).valueOf()) { $FAIL("#1: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1899, 12, 1, 0, 0, 0).valueOf()) { $FAIL("#2: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1900, 0, 1, 0, 0, 0).valueOf()) { $FAIL("#3: Incorrect value of Date"); -} - +} + if (28799000 !== new Date(1969, 11, 31, 23, 59, 59).valueOf()) { $FAIL("#4: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1969, 12, 1, 0, 0, 0).valueOf()) { $FAIL("#5: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1970, 0, 1, 0, 0, 0).valueOf()) { $FAIL("#6: Incorrect value of Date"); -} - +} + if (946713599000 !== new Date(1999, 11, 31, 23, 59, 59).valueOf()) { $FAIL("#7: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(1999, 12, 1, 0, 0, 0).valueOf()) { $FAIL("#8: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(2000, 0, 1, 0, 0, 0).valueOf()) { $FAIL("#9: Incorrect value of Date"); -} - +} + if (4102473599000 !== new Date(2099, 11, 31, 23, 59, 59).valueOf()) { $FAIL("#10: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2099, 12, 1, 0, 0, 0).valueOf()) { $FAIL("#11: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2100, 0, 1, 0, 0, 0).valueOf()) { $FAIL("#12: Incorrect value of Date"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T6.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T6.js index adfb0465c9..cdfc38245d 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T6.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T6.js @@ -1,71 +1,71 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * is set by following steps: - * 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is - * 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) - * 9. Compute MakeDay(Result(8), Result(2), Result(3)) - * 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) - * 11. Compute MakeDate(Result(9), Result(10)) - * 12. Set the [[Value]] property of the newly constructed object to - * TimeClip(UTC(Result(11))) - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A5_T6.js - * @description 7 arguments, (year, month, date, hours, minutes, seconds, ms) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + is set by following steps: + 8. If Result(1) is not NaN and 0 <= ToInteger(Result(1)) <= 99, Result(8) is + 1900+ToInteger(Result(1)); otherwise, Result(8) is Result(1) + 9. Compute MakeDay(Result(8), Result(2), Result(3)) + 10. Compute MakeTime(Result(4), Result(5), Result(6), Result(7)) + 11. Compute MakeDate(Result(9), Result(10)) + 12. Set the [[Value]] property of the newly constructed object to + TimeClip(UTC(Result(11))) +es5id: 15.9.3.1_A5_T6 +description: 7 arguments, (year, month, date, hours, minutes, seconds, ms) +includes: + - $FAIL.js + - environment.js + - numeric_conversion.js + - Date_constants.js + - Date_library.js +---*/ -$INCLUDE("environment.js"); -$INCLUDE("numeric_conversion.js"); -$INCLUDE("Date_constants.js"); -$INCLUDE("Date_library.js"); - if (-2208960000001 !== new Date(1899, 11, 31, 23, 59, 59, 999).valueOf()) { $FAIL("#1: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1899, 12, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#2: Incorrect value of Date"); -} - +} + if (-2208960000000 !== new Date(1900, 0, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#3: Incorrect value of Date"); -} - +} + if (28799999 !== new Date(1969, 11, 31, 23, 59, 59, 999).valueOf()) { $FAIL("#4: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1969, 12, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#5: Incorrect value of Date"); -} - +} + if (28800000 !== new Date(1970, 0, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#6: Incorrect value of Date"); -} - +} + if (946713599999 !== new Date(1999, 11, 31, 23, 59, 59, 999).valueOf()) { $FAIL("#7: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(1999, 12, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#8: Incorrect value of Date"); -} - +} + if (946713600000 !== new Date(2000, 0, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#9: Incorrect value of Date"); -} - +} + if (4102473599999 !== new Date(2099, 11, 31, 23, 59, 59, 999).valueOf()) { $FAIL("#10: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2099, 12, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#11: Incorrect value of Date"); -} - +} + if (4102473600000 !== new Date(2100, 0, 1, 0, 0, 0, 0).valueOf()) { $FAIL("#12: Incorrect value of Date"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T1.js index 887cd4e899..9aad96596e 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T1.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * with supplied "undefined" argument should be NaN - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A6_T1.js - * @description 2 arguments, (year, month) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + with supplied "undefined" argument should be NaN +es5id: 15.9.3.1_A6_T1 +description: 2 arguments, (year, month) +includes: [$FAIL.js] +---*/ function DateValue(year, month, date, hours, minutes, seconds, ms){ return new Date(year, month, date, hours, minutes, seconds, ms).valueOf(); @@ -60,4 +61,3 @@ if (!isNaN(DateValue(2099, 12))) { if (!isNaN(DateValue(2100, 0))) { $FAIL("#12: The value should be NaN"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T2.js index 3c3ff0cd41..80edd4d62f 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T2.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * with supplied "undefined" argument should be NaN - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A6_T2.js - * @description 3 arguments, (year, month, date) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + with supplied "undefined" argument should be NaN +es5id: 15.9.3.1_A6_T2 +description: 3 arguments, (year, month, date) +includes: [$FAIL.js] +---*/ function DateValue(year, month, date, hours, minutes, seconds, ms){ return new Date(year, month, date, hours, minutes, seconds, ms).valueOf(); @@ -60,4 +61,3 @@ if (!isNaN(DateValue(2099, 12, 1))) { if (!isNaN(DateValue(2100, 0, 1))) { $FAIL("#12: The value should be NaN"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T3.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T3.js index 311fca2fcc..15a9b15997 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T3.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T3.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * with supplied "undefined" argument should be NaN - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A6_T3.js - * @description 4 arguments, (year, month, date, hours) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + with supplied "undefined" argument should be NaN +es5id: 15.9.3.1_A6_T3 +description: 4 arguments, (year, month, date, hours) +includes: [$FAIL.js] +---*/ function DateValue(year, month, date, hours, minutes, seconds, ms){ return new Date(year, month, date, hours, minutes, seconds, ms).valueOf(); @@ -60,4 +61,3 @@ if (!isNaN(DateValue(2099, 12, 1, 0))) { if (!isNaN(DateValue(2100, 0, 1, 0))) { $FAIL("#12: The value should be NaN"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T4.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T4.js index 44a2357430..14c8137a55 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T4.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T4.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * with supplied "undefined" argument should be NaN - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A6_T4.js - * @description 5 arguments, (year, month, date, hours, minutes) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + with supplied "undefined" argument should be NaN +es5id: 15.9.3.1_A6_T4 +description: 5 arguments, (year, month, date, hours, minutes) +includes: [$FAIL.js] +---*/ function DateValue(year, month, date, hours, minutes, seconds, ms){ return new Date(year, month, date, hours, minutes, seconds, ms).valueOf(); @@ -60,4 +61,3 @@ if (!isNaN(DateValue(2099, 12, 1, 0, 0))) { if (!isNaN(DateValue(2100, 0, 1, 0, 0))) { $FAIL("#12: The value should be NaN"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T5.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T5.js index d22d80aeab..d55d179c37 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T5.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A6_T5.js @@ -1,13 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Value]] property of the newly constructed object - * with supplied "undefined" argument should be NaN - * - * @path ch15/15.9/15.9.3/S15.9.3.1_A6_T5.js - * @description 6 arguments, (year, month, date, hours, minutes, seconds) - */ +/*--- +info: > + The [[Value]] property of the newly constructed object + with supplied "undefined" argument should be NaN +es5id: 15.9.3.1_A6_T5 +description: 6 arguments, (year, month, date, hours, minutes, seconds) +includes: [$FAIL.js] +---*/ function DateValue(year, month, date, hours, minutes, seconds, ms){ return new Date(year, month, date, hours, minutes, seconds, ms).valueOf(); @@ -60,4 +61,3 @@ if (!isNaN(DateValue(2099, 12, 1, 0, 0, 0))) { if (!isNaN(DateValue(2100, 0, 1, 0, 0, 0))) { $FAIL("#12: The value should be NaN"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A1_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A1_T1.js index b0d9d93f7f..5c0e1e1463 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A1_T1.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * When Date is called as part of a new expression it is - * a constructor: it initialises the newly created object - * - * @path ch15/15.9/15.9.3/S15.9.3.2_A1_T1.js - * @description Checking types of newly created objects and it values - */ +/*--- +info: > + When Date is called as part of a new expression it is + a constructor: it initialises the newly created object +es5id: 15.9.3.2_A1_T1 +description: Checking types of newly created objects and it values +includes: + - $FAIL.js + - Date_constants.js +---*/ -$INCLUDE("Date_constants.js"); - if (typeof new Date(date_1899_end) !== "object") { $FAIL("#1.1: typeof new Date(date_1899_end) === 'object'"); } @@ -154,4 +155,3 @@ var x84 = new Date(date_2100_start); if(x84 === undefined){ $FAIL("#8.4: new Date(date_2100_start) !== undefined"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A2_T1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A2_T1.js index 588612961c..458bacabc5 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A2_T1.js @@ -1,16 +1,17 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Prototype]] property of the newly constructed object - * is set to the original Date prototype object, the one that is the - * initial value of Date.prototype - * - * @path ch15/15.9/15.9.3/S15.9.3.2_A2_T1.js - * @description Checking Date.prototype property of newly constructed objects - */ - -$INCLUDE("Date_constants.js"); +/*--- +info: > + The [[Prototype]] property of the newly constructed object + is set to the original Date prototype object, the one that is the + initial value of Date.prototype +es5id: 15.9.3.2_A2_T1 +description: Checking Date.prototype property of newly constructed objects +includes: + - $FAIL.js + - Date_constants.js +---*/ var x11 = new Date(date_1899_end); if (typeof x11.constructor.prototype !== "object") { @@ -131,4 +132,3 @@ var x83 = new Date(date_2100_start); if(Date.prototype !== x83.constructor.prototype){ $FAIL("#8.3: Date.prototype !== x83.constructor.prototype"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.1.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.1.js index d95df27027..a3b61e44cd 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.1.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.1.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.2_A3_T1.1.js - * @description Test based on delete prototype.toString - */ - -$INCLUDE("Date_constants.js"); +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.2_A3_T1.1 +description: Test based on delete prototype.toString +includes: + - $FAIL.js + - Date_constants.js +---*/ var x1 = new Date(date_1899_end); if (Object.prototype.toString.call(x1) !== "[object Date]") { @@ -50,4 +51,3 @@ var x8 = new Date(date_2100_start); if (Object.prototype.toString.call(x8) !== "[object Date]") { $FAIL("#8: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.2.js b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.2.js index 824bd006a0..171719b003 100644 --- a/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.2.js +++ b/test/suite/ch15/15.9/15.9.3/S15.9.3.2_A3_T1.2.js @@ -1,15 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The [[Class]] property of the newly constructed object - * is set to "Date" - * - * @path ch15/15.9/15.9.3/S15.9.3.2_A3_T1.2.js - * @description Test based on overwriting prototype.toString - */ - -$INCLUDE("Date_constants.js"); +/*--- +info: > + The [[Class]] property of the newly constructed object + is set to "Date" +es5id: 15.9.3.2_A3_T1.2 +description: Test based on overwriting prototype.toString +includes: + - $FAIL.js + - Date_constants.js +---*/ Date.prototype.toString = Object.prototype.toString; @@ -52,4 +53,3 @@ var x8 = new Date(date_2100_start); if (x8.toString() !== "[object Date]") { $FAIL("#8: The [[Class]] property of the newly constructed object is set to 'Date'"); } - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T1.js index 6d357cc4b7..70304c2674 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } + attributes +es5id: 15.9.4.1_A1_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype; Date.prototype = 1; if (Date.prototype !== x) { $ERROR('#1: The Date.prototype has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T2.js b/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T2.js index 5885ccfade..34b4507b1a 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } + attributes +es5id: 15.9.4.1_A1_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype !== false) { $ERROR('#1: The Date.prototype property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype !== false) { if (!Date.hasOwnProperty('prototype')) { $FAIL('#2: The Date.prototype property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T3.js b/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T3.js index 980aa32512..df80775d57 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.1/S15.9.4.1_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date property "prototype" has { DontEnum, DontDelete, ReadOnly } + attributes +es5id: 15.9.4.1_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.propertyIsEnumerable('prototype')) { $ERROR('#1: The Date.prototype property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date) { $ERROR('#2: The Date.prototype has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T1.js index 2fb4afce99..46addf72db 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "parse" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date property "parse" has { DontEnum } attributes +es5id: 15.9.4.2_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.parse; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.parse === x) { $ERROR('#1: The Date.parse has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T2.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T2.js index c3cac9de87..a6dae5286c 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "parse" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date property "parse" has { DontEnum } attributes +es5id: 15.9.4.2_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.parse === false) { $ERROR('#1: The Date.parse property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.parse === false) { if (Date.hasOwnProperty('parse')) { $FAIL('#2: The Date.parse property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T3.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T3.js index a0386541bd..3f2c15d4fd 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "parse" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date property "parse" has { DontEnum } attributes +es5id: 15.9.4.2_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.propertyIsEnumerable('parse')) { $ERROR('#1: The Date.parse property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date) { $ERROR('#2: The Date.parse has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A2_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A2_T1.js index 579c1ecd6b..05e742a3ea 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "parse" is 1 - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A2_T1.js - * @description The "length" property of the "parse" is 1 - */ +/*--- +info: The "length" property of the "parse" is 1 +es5id: 15.9.4.2_A2_T1 +description: The "length" property of the "parse" is 1 +---*/ if(Date.parse.hasOwnProperty("length") !== true){ $ERROR('#1: The parse has a "length" property'); @@ -15,5 +14,3 @@ if(Date.parse.hasOwnProperty("length") !== true){ if(Date.parse.length !== 1){ $ERROR('#2: The "length" property of the parse is 1'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T1.js index e802350b42..e6cfebdc98 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } + attributes +es5id: 15.9.4.2_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.parse.length; Date.parse.length = 1; if (Date.parse.length !== x) { $ERROR('#1: The Date.parse.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T2.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T2.js index a613528aa0..8dbbaa064c 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } + attributes +es5id: 15.9.4.2_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.parse.length !== false) { $ERROR('#1: The Date.parse.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.parse.length !== false) { if (!Date.parse.hasOwnProperty('length')) { $FAIL('#2: The Date.parse.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T3.js b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T3.js index 13b9cc0adf..f2798fab4a 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.parse property "length" has { ReadOnly, DontDelete, DontEnum } + attributes +es5id: 15.9.4.2_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.parse.propertyIsEnumerable('length')) { $ERROR('#1: The Date.parse.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.parse) { $ERROR('#2: The Date.parse.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T1.js index 6df1fbc65e..d41b70efdf 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "UTC" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date property "UTC" has { DontEnum } attributes +es5id: 15.9.4.3_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.UTC; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.UTC === x) { $ERROR('#1: The Date.UTC has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T2.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T2.js index f4214ab90f..3775283b1f 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "UTC" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date property "UTC" has { DontEnum } attributes +es5id: 15.9.4.3_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.UTC === false) { $ERROR('#1: The Date.UTC property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.UTC === false) { if (Date.hasOwnProperty('UTC')) { $FAIL('#2: The Date.UTC property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T3.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T3.js index cad9d23d17..2c4c811c67 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date property "UTC" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date property "UTC" has { DontEnum } attributes +es5id: 15.9.4.3_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.propertyIsEnumerable('UTC')) { $ERROR('#1: The Date.UTC property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date) { $ERROR('#2: The Date.UTC has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A2_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A2_T1.js index 5e99089e54..6d15d61d88 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "UTC" is 7 - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A2_T1.js - * @description The "length" property of the "UTC" is 7 - */ +/*--- +info: The "length" property of the "UTC" is 7 +es5id: 15.9.4.3_A2_T1 +description: The "length" property of the "UTC" is 7 +---*/ if(Date.UTC.hasOwnProperty("length") !== true){ $ERROR('#1: The UTC has a "length" property'); @@ -15,5 +14,3 @@ if(Date.UTC.hasOwnProperty("length") !== true){ if(Date.UTC.length !== 7){ $ERROR('#2: The "length" property of the UTC is 7'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T1.js index 9935b2f352..b8221b6b41 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } + attributes +es5id: 15.9.4.3_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.UTC.length; Date.UTC.length = 1; if (Date.UTC.length !== x) { $ERROR('#1: The Date.UTC.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T2.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T2.js index 725626ab33..45096a18b3 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } + attributes +es5id: 15.9.4.3_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.UTC.length !== false) { $ERROR('#1: The Date.UTC.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.UTC.length !== false) { if (!Date.UTC.hasOwnProperty('length')) { $FAIL('#2: The Date.UTC.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T3.js b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T3.js index 8eb62a943b..7f0c0d3cdf 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.UTC property "length" has { ReadOnly, DontDelete, DontEnum } + attributes +es5id: 15.9.4.3_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.UTC.propertyIsEnumerable('length')) { $ERROR('#1: The Date.UTC.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.UTC) { $ERROR('#2: The Date.UTC.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js index c336c2c8f5..7c21c77240 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js - * @description Date.now must exist as a function - */ - - -function testcase() { - return typeof Date.now === "function"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.4.4-0-1 +description: Date.now must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + return typeof Date.now === "function"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js index c20ca6e6e6..08cacb91e8 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js - * @description Date.now must exist as a function taking 0 parameters - */ - - -function testcase() { - return Date.now.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.4.4-0-2 +description: Date.now must exist as a function taking 0 parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + return Date.now.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-3.js b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-3.js index 24408d2934..b8931533b9 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-3.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-3.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-3.js - * @description Date.now must exist as a function - */ - - -function testcase() { - - var fun = Date.now; - return (typeof (fun) === "function"); - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.4.4-0-3 +description: Date.now must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + + var fun = Date.now; + return (typeof (fun) === "function"); + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-4.js b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-4.js index b3e3816287..2f69c7820b 100644 --- a/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-4.js +++ b/test/suite/ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-4.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-4.js - * @description Date.now - returns number - */ - - -function testcase() { - return typeof Date.now() === "number"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.4.4-0-4 +description: Date.now - returns number +includes: [runTestCase.js] +---*/ + +function testcase() { + return typeof Date.now() === "number"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.4/S15.9.4_A1.js b/test/suite/ch15/15.9/15.9.4/S15.9.4_A1.js index 0136767f72..ba79826fef 100644 --- a/test/suite/ch15/15.9/15.9.4/S15.9.4_A1.js +++ b/test/suite/ch15/15.9/15.9.4/S15.9.4_A1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date constructor has the property "prototype" - * - * @path ch15/15.9/15.9.4/S15.9.4_A1.js - * @description Checking existence of the property "prototype" - */ +/*--- +info: The Date constructor has the property "prototype" +es5id: 15.9.4_A1 +description: Checking existence of the property "prototype" +---*/ if(!Date.hasOwnProperty("prototype")){ $ERROR('#1: The Date constructor has the property "prototype"'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/S15.9.4_A2.js b/test/suite/ch15/15.9/15.9.4/S15.9.4_A2.js index 6fdd2de7fc..9aa35d5fe1 100644 --- a/test/suite/ch15/15.9/15.9.4/S15.9.4_A2.js +++ b/test/suite/ch15/15.9/15.9.4/S15.9.4_A2.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date constructor has the property "parse" - * - * @path ch15/15.9/15.9.4/S15.9.4_A2.js - * @description Checking existence of the property "parse" - */ +/*--- +info: The Date constructor has the property "parse" +es5id: 15.9.4_A2 +description: Checking existence of the property "parse" +---*/ if(!Date.hasOwnProperty("parse")){ $ERROR('#1: The Date constructor has the property "parse"'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/S15.9.4_A3.js b/test/suite/ch15/15.9/15.9.4/S15.9.4_A3.js index 6dd7de3f75..2c2f766570 100644 --- a/test/suite/ch15/15.9/15.9.4/S15.9.4_A3.js +++ b/test/suite/ch15/15.9/15.9.4/S15.9.4_A3.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date constructor has the property "UTC" - * - * @path ch15/15.9/15.9.4/S15.9.4_A3.js - * @description Checking existence of the property "UTC" - */ +/*--- +info: The Date constructor has the property "UTC" +es5id: 15.9.4_A3 +description: Checking existence of the property "UTC" +---*/ if(!Date.hasOwnProperty("UTC")){ $ERROR('#1: The Date constructor has the property "UTC"'); } - - diff --git a/test/suite/ch15/15.9/15.9.4/S15.9.4_A4.js b/test/suite/ch15/15.9/15.9.4/S15.9.4_A4.js index 127edb03be..0967551251 100644 --- a/test/suite/ch15/15.9/15.9.4/S15.9.4_A4.js +++ b/test/suite/ch15/15.9/15.9.4/S15.9.4_A4.js @@ -1,16 +1,15 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The value of the internal [[Prototype]] property of the Date - * constructor is the Function prototype object - * - * @path ch15/15.9/15.9.4/S15.9.4_A4.js - * @description Checking Function.prototype.isPrototypeOf(Date) - */ +/*--- +info: > + The value of the internal [[Prototype]] property of the Date + constructor is the Function prototype object +es5id: 15.9.4_A4 +description: Checking Function.prototype.isPrototypeOf(Date) +---*/ //CHECK#1 if (!(Function.prototype.isPrototypeOf(Date))) { $ERROR('#1: the value of the internal [[Prototype]] property of the Date constructor is the Function prototype object.'); } - diff --git a/test/suite/ch15/15.9/15.9.4/S15.9.4_A5.js b/test/suite/ch15/15.9/15.9.4/S15.9.4_A5.js index 13520bfbfb..c274d0c5d1 100644 --- a/test/suite/ch15/15.9/15.9.4/S15.9.4_A5.js +++ b/test/suite/ch15/15.9/15.9.4/S15.9.4_A5.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Date constructor has length property whose value is 7 - * - * @path ch15/15.9/15.9.4/S15.9.4_A5.js - * @description Checking Date.length property - */ +/*--- +info: Date constructor has length property whose value is 7 +es5id: 15.9.4_A5 +description: Checking Date.length property +---*/ //CHECK#1 if (!Date.hasOwnProperty("length")){ @@ -17,4 +16,3 @@ if (!Date.hasOwnProperty("length")){ if (Date.length !== 7) { $ERROR('#2: Date constructor length property value should be 7'); } - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T1.js index 85d98138f2..5d2cffc322 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "constructor" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "constructor" has { DontEnum } attributes +es5id: 15.9.5.1_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.constructor; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.constructor === x) { $ERROR('#1: The Date.prototype.constructor has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T2.js index 700e781729..313f004648 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "constructor" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "constructor" has { DontEnum } attributes +es5id: 15.9.5.1_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.constructor === false) { $ERROR('#1: The Date.prototype.constructor property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.constructor === false) { if (Date.prototype.hasOwnProperty('constructor')) { $FAIL('#2: The Date.prototype.constructor property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T3.js index 311bcec9f1..96de6b5488 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "constructor" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "constructor" has { DontEnum } attributes +es5id: 15.9.5.1_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('constructor')) { $ERROR('#1: The Date.prototype.constructor property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.constructor has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A2_T1.js index cc19d71232..e4331c5117 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "constructor" is 7 - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A2_T1.js - * @description The "length" property of the "constructor" is 7 - */ +/*--- +info: The "length" property of the "constructor" is 7 +es5id: 15.9.5.1_A2_T1 +description: The "length" property of the "constructor" is 7 +---*/ if(Date.prototype.constructor.hasOwnProperty("length") !== true){ $ERROR('#1: The constructor has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.constructor.hasOwnProperty("length") !== true){ if(Date.prototype.constructor.length !== 7){ $ERROR('#2: The "length" property of the constructor is 7'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T1.js index d7d46b0f8a..0c70910f56 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.constructor property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.constructor property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.1_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.constructor.length; Date.prototype.constructor.length = 1; if (Date.prototype.constructor.length !== x) { $ERROR('#1: The Date.prototype.constructor.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T2.js index 3da0dba903..706cc63bbe 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.constructor property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.constructor property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.1_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.constructor.length !== false) { $ERROR('#1: The Date.prototype.constructor.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.constructor.length !== false) { if (!Date.prototype.constructor.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.constructor.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T3.js index 849b58b016..02cb90609a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.constructor property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.constructor property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.1_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.constructor.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.constructor.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.constructor) { $ERROR('#2: The Date.prototype.constructor.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T1.js index 32dcb04fde..bbd9c7c9e7 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getFullYear" has { DontEnum } attributes +es5id: 15.9.5.10_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getFullYear; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getFullYear === x) { $ERROR('#1: The Date.prototype.getFullYear has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T2.js index 48ac01fa07..0624b7978a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getFullYear" has { DontEnum } attributes +es5id: 15.9.5.10_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getFullYear === false) { $ERROR('#1: The Date.prototype.getFullYear property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getFullYear === false) { if (Date.prototype.hasOwnProperty('getFullYear')) { $FAIL('#2: The Date.prototype.getFullYear property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T3.js index e89854f719..d981fb80b0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getFullYear" has { DontEnum } attributes +es5id: 15.9.5.10_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getFullYear')) { $ERROR('#1: The Date.prototype.getFullYear property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getFullYear has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A2_T1.js index 935f21c0fb..0ea54d3cfe 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getFullYear" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A2_T1.js - * @description The "length" property of the "getFullYear" is 0 - */ +/*--- +info: The "length" property of the "getFullYear" is 0 +es5id: 15.9.5.10_A2_T1 +description: The "length" property of the "getFullYear" is 0 +---*/ if(Date.prototype.getFullYear.hasOwnProperty("length") !== true){ $ERROR('#1: The getFullYear has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getFullYear.hasOwnProperty("length") !== true){ if(Date.prototype.getFullYear.length !== 0){ $ERROR('#2: The "length" property of the getFullYear is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T1.js index 61ea3058fa..7dd432d1f3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.10_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getFullYear.length; Date.prototype.getFullYear.length = 1; if (Date.prototype.getFullYear.length !== x) { $ERROR('#1: The Date.prototype.getFullYear.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T2.js index f038c67f36..bc879d78a2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.10_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getFullYear.length !== false) { $ERROR('#1: The Date.prototype.getFullYear.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getFullYear.length !== false) { if (!Date.prototype.getFullYear.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getFullYear.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T3.js index e15219d55f..25a64b6f22 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.10_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getFullYear.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getFullYear.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getFullYear) { $ERROR('#2: The Date.prototype.getFullYear.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T1.js index 77c3065019..516f95e997 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCFullYear" has { DontEnum } attributes +es5id: 15.9.5.11_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCFullYear; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCFullYear === x) { $ERROR('#1: The Date.prototype.getUTCFullYear has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T2.js index 7f9bb3ca82..28dc28cbb9 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCFullYear" has { DontEnum } attributes +es5id: 15.9.5.11_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCFullYear === false) { $ERROR('#1: The Date.prototype.getUTCFullYear property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCFullYear === false) { if (Date.prototype.hasOwnProperty('getUTCFullYear')) { $FAIL('#2: The Date.prototype.getUTCFullYear property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T3.js index 8641b5bd27..dbd5062c74 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCFullYear" has { DontEnum } attributes +es5id: 15.9.5.11_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCFullYear')) { $ERROR('#1: The Date.prototype.getUTCFullYear property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCFullYear has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A2_T1.js index 41624187ca..e300d99519 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCFullYear" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A2_T1.js - * @description The "length" property of the "getUTCFullYear" is 0 - */ +/*--- +info: The "length" property of the "getUTCFullYear" is 0 +es5id: 15.9.5.11_A2_T1 +description: The "length" property of the "getUTCFullYear" is 0 +---*/ if(Date.prototype.getUTCFullYear.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCFullYear has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCFullYear.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCFullYear.length !== 0){ $ERROR('#2: The "length" property of the getUTCFullYear is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T1.js index 0139980c59..613d2c4731 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.11_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCFullYear.length; Date.prototype.getUTCFullYear.length = 1; if (Date.prototype.getUTCFullYear.length !== x) { $ERROR('#1: The Date.prototype.getUTCFullYear.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T2.js index 760684fcc2..adc02e921c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.11_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCFullYear.length !== false) { $ERROR('#1: The Date.prototype.getUTCFullYear.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCFullYear.length !== false) { if (!Date.prototype.getUTCFullYear.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCFullYear.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T3.js index 92c3a7b0d3..112d3139e1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.11_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCFullYear.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCFullYear.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCFullYear) { $ERROR('#2: The Date.prototype.getUTCFullYear.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T1.js index 556b8408a1..53bb0632d0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getMonth" has { DontEnum } attributes +es5id: 15.9.5.12_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getMonth; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getMonth === x) { $ERROR('#1: The Date.prototype.getMonth has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T2.js index 3c10eae2eb..554e0eac06 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getMonth" has { DontEnum } attributes +es5id: 15.9.5.12_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getMonth === false) { $ERROR('#1: The Date.prototype.getMonth property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getMonth === false) { if (Date.prototype.hasOwnProperty('getMonth')) { $FAIL('#2: The Date.prototype.getMonth property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T3.js index c69df97930..46a94382fb 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getMonth" has { DontEnum } attributes +es5id: 15.9.5.12_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getMonth')) { $ERROR('#1: The Date.prototype.getMonth property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getMonth has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A2_T1.js index 47ed855ed7..c83089c17e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getMonth" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A2_T1.js - * @description The "length" property of the "getMonth" is 0 - */ +/*--- +info: The "length" property of the "getMonth" is 0 +es5id: 15.9.5.12_A2_T1 +description: The "length" property of the "getMonth" is 0 +---*/ if(Date.prototype.getMonth.hasOwnProperty("length") !== true){ $ERROR('#1: The getMonth has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getMonth.hasOwnProperty("length") !== true){ if(Date.prototype.getMonth.length !== 0){ $ERROR('#2: The "length" property of the getMonth is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T1.js index bf5bf66f73..2b73c282f8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getMonth property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.12_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getMonth.length; Date.prototype.getMonth.length = 1; if (Date.prototype.getMonth.length !== x) { $ERROR('#1: The Date.prototype.getMonth.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T2.js index d555488ece..c463f05257 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getMonth property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.12_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getMonth.length !== false) { $ERROR('#1: The Date.prototype.getMonth.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getMonth.length !== false) { if (!Date.prototype.getMonth.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getMonth.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T3.js index e19077e23b..241d6da436 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getMonth property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.12_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getMonth.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getMonth.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getMonth) { $ERROR('#2: The Date.prototype.getMonth.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T1.js index 7b52ba2de8..5d38f1346d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCMonth" has { DontEnum } attributes +es5id: 15.9.5.13_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCMonth; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCMonth === x) { $ERROR('#1: The Date.prototype.getUTCMonth has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T2.js index e744f8df6f..5d0995120e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCMonth" has { DontEnum } attributes +es5id: 15.9.5.13_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCMonth === false) { $ERROR('#1: The Date.prototype.getUTCMonth property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCMonth === false) { if (Date.prototype.hasOwnProperty('getUTCMonth')) { $FAIL('#2: The Date.prototype.getUTCMonth property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T3.js index c09e96f416..36e93f9100 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCMonth" has { DontEnum } attributes +es5id: 15.9.5.13_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCMonth')) { $ERROR('#1: The Date.prototype.getUTCMonth property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCMonth has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A2_T1.js index 9d604be79a..6a223759ff 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCMonth" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A2_T1.js - * @description The "length" property of the "getUTCMonth" is 0 - */ +/*--- +info: The "length" property of the "getUTCMonth" is 0 +es5id: 15.9.5.13_A2_T1 +description: The "length" property of the "getUTCMonth" is 0 +---*/ if(Date.prototype.getUTCMonth.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCMonth has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCMonth.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCMonth.length !== 0){ $ERROR('#2: The "length" property of the getUTCMonth is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T1.js index b368629576..5cae018672 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCMonth property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.13_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCMonth.length; Date.prototype.getUTCMonth.length = 1; if (Date.prototype.getUTCMonth.length !== x) { $ERROR('#1: The Date.prototype.getUTCMonth.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T2.js index 850415584e..36f25432e3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCMonth property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.13_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCMonth.length !== false) { $ERROR('#1: The Date.prototype.getUTCMonth.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCMonth.length !== false) { if (!Date.prototype.getUTCMonth.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCMonth.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T3.js index 3e364a3d66..ced5434958 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCMonth property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.13_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCMonth.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCMonth.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCMonth) { $ERROR('#2: The Date.prototype.getUTCMonth.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T1.js index 40699e8ae1..9d19cc8d04 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getDate" has { DontEnum } attributes +es5id: 15.9.5.14_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getDate; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getDate === x) { $ERROR('#1: The Date.prototype.getDate has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T2.js index fb82614828..3f793f4bbe 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getDate" has { DontEnum } attributes +es5id: 15.9.5.14_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getDate === false) { $ERROR('#1: The Date.prototype.getDate property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getDate === false) { if (Date.prototype.hasOwnProperty('getDate')) { $FAIL('#2: The Date.prototype.getDate property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T3.js index 1dc39e93c8..689f82e5d7 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getDate" has { DontEnum } attributes +es5id: 15.9.5.14_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getDate')) { $ERROR('#1: The Date.prototype.getDate property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getDate has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A2_T1.js index ecd6fb8ca1..6e606d24b5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getDate" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A2_T1.js - * @description The "length" property of the "getDate" is 0 - */ +/*--- +info: The "length" property of the "getDate" is 0 +es5id: 15.9.5.14_A2_T1 +description: The "length" property of the "getDate" is 0 +---*/ if(Date.prototype.getDate.hasOwnProperty("length") !== true){ $ERROR('#1: The getDate has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getDate.hasOwnProperty("length") !== true){ if(Date.prototype.getDate.length !== 0){ $ERROR('#2: The "length" property of the getDate is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T1.js index 942319f731..d9f5515bf7 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getDate property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.14_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getDate.length; Date.prototype.getDate.length = 1; if (Date.prototype.getDate.length !== x) { $ERROR('#1: The Date.prototype.getDate.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T2.js index ad36fd81b2..6438930cb1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getDate property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.14_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getDate.length !== false) { $ERROR('#1: The Date.prototype.getDate.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getDate.length !== false) { if (!Date.prototype.getDate.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getDate.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T3.js index ffec9e3f25..35fb27a5e6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getDate property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.14_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getDate.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getDate.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getDate) { $ERROR('#2: The Date.prototype.getDate.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T1.js index b07c42ee4e..626a3f8582 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCDate" has { DontEnum } attributes +es5id: 15.9.5.15_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCDate; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCDate === x) { $ERROR('#1: The Date.prototype.getUTCDate has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T2.js index 94425617e9..4a4df3549d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCDate" has { DontEnum } attributes +es5id: 15.9.5.15_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCDate === false) { $ERROR('#1: The Date.prototype.getUTCDate property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCDate === false) { if (Date.prototype.hasOwnProperty('getUTCDate')) { $FAIL('#2: The Date.prototype.getUTCDate property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T3.js index 1f9077223a..3d4668397f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCDate" has { DontEnum } attributes +es5id: 15.9.5.15_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCDate')) { $ERROR('#1: The Date.prototype.getUTCDate property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCDate has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A2_T1.js index ccdad27aa0..35d995e59e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCDate" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A2_T1.js - * @description The "length" property of the "getUTCDate" is 0 - */ +/*--- +info: The "length" property of the "getUTCDate" is 0 +es5id: 15.9.5.15_A2_T1 +description: The "length" property of the "getUTCDate" is 0 +---*/ if(Date.prototype.getUTCDate.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCDate has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCDate.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCDate.length !== 0){ $ERROR('#2: The "length" property of the getUTCDate is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T1.js index f91c38358f..126e78c264 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCDate property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.15_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCDate.length; Date.prototype.getUTCDate.length = 1; if (Date.prototype.getUTCDate.length !== x) { $ERROR('#1: The Date.prototype.getUTCDate.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T2.js index e0617d4469..689b9d7672 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCDate property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.15_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCDate.length !== false) { $ERROR('#1: The Date.prototype.getUTCDate.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCDate.length !== false) { if (!Date.prototype.getUTCDate.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCDate.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T3.js index 849a02db0f..89d2c56cd0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCDate property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.15_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCDate.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCDate.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCDate) { $ERROR('#2: The Date.prototype.getUTCDate.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T1.js index 51eeb1ec55..8a684e38aa 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getDay" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getDay" has { DontEnum } attributes +es5id: 15.9.5.16_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getDay; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getDay === x) { $ERROR('#1: The Date.prototype.getDay has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T2.js index 09f499c788..ea1e89cd42 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getDay" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getDay" has { DontEnum } attributes +es5id: 15.9.5.16_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getDay === false) { $ERROR('#1: The Date.prototype.getDay property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getDay === false) { if (Date.prototype.hasOwnProperty('getDay')) { $FAIL('#2: The Date.prototype.getDay property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T3.js index 566071d928..ceb1a8b9b6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getDay" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getDay" has { DontEnum } attributes +es5id: 15.9.5.16_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getDay')) { $ERROR('#1: The Date.prototype.getDay property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getDay has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A2_T1.js index 02d078baf4..dff7427fde 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getDay" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A2_T1.js - * @description The "length" property of the "getDay" is 0 - */ +/*--- +info: The "length" property of the "getDay" is 0 +es5id: 15.9.5.16_A2_T1 +description: The "length" property of the "getDay" is 0 +---*/ if(Date.prototype.getDay.hasOwnProperty("length") !== true){ $ERROR('#1: The getDay has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getDay.hasOwnProperty("length") !== true){ if(Date.prototype.getDay.length !== 0){ $ERROR('#2: The "length" property of the getDay is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T1.js index 71f53d71f8..1d581dae59 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getDay property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getDay property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.16_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getDay.length; Date.prototype.getDay.length = 1; if (Date.prototype.getDay.length !== x) { $ERROR('#1: The Date.prototype.getDay.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T2.js index 70d64e1d5b..a0b0343f39 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getDay property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getDay property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.16_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getDay.length !== false) { $ERROR('#1: The Date.prototype.getDay.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getDay.length !== false) { if (!Date.prototype.getDay.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getDay.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T3.js index 7de02a0d9b..a38d352f29 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getDay property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getDay property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.16_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getDay.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getDay.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getDay) { $ERROR('#2: The Date.prototype.getDay.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T1.js index 2ea4490283..c496a57856 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCDay" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCDay" has { DontEnum } attributes +es5id: 15.9.5.17_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCDay; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCDay === x) { $ERROR('#1: The Date.prototype.getUTCDay has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T2.js index 11a9d0ea33..ee88f27247 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCDay" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCDay" has { DontEnum } attributes +es5id: 15.9.5.17_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCDay === false) { $ERROR('#1: The Date.prototype.getUTCDay property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCDay === false) { if (Date.prototype.hasOwnProperty('getUTCDay')) { $FAIL('#2: The Date.prototype.getUTCDay property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T3.js index c336efdca5..a4dafbbe23 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCDay" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCDay" has { DontEnum } attributes +es5id: 15.9.5.17_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCDay')) { $ERROR('#1: The Date.prototype.getUTCDay property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCDay has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A2_T1.js index f3699c47d6..aa9da1157e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCDay" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A2_T1.js - * @description The "length" property of the "getUTCDay" is 0 - */ +/*--- +info: The "length" property of the "getUTCDay" is 0 +es5id: 15.9.5.17_A2_T1 +description: The "length" property of the "getUTCDay" is 0 +---*/ if(Date.prototype.getUTCDay.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCDay has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCDay.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCDay.length !== 0){ $ERROR('#2: The "length" property of the getUTCDay is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T1.js index 533c59f3fe..896fa7ee4a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCDay property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCDay property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.17_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCDay.length; Date.prototype.getUTCDay.length = 1; if (Date.prototype.getUTCDay.length !== x) { $ERROR('#1: The Date.prototype.getUTCDay.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T2.js index 96faa270c3..5b2730dcf6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCDay property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCDay property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.17_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCDay.length !== false) { $ERROR('#1: The Date.prototype.getUTCDay.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCDay.length !== false) { if (!Date.prototype.getUTCDay.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCDay.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T3.js index 89e7f5e389..8f3ac2280a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCDay property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCDay property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.17_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCDay.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCDay.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCDay) { $ERROR('#2: The Date.prototype.getUTCDay.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T1.js index 21df7c849b..17f4c0da02 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getHours" has { DontEnum } attributes +es5id: 15.9.5.18_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getHours; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getHours === x) { $ERROR('#1: The Date.prototype.getHours has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T2.js index 3eed77e596..fd8d1e6367 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getHours" has { DontEnum } attributes +es5id: 15.9.5.18_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getHours === false) { $ERROR('#1: The Date.prototype.getHours property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getHours === false) { if (Date.prototype.hasOwnProperty('getHours')) { $FAIL('#2: The Date.prototype.getHours property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T3.js index 2c06a04c58..295934ee8a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getHours" has { DontEnum } attributes +es5id: 15.9.5.18_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getHours')) { $ERROR('#1: The Date.prototype.getHours property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getHours has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A2_T1.js index abf67c9923..3467a58816 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getHours" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A2_T1.js - * @description The "length" property of the "getHours" is 0 - */ +/*--- +info: The "length" property of the "getHours" is 0 +es5id: 15.9.5.18_A2_T1 +description: The "length" property of the "getHours" is 0 +---*/ if(Date.prototype.getHours.hasOwnProperty("length") !== true){ $ERROR('#1: The getHours has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getHours.hasOwnProperty("length") !== true){ if(Date.prototype.getHours.length !== 0){ $ERROR('#2: The "length" property of the getHours is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T1.js index 6226fb411a..d63701ba4f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getHours property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.18_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getHours.length; Date.prototype.getHours.length = 1; if (Date.prototype.getHours.length !== x) { $ERROR('#1: The Date.prototype.getHours.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T2.js index 7d85033751..5ce42713c1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getHours property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.18_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getHours.length !== false) { $ERROR('#1: The Date.prototype.getHours.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getHours.length !== false) { if (!Date.prototype.getHours.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getHours.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T3.js index 2639f7f359..00df3f95dc 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getHours property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.18_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getHours.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getHours.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getHours) { $ERROR('#2: The Date.prototype.getHours.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T1.js index 83aec2d9fa..03c0d40471 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCHours" has { DontEnum } attributes +es5id: 15.9.5.19_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCHours; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCHours === x) { $ERROR('#1: The Date.prototype.getUTCHours has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T2.js index dbe96536f4..eda9f70c45 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCHours" has { DontEnum } attributes +es5id: 15.9.5.19_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCHours === false) { $ERROR('#1: The Date.prototype.getUTCHours property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCHours === false) { if (Date.prototype.hasOwnProperty('getUTCHours')) { $FAIL('#2: The Date.prototype.getUTCHours property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T3.js index cce1646415..0a362c2c52 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCHours" has { DontEnum } attributes +es5id: 15.9.5.19_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCHours')) { $ERROR('#1: The Date.prototype.getUTCHours property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCHours has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A2_T1.js index 8bd281f48a..b3e751427d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCHours" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A2_T1.js - * @description The "length" property of the "getUTCHours" is 0 - */ +/*--- +info: The "length" property of the "getUTCHours" is 0 +es5id: 15.9.5.19_A2_T1 +description: The "length" property of the "getUTCHours" is 0 +---*/ if(Date.prototype.getUTCHours.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCHours has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCHours.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCHours.length !== 0){ $ERROR('#2: The "length" property of the getUTCHours is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T1.js index f3a6d38bbf..d0a8f7623b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCHours property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.19_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCHours.length; Date.prototype.getUTCHours.length = 1; if (Date.prototype.getUTCHours.length !== x) { $ERROR('#1: The Date.prototype.getUTCHours.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T2.js index 2c6be6fcfa..c1e26ef8d9 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCHours property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.19_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCHours.length !== false) { $ERROR('#1: The Date.prototype.getUTCHours.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCHours.length !== false) { if (!Date.prototype.getUTCHours.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCHours.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T3.js index 2f6373d3a1..3fc0377ea7 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCHours property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.19_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCHours.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCHours.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCHours) { $ERROR('#2: The Date.prototype.getUTCHours.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T1.js index 3e56c55ade..17c778def2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "toString" has { DontEnum } attributes +es5id: 15.9.5.2_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toString; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.toString === x) { $ERROR('#1: The Date.prototype.toString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T2.js index f1a5d6fba1..3464ae5754 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "toString" has { DontEnum } attributes +es5id: 15.9.5.2_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toString === false) { $ERROR('#1: The Date.prototype.toString property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.toString === false) { if (Date.prototype.hasOwnProperty('toString')) { $FAIL('#2: The Date.prototype.toString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T3.js index 489fe75e13..370a87fea1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "toString" has { DontEnum } attributes +es5id: 15.9.5.2_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toString')) { $ERROR('#1: The Date.prototype.toString property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A2_T1.js index faa1123e69..2179edf90d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A2_T1.js - * @description The "length" property of the "toString" is 0 - */ +/*--- +info: The "length" property of the "toString" is 0 +es5id: 15.9.5.2_A2_T1 +description: The "length" property of the "toString" is 0 +---*/ if(Date.prototype.toString.hasOwnProperty("length") !== true){ $ERROR('#1: The toString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toString.hasOwnProperty("length") !== true){ if(Date.prototype.toString.length !== 0){ $ERROR('#2: The "length" property of the toString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T1.js index fb48956188..1221783dad 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toString property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.2_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toString.length; Date.prototype.toString.length = 1; if (Date.prototype.toString.length !== x) { $ERROR('#1: The Date.prototype.toString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T2.js index 74aaa12a05..a6a31a3bc1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toString property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.2_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toString.length !== false) { $ERROR('#1: The Date.prototype.toString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toString.length !== false) { if (!Date.prototype.toString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T3.js index 67524d6e00..a4f31f2784 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toString property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.2_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toString) { $ERROR('#2: The Date.prototype.toString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T1.js index c006aaa9f5..57b8a159aa 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getMinutes" has { DontEnum } attributes +es5id: 15.9.5.20_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getMinutes; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getMinutes === x) { $ERROR('#1: The Date.prototype.getMinutes has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T2.js index e7c433356c..8b1fd253bb 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getMinutes" has { DontEnum } attributes +es5id: 15.9.5.20_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getMinutes === false) { $ERROR('#1: The Date.prototype.getMinutes property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getMinutes === false) { if (Date.prototype.hasOwnProperty('getMinutes')) { $FAIL('#2: The Date.prototype.getMinutes property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T3.js index 6cb2fdffc0..f407d5c70b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getMinutes" has { DontEnum } attributes +es5id: 15.9.5.20_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getMinutes')) { $ERROR('#1: The Date.prototype.getMinutes property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getMinutes has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A2_T1.js index 7c12101cbf..0a65b243eb 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getMinutes" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A2_T1.js - * @description The "length" property of the "getMinutes" is 0 - */ +/*--- +info: The "length" property of the "getMinutes" is 0 +es5id: 15.9.5.20_A2_T1 +description: The "length" property of the "getMinutes" is 0 +---*/ if(Date.prototype.getMinutes.hasOwnProperty("length") !== true){ $ERROR('#1: The getMinutes has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getMinutes.hasOwnProperty("length") !== true){ if(Date.prototype.getMinutes.length !== 0){ $ERROR('#2: The "length" property of the getMinutes is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T1.js index b179bb4eab..08c2dc9e3e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.20_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getMinutes.length; Date.prototype.getMinutes.length = 1; if (Date.prototype.getMinutes.length !== x) { $ERROR('#1: The Date.prototype.getMinutes.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T2.js index b5c9881d13..95845eb950 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.20_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getMinutes.length !== false) { $ERROR('#1: The Date.prototype.getMinutes.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getMinutes.length !== false) { if (!Date.prototype.getMinutes.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getMinutes.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T3.js index 720c89c3f3..238665a87b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.20_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getMinutes.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getMinutes.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getMinutes) { $ERROR('#2: The Date.prototype.getMinutes.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T1.js index a9815a7b1a..f477d1bf7e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCMinutes" has { DontEnum } attributes +es5id: 15.9.5.21_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCMinutes; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCMinutes === x) { $ERROR('#1: The Date.prototype.getUTCMinutes has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T2.js index e37b3ccd70..047b64b3e5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCMinutes" has { DontEnum } attributes +es5id: 15.9.5.21_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCMinutes === false) { $ERROR('#1: The Date.prototype.getUTCMinutes property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCMinutes === false) { if (Date.prototype.hasOwnProperty('getUTCMinutes')) { $FAIL('#2: The Date.prototype.getUTCMinutes property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T3.js index e4b9e14cf9..dbdefe1a0b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCMinutes" has { DontEnum } attributes +es5id: 15.9.5.21_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCMinutes')) { $ERROR('#1: The Date.prototype.getUTCMinutes property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCMinutes has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A2_T1.js index bb81eb2523..9a6d01819a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCMinutes" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A2_T1.js - * @description The "length" property of the "getUTCMinutes" is 0 - */ +/*--- +info: The "length" property of the "getUTCMinutes" is 0 +es5id: 15.9.5.21_A2_T1 +description: The "length" property of the "getUTCMinutes" is 0 +---*/ if(Date.prototype.getUTCMinutes.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCMinutes has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCMinutes.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCMinutes.length !== 0){ $ERROR('#2: The "length" property of the getUTCMinutes is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T1.js index 747dc26a16..3224d217d9 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.21_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCMinutes.length; Date.prototype.getUTCMinutes.length = 1; if (Date.prototype.getUTCMinutes.length !== x) { $ERROR('#1: The Date.prototype.getUTCMinutes.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T2.js index cfc633fee6..a76667d3f6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.21_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCMinutes.length !== false) { $ERROR('#1: The Date.prototype.getUTCMinutes.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCMinutes.length !== false) { if (!Date.prototype.getUTCMinutes.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCMinutes.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T3.js index 419a6d45c5..fea8ff75f0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.21_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCMinutes.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCMinutes.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCMinutes) { $ERROR('#2: The Date.prototype.getUTCMinutes.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T1.js index e2999bc323..c68b10bc28 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getSeconds" has { DontEnum } attributes +es5id: 15.9.5.22_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getSeconds; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getSeconds === x) { $ERROR('#1: The Date.prototype.getSeconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T2.js index f00746bd36..5bcc5179da 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getSeconds" has { DontEnum } attributes +es5id: 15.9.5.22_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getSeconds === false) { $ERROR('#1: The Date.prototype.getSeconds property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getSeconds === false) { if (Date.prototype.hasOwnProperty('getSeconds')) { $FAIL('#2: The Date.prototype.getSeconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T3.js index 302a570b33..d91628c883 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getSeconds" has { DontEnum } attributes +es5id: 15.9.5.22_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getSeconds')) { $ERROR('#1: The Date.prototype.getSeconds property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getSeconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A2_T1.js index 35dc678fae..a901adee3e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getSeconds" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A2_T1.js - * @description The "length" property of the "getSeconds" is 0 - */ +/*--- +info: The "length" property of the "getSeconds" is 0 +es5id: 15.9.5.22_A2_T1 +description: The "length" property of the "getSeconds" is 0 +---*/ if(Date.prototype.getSeconds.hasOwnProperty("length") !== true){ $ERROR('#1: The getSeconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getSeconds.hasOwnProperty("length") !== true){ if(Date.prototype.getSeconds.length !== 0){ $ERROR('#2: The "length" property of the getSeconds is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T1.js index daf06895d1..4ac5a5041d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.22_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getSeconds.length; Date.prototype.getSeconds.length = 1; if (Date.prototype.getSeconds.length !== x) { $ERROR('#1: The Date.prototype.getSeconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T2.js index 83b659f12f..72ee328c16 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.22_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getSeconds.length !== false) { $ERROR('#1: The Date.prototype.getSeconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getSeconds.length !== false) { if (!Date.prototype.getSeconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getSeconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T3.js index b188594129..112303bf2f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.22_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getSeconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getSeconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getSeconds) { $ERROR('#2: The Date.prototype.getSeconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T1.js index 0cdbf94275..dee236e0a1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getUTCSeconds" has { DontEnum } attributes +es5id: 15.9.5.23_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCSeconds; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getUTCSeconds === x) { $ERROR('#1: The Date.prototype.getUTCSeconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T2.js index f5e7db5f48..4403cdc09c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getUTCSeconds" has { DontEnum } attributes +es5id: 15.9.5.23_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCSeconds === false) { $ERROR('#1: The Date.prototype.getUTCSeconds property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getUTCSeconds === false) { if (Date.prototype.hasOwnProperty('getUTCSeconds')) { $FAIL('#2: The Date.prototype.getUTCSeconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T3.js index ffe8be9b66..910b6d9be8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getUTCSeconds" has { DontEnum } attributes +es5id: 15.9.5.23_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCSeconds')) { $ERROR('#1: The Date.prototype.getUTCSeconds property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCSeconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A2_T1.js index fc133e721f..98aba7f4e9 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCSeconds" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A2_T1.js - * @description The "length" property of the "getUTCSeconds" is 0 - */ +/*--- +info: The "length" property of the "getUTCSeconds" is 0 +es5id: 15.9.5.23_A2_T1 +description: The "length" property of the "getUTCSeconds" is 0 +---*/ if(Date.prototype.getUTCSeconds.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCSeconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCSeconds.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCSeconds.length !== 0){ $ERROR('#2: The "length" property of the getUTCSeconds is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T1.js index cc7476cae0..dc3f195a12 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.23_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCSeconds.length; Date.prototype.getUTCSeconds.length = 1; if (Date.prototype.getUTCSeconds.length !== x) { $ERROR('#1: The Date.prototype.getUTCSeconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T2.js index dedb7c86d5..bfe0b51acc 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.23_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCSeconds.length !== false) { $ERROR('#1: The Date.prototype.getUTCSeconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCSeconds.length !== false) { if (!Date.prototype.getUTCSeconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCSeconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T3.js index 04bc31c507..9bcad90f61 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.23_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCSeconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCSeconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCSeconds) { $ERROR('#2: The Date.prototype.getUTCSeconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T1.js index fd166c2ea8..475e1157ee 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getMilliseconds" has { DontEnum } attributes +es5id: 15.9.5.24_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getMilliseconds; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getMilliseconds === x) { $ERROR('#1: The Date.prototype.getMilliseconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T2.js index b2b37d417c..d53090d638 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getMilliseconds" has { DontEnum } attributes +es5id: 15.9.5.24_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getMilliseconds === false) { $ERROR('#1: The Date.prototype.getMilliseconds property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getMilliseconds === false) { if (Date.prototype.hasOwnProperty('getMilliseconds')) { $FAIL('#2: The Date.prototype.getMilliseconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T3.js index a0610a7813..82c9cfff4e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getMilliseconds" has { DontEnum } attributes +es5id: 15.9.5.24_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getMilliseconds')) { $ERROR('#1: The Date.prototype.getMilliseconds property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getMilliseconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A2_T1.js index 2383ea3d70..f5bc2de56b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getMilliseconds" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A2_T1.js - * @description The "length" property of the "getMilliseconds" is 0 - */ +/*--- +info: The "length" property of the "getMilliseconds" is 0 +es5id: 15.9.5.24_A2_T1 +description: The "length" property of the "getMilliseconds" is 0 +---*/ if(Date.prototype.getMilliseconds.hasOwnProperty("length") !== true){ $ERROR('#1: The getMilliseconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getMilliseconds.hasOwnProperty("length") !== true){ if(Date.prototype.getMilliseconds.length !== 0){ $ERROR('#2: The "length" property of the getMilliseconds is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T1.js index 9b79b4ac0a..a98fd95003 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.24_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getMilliseconds.length; Date.prototype.getMilliseconds.length = 1; if (Date.prototype.getMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.getMilliseconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T2.js index 04d18b9f8f..90ca44188e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.24_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getMilliseconds.length !== false) { $ERROR('#1: The Date.prototype.getMilliseconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getMilliseconds.length !== false) { if (!Date.prototype.getMilliseconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getMilliseconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T3.js index d124f847f5..2f364d285a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.24_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getMilliseconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getMilliseconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getMilliseconds) { $ERROR('#2: The Date.prototype.getMilliseconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T1.js index bccbfde149..305c48a548 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: > + The Date.prototype property "getUTCMilliseconds" has { DontEnum } + attributes +es5id: 15.9.5.25_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getUTCMilliseconds; if(x === 1) @@ -16,5 +17,3 @@ else if (Date.prototype.getUTCMilliseconds === x) { $ERROR('#1: The Date.prototype.getUTCMilliseconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T2.js index 17c840b02d..588f723050 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: > + The Date.prototype property "getUTCMilliseconds" has { DontEnum } + attributes +es5id: 15.9.5.25_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCMilliseconds === false) { $ERROR('#1: The Date.prototype.getUTCMilliseconds property has not the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCMilliseconds === false) { if (Date.prototype.hasOwnProperty('getUTCMilliseconds')) { $FAIL('#2: The Date.prototype.getUTCMilliseconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T3.js index ead8d5d017..9b5581cb0b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getUTCMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype property "getUTCMilliseconds" has { DontEnum } + attributes +es5id: 15.9.5.25_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getUTCMilliseconds')) { $ERROR('#1: The Date.prototype.getUTCMilliseconds property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getUTCMilliseconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A2_T1.js index e2889842f2..db8c50ae80 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getUTCMilliseconds" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A2_T1.js - * @description The "length" property of the "getUTCMilliseconds" is 0 - */ +/*--- +info: The "length" property of the "getUTCMilliseconds" is 0 +es5id: 15.9.5.25_A2_T1 +description: The "length" property of the "getUTCMilliseconds" is 0 +---*/ if(Date.prototype.getUTCMilliseconds.hasOwnProperty("length") !== true){ $ERROR('#1: The getUTCMilliseconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getUTCMilliseconds.hasOwnProperty("length") !== true){ if(Date.prototype.getUTCMilliseconds.length !== 0){ $ERROR('#2: The "length" property of the getUTCMilliseconds is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T1.js index 5611af8ca7..beceb40a71 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getUTCMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.25_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getUTCMilliseconds.length; Date.prototype.getUTCMilliseconds.length = 1; if (Date.prototype.getUTCMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.getUTCMilliseconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T2.js index 0e7f61c4d8..b3e1c288d8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getUTCMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.25_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getUTCMilliseconds.length !== false) { $ERROR('#1: The Date.prototype.getUTCMilliseconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getUTCMilliseconds.length !== false) { if (!Date.prototype.getUTCMilliseconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getUTCMilliseconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T3.js index 7ada8bdbf0..54c29897f3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getUTCMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getUTCMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.25_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getUTCMilliseconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getUTCMilliseconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getUTCMilliseconds) { $ERROR('#2: The Date.prototype.getUTCMilliseconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T1.js index 603d2b7ef5..6f979a460e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getTimezoneOffset" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: > + The Date.prototype property "getTimezoneOffset" has { DontEnum } + attributes +es5id: 15.9.5.26_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getTimezoneOffset; if(x === 1) @@ -16,5 +17,3 @@ else if (Date.prototype.getTimezoneOffset === x) { $ERROR('#1: The Date.prototype.getTimezoneOffset has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T2.js index b212690dea..0fdbad11c0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getTimezoneOffset" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: > + The Date.prototype property "getTimezoneOffset" has { DontEnum } + attributes +es5id: 15.9.5.26_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getTimezoneOffset === false) { $ERROR('#1: The Date.prototype.getTimezoneOffset property has not the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getTimezoneOffset === false) { if (Date.prototype.hasOwnProperty('getTimezoneOffset')) { $FAIL('#2: The Date.prototype.getTimezoneOffset property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T3.js index fb4a98de96..4e6808e303 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getTimezoneOffset" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype property "getTimezoneOffset" has { DontEnum } + attributes +es5id: 15.9.5.26_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getTimezoneOffset')) { $ERROR('#1: The Date.prototype.getTimezoneOffset property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getTimezoneOffset has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A2_T1.js index ef197f19f4..c41ed353ef 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getTimezoneOffset" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A2_T1.js - * @description The "length" property of the "getTimezoneOffset" is 0 - */ +/*--- +info: The "length" property of the "getTimezoneOffset" is 0 +es5id: 15.9.5.26_A2_T1 +description: The "length" property of the "getTimezoneOffset" is 0 +---*/ if(Date.prototype.getTimezoneOffset.hasOwnProperty("length") !== true){ $ERROR('#1: The getTimezoneOffset has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getTimezoneOffset.hasOwnProperty("length") !== true){ if(Date.prototype.getTimezoneOffset.length !== 0){ $ERROR('#2: The "length" property of the getTimezoneOffset is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T1.js index 722b2f96e5..e09365ec65 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getTimezoneOffset property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getTimezoneOffset property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.26_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getTimezoneOffset.length; Date.prototype.getTimezoneOffset.length = 1; if (Date.prototype.getTimezoneOffset.length !== x) { $ERROR('#1: The Date.prototype.getTimezoneOffset.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T2.js index f17cfd443b..81c9c0a7a3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getTimezoneOffset property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getTimezoneOffset property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.26_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getTimezoneOffset.length !== false) { $ERROR('#1: The Date.prototype.getTimezoneOffset.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getTimezoneOffset.length !== false) { if (!Date.prototype.getTimezoneOffset.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getTimezoneOffset.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T3.js index 74d6c59a89..0ce89003aa 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getTimezoneOffset property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getTimezoneOffset property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.26_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getTimezoneOffset.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getTimezoneOffset.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getTimezoneOffset) { $ERROR('#2: The Date.prototype.getTimezoneOffset.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T1.js index 4f7f057824..6b46562d5a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setTime" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setTime" has { DontEnum } attributes +es5id: 15.9.5.27_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setTime; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setTime === x) { $ERROR('#1: The Date.prototype.setTime has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T2.js index 51ac9d33f3..8fec83d353 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setTime" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setTime" has { DontEnum } attributes +es5id: 15.9.5.27_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setTime === false) { $ERROR('#1: The Date.prototype.setTime property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setTime === false) { if (Date.prototype.hasOwnProperty('setTime')) { $FAIL('#2: The Date.prototype.setTime property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T3.js index 724a449208..0d32737e5e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setTime" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setTime" has { DontEnum } attributes +es5id: 15.9.5.27_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setTime')) { $ERROR('#1: The Date.prototype.setTime property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setTime has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A2_T1.js index eaa2be63e4..31d8de7380 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setTime" is 1 - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A2_T1.js - * @description The "length" property of the "setTime" is 1 - */ +/*--- +info: The "length" property of the "setTime" is 1 +es5id: 15.9.5.27_A2_T1 +description: The "length" property of the "setTime" is 1 +---*/ if(Date.prototype.setTime.hasOwnProperty("length") !== true){ $ERROR('#1: The setTime has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setTime.hasOwnProperty("length") !== true){ if(Date.prototype.setTime.length !== 1){ $ERROR('#2: The "length" property of the setTime is 1'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T1.js index f6ed13a319..0b7d13d417 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.27_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setTime.length; Date.prototype.setTime.length = 1; if (Date.prototype.setTime.length !== x) { $ERROR('#1: The Date.prototype.setTime.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T2.js index 81e9083667..d037817497 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.27_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setTime.length !== false) { $ERROR('#1: The Date.prototype.setTime.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setTime.length !== false) { if (!Date.prototype.setTime.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setTime.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T3.js index 8b8076aa2c..34d159b165 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setTime property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.27_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setTime.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setTime.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setTime) { $ERROR('#2: The Date.prototype.setTime.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T1.js index 5cef7c9d2d..0c697d0e42 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setMilliseconds" has { DontEnum } attributes +es5id: 15.9.5.28_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setMilliseconds; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setMilliseconds === x) { $ERROR('#1: The Date.prototype.setMilliseconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T2.js index 0a2bd573cf..b01e55dd21 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setMilliseconds" has { DontEnum } attributes +es5id: 15.9.5.28_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setMilliseconds === false) { $ERROR('#1: The Date.prototype.setMilliseconds property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setMilliseconds === false) { if (Date.prototype.hasOwnProperty('setMilliseconds')) { $FAIL('#2: The Date.prototype.setMilliseconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T3.js index 0a971a540b..61a12c564b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setMilliseconds" has { DontEnum } attributes +es5id: 15.9.5.28_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setMilliseconds')) { $ERROR('#1: The Date.prototype.setMilliseconds property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setMilliseconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A2_T1.js index dc0f0de0fe..52fb467781 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setMilliseconds" is 1 - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A2_T1.js - * @description The "length" property of the "setMilliseconds" is 1 - */ +/*--- +info: The "length" property of the "setMilliseconds" is 1 +es5id: 15.9.5.28_A2_T1 +description: The "length" property of the "setMilliseconds" is 1 +---*/ if(Date.prototype.setMilliseconds.hasOwnProperty("length") !== true){ $ERROR('#1: The setMilliseconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setMilliseconds.hasOwnProperty("length") !== true){ if(Date.prototype.setMilliseconds.length !== 1){ $ERROR('#2: The "length" property of the setMilliseconds is 1'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T1.js index 11e36f7fc1..812e2ecc50 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.28_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setMilliseconds.length; Date.prototype.setMilliseconds.length = 1; if (Date.prototype.setMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.setMilliseconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T2.js index 5449666223..892a329b62 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.28_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setMilliseconds.length !== false) { $ERROR('#1: The Date.prototype.setMilliseconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setMilliseconds.length !== false) { if (!Date.prototype.setMilliseconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setMilliseconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T3.js index 5f8bcfa381..55ec5a96b5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.28_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setMilliseconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setMilliseconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setMilliseconds) { $ERROR('#2: The Date.prototype.setMilliseconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T1.js index 9449b1a745..d202b6b329 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: > + The Date.prototype property "setUTCMilliseconds" has { DontEnum } + attributes +es5id: 15.9.5.29_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCMilliseconds; if(x === 1) @@ -16,5 +17,3 @@ else if (Date.prototype.setUTCMilliseconds === x) { $ERROR('#1: The Date.prototype.setUTCMilliseconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T2.js index 9560e635b2..b18a245756 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: > + The Date.prototype property "setUTCMilliseconds" has { DontEnum } + attributes +es5id: 15.9.5.29_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCMilliseconds === false) { $ERROR('#1: The Date.prototype.setUTCMilliseconds property has not the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCMilliseconds === false) { if (Date.prototype.hasOwnProperty('setUTCMilliseconds')) { $FAIL('#2: The Date.prototype.setUTCMilliseconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T3.js index 9a06d18296..ac581bcb97 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMilliseconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype property "setUTCMilliseconds" has { DontEnum } + attributes +es5id: 15.9.5.29_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCMilliseconds')) { $ERROR('#1: The Date.prototype.setUTCMilliseconds property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCMilliseconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A2_T1.js index f511aab549..84a0e97f79 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCMilliseconds" is 1 - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A2_T1.js - * @description The "length" property of the "setUTCMilliseconds" is 1 - */ +/*--- +info: The "length" property of the "setUTCMilliseconds" is 1 +es5id: 15.9.5.29_A2_T1 +description: The "length" property of the "setUTCMilliseconds" is 1 +---*/ if(Date.prototype.setUTCMilliseconds.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCMilliseconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCMilliseconds.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCMilliseconds.length !== 1){ $ERROR('#2: The "length" property of the setUTCMilliseconds is 1'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T1.js index 34cc244536..6150ee8887 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.29_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCMilliseconds.length; Date.prototype.setUTCMilliseconds.length = 1; if (Date.prototype.setUTCMilliseconds.length !== x) { $ERROR('#1: The Date.prototype.setUTCMilliseconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T2.js index 50230b0775..828b60157c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.29_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCMilliseconds.length !== false) { $ERROR('#1: The Date.prototype.setUTCMilliseconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCMilliseconds.length !== false) { if (!Date.prototype.setUTCMilliseconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCMilliseconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T3.js index 89742c8daf..14993e4b49 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMilliseconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCMilliseconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.29_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCMilliseconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCMilliseconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCMilliseconds) { $ERROR('#2: The Date.prototype.setUTCMilliseconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T1.js index 53ef69842f..0f94d529b6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toDateString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "toDateString" has { DontEnum } attributes +es5id: 15.9.5.3_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toDateString; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.toDateString === x) { $ERROR('#1: The Date.prototype.toDateString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T2.js index 19a98a7b62..d68c01ea17 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toDateString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "toDateString" has { DontEnum } attributes +es5id: 15.9.5.3_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toDateString === false) { $ERROR('#1: The Date.prototype.toDateString property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.toDateString === false) { if (Date.prototype.hasOwnProperty('toDateString')) { $FAIL('#2: The Date.prototype.toDateString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T3.js index 49874ffa07..83ebe9d65a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toDateString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "toDateString" has { DontEnum } attributes +es5id: 15.9.5.3_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toDateString')) { $ERROR('#1: The Date.prototype.toDateString property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toDateString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A2_T1.js index 6004393628..67e9bd68a0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toDateString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A2_T1.js - * @description The "length" property of the "toDateString" is 0 - */ +/*--- +info: The "length" property of the "toDateString" is 0 +es5id: 15.9.5.3_A2_T1 +description: The "length" property of the "toDateString" is 0 +---*/ if(Date.prototype.toDateString.hasOwnProperty("length") !== true){ $ERROR('#1: The toDateString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toDateString.hasOwnProperty("length") !== true){ if(Date.prototype.toDateString.length !== 0){ $ERROR('#2: The "length" property of the toDateString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T1.js index 2c9de6cdc6..1dea6e9916 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toDateString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toDateString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.3_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toDateString.length; Date.prototype.toDateString.length = 1; if (Date.prototype.toDateString.length !== x) { $ERROR('#1: The Date.prototype.toDateString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T2.js index 83e794a083..3935ff2a36 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toDateString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toDateString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.3_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toDateString.length !== false) { $ERROR('#1: The Date.prototype.toDateString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toDateString.length !== false) { if (!Date.prototype.toDateString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toDateString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T3.js index abaf2c2c22..65bde2b66e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toDateString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toDateString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.3_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toDateString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toDateString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toDateString) { $ERROR('#2: The Date.prototype.toDateString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T1.js index 76a6aeb495..54e479991d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setSeconds" has { DontEnum } attributes +es5id: 15.9.5.30_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setSeconds; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setSeconds === x) { $ERROR('#1: The Date.prototype.setSeconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T2.js index 4f691eaf9a..68ab36592a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setSeconds" has { DontEnum } attributes +es5id: 15.9.5.30_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setSeconds === false) { $ERROR('#1: The Date.prototype.setSeconds property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setSeconds === false) { if (Date.prototype.hasOwnProperty('setSeconds')) { $FAIL('#2: The Date.prototype.setSeconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T3.js index 350a993d37..06888ea975 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setSeconds" has { DontEnum } attributes +es5id: 15.9.5.30_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setSeconds')) { $ERROR('#1: The Date.prototype.setSeconds property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setSeconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A2_T1.js index a87097cd41..b3a3bf446b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setSeconds" is 2 - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A2_T1.js - * @description The "length" property of the "setSeconds" is 2 - */ +/*--- +info: The "length" property of the "setSeconds" is 2 +es5id: 15.9.5.30_A2_T1 +description: The "length" property of the "setSeconds" is 2 +---*/ if(Date.prototype.setSeconds.hasOwnProperty("length") !== true){ $ERROR('#1: The setSeconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setSeconds.hasOwnProperty("length") !== true){ if(Date.prototype.setSeconds.length !== 2){ $ERROR('#2: The "length" property of the setSeconds is 2'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T1.js index 26aa6c79d5..14d9b4001f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.30_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setSeconds.length; Date.prototype.setSeconds.length = 1; if (Date.prototype.setSeconds.length !== x) { $ERROR('#1: The Date.prototype.setSeconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T2.js index 19b6442b8e..dcf03523dc 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.30_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setSeconds.length !== false) { $ERROR('#1: The Date.prototype.setSeconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setSeconds.length !== false) { if (!Date.prototype.setSeconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setSeconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T3.js index eed00a5499..b7440d0740 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.30_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setSeconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setSeconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setSeconds) { $ERROR('#2: The Date.prototype.setSeconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T1.js index 2f34d162d5..0d82a883c0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setUTCSeconds" has { DontEnum } attributes +es5id: 15.9.5.31_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCSeconds; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setUTCSeconds === x) { $ERROR('#1: The Date.prototype.setUTCSeconds has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T2.js index d6173a2f2c..2b1764486c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setUTCSeconds" has { DontEnum } attributes +es5id: 15.9.5.31_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCSeconds === false) { $ERROR('#1: The Date.prototype.setUTCSeconds property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setUTCSeconds === false) { if (Date.prototype.hasOwnProperty('setUTCSeconds')) { $FAIL('#2: The Date.prototype.setUTCSeconds property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T3.js index 5b32a6c7e9..03f6b27e26 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCSeconds" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setUTCSeconds" has { DontEnum } attributes +es5id: 15.9.5.31_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCSeconds')) { $ERROR('#1: The Date.prototype.setUTCSeconds property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCSeconds has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A2_T1.js index 8bd48c9bdf..c5cfad0b66 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCSeconds" is 2 - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A2_T1.js - * @description The "length" property of the "setUTCSeconds" is 2 - */ +/*--- +info: The "length" property of the "setUTCSeconds" is 2 +es5id: 15.9.5.31_A2_T1 +description: The "length" property of the "setUTCSeconds" is 2 +---*/ if(Date.prototype.setUTCSeconds.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCSeconds has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCSeconds.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCSeconds.length !== 2){ $ERROR('#2: The "length" property of the setUTCSeconds is 2'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T1.js index 0c7459eca3..57b40d3d36 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.31_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCSeconds.length; Date.prototype.setUTCSeconds.length = 1; if (Date.prototype.setUTCSeconds.length !== x) { $ERROR('#1: The Date.prototype.setUTCSeconds.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T2.js index d225fae1cc..f57fbff3af 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.31_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCSeconds.length !== false) { $ERROR('#1: The Date.prototype.setUTCSeconds.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCSeconds.length !== false) { if (!Date.prototype.setUTCSeconds.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCSeconds.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T3.js index 4193461f14..f64223b4f7 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCSeconds property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCSeconds property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.31_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCSeconds.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCSeconds.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCSeconds) { $ERROR('#2: The Date.prototype.setUTCSeconds.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T1.js index 018978f0eb..be9598291d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setMinutes" has { DontEnum } attributes +es5id: 15.9.5.32_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setMinutes; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setMinutes === x) { $ERROR('#1: The Date.prototype.setMinutes has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T2.js index 332164955e..2ff250b900 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setMinutes" has { DontEnum } attributes +es5id: 15.9.5.32_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setMinutes === false) { $ERROR('#1: The Date.prototype.setMinutes property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setMinutes === false) { if (Date.prototype.hasOwnProperty('setMinutes')) { $FAIL('#2: The Date.prototype.setMinutes property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T3.js index 87d29833a7..0fa71c9d5f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setMinutes" has { DontEnum } attributes +es5id: 15.9.5.32_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setMinutes')) { $ERROR('#1: The Date.prototype.setMinutes property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setMinutes has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A2_T1.js index 3a12335858..17587d6a86 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setMinutes" is 3 - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A2_T1.js - * @description The "length" property of the "setMinutes" is 3 - */ +/*--- +info: The "length" property of the "setMinutes" is 3 +es5id: 15.9.5.32_A2_T1 +description: The "length" property of the "setMinutes" is 3 +---*/ if(Date.prototype.setMinutes.hasOwnProperty("length") !== true){ $ERROR('#1: The setMinutes has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setMinutes.hasOwnProperty("length") !== true){ if(Date.prototype.setMinutes.length !== 3){ $ERROR('#2: The "length" property of the setMinutes is 3'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T1.js index 690c807ffe..78a2783966 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.32_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setMinutes.length; Date.prototype.setMinutes.length = 1; if (Date.prototype.setMinutes.length !== x) { $ERROR('#1: The Date.prototype.setMinutes.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T2.js index cb81516549..0af064acb8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.32_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setMinutes.length !== false) { $ERROR('#1: The Date.prototype.setMinutes.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setMinutes.length !== false) { if (!Date.prototype.setMinutes.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setMinutes.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T3.js index e14c49365e..786866793c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.32_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setMinutes.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setMinutes.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setMinutes) { $ERROR('#2: The Date.prototype.setMinutes.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T1.js index da4fcf04de..b00c28c26c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setUTCMinutes" has { DontEnum } attributes +es5id: 15.9.5.33_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCMinutes; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setUTCMinutes === x) { $ERROR('#1: The Date.prototype.setUTCMinutes has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T2.js index ca7484c7dc..f397ec2bf3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setUTCMinutes" has { DontEnum } attributes +es5id: 15.9.5.33_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCMinutes === false) { $ERROR('#1: The Date.prototype.setUTCMinutes property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setUTCMinutes === false) { if (Date.prototype.hasOwnProperty('setUTCMinutes')) { $FAIL('#2: The Date.prototype.setUTCMinutes property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T3.js index 8966e3b29b..06584c889f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMinutes" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setUTCMinutes" has { DontEnum } attributes +es5id: 15.9.5.33_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCMinutes')) { $ERROR('#1: The Date.prototype.setUTCMinutes property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCMinutes has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A2_T1.js index d383a4150b..e49bf236b2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCMinutes" is 3 - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A2_T1.js - * @description The "length" property of the "setUTCMinutes" is 3 - */ +/*--- +info: The "length" property of the "setUTCMinutes" is 3 +es5id: 15.9.5.33_A2_T1 +description: The "length" property of the "setUTCMinutes" is 3 +---*/ if(Date.prototype.setUTCMinutes.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCMinutes has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCMinutes.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCMinutes.length !== 3){ $ERROR('#2: The "length" property of the setUTCMinutes is 3'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T1.js index e3f400bb2d..584d065852 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.33_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCMinutes.length; Date.prototype.setUTCMinutes.length = 1; if (Date.prototype.setUTCMinutes.length !== x) { $ERROR('#1: The Date.prototype.setUTCMinutes.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T2.js index 56bf360f4c..32bfde6966 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.33_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCMinutes.length !== false) { $ERROR('#1: The Date.prototype.setUTCMinutes.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCMinutes.length !== false) { if (!Date.prototype.setUTCMinutes.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCMinutes.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T3.js index 9b3046cf28..c9e60981cd 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCMinutes property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.33_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCMinutes.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCMinutes.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCMinutes) { $ERROR('#2: The Date.prototype.setUTCMinutes.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T1.js index a374362639..8b1b812dc3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setHours" has { DontEnum } attributes +es5id: 15.9.5.34_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setHours; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setHours === x) { $ERROR('#1: The Date.prototype.setHours has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T2.js index 4338fe4d16..6634bf5be0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setHours" has { DontEnum } attributes +es5id: 15.9.5.34_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setHours === false) { $ERROR('#1: The Date.prototype.setHours property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setHours === false) { if (Date.prototype.hasOwnProperty('setHours')) { $FAIL('#2: The Date.prototype.setHours property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T3.js index 9d7b77ccf7..e9774ac85f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setHours" has { DontEnum } attributes +es5id: 15.9.5.34_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setHours')) { $ERROR('#1: The Date.prototype.setHours property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setHours has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A2_T1.js index c8cdf8d184..a5e3b5b5eb 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setHours" is 4 - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A2_T1.js - * @description The "length" property of the "setHours" is 4 - */ +/*--- +info: The "length" property of the "setHours" is 4 +es5id: 15.9.5.34_A2_T1 +description: The "length" property of the "setHours" is 4 +---*/ if(Date.prototype.setHours.hasOwnProperty("length") !== true){ $ERROR('#1: The setHours has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setHours.hasOwnProperty("length") !== true){ if(Date.prototype.setHours.length !== 4){ $ERROR('#2: The "length" property of the setHours is 4'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T1.js index 36a1f2beba..98cbad79ea 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setHours property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.34_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setHours.length; Date.prototype.setHours.length = 1; if (Date.prototype.setHours.length !== x) { $ERROR('#1: The Date.prototype.setHours.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T2.js index 3aa14f87f5..a713516d1b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setHours property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.34_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setHours.length !== false) { $ERROR('#1: The Date.prototype.setHours.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setHours.length !== false) { if (!Date.prototype.setHours.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setHours.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T3.js index 2b1e1170a0..f6208e0fa9 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setHours property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.34_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setHours.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setHours.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setHours) { $ERROR('#2: The Date.prototype.setHours.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T1.js index 14eb1e938b..5f702b6e38 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setUTCHours" has { DontEnum } attributes +es5id: 15.9.5.35_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCHours; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setUTCHours === x) { $ERROR('#1: The Date.prototype.setUTCHours has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T2.js index 48ae1293ec..e362752abd 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setUTCHours" has { DontEnum } attributes +es5id: 15.9.5.35_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCHours === false) { $ERROR('#1: The Date.prototype.setUTCHours property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setUTCHours === false) { if (Date.prototype.hasOwnProperty('setUTCHours')) { $FAIL('#2: The Date.prototype.setUTCHours property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T3.js index 84a2913719..d913c38ac2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCHours" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setUTCHours" has { DontEnum } attributes +es5id: 15.9.5.35_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCHours')) { $ERROR('#1: The Date.prototype.setUTCHours property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCHours has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A2_T1.js index ae7c776eca..bc15075b47 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCHours" is 4 - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A2_T1.js - * @description The "length" property of the "setUTCHours" is 4 - */ +/*--- +info: The "length" property of the "setUTCHours" is 4 +es5id: 15.9.5.35_A2_T1 +description: The "length" property of the "setUTCHours" is 4 +---*/ if(Date.prototype.setUTCHours.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCHours has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCHours.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCHours.length !== 4){ $ERROR('#2: The "length" property of the setUTCHours is 4'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T1.js index 4a91fbd993..6f2ec88f51 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCHours property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.35_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCHours.length; Date.prototype.setUTCHours.length = 1; if (Date.prototype.setUTCHours.length !== x) { $ERROR('#1: The Date.prototype.setUTCHours.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T2.js index 58aa9d005f..4028217595 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCHours property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.35_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCHours.length !== false) { $ERROR('#1: The Date.prototype.setUTCHours.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCHours.length !== false) { if (!Date.prototype.setUTCHours.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCHours.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T3.js index ab008bb306..923482fedb 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCHours property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCHours property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.35_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCHours.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCHours.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCHours) { $ERROR('#2: The Date.prototype.setUTCHours.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T1.js index 6fbe7aafb3..5bac4b5baa 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setDate" has { DontEnum } attributes +es5id: 15.9.5.36_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setDate; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setDate === x) { $ERROR('#1: The Date.prototype.setDate has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T2.js index 894a3c5aa8..e5aebc325a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setDate" has { DontEnum } attributes +es5id: 15.9.5.36_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setDate === false) { $ERROR('#1: The Date.prototype.setDate property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setDate === false) { if (Date.prototype.hasOwnProperty('setDate')) { $FAIL('#2: The Date.prototype.setDate property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T3.js index b18f38ecaa..a7d27000f8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setDate" has { DontEnum } attributes +es5id: 15.9.5.36_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setDate')) { $ERROR('#1: The Date.prototype.setDate property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setDate has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A2_T1.js index ebbc2615cf..3caaa989db 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setDate" is 1 - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A2_T1.js - * @description The "length" property of the "setDate" is 1 - */ +/*--- +info: The "length" property of the "setDate" is 1 +es5id: 15.9.5.36_A2_T1 +description: The "length" property of the "setDate" is 1 +---*/ if(Date.prototype.setDate.hasOwnProperty("length") !== true){ $ERROR('#1: The setDate has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setDate.hasOwnProperty("length") !== true){ if(Date.prototype.setDate.length !== 1){ $ERROR('#2: The "length" property of the setDate is 1'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T1.js index 8b887aee83..7269936500 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setDate property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.36_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setDate.length; Date.prototype.setDate.length = 1; if (Date.prototype.setDate.length !== x) { $ERROR('#1: The Date.prototype.setDate.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T2.js index 9c04e1411f..7ab08c1839 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setDate property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.36_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setDate.length !== false) { $ERROR('#1: The Date.prototype.setDate.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setDate.length !== false) { if (!Date.prototype.setDate.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setDate.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T3.js index 26d92540e0..02cc08ddb1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setDate property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.36_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setDate.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setDate.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setDate) { $ERROR('#2: The Date.prototype.setDate.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T1.js index 6175733718..cc01febead 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setUTCDate" has { DontEnum } attributes +es5id: 15.9.5.37_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCDate; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setUTCDate === x) { $ERROR('#1: The Date.prototype.setUTCDate has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T2.js index d58be542b0..cffd442167 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setUTCDate" has { DontEnum } attributes +es5id: 15.9.5.37_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCDate === false) { $ERROR('#1: The Date.prototype.setUTCDate property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setUTCDate === false) { if (Date.prototype.hasOwnProperty('setUTCDate')) { $FAIL('#2: The Date.prototype.setUTCDate property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T3.js index cfb8e21e88..4f06995fa0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCDate" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setUTCDate" has { DontEnum } attributes +es5id: 15.9.5.37_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCDate')) { $ERROR('#1: The Date.prototype.setUTCDate property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCDate has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A2_T1.js index d4bb55a7b8..5875bbb5df 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCDate" is 1 - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A2_T1.js - * @description The "length" property of the "setUTCDate" is 1 - */ +/*--- +info: The "length" property of the "setUTCDate" is 1 +es5id: 15.9.5.37_A2_T1 +description: The "length" property of the "setUTCDate" is 1 +---*/ if(Date.prototype.setUTCDate.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCDate has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCDate.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCDate.length !== 1){ $ERROR('#2: The "length" property of the setUTCDate is 1'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T1.js index c524ec87e0..0a6de61ed2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCDate property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.37_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCDate.length; Date.prototype.setUTCDate.length = 1; if (Date.prototype.setUTCDate.length !== x) { $ERROR('#1: The Date.prototype.setUTCDate.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T2.js index 39582f3df8..f4175be7a5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCDate property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.37_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCDate.length !== false) { $ERROR('#1: The Date.prototype.setUTCDate.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCDate.length !== false) { if (!Date.prototype.setUTCDate.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCDate.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T3.js index f67320131f..1e62093713 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCDate property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCDate property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.37_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCDate.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCDate.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCDate) { $ERROR('#2: The Date.prototype.setUTCDate.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T1.js index f2be81b67e..0b41223670 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setMonth" has { DontEnum } attributes +es5id: 15.9.5.38_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setMonth; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setMonth === x) { $ERROR('#1: The Date.prototype.setMonth has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T2.js index 139e310a8d..7adbd409a2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setMonth" has { DontEnum } attributes +es5id: 15.9.5.38_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setMonth === false) { $ERROR('#1: The Date.prototype.setMonth property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setMonth === false) { if (Date.prototype.hasOwnProperty('setMonth')) { $FAIL('#2: The Date.prototype.setMonth property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T3.js index 162a054cf6..39ebf2c0cf 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setMonth" has { DontEnum } attributes +es5id: 15.9.5.38_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setMonth')) { $ERROR('#1: The Date.prototype.setMonth property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setMonth has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A2_T1.js index 92b0536b42..5b6afb7090 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setMonth" is 2 - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A2_T1.js - * @description The "length" property of the "setMonth" is 2 - */ +/*--- +info: The "length" property of the "setMonth" is 2 +es5id: 15.9.5.38_A2_T1 +description: The "length" property of the "setMonth" is 2 +---*/ if(Date.prototype.setMonth.hasOwnProperty("length") !== true){ $ERROR('#1: The setMonth has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setMonth.hasOwnProperty("length") !== true){ if(Date.prototype.setMonth.length !== 2){ $ERROR('#2: The "length" property of the setMonth is 2'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T1.js index 95f5e6e4da..35dc05622e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.38_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setMonth.length; Date.prototype.setMonth.length = 1; if (Date.prototype.setMonth.length !== x) { $ERROR('#1: The Date.prototype.setMonth.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T2.js index 748d8c0d8a..c4e513a620 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.38_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setMonth.length !== false) { $ERROR('#1: The Date.prototype.setMonth.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setMonth.length !== false) { if (!Date.prototype.setMonth.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setMonth.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T3.js index 44dbf4120a..ce86976c46 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setMonth property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.38_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setMonth.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setMonth.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setMonth) { $ERROR('#2: The Date.prototype.setMonth.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T1.js index cda7834d41..7aa7c2c149 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setUTCMonth" has { DontEnum } attributes +es5id: 15.9.5.39_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCMonth; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setUTCMonth === x) { $ERROR('#1: The Date.prototype.setUTCMonth has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T2.js index 7410ef8df0..871cfc5744 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setUTCMonth" has { DontEnum } attributes +es5id: 15.9.5.39_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCMonth === false) { $ERROR('#1: The Date.prototype.setUTCMonth property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setUTCMonth === false) { if (Date.prototype.hasOwnProperty('setUTCMonth')) { $FAIL('#2: The Date.prototype.setUTCMonth property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T3.js index d4903506c2..d972ec254e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCMonth" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setUTCMonth" has { DontEnum } attributes +es5id: 15.9.5.39_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCMonth')) { $ERROR('#1: The Date.prototype.setUTCMonth property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCMonth has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A2_T1.js index ca7e80273c..145d1f92be 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCMonth" is 2 - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A2_T1.js - * @description The "length" property of the "setUTCMonth" is 2 - */ +/*--- +info: The "length" property of the "setUTCMonth" is 2 +es5id: 15.9.5.39_A2_T1 +description: The "length" property of the "setUTCMonth" is 2 +---*/ if(Date.prototype.setUTCMonth.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCMonth has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCMonth.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCMonth.length !== 2){ $ERROR('#2: The "length" property of the setUTCMonth is 2'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T1.js index 83b94e76b9..9b00ac2fcf 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCMonth property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.39_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCMonth.length; Date.prototype.setUTCMonth.length = 1; if (Date.prototype.setUTCMonth.length !== x) { $ERROR('#1: The Date.prototype.setUTCMonth.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T2.js index e136c348c1..80e6a69c94 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCMonth property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.39_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCMonth.length !== false) { $ERROR('#1: The Date.prototype.setUTCMonth.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCMonth.length !== false) { if (!Date.prototype.setUTCMonth.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCMonth.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T3.js index ae997c7a6b..b0b8029aa8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCMonth property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCMonth property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.39_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCMonth.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCMonth.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCMonth) { $ERROR('#2: The Date.prototype.setUTCMonth.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T1.js index 2ccd4cd33d..fb0d0a0b38 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toTimeString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "toTimeString" has { DontEnum } attributes +es5id: 15.9.5.4_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toTimeString; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.toTimeString === x) { $ERROR('#1: The Date.prototype.toTimeString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T2.js index 34b5d5e9be..9eb2e28476 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toTimeString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "toTimeString" has { DontEnum } attributes +es5id: 15.9.5.4_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toTimeString === false) { $ERROR('#1: The Date.prototype.toTimeString property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.toTimeString === false) { if (Date.prototype.hasOwnProperty('toTimeString')) { $FAIL('#2: The Date.prototype.toTimeString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T3.js index f5347efe94..6b9bd38165 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toTimeString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "toTimeString" has { DontEnum } attributes +es5id: 15.9.5.4_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toTimeString')) { $ERROR('#1: The Date.prototype.toTimeString property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toTimeString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A2_T1.js index e715fc04cb..85d941b572 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toTimeString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A2_T1.js - * @description The "length" property of the "toTimeString" is 0 - */ +/*--- +info: The "length" property of the "toTimeString" is 0 +es5id: 15.9.5.4_A2_T1 +description: The "length" property of the "toTimeString" is 0 +---*/ if(Date.prototype.toTimeString.hasOwnProperty("length") !== true){ $ERROR('#1: The toTimeString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toTimeString.hasOwnProperty("length") !== true){ if(Date.prototype.toTimeString.length !== 0){ $ERROR('#2: The "length" property of the toTimeString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T1.js index 95acec7b96..c81fb51810 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toTimeString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toTimeString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.4_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toTimeString.length; Date.prototype.toTimeString.length = 1; if (Date.prototype.toTimeString.length !== x) { $ERROR('#1: The Date.prototype.toTimeString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T2.js index 50b977a8f1..6cb3aa0401 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toTimeString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toTimeString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.4_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toTimeString.length !== false) { $ERROR('#1: The Date.prototype.toTimeString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toTimeString.length !== false) { if (!Date.prototype.toTimeString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toTimeString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T3.js index 06d643a037..bee1613dd3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toTimeString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toTimeString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.4_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toTimeString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toTimeString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toTimeString) { $ERROR('#2: The Date.prototype.toTimeString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/15.9.5.40_1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/15.9.5.40_1.js index c863d9df72..b34a2c6fac 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/15.9.5.40_1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/15.9.5.40_1.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.40/15.9.5.40_1.js - * @description Date.prototype.setFullYear - Date.prototype is itself an instance of Date - */ - - -function testcase() { - try { - var origYear = Date.prototype.getFullYear(); - Date.prototype.setFullYear(2012); - return Date.prototype.getFullYear()===2012; - } finally { - Date.prototype.setFullYear(origYear); - } -} -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.40_1 +description: > + Date.prototype.setFullYear - Date.prototype is itself an instance + of Date +includes: [runTestCase.js] +---*/ + +function testcase() { + try { + var origYear = Date.prototype.getFullYear(); + Date.prototype.setFullYear(2012); + return Date.prototype.getFullYear()===2012; + } finally { + Date.prototype.setFullYear(origYear); + } +} +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T1.js index eed0017227..89ee1e09c6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setFullYear" has { DontEnum } attributes +es5id: 15.9.5.40_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setFullYear; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setFullYear === x) { $ERROR('#1: The Date.prototype.setFullYear has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T2.js index f47ef8e8e4..64f1f8fcfe 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setFullYear" has { DontEnum } attributes +es5id: 15.9.5.40_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setFullYear === false) { $ERROR('#1: The Date.prototype.setFullYear property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setFullYear === false) { if (Date.prototype.hasOwnProperty('setFullYear')) { $FAIL('#2: The Date.prototype.setFullYear property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T3.js index 269dff07bc..f17124a9af 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setFullYear" has { DontEnum } attributes +es5id: 15.9.5.40_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setFullYear')) { $ERROR('#1: The Date.prototype.setFullYear property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setFullYear has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A2_T1.js index 3252fcf51d..0b7daea8c5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setFullYear" is 3 - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A2_T1.js - * @description The "length" property of the "setFullYear" is 3 - */ +/*--- +info: The "length" property of the "setFullYear" is 3 +es5id: 15.9.5.40_A2_T1 +description: The "length" property of the "setFullYear" is 3 +---*/ if(Date.prototype.setFullYear.hasOwnProperty("length") !== true){ $ERROR('#1: The setFullYear has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setFullYear.hasOwnProperty("length") !== true){ if(Date.prototype.setFullYear.length !== 3){ $ERROR('#2: The "length" property of the setFullYear is 3'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T1.js index 3f98730ba0..43e0510441 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.40_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setFullYear.length; Date.prototype.setFullYear.length = 1; if (Date.prototype.setFullYear.length !== x) { $ERROR('#1: The Date.prototype.setFullYear.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T2.js index 0178e6d617..e389b41a9a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.40_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setFullYear.length !== false) { $ERROR('#1: The Date.prototype.setFullYear.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setFullYear.length !== false) { if (!Date.prototype.setFullYear.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setFullYear.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T3.js index 81908fec21..b6866b82cf 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.40_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setFullYear.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setFullYear.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setFullYear) { $ERROR('#2: The Date.prototype.setFullYear.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T1.js index 758701c31f..ff766eaac8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "setUTCFullYear" has { DontEnum } attributes +es5id: 15.9.5.41_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.setUTCFullYear; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.setUTCFullYear === x) { $ERROR('#1: The Date.prototype.setUTCFullYear has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T2.js index b0d1be915a..7cbdd2a526 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "setUTCFullYear" has { DontEnum } attributes +es5id: 15.9.5.41_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCFullYear === false) { $ERROR('#1: The Date.prototype.setUTCFullYear property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.setUTCFullYear === false) { if (Date.prototype.hasOwnProperty('setUTCFullYear')) { $FAIL('#2: The Date.prototype.setUTCFullYear property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T3.js index 05ac995a2f..eda85331c5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "setUTCFullYear" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "setUTCFullYear" has { DontEnum } attributes +es5id: 15.9.5.41_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('setUTCFullYear')) { $ERROR('#1: The Date.prototype.setUTCFullYear property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.setUTCFullYear has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A2_T1.js index 7d606db985..af4bbcaa80 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "setUTCFullYear" is 3 - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A2_T1.js - * @description The "length" property of the "setUTCFullYear" is 3 - */ +/*--- +info: The "length" property of the "setUTCFullYear" is 3 +es5id: 15.9.5.41_A2_T1 +description: The "length" property of the "setUTCFullYear" is 3 +---*/ if(Date.prototype.setUTCFullYear.hasOwnProperty("length") !== true){ $ERROR('#1: The setUTCFullYear has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.setUTCFullYear.hasOwnProperty("length") !== true){ if(Date.prototype.setUTCFullYear.length !== 3){ $ERROR('#2: The "length" property of the setUTCFullYear is 3'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T1.js index 282dfc410b..c87f3efb8f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.setUTCFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.41_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.setUTCFullYear.length; Date.prototype.setUTCFullYear.length = 1; if (Date.prototype.setUTCFullYear.length !== x) { $ERROR('#1: The Date.prototype.setUTCFullYear.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T2.js index 02e4d52eb9..faa1ddb5f2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.setUTCFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.41_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.setUTCFullYear.length !== false) { $ERROR('#1: The Date.prototype.setUTCFullYear.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.setUTCFullYear.length !== false) { if (!Date.prototype.setUTCFullYear.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.setUTCFullYear.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T3.js index bae4122b24..69ec93c3a5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.setUTCFullYear property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.setUTCFullYear property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.41_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.setUTCFullYear.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.setUTCFullYear.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.setUTCFullYear) { $ERROR('#2: The Date.prototype.setUTCFullYear.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T1.js index 0f212776e3..79b5a337a3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toUTCString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "toUTCString" has { DontEnum } attributes +es5id: 15.9.5.42_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toUTCString; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.toUTCString === x) { $ERROR('#1: The Date.prototype.toUTCString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T2.js index 9c6e927ee8..6388ba69ac 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toUTCString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "toUTCString" has { DontEnum } attributes +es5id: 15.9.5.42_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toUTCString === false) { $ERROR('#1: The Date.prototype.toUTCString property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.toUTCString === false) { if (Date.prototype.hasOwnProperty('toUTCString')) { $FAIL('#2: The Date.prototype.toUTCString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T3.js index 6ff43e092e..c0e17f3903 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toUTCString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "toUTCString" has { DontEnum } attributes +es5id: 15.9.5.42_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toUTCString')) { $ERROR('#1: The Date.prototype.toUTCString property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toUTCString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A2_T1.js index 4f001e19a3..92011e7ff2 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toUTCString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A2_T1.js - * @description The "length" property of the "toUTCString" is 0 - */ +/*--- +info: The "length" property of the "toUTCString" is 0 +es5id: 15.9.5.42_A2_T1 +description: The "length" property of the "toUTCString" is 0 +---*/ if(Date.prototype.toUTCString.hasOwnProperty("length") !== true){ $ERROR('#1: The toUTCString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toUTCString.hasOwnProperty("length") !== true){ if(Date.prototype.toUTCString.length !== 0){ $ERROR('#2: The "length" property of the toUTCString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T1.js index d20074d8bb..4350689ef8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toUTCString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toUTCString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.42_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toUTCString.length; Date.prototype.toUTCString.length = 1; if (Date.prototype.toUTCString.length !== x) { $ERROR('#1: The Date.prototype.toUTCString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T2.js index c25c220ede..d036161318 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toUTCString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toUTCString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.42_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toUTCString.length !== false) { $ERROR('#1: The Date.prototype.toUTCString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toUTCString.length !== false) { if (!Date.prototype.toUTCString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toUTCString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T3.js index cdd78f501a..8fd365de8b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toUTCString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toUTCString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.42_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toUTCString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toUTCString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toUTCString) { $ERROR('#2: The Date.prototype.toUTCString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-10.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-10.js index c8e9efde3b..6fe840470c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-10.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-10.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-10.js - * @description Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, -99999999, 0, 0, 0, 1), the time zone is UTC(0) - */ - - -function testcase() { - var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); - var date, dateStr; - - if (timeZoneMinutes > 0) { - date = new Date(1970, 0, -99999999, 0, 0, 0, 1); - - try { - date.toISOString(); - return false; - } catch (e) { - return e instanceof RangeError; - } - } else { - date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes + 60, 0, 1); - - dateStr = date.toISOString(); - - return dateStr[dateStr.length - 1] === "Z"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-10 +description: > + Date.prototype.toISOString - RangeError is not thrown when value + of date is Date(1970, 0, -99999999, 0, 0, 0, 1), the time zone is + UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); + var date, dateStr; + + if (timeZoneMinutes > 0) { + date = new Date(1970, 0, -99999999, 0, 0, 0, 1); + + try { + date.toISOString(); + return false; + } catch (e) { + return e instanceof RangeError; + } + } else { + date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes + 60, 0, 1); + + dateStr = date.toISOString(); + + return dateStr[dateStr.length - 1] === "Z"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-11.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-11.js index 0c799c9234..4a45f844e0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-11.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-11.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-11.js - * @description Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, 100000001, 0, 0, 0, -1), the time zone is UTC(0) - */ - - -function testcase() { - var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); - var date, dateStr; - - date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes - 60, 0, -1); - dateStr = date.toISOString(); - - return dateStr[dateStr.length - 1] === "Z"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-11 +description: > + Date.prototype.toISOString - RangeError is not thrown when value + of date is Date(1970, 0, 100000001, 0, 0, 0, -1), the time zone is + UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); + var date, dateStr; + + date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes - 60, 0, -1); + dateStr = date.toISOString(); + + return dateStr[dateStr.length - 1] === "Z"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-12.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-12.js index 26fe670d6f..f5488f64da 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-12.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-12.js @@ -1,21 +1,25 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-12.js - * @description Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, 100000001, 0, 0, 0, 0), the time zone is UTC(0) - */ - - -function testcase() { - var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); - var date, dateStr; - - date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes - 60, 0, 0); - dateStr = date.toISOString(); - - return dateStr[dateStr.length - 1] === "Z"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-12 +description: > + Date.prototype.toISOString - RangeError is not thrown when value + of date is Date(1970, 0, 100000001, 0, 0, 0, 0), the time zone is + UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); + var date, dateStr; + + date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes - 60, 0, 0); + dateStr = date.toISOString(); + + return dateStr[dateStr.length - 1] === "Z"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-13.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-13.js index 6d55349b4a..43f7078a66 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-13.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-13.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-13.js - * @description Date.prototype.toISOString - RangeError is thrown when value of date is Date(1970, 0, 100000001, 0, 0, 0, 1), the time zone is UTC(0) - */ - - -function testcase() { - var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); - var date, dateStr; - try { - if (timeZoneMinutes > 0) { - date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes + 60, 0, 1); - dateStr = date.toISOString(); - return false; - } else { - date = new Date(1970, 0, 100000001, 0, 0, 0, 1); - dateStr = date.toISOString(); - return false; - } - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-13 +description: > + Date.prototype.toISOString - RangeError is thrown when value of + date is Date(1970, 0, 100000001, 0, 0, 0, 1), the time zone is + UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); + var date, dateStr; + try { + if (timeZoneMinutes > 0) { + date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes + 60, 0, 1); + dateStr = date.toISOString(); + return false; + } else { + date = new Date(1970, 0, 100000001, 0, 0, 0, 1); + dateStr = date.toISOString(); + return false; + } + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-14.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-14.js index f45aa5b80e..994a9f0081 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-14.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-14.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-14.js - * @description Date.prototype.toISOString - when value of year is -Infinity Date.prototype.toISOString throw the RangeError - */ - - -function testcase() { - var date = new Date(-Infinity, 1, 70, 0, 0, 0); - - try { - date.toISOString(); - } catch (ex) { - return ex instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-14 +description: > + Date.prototype.toISOString - when value of year is -Infinity + Date.prototype.toISOString throw the RangeError +includes: [runTestCase.js] +---*/ + +function testcase() { + var date = new Date(-Infinity, 1, 70, 0, 0, 0); + + try { + date.toISOString(); + } catch (ex) { + return ex instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-15.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-15.js index 7b2bde326c..c5522a3095 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-15.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-15.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-15.js - * @description Date.prototype.toISOString - value of year is Infinity Date.prototype.toISOString throw the RangeError - */ - - -function testcase() { - var date = new Date(Infinity, 1, 70, 0, 0, 0); - - try { - date.toISOString(); - } catch (ex) { - return ex instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-15 +description: > + Date.prototype.toISOString - value of year is Infinity + Date.prototype.toISOString throw the RangeError +includes: [runTestCase.js] +---*/ + +function testcase() { + var date = new Date(Infinity, 1, 70, 0, 0, 0); + + try { + date.toISOString(); + } catch (ex) { + return ex instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-16.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-16.js index b9bb639aae..50b10c322d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-16.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-16.js @@ -1,22 +1,26 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-16.js - * @description Date.prototype.toISOString - when this is a String object that value format is 'YYYY-MM-DDTHH:mm:ss.sssZ' Date.prototype.toISOString throw the TypeError - */ - - -function testcase() { - var date = new String("1970-01-00000:00:00.000Z"); - - try { - Date.prototype.toISOString.call(date); - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-16 +description: > + Date.prototype.toISOString - when this is a String object that + value format is 'YYYY-MM-DDTHH:mm:ss.sssZ' + Date.prototype.toISOString throw the TypeError +includes: [runTestCase.js] +---*/ + +function testcase() { + var date = new String("1970-01-00000:00:00.000Z"); + + try { + Date.prototype.toISOString.call(date); + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js index a37905d70e..ced0f11d8b 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js @@ -1,15 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js - * @description Date.prototype.toISOString must exist as a function taking 0 parameters - */ - - -function testcase() { - return Date.prototype.toISOString.length === 0; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-2 +description: > + Date.prototype.toISOString must exist as a function taking 0 + parameters +includes: [runTestCase.js] +---*/ + +function testcase() { + return Date.prototype.toISOString.length === 0; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-3.js index 2d27b31558..d789f12e44 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-3.js @@ -1,15 +1,16 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-3.js - * @description Date.prototype.toISOString must exist as a function - */ - - -function testcase() { - return typeof (Date.prototype.toISOString) === "function"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-3 +description: Date.prototype.toISOString must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + return typeof (Date.prototype.toISOString) === "function"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js index 2d716f6cea..c295e51fc1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js @@ -1,18 +1,21 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js - * @description Date.prototype.toISOString - format of returned string is 'YYYY-MM-DDTHH:mm:ss.sssZ', the time zone is UTC(0) - */ - - -function testcase() { - var date = new Date(1999, 9, 10, 10, 10, 10, 10); - var localDate = new Date(date.getTime() - date.getTimezoneOffset() * 60000); - - return localDate.toISOString() === "1999-10-10T10:10:10.010Z"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-4 +description: > + Date.prototype.toISOString - format of returned string is + 'YYYY-MM-DDTHH:mm:ss.sssZ', the time zone is UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var date = new Date(1999, 9, 10, 10, 10, 10, 10); + var localDate = new Date(date.getTime() - date.getTimezoneOffset() * 60000); + + return localDate.toISOString() === "1999-10-10T10:10:10.010Z"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-5.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-5.js index a214ce397c..8470db551d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-5.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-5.js @@ -1,16 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-5.js - * @description Date.prototype.toISOString - The returned string is the UTC time zone(0) - */ - - -function testcase() { - var dateStr = (new Date()).toISOString(); - return dateStr[dateStr.length - 1] === "Z"; - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-5 +description: > + Date.prototype.toISOString - The returned string is the UTC time + zone(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var dateStr = (new Date()).toISOString(); + return dateStr[dateStr.length - 1] === "Z"; + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-6.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-6.js index 19d0df0ea3..87e3bff725 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-6.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-6.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-6.js - * @description Date.prototype.toISOString - TypeError is thrown when this is any other objects instead of Date object - */ - - -function testcase() { - - try { - Date.prototype.toISOString.call([]); - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-6 +description: > + Date.prototype.toISOString - TypeError is thrown when this is any + other objects instead of Date object +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Date.prototype.toISOString.call([]); + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-7.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-7.js index 52c70ffeab..6d364eea1e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-7.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-7.js @@ -1,21 +1,24 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-7.js - * @description Date.prototype.toISOString - TypeError is thrown when this is any primitive values - */ - - -function testcase() { - - try { - Date.prototype.toISOString.call(15); - return false; - } catch (ex) { - return ex instanceof TypeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-7 +description: > + Date.prototype.toISOString - TypeError is thrown when this is any + primitive values +includes: [runTestCase.js] +---*/ + +function testcase() { + + try { + Date.prototype.toISOString.call(15); + return false; + } catch (ex) { + return ex instanceof TypeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-8.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-8.js index b218673454..ffbc529d5a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-8.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-8.js @@ -1,29 +1,33 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-8.js - * @description Date.prototype.toISOString - RangeError is thrown when value of date is Date(1970, 0, -99999999, 0, 0, 0, -1), the time zone is UTC(0) - */ - - -function testcase() { - var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); - var date, dateStr; - try { - if (timeZoneMinutes > 0) { - date = new Date(1970, 0, -99999999, 0, 0, 0, -1); - } else { - date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes - 60, 0, -1); - } - - dateStr = date.toISOString(); - - return false; - } catch (e) { - return e instanceof RangeError; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-8 +description: > + Date.prototype.toISOString - RangeError is thrown when value of + date is Date(1970, 0, -99999999, 0, 0, 0, -1), the time zone is + UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); + var date, dateStr; + try { + if (timeZoneMinutes > 0) { + date = new Date(1970, 0, -99999999, 0, 0, 0, -1); + } else { + date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes - 60, 0, -1); + } + + dateStr = date.toISOString(); + + return false; + } catch (e) { + return e instanceof RangeError; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-9.js b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-9.js index cd2d640e24..3f81e5c58c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-9.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-9.js @@ -1,33 +1,37 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-9.js - * @description Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, -99999999, 0, 0, 0, 0), the time zone is UTC(0) - */ - - -function testcase() { - var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); - var date, dateStr; - - if (timeZoneMinutes > 0) { - date = new Date(1970, 0, -99999999, 0, 0, 0, 0); - - try { - date.toISOString(); - return false; - } catch (e) { - return e instanceof RangeError; - } - } else { - date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes + 60, 0, 0); - - dateStr = date.toISOString(); - - return dateStr[dateStr.length - 1] === "Z"; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.43-0-9 +description: > + Date.prototype.toISOString - RangeError is not thrown when value + of date is Date(1970, 0, -99999999, 0, 0, 0, 0), the time zone is + UTC(0) +includes: [runTestCase.js] +---*/ + +function testcase() { + var timeZoneMinutes = new Date().getTimezoneOffset() * (-1); + var date, dateStr; + + if (timeZoneMinutes > 0) { + date = new Date(1970, 0, -99999999, 0, 0, 0, 0); + + try { + date.toISOString(); + return false; + } catch (e) { + return e instanceof RangeError; + } + } else { + date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes + 60, 0, 0); + + dateStr = date.toISOString(); + + return dateStr[dateStr.length - 1] === "Z"; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js index 5d0bfeb6ea..5887f82a7e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js @@ -1,18 +1,19 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js - * @description Date.prototype.toJSON must exist as a function - */ - - -function testcase() { - var f = Date.prototype.toJSON; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.44-0-1 +description: Date.prototype.toJSON must exist as a function +includes: [runTestCase.js] +---*/ + +function testcase() { + var f = Date.prototype.toJSON; + if (typeof(f) === "function") { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js index 38a34a5bc9..7b19fd7c20 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js @@ -1,17 +1,18 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. -/** - * @path ch15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js - * @description Date.prototype.toJSON must exist as a function taking 1 parameter - */ - - -function testcase() { - if (Date.prototype.toJSON.length === 1) { - return true; - } - } -runTestCase(testcase); +// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +es5id: 15.9.5.44-0-2 +description: Date.prototype.toJSON must exist as a function taking 1 parameter +includes: [runTestCase.js] +---*/ + +function testcase() { + if (Date.prototype.toJSON.length === 1) { + return true; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T1.js index 2e689a2911..074d997bb8 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "toLocaleString" has { DontEnum } attributes +es5id: 15.9.5.5_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toLocaleString; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.toLocaleString === x) { $ERROR('#1: The Date.prototype.toLocaleString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T2.js index 0597790ba2..c1061d5b58 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "toLocaleString" has { DontEnum } attributes +es5id: 15.9.5.5_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toLocaleString === false) { $ERROR('#1: The Date.prototype.toLocaleString property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.toLocaleString === false) { if (Date.prototype.hasOwnProperty('toLocaleString')) { $FAIL('#2: The Date.prototype.toLocaleString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T3.js index e50c502342..c702bf3666 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "toLocaleString" has { DontEnum } attributes +es5id: 15.9.5.5_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toLocaleString')) { $ERROR('#1: The Date.prototype.toLocaleString property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toLocaleString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A2_T1.js index 27d81cb13b..ea76419b17 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toLocaleString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A2_T1.js - * @description The "length" property of the "toLocaleString" is 0 - */ +/*--- +info: The "length" property of the "toLocaleString" is 0 +es5id: 15.9.5.5_A2_T1 +description: The "length" property of the "toLocaleString" is 0 +---*/ if(Date.prototype.toLocaleString.hasOwnProperty("length") !== true){ $ERROR('#1: The toLocaleString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toLocaleString.hasOwnProperty("length") !== true){ if(Date.prototype.toLocaleString.length !== 0){ $ERROR('#2: The "length" property of the toLocaleString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T1.js index 8c81b0c920..573b5542b9 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toLocaleString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.5_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toLocaleString.length; Date.prototype.toLocaleString.length = 1; if (Date.prototype.toLocaleString.length !== x) { $ERROR('#1: The Date.prototype.toLocaleString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T2.js index c5b47908c9..1c25c04bb4 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toLocaleString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.5_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toLocaleString.length !== false) { $ERROR('#1: The Date.prototype.toLocaleString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toLocaleString.length !== false) { if (!Date.prototype.toLocaleString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toLocaleString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T3.js index b8921b7a53..0b1ead4a03 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toLocaleString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.5_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toLocaleString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toLocaleString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toLocaleString) { $ERROR('#2: The Date.prototype.toLocaleString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T1.js index 3c133d0098..c0307da06e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleDateString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: > + The Date.prototype property "toLocaleDateString" has { DontEnum } + attributes +es5id: 15.9.5.6_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toLocaleDateString; if(x === 1) @@ -16,5 +17,3 @@ else if (Date.prototype.toLocaleDateString === x) { $ERROR('#1: The Date.prototype.toLocaleDateString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T2.js index 47f1f4277e..b1b56c4474 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleDateString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: > + The Date.prototype property "toLocaleDateString" has { DontEnum } + attributes +es5id: 15.9.5.6_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toLocaleDateString === false) { $ERROR('#1: The Date.prototype.toLocaleDateString property has not the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toLocaleDateString === false) { if (Date.prototype.hasOwnProperty('toLocaleDateString')) { $FAIL('#2: The Date.prototype.toLocaleDateString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T3.js index 4d9c51550f..01c0c37dba 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleDateString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype property "toLocaleDateString" has { DontEnum } + attributes +es5id: 15.9.5.6_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toLocaleDateString')) { $ERROR('#1: The Date.prototype.toLocaleDateString property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toLocaleDateString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A2_T1.js index c9d389f59d..932e1e69d3 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toLocaleDateString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A2_T1.js - * @description The "length" property of the "toLocaleDateString" is 0 - */ +/*--- +info: The "length" property of the "toLocaleDateString" is 0 +es5id: 15.9.5.6_A2_T1 +description: The "length" property of the "toLocaleDateString" is 0 +---*/ if(Date.prototype.toLocaleDateString.hasOwnProperty("length") !== true){ $ERROR('#1: The toLocaleDateString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toLocaleDateString.hasOwnProperty("length") !== true){ if(Date.prototype.toLocaleDateString.length !== 0){ $ERROR('#2: The "length" property of the toLocaleDateString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T1.js index 2f084f6fb1..fbec358640 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleDateString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toLocaleDateString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.6_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toLocaleDateString.length; Date.prototype.toLocaleDateString.length = 1; if (Date.prototype.toLocaleDateString.length !== x) { $ERROR('#1: The Date.prototype.toLocaleDateString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T2.js index fe41070eb9..512bcdf0b5 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleDateString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toLocaleDateString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.6_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toLocaleDateString.length !== false) { $ERROR('#1: The Date.prototype.toLocaleDateString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toLocaleDateString.length !== false) { if (!Date.prototype.toLocaleDateString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toLocaleDateString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T3.js index 711997c201..a6ebdcfb79 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleDateString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toLocaleDateString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.6_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toLocaleDateString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toLocaleDateString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toLocaleDateString) { $ERROR('#2: The Date.prototype.toLocaleDateString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T1.js index 29c7d077d0..3cd3b93c73 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T1.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleTimeString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: > + The Date.prototype property "toLocaleTimeString" has { DontEnum } + attributes +es5id: 15.9.5.7_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.toLocaleTimeString; if(x === 1) @@ -16,5 +17,3 @@ else if (Date.prototype.toLocaleTimeString === x) { $ERROR('#1: The Date.prototype.toLocaleTimeString has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T2.js index 30e58a91e0..947ed48be6 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleTimeString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: > + The Date.prototype property "toLocaleTimeString" has { DontEnum } + attributes +es5id: 15.9.5.7_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toLocaleTimeString === false) { $ERROR('#1: The Date.prototype.toLocaleTimeString property has not the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toLocaleTimeString === false) { if (Date.prototype.hasOwnProperty('toLocaleTimeString')) { $FAIL('#2: The Date.prototype.toLocaleTimeString property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T3.js index 61b3a24828..943654e883 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "toLocaleTimeString" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype property "toLocaleTimeString" has { DontEnum } + attributes +es5id: 15.9.5.7_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('toLocaleTimeString')) { $ERROR('#1: The Date.prototype.toLocaleTimeString property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.toLocaleTimeString has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A2_T1.js index be00eb3c47..59d22e85d1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "toLocaleTimeString" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A2_T1.js - * @description The "length" property of the "toLocaleTimeString" is 0 - */ +/*--- +info: The "length" property of the "toLocaleTimeString" is 0 +es5id: 15.9.5.7_A2_T1 +description: The "length" property of the "toLocaleTimeString" is 0 +---*/ if(Date.prototype.toLocaleTimeString.hasOwnProperty("length") !== true){ $ERROR('#1: The toLocaleTimeString has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.toLocaleTimeString.hasOwnProperty("length") !== true){ if(Date.prototype.toLocaleTimeString.length !== 0){ $ERROR('#2: The "length" property of the toLocaleTimeString is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T1.js index 0e95183872..9527abc0d0 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleTimeString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.toLocaleTimeString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.7_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.toLocaleTimeString.length; Date.prototype.toLocaleTimeString.length = 1; if (Date.prototype.toLocaleTimeString.length !== x) { $ERROR('#1: The Date.prototype.toLocaleTimeString.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T2.js index 36dda6272c..45a82a0032 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleTimeString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.toLocaleTimeString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.7_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.toLocaleTimeString.length !== false) { $ERROR('#1: The Date.prototype.toLocaleTimeString.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.toLocaleTimeString.length !== false) { if (!Date.prototype.toLocaleTimeString.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.toLocaleTimeString.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T3.js index 23d6b9d68e..0b88614a7d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.toLocaleTimeString property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.toLocaleTimeString property "length" has { ReadOnly, + DontDelete, DontEnum } attributes +es5id: 15.9.5.7_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.toLocaleTimeString.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.toLocaleTimeString.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.toLocaleTimeString) { $ERROR('#2: The Date.prototype.toLocaleTimeString.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T1.js index 34bec1bbc3..41fe6b943a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "valueOf" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "valueOf" has { DontEnum } attributes +es5id: 15.9.5.8_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.valueOf; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.valueOf === x) { $ERROR('#1: The Date.prototype.valueOf has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T2.js index cad6fca8e9..e0275ef29e 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "valueOf" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "valueOf" has { DontEnum } attributes +es5id: 15.9.5.8_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.valueOf === false) { $ERROR('#1: The Date.prototype.valueOf property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.valueOf === false) { if (Date.prototype.hasOwnProperty('valueOf')) { $FAIL('#2: The Date.prototype.valueOf property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T3.js index 3576b82499..b865982d90 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "valueOf" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "valueOf" has { DontEnum } attributes +es5id: 15.9.5.8_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('valueOf')) { $ERROR('#1: The Date.prototype.valueOf property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.valueOf has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A2_T1.js index 43906a3606..7b9a1c09ac 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "valueOf" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A2_T1.js - * @description The "length" property of the "valueOf" is 0 - */ +/*--- +info: The "length" property of the "valueOf" is 0 +es5id: 15.9.5.8_A2_T1 +description: The "length" property of the "valueOf" is 0 +---*/ if(Date.prototype.valueOf.hasOwnProperty("length") !== true){ $ERROR('#1: The valueOf has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.valueOf.hasOwnProperty("length") !== true){ if(Date.prototype.valueOf.length !== 0){ $ERROR('#2: The "length" property of the valueOf is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T1.js index b8651be965..9a3904a49a 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.8_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.valueOf.length; Date.prototype.valueOf.length = 1; if (Date.prototype.valueOf.length !== x) { $ERROR('#1: The Date.prototype.valueOf.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T2.js index 8730a29c35..dba8e21922 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.8_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.valueOf.length !== false) { $ERROR('#1: The Date.prototype.valueOf.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.valueOf.length !== false) { if (!Date.prototype.valueOf.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.valueOf.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T3.js index d9a983d999..8543a44aa4 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.valueOf property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.8_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.valueOf.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.valueOf.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.valueOf) { $ERROR('#2: The Date.prototype.valueOf.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T1.js index 77612f2de2..3a8d8bf588 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getTime" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T1.js - * @description Checking absence of ReadOnly attribute - */ +/*--- +info: The Date.prototype property "getTime" has { DontEnum } attributes +es5id: 15.9.5.9_A1_T1 +description: Checking absence of ReadOnly attribute +---*/ x = Date.prototype.getTime; if(x === 1) @@ -16,5 +15,3 @@ else if (Date.prototype.getTime === x) { $ERROR('#1: The Date.prototype.getTime has not the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T2.js index e31ccafae1..3b08891724 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T2.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getTime" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T2.js - * @description Checking absence of DontDelete attribute - */ +/*--- +info: The Date.prototype property "getTime" has { DontEnum } attributes +es5id: 15.9.5.9_A1_T2 +description: Checking absence of DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getTime === false) { $ERROR('#1: The Date.prototype.getTime property has not the attributes DontDelete'); @@ -15,5 +15,3 @@ if (delete Date.prototype.getTime === false) { if (Date.prototype.hasOwnProperty('getTime')) { $FAIL('#2: The Date.prototype.getTime property has not the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T3.js index e8b85fa1ac..498b154376 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T3.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype property "getTime" has { DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A1_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: The Date.prototype property "getTime" has { DontEnum } attributes +es5id: 15.9.5.9_A1_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.propertyIsEnumerable('getTime')) { $ERROR('#1: The Date.prototype.getTime property has the attribute DontEnum'); @@ -17,5 +16,3 @@ for(x in Date.prototype) { $ERROR('#2: The Date.prototype.getTime has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A2_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A2_T1.js index ef403fcbde..0e161e627f 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A2_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A2_T1.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The "length" property of the "getTime" is 0 - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A2_T1.js - * @description The "length" property of the "getTime" is 0 - */ +/*--- +info: The "length" property of the "getTime" is 0 +es5id: 15.9.5.9_A2_T1 +description: The "length" property of the "getTime" is 0 +---*/ if(Date.prototype.getTime.hasOwnProperty("length") !== true){ $ERROR('#1: The getTime has a "length" property'); @@ -15,5 +14,3 @@ if(Date.prototype.getTime.hasOwnProperty("length") !== true){ if(Date.prototype.getTime.length !== 0){ $ERROR('#2: The "length" property of the getTime is 0'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T1.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T1.js index a10f337c05..8f246a799d 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T1.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T1.js @@ -1,17 +1,16 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T1.js - * @description Checking ReadOnly attribute - */ +/*--- +info: > + The Date.prototype.getTime property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.9_A3_T1 +description: Checking ReadOnly attribute +---*/ x = Date.prototype.getTime.length; Date.prototype.getTime.length = 1; if (Date.prototype.getTime.length !== x) { $ERROR('#1: The Date.prototype.getTime.length has the attribute ReadOnly'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T2.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T2.js index b2d85ac081..f8a93b50d1 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T2.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T2.js @@ -1,12 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T2.js - * @description Checking DontDelete attribute - */ +/*--- +info: > + The Date.prototype.getTime property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.9_A3_T2 +description: Checking DontDelete attribute +includes: [$FAIL.js] +---*/ if (delete Date.prototype.getTime.length !== false) { $ERROR('#1: The Date.prototype.getTime.length property has the attributes DontDelete'); @@ -15,5 +17,3 @@ if (delete Date.prototype.getTime.length !== false) { if (!Date.prototype.getTime.hasOwnProperty('length')) { $FAIL('#2: The Date.prototype.getTime.length property has the attributes DontDelete'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T3.js b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T3.js index 20f77f3fc1..3d60b60b3c 100644 --- a/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T3.js +++ b/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T3.js @@ -1,12 +1,13 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype.getTime property "length" has { ReadOnly, DontDelete, DontEnum } attributes - * - * @path ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T3.js - * @description Checking DontEnum attribute - */ +/*--- +info: > + The Date.prototype.getTime property "length" has { ReadOnly, DontDelete, + DontEnum } attributes +es5id: 15.9.5.9_A3_T3 +description: Checking DontEnum attribute +---*/ if (Date.prototype.getTime.propertyIsEnumerable('length')) { $ERROR('#1: The Date.prototype.getTime.length property has the attribute DontEnum'); @@ -17,5 +18,3 @@ for(x in Date.prototype.getTime) { $ERROR('#2: The Date.prototype.getTime.length has the attribute DontEnum'); } } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A01_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A01_T1.js index 0f2a8e241c..176d8d1288 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A01_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A01_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "constructor" - * - * @path ch15/15.9/15.9.5/S15.9.5_A01_T1.js - * @description The Date.prototype has the property "constructor" - */ +/*--- +info: The Date.prototype has the property "constructor" +es5id: 15.9.5_A01_T1 +description: The Date.prototype has the property "constructor" +---*/ if(Date.prototype.hasOwnProperty("constructor") !== true){ $ERROR('#1: The Date.prototype has the property "constructor"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A02_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A02_T1.js index 78c72f0078..0a4702b0b7 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A02_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A02_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A02_T1.js - * @description The Date.prototype has the property "toString" - */ +/*--- +info: The Date.prototype has the property "toString" +es5id: 15.9.5_A02_T1 +description: The Date.prototype has the property "toString" +---*/ if(Date.prototype.hasOwnProperty("toString") !== true){ $ERROR('#1: The Date.prototype has the property "toString"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A03_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A03_T1.js index e73d4016be..c2b0da6f62 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A03_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A03_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toDateString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A03_T1.js - * @description The Date.prototype has the property "toDateString" - */ +/*--- +info: The Date.prototype has the property "toDateString" +es5id: 15.9.5_A03_T1 +description: The Date.prototype has the property "toDateString" +---*/ if(Date.prototype.hasOwnProperty("toDateString") !== true){ $ERROR('#1: The Date.prototype has the property "toDateString"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A04_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A04_T1.js index 6a8dd9cfe5..086c5f9836 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A04_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A04_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toTimeString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A04_T1.js - * @description The Date.prototype has the property "toTimeString" - */ +/*--- +info: The Date.prototype has the property "toTimeString" +es5id: 15.9.5_A04_T1 +description: The Date.prototype has the property "toTimeString" +---*/ if(Date.prototype.hasOwnProperty("toTimeString") !== true){ $ERROR('#1: The Date.prototype has the property "toTimeString"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A05_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A05_T1.js index f42b4f00bd..cc39554416 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A05_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A05_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toLocaleString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A05_T1.js - * @description The Date.prototype has the property "toLocaleString" - */ +/*--- +info: The Date.prototype has the property "toLocaleString" +es5id: 15.9.5_A05_T1 +description: The Date.prototype has the property "toLocaleString" +---*/ if(Date.prototype.hasOwnProperty("toLocaleString") !== true){ $ERROR('#1: The Date.prototype has the property "toLocaleString"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A06_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A06_T1.js index eb60ccdde8..c471949b49 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A06_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A06_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toLocaleDateString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A06_T1.js - * @description The Date.prototype has the property "toLocaleDateString" - */ +/*--- +info: The Date.prototype has the property "toLocaleDateString" +es5id: 15.9.5_A06_T1 +description: The Date.prototype has the property "toLocaleDateString" +---*/ if(Date.prototype.hasOwnProperty("toLocaleDateString") !== true){ $ERROR('#1: The Date.prototype has the property "toLocaleDateString"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A07_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A07_T1.js index a90a02ec64..cba4a55fe2 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A07_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A07_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toLocaleTimeString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A07_T1.js - * @description The Date.prototype has the property "toLocaleTimeString" - */ +/*--- +info: The Date.prototype has the property "toLocaleTimeString" +es5id: 15.9.5_A07_T1 +description: The Date.prototype has the property "toLocaleTimeString" +---*/ if(Date.prototype.hasOwnProperty("toLocaleTimeString") !== true){ $ERROR('#1: The Date.prototype has the property "toLocaleTimeString"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A08_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A08_T1.js index 64f0936120..51fd8fcbed 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A08_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A08_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "valueOf" - * - * @path ch15/15.9/15.9.5/S15.9.5_A08_T1.js - * @description The Date.prototype has the property "valueOf" - */ +/*--- +info: The Date.prototype has the property "valueOf" +es5id: 15.9.5_A08_T1 +description: The Date.prototype has the property "valueOf" +---*/ if(Date.prototype.hasOwnProperty("valueOf") !== true){ $ERROR('#1: The Date.prototype has the property "valueOf"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A09_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A09_T1.js index 3c8bdba83c..14d767059b 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A09_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A09_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getTime" - * - * @path ch15/15.9/15.9.5/S15.9.5_A09_T1.js - * @description The Date.prototype has the property "getTime" - */ +/*--- +info: The Date.prototype has the property "getTime" +es5id: 15.9.5_A09_T1 +description: The Date.prototype has the property "getTime" +---*/ if(Date.prototype.hasOwnProperty("getTime") !== true){ $ERROR('#1: The Date.prototype has the property "getTime"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A10_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A10_T1.js index 7f104ee373..a71ec0d5cc 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A10_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A10_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getFullYear" - * - * @path ch15/15.9/15.9.5/S15.9.5_A10_T1.js - * @description The Date.prototype has the property "getFullYear" - */ +/*--- +info: The Date.prototype has the property "getFullYear" +es5id: 15.9.5_A10_T1 +description: The Date.prototype has the property "getFullYear" +---*/ if(Date.prototype.hasOwnProperty("getFullYear") !== true){ $ERROR('#1: The Date.prototype has the property "getFullYear"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A11_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A11_T1.js index 8517a7509e..a4d6212b3d 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A11_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A11_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCFullYear" - * - * @path ch15/15.9/15.9.5/S15.9.5_A11_T1.js - * @description The Date.prototype has the property "getUTCFullYear" - */ +/*--- +info: The Date.prototype has the property "getUTCFullYear" +es5id: 15.9.5_A11_T1 +description: The Date.prototype has the property "getUTCFullYear" +---*/ if(Date.prototype.hasOwnProperty("getUTCFullYear") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCFullYear"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A12_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A12_T1.js index 416a4fcf5e..cc3c9f9606 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A12_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A12_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getMonth" - * - * @path ch15/15.9/15.9.5/S15.9.5_A12_T1.js - * @description The Date.prototype has the property "getMonth" - */ +/*--- +info: The Date.prototype has the property "getMonth" +es5id: 15.9.5_A12_T1 +description: The Date.prototype has the property "getMonth" +---*/ if(Date.prototype.hasOwnProperty("getMonth") !== true){ $ERROR('#1: The Date.prototype has the property "getMonth"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A13_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A13_T1.js index d0c727e16d..7e7c47f16a 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A13_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A13_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCMonth" - * - * @path ch15/15.9/15.9.5/S15.9.5_A13_T1.js - * @description The Date.prototype has the property "getUTCMonth" - */ +/*--- +info: The Date.prototype has the property "getUTCMonth" +es5id: 15.9.5_A13_T1 +description: The Date.prototype has the property "getUTCMonth" +---*/ if(Date.prototype.hasOwnProperty("getUTCMonth") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCMonth"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A14_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A14_T1.js index 246f3a46cb..c73a7c843b 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A14_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A14_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getDate" - * - * @path ch15/15.9/15.9.5/S15.9.5_A14_T1.js - * @description The Date.prototype has the property "getDate" - */ +/*--- +info: The Date.prototype has the property "getDate" +es5id: 15.9.5_A14_T1 +description: The Date.prototype has the property "getDate" +---*/ if(Date.prototype.hasOwnProperty("getDate") !== true){ $ERROR('#1: The Date.prototype has the property "getDate"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A15_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A15_T1.js index 2e7465dfc8..f73fbbde0a 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A15_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A15_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCDate" - * - * @path ch15/15.9/15.9.5/S15.9.5_A15_T1.js - * @description The Date.prototype has the property "getUTCDate" - */ +/*--- +info: The Date.prototype has the property "getUTCDate" +es5id: 15.9.5_A15_T1 +description: The Date.prototype has the property "getUTCDate" +---*/ if(Date.prototype.hasOwnProperty("getUTCDate") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCDate"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A16_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A16_T1.js index ef55aa7a97..f70e862429 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A16_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A16_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getDay" - * - * @path ch15/15.9/15.9.5/S15.9.5_A16_T1.js - * @description The Date.prototype has the property "getDay" - */ +/*--- +info: The Date.prototype has the property "getDay" +es5id: 15.9.5_A16_T1 +description: The Date.prototype has the property "getDay" +---*/ if(Date.prototype.hasOwnProperty("getDay") !== true){ $ERROR('#1: The Date.prototype has the property "getDay"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A17_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A17_T1.js index c9bfa485af..4dfeaaeafa 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A17_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A17_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCDay" - * - * @path ch15/15.9/15.9.5/S15.9.5_A17_T1.js - * @description The Date.prototype has the property "getUTCDay" - */ +/*--- +info: The Date.prototype has the property "getUTCDay" +es5id: 15.9.5_A17_T1 +description: The Date.prototype has the property "getUTCDay" +---*/ if(Date.prototype.hasOwnProperty("getUTCDay") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCDay"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A18_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A18_T1.js index cf8d5245b0..58b5f7dac5 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A18_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A18_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getHours" - * - * @path ch15/15.9/15.9.5/S15.9.5_A18_T1.js - * @description The Date.prototype has the property "getHours" - */ +/*--- +info: The Date.prototype has the property "getHours" +es5id: 15.9.5_A18_T1 +description: The Date.prototype has the property "getHours" +---*/ if(Date.prototype.hasOwnProperty("getHours") !== true){ $ERROR('#1: The Date.prototype has the property "getHours"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A19_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A19_T1.js index 2d5b709150..2f3ee9d448 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A19_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A19_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCHours" - * - * @path ch15/15.9/15.9.5/S15.9.5_A19_T1.js - * @description The Date.prototype has the property "getUTCHours" - */ +/*--- +info: The Date.prototype has the property "getUTCHours" +es5id: 15.9.5_A19_T1 +description: The Date.prototype has the property "getUTCHours" +---*/ if(Date.prototype.hasOwnProperty("getUTCHours") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCHours"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A20_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A20_T1.js index d0d6133ad5..9f82ae0e4f 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A20_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A20_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getMinutes" - * - * @path ch15/15.9/15.9.5/S15.9.5_A20_T1.js - * @description The Date.prototype has the property "getMinutes" - */ +/*--- +info: The Date.prototype has the property "getMinutes" +es5id: 15.9.5_A20_T1 +description: The Date.prototype has the property "getMinutes" +---*/ if(Date.prototype.hasOwnProperty("getMinutes") !== true){ $ERROR('#1: The Date.prototype has the property "getMinutes"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A21_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A21_T1.js index 12d9ca1ed6..fa92027516 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A21_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A21_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCMinutes" - * - * @path ch15/15.9/15.9.5/S15.9.5_A21_T1.js - * @description The Date.prototype has the property "getUTCMinutes" - */ +/*--- +info: The Date.prototype has the property "getUTCMinutes" +es5id: 15.9.5_A21_T1 +description: The Date.prototype has the property "getUTCMinutes" +---*/ if(Date.prototype.hasOwnProperty("getUTCMinutes") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCMinutes"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A22_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A22_T1.js index a37801e4be..a7a3abd795 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A22_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A22_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getSeconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A22_T1.js - * @description The Date.prototype has the property "getSeconds" - */ +/*--- +info: The Date.prototype has the property "getSeconds" +es5id: 15.9.5_A22_T1 +description: The Date.prototype has the property "getSeconds" +---*/ if(Date.prototype.hasOwnProperty("getSeconds") !== true){ $ERROR('#1: The Date.prototype has the property "getSeconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A23_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A23_T1.js index eeaec5dc24..6b442db801 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A23_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A23_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCSeconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A23_T1.js - * @description The Date.prototype has the property "getUTCSeconds" - */ +/*--- +info: The Date.prototype has the property "getUTCSeconds" +es5id: 15.9.5_A23_T1 +description: The Date.prototype has the property "getUTCSeconds" +---*/ if(Date.prototype.hasOwnProperty("getUTCSeconds") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCSeconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A24_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A24_T1.js index d6e868c4ee..858da5294e 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A24_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A24_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getMilliseconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A24_T1.js - * @description The Date.prototype has the property "getMilliseconds" - */ +/*--- +info: The Date.prototype has the property "getMilliseconds" +es5id: 15.9.5_A24_T1 +description: The Date.prototype has the property "getMilliseconds" +---*/ if(Date.prototype.hasOwnProperty("getMilliseconds") !== true){ $ERROR('#1: The Date.prototype has the property "getMilliseconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A25_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A25_T1.js index 04e6f1c842..ad5ed459ca 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A25_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A25_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getUTCMilliseconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A25_T1.js - * @description The Date.prototype has the property "getUTCMilliseconds" - */ +/*--- +info: The Date.prototype has the property "getUTCMilliseconds" +es5id: 15.9.5_A25_T1 +description: The Date.prototype has the property "getUTCMilliseconds" +---*/ if(Date.prototype.hasOwnProperty("getUTCMilliseconds") !== true){ $ERROR('#1: The Date.prototype has the property "getUTCMilliseconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A26_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A26_T1.js index ce76fb651a..cc4d107e8d 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A26_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A26_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "getTimezoneOffset" - * - * @path ch15/15.9/15.9.5/S15.9.5_A26_T1.js - * @description The Date.prototype has the property "getTimezoneOffset" - */ +/*--- +info: The Date.prototype has the property "getTimezoneOffset" +es5id: 15.9.5_A26_T1 +description: The Date.prototype has the property "getTimezoneOffset" +---*/ if(Date.prototype.hasOwnProperty("getTimezoneOffset") !== true){ $ERROR('#1: The Date.prototype has the property "getTimezoneOffset"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A27_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A27_T1.js index 21cd10a25f..0b6d67a0da 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A27_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A27_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setTime" - * - * @path ch15/15.9/15.9.5/S15.9.5_A27_T1.js - * @description The Date.prototype has the property "setTime" - */ +/*--- +info: The Date.prototype has the property "setTime" +es5id: 15.9.5_A27_T1 +description: The Date.prototype has the property "setTime" +---*/ if(Date.prototype.hasOwnProperty("setTime") !== true){ $ERROR('#1: The Date.prototype has the property "setTime"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A28_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A28_T1.js index 902674bedb..937f385343 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A28_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A28_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setMilliseconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A28_T1.js - * @description The Date.prototype has the property "setMilliseconds" - */ +/*--- +info: The Date.prototype has the property "setMilliseconds" +es5id: 15.9.5_A28_T1 +description: The Date.prototype has the property "setMilliseconds" +---*/ if(Date.prototype.hasOwnProperty("setMilliseconds") !== true){ $ERROR('#1: The Date.prototype has the property "setMilliseconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A29_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A29_T1.js index 2a01da0270..768a863451 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A29_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A29_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCMilliseconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A29_T1.js - * @description The Date.prototype has the property "setUTCMilliseconds" - */ +/*--- +info: The Date.prototype has the property "setUTCMilliseconds" +es5id: 15.9.5_A29_T1 +description: The Date.prototype has the property "setUTCMilliseconds" +---*/ if(Date.prototype.hasOwnProperty("setUTCMilliseconds") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCMilliseconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A30_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A30_T1.js index cda5c8f5b5..1a1ab9758c 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A30_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A30_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setSeconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A30_T1.js - * @description The Date.prototype has the property "setSeconds" - */ +/*--- +info: The Date.prototype has the property "setSeconds" +es5id: 15.9.5_A30_T1 +description: The Date.prototype has the property "setSeconds" +---*/ if(Date.prototype.hasOwnProperty("setSeconds") !== true){ $ERROR('#1: The Date.prototype has the property "setSeconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A31_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A31_T1.js index 1e01f2c56b..cc5c7f26d5 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A31_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A31_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCSeconds" - * - * @path ch15/15.9/15.9.5/S15.9.5_A31_T1.js - * @description The Date.prototype has the property "setUTCSeconds" - */ +/*--- +info: The Date.prototype has the property "setUTCSeconds" +es5id: 15.9.5_A31_T1 +description: The Date.prototype has the property "setUTCSeconds" +---*/ if(Date.prototype.hasOwnProperty("setUTCSeconds") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCSeconds"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A32_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A32_T1.js index 0af442aa9a..0ac0c4545c 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A32_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A32_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setMinutes" - * - * @path ch15/15.9/15.9.5/S15.9.5_A32_T1.js - * @description The Date.prototype has the property "setMinutes" - */ +/*--- +info: The Date.prototype has the property "setMinutes" +es5id: 15.9.5_A32_T1 +description: The Date.prototype has the property "setMinutes" +---*/ if(Date.prototype.hasOwnProperty("setMinutes") !== true){ $ERROR('#1: The Date.prototype has the property "setMinutes"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A33_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A33_T1.js index 69e26bfdd2..82efe3d528 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A33_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A33_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCMinutes" - * - * @path ch15/15.9/15.9.5/S15.9.5_A33_T1.js - * @description The Date.prototype has the property "setUTCMinutes" - */ +/*--- +info: The Date.prototype has the property "setUTCMinutes" +es5id: 15.9.5_A33_T1 +description: The Date.prototype has the property "setUTCMinutes" +---*/ if(Date.prototype.hasOwnProperty("setUTCMinutes") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCMinutes"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A34_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A34_T1.js index 5456c1809b..3b2b73be8d 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A34_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A34_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setHours" - * - * @path ch15/15.9/15.9.5/S15.9.5_A34_T1.js - * @description The Date.prototype has the property "setHours" - */ +/*--- +info: The Date.prototype has the property "setHours" +es5id: 15.9.5_A34_T1 +description: The Date.prototype has the property "setHours" +---*/ if(Date.prototype.hasOwnProperty("setHours") !== true){ $ERROR('#1: The Date.prototype has the property "setHours"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A35_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A35_T1.js index a12abf8c1c..a666d177af 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A35_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A35_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCHours" - * - * @path ch15/15.9/15.9.5/S15.9.5_A35_T1.js - * @description The Date.prototype has the property "setUTCHours" - */ +/*--- +info: The Date.prototype has the property "setUTCHours" +es5id: 15.9.5_A35_T1 +description: The Date.prototype has the property "setUTCHours" +---*/ if(Date.prototype.hasOwnProperty("setUTCHours") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCHours"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A36_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A36_T1.js index 004946dd78..ec5e0df608 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A36_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A36_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setDate" - * - * @path ch15/15.9/15.9.5/S15.9.5_A36_T1.js - * @description The Date.prototype has the property "setDate" - */ +/*--- +info: The Date.prototype has the property "setDate" +es5id: 15.9.5_A36_T1 +description: The Date.prototype has the property "setDate" +---*/ if(Date.prototype.hasOwnProperty("setDate") !== true){ $ERROR('#1: The Date.prototype has the property "setDate"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A37_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A37_T1.js index 042b9e06ef..713c2d2f8f 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A37_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A37_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCDate" - * - * @path ch15/15.9/15.9.5/S15.9.5_A37_T1.js - * @description The Date.prototype has the property "setUTCDate" - */ +/*--- +info: The Date.prototype has the property "setUTCDate" +es5id: 15.9.5_A37_T1 +description: The Date.prototype has the property "setUTCDate" +---*/ if(Date.prototype.hasOwnProperty("setUTCDate") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCDate"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A38_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A38_T1.js index 9e88846458..d88ea9f4a3 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A38_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A38_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setMonth" - * - * @path ch15/15.9/15.9.5/S15.9.5_A38_T1.js - * @description The Date.prototype has the property "setMonth" - */ +/*--- +info: The Date.prototype has the property "setMonth" +es5id: 15.9.5_A38_T1 +description: The Date.prototype has the property "setMonth" +---*/ if(Date.prototype.hasOwnProperty("setMonth") !== true){ $ERROR('#1: The Date.prototype has the property "setMonth"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A39_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A39_T1.js index bd4e26109b..db6db643b7 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A39_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A39_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCMonth" - * - * @path ch15/15.9/15.9.5/S15.9.5_A39_T1.js - * @description The Date.prototype has the property "setUTCMonth" - */ +/*--- +info: The Date.prototype has the property "setUTCMonth" +es5id: 15.9.5_A39_T1 +description: The Date.prototype has the property "setUTCMonth" +---*/ if(Date.prototype.hasOwnProperty("setUTCMonth") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCMonth"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A40_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A40_T1.js index 4364b3bf8f..4fa3965387 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A40_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A40_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setFullYear" - * - * @path ch15/15.9/15.9.5/S15.9.5_A40_T1.js - * @description The Date.prototype has the property "setFullYear" - */ +/*--- +info: The Date.prototype has the property "setFullYear" +es5id: 15.9.5_A40_T1 +description: The Date.prototype has the property "setFullYear" +---*/ if(Date.prototype.hasOwnProperty("setFullYear") !== true){ $ERROR('#1: The Date.prototype has the property "setFullYear"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A41_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A41_T1.js index a5c713dbff..83dad102f0 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A41_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A41_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "setUTCFullYear" - * - * @path ch15/15.9/15.9.5/S15.9.5_A41_T1.js - * @description The Date.prototype has the property "setUTCFullYear" - */ +/*--- +info: The Date.prototype has the property "setUTCFullYear" +es5id: 15.9.5_A41_T1 +description: The Date.prototype has the property "setUTCFullYear" +---*/ if(Date.prototype.hasOwnProperty("setUTCFullYear") !== true){ $ERROR('#1: The Date.prototype has the property "setUTCFullYear"'); } - - diff --git a/test/suite/ch15/15.9/15.9.5/S15.9.5_A42_T1.js b/test/suite/ch15/15.9/15.9.5/S15.9.5_A42_T1.js index 1183430276..636e7f55ef 100644 --- a/test/suite/ch15/15.9/15.9.5/S15.9.5_A42_T1.js +++ b/test/suite/ch15/15.9/15.9.5/S15.9.5_A42_T1.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The Date.prototype has the property "toUTCString" - * - * @path ch15/15.9/15.9.5/S15.9.5_A42_T1.js - * @description The Date.prototype has the property "toUTCString" - */ +/*--- +info: The Date.prototype has the property "toUTCString" +es5id: 15.9.5_A42_T1 +description: The Date.prototype has the property "toUTCString" +---*/ if(Date.prototype.hasOwnProperty("toUTCString") !== true){ $ERROR('#1: The Date.prototype has the property "toUTCString"'); } - - diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_callable-predicate.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_callable-predicate.js index ba66238e91..219fb79ab6 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_callable-predicate.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_callable-predicate.js @@ -1,10 +1,13 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Array.prototype.find shouldn't throw a TypeError if IsCallable(predicate) is true - */ +/*--- +description: > + Array.prototype.find shouldn't throw a TypeError if + IsCallable(predicate) is true +flags: [path] +includes: [runTestCase.js] +---*/ var callableValues = [ function () {}, diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_empty-array-undefined.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_empty-array-undefined.js index 19293c9124..b98be4f17c 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_empty-array-undefined.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_empty-array-undefined.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Find on empty array should return undefined - */ +/*--- +description: Find on empty array should return undefined +flags: [path] +---*/ var a = [].find(function () { return true; diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_length-property.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_length-property.js index 5184bd9cf5..ae30d483a8 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_length-property.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_length-property.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description The length property of the find method is 1 - */ +/*--- +description: The length property of the find method is 1 +flags: [path] +---*/ if ([].find.length !== 1) { $ERROR('1: [].find.length !== 1. Actual: ' + [].find.length); diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_modify-after-start.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_modify-after-start.js index 2fc5f4303c..4efc24fee6 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_modify-after-start.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_modify-after-start.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Array may be mutated by calls to the predicate - */ +/*--- +description: Array may be mutated by calls to the predicate +flags: [path] +---*/ [1, 2, 3].find(function (v, i, arr) { arr[i + 1] = arr[i + 1] + 1; diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_non-returning-predicate.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_non-returning-predicate.js index 0b63d32adb..bccdea5f4f 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_non-returning-predicate.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_non-returning-predicate.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Find with a predicate with no return value should return undefined - */ +/*--- +description: Find with a predicate with no return value should return undefined +flags: [path] +---*/ var a = [1, 2, 3].find(function () {}); diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_noncallable-predicate.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_noncallable-predicate.js index 1fcda5f492..320515368c 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_noncallable-predicate.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_noncallable-predicate.js @@ -1,10 +1,13 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Array.prototype.find should throw a TypeError if IsCallable(predicate) is false - */ +/*--- +description: > + Array.prototype.find should throw a TypeError if + IsCallable(predicate) is false +flags: [path] +includes: [runTestCase.js] +---*/ var uncallableValues = [ undefined, diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_predicate-arguments.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_predicate-arguments.js index 8ce1217958..81cecf94d9 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_predicate-arguments.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_predicate-arguments.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description predicate is called with three arguments: the value of the element, the index of the element, and the object being traversed. - */ +/*--- +description: > + predicate is called with three arguments: the value of the + element, the index of the element, and the object being traversed. +flags: [path] +---*/ var a = [1]; diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_push-after-start.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_push-after-start.js index 0ed0138de3..88bccb87f7 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_push-after-start.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_push-after-start.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Elements added to array after find has been called should not be visited - */ +/*--- +description: > + Elements added to array after find has been called should not be + visited +flags: [path] +---*/ [1].find(function (v, i, arr) { arr.push('string'); diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_remove-after-start.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_remove-after-start.js index 169e6fdebf..b625d7ac9c 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_remove-after-start.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_remove-after-start.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Elements removed from array after find has been called should not be visited - */ +/*--- +description: > + Elements removed from array after find has been called should not + be visited +flags: [path] +---*/ [1, 'string', 2].find(function (v, i, arr) { var stringIndex = arr.indexOf('string'); diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_return-found-value.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_return-found-value.js index b65ead1c32..f44f7afd2b 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_return-found-value.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_return-found-value.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Find should return value if predicate returns true - */ +/*--- +description: Find should return value if predicate returns true +flags: [path] +---*/ var testVals = [ undefined, diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_skip-empty.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_skip-empty.js index a24b0b8301..b00ee1eeb9 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_skip-empty.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_skip-empty.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description predicate is called only for elements of the array which actually exist; it is not called for missing elements of the array - */ +/*--- +description: > + predicate is called only for elements of the array which actually + exist; it is not called for missing elements of the array +flags: [path] +---*/ var a = []; diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js index f28f6fc4a5..acc8ba7c39 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-defined.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description thisArg should be bound to this if provided - */ +/*--- +description: thisArg should be bound to this if provided +flags: [path] +---*/ var globalThis = this; diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-is-object.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-is-object.js index 7897090a66..6fc7a4410c 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-is-object.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-is-object.js @@ -1,10 +1,11 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description Array.prototype.find should convert thisArg into an object - */ +/*--- +description: Array.prototype.find should convert thisArg into an object +flags: [path] +---*/ + var dataTypes = [ undefined, null, diff --git a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-undefined.js b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-undefined.js index 54a2c9fd42..969a588edf 100644 --- a/test/suite/es6/Array.prototype.find/Array.prototype.find_this-undefined.js +++ b/test/suite/es6/Array.prototype.find/Array.prototype.find_this-undefined.js @@ -1,10 +1,10 @@ // Copyright (c) 2014 Matthew Meyers. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @path - * @description thisArg should be undefined if not provided - */ +/*--- +description: thisArg should be undefined if not provided +flags: [path] +---*/ var globalThis = this; diff --git a/test/suite/es6/Math.fround/Math.fround_Infinity.js b/test/suite/es6/Math.fround/Math.fround_Infinity.js index 7f2d80718d..8cf240b82e 100644 --- a/test/suite/es6/Math.fround/Math.fround_Infinity.js +++ b/test/suite/es6/Math.fround/Math.fround_Infinity.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ - -/** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround - * @description Math.fround should return Infinity if called with Infinity. - * - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. + +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround" +description: Math.fround should return Infinity if called with Infinity. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.fround(Infinity) === Infinity) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.fround/Math.fround_NaN.js b/test/suite/es6/Math.fround/Math.fround_NaN.js index 6da8661916..55f958a206 100644 --- a/test/suite/es6/Math.fround/Math.fround_NaN.js +++ b/test/suite/es6/Math.fround/Math.fround_NaN.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround - * @description Math.fround should return NaN if called with NaN. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround" +description: Math.fround should return NaN if called with NaN. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.fround(NaN) === NaN) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.fround/Math.fround_Zero.js b/test/suite/es6/Math.fround/Math.fround_Zero.js index a21e49f72b..4e1514e0f2 100644 --- a/test/suite/es6/Math.fround/Math.fround_Zero.js +++ b/test/suite/es6/Math.fround/Math.fround_Zero.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.froun - * @description Math.fround should return 0 if called with 0. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.froun" +description: Math.fround should return 0 if called with 0. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.fround(0) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_Infinity.js b/test/suite/es6/Math.hypot/Math.hypot_Infinity.js index 878a1ff24e..1a3f7efb87 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_Infinity.js +++ b/test/suite/es6/Math.hypot/Math.hypot_Infinity.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return Infinity if called with any argument that is Infinity. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: > + Math.hypot should return Infinity if called with any argument that + is Infinity. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(3, Infinity) === Infinity) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_InfinityNaN.js b/test/suite/es6/Math.hypot/Math.hypot_InfinityNaN.js index 25fcd742d7..262c73243d 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_InfinityNaN.js +++ b/test/suite/es6/Math.hypot/Math.hypot_InfinityNaN.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return Infinity if called with any argument that is Infinity. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: > + Math.hypot should return Infinity if called with any argument that + is Infinity. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(NaN, Infinity) === Infinity) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_NaN.js b/test/suite/es6/Math.hypot/Math.hypot_NaN.js index c87dafc102..3077ceb2df 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_NaN.js +++ b/test/suite/es6/Math.hypot/Math.hypot_NaN.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return NaN if called with any argument that is NaN. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: > + Math.hypot should return NaN if called with any argument that is + NaN. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(NaN, 3) === NaN) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_NegInfinity.js b/test/suite/es6/Math.hypot/Math.hypot_NegInfinity.js index 01d8f25e3b..4837e0434b 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_NegInfinity.js +++ b/test/suite/es6/Math.hypot/Math.hypot_NegInfinity.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return Infinity if called with any argument that is -Infinity. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: > + Math.hypot should return Infinity if called with any argument that + is -Infinity. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(3, -Infinity) === Infinity) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_NoArgs.js b/test/suite/es6/Math.hypot/Math.hypot_NoArgs.js index fd83e4169a..3d2a5e025e 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_NoArgs.js +++ b/test/suite/es6/Math.hypot/Math.hypot_NoArgs.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return 0 if called with no arguments. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: Math.hypot should return 0 if called with no arguments. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot() === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_Success.js b/test/suite/es6/Math.hypot/Math.hypot_Success.js index d06bbe7f41..70ae769049 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_Success.js +++ b/test/suite/es6/Math.hypot/Math.hypot_Success.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return 4 if called with 3 and 2.6457513110645907. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: Math.hypot should return 4 if called with 3 and 2.6457513110645907. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(3,2.6457513110645907) === 4) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_Success_2.js b/test/suite/es6/Math.hypot/Math.hypot_Success_2.js index deeb3bfa64..e4c34e7e14 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_Success_2.js +++ b/test/suite/es6/Math.hypot/Math.hypot_Success_2.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return 5 if called with 3 and 4. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: Math.hypot should return 5 if called with 3 and 4. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(3,4) === 5) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_Zero_2.js b/test/suite/es6/Math.hypot/Math.hypot_Zero_2.js index f5eb735d21..f60f40a842 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_Zero_2.js +++ b/test/suite/es6/Math.hypot/Math.hypot_Zero_2.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot should return 0 if called with all arguments being 0. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: Math.hypot should return 0 if called with all arguments being 0. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot(0, 0) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.hypot/Math.hypot_lengthProp.js b/test/suite/es6/Math.hypot/Math.hypot_lengthProp.js index ad931f4973..77a3280b94 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_lengthProp.js +++ b/test/suite/es6/Math.hypot/Math.hypot_lengthProp.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot - * @description Math.hypot.length should return 2. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot" +description: Math.hypot.length should return 2. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.hypot.length === 2) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.trunc/Math.trunc_Infinity.js b/test/suite/es6/Math.trunc/Math.trunc_Infinity.js index 7a261c67ea..79af4aa089 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_Infinity.js +++ b/test/suite/es6/Math.trunc/Math.trunc_Infinity.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc - * @description Math.trunc should return Infinity when called with Infinity. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc" +description: Math.trunc should return Infinity when called with Infinity. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.trunc(.9) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.trunc/Math.trunc_NaN.js b/test/suite/es6/Math.trunc/Math.trunc_NaN.js index 438f316483..063fd43642 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_NaN.js +++ b/test/suite/es6/Math.trunc/Math.trunc_NaN.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc - * @description Math.trunc should return NaN when called with NaN. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc" +description: Math.trunc should return NaN when called with NaN. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.trunc(NaN) === NaN) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.trunc/Math.trunc_NegDecimal.js b/test/suite/es6/Math.trunc/Math.trunc_NegDecimal.js index 3db4a57a81..bf959729c8 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_NegDecimal.js +++ b/test/suite/es6/Math.trunc/Math.trunc_NegDecimal.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc - * @description Math.trunc should return 0 if called with a value between 0 and -1. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc" +description: Math.trunc should return 0 if called with a value between 0 and -1. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.trunc(-.9) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.trunc/Math.trunc_PosDecimal.js b/test/suite/es6/Math.trunc/Math.trunc_PosDecimal.js index f9d49e1961..b2c58955a0 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_PosDecimal.js +++ b/test/suite/es6/Math.trunc/Math.trunc_PosDecimal.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc - * @description Math.trunc should return 0 if called with a value between 0 and 1. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc" +description: Math.trunc should return 0 if called with a value between 0 and 1. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.trunc(.9) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.trunc/Math.trunc_Success.js b/test/suite/es6/Math.trunc/Math.trunc_Success.js index a9263027aa..144bf9d78c 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_Success.js +++ b/test/suite/es6/Math.trunc/Math.trunc_Success.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc - * @description Math.trunc should return 4578 if called with 4578.584949 - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc" +description: Math.trunc should return 4578 if called with 4578.584949 +includes: [runTestCase.js] +---*/ function testcase() { if(Math.trunc(4578.584949) === 4578) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Math.trunc/Math.trunc_Zero.js b/test/suite/es6/Math.trunc/Math.trunc_Zero.js index f00f8711ed..edf661baa0 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_Zero.js +++ b/test/suite/es6/Math.trunc/Math.trunc_Zero.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc - * @description Math.trunc should return 0 when called with 0. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc" +description: Math.trunc should return 0 when called with 0. +includes: [runTestCase.js] +---*/ function testcase() { if(Math.trunc(0) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isInteger/Number.isInteger_Double.js b/test/suite/es6/Number.isInteger/Number.isInteger_Double.js index 16de171e36..018c53fc84 100644 --- a/test/suite/es6/Number.isInteger/Number.isInteger_Double.js +++ b/test/suite/es6/Number.isInteger/Number.isInteger_Double.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger - * @description Number.isInteger should return false if called with a double. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger" +description: Number.isInteger should return false if called with a double. +includes: [runTestCase.js] +---*/ function testcase() { if(Number.isInteger(6.75) === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isInteger/Number.isInteger_Infinity.js b/test/suite/es6/Number.isInteger/Number.isInteger_Infinity.js index 11ba7a59e4..191633156f 100644 --- a/test/suite/es6/Number.isInteger/Number.isInteger_Infinity.js +++ b/test/suite/es6/Number.isInteger/Number.isInteger_Infinity.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger - * @description Number.isInteger should return false if called with Infinity. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger" +description: Number.isInteger should return false if called with Infinity. +includes: [runTestCase.js] +---*/ function testcase() { if(Number.isInteger(Infinity) === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isInteger/Number.isInteger_NaN.js b/test/suite/es6/Number.isInteger/Number.isInteger_NaN.js index 12cd415b5f..e1c5c5c1c5 100644 --- a/test/suite/es6/Number.isInteger/Number.isInteger_NaN.js +++ b/test/suite/es6/Number.isInteger/Number.isInteger_NaN.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger - * @description Number.isInteger should return false if called with NaN. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger" +description: Number.isInteger should return false if called with NaN. +includes: [runTestCase.js] +---*/ function testcase() { if(Number.isInteger(NaN) === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isInteger/Number.isInteger_NonNumber.js b/test/suite/es6/Number.isInteger/Number.isInteger_NonNumber.js index c7e6195872..b89c62d3b6 100644 --- a/test/suite/es6/Number.isInteger/Number.isInteger_NonNumber.js +++ b/test/suite/es6/Number.isInteger/Number.isInteger_NonNumber.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger - * @description Number.isInteger should return false if called with a string (non-Number) - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger" +description: > + Number.isInteger should return false if called with a string + (non-Number) +includes: [runTestCase.js] +---*/ function testcase() { if(Number.isInteger('2') === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isInteger/Number.isInteger_String.js b/test/suite/es6/Number.isInteger/Number.isInteger_String.js index aa427d0769..658fdf63ba 100644 --- a/test/suite/es6/Number.isInteger/Number.isInteger_String.js +++ b/test/suite/es6/Number.isInteger/Number.isInteger_String.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger - * @description Number.isInteger should return false if called with a string (non-Number) - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger" +description: > + Number.isInteger should return false if called with a string + (non-Number) +includes: [runTestCase.js] +---*/ function testcase() { if(Number.isInteger('word') === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isInteger/Number.isInteger_Success.js b/test/suite/es6/Number.isInteger/Number.isInteger_Success.js index 58f0b0fda4..c49b4bfc0b 100644 --- a/test/suite/es6/Number.isInteger/Number.isInteger_Success.js +++ b/test/suite/es6/Number.isInteger/Number.isInteger_Success.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger - * @description Number.isInteger should return true if called with an integer. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger" +description: Number.isInteger should return true if called with an integer. +includes: [runTestCase.js] +---*/ function testcase() { if(Number.isInteger(478) === true) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isNaN/Number.isNaN_Boolean.js b/test/suite/es6/Number.isNaN/Number.isNaN_Boolean.js index 78ff3c9ef2..bc984f4d1a 100644 --- a/test/suite/es6/Number.isNaN/Number.isNaN_Boolean.js +++ b/test/suite/es6/Number.isNaN/Number.isNaN_Boolean.js @@ -1,22 +1,18 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan - * @description Number.IsNaN should return false if called with a boolean. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan" +description: Number.IsNaN should return false if called with a boolean. +includes: [runTestCase.js] +---*/ function testcase() { return Number.isNaN(true); } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isNaN/Number.isNaN_NaN.js b/test/suite/es6/Number.isNaN/Number.isNaN_NaN.js index 30e470aedb..79ddbfa9ba 100644 --- a/test/suite/es6/Number.isNaN/Number.isNaN_NaN.js +++ b/test/suite/es6/Number.isNaN/Number.isNaN_NaN.js @@ -1,22 +1,18 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan - * @description Number.IsNaN should return true if called with NaN. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan" +description: Number.IsNaN should return true if called with NaN. +includes: [runTestCase.js] +---*/ function testcase() { return Number.isNaN(NaN); } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isNaN/Number.isNaN_Object.js b/test/suite/es6/Number.isNaN/Number.isNaN_Object.js index 218d5a7c12..b088e4323d 100644 --- a/test/suite/es6/Number.isNaN/Number.isNaN_Object.js +++ b/test/suite/es6/Number.isNaN/Number.isNaN_Object.js @@ -1,22 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan - * @description Number.IsNaN should return false if called with a non-number Object. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan" +description: > + Number.IsNaN should return false if called with a non-number + Object. +includes: [runTestCase.js] +---*/ function testcase() { return !Number.isNaN(new Object()); } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.isNaN/Number.isNaN_String.js b/test/suite/es6/Number.isNaN/Number.isNaN_String.js index 9f6d5ce430..b50ee38db3 100644 --- a/test/suite/es6/Number.isNaN/Number.isNaN_String.js +++ b/test/suite/es6/Number.isNaN/Number.isNaN_String.js @@ -1,22 +1,18 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan - * @description Number.IsNaN should return false if called with a String. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan" +description: Number.IsNaN should return false if called with a String. +includes: [runTestCase.js] +---*/ function testcase() { return !Number.isNaN('string'); } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.prototype.clz/Number.prototype.clz.js b/test/suite/es6/Number.prototype.clz/Number.prototype.clz.js index 3874e9c4e2..0940d37a8b 100644 --- a/test/suite/es6/Number.prototype.clz/Number.prototype.clz.js +++ b/test/suite/es6/Number.prototype.clz/Number.prototype.clz.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz - * @description Number.prototype.clz should return 32 if passed 0. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz" +description: Number.prototype.clz should return 32 if passed 0. +includes: [runTestCase.js] +---*/ function testcase() { if(Number.prototype.clz(0) === 32) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.prototype.clz/Number.prototype.clz_1.js b/test/suite/es6/Number.prototype.clz/Number.prototype.clz_1.js index 5e936b4fd0..0e89eb7c4b 100644 --- a/test/suite/es6/Number.prototype.clz/Number.prototype.clz_1.js +++ b/test/suite/es6/Number.prototype.clz/Number.prototype.clz_1.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz - * @description Number.prototype.clz should return 31 if passed 1. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz" +description: Number.prototype.clz should return 31 if passed 1. +includes: [runTestCase.js] +---*/ function testcase() { if(Number.prototype.clz(1) === 31) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/Number.prototype.clz/Number.prototype.clz_2.js b/test/suite/es6/Number.prototype.clz/Number.prototype.clz_2.js index b5c493eb13..6b7f9a8025 100644 --- a/test/suite/es6/Number.prototype.clz/Number.prototype.clz_2.js +++ b/test/suite/es6/Number.prototype.clz/Number.prototype.clz_2.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz - * @description Number.prototype.clz should return 0 if passed 2147483648 - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.prototype.clz" +description: Number.prototype.clz should return 0 if passed 2147483648 +includes: [runTestCase.js] +---*/ function testcase() { if(Number.prototype.clz(2147483648) === 0) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.contains/String.prototype.contains_FailBadLocation.js b/test/suite/es6/String.prototype.contains/String.prototype.contains_FailBadLocation.js index a0c3e7570d..ceddd3453d 100644 --- a/test/suite/es6/String.prototype.contains/String.prototype.contains_FailBadLocation.js +++ b/test/suite/es6/String.prototype.contains/String.prototype.contains_FailBadLocation.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains - * @description String should return false if a location is passed that is greather than the length of the string. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains" +description: > + String should return false if a location is passed that is + greather than the length of the string. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.contains('w', 5) === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.contains/String.prototype.contains_FailLocation.js b/test/suite/es6/String.prototype.contains/String.prototype.contains_FailLocation.js index 7cc2ca3117..9f8e383449 100644 --- a/test/suite/es6/String.prototype.contains/String.prototype.contains_FailLocation.js +++ b/test/suite/es6/String.prototype.contains/String.prototype.contains_FailLocation.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains - * @description String should return false if a letter is not found in the word starting from the passed location. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains" +description: > + String should return false if a letter is not found in the word + starting from the passed location. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.contains('o', 3) === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.contains/String.prototype.contains_FailMissingLetter.js b/test/suite/es6/String.prototype.contains/String.prototype.contains_FailMissingLetter.js index 3da0251263..a51d33fa63 100644 --- a/test/suite/es6/String.prototype.contains/String.prototype.contains_FailMissingLetter.js +++ b/test/suite/es6/String.prototype.contains/String.prototype.contains_FailMissingLetter.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains - * @description String should return false if a letter is not found in the word. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains" +description: String should return false if a letter is not found in the word. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.contains('a', 0) === false) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.contains/String.prototype.contains_Success.js b/test/suite/es6/String.prototype.contains/String.prototype.contains_Success.js index 17c71d32b1..c653e6957a 100644 --- a/test/suite/es6/String.prototype.contains/String.prototype.contains_Success.js +++ b/test/suite/es6/String.prototype.contains/String.prototype.contains_Success.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains - * @description String should return true when called on 'word' and passed 'w' and the location 0. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains" +description: > + String should return true when called on 'word' and passed 'w' and + the location 0. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.contains('w', 0)) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.contains/String.prototype.contains_SuccessNoLocation.js b/test/suite/es6/String.prototype.contains/String.prototype.contains_SuccessNoLocation.js index 5cd0fd7ca6..dc98cd2582 100644 --- a/test/suite/es6/String.prototype.contains/String.prototype.contains_SuccessNoLocation.js +++ b/test/suite/es6/String.prototype.contains/String.prototype.contains_SuccessNoLocation.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains - * @description String should return true when called on 'word' and passed 'w' and with no location (defaults to 0). - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains" +description: > + String should return true when called on 'word' and passed 'w' and + with no location (defaults to 0). +includes: [runTestCase.js] +---*/ function testcase() { if('word'.contains('w')) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.contains/String.prototype.contains_lengthProp.js b/test/suite/es6/String.prototype.contains/String.prototype.contains_lengthProp.js index 363a2a1c3e..e1580cc538 100644 --- a/test/suite/es6/String.prototype.contains/String.prototype.contains_lengthProp.js +++ b/test/suite/es6/String.prototype.contains/String.prototype.contains_lengthProp.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains - * @description String should have the property length with size of 1. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains" +description: String should have the property length with size of 1. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.contains.length === 1) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail.js b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail.js index 423207657b..8e34faaa7c 100644 --- a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail.js +++ b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail.js @@ -1,24 +1,20 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith - * @description endsWith should return false when called on 'word' and passed 'r'. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith" +description: endsWith should return false when called on 'word' and passed 'r'. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.endsWith('r')) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail_2.js b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail_2.js index 8a5dc78fe0..df4a5c5724 100644 --- a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail_2.js +++ b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Fail_2.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith - * @description endsWith should return false when called on 'word' and passed 'd', with an endPosition of 3. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith" +description: > + endsWith should return false when called on 'word' and passed 'd', + with an endPosition of 3. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.endsWith('d',3)) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success.js b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success.js index 033022dca0..4128c4d335 100644 --- a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success.js +++ b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith - * @description endsWith should return true when called on 'word' and passed 'd' and with no endPosition (defaults to 4). - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith" +description: > + endsWith should return true when called on 'word' and passed 'd' + and with no endPosition (defaults to 4). +includes: [runTestCase.js] +---*/ function testcase() { if('word'.endsWith('d')) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_2.js b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_2.js index 525e2a4b8c..4314942775 100644 --- a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_2.js +++ b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_2.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith - * @description endsWith should return true when called on 'word' and passed 'd' and with an endPosition of 4. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith" +description: > + endsWith should return true when called on 'word' and passed 'd' + and with an endPosition of 4. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.endsWith('d', 4)) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_3.js b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_3.js index 79dc7beb16..369b76c154 100644 --- a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_3.js +++ b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_3.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith - * @description endsWith should return true when called on 'word' and passed 'd' and with an endPosition of 25. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith" +description: > + endsWith should return true when called on 'word' and passed 'd' + and with an endPosition of 25. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.endsWith('d', 25)) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_4.js b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_4.js index 3c829ebc71..1954027b9a 100644 --- a/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_4.js +++ b/test/suite/es6/String.prototype.endsWith/String.prototype.endsWith_Success_4.js @@ -1,24 +1,22 @@ -/**Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - */ +// Copyright (c) 2014, Ryan Lewis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +// 2. 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. +// 3. Neither the name of the copyright holder nor the names of its contributors may be used to 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 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. - /** - * - * @author Ryan Lewis - * @email ryanhlewis@hotmail.com - * @spec http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith - * @description endsWith should return true when called on 'word' and passed 'r', with an endPosition of 3. - * - */ +/*--- +author: Ryan Lewis +email: ryanhlewis@hotmail.com +spec: "http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith" +description: > + endsWith should return true when called on 'word' and passed 'r', + with an endPosition of 3. +includes: [runTestCase.js] +---*/ function testcase() { if('word'.endsWith('r',3)) { return true; } } -runTestCase(testcase); \ No newline at end of file +runTestCase(testcase); diff --git a/test/suite/es6/bug_596_1.js b/test/suite/es6/bug_596_1.js index 5f742a5df7..03462a2f89 100644 --- a/test/suite/es6/bug_596_1.js +++ b/test/suite/es6/bug_596_1.js @@ -1,35 +1,32 @@ -// Copyright (c) 2014, Thomas Dahlstrom All rights reserved. Redistribution -// and use in source and binary forms, with or without modification, are +// Copyright (c) 2014, Thomas Dahlstrom All rights reserved. Redistribution +// and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright +// // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the +// 2. 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. -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to 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 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 -// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/** - * @path es6/bug_596_1.js - * @description The SortCompare abstract operation calls ToString() for - * identical elements (step 14/15) - * @author Thomas Dahlstrom (tdahlstrom@gmail.com) - */ +/*--- +description: > + The SortCompare abstract operation calls ToString() for identical + elements (step 14/15) +author: Thomas Dahlstrom (tdahlstrom@gmail.com) +---*/ var counter = 0; var object = { @@ -44,4 +41,3 @@ if (counter < 2) { // sort calls ToString() for each element at least once $ERROR('#1: [object, object].sort(); counter < 22. Actual: ' + (counter)); } - diff --git a/test/suite/es6/bug_596_2.js b/test/suite/es6/bug_596_2.js index 3ba1c468b0..40284b0a22 100644 --- a/test/suite/es6/bug_596_2.js +++ b/test/suite/es6/bug_596_2.js @@ -1,35 +1,33 @@ -// Copyright (c) 2014, Thomas Dahlstrom All rights reserved. Redistribution -// and use in source and binary forms, with or without modification, are +// Copyright (c) 2014, Thomas Dahlstrom All rights reserved. Redistribution +// and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright +// // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the +// 2. 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. -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to 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 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 -// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 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, 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. +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -/** - * @path es6/bug_596_2.js - * @description Array.prototype.sort does not change non-existent elements to - * undefined elements, that means holes are preserved (cf. spec - * text about [[Delete]] and sparse arrays) - * @author Thomas Dahlstrom (tdahlstrom@gmail.com) - */ +/*--- +description: > + Array.prototype.sort does not change non-existent elements to + undefined elements, that means holes are preserved (cf. spec text + about [[Delete]] and sparse arrays) +author: Thomas Dahlstrom (tdahlstrom@gmail.com) +---*/ var array = ['a',,void 0]; @@ -74,4 +72,3 @@ if (array.hasOwnProperty('1') !== true) { if (array.hasOwnProperty('2') !== false) { $ERROR("#8: array.hasOwnProperty('2'). Actual: " + array.hasOwnProperty('2')); } - diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T1.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T1.js index 1421c43661..21b10c51d6 100644 --- a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T1.js +++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T1.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Hank Yates. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Testing Array.from when passed a String - * @author Hank Yates (hankyates@gmail.com) - */ +/*--- +es5id: 22.1.2.1_T1 +description: Testing Array.from when passed a String +author: Hank Yates (hankyates@gmail.com) +includes: [runTestCase.js] +---*/ runTestCase(function () { var arrLikeSource = 'testValue', diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T2.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T2.js index b9012e7e89..c00c8bb301 100644 --- a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T2.js +++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T2.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Hank Yates. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Testing Array.from when passed an Object is passed - * @author Hank Yates (hankyates@gmail.com) - */ +/*--- +es5id: 22.1.2.1_T2 +description: Testing Array.from when passed an Object is passed +author: Hank Yates (hankyates@gmail.com) +includes: [runTestCase.js] +---*/ runTestCase(function () { var testArr = Array.from({ diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T3.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T3.js index f9bb4ff534..057fd4821c 100644 --- a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T3.js +++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.1_T3.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Hank Yates. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Testing Array.from when passed an undefined - * @author Hank Yates (hankyates@gmail.com) - */ +/*--- +es5id: 22.1.2.1_T3 +description: Testing Array.from when passed an undefined +author: Hank Yates (hankyates@gmail.com) +includes: [runTestCase.js] +---*/ runTestCase(function () { try { @@ -16,4 +18,3 @@ runTestCase(function () { return false; }); - diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js index a3dba8669f..6e9ae86f1e 100644 --- a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js +++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T1.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Hank Yates. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Testing Array#of when passed Strings - * @author Hank Yates (hankyates@gmail.com) - */ +/*--- +es5id: 22.1.2.3_T1 +description: Testing Array#of when passed Strings +author: Hank Yates (hankyates@gmail.com) +includes: [runTestCase.js] +---*/ runTestCase(function () { var testArr = Array.of('testString', 'anotherTestString'); diff --git a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js index 4a93a5b371..5fca44e64e 100644 --- a/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js +++ b/test/suite/es6/ch22/22.1/22.1.2/S22.1.2.3_T2.js @@ -1,9 +1,12 @@ // Copyright (c) 2014 Hank Yates. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Testing Array#of when passed single argument - * @author Hank Yates (hankyates@gmail.com) - */ + +/*--- +es5id: 22.1.2.3_T2 +description: Testing Array#of when passed single argument +author: Hank Yates (hankyates@gmail.com) +includes: [runTestCase.js] +---*/ runTestCase(function () { var testArr = Array.of(3); diff --git a/test/suite/es6/ch22/22.1/22.1.3/S22.1.3.6_T1.js b/test/suite/es6/ch22/22.1/22.1.3/S22.1.3.6_T1.js index 755722da6c..a60f70aca5 100644 --- a/test/suite/es6/ch22/22.1/22.1.3/S22.1.3.6_T1.js +++ b/test/suite/es6/ch22/22.1/22.1.3/S22.1.3.6_T1.js @@ -1,10 +1,12 @@ // Copyright (c) 2014 Hank Yates. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Testing Array#fill - * @author Hank Yates (hankyates@gmail.com) - */ +/*--- +es5id: 22.1.3.6_T1 +description: Testing Array#fill +author: Hank Yates (hankyates@gmail.com) +includes: [runTestCase.js] +---*/ runTestCase(function () { var testArr = new Array('testString', 'anotherTestString', 3), diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.1_T1.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.1_T1.js index 0f7c216a53..353ff861f9 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.1_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.1_T1.js @@ -1,14 +1,14 @@ // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all is callable - * - * @author Sam Mikes - */ +/*--- +info: Promise.all is callable +es5id: 25.4.4.1_A1.1_T1 +author: Sam Mikes +---*/ // CHECK#1 var x = typeof Promise.all; diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.2_T1.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.2_T1.js index 49b563e1c9..b4b50d6746 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.2_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A1.2_T1.js @@ -1,14 +1,14 @@ -/// Copyright 2012 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Copyright 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all expects 1 argument - * - * @author Sam Mikes - */ +/*--- +info: Promise.all expects 1 argument +es5id: 25.4.4.1_A1.2_T1 +author: Sam Mikes +---*/ // CHECK#1 var x = Promise.all.length; diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.1_T1.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.1_T1.js index f73d5b21a7..e1673e6ec3 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.1_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.1_T1.js @@ -1,14 +1,14 @@ // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all([]) is a Promise - * - * @author Sam Mikes - */ +/*--- +info: Promise.all([]) is a Promise +es5id: 25.4.4.1_A2.1_T1 +author: Sam Mikes +---*/ // CHECK#1 var x = (Promise.all([]) instanceof Promise); diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.2_T1.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.2_T1.js index 2f07cd1928..a6a0030eae 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.2_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.2_T1.js @@ -1,16 +1,16 @@ // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all([]) is resolved immediately - * - * @author Sam Mikes - */ +/*--- +info: Promise.all([]) is resolved immediately +es5id: 25.4.4.1_A2.2_T1 +author: Sam Mikes +includes: [PromiseHelper.js] +---*/ -$INCLUDE("PromiseHelper.js"); var sequence = []; Promise.all([]).then(function () { diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T1.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T1.js index 3ef2899127..b2c18dfca6 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T1.js @@ -1,15 +1,14 @@ - // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all is resolved with a new empty array - * - * @author Sam Mikes - */ +/*--- +info: Promise.all is resolved with a new empty array +es5id: 25.4.4.1_A2.3_T1 +author: Sam Mikes +---*/ var arg = []; diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T2.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T2.js index 4615e1dae9..cfdbcb4fa6 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T2.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T2.js @@ -1,15 +1,14 @@ - // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all is resolved with a new empty array - * - * @author Sam Mikes - */ +/*--- +info: Promise.all is resolved with a new empty array +es5id: 25.4.4.1_A2.3_T2 +author: Sam Mikes +---*/ var arg = []; diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T3.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T3.js index 264208e34e..78bc8ad16d 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T3.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A2.3_T3.js @@ -1,15 +1,14 @@ - // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all is resolved with a new empty array - * - * @author Sam Mikes - */ +/*--- +info: Promise.all is resolved with a new empty array +es5id: 25.4.4.1_A2.3_T3 +author: Sam Mikes +---*/ var arg = []; diff --git a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A3.1_T1.js b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A3.1_T1.js index 1f755760bf..b11aa6d748 100644 --- a/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A3.1_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.4/25.4.4.1/S25.4.4.1_A3.1_T1.js @@ -1,16 +1,17 @@ // Copyright 2014 Ecma International. All rights reserved. -/// Ecma International makes this code available under the terms and conditions set -/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the -/// "Use Terms"). Any redistribution of this code must retain the above -/// copyright and this notice and otherwise comply with the Use Terms. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. -/** - * Promise.all expects an iterable argument; - * ref 7.4.1 non-Object fails CheckIterable - * ref 7.4.2 GetIterator throws TypeError if CheckIterable fails - * - * @author Sam Mikes - */ +/*--- +info: > + Promise.all expects an iterable argument; + ref 7.4.1 non-Object fails CheckIterable + ref 7.4.2 GetIterator throws TypeError if CheckIterable fails +es5id: 25.4.4.1_A3.1_T1 +author: Sam Mikes +---*/ var nonIterable = 3; diff --git a/test/suite/intl402/ch06/6.2/6.2.2_a.js b/test/suite/intl402/ch06/6.2/6.2.2_a.js index a56894570b..92457d1ded 100644 --- a/test/suite/intl402/ch06/6.2/6.2.2_a.js +++ b/test/suite/intl402/ch06/6.2/6.2.2_a.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that structurally valid language tags are accepted. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 6.2.2_a +description: Tests that structurally valid language tags are accepted. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var validLanguageTags = [ "de", // ISO 639 language code @@ -37,4 +37,3 @@ testWithIntlConstructors(function (Constructor) { }); return true; }); - diff --git a/test/suite/intl402/ch06/6.2/6.2.2_b.js b/test/suite/intl402/ch06/6.2/6.2.2_b.js index 42d69e7c2e..17552f207f 100644 --- a/test/suite/intl402/ch06/6.2/6.2.2_b.js +++ b/test/suite/intl402/ch06/6.2/6.2.2_b.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that language tags with "_" are not accepted. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 6.2.2_b +description: Tests that language tags with "_" are not accepted. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var invalidLanguageTags = [ "de_DE", @@ -38,4 +38,3 @@ testWithIntlConstructors(function (Constructor) { }); return true; }); - diff --git a/test/suite/intl402/ch06/6.2/6.2.2_c.js b/test/suite/intl402/ch06/6.2/6.2.2_c.js index 6d669ebefd..70467f4939 100644 --- a/test/suite/intl402/ch06/6.2/6.2.2_c.js +++ b/test/suite/intl402/ch06/6.2/6.2.2_c.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that language tags with invalid subtag sequences are not accepted. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 6.2.2_c +description: > + Tests that language tags with invalid subtag sequences are not + accepted. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var invalidLanguageTags = [ "", // empty tag @@ -44,4 +46,3 @@ testWithIntlConstructors(function (Constructor) { }); return true; }); - diff --git a/test/suite/intl402/ch06/6.2/6.2.3.js b/test/suite/intl402/ch06/6.2/6.2.3.js index 4ae15ab271..3066ba1a85 100644 --- a/test/suite/intl402/ch06/6.2/6.2.3.js +++ b/test/suite/intl402/ch06/6.2/6.2.3.js @@ -2,12 +2,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that language tags are canonicalized in return values. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 6.2.3 +description: Tests that language tags are canonicalized in return values. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var canonicalizedTags = { "de": ["de"], @@ -66,4 +66,3 @@ testWithIntlConstructors(function (Constructor) { }); return true; }); - diff --git a/test/suite/intl402/ch06/6.2/6.2.4.js b/test/suite/intl402/ch06/6.2/6.2.4.js index 6ca47af142..e46e7d706b 100644 --- a/test/suite/intl402/ch06/6.2/6.2.4.js +++ b/test/suite/intl402/ch06/6.2/6.2.4.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the default locale is a String value representing the - * structurally valid and canonicalized BCP 47 language tag. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 6.2.4 +description: > + Tests that the default locale is a String value representing the + structurally valid and canonicalized BCP 47 language tag. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var defaultLocale = new Constructor().resolvedOptions().locale; @@ -16,4 +17,3 @@ testWithIntlConstructors(function (Constructor) { } return true; }); - diff --git a/test/suite/intl402/ch06/6.3/6.3.1_a.js b/test/suite/intl402/ch06/6.3/6.3.1_a.js index 01cc18b030..d434021601 100644 --- a/test/suite/intl402/ch06/6.3/6.3.1_a.js +++ b/test/suite/intl402/ch06/6.3/6.3.1_a.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that well-formed currency codes are accepted. - * @author Norbert Lindenberg - */ +/*--- +es5id: 6.3.1_a +description: Tests that well-formed currency codes are accepted. +author: Norbert Lindenberg +---*/ var wellFormedCurrencyCodes = [ "BOB", @@ -22,4 +23,3 @@ wellFormedCurrencyCodes.forEach(function (code) { format.resolvedOptions().currency + "."); } }); - diff --git a/test/suite/intl402/ch06/6.3/6.3.1_b.js b/test/suite/intl402/ch06/6.3/6.3.1_b.js index 038dd1fc4a..a9c1a659bd 100644 --- a/test/suite/intl402/ch06/6.3/6.3.1_b.js +++ b/test/suite/intl402/ch06/6.3/6.3.1_b.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that invalid currency codes are not accepted. - * @author Norbert Lindenberg - */ +/*--- +es5id: 6.3.1_b +description: Tests that invalid currency codes are not accepted. +author: Norbert Lindenberg +---*/ var invalidCurrencyCodes = [ "", @@ -32,4 +33,3 @@ invalidCurrencyCodes.forEach(function (code) { $ERROR("Invalid currency code '" + code + "' was rejected with wrong error " + error.name + "."); } }); - diff --git a/test/suite/intl402/ch06/6.4/6.4_a.js b/test/suite/intl402/ch06/6.4/6.4_a.js index 05202353c0..e85ff366a6 100644 --- a/test/suite/intl402/ch06/6.4/6.4_a.js +++ b/test/suite/intl402/ch06/6.4/6.4_a.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that valid time zone names are accepted. - * @author Norbert Lindenberg - */ +/*--- +es5id: 6.4_a +description: Tests that valid time zone names are accepted. +author: Norbert Lindenberg +---*/ var validTimeZoneNames = [ "UTC", @@ -19,4 +20,3 @@ validTimeZoneNames.forEach(function (name) { format.resolvedOptions().timeZone + "."); } }); - diff --git a/test/suite/intl402/ch06/6.4/6.4_b.js b/test/suite/intl402/ch06/6.4/6.4_b.js index 847d804e3c..92be9acd06 100644 --- a/test/suite/intl402/ch06/6.4/6.4_b.js +++ b/test/suite/intl402/ch06/6.4/6.4_b.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that invalid time zone names are not accepted. - * @author Norbert Lindenberg - */ +/*--- +es5id: 6.4_b +description: Tests that invalid time zone names are not accepted. +author: Norbert Lindenberg +---*/ var invalidTimeZoneNames = [ "", @@ -31,4 +32,3 @@ invalidTimeZoneNames.forEach(function (name) { $ERROR("Invalid time zone name " + name + " was rejected with wrong error " + error.name + "."); } }); - diff --git a/test/suite/intl402/ch06/6.4/6.4_c.js b/test/suite/intl402/ch06/6.4/6.4_c.js index a9969b6485..e572e5141a 100644 --- a/test/suite/intl402/ch06/6.4/6.4_c.js +++ b/test/suite/intl402/ch06/6.4/6.4_c.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that additional time zone names, if accepted, are handled correctly. - * @author Norbert Lindenberg - */ +/*--- +es5id: 6.4_c +description: > + Tests that additional time zone names, if accepted, are handled + correctly. +author: Norbert Lindenberg +---*/ // canonicalization specified in conformance clause var additionalTimeZoneNames = { @@ -33,4 +36,3 @@ Object.getOwnPropertyNames(additionalTimeZoneNames).forEach(function (name) { $ERROR("Time zone name " + name + " was rejected with wrong error " + error.name + "."); } }); - diff --git a/test/suite/intl402/ch08/8.0/8.0.js b/test/suite/intl402/ch08/8.0/8.0.js index dedda973b2..20a9142498 100644 --- a/test/suite/intl402/ch08/8.0/8.0.js +++ b/test/suite/intl402/ch08/8.0/8.0.js @@ -1,12 +1,12 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl has Object.prototype as its prototype. - * @author Norbert Lindenberg - */ +/*--- +es5id: 8.0 +description: Tests that Intl has Object.prototype as its prototype. +author: Norbert Lindenberg +---*/ if (Object.getPrototypeOf(Intl) !== Object.prototype) { $ERROR("Intl doesn't have Object.prototype as its prototype."); } - diff --git a/test/suite/intl402/ch08/8.0/8.0_L15.js b/test/suite/intl402/ch08/8.0/8.0_L15.js index 0174bef54e..6304c79089 100644 --- a/test/suite/intl402/ch08/8.0/8.0_L15.js +++ b/test/suite/intl402/ch08/8.0/8.0_L15.js @@ -1,15 +1,17 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 8.0_L15 +description: > + Tests that Intl meets the requirements for built-in objects + defined by the introduction of chapter 15 of the ECMAScript + Language Specification. +author: Norbert Lindenberg +includes: + - fnGlobalObject.js + - testBuiltInObject.js +---*/ testBuiltInObject(fnGlobalObject().Intl, false, false, []); testBuiltInObject(Intl, false, false, ["Collator", "NumberFormat", "DateTimeFormat"]); - diff --git a/test/suite/intl402/ch09/9.1/9.1_a.js b/test/suite/intl402/ch09/9.1/9.1_a.js index b7358304bb..8e3f25c407 100644 --- a/test/suite/intl402/ch09/9.1/9.1_a.js +++ b/test/suite/intl402/ch09/9.1/9.1_a.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that default locale is available. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.1_a +description: Tests that default locale is available. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var defaultLocale = new Constructor().resolvedOptions().locale; @@ -15,4 +15,3 @@ testWithIntlConstructors(function (Constructor) { $ERROR("Default locale is not reported as available."); } }); - diff --git a/test/suite/intl402/ch09/9.1/9.1_b.js b/test/suite/intl402/ch09/9.1/9.1_b.js index a0abc7fc14..53eddcf859 100644 --- a/test/suite/intl402/ch09/9.1/9.1_b.js +++ b/test/suite/intl402/ch09/9.1/9.1_b.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that appropriate fallback locales are provided for - * supported locales. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.1_b +description: > + Tests that appropriate fallback locales are provided for + supported locales. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var info = getLocaleSupportInfo(Constructor); @@ -29,4 +30,3 @@ testWithIntlConstructors(function (Constructor) { } }); }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.1_1.js b/test/suite/intl402/ch09/9.2/9.2.1_1.js index 7386fdeda0..baf4684846 100644 --- a/test/suite/intl402/ch09/9.2/9.2.1_1.js +++ b/test/suite/intl402/ch09/9.2/9.2.1_1.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that canonicalization of locale lists treats undefined and empty lists the same. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.1_1 +description: > + Tests that canonicalization of locale lists treats undefined and + empty lists the same. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var supportedForUndefined = Constructor.supportedLocalesOf(undefined); @@ -20,4 +22,3 @@ testWithIntlConstructors(function (Constructor) { } return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.1_2.js b/test/suite/intl402/ch09/9.2/9.2.1_2.js index e4fb3756db..8894010c65 100644 --- a/test/suite/intl402/ch09/9.2/9.2.1_2.js +++ b/test/suite/intl402/ch09/9.2/9.2.1_2.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a List is not affected by adversarial - * changes to Array.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.1_2 +description: > + Tests that the behavior of a List is not affected by adversarial + changes to Array.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintArray(); @@ -18,4 +19,3 @@ testWithIntlConstructors(function (Constructor) { $ERROR("Canonicalization didn't remove duplicate language tags from locale list."); } }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.1_3.js b/test/suite/intl402/ch09/9.2/9.2.1_3.js index e403b17653..4010c54010 100644 --- a/test/suite/intl402/ch09/9.2/9.2.1_3.js +++ b/test/suite/intl402/ch09/9.2/9.2.1_3.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that a single string instead of a locale list is treated - * as the locale list containing that string. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.1_3 +description: > + Tests that a single string instead of a locale list is treated as + the locale list containing that string. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var validAndInvalidLanguageTags = [ "de", // ISO 639 language code @@ -84,4 +85,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.1_4.js b/test/suite/intl402/ch09/9.2/9.2.1_4.js index b9bb9db79d..1841d42dc0 100644 --- a/test/suite/intl402/ch09/9.2/9.2.1_4.js +++ b/test/suite/intl402/ch09/9.2/9.2.1_4.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that non-objects are converted to objects before canonicalization. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.1_4 +description: > + Tests that non-objects are converted to objects before + canonicalization. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { // undefined is handled separately @@ -43,4 +45,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.1_8_c_ii.js b/test/suite/intl402/ch09/9.2/9.2.1_8_c_ii.js index 8dfb9b7b37..24b97137a0 100644 --- a/test/suite/intl402/ch09/9.2/9.2.1_8_c_ii.js +++ b/test/suite/intl402/ch09/9.2/9.2.1_8_c_ii.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that values other than strings are not accepted as locales. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.1_8_c_ii +description: Tests that values other than strings are not accepted as locales. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var notStringOrObject = [undefined, null, true, false, 0, 5, -5, NaN]; @@ -27,4 +27,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.1_8_c_vi.js b/test/suite/intl402/ch09/9.2/9.2.1_8_c_vi.js index ef78fa97b0..ef4b50290c 100644 --- a/test/suite/intl402/ch09/9.2/9.2.1_8_c_vi.js +++ b/test/suite/intl402/ch09/9.2/9.2.1_8_c_vi.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that canonicalization of locale lists removes duplicate language tags. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.1_8_c_vi +description: > + Tests that canonicalization of locale lists removes duplicate + language tags. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var defaultLocale = new Constructor().resolvedOptions().locale; @@ -15,4 +17,3 @@ testWithIntlConstructors(function (Constructor) { $ERROR("Canonicalization didn't remove duplicate language tags from locale list."); } }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.2.js b/test/suite/intl402/ch09/9.2/9.2.2.js index cb74eaad2a..576cbcd23c 100644 --- a/test/suite/intl402/ch09/9.2/9.2.2.js +++ b/test/suite/intl402/ch09/9.2/9.2.2.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that locales that are reported by resolvedOptions - * are also reported by supportedLocalesOf. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.2 +description: > + Tests that locales that are reported by resolvedOptions are also + reported by supportedLocalesOf. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var info = getLocaleSupportInfo(Constructor); @@ -42,4 +43,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.3_5.js b/test/suite/intl402/ch09/9.2/9.2.3_5.js index 8ae8a216b6..ec9e25cca9 100644 --- a/test/suite/intl402/ch09/9.2/9.2.3_5.js +++ b/test/suite/intl402/ch09/9.2/9.2.3_5.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.3_5 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["locale", "extension", "extensionIndex"]); @@ -19,4 +20,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.5_11_g_ii_2.js b/test/suite/intl402/ch09/9.2/9.2.5_11_g_ii_2.js index d4213d2dae..f7af9512c0 100644 --- a/test/suite/intl402/ch09/9.2/9.2.5_11_g_ii_2.js +++ b/test/suite/intl402/ch09/9.2/9.2.5_11_g_ii_2.js @@ -2,11 +2,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that missing Unicode extension values default to true for - * boolean keys. - * @author Norbert Lindenberg - */ +/*--- +es5id: 9.2.5_11_g_ii_2 +description: > + Tests that missing Unicode extension values default to true for + boolean keys. +author: Norbert Lindenberg +---*/ var extensions = ["-u-co-phonebk-kn", "-u-kn-co-phonebk"]; extensions.forEach(function (extension) { @@ -23,4 +25,3 @@ extensions.forEach(function (extension) { } } }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.5_6.js b/test/suite/intl402/ch09/9.2/9.2.5_6.js index 4bc904ee17..4a5e774369 100644 --- a/test/suite/intl402/ch09/9.2/9.2.5_6.js +++ b/test/suite/intl402/ch09/9.2/9.2.5_6.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.5_6 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["dataLocale", "nu", "ca", "co", "locale"]); @@ -19,4 +20,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.6_2.js b/test/suite/intl402/ch09/9.2/9.2.6_2.js index 8d4f7efa9b..945043a691 100644 --- a/test/suite/intl402/ch09/9.2/9.2.6_2.js +++ b/test/suite/intl402/ch09/9.2/9.2.6_2.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a List is not affected by adversarial - * changes to Array.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.6_2 +description: > + Tests that the behavior of a List is not affected by adversarial + changes to Array.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintArray(); @@ -24,4 +25,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.6_4.js b/test/suite/intl402/ch09/9.2/9.2.6_4.js index 7c053a381d..b8d1d5b351 100644 --- a/test/suite/intl402/ch09/9.2/9.2.6_4.js +++ b/test/suite/intl402/ch09/9.2/9.2.6_4.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that LookupSupportedLocales returns an empty list when - * given an empty list. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.6_4 +description: > + Tests that LookupSupportedLocales returns an empty list when + given an empty list. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { // this test should work equally for both matching algorithms @@ -20,4 +21,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.6_4_b.js b/test/suite/intl402/ch09/9.2/9.2.6_4_b.js index a998e3378e..c65293c92e 100644 --- a/test/suite/intl402/ch09/9.2/9.2.6_4_b.js +++ b/test/suite/intl402/ch09/9.2/9.2.6_4_b.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Unicode locale extension sequences do not affect - * whether a locale is considered supported, but are reported back. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.6_4_b +description: > + Tests that Unicode locale extension sequences do not affect + whether a locale is considered supported, but are reported back. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { // this test should work equally for both matching algorithms @@ -43,4 +44,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.6_4_c.js b/test/suite/intl402/ch09/9.2/9.2.6_4_c.js index de68a9b664..0f895c6d97 100644 --- a/test/suite/intl402/ch09/9.2/9.2.6_4_c.js +++ b/test/suite/intl402/ch09/9.2/9.2.6_4_c.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that LookupSupportedLocales includes the default locale - * and doesn't include the "no linguistic content" locale. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.6_4_c +description: > + Tests that LookupSupportedLocales includes the default locale and + doesn't include the "no linguistic content" locale. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { // this test should work equally for both matching algorithms @@ -29,4 +30,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.8_1_c.js b/test/suite/intl402/ch09/9.2/9.2.8_1_c.js index 724db1edd1..f475389174 100644 --- a/test/suite/intl402/ch09/9.2/9.2.8_1_c.js +++ b/test/suite/intl402/ch09/9.2/9.2.8_1_c.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option localeMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.8_1_c +description: Tests that the option localeMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var defaultLocale = new Constructor().resolvedOptions().locale; @@ -33,4 +33,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch09/9.2/9.2.8_4.js b/test/suite/intl402/ch09/9.2/9.2.8_4.js index 79c362f621..57f6221dcf 100644 --- a/test/suite/intl402/ch09/9.2/9.2.8_4.js +++ b/test/suite/intl402/ch09/9.2/9.2.8_4.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the array returned by SupportedLocales is extensible, - * but its properties are non-writable/non-configurable. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 9.2.8_4 +description: > + Tests that the array returned by SupportedLocales is extensible, + but its properties are non-writable/non-configurable. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ function testFrozenProperty(obj, property) { var desc = Object.getOwnPropertyDescriptor(obj, property); @@ -32,4 +33,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_1.js b/test/suite/intl402/ch10/10.1/10.1.1_1.js index 432e073fc5..d0a608a369 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_1.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_1.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that an object can't be re-initialized as a Collator. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_1 +description: Tests that an object can't be re-initialized as a Collator. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var obj, error; @@ -40,4 +40,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_10.js b/test/suite/intl402/ch10/10.1/10.1.1_10.js index 5c6b657b59..b5e0d6d19e 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_10.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_10.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_10 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["localeMatcher", "kn", "kf"]); @@ -15,4 +16,3 @@ var locale = new Intl.Collator(undefined, {localeMatcher: "lookup"}).resolvedOpt if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { $ERROR("Collator returns invalid locale " + locale + "."); } - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_11.js b/test/suite/intl402/ch10/10.1/10.1.1_11.js index 447fd8b285..bd5113749f 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_11.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_11.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option localeMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_11 +description: Tests that the option localeMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.Collator, "localeMatcher", "string", ["lookup", "best fit"], "best fit", {noReturn: true}); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_13.js b/test/suite/intl402/ch10/10.1/10.1.1_13.js index 4129eebd2e..5911313e6c 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_13.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_13.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the options numeric and caseFirst are processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_13 +description: > + Tests that the options numeric and caseFirst are processed + correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.Collator, "numeric", "boolean", undefined, undefined, {isOptional: true}); testOption(Intl.Collator, "caseFirst", "string", ["upper", "lower", "false"], undefined, {isOptional: true}); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_19_b.js b/test/suite/intl402/ch10/10.1/10.1.1_19_b.js index f1fef27044..47642dc1f6 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_19_b.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_19_b.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests the special handling of the "co" key in Intl.Collator. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.1.1_19_b +description: Tests the special handling of the "co" key in Intl.Collator. +author: Norbert Lindenberg +---*/ function checkCollation(extensionCoValue, usageValue, expectedCollations, expectedUsage) { var requestLocale = extensionCoValue !== undefined ? "de-DE-u-co-" + extensionCoValue : "de-DE"; @@ -41,4 +42,3 @@ checkCollation("search", undefined, ["default"], "sort"); checkCollation("search", "search", ["default"], "search"); checkCollation("search", "sort", ["default"], "sort"); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_19_c.js b/test/suite/intl402/ch10/10.1/10.1.1_19_c.js index 4ad76d45bf..7a4239e016 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_19_c.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_19_c.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the options numeric and caseFirst can be - * set through either the locale or the options. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_19_c +description: > + Tests that the options numeric and caseFirst can be set through + either the locale or the options. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var options = [ {key: "kn", property: "numeric", type: "boolean", values: [true, false]}, @@ -60,4 +61,3 @@ options.forEach(function (option) { } }); }); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_20.js b/test/suite/intl402/ch10/10.1/10.1.1_20.js index 97d70c0f95..5463ce494a 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_20.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_20.js @@ -1,13 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option sensitivity is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_20 +description: Tests that the option sensitivity is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // the fallback is variant only for usage === sort, but that happens to be the fallback for usage testOption(Intl.Collator, "sensitivity", "string", ["base", "accent", "case", "variant"], "variant"); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_23.js b/test/suite/intl402/ch10/10.1/10.1.1_23.js index 0b5261509f..4818f46fa6 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_23.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_23.js @@ -1,13 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option ignorePunctuation is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_23 +description: Tests that the option ignorePunctuation is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // the fallback is variant only for usage === sort, but that happens to be the fallback for usage testOption(Intl.Collator, "ignorePunctuation", "boolean", undefined, false); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_6.js b/test/suite/intl402/ch10/10.1/10.1.1_6.js index bc13436d76..0f900d4c5b 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_6.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_6.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option usage is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_6 +description: Tests that the option usage is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.Collator, "usage", "string", ["sort", "search"], "sort"); - diff --git a/test/suite/intl402/ch10/10.1/10.1.1_a.js b/test/suite/intl402/ch10/10.1/10.1.1_a.js index 56d4b97895..3e2a039a68 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_a.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_a.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that constructing a Collator doesn't create or modify - * unwanted properties on the RegExp constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.1_a +description: > + Tests that constructing a Collator doesn't create or modify + unwanted properties on the RegExp constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testForUnwantedRegExpChanges(function () { new Intl.Collator("de-DE-u-co-phonebk"); diff --git a/test/suite/intl402/ch10/10.1/10.1.2.1_4.js b/test/suite/intl402/ch10/10.1/10.1.2.1_4.js index 22e69065e6..9a1769434b 100644 --- a/test/suite/intl402/ch10/10.1/10.1.2.1_4.js +++ b/test/suite/intl402/ch10/10.1/10.1.2.1_4.js @@ -1,11 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that for non-object values passed as this to Collator a - * wrapper object will be initialized and returned. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.1.2.1_4 +description: > + Tests that for non-object values passed as this to Collator a + wrapper object will be initialized and returned. +author: Norbert Lindenberg +---*/ var thisValues = [true, 42, "国際化"]; @@ -18,4 +20,3 @@ thisValues.forEach(function (value) { } return true; }); - diff --git a/test/suite/intl402/ch10/10.1/10.1.2_a.js b/test/suite/intl402/ch10/10.1/10.1.2_a.js index de69a48093..285cc7b6d5 100644 --- a/test/suite/intl402/ch10/10.1/10.1.2_a.js +++ b/test/suite/intl402/ch10/10.1/10.1.2_a.js @@ -2,12 +2,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.Collator can be subclassed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.1.2_a +description: Tests that Intl.Collator can be subclassed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // get a collator and have it sort an array for comparison with the subclass var locales = ["tlh", "id", "en"]; @@ -27,4 +27,3 @@ MyCollator.prototype.constructor = MyCollator; var collator = new MyCollator(locales); a.sort(collator.compare); testArraysAreSame(referenceSorted, a); - diff --git a/test/suite/intl402/ch10/10.1/10.1.3.js b/test/suite/intl402/ch10/10.1/10.1.3.js index 7459d98d6b..942fdf3ec7 100644 --- a/test/suite/intl402/ch10/10.1/10.1.3.js +++ b/test/suite/intl402/ch10/10.1/10.1.3.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that objects constructed by Intl.Collator have the specified internal properties. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.1.3 +description: > + Tests that objects constructed by Intl.Collator have the specified + internal properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.Collator(); @@ -16,4 +19,3 @@ if (actualPrototype !== Intl.Collator.prototype) { if (!Object.isExtensible(obj)) { $ERROR("Object constructed by Intl.Collator must be extensible."); } - diff --git a/test/suite/intl402/ch10/10.1/10.1_L15.js b/test/suite/intl402/ch10/10.1/10.1_L15.js index 4dbabfd646..833b7fb1a0 100644 --- a/test/suite/intl402/ch10/10.1/10.1_L15.js +++ b/test/suite/intl402/ch10/10.1/10.1_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 10.1_L15 +description: > + Tests that Intl.Collator meets the requirements for built-in + objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.Collator, true, true, ["supportedLocalesOf"], 0); - diff --git a/test/suite/intl402/ch10/10.2/10.2.1.js b/test/suite/intl402/ch10/10.2/10.2.1.js index 9eccb073c4..c47db09db6 100644 --- a/test/suite/intl402/ch10/10.2/10.2.1.js +++ b/test/suite/intl402/ch10/10.2/10.2.1.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.prototype has the required attributes. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.2.1 +description: Tests that Intl.Collator.prototype has the required attributes. +author: Norbert Lindenberg +---*/ var desc = Object.getOwnPropertyDescriptor(Intl.Collator, "prototype"); if (desc === undefined) { @@ -19,4 +20,3 @@ if (desc.enumerable) { if (desc.configurable) { $ERROR("Intl.Collator.prototype must not be configurable."); } - diff --git a/test/suite/intl402/ch10/10.2/10.2.2_L15.js b/test/suite/intl402/ch10/10.2/10.2.2_L15.js index 6ffcdde84d..3e1d314f46 100644 --- a/test/suite/intl402/ch10/10.2/10.2.2_L15.js +++ b/test/suite/intl402/ch10/10.2/10.2.2_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.supportedLocalesOf - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 10.2.2_L15 +description: > + Tests that Intl.Collator.supportedLocalesOf meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.Collator.supportedLocalesOf, true, false, [], 1); - diff --git a/test/suite/intl402/ch10/10.2/10.2.2_a.js b/test/suite/intl402/ch10/10.2/10.2.2_a.js index 5cf953ce82..dcd56dc50c 100644 --- a/test/suite/intl402/ch10/10.2/10.2.2_a.js +++ b/test/suite/intl402/ch10/10.2/10.2.2_a.js @@ -1,10 +1,12 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.Collator has a supportedLocalesOf - * property, and it works as planned. - */ +/*--- +es5id: 10.2.2_a +description: > + Tests that Intl.Collator has a supportedLocalesOf property, and + it works as planned. +---*/ var defaultLocale = new Intl.Collator().resolvedOptions().locale; var notSupported = 'zxx'; // "no linguistic content" @@ -24,4 +26,3 @@ if (supportedLocales.length !== 1) { if (supportedLocales[0] !== defaultLocale) { $ERROR('The default locale is not returned in the supported list.'); } - diff --git a/test/suite/intl402/ch10/10.2/10.2.2_b.js b/test/suite/intl402/ch10/10.2/10.2.2_b.js index 1b99fd8c5a..f7e70bb7d8 100644 --- a/test/suite/intl402/ch10/10.2/10.2.2_b.js +++ b/test/suite/intl402/ch10/10.2/10.2.2_b.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.supportedLocalesOf - * doesn't access arguments that it's not given. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.2.2_b +description: > + Tests that Intl.Collator.supportedLocalesOf doesn't access + arguments that it's not given. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintDataProperty(Object.prototype, "1"); new Intl.Collator("und"); diff --git a/test/suite/intl402/ch10/10.2/10.2.3_b.js b/test/suite/intl402/ch10/10.2/10.2.3_b.js index aef1e746a1..c7ae39850b 100644 --- a/test/suite/intl402/ch10/10.2/10.2.3_b.js +++ b/test/suite/intl402/ch10/10.2/10.2.3_b.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator does not accept Unicode locale - * extension keys and values that are not allowed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.2.3_b +description: > + Tests that Intl.Collator does not accept Unicode locale extension + keys and values that are not allowed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var testArray = [ "hello", "你好", "こんにちは", @@ -49,4 +50,3 @@ Object.getOwnPropertyNames(keyValues).forEach(function (key) { testArraysAreSame(defaultSortedArray, testArray.sort(collator.compare)); }); }); - diff --git a/test/suite/intl402/ch10/10.3/10.3.1.js b/test/suite/intl402/ch10/10.3/10.3.1.js index 699949e18f..6a582b362f 100644 --- a/test/suite/intl402/ch10/10.3/10.3.1.js +++ b/test/suite/intl402/ch10/10.3/10.3.1.js @@ -1,13 +1,14 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.prototype.constructor is the - * Intl.Collator. - */ +/*--- +es5id: 10.3.1 +description: > + Tests that Intl.Collator.prototype.constructor is the + Intl.Collator. +---*/ if (Intl.Collator.prototype.constructor !== Intl.Collator) { $ERROR("Intl.Collator.prototype.constructor is not the same as " + "Intl.Collator"); } - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js b/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js index 3d49601db8..15236a162c 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_1_a_L15.js @@ -1,14 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the function returned by Intl.Collator.prototype.compare - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 10.3.2_1_a_L15 +description: > + Tests that the function returned by + Intl.Collator.prototype.compare meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(new Intl.Collator().compare, true, false, [], 2); - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_1_c.js b/test/suite/intl402/ch10/10.3/10.3.2_1_c.js index 73f2bcf098..7bf3b72666 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_1_c.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_1_c.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that compare function is bound to its Intl.Collator. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.3.2_1_c +description: Tests that compare function is bound to its Intl.Collator. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var strings = ["d", "O", "od", "oe", "of", "ö", "o\u0308", "X", "y", "Z", "Z.", "𠮷野家", "吉野家", "!A", "A", "b", "C"]; var locales = [undefined, ["de"], ["de-u-co-phonebk"], ["en"], ["ja"], ["sv"]]; @@ -33,4 +33,3 @@ locales.forEach(function (locales) { } }); }); - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_CS_a.js b/test/suite/intl402/ch10/10.3/10.3.2_CS_a.js index a946245b40..630c3e48c6 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_CS_a.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_CS_a.js @@ -2,12 +2,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the function returned by Intl.Collator.prototype.compare - * returns 0 when comparing Strings that are considered canonically equivalent - * by the Unicode standard. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.3.2_CS_a +description: > + Tests that the function returned by + Intl.Collator.prototype.compare returns 0 when comparing Strings + that are considered canonically equivalent by the Unicode + standard. +author: Norbert Lindenberg +---*/ var collator = new Intl.Collator(); var pairs = [ @@ -65,4 +68,3 @@ function toU(s) { } return result; } - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_CS_b_NN.js b/test/suite/intl402/ch10/10.3/10.3.2_CS_b_NN.js index c417d2b8a3..e1d5e2941d 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_CS_b_NN.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_CS_b_NN.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the compare function isn't entirely unreasonable. - * This test is not normative. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.3.2_CS_b_NN +description: > + Tests that the compare function isn't entirely unreasonable. This + test is not normative. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // this test should be valid at least for the following locales var locales = ["de", "en", "es", "fr", "it"]; @@ -19,4 +20,3 @@ locales.forEach(function (locale) { var expected = ["A", "b", "C", "d", "E", "f", "g", "H", "i", "J", "k", "L", "m", "N", "V", "w", "X", "y", "Z"]; testArraysAreSame(expected, a); }); - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js b/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js index 5d5060be5a..62dd4da939 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js @@ -2,13 +2,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the compare function supports phonebook sorting if it says it does. - * This test is not normative. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.3.2_CS_c_NN +description: > + Tests that the compare function supports phonebook sorting if it + says it does. This test is not normative. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // this test should be valid at least for the following locales var locales = ["de-DE-u-co-phonebk", "de-u-co-phonebk"]; @@ -19,4 +20,3 @@ if (locales.indexOf(collator.resolvedOptions().locale) !== -1) { var expected = ["A", "Ab", "Ä", "Af", "b", "od", "ö", "off"]; testArraysAreSame(expected, a); } - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_CS_d_NN.js b/test/suite/intl402/ch10/10.3/10.3.2_CS_d_NN.js index be5f1aa338..b9c56abf79 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_CS_d_NN.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_CS_d_NN.js @@ -2,13 +2,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the compare function supports different sensitivity settings. - * This test is not normative. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.3.2_CS_d_NN +description: > + Tests that the compare function supports different sensitivity + settings. This test is not normative. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // this test should be valid at least for the following locales var locales = ["de", "en", "es", "it"]; @@ -31,4 +32,3 @@ locales.forEach(function (locale) { testArraysAreSame(expected[sensitivity], matches); }); }); - diff --git a/test/suite/intl402/ch10/10.3/10.3.2_L15.js b/test/suite/intl402/ch10/10.3/10.3.2_L15.js index 5845ea3ca1..cc52f61fc0 100644 --- a/test/suite/intl402/ch10/10.3/10.3.2_L15.js +++ b/test/suite/intl402/ch10/10.3/10.3.2_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the getter for Intl.Collator.prototype.compare - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 10.3.2_L15 +description: > + Tests that the getter for Intl.Collator.prototype.compare meets + the requirements for built-in objects defined by the introduction + of chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get , true, false, [], 0); - diff --git a/test/suite/intl402/ch10/10.3/10.3.3.js b/test/suite/intl402/ch10/10.3/10.3.3.js index bc6b4fabb9..c508172839 100644 --- a/test/suite/intl402/ch10/10.3/10.3.3.js +++ b/test/suite/intl402/ch10/10.3/10.3.3.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the object returned by Intl.Collator.prototype.resolvedOptions - * has the right properties. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 10.3.3 +description: > + Tests that the object returned by + Intl.Collator.prototype.resolvedOptions has the right properties. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var actual = new Intl.Collator().resolvedOptions(); @@ -44,4 +45,3 @@ mustHaveProperty(actual, "ignorePunctuation", [false]); mustHaveProperty(actual, "collation", collations); mayHaveProperty(actual, "numeric", [true, false]); mayHaveProperty(actual, "caseFirst", ["upper", "lower", "false"]); - diff --git a/test/suite/intl402/ch10/10.3/10.3.3_L15.js b/test/suite/intl402/ch10/10.3/10.3.3_L15.js index 718cc9fea6..e6892b183d 100644 --- a/test/suite/intl402/ch10/10.3/10.3.3_L15.js +++ b/test/suite/intl402/ch10/10.3/10.3.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.prototype.resolvedOptions - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 10.3.3_L15 +description: > + Tests that Intl.Collator.prototype.resolvedOptions meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.Collator.prototype.resolvedOptions, true, false, [], 0); - diff --git a/test/suite/intl402/ch10/10.3/10.3_L15.js b/test/suite/intl402/ch10/10.3/10.3_L15.js index 60719736c1..f7f3e17b08 100644 --- a/test/suite/intl402/ch10/10.3/10.3_L15.js +++ b/test/suite/intl402/ch10/10.3/10.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.prototype - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 10.3_L15 +description: > + Tests that Intl.Collator.prototype meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.Collator.prototype, false, false, ["constructor", "compare", "resolvedOptions"]); - diff --git a/test/suite/intl402/ch10/10.3/10.3_a.js b/test/suite/intl402/ch10/10.3/10.3_a.js index aa2e528459..a155b8c949 100644 --- a/test/suite/intl402/ch10/10.3/10.3_a.js +++ b/test/suite/intl402/ch10/10.3/10.3_a.js @@ -1,10 +1,12 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.prototype is an object that - * has been initialized as an Intl.Collator. - */ +/*--- +es5id: 10.3_a +description: > + Tests that Intl.Collator.prototype is an object that has been + initialized as an Intl.Collator. +---*/ // test by calling a function that would fail if "this" were not an object // initialized as an Intl.Collator @@ -12,4 +14,3 @@ if (Intl.Collator.prototype.compare("aаあ아", "aаあ아") !== 0) { $ERROR("Intl.Collator.prototype is not an object that has been " + "initialized as an Intl.Collator."); } - diff --git a/test/suite/intl402/ch10/10.3/10.3_b.js b/test/suite/intl402/ch10/10.3/10.3_b.js index 9c3c2db32e..312cd3fcdd 100644 --- a/test/suite/intl402/ch10/10.3/10.3_b.js +++ b/test/suite/intl402/ch10/10.3/10.3_b.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.Collator.prototype functions throw a - * TypeError if called on a non-object value or an object that hasn't been - * initialized as a Collator. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.3_b +description: > + Tests that Intl.Collator.prototype functions throw a TypeError if + called on a non-object value or an object that hasn't been + initialized as a Collator. +author: Norbert Lindenberg +---*/ var functions = { "compare getter": Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get, @@ -30,4 +32,3 @@ Object.getOwnPropertyNames(functions).forEach(function (functionName) { } }); }); - diff --git a/test/suite/intl402/ch10/10.4/10.4_a.js b/test/suite/intl402/ch10/10.4/10.4_a.js index 7527f65eb6..3b250759ad 100644 --- a/test/suite/intl402/ch10/10.4/10.4_a.js +++ b/test/suite/intl402/ch10/10.4/10.4_a.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.Collator instances have the specified properties. - * @author Norbert Lindenberg - */ +/*--- +es5id: 10.4_a +description: Tests that Intl.Collator instances have the specified properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.Collator(); @@ -12,4 +13,3 @@ var toStringValue = Object.prototype.toString.call(obj); if (toStringValue !== "[object Object]") { $ERROR("Intl.Collator instance produces wrong [[Class]] - toString returns " + toStringValue + "."); } - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_1.js b/test/suite/intl402/ch11/11.1/11.1.1_1.js index 33af169751..e31ddb9e07 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_1.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_1.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that an object can't be re-initialized as a NumberFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_1 +description: Tests that an object can't be re-initialized as a NumberFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var obj, error; @@ -40,4 +40,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_15.js b/test/suite/intl402/ch11/11.1/11.1.1_15.js index 4d0467428c..b6922da260 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_15.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_15.js @@ -1,13 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option style is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_15 +description: Tests that the option style is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.NumberFormat, "style", "string", ["decimal", "percent", "currency"], "decimal", {extra: {"currency": {currency: "CNY"}}}); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_17.js b/test/suite/intl402/ch11/11.1/11.1.1_17.js index 08c0e8e5c5..1940613546 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_17.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_17.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option currency is processed correctly. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.1.1_17 +description: Tests that the option currency is processed correctly. +author: Norbert Lindenberg +---*/ var validValues = ["CNY", "USD", "EUR", "IDR", "jpy", {toString: function () {return "INR";}}]; var invalidValues = ["$", "SFr.", "US$", "ßP", {toString: function () {return;}}]; @@ -78,4 +79,3 @@ invalidValues.forEach(function (value) { return new Intl.NumberFormat([defaultLocale + "-u-cu-krw"], {currency: value}); }); }); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_19.js b/test/suite/intl402/ch11/11.1/11.1.1_19.js index e41ca5bec9..2be78db72d 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_19.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_19.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the currency style can not be used without a specified currency. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.1.1_19 +description: > + Tests that the currency style can not be used without a specified + currency. +author: Norbert Lindenberg +---*/ var defaultLocale = new Intl.NumberFormat().resolvedOptions().locale; @@ -28,4 +31,3 @@ expectError(function () { expectError(function () { return new Intl.NumberFormat([defaultLocale + "-u-cu-krw"], {style: "currency"}); }); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_20_c.js b/test/suite/intl402/ch11/11.1/11.1.1_20_c.js index d4a230c107..605b71bfca 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_20_c.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_20_c.js @@ -2,10 +2,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the number of fractional digits is determined correctly for currencies. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.1.1_20_c +description: > + Tests that the number of fractional digits is determined correctly + for currencies. +author: Norbert Lindenberg +---*/ // data from http://www.currency-iso.org/dl_iso_table_a1.xml, 2013-02-25 var currencyDigits = { @@ -193,4 +196,3 @@ Object.getOwnPropertyNames(currencyDigits).forEach(function (currency) { currency + "; expected " + digits + ", got " + max + "."); } }); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_21.js b/test/suite/intl402/ch11/11.1/11.1.1_21.js index 1751b8b574..bd6ae260db 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_21.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_21.js @@ -1,15 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option currencyDisplay is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_21 +description: Tests that the option currencyDisplay is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.NumberFormat, "currencyDisplay", "string", ["code", "symbol", "name"], "symbol", {extra: {any: {style: "currency", currency: "XDR"}}}); testOption(Intl.NumberFormat, "currencyDisplay", "string", ["code", "symbol", "name"], undefined, {noReturn: true}); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_32.js b/test/suite/intl402/ch11/11.1/11.1.1_32.js index 9196318efb..fba78bb8f1 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_32.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_32.js @@ -1,11 +1,13 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the options minimumSignificantDigits and - * maximumSignificantDigits are read in the right sequence. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.1.1_32 +description: > + Tests that the options minimumSignificantDigits and + maximumSignificantDigits are read in the right sequence. +author: Norbert Lindenberg +---*/ var read = 0; diff --git a/test/suite/intl402/ch11/11.1/11.1.1_34.js b/test/suite/intl402/ch11/11.1/11.1.1_34.js index 98ba9a0620..bbd1d8a1ed 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_34.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_34.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option useGrouping is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_34 +description: Tests that the option useGrouping is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.NumberFormat, "useGrouping", "boolean", undefined, true); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_6.js b/test/suite/intl402/ch11/11.1/11.1.1_6.js index 5b9d342ebf..c6d9b7f10d 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_6.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_6.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_6 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["localeMatcher"]); @@ -15,4 +16,3 @@ var locale = new Intl.NumberFormat(undefined, {localeMatcher: "lookup"}).resolve if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { $ERROR("NumberFormat returns invalid locale " + locale + "."); } - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_7.js b/test/suite/intl402/ch11/11.1/11.1.1_7.js index 4b13b245b7..cc24ada0e8 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_7.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_7.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option localeMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_7 +description: Tests that the option localeMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.NumberFormat, "localeMatcher", "string", ["lookup", "best fit"], "best fit", {noReturn: true}); - diff --git a/test/suite/intl402/ch11/11.1/11.1.1_a.js b/test/suite/intl402/ch11/11.1/11.1.1_a.js index 611816b61c..cbd1e5f1b6 100644 --- a/test/suite/intl402/ch11/11.1/11.1.1_a.js +++ b/test/suite/intl402/ch11/11.1/11.1.1_a.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that constructing a NumberFormat doesn't create or modify - * unwanted properties on the RegExp constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.1_a +description: > + Tests that constructing a NumberFormat doesn't create or modify + unwanted properties on the RegExp constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testForUnwantedRegExpChanges(function () { new Intl.NumberFormat("de-DE-u-nu-latn"); diff --git a/test/suite/intl402/ch11/11.1/11.1.2.1_4.js b/test/suite/intl402/ch11/11.1/11.1.2.1_4.js index 18b5b98faf..e21140147e 100644 --- a/test/suite/intl402/ch11/11.1/11.1.2.1_4.js +++ b/test/suite/intl402/ch11/11.1/11.1.2.1_4.js @@ -1,11 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that for non-object values passed as this to NumberFormat a - * wrapper object will be initialized and returned. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.1.2.1_4 +description: > + Tests that for non-object values passed as this to NumberFormat a + wrapper object will be initialized and returned. +author: Norbert Lindenberg +---*/ var thisValues = [true, 42, "国際化"]; @@ -18,4 +20,3 @@ thisValues.forEach(function (value) { } return true; }); - diff --git a/test/suite/intl402/ch11/11.1/11.1.2.js b/test/suite/intl402/ch11/11.1/11.1.2.js index 0ca8cbbdae..cd722b0f35 100644 --- a/test/suite/intl402/ch11/11.1/11.1.2.js +++ b/test/suite/intl402/ch11/11.1/11.1.2.js @@ -2,12 +2,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat can be subclassed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.1.2 +description: Tests that Intl.NumberFormat can be subclassed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // get a number format and have it format an array of numbers for comparison with the subclass var locales = ["tlh", "id", "en"]; @@ -27,4 +27,3 @@ MyNumberFormat.prototype.constructor = MyNumberFormat; var format = new MyNumberFormat(locales); var actual = a.map(format.format); testArraysAreSame(referenceFormatted, actual); - diff --git a/test/suite/intl402/ch11/11.1/11.1.3.js b/test/suite/intl402/ch11/11.1/11.1.3.js index f0bfb5552d..7008ef41c6 100644 --- a/test/suite/intl402/ch11/11.1/11.1.3.js +++ b/test/suite/intl402/ch11/11.1/11.1.3.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that objects constructed by Intl.NumberFormat have the specified internal properties. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.1.3 +description: > + Tests that objects constructed by Intl.NumberFormat have the + specified internal properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.NumberFormat(); @@ -16,4 +19,3 @@ if (actualPrototype !== Intl.NumberFormat.prototype) { if (!Object.isExtensible(obj)) { $ERROR("Object constructed by Intl.NumberFormat must be extensible."); } - diff --git a/test/suite/intl402/ch11/11.1/11.1_L15.js b/test/suite/intl402/ch11/11.1/11.1_L15.js index e40ffc53e1..7d1ff5e994 100644 --- a/test/suite/intl402/ch11/11.1/11.1_L15.js +++ b/test/suite/intl402/ch11/11.1/11.1_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 11.1_L15 +description: > + Tests that Intl.NumberFormat meets the requirements for built-in + objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.NumberFormat, true, true, ["supportedLocalesOf"], 0); - diff --git a/test/suite/intl402/ch11/11.2/11.2.1.js b/test/suite/intl402/ch11/11.2/11.2.1.js index 83bebb2835..d71268e441 100644 --- a/test/suite/intl402/ch11/11.2/11.2.1.js +++ b/test/suite/intl402/ch11/11.2/11.2.1.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype has the required attributes. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.2.1 +description: Tests that Intl.NumberFormat.prototype has the required attributes. +author: Norbert Lindenberg +---*/ var desc = Object.getOwnPropertyDescriptor(Intl.NumberFormat, "prototype"); if (desc === undefined) { @@ -19,4 +20,3 @@ if (desc.enumerable) { if (desc.configurable) { $ERROR("Intl.NumberFormat.prototype must not be configurable."); } - diff --git a/test/suite/intl402/ch11/11.2/11.2.2_L15.js b/test/suite/intl402/ch11/11.2/11.2.2_L15.js index 49dce3bae9..ae828988c5 100644 --- a/test/suite/intl402/ch11/11.2/11.2.2_L15.js +++ b/test/suite/intl402/ch11/11.2/11.2.2_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.supportedLocalesOf - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 11.2.2_L15 +description: > + Tests that Intl.NumberFormat.supportedLocalesOf meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.NumberFormat.supportedLocalesOf, true, false, [], 1); - diff --git a/test/suite/intl402/ch11/11.2/11.2.2_a.js b/test/suite/intl402/ch11/11.2/11.2.2_a.js index c6c9f9a46d..6fd1fc708b 100644 --- a/test/suite/intl402/ch11/11.2/11.2.2_a.js +++ b/test/suite/intl402/ch11/11.2/11.2.2_a.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat has a supportedLocalesOf - * property, and it works as planned. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.2.2_a +description: > + Tests that Intl.NumberFormat has a supportedLocalesOf property, + and it works as planned. +author: Roozbeh Pournader +---*/ var defaultLocale = new Intl.NumberFormat().resolvedOptions().locale; var notSupported = 'zxx'; // "no linguistic content" @@ -25,4 +27,3 @@ if (supportedLocales.length !== 1) { if (supportedLocales[0] !== defaultLocale) { $ERROR('The default locale is not returned in the supported list.'); } - diff --git a/test/suite/intl402/ch11/11.2/11.2.2_b.js b/test/suite/intl402/ch11/11.2/11.2.2_b.js index 6b4d77e773..5455e51d22 100644 --- a/test/suite/intl402/ch11/11.2/11.2.2_b.js +++ b/test/suite/intl402/ch11/11.2/11.2.2_b.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.supportedLocalesOf - * doesn't access arguments that it's not given. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.2.2_b +description: > + Tests that Intl.NumberFormat.supportedLocalesOf doesn't access + arguments that it's not given. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintDataProperty(Object.prototype, "1"); new Intl.NumberFormat("und"); diff --git a/test/suite/intl402/ch11/11.2/11.2.3_b.js b/test/suite/intl402/ch11/11.2/11.2.3_b.js index 70fe7cf119..f606e40245 100644 --- a/test/suite/intl402/ch11/11.2/11.2.3_b.js +++ b/test/suite/intl402/ch11/11.2/11.2.3_b.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat does not accept Unicode locale - * extension keys and values that are not allowed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.2.3_b +description: > + Tests that Intl.NumberFormat does not accept Unicode locale + extension keys and values that are not allowed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = ["ja-JP", "zh-Hans-CN", "zh-Hant-TW"]; var input = 1234567.89; @@ -43,4 +44,3 @@ locales.forEach(function (locale) { }); }); }); - diff --git a/test/suite/intl402/ch11/11.3/11.3.1.js b/test/suite/intl402/ch11/11.3/11.3.1.js index 46c7fc5193..f93016bcbc 100644 --- a/test/suite/intl402/ch11/11.3/11.3.1.js +++ b/test/suite/intl402/ch11/11.3/11.3.1.js @@ -1,14 +1,15 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.constructor is the - * Intl.NumberFormat. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3.1 +description: > + Tests that Intl.NumberFormat.prototype.constructor is the + Intl.NumberFormat. +author: Roozbeh Pournader +---*/ if (Intl.NumberFormat.prototype.constructor !== Intl.NumberFormat) { $ERROR("Intl.NumberFormat.prototype.constructor is not the same as " + "Intl.NumberFormat"); } - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_1_a_L15.js b/test/suite/intl402/ch11/11.3/11.3.2_1_a_L15.js index 8e1c958350..d27d1090b9 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_1_a_L15.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_1_a_L15.js @@ -1,14 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the function returned by Intl.NumberFormat.prototype.format - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 11.3.2_1_a_L15 +description: > + Tests that the function returned by + Intl.NumberFormat.prototype.format meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(new Intl.NumberFormat().format, true, false, [], 1); - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_1_a_ii.js b/test/suite/intl402/ch11/11.3/11.3.2_1_a_ii.js index cb284f43ef..d4f2494c0e 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_1_a_ii.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_1_a_ii.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.format - * converts other types to numbers. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3.2_1_a_ii +description: > + Tests that Intl.NumberFormat.prototype.format converts other + types to numbers. +author: Roozbeh Pournader +---*/ var formatter = new Intl.NumberFormat(); var testData = [undefined, null, true, '0.6666666', {valueOf: function () { return '0.1234567';}}]; @@ -24,4 +26,3 @@ for (i in testData) { 'Expected output: "'+correctResult+'"'); } } - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_1_c.js b/test/suite/intl402/ch11/11.3/11.3.2_1_c.js index 3fc877b310..f8bc72fc99 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_1_c.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_1_c.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that format function is bound to its Intl.NumberFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.3.2_1_c +description: Tests that format function is bound to its Intl.NumberFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var numbers = [0, -0, 1, -1, 5.5, 123, -123, -123.45, 123.44501, 0.001234, -0.00000000123, 0.00000000000000000000000000000123, 1.2, 0.0000000012344501, @@ -38,4 +38,3 @@ locales.forEach(function (locales) { }); }); }); - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js b/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js index 5f14e7772d..a5e53998ec 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.format - * doesn't treat all numbers as negative. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3.2_FN_1 +description: > + Tests that Intl.NumberFormat.prototype.format doesn't treat all + numbers as negative. +author: Roozbeh Pournader +---*/ var formatter = new Intl.NumberFormat(); @@ -16,4 +18,3 @@ if (formatter.format(1) === formatter.format(-1)) { if (formatter.format(-0) !== formatter.format(0)) { $ERROR('Intl.NumberFormat is formatting signed zeros differently.'); } - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_FN_2.js b/test/suite/intl402/ch11/11.3/11.3.2_FN_2.js index ec11a679d0..635f54f0f9 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_FN_2.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_FN_2.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.format - * handles NaN, Infinity, and -Infinity properly. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3.2_FN_2 +description: > + Tests that Intl.NumberFormat.prototype.format handles NaN, + Infinity, and -Infinity properly. +author: Roozbeh Pournader +---*/ // FIXME: We are only listing Numeric_Type=Decimal. May need to add more // when the spec clarifies. Current as of Unicode 6.1. @@ -56,4 +58,3 @@ if (hasUnicodeDigits.test(formattedNegativeInfinity)) { $ERROR('Intl.NumberFormat formats negative Infinity ' + 'using a digit.'); } - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_FN_3_b.js b/test/suite/intl402/ch11/11.3/11.3.2_FN_3_b.js index efe15575d9..e314566479 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_FN_3_b.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_FN_3_b.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.format - * formats percent values properly. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3.2_FN_3_b +description: > + Tests that Intl.NumberFormat.prototype.format formats percent + values properly. +author: Roozbeh Pournader +---*/ var numberFormatter = new Intl.NumberFormat(); var percentFormatter = new Intl.NumberFormat(undefined, {style: 'percent'}); @@ -24,4 +26,3 @@ if (formattedTwentyPercent.indexOf(formattedTwenty) === -1) { if (percentFormatter.format(0.011) === percentFormatter.format(0.02)) { $ERROR('Intl.NumberFormat is formatting 1.1% and 2% the same way.'); } - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_FN_3_e.js b/test/suite/intl402/ch11/11.3/11.3.2_FN_3_e.js index 234ae63254..73a55775e4 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_FN_3_e.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_FN_3_e.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.format - * supports all alternative numbering systems. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3.2_FN_3_e +description: > + Tests that Intl.NumberFormat.prototype.format supports all + alternative numbering systems. +author: Roozbeh Pournader +---*/ var numberingSystems = { arab: 0x0660, @@ -44,4 +46,3 @@ for (s in numberingSystems) { } // FIXME: Unfinished - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_L15.js b/test/suite/intl402/ch11/11.3/11.3.2_L15.js index 17b688b7a9..04eddf44bc 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_L15.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_L15.js @@ -1,14 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the getter for Intl.NumberFormat.prototype.format - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 11.3.2_L15 +description: > + Tests that the getter for Intl.NumberFormat.prototype.format + meets the requirements for built-in objects defined by the + introduction of chapter 15 of the ECMAScript Language + Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get , true, false, [], 0); - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_TRF.js b/test/suite/intl402/ch11/11.3/11.3.2_TRF.js index c042a318a6..ee258bfaf5 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_TRF.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_TRF.js @@ -2,12 +2,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the digits are determined correctly when specifying pre/post decimal digits. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.3.2_TRF +description: > + Tests that the digits are determined correctly when specifying + pre/post decimal digits. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = [ new Intl.NumberFormat().resolvedOptions().locale, @@ -53,4 +55,3 @@ var testData = { testNumberFormat(locales, numberingSystems, {useGrouping: false, minimumIntegerDigits: 3, minimumFractionDigits: 1, maximumFractionDigits: 3}, testData); - diff --git a/test/suite/intl402/ch11/11.3/11.3.2_TRP.js b/test/suite/intl402/ch11/11.3/11.3.2_TRP.js index 9ab6550b6d..d818b7b479 100644 --- a/test/suite/intl402/ch11/11.3/11.3.2_TRP.js +++ b/test/suite/intl402/ch11/11.3/11.3.2_TRP.js @@ -2,12 +2,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the digits are determined correctly when specifying significant digits. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.3.2_TRP +description: > + Tests that the digits are determined correctly when specifying + significant digits. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = [ new Intl.NumberFormat().resolvedOptions().locale, @@ -53,4 +55,3 @@ var testData = { testNumberFormat(locales, numberingSystems, {useGrouping: false, minimumSignificantDigits: 3, maximumSignificantDigits: 5}, testData); - diff --git a/test/suite/intl402/ch11/11.3/11.3.3.js b/test/suite/intl402/ch11/11.3/11.3.3.js index 5a220ccc9b..af6caf7536 100644 --- a/test/suite/intl402/ch11/11.3/11.3.3.js +++ b/test/suite/intl402/ch11/11.3/11.3.3.js @@ -1,13 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the object returned by Intl.NumberFormat.prototype.resolvedOptions - * has the right properties. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 11.3.3 +description: > + Tests that the object returned by + Intl.NumberFormat.prototype.resolvedOptions has the right + properties. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var actual = new Intl.NumberFormat().resolvedOptions(); @@ -28,4 +30,3 @@ mustHaveProperty(actual, "maximumFractionDigits", [3]); mustNotHaveProperty(actual, "minimumSignificantDigits"); mustNotHaveProperty(actual, "maximumSignificantDigits"); mustHaveProperty(actual, "useGrouping", [true]); - diff --git a/test/suite/intl402/ch11/11.3/11.3.3_L15.js b/test/suite/intl402/ch11/11.3/11.3.3_L15.js index b9f95866d1..d45d6ab2a4 100644 --- a/test/suite/intl402/ch11/11.3/11.3.3_L15.js +++ b/test/suite/intl402/ch11/11.3/11.3.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype.resolvedOptions - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 11.3.3_L15 +description: > + Tests that Intl.NumberFormat.prototype.resolvedOptions meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.NumberFormat.prototype.resolvedOptions, true, false, [], 0); - diff --git a/test/suite/intl402/ch11/11.3/11.3_L15.js b/test/suite/intl402/ch11/11.3/11.3_L15.js index ac1f0c05df..e36f474a20 100644 --- a/test/suite/intl402/ch11/11.3/11.3_L15.js +++ b/test/suite/intl402/ch11/11.3/11.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 11.3_L15 +description: > + Tests that Intl.NumberFormat.prototype meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.NumberFormat.prototype, false, false, ["constructor", "format", "resolvedOptions"]); - diff --git a/test/suite/intl402/ch11/11.3/11.3_a.js b/test/suite/intl402/ch11/11.3/11.3_a.js index 282a10bf6e..ac8ceac49d 100644 --- a/test/suite/intl402/ch11/11.3/11.3_a.js +++ b/test/suite/intl402/ch11/11.3/11.3_a.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype is an object that - * has been initialized as an Intl.NumberFormat. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 11.3_a +description: > + Tests that Intl.NumberFormat.prototype is an object that has been + initialized as an Intl.NumberFormat. +author: Roozbeh Pournader +---*/ // test by calling a function that would fail if "this" were not an object // initialized as an Intl.NumberFormat @@ -13,4 +15,3 @@ if (typeof Intl.NumberFormat.prototype.format(0) !== "string") { $ERROR("Intl.NumberFormat's prototype is not an object that has been " + "initialized as an Intl.NumberFormat"); } - diff --git a/test/suite/intl402/ch11/11.3/11.3_b.js b/test/suite/intl402/ch11/11.3/11.3_b.js index 6d0162b1d9..74f2b7ec7b 100644 --- a/test/suite/intl402/ch11/11.3/11.3_b.js +++ b/test/suite/intl402/ch11/11.3/11.3_b.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat.prototype functions throw a - * TypeError if called on a non-object value or an object that hasn't been - * initialized as a NumberFormat. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.3_b +description: > + Tests that Intl.NumberFormat.prototype functions throw a + TypeError if called on a non-object value or an object that hasn't + been initialized as a NumberFormat. +author: Norbert Lindenberg +---*/ var functions = { "format getter": Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get, @@ -30,4 +32,3 @@ Object.getOwnPropertyNames(functions).forEach(function (functionName) { } }); }); - diff --git a/test/suite/intl402/ch11/11.4/11.4_a.js b/test/suite/intl402/ch11/11.4/11.4_a.js index a562879ece..31d7ec6dae 100644 --- a/test/suite/intl402/ch11/11.4/11.4_a.js +++ b/test/suite/intl402/ch11/11.4/11.4_a.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.NumberFormat instances have the specified properties. - * @author Norbert Lindenberg - */ +/*--- +es5id: 11.4_a +description: > + Tests that Intl.NumberFormat instances have the specified + properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.NumberFormat(); @@ -12,4 +15,3 @@ var toStringValue = Object.prototype.toString.call(obj); if (toStringValue !== "[object Object]") { $ERROR("Intl.NumberFormat instance produces wrong [[Class]] - toString returns " + toStringValue + "."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_1.js b/test/suite/intl402/ch12/12.1/12.1.1_1.js index 8136fb4210..2e01c2fb35 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_1.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_1.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that an object can't be re-initialized as a DateTimeFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_1 +description: Tests that an object can't be re-initialized as a DateTimeFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var obj, error; @@ -40,4 +40,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_18.js b/test/suite/intl402/ch12/12.1/12.1.1_18.js index f75ea1e327..a75f803e39 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_18.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_18.js @@ -1,15 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option hour12 is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_18 +description: Tests that the option hour12 is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.DateTimeFormat, "hour12", "boolean", undefined, undefined, {extra: {any: {hour: "numeric", minute: "numeric"}}}); testOption(Intl.DateTimeFormat, "hour12", "boolean", undefined, undefined, {noReturn: true}); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_22.js b/test/suite/intl402/ch12/12.1/12.1.1_22.js index 5c317c6b92..b25417f642 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_22.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_22.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_22 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZone"]); @@ -15,4 +16,3 @@ var locale = new Intl.DateTimeFormat(undefined, {localeMatcher: "lookup"}).resol if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { $ERROR("DateTimeFormat returns invalid locale " + locale + "."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_23.js b/test/suite/intl402/ch12/12.1/12.1.1_23.js index d26e1d28c8..e55cad91b4 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_23.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_23.js @@ -1,14 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the options for the date and time components are processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_23 +description: > + Tests that the options for the date and time components are + processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ getDateTimeComponents().forEach(function (component) { testOption(Intl.DateTimeFormat, component, "string", getDateTimeComponentValues(component), undefined, {isILD: true}); }); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_25.js b/test/suite/intl402/ch12/12.1/12.1.1_25.js index ccaf7be035..56b8ce145d 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_25.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_25.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option formatMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_25 +description: Tests that the option formatMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.DateTimeFormat, "formatMatcher", "string", ["basic", "best fit"], "best fit", {noReturn: true}); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_5.js b/test/suite/intl402/ch12/12.1/12.1.1_5.js index c6b166814c..47f381c07f 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_5.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_5.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_5 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["localeMatcher"]); @@ -15,4 +16,3 @@ var locale = new Intl.DateTimeFormat(undefined, {localeMatcher: "lookup"}).resol if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { $ERROR("DateTimeFormat returns invalid locale " + locale + "."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_6.js b/test/suite/intl402/ch12/12.1/12.1.1_6.js index 148ca02f65..07e12efbca 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_6.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_6.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option localeMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_6 +description: Tests that the option localeMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.DateTimeFormat, "localeMatcher", "string", ["lookup", "best fit"], "best fit", {noReturn: true}); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js b/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js index 5df6a1cf2b..b8e2443111 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the set of options for the date and time components is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_TDTO +description: > + Tests that the set of options for the date and time components is + processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = [[], ["zh-Hans-CN"], ["hi-IN"], ["en-US"], ["id-ID"]]; var dates = [new Date(), new Date(0), new Date(Date.parse("1989-11-09T17:57:00Z"))]; @@ -103,5 +105,3 @@ testWithToLocale("toLocaleTimeString", {weekday: "short", year: "numeric", month // time/time: steps 6a testWithToLocale("toLocaleTimeString", {hour: "numeric", minute: "numeric"}, {hour: "numeric", minute: "numeric"}); - - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_a.js b/test/suite/intl402/ch12/12.1/12.1.1_a.js index 4f5f3dbf5e..9706759968 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_a.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_a.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that constructing a DateTimeFormat doesn't create or modify - * unwanted properties on the RegExp constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.1_a +description: > + Tests that constructing a DateTimeFormat doesn't create or modify + unwanted properties on the RegExp constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testForUnwantedRegExpChanges(function () { new Intl.DateTimeFormat("de-DE-u-ca-gregory"); diff --git a/test/suite/intl402/ch12/12.1/12.1.2.1_4.js b/test/suite/intl402/ch12/12.1/12.1.2.1_4.js index cb22be8f99..5806f89ac4 100644 --- a/test/suite/intl402/ch12/12.1/12.1.2.1_4.js +++ b/test/suite/intl402/ch12/12.1/12.1.2.1_4.js @@ -1,11 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that for non-object values passed as this to DateTimeFormat a - * wrapper object will be initialized and returned. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.1.2.1_4 +description: > + Tests that for non-object values passed as this to DateTimeFormat + a wrapper object will be initialized and returned. +author: Norbert Lindenberg +---*/ var thisValues = [true, 42, "国際化"]; @@ -18,4 +20,3 @@ thisValues.forEach(function (value) { } return true; }); - diff --git a/test/suite/intl402/ch12/12.1/12.1.2.js b/test/suite/intl402/ch12/12.1/12.1.2.js index 3ffed2ec82..6df79f5f53 100644 --- a/test/suite/intl402/ch12/12.1/12.1.2.js +++ b/test/suite/intl402/ch12/12.1/12.1.2.js @@ -2,12 +2,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat can be subclassed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.1.2 +description: Tests that Intl.DateTimeFormat can be subclassed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // get a date-time format and have it format an array of dates for comparison with the subclass var locales = ["tlh", "id", "en"]; @@ -27,4 +27,3 @@ MyDateTimeFormat.prototype.constructor = MyDateTimeFormat; var format = new MyDateTimeFormat(locales); var actual = a.map(format.format); testArraysAreSame(referenceFormatted, actual); - diff --git a/test/suite/intl402/ch12/12.1/12.1.3.js b/test/suite/intl402/ch12/12.1/12.1.3.js index 5e70bbb8f3..34e24f297e 100644 --- a/test/suite/intl402/ch12/12.1/12.1.3.js +++ b/test/suite/intl402/ch12/12.1/12.1.3.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that objects constructed by Intl.DateTimeFormat have the specified internal properties. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.1.3 +description: > + Tests that objects constructed by Intl.DateTimeFormat have the + specified internal properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.DateTimeFormat(); @@ -16,4 +19,3 @@ if (actualPrototype !== Intl.DateTimeFormat.prototype) { if (!Object.isExtensible(obj)) { $ERROR("Object constructed by Intl.DateTimeFormat must be extensible."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1_L15.js b/test/suite/intl402/ch12/12.1/12.1_L15.js index 46c4f5f50b..e3b13f313f 100644 --- a/test/suite/intl402/ch12/12.1/12.1_L15.js +++ b/test/suite/intl402/ch12/12.1/12.1_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 12.1_L15 +description: > + Tests that Intl.DateTimeFormat meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.DateTimeFormat, true, true, ["supportedLocalesOf"], 0); - diff --git a/test/suite/intl402/ch12/12.2/12.2.1.js b/test/suite/intl402/ch12/12.2/12.2.1.js index 3590c0a9d2..288e6fd5e1 100644 --- a/test/suite/intl402/ch12/12.2/12.2.1.js +++ b/test/suite/intl402/ch12/12.2/12.2.1.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.prototype has the required attributes. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.2.1 +description: > + Tests that Intl.DateTimeFormat.prototype has the required + attributes. +author: Norbert Lindenberg +---*/ var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat, "prototype"); if (desc === undefined) { @@ -19,4 +22,3 @@ if (desc.enumerable) { if (desc.configurable) { $ERROR("Intl.DateTimeFormat.prototype must not be configurable."); } - diff --git a/test/suite/intl402/ch12/12.2/12.2.2_L15.js b/test/suite/intl402/ch12/12.2/12.2.2_L15.js index 8b21df1fd3..ba8ad9c69d 100644 --- a/test/suite/intl402/ch12/12.2/12.2.2_L15.js +++ b/test/suite/intl402/ch12/12.2/12.2.2_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.supportedLocalesOf - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 12.2.2_L15 +description: > + Tests that Intl.DateTimeFormat.supportedLocalesOf meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.DateTimeFormat.supportedLocalesOf, true, false, [], 1); - diff --git a/test/suite/intl402/ch12/12.2/12.2.2_a.js b/test/suite/intl402/ch12/12.2/12.2.2_a.js index 42eedc0a1a..725709e028 100644 --- a/test/suite/intl402/ch12/12.2/12.2.2_a.js +++ b/test/suite/intl402/ch12/12.2/12.2.2_a.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat has a supportedLocalesOf - * property, and it works as planned. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 12.2.2_a +description: > + Tests that Intl.DateTimeFormat has a supportedLocalesOf property, + and it works as planned. +author: Roozbeh Pournader +---*/ var defaultLocale = new Intl.DateTimeFormat().resolvedOptions().locale; var notSupported = 'zxx'; // "no linguistic content" @@ -25,4 +27,3 @@ if (supportedLocales.length !== 1) { if (supportedLocales[0] !== defaultLocale) { $ERROR('The default locale is not returned in the supported list.'); } - diff --git a/test/suite/intl402/ch12/12.2/12.2.2_b.js b/test/suite/intl402/ch12/12.2/12.2.2_b.js index 06bc8027e7..dea882fc95 100644 --- a/test/suite/intl402/ch12/12.2/12.2.2_b.js +++ b/test/suite/intl402/ch12/12.2/12.2.2_b.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.supportedLocalesOf - * doesn't access arguments that it's not given. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.2.2_b +description: > + Tests that Intl.DateTimeFormat.supportedLocalesOf doesn't access + arguments that it's not given. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintDataProperty(Object.prototype, "1"); new Intl.DateTimeFormat("und"); diff --git a/test/suite/intl402/ch12/12.2/12.2.3_b.js b/test/suite/intl402/ch12/12.2/12.2.3_b.js index 65fd9dc5fb..d50fca56ce 100644 --- a/test/suite/intl402/ch12/12.2/12.2.3_b.js +++ b/test/suite/intl402/ch12/12.2/12.2.3_b.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat does not accept Unicode locale - * extension keys and values that are not allowed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.2.3_b +description: > + Tests that Intl.DateTimeFormat does not accept Unicode locale + extension keys and values that are not allowed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = ["ja-JP", "zh-Hans-CN", "zh-Hant-TW"]; var input = new Date(Date.parse("1989-11-09T17:57:00Z")); @@ -44,4 +45,3 @@ locales.forEach(function (locale) { }); }); }); - diff --git a/test/suite/intl402/ch12/12.2/12.2.3_c.js b/test/suite/intl402/ch12/12.2/12.2.3_c.js index 0aced6ca91..ba7ea2f547 100644 --- a/test/suite/intl402/ch12/12.2/12.2.3_c.js +++ b/test/suite/intl402/ch12/12.2/12.2.3_c.js @@ -1,13 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat provides the required date-time - * format component subsets. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.2.3_c +description: > + Tests that Intl.DateTimeFormat provides the required date-time + format component subsets. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = ["de-DE", "en-US", "hi-IN", "id-ID", "ja-JP", "th-TH", "zh-Hans-CN", "zh-Hant-TW", "zxx"]; var subsets = [ @@ -49,4 +50,3 @@ locales.forEach(function (locale) { }); }); }); - diff --git a/test/suite/intl402/ch12/12.3/12.3.1.js b/test/suite/intl402/ch12/12.3/12.3.1.js index 1755dd64bc..bc92aa2c18 100644 --- a/test/suite/intl402/ch12/12.3/12.3.1.js +++ b/test/suite/intl402/ch12/12.3/12.3.1.js @@ -1,14 +1,15 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.prototype.constructor is the - * Intl.DateTimeFormat. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 12.3.1 +description: > + Tests that Intl.DateTimeFormat.prototype.constructor is the + Intl.DateTimeFormat. +author: Roozbeh Pournader +---*/ if (Intl.DateTimeFormat.prototype.constructor !== Intl.DateTimeFormat) { $ERROR("Intl.DateTimeFormat.prototype.constructor is not the same as " + "Intl.DateTimeFormat"); } - diff --git a/test/suite/intl402/ch12/12.3/12.3.2_1_a_L15.js b/test/suite/intl402/ch12/12.3/12.3.2_1_a_L15.js index 2fb768d09c..ffb76b7d83 100644 --- a/test/suite/intl402/ch12/12.3/12.3.2_1_a_L15.js +++ b/test/suite/intl402/ch12/12.3/12.3.2_1_a_L15.js @@ -1,14 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the function returned by Intl.DateTimeFormat.prototype.format - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 12.3.2_1_a_L15 +description: > + Tests that the function returned by + Intl.DateTimeFormat.prototype.format meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(new Intl.DateTimeFormat().format, true, false, [], 0); - diff --git a/test/suite/intl402/ch12/12.3/12.3.2_1_c.js b/test/suite/intl402/ch12/12.3/12.3.2_1_c.js index d4b9f891fe..407a37a9dc 100644 --- a/test/suite/intl402/ch12/12.3/12.3.2_1_c.js +++ b/test/suite/intl402/ch12/12.3/12.3.2_1_c.js @@ -1,12 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that format function is bound to its Intl.DateTimeFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.3.2_1_c +description: Tests that format function is bound to its Intl.DateTimeFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var dates = [new Date(), new Date(0), new Date(Date.parse("1989-11-09T17:57:00Z"))]; var locales = [undefined, ["de"], ["th-u-ca-gregory-nu-thai"], ["en"], ["ja-u-ca-japanese"], ["ar-u-ca-islamicc-nu-arab"]]; @@ -31,4 +31,3 @@ locales.forEach(function (locales) { }); }); }); - diff --git a/test/suite/intl402/ch12/12.3/12.3.2_FDT_1.js b/test/suite/intl402/ch12/12.3/12.3.2_FDT_1.js index d643d7928b..f395a23fcf 100644 --- a/test/suite/intl402/ch12/12.3/12.3.2_FDT_1.js +++ b/test/suite/intl402/ch12/12.3/12.3.2_FDT_1.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that format handles non-finite values correctly. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.3.2_FDT_1 +description: Tests that format handles non-finite values correctly. +author: Norbert Lindenberg +---*/ var invalidValues = [NaN, Infinity, -Infinity]; @@ -23,4 +24,3 @@ invalidValues.forEach(function (value) { $ERROR("Invalid value " + value + " was rejected with wrong error " + error.name + "."); } }); - diff --git a/test/suite/intl402/ch12/12.3/12.3.2_FDT_7_a_iv.js b/test/suite/intl402/ch12/12.3/12.3.2_FDT_7_a_iv.js index f138784039..1e731fa738 100644 --- a/test/suite/intl402/ch12/12.3/12.3.2_FDT_7_a_iv.js +++ b/test/suite/intl402/ch12/12.3/12.3.2_FDT_7_a_iv.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that format uses a proleptic Gregorian calendar with no year 0. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.3.2_FDT_7_a_iv +description: > + Tests that format uses a proleptic Gregorian calendar with no year + 0. +author: Norbert Lindenberg +---*/ var dates = [ 0, // January 1, 1970 @@ -29,4 +32,3 @@ dates.forEach(function (date) { expectedYearString + ", got " + dateString + "."); } }); - diff --git a/test/suite/intl402/ch12/12.3/12.3.2_L15.js b/test/suite/intl402/ch12/12.3/12.3.2_L15.js index 73d309e26a..ef0280ccc2 100644 --- a/test/suite/intl402/ch12/12.3/12.3.2_L15.js +++ b/test/suite/intl402/ch12/12.3/12.3.2_L15.js @@ -1,14 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the getter for Intl.DateTimeFormat.prototype.format - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 12.3.2_L15 +description: > + Tests that the getter for Intl.DateTimeFormat.prototype.format + meets the requirements for built-in objects defined by the + introduction of chapter 15 of the ECMAScript Language + Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get , true, false, [], 0); - diff --git a/test/suite/intl402/ch12/12.3/12.3.2_TLT_2.js b/test/suite/intl402/ch12/12.3/12.3.2_TLT_2.js index bf0a8ed36f..69b049a6ec 100644 --- a/test/suite/intl402/ch12/12.3/12.3.2_TLT_2.js +++ b/test/suite/intl402/ch12/12.3/12.3.2_TLT_2.js @@ -1,16 +1,16 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.3.2_TLT_2 +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["weekday", "era", "year", "month", "day", "hour", "minute", "second", "inDST"]); var format = new Intl.DateTimeFormat(); var time = format.format(); - diff --git a/test/suite/intl402/ch12/12.3/12.3.3.js b/test/suite/intl402/ch12/12.3/12.3.3.js index b5735c3500..55e31ad869 100644 --- a/test/suite/intl402/ch12/12.3/12.3.3.js +++ b/test/suite/intl402/ch12/12.3/12.3.3.js @@ -1,13 +1,15 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that the object returned by Intl.DateTimeFormat.prototype.resolvedOptions - * has the right properties. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 12.3.3 +description: > + Tests that the object returned by + Intl.DateTimeFormat.prototype.resolvedOptions has the right + properties. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var actual = new Intl.DateTimeFormat().resolvedOptions(); @@ -49,4 +51,3 @@ mustNotHaveProperty(actual, "minute"); mustNotHaveProperty(actual, "second"); mustNotHaveProperty(actual, "timeZoneName"); mustNotHaveProperty(actual, "hour12"); - diff --git a/test/suite/intl402/ch12/12.3/12.3.3_L15.js b/test/suite/intl402/ch12/12.3/12.3.3_L15.js index 1b4079ebec..a4de84c1bd 100644 --- a/test/suite/intl402/ch12/12.3/12.3.3_L15.js +++ b/test/suite/intl402/ch12/12.3/12.3.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.prototype.resolvedOptions - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 12.3.3_L15 +description: > + Tests that Intl.DateTimeFormat.prototype.resolvedOptions meets + the requirements for built-in objects defined by the introduction + of chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.DateTimeFormat.prototype.resolvedOptions, true, false, [], 0); - diff --git a/test/suite/intl402/ch12/12.3/12.3_L15.js b/test/suite/intl402/ch12/12.3/12.3_L15.js index 55f1c16ca1..c37c32c391 100644 --- a/test/suite/intl402/ch12/12.3/12.3_L15.js +++ b/test/suite/intl402/ch12/12.3/12.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.prototype - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 12.3_L15 +description: > + Tests that Intl.DateTimeFormat.prototype meets the requirements + for built-in objects defined by the introduction of chapter 15 of + the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.DateTimeFormat.prototype, false, false, ["constructor", "format", "resolvedOptions"]); - diff --git a/test/suite/intl402/ch12/12.3/12.3_a.js b/test/suite/intl402/ch12/12.3/12.3_a.js index e1d795b910..8cc79e4030 100644 --- a/test/suite/intl402/ch12/12.3/12.3_a.js +++ b/test/suite/intl402/ch12/12.3/12.3_a.js @@ -1,11 +1,13 @@ // Copyright 2012 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.prototype is an object that - * has been initialized as an Intl.DateTimeFormat. - * @author: Roozbeh Pournader - */ +/*--- +es5id: 12.3_a +description: > + Tests that Intl.DateTimeFormat.prototype is an object that has + been initialized as an Intl.DateTimeFormat. +author: Roozbeh Pournader +---*/ // test by calling a function that would fail if "this" were not an object // initialized as an Intl.DateTimeFormat @@ -13,4 +15,3 @@ if (typeof Intl.DateTimeFormat.prototype.format(0) !== "string") { $ERROR("Intl.DateTimeFormat's prototype is not an object that has been " + "initialized as an Intl.DateTimeFormat"); } - diff --git a/test/suite/intl402/ch12/12.3/12.3_b.js b/test/suite/intl402/ch12/12.3/12.3_b.js index d905bf5712..9cb3aed6ed 100644 --- a/test/suite/intl402/ch12/12.3/12.3_b.js +++ b/test/suite/intl402/ch12/12.3/12.3_b.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat.prototype functions throw a - * TypeError if called on a non-object value or an object that hasn't been - * initialized as a DateTimeFormat. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.3_b +description: > + Tests that Intl.DateTimeFormat.prototype functions throw a + TypeError if called on a non-object value or an object that hasn't + been initialized as a DateTimeFormat. +author: Norbert Lindenberg +---*/ var functions = { "format getter": Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get, @@ -30,4 +32,3 @@ Object.getOwnPropertyNames(functions).forEach(function (functionName) { } }); }); - diff --git a/test/suite/intl402/ch12/12.4/12.4_a.js b/test/suite/intl402/ch12/12.4/12.4_a.js index 8e8d5954c0..8dd859471a 100644 --- a/test/suite/intl402/ch12/12.4/12.4_a.js +++ b/test/suite/intl402/ch12/12.4/12.4_a.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat instances have the specified properties. - * @author Norbert Lindenberg - */ +/*--- +es5id: 12.4_a +description: > + Tests that Intl.DateTimeFormat instances have the specified + properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.DateTimeFormat(); @@ -12,4 +15,3 @@ var toStringValue = Object.prototype.toString.call(obj); if (toStringValue !== "[object Object]") { $ERROR("Intl.DateTimeFormat instance produces wrong [[Class]] - toString returns " + toStringValue + "."); } - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_1.js b/test/suite/intl402/ch13/13.1/13.1.1_1.js index 37be9711b3..d0564c5d19 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_1.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_1.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that localeCompare rejects values that can't be coerced to an object. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.1.1_1 +description: > + Tests that localeCompare rejects values that can't be coerced to + an object. +author: Norbert Lindenberg +---*/ var invalidValues = [undefined, null]; @@ -21,4 +24,3 @@ invalidValues.forEach(function (value) { $ERROR("String.prototype.localeCompare rejected this = " + value + " with wrong error " + error.name + "."); } }); - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_2.js b/test/suite/intl402/ch13/13.1/13.1.1_2.js index bad7c0fdd8..fcbd96b32a 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_2.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_2.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that localeCompare coerces this to a string. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.1.1_2 +description: Tests that localeCompare coerces this to a string. +author: Norbert Lindenberg +---*/ var thisValues = [true, 5, "hello", {toString: function () { return "good bye"; }}]; var thatValues = ["true", "5", "hello", "good bye"]; @@ -23,4 +24,3 @@ for (i = 0; i < thisValues.length; i++) { } } } - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_3_1.js b/test/suite/intl402/ch13/13.1/13.1.1_3_1.js index 113a2d9aa8..4b7f944fca 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_3_1.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_3_1.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that localeCompare coerces that to a string. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.1.1_3_1 +description: Tests that localeCompare coerces that to a string. +author: Norbert Lindenberg +---*/ var thisValues = ["true", "5", "hello", "good bye"]; var thatValues = [true, 5, "hello", {toString: function () { return "good bye"; }}]; @@ -23,4 +24,3 @@ for (i = 0; i < thisValues.length; i++) { } } } - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_3_2.js b/test/suite/intl402/ch13/13.1/13.1.1_3_2.js index 441166c9fb..5d9605b0df 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_3_2.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_3_2.js @@ -1,11 +1,13 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that String.prototype.localeCompare treats a missing - * "that" argument, undefined, and "undefined" as equivalent. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.1.1_3_2 +description: > + Tests that String.prototype.localeCompare treats a missing "that" + argument, undefined, and "undefined" as equivalent. +author: Norbert Lindenberg +---*/ var thisValues = ["a", "t", "u", "undefined", "UNDEFINED", "nicht definiert", "xyz", "未定义"]; @@ -19,4 +21,3 @@ for (i = 0; i < thisValues.length; i++) { $ERROR("String.prototype.localeCompare does not treat undefined 'that' argument as \"undefined\"."); } } - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_6_1.js b/test/suite/intl402/ch13/13.1/13.1.1_6_1.js index 30607d3171..9215b1afb7 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_6_1.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_6_1.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that String.prototype.localeCompare throws the same exceptions as Intl.Collator. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.1.1_6_1 +description: > + Tests that String.prototype.localeCompare throws the same + exceptions as Intl.Collator. +author: Norbert Lindenberg +---*/ var locales = [null, [NaN], ["i"], ["de_DE"]]; var options = [ @@ -62,4 +65,3 @@ options.forEach(function (options) { " for options " + JSON.stringify(options) + "; expected " + referenceError.name + "."); } }); - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_6_2.js b/test/suite/intl402/ch13/13.1/13.1.1_6_2.js index 481a7803b2..8833f9fa8d 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_6_2.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_6_2.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that String.prototype.localeCompare uses the standard - * built-in Intl.Collator constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 13.1.1_6_2 +description: > + Tests that String.prototype.localeCompare uses the standard + built-in Intl.Collator constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintDataProperty(Intl, "Collator"); "a".localeCompare("b"); diff --git a/test/suite/intl402/ch13/13.1/13.1.1_7.js b/test/suite/intl402/ch13/13.1/13.1.1_7.js index f0c588f64c..25990ded30 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_7.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_7.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that localeCompare produces the same results as Intl.Collator. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 13.1.1_7 +description: > + Tests that localeCompare produces the same results as + Intl.Collator. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var strings = ["d", "O", "od", "oe", "of", "ö", "o\u0308", "X", "y", "Z", "Z.", "𠮷野家", "吉野家", "!A", "A", "b", "C"]; var locales = [undefined, ["de"], ["de-u-co-phonebk"], ["en"], ["ja"], ["sv"]]; @@ -30,4 +32,3 @@ locales.forEach(function (locales) { } }); }); - diff --git a/test/suite/intl402/ch13/13.1/13.1.1_L15.js b/test/suite/intl402/ch13/13.1/13.1.1_L15.js index d921de0005..fb28e49e65 100644 --- a/test/suite/intl402/ch13/13.1/13.1.1_L15.js +++ b/test/suite/intl402/ch13/13.1/13.1.1_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that String.prototype.localeCompare - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 13.1.1_L15 +description: > + Tests that String.prototype.localeCompare meets the requirements + for built-in objects defined by the introduction of chapter 15 of + the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(String.prototype.localeCompare, true, false, [], 1); - diff --git a/test/suite/intl402/ch13/13.2/13.2.1_1.js b/test/suite/intl402/ch13/13.2/13.2.1_1.js index da1ee8fe58..f837a0b85b 100644 --- a/test/suite/intl402/ch13/13.2/13.2.1_1.js +++ b/test/suite/intl402/ch13/13.2/13.2.1_1.js @@ -1,10 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that toLocaleString handles "this Number value" correctly. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.2.1_1 +description: Tests that toLocaleString handles "this Number value" correctly. +author: Norbert Lindenberg +---*/ var invalidValues = [undefined, null, "5", false, {valueOf: function () { return 5; }}]; var validValues = [5, NaN, -1234567.89, -Infinity]; @@ -34,4 +35,3 @@ validValues.forEach(function (value) { value + " and corresponding Number object: " + valueResult + " vs. " + objectResult + "."); } }); - diff --git a/test/suite/intl402/ch13/13.2/13.2.1_4_1.js b/test/suite/intl402/ch13/13.2/13.2.1_4_1.js index e6e0b11638..d2cb2ae37f 100644 --- a/test/suite/intl402/ch13/13.2/13.2.1_4_1.js +++ b/test/suite/intl402/ch13/13.2/13.2.1_4_1.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Number.prototype.toLocaleString throws the same exceptions as Intl.NumberFormat. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.2.1_4_1 +description: > + Tests that Number.prototype.toLocaleString throws the same + exceptions as Intl.NumberFormat. +author: Norbert Lindenberg +---*/ var locales = [null, [NaN], ["i"], ["de_DE"]]; var options = [ @@ -64,4 +67,3 @@ options.forEach(function (options) { " for options " + JSON.stringify(options) + "; expected " + referenceError.name + "."); } }); - diff --git a/test/suite/intl402/ch13/13.2/13.2.1_4_2.js b/test/suite/intl402/ch13/13.2/13.2.1_4_2.js index a79cfffde7..0b88ae29c4 100644 --- a/test/suite/intl402/ch13/13.2/13.2.1_4_2.js +++ b/test/suite/intl402/ch13/13.2/13.2.1_4_2.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Number.prototype.toLocaleString uses the standard - * built-in Intl.NumberFormat constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 13.2.1_4_2 +description: > + Tests that Number.prototype.toLocaleString uses the standard + built-in Intl.NumberFormat constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintDataProperty(Intl, "NumberFormat"); (0.0).toLocaleString(); diff --git a/test/suite/intl402/ch13/13.2/13.2.1_5.js b/test/suite/intl402/ch13/13.2/13.2.1_5.js index eb953b64d4..929cb6be14 100644 --- a/test/suite/intl402/ch13/13.2/13.2.1_5.js +++ b/test/suite/intl402/ch13/13.2/13.2.1_5.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Number.prototype.toLocaleString produces the same results as Intl.NumberFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 13.2.1_5 +description: > + Tests that Number.prototype.toLocaleString produces the same + results as Intl.NumberFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var numbers = [0, -0, 1, -1, 5.5, 123, -123, -123.45, 123.44501, 0.001234, -0.00000000123, 0.00000000000000000000000000000123, 1.2, 0.0000000012344501, @@ -38,4 +40,3 @@ locales.forEach(function (locales) { } }); }); - diff --git a/test/suite/intl402/ch13/13.2/13.2.1_L15.js b/test/suite/intl402/ch13/13.2/13.2.1_L15.js index 8b53f74963..f4b27e792b 100644 --- a/test/suite/intl402/ch13/13.2/13.2.1_L15.js +++ b/test/suite/intl402/ch13/13.2/13.2.1_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Number.prototype.toLocaleString - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 13.2.1_L15 +description: > + Tests that Number.prototype.toLocaleString meets the requirements + for built-in objects defined by the introduction of chapter 15 of + the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Number.prototype.toLocaleString, true, false, [], 0); - diff --git a/test/suite/intl402/ch13/13.3/13.3.0_1.js b/test/suite/intl402/ch13/13.3/13.3.0_1.js index 0f2902162e..a79f9c597f 100644 --- a/test/suite/intl402/ch13/13.3/13.3.0_1.js +++ b/test/suite/intl402/ch13/13.3/13.3.0_1.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleString & Co. handle "this time value" correctly. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.3.0_1 +description: > + Tests that Date.prototype.toLocaleString & Co. handle "this time + value" correctly. +author: Norbert Lindenberg +---*/ var functions = { toLocaleString: Date.prototype.toLocaleString, @@ -29,4 +32,3 @@ Object.getOwnPropertyNames(functions).forEach(function (p) { } }); }); - diff --git a/test/suite/intl402/ch13/13.3/13.3.0_2.js b/test/suite/intl402/ch13/13.3/13.3.0_2.js index 7d5f32fa68..c0d87d031a 100644 --- a/test/suite/intl402/ch13/13.3/13.3.0_2.js +++ b/test/suite/intl402/ch13/13.3/13.3.0_2.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleString & Co. handle non-finite values correctly. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.3.0_2 +description: > + Tests that Date.prototype.toLocaleString & Co. handle non-finite + values correctly. +author: Norbert Lindenberg +---*/ var functions = { toLocaleString: Date.prototype.toLocaleString, @@ -23,4 +26,3 @@ Object.getOwnPropertyNames(functions).forEach(function (p) { } }); }); - diff --git a/test/suite/intl402/ch13/13.3/13.3.0_6_1.js b/test/suite/intl402/ch13/13.3/13.3.0_6_1.js index c97b240b47..028160f32a 100644 --- a/test/suite/intl402/ch13/13.3/13.3.0_6_1.js +++ b/test/suite/intl402/ch13/13.3/13.3.0_6_1.js @@ -1,10 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleString & Co. throws the same exceptions as Intl.DateTimeFormat. - * @author Norbert Lindenberg - */ +/*--- +es5id: 13.3.0_6_1 +description: > + Tests that Date.prototype.toLocaleString & Co. throws the same + exceptions as Intl.DateTimeFormat. +author: Norbert Lindenberg +---*/ var functions = { toLocaleString: Date.prototype.toLocaleString, @@ -71,4 +74,3 @@ Object.getOwnPropertyNames(functions).forEach(function (p) { } }); }); - diff --git a/test/suite/intl402/ch13/13.3/13.3.0_6_2.js b/test/suite/intl402/ch13/13.3/13.3.0_6_2.js index dcce059066..fc03dbbebc 100644 --- a/test/suite/intl402/ch13/13.3/13.3.0_6_2.js +++ b/test/suite/intl402/ch13/13.3/13.3.0_6_2.js @@ -1,13 +1,14 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleString & Co. use the standard - * built-in Intl.DateTimeFormat constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 13.3.0_6_2 +description: > + Tests that Date.prototype.toLocaleString & Co. use the standard + built-in Intl.DateTimeFormat constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintDataProperty(Intl, "DateTimeFormat"); new Date().toLocaleString(); diff --git a/test/suite/intl402/ch13/13.3/13.3.0_7.js b/test/suite/intl402/ch13/13.3/13.3.0_7.js index fe7c9271d0..d04a832545 100644 --- a/test/suite/intl402/ch13/13.3/13.3.0_7.js +++ b/test/suite/intl402/ch13/13.3/13.3.0_7.js @@ -1,12 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleString & Co. produces the same results as Intl.DateTimeFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +es5id: 13.3.0_7 +description: > + Tests that Date.prototype.toLocaleString & Co. produces the same + results as Intl.DateTimeFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var functions = { toLocaleString: [Date.prototype.toLocaleString, @@ -55,4 +57,3 @@ Object.getOwnPropertyNames(functions).forEach(function (p) { }); }); }); - diff --git a/test/suite/intl402/ch13/13.3/13.3.1_L15.js b/test/suite/intl402/ch13/13.3/13.3.1_L15.js index a8c697c077..598359c182 100644 --- a/test/suite/intl402/ch13/13.3/13.3.1_L15.js +++ b/test/suite/intl402/ch13/13.3/13.3.1_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleString - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 13.3.1_L15 +description: > + Tests that Date.prototype.toLocaleString meets the requirements + for built-in objects defined by the introduction of chapter 15 of + the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Date.prototype.toLocaleString, true, false, [], 0); - diff --git a/test/suite/intl402/ch13/13.3/13.3.2_L15.js b/test/suite/intl402/ch13/13.3/13.3.2_L15.js index 5eeed944ea..25fdf5b11f 100644 --- a/test/suite/intl402/ch13/13.3/13.3.2_L15.js +++ b/test/suite/intl402/ch13/13.3/13.3.2_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleDateString - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 13.3.2_L15 +description: > + Tests that Date.prototype.toLocaleDateString meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Date.prototype.toLocaleDateString, true, false, [], 0); - diff --git a/test/suite/intl402/ch13/13.3/13.3.3_L15.js b/test/suite/intl402/ch13/13.3/13.3.3_L15.js index dac7c35131..31147347b0 100644 --- a/test/suite/intl402/ch13/13.3/13.3.3_L15.js +++ b/test/suite/intl402/ch13/13.3/13.3.3_L15.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Date.prototype.toLocaleTimeString - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +es5id: 13.3.3_L15 +description: > + Tests that Date.prototype.toLocaleTimeString meets the + requirements for built-in objects defined by the introduction of + chapter 15 of the ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Date.prototype.toLocaleTimeString, true, false, [], 0); - diff --git a/tools/packaging/common.py b/tools/packaging/common.py index 5a68905b0d..90b483542e 100644 --- a/tools/packaging/common.py +++ b/tools/packaging/common.py @@ -5,44 +5,17 @@ # copyright and this notice and otherwise comply with the Use Terms. #--Imports--------------------------------------------------------------------- -import re +import parseTestRecord #--Stubs----------------------------------------------------------------------- - - #--Globals--------------------------------------------------------------------- -captureCommentPattern = re.compile(r"\/\*\*?((?:\s|\S)*?)\*\/\s*\n") -atattrs = re.compile(r"\s*\n\s*\*\s*@") -stars = re.compile(r"\s*\n\s*\*\s?") #--Helpers--------------------------------------------------------------------# -def stripStars(text): - return stars.sub('\n', text).strip() def convertDocString(docString): - envelope = {} - temp = captureCommentPattern.findall(docString)[0] - propTexts = atattrs.split(temp) - envelope['commentary'] = stripStars(propTexts[0]) - del propTexts[0] - - for propText in propTexts: - # TODO: error check for mismatch - propName = re.match(r"^\w+", propText).group(0) - propVal = propText[len(propName):] - - # Just till last one-time conversion - # strip optional initial colon or final semicolon. - # The initial colon is only stripped if it comes immediately - # after the identifier with no intervening whitespace. - propVal = re.sub(r"^:\s*", '', propVal, 1) - propVal = re.sub(r";\s*$", '', propVal, 1) - propVal = stripStars(propVal) - - if propName in envelope: - raise Exception('duplicate: ' + propName) - envelope[propName] = propVal; + envelope = parseTestRecord.parseTestRecord(docString, '') + envelope.pop('header', None) + envelope.pop('test', None) + return envelope - -#--MAIN------------------------------------------------------------------------ diff --git a/tools/packaging/parseTestRecord.py b/tools/packaging/parseTestRecord.py index 7a581a30a5..6671f84628 100644 --- a/tools/packaging/parseTestRecord.py +++ b/tools/packaging/parseTestRecord.py @@ -17,6 +17,8 @@ import sys import tempfile import time +import yaml + # from TestCasePackagerConfig import * headerPatternStr = r"(?:(?:\s*\/\/.*)?\s*\n)*" @@ -34,6 +36,9 @@ testRecordPattern = re.compile(r"^(" + headerPatternStr + stars = re.compile(r"\s*\n\s*\*\s?") atattrs = re.compile(r"\s*\n\s*\*\s*@") +yamlPattern = re.compile(r"---((?:\s|\S)*)---") +newlinePattern = re.compile(r"\n") + def stripStars(text): return stars.sub('\n', text).strip() @@ -41,25 +46,63 @@ def stripHeader(src): header = headerPattern.match(src).group(0) return src[len(header):] -def parseTestRecord(src, name): - testRecord = {} +def matchParts(src, name): match = testRecordPattern.match(src) if match == None: raise Exception('unrecognized: ' + name) + return match + +def hasYAML(text): + match = yamlPattern.match(text) + if match == None: + return False + return True + +def oldAttrParser(testRecord, body, name): + propTexts = atattrs.split(body) + testRecord['commentary'] = stripStars(propTexts[0]) + del propTexts[0] + for propText in propTexts: + propMatch = re.match(r"^\w+", propText) + if propMatch == None: + raise Exception('Malformed "@" attribute: ' + name) + propName = propMatch.group(0) + propVal = stripStars(propText[len(propName):]) + + if propName in testRecord: + raise Exception('duplicate: ' + propName) + testRecord[propName] = propVal; + +def yamlAttrParser(testRecord, attrs, name): + match = yamlPattern.match(attrs) + body = match.group(1) + parsed = yaml.load(body) + + if (parsed is None): + print "Failed to parse yaml in name %s"%(name) + return + + for key in parsed: + value = parsed[key] + if key == "info": + key = "commentary" + testRecord[key] = value + + if 'flags' in testRecord: + for flag in testRecord['flags']: + testRecord[flag] = "" + +def parseTestRecord(src, name): + testRecord = {} + match = matchParts(src, name) testRecord['header'] = match.group(1).strip() testRecord['test'] = match.group(3) # do not trim - if match.group(2): - propTexts = atattrs.split(match.group(2)) - testRecord['commentary'] = stripStars(propTexts[0]) - del propTexts[0] - for propText in propTexts: - propMatch = re.match(r"^\w+", propText) - if propMatch == None: - raise Exception('Malformed "@" attribute: ' + name) - propName = propMatch.group(0) - propVal = stripStars(propText[len(propName):]) - - if propName in testRecord: - raise Exception('duplicate: ' + propName) - testRecord[propName] = propVal; + + attrs = match.group(2) + if attrs: + if hasYAML(attrs): + yamlAttrParser(testRecord, attrs, name) + else: + oldAttrParser(testRecord, attrs, name) + return testRecord diff --git a/tools/packaging/test/README.md b/tools/packaging/test/README.md new file mode 100644 index 0000000000..b28f77f4fd --- /dev/null +++ b/tools/packaging/test/README.md @@ -0,0 +1,11 @@ +# Unit tests for python packaging tools + +This directory holds tests for the python code, not tests of EMCAScript + +## Running tests + +```` +$ cd tools/packaging/test +$ python test*.py +```` + diff --git a/tools/packaging/test/fixtures/test262-old-headers.js b/tools/packaging/test/fixtures/test262-old-headers.js new file mode 100644 index 0000000000..ff41177c5d --- /dev/null +++ b/tools/packaging/test/fixtures/test262-old-headers.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production Block { } in strict code can't contain function + * declaration; + * + * @path bestPractice/Sbp_A1_T1.js + * @description Trying to declare function at the Block statement + * @onlyStrict + * @negative SyntaxError + * @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls + */ + +"use strict"; +{ + function __func(){} +} + diff --git a/tools/packaging/test/fixtures/test262-yaml-headers.js b/tools/packaging/test/fixtures/test262-yaml-headers.js new file mode 100644 index 0000000000..e897237bcb --- /dev/null +++ b/tools/packaging/test/fixtures/test262-yaml-headers.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: > + The production Block { } in strict code can't contain function + declaration; +description: Trying to declare function at the Block statement +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---*/ + +"use strict"; +{ + function __func(){} +} + diff --git a/tools/packaging/test/test_common.py b/tools/packaging/test/test_common.py new file mode 100644 index 0000000000..3a5f249bff --- /dev/null +++ b/tools/packaging/test/test_common.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +# Copyright 2014 by Sam Mikes. All rights reserved. +# This code is governed by the BSD license found in the LICENSE file. + +import unittest + +import os + +# add parent dir to search path +import sys +sys.path.insert(0, "..") + +from common import * + +def slurpFile(name): + with open(name) as f: + contents = f.read() + return contents + + +class TestOldParsing(unittest.TestCase): + + def test_test(self): + pass + + def test_overview(self): + name = 'fixtures/test262-old-headers.js' + contents = slurpFile(name) + record = convertDocString(contents) + + self.assertEqual("""The production Block { } in strict code can't contain function +declaration;""", record['commentary']) + + self.assertEqual("bestPractice/Sbp_A1_T1.js", record['path']) + self.assertEqual("Trying to declare function at the Block statement", + record['description']) + self.assertEqual("", record['onlyStrict']) + self.assertEqual("SyntaxError", record['negative']) + self.assertEqual("http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls", + record['bestPractice']) + + +class TestYAMLParsing(unittest.TestCase): + + def test_overview(self): + name = 'fixtures/test262-yaml-headers.js' + contents = slurpFile(name) + record = convertDocString(contents) + + self.assertEqual("The production Block { } in strict code can't contain function declaration;\n", record['commentary']) + + self.assertEqual("Trying to declare function at the Block statement", + record['description']) + self.assertEqual(['onlyStrict'], record['flags']) + self.assertEqual("", record['onlyStrict']) + self.assertEqual("SyntaxError", record['negative']) + self.assertEqual("http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls", + record['bestPractice']) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/packaging/test/test_parseTestRecord.py b/tools/packaging/test/test_parseTestRecord.py new file mode 100644 index 0000000000..10da6d519e --- /dev/null +++ b/tools/packaging/test/test_parseTestRecord.py @@ -0,0 +1,177 @@ +#!/usr/bin/env python + +# Copyright 2014 by Sam Mikes. All rights reserved. +# This code is governed by the BSD license found in the LICENSE file. + +import unittest + +import os +import yaml + +# add parent dir to search path +import sys +sys.path.insert(0, "..") + +from parseTestRecord import * + +def slurpFile(name): + with open(name) as f: + contents = f.read() + return contents + + +class TestOldParsing(unittest.TestCase): + + def test_test(self): + self.assertTrue(True) + + def test_overview(self): + name = 'fixtures/test262-old-headers.js' + contents = slurpFile(name) + record = parseTestRecord(contents, name) + + self.assertEqual("""// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file.""", + record['header']) + self.assertEqual("""The production Block { } in strict code can't contain function +declaration;""", record['commentary']) + + self.assertEqual("bestPractice/Sbp_A1_T1.js", record['path']) + self.assertEqual("Trying to declare function at the Block statement", + record['description']) + self.assertEqual("", record['onlyStrict']) + self.assertEqual("SyntaxError", record['negative']) + self.assertEqual("http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls", + record['bestPractice']) + + self.assertEqual(""""use strict"; +{ + function __func(){} +} + +""", record['test']) + + @unittest.expectedFailure + def test_nomatch(self): + with self.assertRaisesRegexp(Exception, "unrecognized"): + parseTestRecord("#!/usr/bin/env python", "random.py") + + def test_duplicate(self): + with self.assertRaisesRegexp(Exception, "duplicate: foo"): + parseTestRecord(""" +// Copyright + +/** + * @foo bar + * @foo bar + */ + +1; +""" + , "name") + + def test_malformed(self): + with self.assertRaisesRegexp(Exception, 'Malformed "@" attribute: name'): + parseTestRecord(""" +// Copyright + +/** + * @ baz + * @foo bar + */ + +1; +""" + , "name") + + def test_stripStars(self): + self.assertEqual("", stripStars("")) + self.assertEqual("foo", stripStars("\n* foo")) + self.assertEqual("@foo bar", stripStars("\n* @foo bar")) + self.assertEqual("@foo bar", stripStars("\n *@foo bar")) + + +class TestYAMLParsing(unittest.TestCase): + def test_test(self): + self.assertTrue(True) + + def test_split(self): + name = 'fixtures/test262-yaml-headers.js' + contents = slurpFile(name) + self.assertTrue('---' in contents) + match = matchParts(contents, name) + self.assertEqual("""--- +info: > + The production Block { } in strict code can't contain function + declaration; +description: Trying to declare function at the Block statement +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict] +---""", match.group(2)) + + def test_yamlParse(self): + text = """ +info: > + The production Block { } in strict code can't contain function + declaration; +description: Trying to declare function at the Block statement +negative: SyntaxError +bestPractice: "http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls" +flags: [onlyStrict]""" + parsed = yaml.load(text) + + self.assertEqual("Trying to declare function at the Block statement", + parsed['description']) + self.assertEqual("SyntaxError", parsed['negative']) + self.assertEqual('http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls', parsed['bestPractice']) + self.assertEqual(["onlyStrict"], parsed['flags']) + self.assertEqual("The production Block { } in strict code can't contain function declaration;\n", parsed['info']) + + def test_hasYAML(self): + self.assertTrue(hasYAML("---\n some: yaml\n\n---")) + self.assertFalse(hasYAML("\n* Test description\n *\n * @foo bar\n* @noStrict\n")) + + def test_fixturehasYAML(self): + name = 'fixtures/test262-yaml-headers.js' + contents = slurpFile(name) + self.assertTrue('---' in contents) + match = matchParts(contents, name) + self.assertTrue(hasYAML(match.group(2))) + + def test_missingKeys(self): + result = {} + yamlAttrParser(result, """--- + info: some info (note no flags or includes) +---""", "") + self.assertEqual("some info (note no flags or includes)", result['commentary']) + + def test_overview(self): + name = 'fixtures/test262-yaml-headers.js' + contents = slurpFile(name) + record = parseTestRecord(contents, name) + + self.assertEqual("""// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file.""", + record['header']) + self.assertEqual("The production Block { } in strict code can't contain function declaration;\n", record['commentary']) + + self.assertEqual("Trying to declare function at the Block statement", + record['description']) + self.assertEqual(['onlyStrict'], record['flags']) + self.assertEqual("", record['onlyStrict']) + self.assertEqual("SyntaxError", record['negative']) + self.assertEqual("http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls", + record['bestPractice']) + + self.assertEqual(""""use strict"; +{ + function __func(){} +} + +""", record['test']) + + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index 1e7ad1689e..0c3caf7d62 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -25,6 +25,7 @@ import json import stat import xml.etree.ElementTree as xmlj import unicodedata +from collections import Counter from parseTestRecord import parseTestRecord, stripHeader @@ -74,6 +75,8 @@ def BuildOptions(): result.add_option("--loglevel", default="warning", help="sets log level to debug, info, warning, error, or critical") result.add_option("--print-handle", default="", help="Command to print from console") + result.add_option("--list-includes", default=False, action="store_true", + help="List includes required by tests") return result @@ -251,7 +254,9 @@ class TestCase(object): return '$DONE' in self.test def GetIncludeList(self): - return re.findall('\$INCLUDE\([\'"]([^\)]+)[\'"]\)' ,self.test) + if self.testRecord.get('includes'): + return self.testRecord['includes'] + return re.findall('\$INCLUDE\([\'"]([^\)]+)[\'"]\)', self.test) def GetAdditionalIncludes(self): return '\n'.join([self.suite.GetInclude(include) for include in self.GetIncludeList()]) @@ -552,6 +557,16 @@ class TestSuite(object): if len(cases) > 0: cases[0].Print() + def ListIncludes(self, tests): + cases = self.EnumerateTests(tests) + includes_dict = Counter() + for case in cases: + includes = case.GetIncludeList() + includes_dict.update(includes) + + print includes_dict + + def Main(): code = 0 parser = BuildOptions() @@ -575,6 +590,8 @@ def Main(): logging.basicConfig(level=logging.CRITICAL) if options.cat: test_suite.Print(args) + elif options.list_includes: + test_suite.ListIncludes(args) else: code = test_suite.Run(options.command, args, options.summary or options.full_summary, diff --git a/website/harness/$FAIL.js b/website/harness/$FAIL.js new file mode 100644 index 0000000000..64f13f14ed --- /dev/null +++ b/website/harness/$FAIL.js @@ -0,0 +1,3 @@ +function $FAIL(message) { + testFailed(message); +} diff --git a/website/harness/$PRINT.js b/website/harness/$PRINT.js new file mode 100644 index 0000000000..b9a3015037 --- /dev/null +++ b/website/harness/$PRINT.js @@ -0,0 +1,4 @@ +//adaptors for Test262 framework +function $PRINT(message) { + +} diff --git a/website/harness/Test262Error.js b/website/harness/Test262Error.js new file mode 100644 index 0000000000..8966c7621f --- /dev/null +++ b/website/harness/Test262Error.js @@ -0,0 +1,7 @@ +//function Test262Error(message) { +// if (message) this.message = message; +//} +// +//Test262Error.prototype.toString = function () { +// return "Test262 Error: " + this.message; +//}; diff --git a/website/harness/accessorPropertyAttributesAreCorrect.js b/website/harness/accessorPropertyAttributesAreCorrect.js new file mode 100644 index 0000000000..8343936457 --- /dev/null +++ b/website/harness/accessorPropertyAttributesAreCorrect.js @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +//Verify all attributes specified accessor property of given object: +//get, set, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function accessorPropertyAttributesAreCorrect(obj, + name, + get, + set, + setVerifyHelpProp, + enumerable, + configurable) { + var attributesCorrect = true; + + if (get !== undefined) { + if (obj[name] !== get()) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof get() === "number" && + isNaN(get())) { + // keep empty + } else { + attributesCorrect = false; + } + } + } else { + if (obj[name] !== undefined) { + attributesCorrect = false; + } + } + + try { + var desc = Object.getOwnPropertyDescriptor(obj, name); + if (typeof desc.set === "undefined") { + if (typeof set !== "undefined") { + attributesCorrect = false; + } + } else { + obj[name] = "toBeSetValue"; + if (obj[setVerifyHelpProp] !== "toBeSetValue") { + attributesCorrect = false; + } + } + } catch (se) { + throw se; + } + + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + try { + delete obj[name]; + } catch (de) { + throw de; + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} diff --git a/website/harness/arrayContains.js b/website/harness/arrayContains.js new file mode 100644 index 0000000000..b295de5f3f --- /dev/null +++ b/website/harness/arrayContains.js @@ -0,0 +1,17 @@ +//----------------------------------------------------------------------------- +function arrayContains(arr, expected) { + var found; + for (var i = 0; i < expected.length; i++) { + found = false; + for (var j = 0; j < arr.length; j++) { + if (expected[i] === arr[j]) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; +} diff --git a/website/harness/compareArray.js b/website/harness/compareArray.js new file mode 100644 index 0000000000..9b842ed5c6 --- /dev/null +++ b/website/harness/compareArray.js @@ -0,0 +1,19 @@ + +//----------------------------------------------------------------------------- +function compareArray(aExpected, aActual) { + if (aActual.length != aExpected.length) { + return false; + } + + aExpected.sort(); + aActual.sort(); + + var s; + for (var i = 0; i < aExpected.length; i++) { + if (aActual[i] !== aExpected[i]) { + return false; + } + } + return true; +} + diff --git a/website/harness/dataPropertyAttributesAreCorrect.js b/website/harness/dataPropertyAttributesAreCorrect.js new file mode 100644 index 0000000000..201409f905 --- /dev/null +++ b/website/harness/dataPropertyAttributesAreCorrect.js @@ -0,0 +1,74 @@ +//----------------------------------------------------------------------------- +//Verify all attributes specified data property of given object: +//value, writable, enumerable, configurable +//If all attribute values are expected, return true, otherwise, return false +function dataPropertyAttributesAreCorrect(obj, + name, + value, + writable, + enumerable, + configurable) { + var attributesCorrect = true; + + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + attributesCorrect = false; + } + } + + try { + if (obj[name] === "oldValue") { + obj[name] = "newValue"; + } else { + obj[name] = "OldValue"; + } + } catch (we) { + } + + var overwrited = false; + if (obj[name] !== value) { + if (typeof obj[name] === "number" && + isNaN(obj[name]) && + typeof value === "number" && + isNaN(value)) { + // keep empty + } else { + overwrited = true; + } + } + if (overwrited !== writable) { + attributesCorrect = false; + } + + var enumerated = false; + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && prop === name) { + enumerated = true; + } + } + + if (enumerated !== enumerable) { + attributesCorrect = false; + } + + + var deleted = false; + + try { + delete obj[name]; + } catch (de) { + } + if (!obj.hasOwnProperty(name)) { + deleted = true; + } + if (deleted !== configurable) { + attributesCorrect = false; + } + + return attributesCorrect; +} diff --git a/website/harness/fnExists.js b/website/harness/fnExists.js new file mode 100644 index 0000000000..1f283b45d5 --- /dev/null +++ b/website/harness/fnExists.js @@ -0,0 +1,7 @@ +//----------------------------------------------------------------------------- +function fnExists(/*arguments*/) { + for (var i = 0; i < arguments.length; i++) { + if (typeof (arguments[i]) !== "function") return false; + } + return true; +} diff --git a/website/harness/fnGlobalObject.js b/website/harness/fnGlobalObject.js new file mode 100644 index 0000000000..0a68c2da73 --- /dev/null +++ b/website/harness/fnGlobalObject.js @@ -0,0 +1,5 @@ +//----------------------------------------------------------------------------- +var __globalObject = Function("return this;")(); +function fnGlobalObject() { + return __globalObject; +} diff --git a/website/harness/runTestCase.js b/website/harness/runTestCase.js new file mode 100644 index 0000000000..8b24a1ca0e --- /dev/null +++ b/website/harness/runTestCase.js @@ -0,0 +1,5 @@ +function runTestCase(testcase) { + if (testcase() !== true) { + $ERROR("Test case returned non-true value!"); + } +}